12
12
| sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
13
13
| awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
15
Index: libitm/configure.tgt
16
===================================================================
17
--- a/src/libitm/configure.tgt (.../tags/gcc_4_8_3_release)
18
+++ b/src/libitm/configure.tgt (.../branches/gcc-4_8-branch)
21
case " ${CC} ${CFLAGS} " in
23
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
24
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
25
XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
28
Index: libitm/ChangeLog
29
===================================================================
30
--- a/src/libitm/ChangeLog (.../tags/gcc_4_8_3_release)
31
+++ b/src/libitm/ChangeLog (.../branches/gcc-4_8-branch)
33
+2014-12-05 Uros Bizjak <ubizjak@gmail.com>
35
+ * configure.tgt (x86_64): Tune -m32 multilib to generic.
37
2014-05-22 Release Manager
41
===================================================================
42
--- a/src/Makefile.in (.../tags/gcc_4_8_3_release)
43
+++ b/src/Makefile.in (.../branches/gcc-4_8-branch)
44
@@ -45483,6 +45483,38 @@
45
configure-stage4-gcc: maybe-all-stage4-gmp
46
configure-stageprofile-gcc: maybe-all-stageprofile-gmp
47
configure-stagefeedback-gcc: maybe-all-stagefeedback-gmp
48
+configure-gcc: maybe-all-mpfr
50
+configure-stage1-gcc: maybe-all-stage1-mpfr
51
+configure-stage2-gcc: maybe-all-stage2-mpfr
52
+configure-stage3-gcc: maybe-all-stage3-mpfr
53
+configure-stage4-gcc: maybe-all-stage4-mpfr
54
+configure-stageprofile-gcc: maybe-all-stageprofile-mpfr
55
+configure-stagefeedback-gcc: maybe-all-stagefeedback-mpfr
56
+configure-gcc: maybe-all-mpc
58
+configure-stage1-gcc: maybe-all-stage1-mpc
59
+configure-stage2-gcc: maybe-all-stage2-mpc
60
+configure-stage3-gcc: maybe-all-stage3-mpc
61
+configure-stage4-gcc: maybe-all-stage4-mpc
62
+configure-stageprofile-gcc: maybe-all-stageprofile-mpc
63
+configure-stagefeedback-gcc: maybe-all-stagefeedback-mpc
64
+configure-gcc: maybe-all-isl
66
+configure-stage1-gcc: maybe-all-stage1-isl
67
+configure-stage2-gcc: maybe-all-stage2-isl
68
+configure-stage3-gcc: maybe-all-stage3-isl
69
+configure-stage4-gcc: maybe-all-stage4-isl
70
+configure-stageprofile-gcc: maybe-all-stageprofile-isl
71
+configure-stagefeedback-gcc: maybe-all-stagefeedback-isl
72
+configure-gcc: maybe-all-cloog
74
+configure-stage1-gcc: maybe-all-stage1-cloog
75
+configure-stage2-gcc: maybe-all-stage2-cloog
76
+configure-stage3-gcc: maybe-all-stage3-cloog
77
+configure-stage4-gcc: maybe-all-stage4-cloog
78
+configure-stageprofile-gcc: maybe-all-stageprofile-cloog
79
+configure-stagefeedback-gcc: maybe-all-stagefeedback-cloog
80
configure-gcc: maybe-all-lto-plugin
82
configure-stage1-gcc: maybe-all-stage1-lto-plugin
83
Index: libgomp/configure.tgt
84
===================================================================
85
--- a/src/libgomp/configure.tgt (.../tags/gcc_4_8_3_release)
86
+++ b/src/libgomp/configure.tgt (.../branches/gcc-4_8-branch)
88
config_path="linux/x86 linux posix"
89
case " ${CC} ${CFLAGS} " in
91
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
92
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
96
Index: libgomp/ChangeLog
97
===================================================================
98
--- a/src/libgomp/ChangeLog (.../tags/gcc_4_8_3_release)
99
+++ b/src/libgomp/ChangeLog (.../branches/gcc-4_8-branch)
101
+2014-12-05 Uros Bizjak <ubizjak@gmail.com>
103
+ * configure.tgt (x86_64): Tune -m32 multilib to generic.
105
+2014-11-28 Jakub Jelinek <jakub@redhat.com>
107
+ Backported from mainline
108
+ 2014-11-24 Jakub Jelinek <jakub@redhat.com>
111
+ * libgomp.fortran/pr63938-1.f90: New test.
112
+ * libgomp.fortran/pr63938-2.f90: New test.
114
+ 2014-10-03 Jakub Jelinek <jakub@redhat.com>
117
+ * testsuite/libgomp.c/pr61200.c: New test.
119
2014-05-22 Release Manager
121
* GCC 4.8.3 released.
122
Index: libgomp/testsuite/libgomp.fortran/pr63938-1.f90
123
===================================================================
124
--- a/src/libgomp/testsuite/libgomp.fortran/pr63938-1.f90 (.../tags/gcc_4_8_3_release)
125
+++ b/src/libgomp/testsuite/libgomp.fortran/pr63938-1.f90 (.../branches/gcc-4_8-branch)
138
+!$omp end parallel do
139
+ if (x(1) .ne. 1000) call abort
140
+end program pr63938_1
141
Index: libgomp/testsuite/libgomp.fortran/pr63938-2.f90
142
===================================================================
143
--- a/src/libgomp/testsuite/libgomp.fortran/pr63938-2.f90 (.../tags/gcc_4_8_3_release)
144
+++ b/src/libgomp/testsuite/libgomp.fortran/pr63938-2.f90 (.../branches/gcc-4_8-branch)
161
+!$omp end parallel do
162
+ if (x%x .ne. 1000) call abort
163
+end program pr63938_2
164
Index: libgomp/testsuite/libgomp.c/pr61200.c
165
===================================================================
166
--- a/src/libgomp/testsuite/libgomp.c/pr61200.c (.../tags/gcc_4_8_3_release)
167
+++ b/src/libgomp/testsuite/libgomp.c/pr61200.c (.../branches/gcc-4_8-branch)
169
+/* PR libgomp/61200 */
184
+ for (i = 0; i < 2; i++)
188
+ #pragma omp parallel num_threads(2)
199
+ #pragma omp task shared(var)
206
+ #pragma omp taskwait
217
+ for (i = 0; i < 2; i++)
221
+ #pragma omp task shared(var)
229
+ #pragma omp parallel num_threads(2)
239
+ #pragma omp taskwait
247
+ omp_set_nested (1);
248
+ #pragma omp parallel num_threads(2)
251
+ #pragma omp parallel num_threads(2)
256
Index: libstdc++-v3/python/libstdcxx/v6/printers.py
257
===================================================================
258
--- a/src/libstdc++-v3/python/libstdcxx/v6/printers.py (.../tags/gcc_4_8_3_release)
259
+++ b/src/libstdc++-v3/python/libstdcxx/v6/printers.py (.../branches/gcc-4_8-branch)
261
-# Pretty-printers for libstc++.
262
+# Pretty-printers for libstdc++.
264
# Copyright (C) 2008-2013 Free Software Foundation, Inc.
272
+### Python 2 + Python 3 compatibility code
274
+# Resources about compatibility:
276
+# * <http://pythonhosted.org/six/>: Documentation of the "six" module
278
+# FIXME: The handling of e.g. std::basic_string (at least on char)
279
+# probably needs updating to work with Python 3's new string rules.
281
+# In particular, Python 3 has a separate type (called byte) for
282
+# bytestrings, and a special b"" syntax for the byte literals; the old
283
+# str() type has been redefined to always store Unicode text.
285
+# We probably can't do much about this until this GDB PR is addressed:
286
+# <https://sourceware.org/bugzilla/show_bug.cgi?id=17138>
288
+if sys.version_info[0] > 2:
291
+ # Python 3 folds these into the normal functions.
294
+ # Also, int subsumes long
299
+ """Compatibility mixin for iterators
301
+ Instead of writing next() methods for iterators, write
302
+ __next__() methods and use this mixin to make them work in
303
+ Python 2 as well as Python 3.
305
+ Idea stolen from the "six" documentation:
306
+ <http://pythonhosted.org/six/#six.Iterator>
310
+ return self.__next__()
312
+ # In Python 2, we still need these from itertools
313
+ from itertools import imap, izip
315
# Try to use the new-style pretty-printing if available.
319
# anything fancier here.
320
field = typ.fields()[0]
321
if not field.is_base_class:
322
- raise ValueError, "Cannot find type %s::%s" % (str(orig), name)
323
+ raise ValueError("Cannot find type %s::%s" % (str(orig), name))
326
class SharedPointerPrinter:
328
class StdListPrinter:
332
+ class _iterator(Iterator):
333
def __init__(self, nodetype, head):
334
self.nodetype = nodetype
335
self.base = head['_M_next']
341
+ def __next__(self):
342
if self.base == self.head:
344
elt = self.base.cast(self.nodetype).dereference()
346
class StdSlistPrinter:
347
"Print a __gnu_cxx::slist"
350
+ class _iterator(Iterator):
351
def __init__(self, nodetype, head):
352
self.nodetype = nodetype
353
self.base = head['_M_head']['_M_next']
359
+ def __next__(self):
362
elt = self.base.cast(self.nodetype).dereference()
364
class StdVectorPrinter:
365
"Print a std::vector"
368
+ class _iterator(Iterator):
369
def __init__ (self, start, finish, bitvec):
377
+ def __next__(self):
379
self.count = self.count + 1
382
class StdTuplePrinter:
386
+ class _iterator(Iterator):
387
def __init__ (self, head):
390
@@ -276,13 +320,13 @@
391
# Set the actual head to the first pair.
392
self.head = self.head.cast (nodes[0].type)
393
elif len (nodes) != 0:
394
- raise ValueError, "Top of tuple tree does not consist of a single node."
395
+ raise ValueError("Top of tuple tree does not consist of a single node.")
402
+ def __next__ (self):
403
nodes = self.head.type.fields ()
404
# Check for further recursions in the inheritance tree.
408
# Check that this iteration has an expected structure.
410
- raise ValueError, "Cannot parse more than 2 nodes in a tuple tree."
411
+ raise ValueError("Cannot parse more than 2 nodes in a tuple tree.")
413
# - Left node is the next recursion parent.
414
# - Right node is the actual class contained in the tuple.
416
return self.visualizer.display_hint ()
419
-class RbtreeIterator:
420
+class RbtreeIterator(Iterator):
421
def __init__(self, rbtree):
422
self.size = rbtree['_M_t']['_M_impl']['_M_node_count']
423
self.node = rbtree['_M_t']['_M_impl']['_M_header']['_M_left']
426
return int (self.size)
429
+ def __next__(self):
430
if self.count == self.size:
434
"Print a std::map or std::multimap"
436
# Turn an RbtreeIterator into a pretty-print iterator.
438
+ class _iter(Iterator):
439
def __init__(self, rbiter, type):
447
+ def __next__(self):
448
if self.count % 2 == 0:
449
- n = self.rbiter.next()
450
+ n = next(self.rbiter)
451
n = n.cast(self.type).dereference()['_M_value_field']
455
"Print a std::set or std::multiset"
457
# Turn an RbtreeIterator into a pretty-print iterator.
459
+ class _iter(Iterator):
460
def __init__(self, rbiter, type):
468
- item = self.rbiter.next()
469
+ def __next__(self):
470
+ item = next(self.rbiter)
471
item = item.cast(self.type).dereference()['_M_value_field']
472
# FIXME: this is weird ... what to do?
473
# Maybe a 'set' display hint?
475
class StdDequePrinter:
479
+ class _iter(Iterator):
480
def __init__(self, node, start, end, last, buffer_size):
488
+ def __next__(self):
489
if self.p == self.last:
493
def display_hint (self):
496
-class Tr1HashtableIterator:
497
+class Tr1HashtableIterator(Iterator):
498
def __init__ (self, hash):
499
self.node = hash['_M_bbegin']['_M_node']['_M_nxt']
500
self.node_type = find_type(hash.type, '__node_type').pointer()
506
+ def __next__ (self):
509
node = self.node.cast(self.node_type)
514
- counter = itertools.imap (self.format_count, itertools.count())
515
- return itertools.izip (counter, Tr1HashtableIterator (self.hashtable()))
516
+ counter = imap (self.format_count, itertools.count())
517
+ return izip (counter, Tr1HashtableIterator (self.hashtable()))
519
class Tr1UnorderedMapPrinter:
520
"Print a tr1::unordered_map"
521
@@ -688,11 +732,11 @@
525
- counter = itertools.imap (self.format_count, itertools.count())
526
+ counter = imap (self.format_count, itertools.count())
527
# Map over the hash table and flatten the result.
528
- data = self.flatten (itertools.imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
529
+ data = self.flatten (imap (self.format_one, Tr1HashtableIterator (self.hashtable())))
530
# Zip the two iterators together.
531
- return itertools.izip (counter, data)
532
+ return izip (counter, data)
534
def display_hint (self):
537
class StdForwardListPrinter:
538
"Print a std::forward_list"
541
+ class _iterator(Iterator):
542
def __init__(self, nodetype, head):
543
self.nodetype = nodetype
544
self.base = head['_M_next']
550
+ def __next__(self):
553
elt = self.base.cast(self.nodetype).dereference()
555
# A small sanity check.
557
if not self.compiled_rx.match(name + '<>'):
558
- raise ValueError, 'libstdc++ programming error: "%s" does not match' % name
559
+ raise ValueError('libstdc++ programming error: "%s" does not match' % name)
560
printer = RxPrinter(name, function)
561
self.subprinters.append(printer)
562
self.lookup[name] = printer
563
Index: libstdc++-v3/scripts/run_doxygen
564
===================================================================
565
--- a/src/libstdc++-v3/scripts/run_doxygen (.../tags/gcc_4_8_3_release)
566
+++ b/src/libstdc++-v3/scripts/run_doxygen (.../branches/gcc-4_8-branch)
571
- # Also drop in the header file and style sheet
572
- doxygen -w latex header.tex doxygen.sty
573
+ # Grrr, Doxygen 1.8.x changed the -w latex options.
574
+ need_footer=`doxygen -h | sed -n -e '/-w latex/s=.*footer.*=true=p'`
576
+ # Also drop in the header file (maybe footer file) and style sheet
577
+ if $need_footer; then
578
+ doxygen -w latex header.tex footer.tex doxygen.sty
580
+ doxygen -w latex header.tex doxygen.sty
584
echo :: LaTeX pages begin with
585
Index: libstdc++-v3/configure.host
586
===================================================================
587
--- a/src/libstdc++-v3/configure.host (.../tags/gcc_4_8_3_release)
588
+++ b/src/libstdc++-v3/configure.host (.../branches/gcc-4_8-branch)
590
os_include_dir="os/aix"
591
atomicity_dir="os/aix"
592
atomic_word_dir="os/aix"
593
- OPT_LDFLAGS="-Wl,-G"
596
os_include_dir="os/generic"
597
Index: libstdc++-v3/doc/xml/manual/containers.xml
598
===================================================================
599
--- a/src/libstdc++-v3/doc/xml/manual/containers.xml (.../tags/gcc_4_8_3_release)
600
+++ b/src/libstdc++-v3/doc/xml/manual/containers.xml (.../branches/gcc-4_8-branch)
602
<section xml:id="sequences.list.size" xreflabel="list::size() is O(n)"><info><title>list::size() is O(n)</title></info>
605
- Yes it is, and that's okay. This is a decision that we preserved
606
- when we imported SGI's STL implementation. The following is
607
+ Yes it is, and that was okay until the 2011 edition of the C++ standard.
608
+ In future GCC will change it to O(1) but O(N) was a decision that we
609
+ preserved when we imported SGI's STL implementation. The following is
610
quoted from <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.sgi.com/tech/stl/FAQ.html">their FAQ</link>:
617
-<section xml:id="containers.sequences.vector" xreflabel="vector"><info><title>vector</title></info>
618
-<?dbhtml filename="vector.html"?>
622
- <section xml:id="sequences.vector.management" xreflabel="Space Overhead Management"><info><title>Space Overhead Management</title></info>
625
- In <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html">this
626
- message to the list</link>, Daniel Kostecky announced work on an
627
- alternate form of <code>std::vector</code> that would support
628
- hints on the number of elements to be over-allocated. The design
629
- was also described, along with possible implementation choices.
632
- 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>
633
- and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html">here</link>.
636
- </section></section>
639
<!-- Sect1 02 : Associative -->
640
Index: libstdc++-v3/doc/xml/manual/status_cxx2011.xml
641
===================================================================
642
--- a/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml (.../tags/gcc_4_8_3_release)
643
+++ b/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml (.../branches/gcc-4_8-branch)
644
@@ -226,10 +226,12 @@
648
+ <?dbhtml bgcolor="#B0B0B0" ?>
649
<entry>18.8.6</entry>
650
<entry><code>nested_exception</code></entry>
653
+ <entry>Partial</entry>
654
+ <entry>Follows an earlier C++0x draft, not the final specification.
659
@@ -612,10 +614,11 @@
663
+ <?dbhtml bgcolor="#B0B0B0" ?>
664
<entry>20.6.12.4</entry>
665
<entry><code>uninitialized_fill_n</code></entry>
668
+ <entry>Partial</entry>
669
+ <entry>Returns <code>void</code>.</entry>
672
<entry>20.6.13</entry>
673
@@ -1119,10 +1122,13 @@
677
+ <?dbhtml bgcolor="#B0B0B0" ?>
679
<entry>Class template <code>basic_string</code></entry>
682
+ <entry>Partial</entry>
683
+ <entry>Non-conforming Copy-On-Write implementation.
684
+ Missing <code>getline</code> overloads for rvalue streams.
689
@@ -1190,10 +1196,11 @@
693
+ <?dbhtml bgcolor="#B0B0B0" ?>
694
<entry>22.3.3.1</entry>
695
<entry>Character classification</entry>
698
+ <entry>Partial</entry>
699
+ <entry>Missing <code>isblank</code>.</entry>
702
<entry>22.3.3.2</entry>
703
@@ -1272,16 +1279,18 @@
707
+ <?dbhtml bgcolor="#B0B0B0" ?>
708
<entry>22.4.5.1</entry>
709
<entry>Class template <code>time_get</code></entry>
712
+ <entry>Partial</entry>
713
+ <entry>Missing <code>get</code> and <code>do_get</code></entry>
716
+ <?dbhtml bgcolor="#B0B0B0" ?>
717
<entry>22.4.5.2</entry>
718
<entry>Class template <code>time_get_byname</code></entry>
721
+ <entry>Partial</entry>
722
+ <entry>Likewise</entry>
725
<entry>22.4.5.3</entry>
726
@@ -1434,8 +1443,10 @@
727
<entry>23.3.5</entry>
728
<entry>Class template <code>list</code></entry>
729
<entry>Partial</entry>
730
- <entry><code>insert</code> and <code>erase</code> members do not
731
- take <code>const_iterator</code> arguments (N2350).</entry>
733
+ <code>insert</code> and <code>erase</code> members do not
734
+ take <code>const_iterator</code> arguments (N2350).
738
<?dbhtml bgcolor="#B0B0B0" ?>
739
@@ -1650,10 +1661,11 @@
743
+ <?dbhtml bgcolor="#B0B0B0" ?>
745
<entry>Mutating sequence operations</entry>
748
+ <entry>Partial</entry>
749
+ <entry><code>rotate</code> returns <code>void</code>.</entry>
753
@@ -2060,10 +2072,13 @@
757
+ <?dbhtml bgcolor="#B0B0B0" ?>
759
<entry>C Library</entry>
762
+ <entry>Partial</entry>
763
+ <entry><code><ctgmath></code> doesn't include
764
+ <code><ccomplex></code>
769
@@ -2143,6 +2158,7 @@
770
Missing move and swap operations on <code>basic_ios</code>.
771
Missing <code>io_errc</code> and <code>iostream_category</code>.
772
<code>ios_base::failure</code> is not derived from <code>system_error</code>.
773
+ Missing <code>ios_base::hexfloat</code>.
777
Index: libstdc++-v3/doc/html/index.html
778
===================================================================
779
--- a/src/libstdc++-v3/doc/html/index.html (.../tags/gcc_4_8_3_release)
780
+++ b/src/libstdc++-v3/doc/html/index.html (.../branches/gcc-4_8-branch)
782
</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.
785
-</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.
786
+</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.
789
</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.
792
</a></span></dt><dt><span class="appendix"><a href="manual/appendix_gpl.html">D.
793
<acronym class="acronym">GNU</acronym> General Public License version 3
794
- </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>
795
\ No newline at end of file
796
+ </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>
797
Index: libstdc++-v3/doc/html/manual/status.html
798
===================================================================
799
--- a/src/libstdc++-v3/doc/html/manual/status.html (.../tags/gcc_4_8_3_release)
800
+++ b/src/libstdc++-v3/doc/html/manual/status.html (.../branches/gcc-4_8-branch)
802
<code class="code">set_new_handler</code> is not thread-safe.
803
</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>.
804
<code class="code">set_terminate</code> is not thread-safe.
805
- </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">
806
+ </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.
807
+ </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">
808
<span class="emphasis"><em>19</em></span>
809
</td><td colspan="3" align="left">
810
<span class="emphasis"><em>Diagnostics</em></span>
812
<span class="emphasis"><em>20</em></span>
813
</td><td colspan="3" align="left">
814
<span class="emphasis"><em>General utilities</em></span>
815
- </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">
816
+ </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">
819
<a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">boost::shared_ptr</a>.
820
@@ -187,14 +188,16 @@
821
<span class="emphasis"><em>21</em></span>
822
</td><td colspan="3" align="left">
823
<span class="emphasis"><em>Strings</em></span>
824
- </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.
825
+ </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.
826
+ Missing <code class="code">getline</code> overloads for rvalue streams.
827
+ </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.
828
Missing <code class="filename"><cuchar></code>
829
</td></tr><tr><td align="left">
830
<span class="emphasis"><em>22</em></span>
831
</td><td colspan="3" align="left">
832
<span class="emphasis"><em>Localization</em></span>
833
- </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
834
- <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">
835
+ </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
836
+ <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">
837
<span class="emphasis"><em>23</em></span>
838
</td><td colspan="3" align="left">
839
<span class="emphasis"><em>Containers</em></span>
841
</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>
842
meet the requirements
843
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
844
- 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
845
- 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
846
+ 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.
847
+ <code class="code">insert</code> and <code class="code">erase</code> members do not
848
+ take <code class="code">const_iterator</code> arguments (N2350).
849
+ </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
850
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
851
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">
852
<span class="emphasis"><em>24</em></span>
853
@@ -212,11 +217,13 @@
854
<span class="emphasis"><em>25</em></span>
855
</td><td colspan="3" align="left">
856
<span class="emphasis"><em>Algorithms</em></span>
857
- </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">
858
+ </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">
859
<span class="emphasis"><em>26</em></span>
860
</td><td colspan="3" align="left">
861
<span class="emphasis"><em>Numerics</em></span>
862
- </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">
863
+ </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
864
+ <code class="code"><ccomplex></code>
865
+ </td></tr><tr><td align="left">
866
<span class="emphasis"><em>27</em></span>
867
</td><td colspan="3" align="left">
868
<span class="emphasis"><em>Input/output library</em></span>
870
Missing move and swap operations on <code class="code">basic_ios</code>.
871
Missing <code class="code">io_errc</code> and <code class="code">iostream_category</code>.
872
<code class="code">ios_base::failure</code> is not derived from <code class="code">system_error</code>.
873
+ Missing <code class="code">ios_base::hexfloat</code>.
874
</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">
875
Missing move and swap operations
876
Missing <code class="code">get_time</code> and <code class="code">put_time</code> manipulators.
877
Index: libstdc++-v3/doc/html/manual/abi.html
878
===================================================================
879
--- a/src/libstdc++-v3/doc/html/manual/abi.html (.../tags/gcc_4_8_3_release)
880
+++ b/src/libstdc++-v3/doc/html/manual/abi.html (.../branches/gcc-4_8-branch)
882
definitions, where the version definition is the maximum for a
883
particular release. Labels are cumulative. If a particular release
884
is not listed, it has the same version labels as the preceding
885
- 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>
886
+ 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>
887
Release versioning on the libstdc++.so binary, implemented in
888
the same way as the libgcc_s.so binary above. Listed is the
889
filename: <code class="constant">DT_SONAME</code> can be deduced from
891
has the same filename and <code class="constant">DT_SONAME</code> as the
893
</p><p>It is versioned as follows:
894
- </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>
895
+ </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>
896
Note 1: Error should be libstdc++.so.3.0.3.
898
Note 2: Not strictly required.
900
GLIBCPP_3.2 for symbols that were introduced in the GCC 3.2.0
901
release.) If a particular release is not listed, it has the same
902
version labels as the preceding release.
903
- </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,
904
+ </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,
905
__GXX_ABI_VERSION. This macro is defined as the version of the
906
compiler v3 ABI, with g++ 3.0 being version 100. This macro will
907
be automatically defined whenever g++ is used (the curious can
908
Index: libstdc++-v3/doc/html/manual/std_contents.html
909
===================================================================
910
--- a/src/libstdc++-v3/doc/html/manual/std_contents.html (.../tags/gcc_4_8_3_release)
911
+++ b/src/libstdc++-v3/doc/html/manual/std_contents.html (.../branches/gcc-4_8-branch)
913
</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.
916
-</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.
917
+</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.
920
</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.
922
</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.
925
-</td></tr></table></div></body></html>
926
\ No newline at end of file
927
+</td></tr></table></div></body></html>
928
Index: libstdc++-v3/doc/html/manual/containers.html
929
===================================================================
930
--- a/src/libstdc++-v3/doc/html/manual/containers.html (.../tags/gcc_4_8_3_release)
931
+++ b/src/libstdc++-v3/doc/html/manual/containers.html (.../branches/gcc-4_8-branch)
933
</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.
935
<a id="idm269999493408" class="indexterm"></a>
936
-</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>
937
- Yes it is, and that's okay. This is a decision that we preserved
938
- when we imported SGI's STL implementation. The following is
939
+</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>
940
+ Yes it is, and that was okay until the 2011 edition of the C++ standard.
941
+ In future GCC will change it to O(1) but O(N) was a decision that we
942
+ preserved when we imported SGI's STL implementation. The following is
943
quoted from <a class="link" href="http://www.sgi.com/tech/stl/FAQ.html" target="_top">their FAQ</a>:
944
</p><div class="blockquote"><blockquote class="blockquote"><p>
945
The size() member function, for list and slist, takes time
947
</p><pre class="programlisting">
950
- </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>
951
- </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>
952
- In <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html" target="_top">this
953
- message to the list</a>, Daniel Kostecky announced work on an
954
- alternate form of <code class="code">std::vector</code> that would support
955
- hints on the number of elements to be over-allocated. The design
956
- was also described, along with possible implementation choices.
958
- 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>
959
- and <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html" target="_top">here</a>.
960
- </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>
961
\ No newline at end of file
962
+ </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>
963
Index: libstdc++-v3/doc/html/manual/index.html
964
===================================================================
965
--- a/src/libstdc++-v3/doc/html/manual/index.html (.../tags/gcc_4_8_3_release)
966
+++ b/src/libstdc++-v3/doc/html/manual/index.html (.../branches/gcc-4_8-branch)
968
</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.
971
-</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.
972
+</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.
975
</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.
977
</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.
980
-</td></tr></table></div></body></html>
981
\ No newline at end of file
982
+</td></tr></table></div></body></html>
983
Index: libstdc++-v3/include/std/tuple
984
===================================================================
985
--- a/src/libstdc++-v3/include/std/tuple (.../tags/gcc_4_8_3_release)
986
+++ b/src/libstdc++-v3/include/std/tuple (.../branches/gcc-4_8-branch)
988
constexpr _Head_base(const _Head& __h)
991
- template<typename _UHead, typename = typename
992
- enable_if<!is_convertible<_UHead,
993
- __uses_alloc_base>::value>::type>
994
+ constexpr _Head_base(const _Head_base&) = default;
995
+ constexpr _Head_base(_Head_base&&) = default;
997
+ template<typename _UHead>
998
constexpr _Head_base(_UHead&& __h)
999
: _Head(std::forward<_UHead>(__h)) { }
1001
- _Head_base(__uses_alloc0)
1002
+ _Head_base(allocator_arg_t, __uses_alloc0)
1005
template<typename _Alloc>
1006
- _Head_base(__uses_alloc1<_Alloc> __a)
1007
+ _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a)
1008
: _Head(allocator_arg, *__a._M_a) { }
1010
template<typename _Alloc>
1011
- _Head_base(__uses_alloc2<_Alloc> __a)
1012
+ _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a)
1013
: _Head(*__a._M_a) { }
1015
template<typename _UHead>
1016
@@ -133,21 +134,22 @@
1017
constexpr _Head_base(const _Head& __h)
1018
: _M_head_impl(__h) { }
1020
- template<typename _UHead, typename = typename
1021
- enable_if<!is_convertible<_UHead,
1022
- __uses_alloc_base>::value>::type>
1023
+ constexpr _Head_base(const _Head_base&) = default;
1024
+ constexpr _Head_base(_Head_base&&) = default;
1026
+ template<typename _UHead>
1027
constexpr _Head_base(_UHead&& __h)
1028
: _M_head_impl(std::forward<_UHead>(__h)) { }
1030
- _Head_base(__uses_alloc0)
1031
+ _Head_base(allocator_arg_t, __uses_alloc0)
1032
: _M_head_impl() { }
1034
template<typename _Alloc>
1035
- _Head_base(__uses_alloc1<_Alloc> __a)
1036
+ _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a)
1037
: _M_head_impl(allocator_arg, *__a._M_a) { }
1039
template<typename _Alloc>
1040
- _Head_base(__uses_alloc2<_Alloc> __a)
1041
+ _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a)
1042
: _M_head_impl(*__a._M_a) { }
1044
template<typename _UHead>
1046
template<typename _Alloc>
1047
_Tuple_impl(allocator_arg_t __tag, const _Alloc& __a)
1048
: _Inherited(__tag, __a),
1049
- _Base(__use_alloc<_Head>(__a)) { }
1050
+ _Base(__tag, __use_alloc<_Head>(__a)) { }
1052
template<typename _Alloc>
1053
_Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
1054
Index: libstdc++-v3/include/std/future
1055
===================================================================
1056
--- a/src/libstdc++-v3/include/std/future (.../tags/gcc_4_8_3_release)
1057
+++ b/src/libstdc++-v3/include/std/future (.../branches/gcc-4_8-branch)
1058
@@ -351,12 +351,14 @@
1060
_M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false)
1062
- bool __set = __ignore_failure;
1063
+ bool __set = false;
1064
// all calls to this function are serialized,
1065
// side-effects of invoking __res only happen once
1066
call_once(_M_once, &_State_base::_M_do_set, this, ref(__res),
1070
+ _M_cond.notify_all();
1071
+ else if (!__ignore_failure)
1072
__throw_future_error(int(future_errc::promise_already_satisfied));
1076
lock_guard<mutex> __lock(_M_mutex);
1077
_M_result.swap(__res);
1079
- _M_cond.notify_all();
1083
@@ -983,22 +984,25 @@
1085
set_value(const _Res& __r)
1087
+ auto __future = _M_future;
1088
auto __setter = _State::__setter(this, __r);
1089
- _M_future->_M_set_result(std::move(__setter));
1090
+ __future->_M_set_result(std::move(__setter));
1094
set_value(_Res&& __r)
1096
+ auto __future = _M_future;
1097
auto __setter = _State::__setter(this, std::move(__r));
1098
- _M_future->_M_set_result(std::move(__setter));
1099
+ __future->_M_set_result(std::move(__setter));
1103
set_exception(exception_ptr __p)
1105
+ auto __future = _M_future;
1106
auto __setter = _State::__setter(__p, this);
1107
- _M_future->_M_set_result(std::move(__setter));
1108
+ __future->_M_set_result(std::move(__setter));
1112
@@ -1081,15 +1085,17 @@
1114
set_value(_Res& __r)
1116
+ auto __future = _M_future;
1117
auto __setter = _State::__setter(this, __r);
1118
- _M_future->_M_set_result(std::move(__setter));
1119
+ __future->_M_set_result(std::move(__setter));
1123
set_exception(exception_ptr __p)
1125
+ auto __future = _M_future;
1126
auto __setter = _State::__setter(__p, this);
1127
- _M_future->_M_set_result(std::move(__setter));
1128
+ __future->_M_set_result(std::move(__setter));
1132
@@ -1166,8 +1172,9 @@
1134
set_exception(exception_ptr __p)
1136
+ auto __future = _M_future;
1137
auto __setter = _State::__setter(__p, this);
1138
- _M_future->_M_set_result(std::move(__setter));
1139
+ __future->_M_set_result(std::move(__setter));
1143
@@ -1193,8 +1200,9 @@
1145
promise<void>::set_value()
1147
+ auto __future = _M_future;
1148
auto __setter = _State::__setter(this);
1149
- _M_future->_M_set_result(std::move(__setter));
1150
+ __future->_M_set_result(std::move(__setter));
1154
Index: libstdc++-v3/include/std/functional
1155
===================================================================
1156
--- a/src/libstdc++-v3/include/std/functional (.../tags/gcc_4_8_3_release)
1157
+++ b/src/libstdc++-v3/include/std/functional (.../branches/gcc-4_8-branch)
1158
@@ -2439,9 +2439,9 @@
1160
if (static_cast<bool>(__x))
1162
+ __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
1163
_M_invoker = __x._M_invoker;
1164
_M_manager = __x._M_manager;
1165
- __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
1169
Index: libstdc++-v3/include/ext/rope
1170
===================================================================
1171
--- a/src/libstdc++-v3/include/ext/rope (.../tags/gcc_4_8_3_release)
1172
+++ b/src/libstdc++-v3/include/ext/rope (.../branches/gcc-4_8-branch)
1173
@@ -1544,7 +1544,7 @@
1174
typedef typename _Base::allocator_type allocator_type;
1175
using _Base::_M_tree_ptr;
1176
using _Base::get_allocator;
1177
- using _Base::_M_get_allocator;
1178
+ using _Base::_M_get_allocator;
1179
typedef __GC_CONST _CharT* _Cstrptr;
1181
static _CharT _S_empty_c_str[1];
1182
@@ -1876,8 +1876,9 @@
1183
const allocator_type& __a = allocator_type())
1186
- this->_M_tree_ptr = (0 == __len) ?
1187
- 0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
1188
+ this->_M_tree_ptr = (0 == __len)
1190
+ : _S_new_RopeFunction(__fn, __len, __delete_fn, _M_get_allocator());
1193
rope(const rope& __x, const allocator_type& __a = allocator_type())
1194
Index: libstdc++-v3/include/bits/stl_algo.h
1195
===================================================================
1196
--- a/src/libstdc++-v3/include/bits/stl_algo.h (.../tags/gcc_4_8_3_release)
1197
+++ b/src/libstdc++-v3/include/bits/stl_algo.h (.../branches/gcc-4_8-branch)
1198
@@ -5193,7 +5193,12 @@
1200
if (__first != __last)
1201
for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
1202
- std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1)));
1204
+ _RandomAccessIterator __j = __first
1205
+ + std::rand() % ((__i - __first) + 1);
1207
+ std::iter_swap(__i, __j);
1212
@@ -5227,7 +5232,11 @@
1213
if (__first == __last)
1215
for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
1216
- std::iter_swap(__i, __first + __rand((__i - __first) + 1));
1218
+ _RandomAccessIterator __j = __first + __rand((__i - __first) + 1);
1220
+ std::iter_swap(__i, __j);
1225
Index: libstdc++-v3/include/bits/stl_tree.h
1226
===================================================================
1227
--- a/src/libstdc++-v3/include/bits/stl_tree.h (.../tags/gcc_4_8_3_release)
1228
+++ b/src/libstdc++-v3/include/bits/stl_tree.h (.../branches/gcc-4_8-branch)
1229
@@ -510,11 +510,11 @@
1233
- { return static_cast<_Link_type>(&this->_M_impl._M_header); }
1234
+ { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); }
1238
- { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
1239
+ { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); }
1241
static const_reference
1242
_S_value(_Const_Link_type __x)
1243
Index: libstdc++-v3/include/tr1/functional
1244
===================================================================
1245
--- a/src/libstdc++-v3/include/tr1/functional (.../tags/gcc_4_8_3_release)
1246
+++ b/src/libstdc++-v3/include/tr1/functional (.../branches/gcc-4_8-branch)
1247
@@ -2112,9 +2112,9 @@
1249
if (static_cast<bool>(__x))
1251
+ __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
1252
_M_invoker = __x._M_invoker;
1253
_M_manager = __x._M_manager;
1254
- __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
1258
@@ -2130,9 +2130,9 @@
1260
if (_My_handler::_M_not_empty_function(__f))
1262
+ _My_handler::_M_init_functor(_M_functor, __f);
1263
_M_invoker = &_My_handler::_M_invoke;
1264
_M_manager = &_My_handler::_M_manager;
1265
- _My_handler::_M_init_functor(_M_functor, __f);
1269
Index: libstdc++-v3/include/tr2/bool_set
1270
===================================================================
1271
--- a/src/libstdc++-v3/include/tr2/bool_set (.../tags/gcc_4_8_3_release)
1272
+++ b/src/libstdc++-v3/include/tr2/bool_set (.../branches/gcc-4_8-branch)
1276
* See N2136, Bool_set: multi-valued logic
1277
- * by Herv� Br�nnimann, Guillaume Melquiond, Sylvain Pion.
1278
+ * by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
1280
* The implicit conversion to bool is slippery! I may use the new
1281
* explicit conversion. This has been specialized in the language
1282
Index: libstdc++-v3/ChangeLog
1283
===================================================================
1284
--- a/src/libstdc++-v3/ChangeLog (.../tags/gcc_4_8_3_release)
1285
+++ b/src/libstdc++-v3/ChangeLog (.../branches/gcc-4_8-branch)
1287
+2014-12-06 Jonathan Wakely <jwakely@redhat.com>
1289
+ PR libstdc++/63840
1290
+ * include/std/functional (function::function(const function&)): Set
1291
+ _M_manager after operations that might throw.
1292
+ * include/tr1/functional (function::function(const function&),
1293
+ function::function(_Functor, _Useless)): Likewise.
1294
+ * testsuite/20_util/function/63840.cc: New.
1295
+ * testsuite/tr1/3_function_objects/function/63840.cc: New.
1297
+ PR libstdc++/61947
1298
+ * include/std/tuple (_Head_base): Use allocator_arg_t parameters to
1299
+ disambiguate unary constructors.
1300
+ (_Tuple_impl): Pass allocator_arg_t arguments.
1301
+ * testsuite/20_util/tuple/61947.cc: New.
1302
+ * testsuite/20_util/uses_allocator/cons_neg.cc: Adjust dg-error line.
1304
+ PR libstdc++/59603
1305
+ * include/bits/stl_algo.h (random_shuffle): Prevent self-swapping.
1306
+ * testsuite/25_algorithms/random_shuffle/59603.cc: New.
1308
+2014-11-27 Thomas Preud'homme <thomas.preudhomme@arm.com>
1310
+ Backport from mainline
1311
+ 2014-09-10 Tony Wang <tony.wang@arm.com>
1314
+ * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION):
1315
+ Return with CONTINUE_UNWINDING when the state pattern
1316
+ contains: _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND
1318
+2014-11-05 David Edelsohn <dje.gcc@gmail.com>
1320
+ Backported from mainline.
1321
+ 2014-10-30 David Edelsohn <dje.gcc@gmail.com>
1323
+ * configure.host (aix4.3+, 5+): Do not use -G in link command.
1325
+2014-10-15 Jason Merrill <jason@redhat.com>
1327
+ * libsupc++/dyncast.cc (__dynamic_cast): Handle mid-destruction
1328
+ dynamic_cast more gracefully.
1330
+2014-10-14 Kai Tietz <ktietz@redhat.com>
1332
+ PR libstdc++/57440
1333
+ * config/os/mingw32/os_defines.h (_GTHREAD_USE_MUTEX_INIT_FUNC):
1334
+ Define to avoid leak.
1335
+ * config/os/mingw32-w64/os_defines.h: Likewise.
1337
+2014-10-03 Jonathan Wakely <jwakely@redhat.com>
1339
+ PR libstdc++/63449
1340
+ * doc/xml/manual/containers.xml: Remove outdated section. Update
1342
+ * doc/html/*: Regenerate.
1344
+2014-10-01 Jonathan Wakely <jwakely@redhat.com>
1346
+ * doc/xml/manual/status_cxx2011.xml: Corrections.
1347
+ * doc/html/manual/status.html: Regenerate.
1349
+2014-08-28 Samuel Bronson <naesten@gmail.com>
1351
+ Backport r212453 from trunk
1352
+ 2014-07-11 Samuel Bronson <naesten@gmail.com>
1353
+ Matthias Klose <doko@ubuntu.com>
1355
+ PR libstdc++/58962
1356
+ * python/libstdcxx/v6/printers.py: Port to Python 2+3
1357
+ (imap): New compat function.
1359
+ (Iterator): New mixin to allow writing iterators in Python 3 style
1360
+ regardless of which version we're running on.
1361
+ [Python3] (long) New compat alias for "int".
1362
+ * testsuite/lib/gdb-test.exp: Port to Python 2+3 (print syntax)
1364
+ Backport r210625 from trunk
1365
+ 2014-05-19 Jonathan Wakely <jwakely@redhat.com>
1367
+ * python/libstdcxx/v6/printers.py: Use Python3 raise syntax.
1369
+2014-08-26 John David Anglin <danglin@gcc.gnu.org>
1371
+ * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
1373
+2014-08-26 Jonathan Wakely <jwakely@redhat.com>
1375
+ * doc/xml/manual/status_cxx2011.xml: Correct status table.
1376
+ * doc/html/manual/*: Regenerate.
1378
+2014-08-04 Jonathan Wakely <jwakely@redhat.com>
1380
+ Backported from mainline
1381
+ 2014-07-29 Jonathan Wakely <jwakely@redhat.com>
1383
+ PR libstdc++/61946
1384
+ * include/ext/rope (rope::rope(char_producer<_CharT>*, size_t, bool,
1385
+ const allocator_type&)): Pass non-const allocator to
1386
+ _S_new_RopeFunction.
1387
+ * testsuite/ext/rope/61946.cc: New.
1389
+2014-08-04 Zifei Tong <zifeitong@gmail.com>
1391
+ * libsupc++/atexit_thread.cc (HAVE___CXA_THREAD_ATEXIT_IMPL): Add
1392
+ _GLIBCXX_ prefix to macro.
1394
+2014-06-03 Jonathan Wakely <jwakely@redhat.com>
1396
+ Backport from mainline
1397
+ 2014-04-15 Jonathan Wakely <jwakely@redhat.com>
1399
+ PR libstdc++/60734
1400
+ * include/bits/stl_tree.h (_Rb_tree::_M_end): Fix invalid cast.
1402
+ Backport from mainline
1403
+ 2014-05-16 Jonathan Wakely <jwakely@redhat.com>
1405
+ PR libstdc++/60966
1406
+ * include/std/future (__future_base::_State_baseV2::_M_set_result):
1407
+ Signal condition variable after call_once returns.
1408
+ (__future_base::_State_baseV2::_M_do_set): Do not signal here.
1409
+ (promise::set_value, promise::set_exception): Increment the reference
1410
+ count on the shared state until the function returns.
1411
+ * testsuite/30_threads/promise/60966.cc: New.
1413
+2014-05-29 Jonathan Wakely <jwakely@redhat.com>
1415
+ * include/tr2/bool_set: Use UTF-8 for accented characters.
1416
+ * scripts/run_doxygen: Handle Doxygen 1.8.x change.
1418
2014-05-22 Release Manager
1420
* GCC 4.8.3 released.
1421
Index: libstdc++-v3/libsupc++/atexit_thread.cc
1422
===================================================================
1423
--- a/src/libstdc++-v3/libsupc++/atexit_thread.cc (.../tags/gcc_4_8_3_release)
1424
+++ b/src/libstdc++-v3/libsupc++/atexit_thread.cc (.../branches/gcc-4_8-branch)
1427
#include "bits/gthr.h"
1429
-#if HAVE___CXA_THREAD_ATEXIT_IMPL
1430
+#if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL
1432
extern "C" int __cxa_thread_atexit_impl (void (*func) (void *),
1433
void *arg, void *d);
1435
return __cxa_thread_atexit_impl (dtor, obj, dso_handle);
1438
-#else /* HAVE___CXA_THREAD_ATEXIT_IMPL */
1439
+#else /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
1442
// One element in a singly-linked stack of cleanups.
1447
-#endif /* HAVE___CXA_THREAD_ATEXIT_IMPL */
1448
+#endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
1449
Index: libstdc++-v3/libsupc++/eh_personality.cc
1450
===================================================================
1451
--- a/src/libstdc++-v3/libsupc++/eh_personality.cc (.../tags/gcc_4_8_3_release)
1452
+++ b/src/libstdc++-v3/libsupc++/eh_personality.cc (.../branches/gcc-4_8-branch)
1453
@@ -378,6 +378,12 @@
1454
switch (state & _US_ACTION_MASK)
1456
case _US_VIRTUAL_UNWIND_FRAME:
1457
+ // If the unwind state pattern is
1458
+ // _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND
1459
+ // then we don't need to search for any handler as it is not a real
1460
+ // exception. Just unwind the stack.
1461
+ if (state & _US_FORCE_UNWIND)
1462
+ CONTINUE_UNWINDING;
1463
actions = _UA_SEARCH_PHASE;
1466
Index: libstdc++-v3/libsupc++/dyncast.cc
1467
===================================================================
1468
--- a/src/libstdc++-v3/libsupc++/dyncast.cc (.../tags/gcc_4_8_3_release)
1469
+++ b/src/libstdc++-v3/libsupc++/dyncast.cc (.../branches/gcc-4_8-branch)
1471
adjust_pointer <void> (src_ptr, prefix->whole_object);
1472
const __class_type_info *whole_type = prefix->whole_type;
1473
__class_type_info::__dyncast_result result;
1475
+ // If the whole object vptr doesn't refer to the whole object type, we're
1476
+ // in the middle of constructing a primary base, and src is a separate
1477
+ // base. This has undefined behavior and we can't find anything outside
1478
+ // of the base we're actually constructing, so fail now rather than
1479
+ // segfault later trying to use a vbase offset that doesn't exist.
1480
+ const void *whole_vtable = *static_cast <const void *const *> (whole_ptr);
1481
+ const vtable_prefix *whole_prefix =
1482
+ adjust_pointer <vtable_prefix> (whole_vtable,
1483
+ -offsetof (vtable_prefix, origin));
1484
+ if (whole_prefix->whole_type != whole_type)
1487
whole_type->__do_dyncast (src2dst, __class_type_info::__contained_public,
1488
dst_type, whole_ptr, src_type, src_ptr, result);
1489
Index: libstdc++-v3/testsuite/25_algorithms/random_shuffle/59603.cc
1490
===================================================================
1491
--- a/src/libstdc++-v3/testsuite/25_algorithms/random_shuffle/59603.cc (.../tags/gcc_4_8_3_release)
1492
+++ b/src/libstdc++-v3/testsuite/25_algorithms/random_shuffle/59603.cc (.../branches/gcc-4_8-branch)
1494
+// Copyright (C) 2014 Free Software Foundation, Inc.
1496
+// This file is part of the GNU ISO C++ Library. This library is free
1497
+// software; you can redistribute it and/or modify it under the
1498
+// terms of the GNU General Public License as published by the
1499
+// Free Software Foundation; either version 3, or (at your option)
1500
+// any later version.
1502
+// This library is distributed in the hope that it will be useful,
1503
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1504
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1505
+// GNU General Public License for more details.
1507
+// You should have received a copy of the GNU General Public License along
1508
+// with this library; see the file COPYING3. If not see
1509
+// <http://www.gnu.org/licenses/>.
1511
+// { dg-options "-std=gnu++11" }
1512
+// { dg-require-debug-mode "" }
1516
+#include <algorithm>
1520
+ std::vector<int> v;
1521
+ C (int a) : v{a} {};
1525
+ std::vector<C> cs { {1}, {2}, {3}, {4} };
1526
+ std::random_shuffle(cs.begin(), cs.end());
1528
Index: libstdc++-v3/testsuite/30_threads/promise/60966.cc
1529
===================================================================
1530
--- a/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../tags/gcc_4_8_3_release)
1531
+++ b/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../branches/gcc-4_8-branch)
1533
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
1534
+// { dg-options " -std=gnu++11 -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
1535
+// { dg-options " -std=gnu++11 -pthreads" { target *-*-solaris* } }
1536
+// { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-darwin* } }
1537
+// { dg-require-cstdint "" }
1538
+// { dg-require-gthreads "" }
1539
+// { dg-require-atomic-builtins "" }
1541
+// Copyright (C) 2014 Free Software Foundation, Inc.
1543
+// This file is part of the GNU ISO C++ Library. This library is free
1544
+// software; you can redistribute it and/or modify it under the
1545
+// terms of the GNU General Public License as published by the
1546
+// Free Software Foundation; either version 3, or (at your option)
1547
+// any later version.
1549
+// This library is distributed in the hope that it will be useful,
1550
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1551
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1552
+// GNU General Public License for more details.
1554
+// You should have received a copy of the GNU General Public License along
1555
+// with this library; see the file COPYING3. If not see
1556
+// <http://www.gnu.org/licenses/>.
1559
+// This test hangs if std::promise::~promise() destroys the
1560
+// shared state before std::promise::set_value() finishes using it.
1566
+const int THREADS = 10;
1568
+void run_task(std::promise<void>* pr)
1570
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
1576
+ std::vector<std::promise<void>*> tasks(THREADS);
1577
+ std::vector<std::thread> threads(THREADS);
1578
+ std::vector<std::future<void>> futures(THREADS);
1580
+ for (int i = 0; i < THREADS; ++i)
1582
+ std::promise<void>* task = new std::promise<void>;
1584
+ futures[i] = task->get_future();
1585
+ threads[i] = std::thread(run_task, task);
1588
+ for (int i = 0; i < THREADS; ++i)
1590
+ // the temporary future releases the state as soon as wait() returns
1591
+ std::future<void>(std::move(futures[i])).wait();
1592
+ // state is ready, should now be safe to delete promise, so it
1593
+ // releases the shared state too
1597
+ for (auto& t : threads)
1600
Index: libstdc++-v3/testsuite/ext/rope/61946.cc
1601
===================================================================
1602
--- a/src/libstdc++-v3/testsuite/ext/rope/61946.cc (.../tags/gcc_4_8_3_release)
1603
+++ b/src/libstdc++-v3/testsuite/ext/rope/61946.cc (.../branches/gcc-4_8-branch)
1605
+// Copyright (C) 2014 Free Software Foundation, Inc.
1607
+// This file is part of the GNU ISO C++ Library. This library is free
1608
+// software; you can redistribute it and/or modify it under the
1609
+// terms of the GNU General Public License as published by the
1610
+// Free Software Foundation; either version 3, or (at your option)
1611
+// any later version.
1613
+// This library is distributed in the hope that it will be useful,
1614
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1615
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1616
+// GNU General Public License for more details.
1618
+// You should have received a copy of the GNU General Public License along
1619
+// with this library; see the file COPYING3. If not see
1620
+// <http://www.gnu.org/licenses/>.
1622
+// { dg-do compile }
1624
+#include <ext/rope>
1626
+struct empty_char_prod : __gnu_cxx::char_producer<char>
1628
+ virtual void operator()(size_t, size_t, char*) {}
1633
+ empty_char_prod* ecp = new empty_char_prod;
1634
+ __gnu_cxx::crope excrope( ecp, 10L, true );
1636
Index: libstdc++-v3/testsuite/lib/gdb-test.exp
1637
===================================================================
1638
--- a/src/libstdc++-v3/testsuite/lib/gdb-test.exp (.../tags/gcc_4_8_3_release)
1639
+++ b/src/libstdc++-v3/testsuite/lib/gdb-test.exp (.../branches/gcc-4_8-branch)
1644
- set do_whatis_tests [gdb_batch_check "python print gdb.type_printers" \
1645
+ set do_whatis_tests [gdb_batch_check "python print(gdb.type_printers)" \
1647
if {!$do_whatis_tests} {
1648
send_log "skipping 'whatis' tests - gdb too old"
1650
# but not earlier versions.
1651
# Return 1 if the version is ok, 0 otherwise.
1652
proc gdb_version_check {} {
1653
- return [gdb_batch_check "python print gdb.lookup_global_symbol" \
1654
+ return [gdb_batch_check "python print(gdb.lookup_global_symbol)" \
1655
"<built-in function lookup_global_symbol>"]
1657
Index: libstdc++-v3/testsuite/tr1/3_function_objects/function/63840.cc
1658
===================================================================
1659
--- a/src/libstdc++-v3/testsuite/tr1/3_function_objects/function/63840.cc (.../tags/gcc_4_8_3_release)
1660
+++ b/src/libstdc++-v3/testsuite/tr1/3_function_objects/function/63840.cc (.../branches/gcc-4_8-branch)
1662
+// Copyright (C) 2014 Free Software Foundation, Inc.
1664
+// This file is part of the GNU ISO C++ Library. This library is free
1665
+// software; you can redistribute it and/or modify it under the
1666
+// terms of the GNU General Public License as published by the
1667
+// Free Software Foundation; either version 3, or (at your option)
1668
+// any later version.
1670
+// This library is distributed in the hope that it will be useful,
1671
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1672
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1673
+// GNU General Public License for more details.
1675
+// You should have received a copy of the GNU General Public License along
1676
+// with this library; see the file COPYING3. If not see
1677
+// <http://www.gnu.org/licenses/>.
1679
+#include <tr1/functional>
1680
+#include <stdexcept>
1681
+#include <testsuite_hooks.h>
1685
+ functor() : copies(0) { }
1687
+ functor(const functor& f)
1688
+ : copies(f.copies + 1)
1691
+ throw std::runtime_error("functor");
1694
+ void operator()() const { }
1703
+ std::tr1::function<void()> f = functor();
1705
+ std::tr1::function<void()> g = f;
1706
+ } catch (const std::runtime_error& e) {
1717
Index: libstdc++-v3/testsuite/20_util/tuple/61947.cc
1718
===================================================================
1719
--- a/src/libstdc++-v3/testsuite/20_util/tuple/61947.cc (.../tags/gcc_4_8_3_release)
1720
+++ b/src/libstdc++-v3/testsuite/20_util/tuple/61947.cc (.../branches/gcc-4_8-branch)
1722
+// { dg-options "-std=gnu++11" }
1723
+// { dg-do compile }
1725
+// Copyright (C) 2014 Free Software Foundation, Inc.
1727
+// This file is part of the GNU ISO C++ Library. This library is free
1728
+// software; you can redistribute it and/or modify it under the
1729
+// terms of the GNU General Public License as published by the
1730
+// Free Software Foundation; either version 3, or (at your option)
1731
+// any later version.
1733
+// This library is distributed in the hope that it will be useful,
1734
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1735
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1736
+// GNU General Public License for more details.
1738
+// You should have received a copy of the GNU General Public License along
1739
+// with this library; see the file COPYING3. If not see
1740
+// <http://www.gnu.org/licenses/>.
1744
+struct ConvertibleToAny {
1745
+ template <class T> operator T() const { return T(); }
1749
+ std::tuple<ConvertibleToAny&&> t(ConvertibleToAny{});
1751
Index: libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc
1752
===================================================================
1753
--- a/src/libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc (.../tags/gcc_4_8_3_release)
1754
+++ b/src/libstdc++-v3/testsuite/20_util/uses_allocator/cons_neg.cc (.../branches/gcc-4_8-branch)
1757
tuple<Type> t(allocator_arg, a, 1);
1759
-// { dg-error "no matching function" "" { target *-*-* } 118 }
1760
+// { dg-error "no matching function" "" { target *-*-* } 119 }
1761
Index: libstdc++-v3/testsuite/20_util/function/63840.cc
1762
===================================================================
1763
--- a/src/libstdc++-v3/testsuite/20_util/function/63840.cc (.../tags/gcc_4_8_3_release)
1764
+++ b/src/libstdc++-v3/testsuite/20_util/function/63840.cc (.../branches/gcc-4_8-branch)
1766
+// Copyright (C) 2014 Free Software Foundation, Inc.
1768
+// This file is part of the GNU ISO C++ Library. This library is free
1769
+// software; you can redistribute it and/or modify it under the
1770
+// terms of the GNU General Public License as published by the
1771
+// Free Software Foundation; either version 3, or (at your option)
1772
+// any later version.
1774
+// This library is distributed in the hope that it will be useful,
1775
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1776
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1777
+// GNU General Public License for more details.
1779
+// You should have received a copy of the GNU General Public License along
1780
+// with this library; see the file COPYING3. If not see
1781
+// <http://www.gnu.org/licenses/>.
1783
+// { dg-options "-std=gnu++11" }
1785
+#include <functional>
1786
+#include <stdexcept>
1787
+#include <testsuite_hooks.h>
1791
+ functor() = default;
1793
+ functor(const functor&)
1795
+ throw std::runtime_error("test");
1798
+ functor(functor&& f) = default;
1800
+ void operator()() const { }
1807
+ std::function<void()> f = functor{};
1810
+ } catch (const std::runtime_error& e) {
1821
Index: libstdc++-v3/config/os/mingw32-w64/os_defines.h
1822
===================================================================
1823
--- a/src/libstdc++-v3/config/os/mingw32-w64/os_defines.h (.../tags/gcc_4_8_3_release)
1824
+++ b/src/libstdc++-v3/config/os/mingw32-w64/os_defines.h (.../branches/gcc-4_8-branch)
1826
#define _GLIBCXX_LLP64 1
1829
+// See libstdc++/59807
1830
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
1833
Index: libstdc++-v3/config/os/mingw32/os_defines.h
1834
===================================================================
1835
--- a/src/libstdc++-v3/config/os/mingw32/os_defines.h (.../tags/gcc_4_8_3_release)
1836
+++ b/src/libstdc++-v3/config/os/mingw32/os_defines.h (.../branches/gcc-4_8-branch)
1838
#define _GLIBCXX_LLP64 1
1841
+// See libstdc++/59807
1842
+#define _GTHREAD_USE_MUTEX_INIT_FUNC 1
1845
Index: libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt
1846
===================================================================
1847
--- a/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt (.../tags/gcc_4_8_3_release)
1848
+++ b/src/libstdc++-v3/config/abi/post/hppa-linux-gnu/baseline_symbols.txt (.../branches/gcc-4_8-branch)
1850
FUNC:_ZNKSt15basic_streambufIwSt11char_traitsIwEE6getlocEv@@GLIBCXX_3.4
1851
FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
1852
FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
1853
+FUNC:_ZNKSt17bad_function_call4whatEv@@GLIBCXX_3.4.18
1854
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
1855
FUNC:_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE5rdbufEv@@GLIBCXX_3.4
1856
FUNC:_ZNKSt18basic_stringstreamIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
1858
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewm@@GLIBCXX_3.4
1859
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewx@@GLIBCXX_3.4
1860
FUNC:_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE6do_putES3_RSt8ios_basewy@@GLIBCXX_3.4
1861
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEj@@GLIBCXX_3.4.18
1862
+FUNC:_ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEjjj@@GLIBCXX_3.4.18
1863
FUNC:_ZNKSt8bad_cast4whatEv@@GLIBCXX_3.4.9
1864
FUNC:_ZNKSt8ios_base7failure4whatEv@@GLIBCXX_3.4
1865
FUNC:_ZNKSt8messagesIcE18_M_convert_to_charERKSs@@GLIBCXX_3.4
1866
@@ -1204,6 +1207,7 @@
1867
FUNC:_ZNSt11regex_errorD0Ev@@GLIBCXX_3.4.15
1868
FUNC:_ZNSt11regex_errorD1Ev@@GLIBCXX_3.4.15
1869
FUNC:_ZNSt11regex_errorD2Ev@@GLIBCXX_3.4.15
1870
+FUNC:_ZNSt11this_thread11__sleep_forENSt6chrono8durationIxSt5ratioILx1ELx1EEEENS1_IxS2_ILx1ELx1000000000EEEE@@GLIBCXX_3.4.18
1871
FUNC:_ZNSt12__basic_fileIcE2fdEv@@GLIBCXX_3.4
1872
FUNC:_ZNSt12__basic_fileIcE4fileEv@@GLIBCXX_3.4.1
1873
FUNC:_ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei@@GLIBCXX_3.4
1874
@@ -1471,6 +1475,11 @@
1875
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEt@@GLIBCXX_3.4
1876
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEx@@GLIBCXX_3.4
1877
FUNC:_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEy@@GLIBCXX_3.4
1878
+FUNC:_ZNSt13random_device14_M_init_pretr1ERKSs@@GLIBCXX_3.4.18
1879
+FUNC:_ZNSt13random_device16_M_getval_pretr1Ev@@GLIBCXX_3.4.18
1880
+FUNC:_ZNSt13random_device7_M_finiEv@@GLIBCXX_3.4.18
1881
+FUNC:_ZNSt13random_device7_M_initERKSs@@GLIBCXX_3.4.18
1882
+FUNC:_ZNSt13random_device9_M_getvalEv@@GLIBCXX_3.4.18
1883
FUNC:_ZNSt13runtime_errorC1ERKSs@@GLIBCXX_3.4
1884
FUNC:_ZNSt13runtime_errorC2ERKSs@@GLIBCXX_3.4
1885
FUNC:_ZNSt13runtime_errorD0Ev@@GLIBCXX_3.4
1886
@@ -1900,6 +1909,8 @@
1887
FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9
1888
FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14
1889
FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11
1890
+FUNC:_ZNSt6chrono3_V212steady_clock3nowEv@@GLIBCXX_3.4.19
1891
+FUNC:_ZNSt6chrono3_V212system_clock3nowEv@@GLIBCXX_3.4.19
1892
FUNC:_ZNSt6gslice8_IndexerC1EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
1893
FUNC:_ZNSt6gslice8_IndexerC2EjRKSt8valarrayIjES4_@@GLIBCXX_3.4
1894
FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4
1895
@@ -2436,6 +2447,7 @@
1896
FUNC:__cxa_guard_release@@CXXABI_1.3
1897
FUNC:__cxa_pure_virtual@@CXXABI_1.3
1898
FUNC:__cxa_rethrow@@CXXABI_1.3
1899
+FUNC:__cxa_thread_atexit@@CXXABI_1.3.7
1900
FUNC:__cxa_throw@@CXXABI_1.3
1901
FUNC:__cxa_tm_cleanup@@CXXABI_TM_1
1902
FUNC:__cxa_vec_cctor@@CXXABI_1.3
1903
@@ -2482,6 +2494,7 @@
1904
OBJECT:0:CXXABI_1.3.4
1905
OBJECT:0:CXXABI_1.3.5
1906
OBJECT:0:CXXABI_1.3.6
1907
+OBJECT:0:CXXABI_1.3.7
1908
OBJECT:0:CXXABI_TM_1
1909
OBJECT:0:GLIBCXX_3.4
1910
OBJECT:0:GLIBCXX_3.4.1
1911
@@ -2493,6 +2506,8 @@
1912
OBJECT:0:GLIBCXX_3.4.15
1913
OBJECT:0:GLIBCXX_3.4.16
1914
OBJECT:0:GLIBCXX_3.4.17
1915
+OBJECT:0:GLIBCXX_3.4.18
1916
+OBJECT:0:GLIBCXX_3.4.19
1917
OBJECT:0:GLIBCXX_3.4.2
1918
OBJECT:0:GLIBCXX_3.4.3
1919
OBJECT:0:GLIBCXX_3.4.4
1920
@@ -2992,6 +3007,8 @@
1921
OBJECT:1:_ZNSt21__numeric_limits_base9is_moduloE@@GLIBCXX_3.4
1922
OBJECT:1:_ZNSt21__numeric_limits_base9is_signedE@@GLIBCXX_3.4
1923
OBJECT:1:_ZNSt6chrono12system_clock12is_monotonicE@@GLIBCXX_3.4.11
1924
+OBJECT:1:_ZNSt6chrono3_V212steady_clock9is_steadyE@@GLIBCXX_3.4.19
1925
+OBJECT:1:_ZNSt6chrono3_V212system_clock9is_steadyE@@GLIBCXX_3.4.19
1926
OBJECT:1:_ZSt10adopt_lock@@GLIBCXX_3.4.11
1927
OBJECT:1:_ZSt10defer_lock@@GLIBCXX_3.4.11
1928
OBJECT:1:_ZSt11try_to_lock@@GLIBCXX_3.4.11
1930
===================================================================
1931
--- a/src/configure.ac (.../tags/gcc_4_8_3_release)
1932
+++ b/src/configure.ac (.../branches/gcc-4_8-branch)
1933
@@ -1154,6 +1154,9 @@
1935
host_makefile_frag="config/mh-mingw"
1938
+ host_makefile_frag="config/mh-alpha-linux"
1941
host_makefile_frag="config/mh-pa-hpux10"
1943
@@ -1632,6 +1635,9 @@
1944
ISL_CHECK_VERSION(0,11)
1945
if test "${gcc_cv_isl}" = no ; then
1946
ISL_CHECK_VERSION(0,12)
1947
+ if test "${gcc_cv_isl}" = no ; then
1948
+ ISL_CHECK_VERSION(0,14)
1952
dnl Only execute fail-action, if ISL has been requested.
1954
===================================================================
1955
--- a/src/ChangeLog (.../tags/gcc_4_8_3_release)
1956
+++ b/src/ChangeLog (.../branches/gcc-4_8-branch)
1958
+2014-12-08 Richard Biener <rguenther@suse.de>
1960
+ Backport from 4.9 branch
1961
+ 2014-12-04 Tobias Burnus <burnus@net-b.de>
1963
+ * configure.ac: Permit also ISL 0.14 with CLooG.
1964
+ * Makefile.def: Make more dependent on mpfr, mpc, isl, and cloog.
1965
+ * Makefile.in: Regenerate.
1966
+ * configure: Regenerate.
1968
+2014-07-26 Uros Bizjak <ubizjak@gmail.com>
1971
+ * configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
1972
+ * configure: Regenerate.
1974
2014-05-22 Release Manager
1976
* GCC 4.8.3 released.
1977
Index: contrib/ChangeLog
1978
===================================================================
1979
--- a/src/contrib/ChangeLog (.../tags/gcc_4_8_3_release)
1980
+++ b/src/contrib/ChangeLog (.../branches/gcc-4_8-branch)
1982
+2014-07-07 Richard Biener <rguenther@suse.de>
1984
+ * gennews: Use gcc-3.0/index.html.
1986
2014-05-22 Release Manager
1988
* GCC 4.8.3 released.
1989
Index: contrib/gennews
1990
===================================================================
1991
--- a/src/contrib/gennews (.../tags/gcc_4_8_3_release)
1992
+++ b/src/contrib/gennews (.../branches/gcc-4_8-branch)
1994
gcc-3.3/index.html gcc-3.3/changes.html
1995
gcc-3.2/index.html gcc-3.2/changes.html
1996
gcc-3.1/index.html gcc-3.1/changes.html
1997
- gcc-3.0/gcc-3.0.html gcc-3.0/features.html gcc-3.0/caveats.html
1998
+ gcc-3.0/index.html gcc-3.0/features.html gcc-3.0/caveats.html
1999
gcc-2.95/index.html gcc-2.95/features.html gcc-2.95/caveats.html
2000
egcs-1.1/index.html egcs-1.1/features.html egcs-1.1/caveats.html
2001
egcs-1.0/index.html egcs-1.0/features.html egcs-1.0/caveats.html"
2002
Index: config/mh-alpha-linux
2003
===================================================================
2004
--- a/src/config/mh-alpha-linux (.../tags/gcc_4_8_3_release)
2005
+++ b/src/config/mh-alpha-linux (.../branches/gcc-4_8-branch)
2007
+# Prevent GPREL16 relocation truncation
2008
+LDFLAGS += -Wl,--no-relax
2009
+BOOT_LDFLAGS += -Wl,--no-relax
2010
Index: config/ChangeLog
2011
===================================================================
2012
--- a/src/config/ChangeLog (.../tags/gcc_4_8_3_release)
2013
+++ b/src/config/ChangeLog (.../branches/gcc-4_8-branch)
2015
+2014-07-26 Uros Bizjak <ubizjak@gmail.com>
2018
+ * mh-alpha-linux: New file.
2020
2014-05-22 Release Manager
2022
* GCC 4.8.3 released.
2023
Index: libjava/classpath
2024
===================================================================
2025
--- a/src/libjava/classpath (.../tags/gcc_4_8_3_release)
2026
+++ b/src/libjava/classpath (.../branches/gcc-4_8-branch)
2028
Property changes on: libjava/classpath
2029
___________________________________________________________________
2030
Modified: svn:mergeinfo
2031
Merged /trunk/libjava/classpath:r211733,215049
2033
===================================================================
2034
--- a/src/configure (.../tags/gcc_4_8_3_release)
2035
+++ b/src/configure (.../branches/gcc-4_8-branch)
2036
@@ -3834,6 +3834,9 @@
2038
host_makefile_frag="config/mh-mingw"
2041
+ host_makefile_frag="config/mh-alpha-linux"
2044
host_makefile_frag="config/mh-pa-hpux10"
2046
@@ -5987,6 +5990,55 @@
2050
+ if test "${gcc_cv_isl}" = no ; then
2052
+ if test "${ENABLE_ISL_CHECK}" = yes ; then
2053
+ _isl_saved_CFLAGS=$CFLAGS
2054
+ _isl_saved_LDFLAGS=$LDFLAGS
2055
+ _isl_saved_LIBS=$LIBS
2057
+ CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
2058
+ LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
2059
+ LIBS="${_isl_saved_LIBS} -lisl"
2061
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.14 of ISL" >&5
2062
+$as_echo_n "checking for version 0.14 of ISL... " >&6; }
2063
+ if test "$cross_compiling" = yes; then :
2066
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067
+/* end confdefs.h. */
2068
+#include <isl/version.h>
2069
+ #include <string.h>
2073
+if (strncmp (isl_version (), "isl-0.14", strlen ("isl-0.14")) != 0)
2080
+if ac_fn_c_try_run "$LINENO"; then :
2085
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2086
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
2089
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5
2090
+$as_echo "$gcc_cv_isl" >&6; }
2092
+ CFLAGS=$_isl_saved_CFLAGS
2093
+ LDFLAGS=$_isl_saved_LDFLAGS
2094
+ LIBS=$_isl_saved_LIBS
2102
Index: libgcc/ChangeLog
2103
===================================================================
2104
--- a/src/libgcc/ChangeLog (.../tags/gcc_4_8_3_release)
2105
+++ b/src/libgcc/ChangeLog (.../branches/gcc-4_8-branch)
2107
+2014-12-09 Oleg Endo <olegendo@gcc.gnu.org>
2109
+ Backport from mainline
2110
+ 2014-11-30 Oleg Endo <olegendo@gcc.gnu.org>
2113
+ * config/sh/lib1funcs.S: Check value of __SHMEDIA__ instead of checking
2114
+ whether it's defined.
2116
+2014-10-26 John David Anglin <danglin@gcc.gnu.org>
2118
+ * config/pa/linux-unwind.h (pa32_read_access_ok): New function.
2119
+ (pa32_fallback_frame_state): Use pa32_read_access_ok to check if
2120
+ memory read accesses are ok.
2122
+2014-09-18 Joseph Myers <joseph@codesourcery.com>
2124
+ * config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
2125
+ bits not set bits as indicating trapping exceptions.
2127
2014-05-22 Release Manager
2129
* GCC 4.8.3 released.
2130
Index: libgcc/config/i386/sfp-machine.h
2131
===================================================================
2132
--- a/src/libgcc/config/i386/sfp-machine.h (.../tags/gcc_4_8_3_release)
2133
+++ b/src/libgcc/config/i386/sfp-machine.h (.../branches/gcc-4_8-branch)
2135
__sfp_handle_exceptions (_fex); \
2138
-#define FP_TRAPPING_EXCEPTIONS ((_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
2139
+#define FP_TRAPPING_EXCEPTIONS ((~_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
2141
#define FP_ROUNDMODE (_fcw & FP_RND_MASK)
2143
Index: libgcc/config/sh/lib1funcs.S
2144
===================================================================
2145
--- a/src/libgcc/config/sh/lib1funcs.S (.../tags/gcc_4_8_3_release)
2146
+++ b/src/libgcc/config/sh/lib1funcs.S (.../branches/gcc-4_8-branch)
2147
@@ -1248,7 +1248,7 @@
2149
ENDFUNC(GLOBAL(sdivsi3_2))
2151
-#elif defined __SHMEDIA__
2153
/* m5compact-nofpu */
2154
// clobbered: r18,r19,r20,r21,r25,tr0,tr1,tr2
2156
@@ -1598,7 +1598,7 @@
2160
-#elif defined (__SHMEDIA__)
2162
/* m5compact-nofpu - more emphasis on code size than on speed, but don't
2163
ignore speed altogether - div1 needs 9 cycles, subc 7 and rotcl 4.
2164
So use a short shmedia loop. */
2165
@@ -1622,7 +1622,7 @@
2169
-#else /* ! defined (__SHMEDIA__) */
2170
+#else /* ! __SHMEDIA__ */
2174
@@ -1688,7 +1688,7 @@
2175
#endif /* L_udivsi3 */
2181
.section .text..SHmedia32,"ax"
2183
@@ -1816,7 +1816,7 @@
2184
#endif /* L_udivdi3 */
2190
.section .text..SHmedia32,"ax"
2192
@@ -1840,7 +1840,7 @@
2193
#endif /* L_divdi3 */
2199
.section .text..SHmedia32,"ax"
2201
@@ -1969,7 +1969,7 @@
2202
#endif /* L_umoddi3 */
2208
.section .text..SHmedia32,"ax"
2210
@@ -3057,7 +3057,7 @@
2214
-#if defined(__pic__) && defined(__SHMEDIA__)
2215
+#if defined(__pic__) && __SHMEDIA__
2216
.global GLOBAL(sdivsi3)
2217
FUNC(GLOBAL(sdivsi3))
2219
@@ -3130,7 +3130,7 @@
2220
#else /* ! __pic__ || ! __SHMEDIA__ */
2222
#endif /* __pic__ */
2223
-#if defined(TEXT_DATA_BUG) && defined(__pic__) && defined(__SHMEDIA__)
2224
+#if defined(TEXT_DATA_BUG) && defined(__pic__) && __SHMEDIA__
2226
.type Local_div_table,@object
2227
.size Local_div_table,128
2228
Index: libgcc/config/pa/linux-unwind.h
2229
===================================================================
2230
--- a/src/libgcc/config/pa/linux-unwind.h (.../tags/gcc_4_8_3_release)
2231
+++ b/src/libgcc/config/pa/linux-unwind.h (.../branches/gcc-4_8-branch)
2234
#include <sys/ucontext.h>
2236
+/* Return TRUE if read access to *P is allowed. */
2239
+pa32_read_access_ok (void *p)
2243
+ __asm__ ("proberi (%1),3,%0" : "=r" (ret) : "r" (p) :);
2247
/* Unfortunately, because of various bugs and changes to the kernel,
2248
we have several cases to deal with.
2251
tell us how to locate the sigcontext structure.
2253
Note that with a 2.4 64-bit kernel, the signal context is not properly
2254
- passed back to userspace so the unwind will not work correctly. */
2255
+ passed back to userspace so the unwind will not work correctly.
2257
+ There is also a bug in various glibc versions. The (CONTEXT)->ra
2258
+ for the outermost frame is not marked as undefined, so we need to
2259
+ check whether read access is allowed for all the accesses used in
2260
+ searching for the signal trampoline. */
2262
#define MD_FALLBACK_FRAME_STATE_FOR pa32_fallback_frame_state
2264
static _Unwind_Reason_Code
2266
e4008200 be,l 0x100(%sr2, %r0), %sr0, %r31
2269
- if (pc[0] == 0x34190000 || pc[0] == 0x34190002)
2270
+ if (pa32_read_access_ok (pc)
2271
+ && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
2273
- else if (pc[4] == 0x34190000 || pc[4] == 0x34190002)
2274
+ else if (pa32_read_access_ok (&pc[4])
2275
+ && (pc[4] == 0x34190000 || pc[4] == 0x34190002))
2280
- else if (pc[5] == 0x34190000 || pc[5] == 0x34190002)
2281
+ else if (pa32_read_access_ok (&pc[5])
2282
+ && (pc[5] == 0x34190000 || pc[5] == 0x34190002))
2286
@@ -96,13 +115,16 @@
2287
word boundary and we can then determine the frame offset. */
2288
sp = (unsigned long)context->ra;
2289
pc = (unsigned int *)sp;
2290
- if ((pc[0] == 0x34190000 || pc[0] == 0x34190002) && (sp & 4))
2292
+ && pa32_read_access_ok (pc)
2293
+ && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
2296
return _URC_END_OF_STACK;
2299
- if (pc[1] != 0x3414015a
2300
+ if (!pa32_read_access_ok (&pc[3])
2301
+ || pc[1] != 0x3414015a
2302
|| pc[2] != 0xe4008200
2303
|| pc[3] != 0x08000240)
2304
return _URC_END_OF_STACK;
2305
Index: gcc/tree-ssa-tail-merge.c
2306
===================================================================
2307
--- a/src/gcc/tree-ssa-tail-merge.c (.../tags/gcc_4_8_3_release)
2308
+++ b/src/gcc/tree-ssa-tail-merge.c (.../branches/gcc-4_8-branch)
2310
def_operand_p def_p;
2312
if (gimple_has_side_effects (stmt)
2313
- || gimple_vdef (stmt) != NULL_TREE)
2314
+ || gimple_vdef (stmt) != NULL_TREE
2315
+ || gimple_vuse (stmt) != NULL_TREE)
2318
def_p = SINGLE_SSA_DEF_OPERAND (stmt, SSA_OP_DEF);
2319
@@ -1060,6 +1061,24 @@
2323
+/* Return true if gimple operands T1 and T2 have the same value. */
2326
+gimple_operand_equal_value_p (tree t1, tree t2)
2331
+ if (t1 == NULL_TREE
2332
+ || t2 == NULL_TREE)
2335
+ if (operand_equal_p (t1, t2, 0))
2338
+ return gvn_uses_equal (t1, t2);
2341
/* Return true if gimple statements S1 and S2 are equal. Gimple_bb (s1) and
2342
gimple_bb (s2) are members of SAME_SUCC. */
2344
@@ -1122,11 +1141,13 @@
2345
lhs2 = gimple_get_lhs (s2);
2346
if (TREE_CODE (lhs1) != SSA_NAME
2347
&& TREE_CODE (lhs2) != SSA_NAME)
2348
- return (vn_valueize (gimple_vdef (s1))
2349
- == vn_valueize (gimple_vdef (s2)));
2350
+ return (operand_equal_p (lhs1, lhs2, 0)
2351
+ && gimple_operand_equal_value_p (gimple_assign_rhs1 (s1),
2352
+ gimple_assign_rhs1 (s2)));
2353
else if (TREE_CODE (lhs1) == SSA_NAME
2354
&& TREE_CODE (lhs2) == SSA_NAME)
2355
- return vn_valueize (lhs1) == vn_valueize (lhs2);
2356
+ return operand_equal_p (gimple_assign_rhs1 (s1),
2357
+ gimple_assign_rhs1 (s2), 0);
2361
Index: gcc/DATESTAMP
2362
===================================================================
2363
--- a/src/gcc/DATESTAMP (.../tags/gcc_4_8_3_release)
2364
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_8-branch)
2368
Index: gcc/tree-ssa-strlen.c
2369
===================================================================
2370
--- a/src/gcc/tree-ssa-strlen.c (.../tags/gcc_4_8_3_release)
2371
+++ b/src/gcc/tree-ssa-strlen.c (.../branches/gcc-4_8-branch)
2372
@@ -1777,7 +1777,7 @@
2376
- else if (is_gimple_assign (stmt))
2377
+ else if (is_gimple_assign (stmt) && !gimple_clobber_p (stmt))
2379
tree lhs = gimple_assign_lhs (stmt);
2382
===================================================================
2383
--- a/src/gcc/tree.c (.../tags/gcc_4_8_3_release)
2384
+++ b/src/gcc/tree.c (.../branches/gcc-4_8-branch)
2385
@@ -1130,7 +1130,7 @@
2386
const_tree const t = (const_tree) x;
2388
return (TREE_INT_CST_HIGH (t) ^ TREE_INT_CST_LOW (t)
2389
- ^ htab_hash_pointer (TREE_TYPE (t)));
2390
+ ^ TYPE_UID (TREE_TYPE (t)));
2393
/* Return nonzero if the value represented by *X (an INTEGER_CST tree node)
2395
===================================================================
2396
--- a/src/gcc/ipa-cp.c (.../tags/gcc_4_8_3_release)
2397
+++ b/src/gcc/ipa-cp.c (.../branches/gcc-4_8-branch)
2399
else if (!opt_for_fn (node->symbol.decl, optimize)
2400
|| !opt_for_fn (node->symbol.decl, flag_ipa_cp))
2401
reason = "non-optimized function";
2402
+ else if (node->tm_clone)
2403
+ reason = "transactional memory clone";
2405
if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
2406
fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
2407
@@ -2902,6 +2904,11 @@
2408
intersect_with_agg_replacements (cs->caller, src_idx,
2419
@@ -2917,6 +2924,11 @@
2421
intersect_with_plats (src_plats, &inter, 0);
2430
else if (jfunc->type == IPA_JF_ANCESTOR
2431
@@ -3000,7 +3012,8 @@
2432
vec<cgraph_edge_p> callers)
2434
struct ipa_node_params *dest_info = IPA_NODE_REF (node);
2435
- struct ipa_agg_replacement_value *res = NULL;
2436
+ struct ipa_agg_replacement_value *res;
2437
+ struct ipa_agg_replacement_value **tail = &res;
2438
struct cgraph_edge *cs;
2439
int i, j, count = ipa_get_param_count (dest_info);
2441
@@ -3044,8 +3057,8 @@
2442
v->offset = item->offset;
2443
v->value = item->value;
2444
v->by_ref = plats->aggs_by_ref;
2452
@@ -3052,6 +3065,7 @@
2453
if (inter.exists ())
2460
@@ -3060,7 +3074,8 @@
2461
static struct ipa_agg_replacement_value *
2462
known_aggs_to_agg_replacement_list (vec<ipa_agg_jump_function_t> known_aggs)
2464
- struct ipa_agg_replacement_value *res = NULL;
2465
+ struct ipa_agg_replacement_value *res;
2466
+ struct ipa_agg_replacement_value **tail = &res;
2467
struct ipa_agg_jump_function *aggjf;
2468
struct ipa_agg_jf_item *item;
2470
@@ -3074,9 +3089,10 @@
2471
v->offset = item->offset;
2472
v->value = item->value;
2473
v->by_ref = aggjf->by_ref;
2483
Index: gcc/configure
2484
===================================================================
2485
--- a/src/gcc/configure (.../tags/gcc_4_8_3_release)
2486
+++ b/src/gcc/configure (.../branches/gcc-4_8-branch)
2488
enable_gnu_indirect_function
2489
enable_initfini_array
2491
+enable_fix_cortex_a53_835769
2492
enable_gnu_unique_object
2493
enable_linker_build_id
2494
with_long_double_128
2495
@@ -1619,6 +1620,14 @@
2497
--enable-initfini-array use .init_array/.fini_array sections
2498
--enable-comdat enable COMDAT group support
2500
+ --enable-fix-cortex-a53-835769
2501
+ enable workaround for AArch64 Cortex-A53 erratum
2503
+ --disable-fix-cortex-a53-835769
2504
+ disable workaround for AArch64 Cortex-A53 erratum
2507
--enable-gnu-unique-object
2508
enable the use of the @gnu_unique_object ELF
2509
extension on glibc systems
2510
@@ -17838,7 +17847,7 @@
2511
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2512
lt_status=$lt_dlunknown
2513
cat > conftest.$ac_ext <<_LT_EOF
2514
-#line 17841 "configure"
2515
+#line 17850 "configure"
2516
#include "confdefs.h"
2519
@@ -17944,7 +17953,7 @@
2520
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2521
lt_status=$lt_dlunknown
2522
cat > conftest.$ac_ext <<_LT_EOF
2523
-#line 17947 "configure"
2524
+#line 17956 "configure"
2525
#include "confdefs.h"
2528
@@ -23796,6 +23805,28 @@
2529
$as_echo "$gcc_cv_lto_plugin" >&6; }
2534
+ # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
2535
+ # Check whether --enable-fix-cortex-a53-835769 was given.
2536
+if test "${enable_fix_cortex_a53_835769+set}" = set; then :
2537
+ enableval=$enable_fix_cortex_a53_835769;
2538
+ case $enableval in
2540
+ tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
2545
+ as_fn_error "'$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
2546
+ Valid choices are 'yes' and 'no'." "$LINENO" 5
2554
# All TARGET_ABI_OSF targets.
2555
alpha*-*-linux* | alpha*-*-*bsd*)
2556
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
2557
@@ -27281,8 +27312,48 @@
2559
$as_echo "#define HAVE_cloog 1" >>confdefs.h
2562
+ # Check whether isl_schedule_constraints_compute_schedule is available;
2563
+ # it's new in ISL-0.13.
2564
+ saved_CFLAGS="$CFLAGS"
2565
+ CFLAGS="$CFLAGS $ISLINC"
2566
+ saved_LIBS="$LIBS"
2567
+ LIBS="$LIBS $CLOOGLIBS $ISLLIBS $GMPLIBS"
2569
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for isl_schedule_constraints_compute_schedule" >&5
2570
+$as_echo_n "checking Checking for isl_schedule_constraints_compute_schedule... " >&6; }
2571
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2572
+/* end confdefs.h. */
2573
+#include <isl/schedule.h>
2577
+isl_schedule_constraints_compute_schedule (NULL);
2582
+if ac_fn_c_try_link "$LINENO"; then :
2583
+ ac_has_isl_schedule_constraints_compute_schedule=yes
2585
+ ac_has_isl_schedule_constraints_compute_schedule=no
2587
+rm -f core conftest.err conftest.$ac_objext \
2588
+ conftest$ac_exeext conftest.$ac_ext
2589
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_schedule_constraints_compute_schedule" >&5
2590
+$as_echo "$ac_has_isl_schedule_constraints_compute_schedule" >&6; }
2592
+ LIBS="$saved_LIBS"
2593
+ CFLAGS="$saved_CFLAGS"
2595
+ if test x"$ac_has_isl_schedule_constraints_compute_schedule" = x"yes"; then
2597
+$as_echo "#define HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE 1" >>confdefs.h
2603
# Check for plugin support
2604
# Check whether --enable-plugin was given.
2605
if test "${enable_plugin+set}" = set; then :
2606
Index: gcc/fold-const.c
2607
===================================================================
2608
--- a/src/gcc/fold-const.c (.../tags/gcc_4_8_3_release)
2609
+++ b/src/gcc/fold-const.c (.../branches/gcc-4_8-branch)
2610
@@ -8929,7 +8929,8 @@
2611
/* If the constant operation overflowed this can be
2612
simplified as a comparison against INT_MAX/INT_MIN. */
2613
if (TREE_CODE (lhs) == INTEGER_CST
2614
- && TREE_OVERFLOW (lhs))
2615
+ && TREE_OVERFLOW (lhs)
2616
+ && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg0)))
2618
int const1_sgn = tree_int_cst_sgn (const1);
2619
enum tree_code code2 = code;
2620
@@ -9213,7 +9214,7 @@
2621
/* Transform comparisons of the form X +- C1 CMP Y +- C2 to
2622
X CMP Y +- C2 +- C1 for signed X, Y. This is valid if
2623
the resulting offset is smaller in absolute value than the
2625
+ original one and has the same sign. */
2626
if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (arg0))
2627
&& (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
2628
&& (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
2629
@@ -9232,19 +9233,20 @@
2632
/* Put the constant on the side where it doesn't overflow and is
2633
- of lower absolute value than before. */
2634
+ of lower absolute value and of same sign than before. */
2635
cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
2636
? MINUS_EXPR : PLUS_EXPR,
2638
if (!TREE_OVERFLOW (cst)
2639
- && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2))
2640
+ && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2)
2641
+ && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const2))
2643
fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
2644
return fold_build2_loc (loc, code, type,
2646
- fold_build2_loc (loc,
2647
- TREE_CODE (arg1), TREE_TYPE (arg1),
2650
+ fold_build2_loc (loc, TREE_CODE (arg1),
2655
cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
2656
@@ -9251,13 +9253,15 @@
2657
? MINUS_EXPR : PLUS_EXPR,
2659
if (!TREE_OVERFLOW (cst)
2660
- && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1))
2661
+ && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1)
2662
+ && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const1))
2664
fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
2665
return fold_build2_loc (loc, code, type,
2666
- fold_build2_loc (loc, TREE_CODE (arg0), TREE_TYPE (arg0),
2669
+ fold_build2_loc (loc, TREE_CODE (arg0),
2676
@@ -11218,7 +11222,6 @@
2678
double_int c1, c2, c3, msk;
2679
int width = TYPE_PRECISION (type), w;
2680
- bool try_simplify = true;
2682
c1 = tree_to_double_int (TREE_OPERAND (arg0, 1));
2683
c2 = tree_to_double_int (arg1);
2684
@@ -11255,20 +11258,7 @@
2688
- /* If X is a tree of the form (Y * K1) & K2, this might conflict
2689
- with that optimization from the BIT_AND_EXPR optimizations.
2690
- This could end up in an infinite recursion. */
2691
- if (TREE_CODE (TREE_OPERAND (arg0, 0)) == MULT_EXPR
2692
- && TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg0, 0), 1))
2695
- tree t = TREE_OPERAND (TREE_OPERAND (arg0, 0), 1);
2696
- double_int masked = mask_with_tz (type, c3, tree_to_double_int (t));
2698
- try_simplify = (masked != c1);
2701
- if (try_simplify && c3 != c1)
2703
return fold_build2_loc (loc, BIT_IOR_EXPR, type,
2704
fold_build2_loc (loc, BIT_AND_EXPR, type,
2705
TREE_OPERAND (arg0, 0),
2706
@@ -11658,16 +11648,25 @@
2707
&& TREE_CODE (arg0) == MULT_EXPR
2708
&& TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
2710
+ double_int darg1 = tree_to_double_int (arg1);
2712
- = mask_with_tz (type, tree_to_double_int (arg1),
2713
+ = mask_with_tz (type, darg1,
2714
tree_to_double_int (TREE_OPERAND (arg0, 1)));
2716
if (masked.is_zero ())
2717
return omit_two_operands_loc (loc, type, build_zero_cst (type),
2719
- else if (masked != tree_to_double_int (arg1))
2720
- return fold_build2_loc (loc, code, type, op0,
2721
- double_int_to_tree (type, masked));
2722
+ else if (masked != darg1)
2724
+ /* Avoid the transform if arg1 is a mask of some
2725
+ mode which allows further optimizations. */
2726
+ int pop = darg1.popcount ();
2727
+ if (!(pop >= BITS_PER_UNIT
2728
+ && exact_log2 (pop) != -1
2729
+ && double_int::mask (pop) == darg1))
2730
+ return fold_build2_loc (loc, code, type, op0,
2731
+ double_int_to_tree (type, masked));
2735
/* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
2736
@@ -13083,6 +13082,8 @@
2737
tree arg01 = TREE_OPERAND (arg0, 1);
2738
tree itype = TREE_TYPE (arg00);
2739
if (TREE_INT_CST_HIGH (arg01) == 0
2740
+ && !(TREE_CODE (itype) == COMPLEX_TYPE
2741
+ || TREE_CODE (itype) == VECTOR_TYPE)
2742
&& TREE_INT_CST_LOW (arg01)
2743
== (unsigned HOST_WIDE_INT) (TYPE_PRECISION (itype) - 1))
2745
Index: gcc/omp-low.c
2746
===================================================================
2747
--- a/src/gcc/omp-low.c (.../tags/gcc_4_8_3_release)
2748
+++ b/src/gcc/omp-low.c (.../branches/gcc-4_8-branch)
2750
static int taskreg_nesting_level;
2751
struct omp_region *root_omp_region;
2752
static bitmap task_shared_vars;
2753
+static vec<omp_context *> taskreg_contexts;
2755
static void scan_omp (gimple_seq *, omp_context *);
2756
static tree scan_omp_1_op (tree *, int *, void *);
2757
@@ -1586,7 +1587,6 @@
2758
TREE_STATIC (decl) = 1;
2759
TREE_USED (decl) = 1;
2760
DECL_ARTIFICIAL (decl) = 1;
2761
- DECL_NAMELESS (decl) = 1;
2762
DECL_IGNORED_P (decl) = 0;
2763
TREE_PUBLIC (decl) = 0;
2764
DECL_UNINLINABLE (decl) = 1;
2765
@@ -1656,6 +1656,7 @@
2768
ctx = new_omp_context (stmt, outer_ctx);
2769
+ taskreg_contexts.safe_push (ctx);
2770
if (taskreg_nesting_level > 1)
2771
ctx->is_nested = true;
2772
ctx->field_map = splay_tree_new (splay_tree_compare_pointers, 0, 0);
2773
@@ -1675,11 +1676,6 @@
2775
if (TYPE_FIELDS (ctx->record_type) == NULL)
2776
ctx->record_type = ctx->receiver_decl = NULL;
2779
- layout_type (ctx->record_type);
2780
- fixup_child_record_type (ctx);
2784
/* Scan an OpenMP task directive. */
2785
@@ -1690,7 +1686,6 @@
2788
gimple stmt = gsi_stmt (*gsi);
2789
- location_t loc = gimple_location (stmt);
2791
/* Ignore task directives with empty bodies. */
2793
@@ -1701,6 +1696,7 @@
2796
ctx = new_omp_context (stmt, outer_ctx);
2797
+ taskreg_contexts.safe_push (ctx);
2798
if (taskreg_nesting_level > 1)
2799
ctx->is_nested = true;
2800
ctx->field_map = splay_tree_new (splay_tree_compare_pointers, 0, 0);
2801
@@ -1738,8 +1734,71 @@
2802
t = build_int_cst (long_integer_type_node, 1);
2803
gimple_omp_task_set_arg_align (stmt, t);
2808
+/* If any decls have been made addressable during scan_omp,
2809
+ adjust their fields if needed, and layout record types
2810
+ of parallel/task constructs. */
2813
+finish_taskreg_scan (omp_context *ctx)
2815
+ if (ctx->record_type == NULL_TREE)
2818
+ /* If any task_shared_vars were needed, verify all
2819
+ OMP_CLAUSE_SHARED clauses on GIMPLE_OMP_{PARALLEL,TASK}
2820
+ statements if use_pointer_for_field hasn't changed
2821
+ because of that. If it did, update field types now. */
2822
+ if (task_shared_vars)
2826
+ for (c = gimple_omp_taskreg_clauses (ctx->stmt);
2827
+ c; c = OMP_CLAUSE_CHAIN (c))
2828
+ if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_SHARED)
2830
+ tree decl = OMP_CLAUSE_DECL (c);
2832
+ /* Global variables don't need to be copied,
2833
+ the receiver side will use them directly. */
2834
+ if (is_global_var (maybe_lookup_decl_in_outer_ctx (decl, ctx)))
2836
+ if (!bitmap_bit_p (task_shared_vars, DECL_UID (decl))
2837
+ || !use_pointer_for_field (decl, ctx))
2839
+ tree field = lookup_field (decl, ctx);
2840
+ if (TREE_CODE (TREE_TYPE (field)) == POINTER_TYPE
2841
+ && TREE_TYPE (TREE_TYPE (field)) == TREE_TYPE (decl))
2843
+ TREE_TYPE (field) = build_pointer_type (TREE_TYPE (decl));
2844
+ TREE_THIS_VOLATILE (field) = 0;
2845
+ DECL_USER_ALIGN (field) = 0;
2846
+ DECL_ALIGN (field) = TYPE_ALIGN (TREE_TYPE (field));
2847
+ if (TYPE_ALIGN (ctx->record_type) < DECL_ALIGN (field))
2848
+ TYPE_ALIGN (ctx->record_type) = DECL_ALIGN (field);
2849
+ if (ctx->srecord_type)
2851
+ tree sfield = lookup_sfield (decl, ctx);
2852
+ TREE_TYPE (sfield) = TREE_TYPE (field);
2853
+ TREE_THIS_VOLATILE (sfield) = 0;
2854
+ DECL_USER_ALIGN (sfield) = 0;
2855
+ DECL_ALIGN (sfield) = DECL_ALIGN (field);
2856
+ if (TYPE_ALIGN (ctx->srecord_type) < DECL_ALIGN (sfield))
2857
+ TYPE_ALIGN (ctx->srecord_type) = DECL_ALIGN (sfield);
2862
+ if (gimple_code (ctx->stmt) == GIMPLE_OMP_PARALLEL)
2864
+ layout_type (ctx->record_type);
2865
+ fixup_child_record_type (ctx);
2869
+ location_t loc = gimple_location (ctx->stmt);
2870
tree *p, vla_fields = NULL_TREE, *q = &vla_fields;
2871
/* Move VLA fields to the end. */
2872
p = &TYPE_FIELDS (ctx->record_type);
2873
@@ -1759,12 +1818,12 @@
2874
fixup_child_record_type (ctx);
2875
if (ctx->srecord_type)
2876
layout_type (ctx->srecord_type);
2877
- t = fold_convert_loc (loc, long_integer_type_node,
2878
- TYPE_SIZE_UNIT (ctx->record_type));
2879
- gimple_omp_task_set_arg_size (stmt, t);
2880
+ tree t = fold_convert_loc (loc, long_integer_type_node,
2881
+ TYPE_SIZE_UNIT (ctx->record_type));
2882
+ gimple_omp_task_set_arg_size (ctx->stmt, t);
2883
t = build_int_cst (long_integer_type_node,
2884
TYPE_ALIGN_UNIT (ctx->record_type));
2885
- gimple_omp_task_set_arg_align (stmt, t);
2886
+ gimple_omp_task_set_arg_align (ctx->stmt, t);
2890
@@ -7113,6 +7172,8 @@
2891
execute_lower_omp (void)
2897
/* This pass always runs, to provide PROP_gimple_lomp.
2898
But there is nothing to do unless -fopenmp is given. */
2899
@@ -7125,6 +7186,9 @@
2900
body = gimple_body (current_function_decl);
2901
scan_omp (&body, NULL);
2902
gcc_assert (taskreg_nesting_level == 0);
2903
+ FOR_EACH_VEC_ELT (taskreg_contexts, i, ctx)
2904
+ finish_taskreg_scan (ctx);
2905
+ taskreg_contexts.release ();
2907
if (all_contexts->root)
2910
===================================================================
2911
--- a/src/gcc/toplev.c (.../tags/gcc_4_8_3_release)
2912
+++ b/src/gcc/toplev.c (.../branches/gcc-4_8-branch)
2913
@@ -1036,16 +1036,19 @@
2915
if (warn_stack_usage >= 0)
2917
+ const location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
2919
if (stack_usage_kind == DYNAMIC)
2920
- warning (OPT_Wstack_usage_, "stack usage might be unbounded");
2921
+ warning_at (loc, OPT_Wstack_usage_, "stack usage might be unbounded");
2922
else if (stack_usage > warn_stack_usage)
2924
if (stack_usage_kind == DYNAMIC_BOUNDED)
2925
- warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
2928
+ OPT_Wstack_usage_, "stack usage might be %wd bytes",
2931
- warning (OPT_Wstack_usage_, "stack usage is %wd bytes",
2933
+ warning_at (loc, OPT_Wstack_usage_, "stack usage is %wd bytes",
2938
Index: gcc/tree-ssa-sccvn.c
2939
===================================================================
2940
--- a/src/gcc/tree-ssa-sccvn.c (.../tags/gcc_4_8_3_release)
2941
+++ b/src/gcc/tree-ssa-sccvn.c (.../branches/gcc-4_8-branch)
2942
@@ -3015,33 +3015,12 @@
2943
/* If all value numbered to the same value, the phi node has that
2947
- if (is_gimple_min_invariant (sameval))
2949
- VN_INFO (PHI_RESULT (phi))->has_constants = true;
2950
- VN_INFO (PHI_RESULT (phi))->expr = sameval;
2954
- VN_INFO (PHI_RESULT (phi))->has_constants = false;
2955
- VN_INFO (PHI_RESULT (phi))->expr = sameval;
2957
+ return set_ssa_val_to (PHI_RESULT (phi), sameval);
2959
- if (TREE_CODE (sameval) == SSA_NAME)
2960
- return visit_copy (PHI_RESULT (phi), sameval);
2962
- return set_ssa_val_to (PHI_RESULT (phi), sameval);
2965
/* Otherwise, see if it is equivalent to a phi node in this block. */
2966
result = vn_phi_lookup (phi);
2969
- if (TREE_CODE (result) == SSA_NAME)
2970
- changed = visit_copy (PHI_RESULT (phi), result);
2972
- changed = set_ssa_val_to (PHI_RESULT (phi), result);
2974
+ changed = set_ssa_val_to (PHI_RESULT (phi), result);
2977
vn_phi_insert (phi, PHI_RESULT (phi));
2978
@@ -3142,24 +3121,18 @@
2979
catch those with constants. The goal here is to simultaneously
2980
combine constants between expressions, but avoid infinite
2981
expansion of expressions during simplification. */
2982
- if (TREE_CODE (op0) == SSA_NAME)
2984
- if (VN_INFO (op0)->has_constants
2985
+ op0 = vn_valueize (op0);
2986
+ if (TREE_CODE (op0) == SSA_NAME
2987
+ && (VN_INFO (op0)->has_constants
2988
|| TREE_CODE_CLASS (code) == tcc_comparison
2989
- || code == COMPLEX_EXPR)
2990
- op0 = valueize_expr (vn_get_expr_for (op0));
2992
- op0 = vn_valueize (op0);
2994
+ || code == COMPLEX_EXPR))
2995
+ op0 = valueize_expr (vn_get_expr_for (op0));
2997
- if (TREE_CODE (op1) == SSA_NAME)
2999
- if (VN_INFO (op1)->has_constants
3000
- || code == COMPLEX_EXPR)
3001
- op1 = valueize_expr (vn_get_expr_for (op1));
3003
- op1 = vn_valueize (op1);
3005
+ op1 = vn_valueize (op1);
3006
+ if (TREE_CODE (op1) == SSA_NAME
3007
+ && (VN_INFO (op1)->has_constants
3008
+ || code == COMPLEX_EXPR))
3009
+ op1 = valueize_expr (vn_get_expr_for (op1));
3011
/* Pointer plus constant can be represented as invariant address.
3012
Do so to allow further propatation, see also tree forwprop. */
3013
@@ -3217,27 +3190,31 @@
3017
- if (VN_INFO (op0)->has_constants)
3018
- op0 = valueize_expr (vn_get_expr_for (op0));
3019
- else if (CONVERT_EXPR_CODE_P (code)
3020
- || code == REALPART_EXPR
3021
- || code == IMAGPART_EXPR
3022
- || code == VIEW_CONVERT_EXPR
3023
- || code == BIT_FIELD_REF)
3024
+ op0 = vn_valueize (op0);
3025
+ if (TREE_CODE (op0) == SSA_NAME)
3027
- /* We want to do tree-combining on conversion-like expressions.
3028
- Make sure we feed only SSA_NAMEs or constants to fold though. */
3029
- tree tem = valueize_expr (vn_get_expr_for (op0));
3030
- if (UNARY_CLASS_P (tem)
3031
- || BINARY_CLASS_P (tem)
3032
- || TREE_CODE (tem) == VIEW_CONVERT_EXPR
3033
- || TREE_CODE (tem) == SSA_NAME
3034
- || TREE_CODE (tem) == CONSTRUCTOR
3035
- || is_gimple_min_invariant (tem))
3037
+ if (VN_INFO (op0)->has_constants)
3038
+ op0 = valueize_expr (vn_get_expr_for (op0));
3039
+ else if (CONVERT_EXPR_CODE_P (code)
3040
+ || code == REALPART_EXPR
3041
+ || code == IMAGPART_EXPR
3042
+ || code == VIEW_CONVERT_EXPR
3043
+ || code == BIT_FIELD_REF)
3045
+ /* We want to do tree-combining on conversion-like expressions.
3046
+ Make sure we feed only SSA_NAMEs or constants to fold though. */
3047
+ tree tem = valueize_expr (vn_get_expr_for (op0));
3048
+ if (UNARY_CLASS_P (tem)
3049
+ || BINARY_CLASS_P (tem)
3050
+ || TREE_CODE (tem) == VIEW_CONVERT_EXPR
3051
+ || TREE_CODE (tem) == SSA_NAME
3052
+ || TREE_CODE (tem) == CONSTRUCTOR
3053
+ || is_gimple_min_invariant (tem))
3058
- /* Avoid folding if nothing changed, but remember the expression. */
3059
+ /* Avoid folding if nothing changed. */
3060
if (op0 == orig_op0)
3063
Index: gcc/cgraphunit.c
3064
===================================================================
3065
--- a/src/gcc/cgraphunit.c (.../tags/gcc_4_8_3_release)
3066
+++ b/src/gcc/cgraphunit.c (.../branches/gcc-4_8-branch)
3067
@@ -1097,7 +1097,7 @@
3068
/* We use local aliases for C++ thunks to force the tailcall
3069
to bind locally. This is a hack - to keep it working do
3070
the following (which is not strictly correct). */
3071
- && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
3072
+ && (TREE_CODE (target_node->symbol.decl) != FUNCTION_DECL
3073
|| ! DECL_VIRTUAL_P (target_node->symbol.decl))
3074
&& ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
3076
Index: gcc/ChangeLog
3077
===================================================================
3078
--- a/src/gcc/ChangeLog (.../tags/gcc_4_8_3_release)
3079
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_8-branch)
3081
+2014-12-13 Jakub Jelinek <jakub@redhat.com>
3083
+ Backported from mainline
3084
+ 2014-12-12 Jakub Jelinek <jakub@redhat.com>
3086
+ PR tree-optimization/64269
3087
+ * tree-ssa-forwprop.c (simplify_builtin_call): Bail out if
3088
+ len2 or diff are too large.
3090
+2014-12-11 Eric Botcazou <ebotcazou@adacore.com>
3092
+ * doc/md.texi (Insn Lengths): Fix description of (pc).
3094
+2014-12-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3096
+ Backport from mainline
3097
+ 2014-09-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3099
+ * config/rs6000/rs6000-builtin.def (XVCVSXDDP_SCALE): New
3100
+ built-in definition.
3101
+ (XVCVUXDDP_SCALE): Likewise.
3102
+ (XVCVDPSXDS_SCALE): Likewise.
3103
+ (XVCVDPUXDS_SCALE): Likewise.
3104
+ * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
3105
+ entries for VSX_BUILTIN_XVCVSXDDP_SCALE,
3106
+ VSX_BUILTIN_XVCVUXDDP_SCALE, VSX_BUILTIN_XVCVDPSXDS_SCALE, and
3107
+ VSX_BUILTIN_XVCVDPUXDS_SCALE.
3108
+ * config/rs6000/rs6000-protos.h (rs6000_scale_v2df): New
3110
+ * config/rs6000/rs6000.c (real.h): New include.
3111
+ (rs6000_scale_v2df): New function.
3112
+ * config/rs6000/vsx.md (UNSPEC_VSX_XVCVSXDDP): New unspec.
3113
+ (UNSPEC_VSX_XVCVUXDDP): Likewise.
3114
+ (UNSPEC_VSX_XVCVDPSXDS): Likewise.
3115
+ (UNSPEC_VSX_XVCVDPUXDS): Likewise.
3116
+ (vsx_xvcvsxddp_scale): New define_expand.
3117
+ (vsx_xvcvsxddp): New define_insn.
3118
+ (vsx_xvcvuxddp_scale): New define_expand.
3119
+ (vsx_xvcvuxddp): New define_insn.
3120
+ (vsx_xvcvdpsxds_scale): New define_expand.
3121
+ (vsx_xvcvdpsxds): New define_insn.
3122
+ (vsx_xvcvdpuxds_scale): New define_expand.
3123
+ (vsx_xvcvdpuxds): New define_insn.
3124
+ * doc/extend.texi (vec_ctf): Add new prototypes.
3125
+ (vec_cts): Likewise.
3126
+ (vec_ctu): Likewise.
3127
+ (vec_splat): Likewise.
3128
+ (vec_div): Likewise.
3129
+ (vec_mul): Likewise.
3131
+ Backport from mainline
3132
+ 2014-08-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3134
+ * config/rs6000/altivec.h (vec_xl): New #define.
3135
+ (vec_xst): Likewise.
3136
+ * config/rs6000/rs6000-builtin.def (XXSPLTD_V2DF): New built-in.
3137
+ (XXSPLTD_V2DI): Likewise.
3138
+ (DIV_V2DI): Likewise.
3139
+ (UDIV_V2DI): Likewise.
3140
+ (MUL_V2DI): Likewise.
3141
+ * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
3142
+ entries for VSX_BUILTIN_XVRDPI, VSX_BUILTIN_DIV_V2DI,
3143
+ VSX_BUILTIN_UDIV_V2DI, VSX_BUILTIN_MUL_V2DI,
3144
+ VSX_BUILTIN_XXSPLTD_V2DF, and VSX_BUILTIN_XXSPLTD_V2DI).
3145
+ * config/rs6000/vsx.md (UNSPEC_VSX_XXSPLTD): New unspec.
3146
+ (UNSPEC_VSX_DIVSD): Likewise.
3147
+ (UNSPEC_VSX_DIVUD): Likewise.
3148
+ (UNSPEC_VSX_MULSD): Likewise.
3149
+ (vsx_mul_v2di): New insn-and-split.
3150
+ (vsx_div_v2di): Likewise.
3151
+ (vsx_udiv_v2di): Likewise.
3152
+ (vsx_xxspltd_<mode>): New insn.
3154
+ Backport from mainline
3155
+ 2014-08-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3157
+ * config/rs6000/altivec.h (vec_cpsgn): New #define.
3158
+ (vec_mergee): Likewise.
3159
+ (vec_mergeo): Likewise.
3160
+ (vec_cntlz): Likewise.
3161
+ * config/rs600/rs6000-c.c (altivec_overloaded_builtins): Add new
3162
+ entries for VEC_AND, VEC_ANDC, VEC_MERGEH, VEC_MERGEL, VEC_NOR,
3163
+ VEC_OR, VEC_PACKSU, VEC_XOR, VEC_PERM, VEC_SEL, VEC_VCMPGT_P,
3164
+ VMRGEW, and VMRGOW.
3165
+ * doc/extend.texi: Document various forms of vec_cpsgn,
3166
+ vec_splats, vec_and, vec_andc, vec_mergeh, vec_mergel, vec_nor,
3167
+ vec_or, vec_perm, vec_sel, vec_sub, vec_xor, vec_all_eq,
3168
+ vec_all_ge, vec_all_gt, vec_all_le, vec_all_lt, vec_all_ne,
3169
+ vec_any_eq, vec_any_ge, vec_any_gt, vec_any_le, vec_any_lt,
3170
+ vec_any_ne, vec_mergee, vec_mergeo, vec_packsu, and vec_cntlz.
3172
+ Backport from mainline
3173
+ 2014-07-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3175
+ * config/rs6000/altivec.md (unspec enum): Fix typo in UNSPEC_VSLDOI.
3176
+ (altivec_vsldoi_<mode>): Likewise.
3178
+2014-12-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3180
+ Backport from mainline:
3181
+ 2014-12-09 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3183
+ PR middle-end/64225
3184
+ * tree-ssa-reassoc.c (acceptable_pow_call): Disable transformation
3185
+ for BUILT_IN_POW when flag_errno_math is present.
3187
+2014-12-10 Marek Polacek <polacek@redhat.com>
3189
+ Backport from mainline
3190
+ 2014-12-10 Marek Polacek <polacek@redhat.com>
3192
+ PR tree-optimization/61686
3193
+ * tree-ssa-reassoc.c (range_entry_cmp): Use q->high instead of
3196
+2014-12-09 David Edelsohn <dje.gcc@gmail.com>
3198
+ Backport from mainline
3199
+ 2014-12-05 David Edelsohn <dje.gcc@gmail.com>
3201
+ * config/rs6000/xcoff.h (ASM_OUTPUT_ALIGNED_LOCAL): Append
3202
+ alignment to section name. Increase default alignment to
3205
+2014-12-09 Uros Bizjak <ubizjak@gmail.com>
3207
+ PR bootstrap/64213
3209
+ 2014-11-28 H.J. Lu <hongjiu.lu@intel.com>
3211
+ PR rtl-optimization/64037
3212
+ * combine.c (setup_incoming_promotions): Pass the argument
3213
+ before any promotions happen to promote_function_mode.
3215
+2014-12-08 Richard Biener <rguenther@suse.de>
3217
+ Backport from 4.9 branch
3219
+ (ac_has_isl_schedule_constraints_compute_schedule):
3221
+ * graphite-clast-to-gimple.c: For ISL 0.14, include deprecate headers.
3222
+ * graphite-interchange.c: Ditto.
3223
+ * graphite-poly.c: Ditto.
3224
+ * graphite-sese-to-poly.c: Ditto.
3225
+ * graphite-optimize-isl.c (getScheduleForBandList): Ditto.
3226
+ Conditionally use ISL 0.13+ functions.
3227
+ * config.in: Regenerate.
3228
+ * configure: Regenerate.
3230
+2014-12-07 Oleg Endo <olegendo@gcc.gnu.org>
3232
+ Backport from mainline
3233
+ 2014-12-07 Oleg Endo <olegendo@gcc.gnu.org>
3236
+ * config/sh/sh.md (extendqihi2): Allow only for TARGET_SH1.
3238
+2014-12-05 H.J. Lu <hongjiu.lu@intel.com>
3240
+ Backport from mainline
3241
+ 2014-11-28 H.J. Lu <hongjiu.lu@intel.com>
3243
+ PR rtl-optimization/64037
3244
+ * combine.c (setup_incoming_promotions): Pass the argument
3245
+ before any promotions happen to promote_function_mode.
3247
+2014-12-04 Shanyao Chen <chenshanyao@huawei.com>
3249
+ Backport from mainline
3250
+ 2014-11-20 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3253
+ * config/arm/arm.md (*movhi_insn): Use right formatting
3256
+ 2014-11-19 Felix Yang <felix.yang@huawei.com>
3257
+ Shanyao Chen <chenshanyao@huawei.com>
3260
+ * config/arm/arm.md (define_attr "arch"): Add v6t2.
3261
+ (define_attr "arch_enabled"): Add test for the above.
3262
+ (*movhi_insn_arch4): Add new alternative.
3264
+2014-12-04 Jakub Jelinek <jakub@redhat.com>
3267
+ * convert.c (convert_to_real, convert_to_expr, convert_to_complex):
3268
+ Handle COMPOUND_EXPR.
3270
+2014-12-02 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3273
+ * config/rs6000/rs6000.c (rs6000_delegitimize_address): Remove
3274
+ invalid UNSPEC_TOCREL sanity check under ENABLE_CHECKING.
3276
+2014-12-01 Richard Biener <rguenther@suse.de>
3278
+ PR middle-end/64111
3279
+ * tree.c (int_cst_hash_hash): Use TYPE_UID instead of
3280
+ htab_hash_pointer to not break PCH.
3282
+2014-11-28 Jakub Jelinek <jakub@redhat.com>
3284
+ Backported from mainline
3285
+ 2014-11-27 Jakub Jelinek <jakub@redhat.com>
3287
+ PR middle-end/64067
3288
+ * expr.c (expand_expr_addr_expr_1) <case COMPOUND_LITERAL_EXPR>:
3289
+ Handle it by returning address of COMPOUND_LITERAL_EXPR_DECL
3290
+ not only if modifier is EXPAND_INITIALIZER, but whenever
3291
+ COMPOUND_LITERAL_EXPR_DECL is non-NULL and TREE_STATIC.
3293
+ 2014-10-31 Jakub Jelinek <jakub@redhat.com>
3295
+ PR rtl-optimization/63659
3296
+ * ree.c (update_reg_equal_equiv_notes): New function.
3297
+ (combine_set_extension, transform_ifelse): Use it.
3299
+ 2014-10-03 Jakub Jelinek <jakub@redhat.com>
3302
+ * omp-low.c (taskreg_contexts): New variable.
3303
+ (scan_omp_parallel): Push newly created context into taskreg_contexts
3304
+ vector and move record layout code to finish_taskreg_scan.
3305
+ (scan_omp_task): Likewise.
3306
+ (finish_taskreg_scan): New function.
3307
+ (execute_lower_omp): Call finish_taskreg_scan on all taskreg_contexts
3308
+ vector elements and release it.
3310
+2014-11-26 Richard Biener <rguenther@suse.de>
3312
+ Backport from mainline
3313
+ 2014-10-08 Richard Biener <rguenther@suse.de>
3315
+ PR tree-optimization/61969
3316
+ * tree-nrv.c (pass_nrv::execute): Properly test for automatic
3319
+ 2014-08-15 Richard Biener <rguenther@suse.de>
3321
+ PR tree-optimization/62031
3322
+ * tree-data-ref.c (dr_analyze_indices): Do not set
3323
+ DR_UNCONSTRAINED_BASE.
3324
+ (dr_may_alias_p): All indirect accesses have to go the
3325
+ formerly DR_UNCONSTRAINED_BASE path.
3326
+ * tree-data-ref.h (struct indices): Remove
3327
+ unconstrained_base member.
3328
+ (DR_UNCONSTRAINED_BASE): Remove.
3330
+ 2014-10-10 Richard Biener <rguenther@suse.de>
3332
+ PR tree-optimization/63379
3333
+ * tree-vect-slp.c (vect_get_constant_vectors): Do not compute
3334
+ a neutral operand for min/max when it is not a reduction chain.
3336
+ 2014-11-07 Richard Biener <rguenther@suse.de>
3338
+ PR tree-optimization/63605
3339
+ * fold-const.c (fold_binary_loc): Properly use element_precision
3340
+ for types that may not be scalar.
3342
+ 2014-10-28 Richard Biener <rguenther@suse.de>
3344
+ PR middle-end/63665
3345
+ * fold-const.c (fold_comparison): Properly guard simplifying
3346
+ against INT_MAX/INT_MIN with !TYPE_OVERFLOW_WRAPS.
3348
+2014-11-22 Oleg Endo <olegendo@gcc.gnu.org>
3350
+ Backport from mainline
3351
+ 2014-11-20 Segher Boessenkool <segher@kernel.crashing.org>
3354
+ * config/sh/sh.c: Use signed char for signed field.
3356
+2014-11-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3359
+ * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Allow
3360
+ the base pointer of vec_vsx_ld and vec_vsx_st to take a pointer to
3363
+2014-11-19 Uros Bizjak <ubizjak@gmail.com>
3366
+ * config/i386/i386.c (put_condition_code) <case LTU, case GEU>:
3367
+ Output "b" and "nb" suffix for FP mode.
3369
+2014-11-19 Tom de Vries <tom@codesourcery.com>
3371
+ Backport from mainline
3372
+ PR tree-optimization/62167
3373
+ * tree-ssa-tail-merge.c (stmt_local_def): Handle statements with vuse
3375
+ (gimple_equal_p): Don't use vn_valueize to compare for lhs equality of
3378
+2014-11-18 Teresa Johnson <tejohnson@google.com>
3380
+ Backport from mainline and gcc-4_9 branch.
3381
+ 2014-11-13 Teresa Johnson <tejohnson@google.com>
3383
+ PR tree-optimization/63841
3384
+ * tree-ssa-strlen.c (strlen_optimize_stmt): Ignore clobbers.
3386
+2014-11-16 Eric Botcazou <ebotcazou@adacore.com>
3388
+ * doc/tm.texi.in (TARGET_FLAGS_REGNUM): Move around.
3389
+ * doc/tm.texi: Regenerate.
3391
+ Backport from mainline
3392
+ 2013-09-16 Andreas Schwab <schwab@linux-m68k.org>
3394
+ * doc/tm.texi.in (Cond Exec Macros): Remove node.
3395
+ (Condition Code): Don't reference it.
3396
+ * doc/tm.texi: Regenerate.
3398
+2014-11-13 Christophe Lyon <christophe.lyon@linaro.org>
3400
+ Backport from mainline
3401
+ 2014-11-02 Michael Collison <michael.collison@linaro.org>
3403
+ * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update
3404
+ to support vector modes.
3405
+ (CTZ_DEFINED_VALUE_AT_ZERO): Ditto.
3407
+2014-11-13 Eric Botcazou <ebotcazou@adacore.com>
3409
+ * doc/tm.texi.in (SELECT_CC_MODE): Update example.
3410
+ (REVERSIBLE_CC_MODE): Fix example.
3411
+ (REVERSE_CONDITION): Fix typo.
3412
+ * doc/tm.texi: Regenerate.
3414
+2014-11-12 Jakub Jelinek <jakub@redhat.com>
3417
+ * ipa-pure-const.c (propagate_nothrow): Walk w->indirect_calls
3418
+ chain instead of node->indirect_calls.
3420
+2014-11-10 Daniel Hellstrom <daniel@gaisler.com>
3422
+ Backport from mainline
3423
+ * config.gcc (sparc-*-rtems*): Clean away unused t-elf.
3424
+ * config/sparc/t-rtems: Add leon3v7 and muser-mode multilibs.
3426
+2014-11-07 Daniel Hellstrom <daniel@gaisler.com>
3428
+ * config.gcc (sparc*-*-*): Accept mcpu=leon3v7 processor.
3429
+ * doc/invoke.texi (SPARC options): Add mcpu=leon3v7 comment.
3430
+ * config/sparc/leon.md (leon3_load, leon_store, leon_fp_*): Handle
3432
+ * config/sparc/sparc-opts.h (enum processor_type): Add LEON3V7.
3433
+ * config/sparc/sparc.c (sparc_option_override): Add leon3v7 support.
3434
+ * config/sparc/sparc.h (TARGET_CPU_leon3v7): New define.
3435
+ * config/sparc/sparc.md (cpu): Add leon3v7.
3436
+ * config/sparc/sparc.opt (enum processor_type): Add leon3v7.
3438
+2014-11-06 John David Anglin <danglin@gcc.gnu.org>
3440
+ * config/pa/pa.md (trap): New insn. Add "trap" to attribute type.
3441
+ Don't allow trap insn in in_branch_delay, in_nullified_branch_delay
3444
+2014-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3446
+ * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define.
3447
+ (LINK_SPEC): Include CA53_ERR_835769_SPEC.
3448
+ * config/aarch64/aarch64-linux.h
3449
+ (CA53_ERR_835769_SPEC): Define.
3450
+ (LINK_SPEC): Include CA53_ERR_835769_SPEC.
3452
+2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3454
+ * config/aarch64/aarch64.c (aarch64_madd_needs_nop): Restore
3455
+ recog state after aarch64_prev_real_insn call.
3457
+2014-10-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3459
+ * config.gcc (aarch64*-*-*): Define TARGET_FIX_ERR_A53_835769_DEFAULT
3461
+ * configure.ac: Add --enable-fix-cortex-a53-835769 option.
3462
+ * configure: Regenerate.
3463
+ * config/aarch64/aarch64.c (aarch64_override_options): Handle
3464
+ TARGET_FIX_ERR_A53_835769_DEFAULT.
3465
+ * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init value
3467
+ * doc/install.texi: Document --enable-fix-cortex-a53-835769 option.
3469
+2014-10-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3471
+ * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): New option.
3472
+ * config/aarch64/aarch64.h (ADJUST_INSN_LENGTH): Define.
3473
+ (FINAL_PRESCAN_INSN): Likewise.
3474
+ * config/aarch64/aarch64.h (is_mem_p): New function.
3475
+ (has_memory_op): Likewise.
3476
+ (aarch64_prev_real_insn): Likewise.
3477
+ (is_madd_op): Likewise.
3478
+ (dep_between_memop_and_curr): Likewise.
3479
+ (aarch64_madd_needs_nop): Likewise.
3480
+ (aarch64_final_prescan_insn): Likewise.
3481
+ * doc/invoke.texi (Document new option).
3483
+2014-10-15 Eric Botcazou <ebotcazou@adacore.com>
3485
+ * stor-layout.c (self_referential_size): Do not promote arguments.
3487
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3489
+ Backport from mainline r215880
3490
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3492
+ * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3493
+ Issue a warning message when vec_lvsl or vec_lvsr is used with a
3494
+ little endian target.
3496
+ Backport from mainline r215882
3497
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3499
+ * altivec.md (altivec_lvsl): New define_expand.
3500
+ (altivec_lvsl_direct): Rename define_insn from altivec_lvsl.
3501
+ (altivec_lvsr): New define_expand.
3502
+ (altivec_lvsr_direct): Rename define_insn from altivec_lvsr.
3503
+ * rs6000.c (rs6000_expand_builtin): Change to use
3504
+ altivec_lvs[lr]_direct; remove commented-out code.
3506
+2014-10-09 Uros Bizjak <ubizjak@gmail.com>
3508
+ Backport from mainline
3509
+ 2014-10-09 Uros Bizjak <ubizjak@gmail.com>
3511
+ PR rtl-optimization/57003
3512
+ * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
3513
+ also check CALL_INSN_FUNCTION_USAGE for clobbers again after
3514
+ killing regs_invalidated_by_call.
3516
+2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
3518
+ Backport from mainline
3519
+ 2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
3522
+ * config/sh/sync.md (atomic_exchangesi_hard, atomic_exchange<mode>_hard,
3523
+ atomic_fetch_<fetchop_name>si_hard,
3524
+ atomic_fetch_<fetchop_name><mode>_hard, atomic_fetch_nandsi_hard,
3525
+ atomic_fetch_nand<mode>_hard, atomic_<fetchop_name>_fetchsi_hard,
3526
+ atomic_<fetchop_name>_fetch<mode>_hard, atomic_nand_fetchsi_hard,
3527
+ atomic_nand_fetch<mode>_hard): Add missing set of T_REG.
3529
+2014-10-02 Martin Jambor <mjambor@suse.cz>
3531
+ PR tree-optimization/63375
3532
+ * tree-sra.c (build_access_from_expr_1): Disqualify volatile
3535
+2014-10-01 Jakub Jelinek <jakub@redhat.com>
3538
+ * dwarf2out.c (loc_list_from_tree): Handle TARGET_MEM_REF and
3542
+ * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0]
3543
+ argument to avx2_permv2ti.
3545
+2014-10-01 Uros Bizjak <ubizjak@gmail.com>
3547
+ Backport from mainline
3548
+ 2014-09-30 Uros Bizjak <ubizjak@gmail.com>
3550
+ * config/i386/i386.md (fmodxf3): Enable for flag_finite_math_only only.
3551
+ (fmod<mode>3): Ditto.
3552
+ (fpremxf4_i387): Ditto.
3553
+ (reminderxf3): Ditto.
3554
+ (reminder<mode>3): Ditto.
3555
+ (fprem1xf4_i387): Ditto.
3557
+2014-09-30 Jakub Jelinek <jakub@redhat.com>
3559
+ PR inline-asm/63282
3560
+ * ifcvt.c (dead_or_predicable): Don't call redirect_jump_1
3561
+ or invert_jump_1 if jump isn't any_condjump_p.
3563
+2014-09-29 Charles Baylis <charles.baylis@linaro.org>
3565
+ Backport from mainline r212303
3567
+ * config/arm/arm-protos.h (arm_legitimate_address_p,
3568
+ arm_is_constant_pool_ref): Add prototypes.
3569
+ * config/arm/arm.c (arm_legitimate_address_p): Remove static.
3570
+ (arm_is_constant_pool_ref) New function.
3571
+ * config/arm/arm.md (unaligned_loadhis, arm_zero_extendhisi2_v6,
3572
+ arm_zero_extendqisi2_v6): Use Uh constraint for memory operand.
3573
+ (arm_extendhisi2, arm_extendhisi2_v6): Use Uh constraint for memory
3574
+ operand and remove pool_range and neg_pool_range attributes.
3575
+ (arm_extendqihi_insn, arm_extendqisi, arm_extendqisi_v6): Remove
3576
+ pool_range and neg_pool_range attributes.
3577
+ * config/arm/constraints.md (Uh): New constraint. (Uq): Don't allow
3578
+ constant pool references.
3580
+2014-09-28 John David Anglin <danglin@gcc.gnu.org>
3582
+ * config/pa/pa.c (pa_output_function_epilogue): Only update
3583
+ last_address when a nonnote insn is found.
3585
+2014-09-25 Oleg Endo <olegendo@gcc.gnu.org>
3587
+ Backport from mainline
3588
+ 2014-09-25 Nick Clifton <nickc@redhat.com>
3589
+ 2014-09-25 Oleg Endo <olegendo@gcc.gnu.org>
3592
+ * config/sh/sync.md (atomic_fetch_nand<mode>_soft_imask,
3593
+ atomic_test_and_set_soft_imask): Fix typo in instruction sequence.
3595
+2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3597
+ Backport from mainline r215559
3598
+ 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3601
+ * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin):
3602
+ Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling.
3604
+2014-09-25 Jakub Jelinek <jakub@redhat.com>
3606
+ PR tree-optimization/63341
3607
+ * tree-vectorizer.h (vect_create_data_ref_ptr,
3608
+ vect_create_addr_base_for_vector_ref): Add another tree argument
3609
+ defaulting to NULL_TREE.
3610
+ * tree-vect-data-refs.c (vect_create_data_ref_ptr): Add byte_offset
3611
+ argument, pass it down to vect_create_addr_base_for_vector_ref.
3612
+ (vect_create_addr_base_for_vector_ref): Add byte_offset argument,
3613
+ add that to base_offset too if non-NULL.
3614
+ * tree-vect-stmts.c (vectorizable_load): Add byte_offset variable,
3615
+ for dr_explicit_realign_optimized set it to vector byte size
3616
+ - 1 instead of setting offset, pass byte_offset down to
3617
+ vect_create_data_ref_ptr.
3619
+2014-09-23 Michael Meissner <meissner@linux.vnet.ibm.com>
3621
+ Back port from trunk:
3622
+ 2014-09-23 Michael Meissner <meissner@linux.vnet.ibm.com>
3624
+ * config/rs6000/rs6000.md (f32_vsx): New mode attributes to
3625
+ refine the constraints used on 32/64-bit floating point moves.
3626
+ (f32_av): Likewise.
3627
+ (f64_vsx): Likewise.
3628
+ (f64_dm): Likewise.
3629
+ (f64_av): Likewise.
3630
+ (BOOL_REGS_OUTPUT): Use wt constraint for TImode instead of wa.
3631
+ (BOOL_REGS_OP1): Likewise.
3632
+ (BOOL_REGS_OP2): Likewise.
3633
+ (BOOL_REGS_UNARY): Likewise.
3634
+ (mov<mode>_hardfloat, SFmode/SDmode): Tighten down constraints for
3635
+ 32/64-bit floating point moves. Do not use wa, instead use ww/ws
3636
+ for moves involving VSX registers. Do not use constraints that
3637
+ target VSX registers for decimal types.
3638
+ (mov<mode>_hardfloat32, DFmode/DDmode): Likewise.
3639
+ (mov<mode>_hardfloat64, DFmode/DDmode): Likewise.
3641
+2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
3643
+ Back port from trunk:
3644
+ 2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
3646
+ * config/rs6000/predicates.md (fusion_gpr_mem_load): Move testing
3647
+ for base_reg_operand to be common between LO_SUM and PLUS.
3648
+ (fusion_gpr_mem_combo): New predicate to match a fused address
3649
+ that combines the addis and memory offset address.
3651
+ * config/rs6000/rs6000-protos.h (fusion_gpr_load_p): Change
3652
+ calling signature.
3653
+ (emit_fusion_gpr_load): Likewise.
3655
+ * config/rs6000/rs6000.c (fusion_gpr_load_p): Change calling
3656
+ signature to pass each argument separately, rather than
3657
+ using an operands array. Rewrite the insns found by peephole2 to
3658
+ be a single insn, rather than hoping the insns will still be
3659
+ together when the peephole pass is done. Drop being called via a
3661
+ (emit_fusion_gpr_load): Change calling signature to be called from
3662
+ the fusion_gpr_load_<mode> insns with a combined memory address
3663
+ instead of the peephole pass passing the addis and offset
3666
+ * config/rs6000/rs6000.md (UNSPEC_FUSION_GPR): New unspec for GPR
3668
+ (power8 fusion peephole): Drop support for doing power8 via a
3669
+ normal peephole that was created by the peephole2 pass.
3670
+ (power8 fusion peephole2): Create a new insn with the fused
3671
+ address, so that the fused operation is kept together after
3672
+ register allocation is done.
3673
+ (fusion_gpr_load_<mode>): Likewise.
3675
+2014-09-17 Jakub Jelinek <jakub@redhat.com>
3678
+ * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
3679
+ if there are only debug stmts after the noreturn call, instead
3680
+ remove the debug stmts.
3682
+2014-09-10 Michael Meissner <meissner@linux.vnet.ibm.com>
3684
+ * config/rs6000/vsx.md (vsx_fmav4sf4): Use correct constraints for
3685
+ V2DF, V4SF, DF, and DI modes.
3686
+ (vsx_fmav2df2): Likewise.
3687
+ (vsx_float_fix_<mode>2): Likewise.
3688
+ (vsx_reduc_<VEC_reduc_name>_v2df_scalar): Likewise.
3690
+2014-09-10 Alan Modra <amodra@gmail.com>
3693
+ * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
3696
+2014-09-09 Richard Biener <rguenther@suse.de>
3698
+ Backport from mainline
3699
+ 2014-06-11 Richard Biener <rguenther@suse.de>
3701
+ PR tree-optimization/61452
3702
+ * tree-ssa-sccvn.c (visit_phi): Remove pointless setting of
3703
+ expr and has_constants in case we found a leader.
3704
+ (simplify_binary_expression): Always valueize operands first.
3705
+ (simplify_unary_expression): Likewise.
3707
+2014-09-09 Richard Biener <rguenther@suse.de>
3709
+ Backport from mainline
3710
+ 2014-05-05 Richard Biener <rguenther@suse.de>
3712
+ PR middle-end/61010
3713
+ * fold-const.c (fold_binary_loc): Consistently avoid
3714
+ canonicalizing X & CST away from a CST that is the mask
3717
+ 2014-05-28 Richard Biener <rguenther@suse.de>
3719
+ PR middle-end/61045
3720
+ * fold-const.c (fold_comparison): When folding
3721
+ X +- C1 CMP Y +- C2 to X CMP Y +- C2 +- C1 also ensure
3722
+ the sign of the remaining constant operand stays the same.
3724
+ 2014-08-11 Richard Biener <rguenther@suse.de>
3726
+ PR tree-optimization/62075
3727
+ * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
3728
+ handle uses in patterns.
3730
+2014-09-09 James Greenhalgh <james.greenhalgh@arm.com>
3732
+ Backport from mainline.
3733
+ 2014-09-09 James Greenhalgh <james.greenhalgh@arm.com>
3735
+ * doc/invoke.texi (-march): Use GNU/Linux rather than Linux.
3736
+ (-mtune): Likewise.
3737
+ (-mcpu): Likewise.
3739
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
3741
+ PR tree-optimization/60196
3742
+ PR tree-optimization/63189
3743
+ Backported from mainline
3744
+ 2013-09-17 Cong Hou <congh@google.com>
3746
+ * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
3747
+ when checking the dot production pattern. The type of rhs operand
3748
+ of multiply is now checked correctly.
3750
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
3752
+ Backported from mainline
3753
+ 2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
3756
+ * haifa-sched.c (advance_one_cycle): Fix dump.
3757
+ (schedule_block): Don't advance cycle if we are already at the
3758
+ beginning of the cycle.
3760
+2014-09-03 Martin Jambor <mjambor@suse.cz>
3763
+ * ipa-cp.c (intersect_aggregates_with_edge): Handle impermissible
3764
+ pass-trough jump functions correctly.
3766
+2014-09-03 Martin Jambor <mjambor@suse.cz>
3769
+ * ipa-cp.c (find_aggregate_values_for_callers_subset): Chain
3770
+ created replacements in ascending order of offsets.
3771
+ (known_aggs_to_agg_replacement_list): Likewise.
3773
+2014-09-01 Marek Polacek <polacek@redhat.com>
3775
+ Backport from mainline
3776
+ 2014-08-21 Marek Polacek <polacek@redhat.com>
3779
+ * expr.c (is_aligning_offset): Remove logical not.
3781
+2014-09-01 Marek Polacek <polacek@redhat.com>
3783
+ Backport from mainline
3784
+ 2014-08-19 Marek Polacek <polacek@redhat.com>
3787
+ * cgraphunit.c (handle_alias_pairs): Fix condition.
3789
+2014-08-30 John David Anglin <danglin@gcc.gnu.org>
3791
+ * config/pa/pa.c (pa_assemble_integer): Don't add PLABEL relocation
3792
+ prefix to function labels when generating fast indirect calls.
3794
+2014-08-26 Joel Sherrill <joel.sherrill@oarcorp.com>
3796
+ * doc/invoke.texi: -fno-cxa-atexit should be -fno-use-cxa-atexit.
3798
+2014-08-26 Marek Polacek <polacek@redhat.com>
3800
+ Backport from mainline
3801
+ 2014-08-26 Marek Polacek <polacek@redhat.com>
3804
+ * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT,
3805
+ LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Wrap in parens.
3807
+2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
3809
+ Backport from mainline
3810
+ 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
3813
+ * config/sh/sh.opt (musermode): Allow negative form.
3814
+ * config/sh/sh.c (sh_option_override): Disable TARGET_USERMODE for
3815
+ targets that don't support it.
3816
+ * doc/invoke.texi (SH Options): Rename sh-*-linux* to sh*-*-linux*.
3817
+ Document -mno-usermode option.
3819
+2014-08-23 John David Anglin <danglin@gcc.gnu.org>
3822
+ * config/pa/pa.c (pa_output_function_epilogue): Don't set
3823
+ last_address when the current function is a thunk.
3824
+ (pa_asm_output_mi_thunk): When we don't have named sections or they
3825
+ are not being used, check that thunk can reach the stub table with a
3828
+2014-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
3830
+ Backport fro mainline
3831
+ 2014-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
3834
+ * doc/md.texi (Machine Constraints): Update PowerPC wi constraint
3835
+ documentation to state it is only for VSX operations.
3837
+ * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Make wi
3838
+ constraint only active if VSX.
3840
+ * config/rs6000/rs6000.md (lfiwax): Use wj constraint instead of
3841
+ wi cosntraint for ISA 2.07 lxsiwax/lxsiwzx instructions.
3842
+ (lfiwzx): Likewise.
3844
+2014-08-15 Tom de Vries <tom@codesourcery.com>
3846
+ Backport from mainline:
3847
+ 2014-08-14 Tom de Vries <tom@codesourcery.com>
3849
+ PR rtl-optimization/62004
3850
+ PR rtl-optimization/62030
3851
+ * ifcvt.c (rtx_interchangeable_p): New function.
3852
+ (noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.
3854
+ 2014-08-05 Richard Biener <rguenther@suse.de>
3856
+ * emit-rtl.h (mem_attrs_eq_p): Declare.
3857
+ * emit-rtl.c (mem_attrs_eq_p): Export.
3859
+2014-08-16 John David Anglin <danglin@gcc.gnu.org>
3861
+ Backport from trunk:
3862
+ 2014-04-06 John David Anglin <danglin@gcc.gnu.org>
3865
+ * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
3866
+ size accounting for thunks.
3867
+ (pa_asm_output_mi_thunk): Use final_start_function() and
3868
+ final_end_function() to output function start and end directives.
3870
+2014-08-15 Oleg Endo <olegendo@gcc.gnu.org>
3872
+ Backport from mainline:
3873
+ 2014-08-15 Oleg Endo <olegendo@gcc.gnu.org>
3875
+ * doc/invoke.texi (SH options): Document missing processor variant
3876
+ options. Remove references to Hitachi. Undocument deprecated mspace
3879
+2014-08-13 Felix Yang <fei.yang0953@gmail.com>
3881
+ PR tree-optimization/62073
3882
+ * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has
3885
+2014-08-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3887
+ Backport from mainline
3888
+ 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
3890
+ PR middle-end/62103
3891
+ * gimple-fold.c (fold_ctor_reference): Don't fold in presence of
3892
+ bitfields, that is when size doesn't match the size of type or the
3893
+ size of the constructor.
3895
+2014-08-12 Michael Meissner <meissner@linux.vnet.ibm.com>
3897
+ Backport patch from mainline
3898
+ 2014-08-11 Michael Meissner <meissner@linux.vnet.ibm.com>
3900
+ * config/rs6000/constraints.md (wh constraint): New constraint,
3901
+ for FP registers if direct move is available.
3902
+ (wi constraint): New constraint, for VSX/FP registers that can
3903
+ handle 64-bit integers.
3904
+ (wj constraint): New constraint for VSX/FP registers that can
3905
+ handle 64-bit integers for direct moves.
3906
+ (wk constraint): New constraint for VSX/FP registers that can
3907
+ handle 64-bit doubles for direct moves.
3908
+ (wy constraint): Make documentation match implementation.
3910
+ * config/rs6000/rs6000.c (struct rs6000_reg_addr): Add
3911
+ scalar_in_vmx_p field to simplify tests of whether SFmode or
3912
+ DFmode can go in the Altivec registers.
3913
+ (rs6000_hard_regno_mode_ok): Use scalar_in_vmx_p field.
3914
+ (rs6000_setup_reg_addr_masks): Likewise.
3915
+ (rs6000_debug_print_mode): Add debug support for scalar_in_vmx_p
3916
+ field, and wh/wi/wj/wk constraints.
3917
+ (rs6000_init_hard_regno_mode_ok): Setup scalar_in_vmx_p field, and
3918
+ the wh/wi/wj/wk constraints.
3919
+ (rs6000_preferred_reload_class): If SFmode/DFmode can go in the
3920
+ upper registers, prefer VSX registers unless the operation is a
3921
+ memory operation with REG+OFFSET addressing.
3923
+ * config/rs6000/vsx.md (VSr mode attribute): Add support for
3924
+ DImode. Change SFmode to use ww constraint instead of d to allow
3925
+ SF registers in the upper registers.
3928
+ (VSr5): Fix thinko in comment.
3929
+ (VSa): New mode attribute that is an alternative to wa, that
3930
+ returns the VSX register class that a mode can go in, but may not
3931
+ be the preferred register class.
3932
+ (VS_64dm): New mode attribute for appropriate register classes for
3933
+ referencing 64-bit elements of vectors for direct moves and normal
3935
+ (VS_64reg): Likewise.
3936
+ (vsx_mov<mode>): Change wa constraint to <VSa> to limit the
3937
+ register allocator to only registers the data type can handle.
3938
+ (vsx_le_perm_load_<mode>): Likewise.
3939
+ (vsx_le_perm_store_<mode>): Likewise.
3940
+ (vsx_xxpermdi2_le_<mode>): Likewise.
3941
+ (vsx_xxpermdi4_le_<mode>): Likewise.
3942
+ (vsx_lxvd2x2_le_<mode>): Likewise.
3943
+ (vsx_lxvd2x4_le_<mode>): Likewise.
3944
+ (vsx_stxvd2x2_le_<mode>): Likewise.
3945
+ (vsx_add<mode>3): Likewise.
3946
+ (vsx_sub<mode>3): Likewise.
3947
+ (vsx_mul<mode>3): Likewise.
3948
+ (vsx_div<mode>3): Likewise.
3949
+ (vsx_tdiv<mode>3_internal): Likewise.
3950
+ (vsx_fre<mode>2): Likewise.
3951
+ (vsx_neg<mode>2): Likewise.
3952
+ (vsx_abs<mode>2): Likewise.
3953
+ (vsx_nabs<mode>2): Likewise.
3954
+ (vsx_smax<mode>3): Likewise.
3955
+ (vsx_smin<mode>3): Likewise.
3956
+ (vsx_sqrt<mode>2): Likewise.
3957
+ (vsx_rsqrte<mode>2): Likewise.
3958
+ (vsx_tsqrt<mode>2_internal): Likewise.
3959
+ (vsx_fms<mode>4): Likewise.
3960
+ (vsx_nfma<mode>4): Likewise.
3961
+ (vsx_eq<mode>): Likewise.
3962
+ (vsx_gt<mode>): Likewise.
3963
+ (vsx_ge<mode>): Likewise.
3964
+ (vsx_eq<mode>_p): Likewise.
3965
+ (vsx_gt<mode>_p): Likewise.
3966
+ (vsx_ge<mode>_p): Likewise.
3967
+ (vsx_xxsel<mode>): Likewise.
3968
+ (vsx_xxsel<mode>_uns): Likewise.
3969
+ (vsx_copysign<mode>3): Likewise.
3970
+ (vsx_float<VSi><mode>2): Likewise.
3971
+ (vsx_floatuns<VSi><mode>2): Likewise.
3972
+ (vsx_fix_trunc<mode><VSi>2): Likewise.
3973
+ (vsx_fixuns_trunc<mode><VSi>2): Likewise.
3974
+ (vsx_x<VSv>r<VSs>i): Likewise.
3975
+ (vsx_x<VSv>r<VSs>ic): Likewise.
3976
+ (vsx_btrunc<mode>2): Likewise.
3977
+ (vsx_b2trunc<mode>2): Likewise.
3978
+ (vsx_floor<mode>2): Likewise.
3979
+ (vsx_ceil<mode>2): Likewise.
3980
+ (vsx_<VS_spdp_insn>): Likewise.
3981
+ (vsx_xscvspdp): Likewise.
3982
+ (vsx_xvcvspuxds): Likewise.
3983
+ (vsx_float_fix_<mode>2): Likewise.
3984
+ (vsx_set_<mode>): Likewise.
3985
+ (vsx_extract_<mode>_internal1): Likewise.
3986
+ (vsx_extract_<mode>_internal2): Likewise.
3987
+ (vsx_extract_<mode>_load): Likewise.
3988
+ (vsx_extract_<mode>_store): Likewise.
3989
+ (vsx_splat_<mode>): Likewise.
3990
+ (vsx_xxspltw_<mode>): Likewise.
3991
+ (vsx_xxspltw_<mode>_direct): Likewise.
3992
+ (vsx_xxmrghw_<mode>): Likewise.
3993
+ (vsx_xxmrglw_<mode>): Likewise.
3994
+ (vsx_xxsldwi_<mode>): Likewise.
3995
+ (vsx_xscvdpspn): Tighten constraints to only use register classes
3997
+ (vsx_xscvspdpn): Likewise.
3998
+ (vsx_xscvdpspn_scalar): Likewise.
4000
+ * config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wh, wi,
4001
+ wj, and wk constraints.
4002
+ (GPR_REG_CLASS_P): New helper macro for register classes targeting
4003
+ general purpose registers.
4005
+ * config/rs6000/rs6000.md (f32_dm): Use wh constraint for SDmode
4007
+ (zero_extendsidi2_lfiwz): Use wj constraint for direct move of
4008
+ DImode instead of wm. Use wk constraint for direct move of DFmode
4010
+ (extendsidi2_lfiwax): Likewise.
4011
+ (lfiwax): Likewise.
4012
+ (lfiwzx): Likewise.
4013
+ (movdi_internal64): Likewise.
4015
+ * doc/md.texi (PowerPC and IBM RS6000): Document wh, wi, wj, and
4016
+ wk constraints. Make the wy constraint documentation match them
4019
+2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
4021
+ Backport from mainline
4022
+ 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4024
+ PR tree-optimization/61375
4025
+ * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
4026
+ symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
4027
+ (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.
4029
+2014-08-01 Richard Biener <rguenther@suse.de>
4031
+ PR tree-optimization/61964
4032
+ * tree-ssa-tail-merge.c (gimple_operand_equal_value_p): New
4033
+ function merged from trunk.
4034
+ (gimple_equal_p): Handle non-SSA LHS solely by structural
4037
+2014-07-25 Uros Bizjak <ubizjak@gmail.com>
4039
+ * config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
4041
+2014-07-24 Kyle McMartin <kyle@redhat.com>
4043
+ * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
4045
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4047
+ * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
4049
+ * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
4050
+ function. Issue -Wpsabi warning if future GCC releases will use
4051
+ different field alignment rules for this type.
4052
+ * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
4053
+ * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
4054
+ * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
4056
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4058
+ * config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
4059
+ -Wpsabi note when encountering a type where future GCC releases
4060
+ will apply different alignment requirements.
4062
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4064
+ * config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
4065
+ does not fit fully into floating-point registers, and there is still
4066
+ space in the register parameter area, issue -Wpsabi note that the ABI
4067
+ will change in a future GCC release.
4069
+2014-07-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
4071
+ * config/arm/t-rtems-eabi: Add
4072
+ mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard,
4073
+ mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard,
4074
+ mbig-endian/mthumb/march=armv7-r, and
4075
+ mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
4078
+2014-07-21 Peter Bergner <bergner@vnet.ibm.com>
4080
+ * config/rs6000/sysv4.h (LIBASAN_EARLY_SPEC): Define.
4081
+ (LIBTSAN_EARLY_SPEC): Likewise.
4082
+ (STATIC_LIBASAN_LIBS): Likewise.
4083
+ (STATIC_LIBTSAN_LIBS): Likewise.
4085
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
4087
+ * toplev.c (output_stack_usage): Adjust the location of the warning.
4089
+2014-07-19 Daniel Cederman <cederman@gaisler.com>
4091
+ * config/sparc/sync.md (*membar_storeload_leon3): New insn.
4092
+ (*membar_storeload): Disable for LEON3.
4094
+2014-07-17 Richard Biener <rguenther@suse.de>
4096
+ PR rtl-optimization/61801
4097
+ * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
4098
+ ASM_INPUT don't set reg_pending_barrier if it appears in a
4101
+2014-07-16 Jakub Jelinek <jakub@redhat.com>
4103
+ * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
4104
+ on the FUNCTION_DECL.
4106
+2014-07-10 Tom G. Christensen <tgc@jupiterrise.com>
4108
+ * doc/install.texi: Remove links to defunct package providers for
4111
+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
4113
+ PR middle-end/53590
4114
+ * function.c (allocate_struct_function): Revert r188667 change.
4116
+2014-07-04 Jakub Jelinek <jakub@redhat.com>
4118
+ PR tree-optimization/61684
4119
+ * tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
4120
+ rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
4122
+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
4124
+ Backport from Mainline
4125
+ 2014-06-20 Jakub Jelinek <jakub@redhat.com>
4126
+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
4128
+ PR tree-optimization/61306
4129
+ * tree-ssa-math-opts.c (struct symbolic_number): Store type of
4130
+ expression instead of its size.
4131
+ (do_shift_rotate): Adapt to change in struct symbolic_number. Return
4132
+ false to prevent optimization when the result is unpredictable due to
4133
+ arithmetic right shift of signed type with highest byte is set.
4134
+ (verify_symbolic_number_p): Adapt to change in struct symbolic_number.
4135
+ (find_bswap_1): Likewise. Return NULL to prevent optimization when the
4136
+ result is unpredictable due to sign extension.
4137
+ (find_bswap): Adapt to change in struct symbolic_number.
4139
+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
4141
+ Backport from mainline
4142
+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
4145
+ * config/alpha/alpha.c (alpha_handle_trap_shadows): Handle BARRIER RTX.
4147
+2014-06-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
4150
+ * config/rs6000/vsx.md (vsx_extract_v4sf): Fix bug with element
4151
+ extraction other than index 3.
4153
+2014-06-24 Jakub Jelinek <jakub@redhat.com>
4156
+ * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
4157
+ model family 6 CPU with has_longmode never use a CPU without
4160
+2014-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4162
+ Backport from mainline
4164
+ 2014-06-20 Julian Brown <julian@codesourcery.com>
4165
+ Chung-Lin Tang <cltang@codesourcery.com>
4167
+ * config/arm/arm.c (arm_output_mi_thunk): Fix offset for
4168
+ TARGET_THUMB1_ONLY. Add comments.
4170
+2014-06-18 Uros Bizjak <ubizjak@gmail.com>
4172
+ Backport from mainline
4173
+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
4176
+ * config/i386/i386.md (*floatunssi<mode>2_i387_with_xmm): New
4177
+ define_insn_and_split pattern, merged from *floatunssi<mode>2_1
4178
+ and corresponding splitters. Zero extend general register
4179
+ or memory input operand to XMM temporary. Enable for
4180
+ TARGET_SSE2 and TARGET_INTER_UNIT_MOVES_TO_VEC only.
4181
+ (floatunssi<mode>2): Update expander predicate.
4183
+2014-06-18 Richard Henderson <rth@redhat.com>
4186
+ * config/aarch64/aarch64.md (tlsdesc_small): Clobber CC_REGNUM.
4188
+2014-06-17 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
4190
+ Revert on gcc-4_8-branch.
4191
+ * config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
4192
+ * config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
4194
+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
4196
+ Backport from mainline
4199
+ * config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
4200
+ variable 'size'; calculate 'size' right in the front; use
4201
+ 'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
4202
+ pcum->aapcs_stack_words.
4204
+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
4206
+ Backport from mainline
4208
+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
4210
+ * config/rs6000/rs6000-builtin.def (BU_MISC_1): Delete.
4211
+ (BU_MISC_2): Rename to ...
4212
+ (BU_LDBL128_2): ... this.
4213
+ * config/rs6000/rs6000.h (RS6000_BTM_LDBL128): New define.
4214
+ (RS6000_BTM_COMMON): Add RS6000_BTM_LDBL128.
4215
+ * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Handle
4216
+ RS6000_BTM_LDBL128.
4217
+ (rs6000_invalid_builtin): Add long double 128-bit builtin support.
4218
+ (rs6000_builtin_mask_names): Add RS6000_BTM_LDBL128.
4219
+ * config/rs6000/rs6000.md (unpacktf_0): Remove define)expand.
4220
+ (unpacktf_1): Likewise.
4221
+ * doc/extend.texi (__builtin_longdouble_dw0): Remove documentation.
4222
+ (__builtin_longdouble_dw1): Likewise.
4223
+ * doc/sourcebuild.texi (longdouble128): Document.
4225
+2014-06-13 Jason Merrill <jason@redhat.com>
4228
+ * common.opt (-fno-gnu-unique): Add.
4229
+ * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
4231
+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
4233
+ Backport from 2014-05-09 trunk r210272
4235
+ * config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
4236
+ unsigned int initializers for regno_in, regno_out.
4238
+ Backport from 2014-05-14 trunk r210418
4239
+ * config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
4240
+ shifted values to avoid build warning.
4242
+ Backport from 2014-06-12 trunk r211491
4245
+ * config/avr/avr.md (push<mode>1): Avoid (subreg(mem)) when
4246
+ loading from address spaces.
4248
+2014-06-12 Alan Modra <amodra@gmail.com>
4251
+ * doc/tm.texi.in (INCOMING_REG_PARM_STACK_SPACE): Document.
4252
+ * doc/tm.texi: Regenerate.
4253
+ * function.c (INCOMING_REG_PARM_STACK_SPACE): Provide default.
4254
+ Use throughout in place of REG_PARM_STACK_SPACE.
4255
+ * config/rs6000/rs6000.c (rs6000_reg_parm_stack_space): Add
4256
+ "incoming" param. Pass to rs6000_function_parms_need_stack.
4257
+ (rs6000_function_parms_need_stack): Add "incoming" param, ignore
4258
+ prototype_p when incoming. Use function decl when incoming
4259
+ to handle K&R style functions.
4260
+ * config/rs6000/rs6000.h (REG_PARM_STACK_SPACE): Adjust.
4261
+ (INCOMING_REG_PARM_STACK_SPACE): Define.
4263
+2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
4265
+ Back port from trunk
4266
+ 2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
4269
+ * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
4270
+ iterators, VSX_D that handles 64-bit types, and VSX_LE that
4271
+ handles swapping the two 64-bit double words on little endian
4272
+ systems. Include V1TImode and optionally TImode in VSX_LE so that
4273
+ these types are properly swapped. Change all of the insns and
4274
+ splits that do the 64-bit swaps to use VSX_LE.
4275
+ (vsx_le_perm_load_<mode>): Likewise.
4276
+ (vsx_le_perm_store_<mode>): Likewise.
4277
+ (splitters for little endian memory operations): Likewise.
4278
+ (vsx_xxpermdi2_le_<mode>): Likewise.
4279
+ (vsx_lxvd2x2_le_<mode>): Likewise.
4280
+ (vsx_stxvd2x2_le_<mode>): Likewise.
4282
+2014-06-05 Martin Jambor <mjambor@suse.cz>
4285
+ * ipa-cp.c (determine_versionability): Pretend that tm_clones are
4288
+2014-06-04 Richard Biener <rguenther@suse.de>
4290
+ PR tree-optimization/61383
4291
+ * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure
4294
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
4296
+ Backport from mainline
4297
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
4299
+ PR rtl-optimization/60866
4300
+ * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
4301
+ Default it to -1. Pass it down to init_simplejump_data.
4302
+ (init_simplejump_data): New parameter old_seqno. Pass it down
4303
+ to get_seqno_for_a_jump.
4304
+ (get_seqno_for_a_jump): New parameter old_seqno. Use it for
4305
+ initializing new jump seqno as a last resort. Add comment.
4306
+ (sel_redirect_edge_and_branch): Save old seqno of the conditional
4307
+ jump and pass it down to sel_init_new_insn.
4308
+ (sel_redirect_edge_and_branch_force): Likewise.
4310
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
4312
+ Backport from mainline
4313
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
4315
+ PR rtl-optimization/60901
4316
+ * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
4317
+ bb predecessor belongs to the same scheduling region. Adjust comment.
4319
+2014-06-03 Uros Bizjak <ubizjak@gmail.com>
4321
+ Backport from mainline
4322
+ 2014-06-02 Uros Bizjak <ubizjak@gmail.com>
4325
+ * config/i386/i386.c (ix86_expand_vec_perm) [case V32QImode]: Use
4326
+ GEN_INT (-128) instead of GEN_INT (128) to set MSB of QImode constant.
4328
+2014-05-28 Guozhi Wei <carrot@google.com>
4331
+ * config/aarch64/arm_neon.h (vqdmulh_n_s16): Change the last operand's
4333
+ (vqdmulhq_n_s16): Likewise.
4335
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
4337
+ Backport from mainline
4338
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
4340
+ * double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
4341
+ predicate to detect a negative quotient.
4343
+2014-05-28 Georg-Johann Lay <avr@gjlay.de>
4346
+ * doc/extend.texi (Local Labels): Note that label differences are
4347
+ not supported for AVR.
4349
+2014-05-26 Michael Tautschnig <mt@debian.org>
4352
+ * doc/extend.texi (X86 Built-in Functions): Fix parameter lists of
4353
+ __builtin_ia32_vfrczs[sd] and __builtin_ia32_mpsadbw256.
4355
+2014-05-23 Alan Modra <amodra@gmail.com>
4358
+ * config/rs6000/rs6000.c (mem_operand_gpr): Handle SImode.
4359
+ * config/rs6000/rs6000.md (extendsidi2_lfiwax, extendsidi2_nocell):
4360
+ Use "Y" constraint rather than "m".
4362
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
4364
+ Backport from mainline
4365
+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
4367
+ * config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
4369
+2014-05-22 Richard Earnshaw <rearnsha@arm.com>
4372
+ * arm.md (arm_cmpdi_unsigned): Fix length calculation for Thumb2.
4374
2014-05-22 Release Manager
4376
* GCC 4.8.3 released.
4377
Index: gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
4378
===================================================================
4379
--- a/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c (.../tags/gcc_4_8_3_release)
4380
+++ b/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c (.../branches/gcc-4_8-branch)
4382
+/* Test for deprecation messages on use of lvsl and lvsr for little endian. */
4384
+/* { dg-do compile { target { powerpc64le-*-* } } } */
4385
+/* { dg-options "-O0 -Wdeprecated" } */
4387
+#include <altivec.h>
4393
+ vector unsigned char a = vec_lvsl (4, f); /* { dg-warning "vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores" } */
4394
+ vector unsigned char b = vec_lvsr (8, f); /* { dg-warning "vec_lvsr is deprecated for little endian; use assignment for unaligned loads and stores" } */
4396
Index: gcc/testsuite/gcc.target/powerpc/pr63335.c
4397
===================================================================
4398
--- a/src/gcc/testsuite/gcc.target/powerpc/pr63335.c (.../tags/gcc_4_8_3_release)
4399
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr63335.c (.../branches/gcc-4_8-branch)
4401
+/* { dg-do run { target { powerpc64*-*-* } } } */
4402
+/* { dg-require-effective-target powerpc_vsx_ok } */
4403
+/* { dg-options "-mvsx" } */
4405
+#include <altivec.h>
4409
+vector double vec = (vector double) {99.0, 99.0};
4413
+ int actual = vec_all_nge(vec, vec);
4417
+ actual = vec_all_nle(vec, vec);
4421
+ actual = vec_any_nge(vec, vec);
4425
+ actual = vec_any_nle(vec, vec);
4431
Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
4432
===================================================================
4433
--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c (.../tags/gcc_4_8_3_release)
4434
+++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c (.../branches/gcc-4_8-branch)
4436
/* { dg-do compile { target { powerpc*-*-* } } } */
4437
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
4438
/* { dg-require-effective-target powerpc_vsx_ok } */
4439
-/* { dg-options "-O3 -mcpu=power7" } */
4440
+/* { dg-options "-O3 -mcpu=power7 -Wno-deprecated" } */
4442
/* Test the various load/store varients. */
4444
Index: gcc/testsuite/gcc.target/powerpc/builtins-1.c
4445
===================================================================
4446
--- a/src/gcc/testsuite/gcc.target/powerpc/builtins-1.c (.../tags/gcc_4_8_3_release)
4447
+++ b/src/gcc/testsuite/gcc.target/powerpc/builtins-1.c (.../branches/gcc-4_8-branch)
4449
+/* { dg-do compile { target { powerpc64le-*-* } } } */
4450
+/* { dg-options "-mcpu=power8 -O0" } */
4452
+/* Test that a number of newly added builtin overloads are accepted
4453
+ by the compiler. */
4455
+#include <altivec.h>
4457
+vector double y = { 2.0, 4.0 };
4462
+ vector float fa = {1.0, 2.0, 3.0, -4.0};
4463
+ vector float fb = {-2.0, -3.0, -4.0, -5.0};
4464
+ vector float fc = vec_cpsgn (fa, fb);
4466
+ vector long long la = {5L, 14L};
4467
+ vector long long lb = {3L, 86L};
4468
+ vector long long lc = vec_and (la, lb);
4469
+ vector bool long long ld = {0, -1};
4470
+ vector long long le = vec_and (la, ld);
4471
+ vector long long lf = vec_and (ld, lb);
4473
+ vector unsigned long long ua = {5L, 14L};
4474
+ vector unsigned long long ub = {3L, 86L};
4475
+ vector unsigned long long uc = vec_and (ua, ub);
4476
+ vector bool long long ud = {0, -1};
4477
+ vector unsigned long long ue = vec_and (ua, ud);
4478
+ vector unsigned long long uf = vec_and (ud, ub);
4480
+ vector long long lg = vec_andc (la, lb);
4481
+ vector long long lh = vec_andc (la, ld);
4482
+ vector long long li = vec_andc (ld, lb);
4484
+ vector unsigned long long ug = vec_andc (ua, ub);
4485
+ vector unsigned long long uh = vec_andc (ua, ud);
4486
+ vector unsigned long long ui = vec_andc (ud, ub);
4488
+ vector double da = {1.0, -4.0};
4489
+ vector double db = {-2.0, 5.0};
4490
+ vector double dc = vec_cpsgn (da, db);
4492
+ vector long long lj = vec_mergeh (la, lb);
4493
+ vector long long lk = vec_mergeh (la, ld);
4494
+ vector long long ll = vec_mergeh (ld, la);
4496
+ vector unsigned long long uj = vec_mergeh (ua, ub);
4497
+ vector unsigned long long uk = vec_mergeh (ua, ud);
4498
+ vector unsigned long long ul = vec_mergeh (ud, ua);
4500
+ vector long long lm = vec_mergel (la, lb);
4501
+ vector long long ln = vec_mergel (la, ld);
4502
+ vector long long lo = vec_mergel (ld, la);
4504
+ vector unsigned long long um = vec_mergel (ua, ub);
4505
+ vector unsigned long long un = vec_mergel (ua, ud);
4506
+ vector unsigned long long uo = vec_mergel (ud, ua);
4508
+ vector long long lp = vec_nor (la, lb);
4509
+ vector long long lq = vec_nor (la, ld);
4510
+ vector long long lr = vec_nor (ld, la);
4512
+ vector unsigned long long up = vec_nor (ua, ub);
4513
+ vector unsigned long long uq = vec_nor (ua, ud);
4514
+ vector unsigned long long ur = vec_nor (ud, ua);
4516
+ vector long long ls = vec_or (la, lb);
4517
+ vector long long lt = vec_or (la, ld);
4518
+ vector long long lu = vec_or (ld, la);
4520
+ vector unsigned long long us = vec_or (ua, ub);
4521
+ vector unsigned long long ut = vec_or (ua, ud);
4522
+ vector unsigned long long uu = vec_or (ud, ua);
4524
+ vector unsigned char ca = {0,4,8,1,5,9,2,6,10,3,7,11,15,12,14,13};
4525
+ vector long long lv = vec_perm (la, lb, ca);
4526
+ vector unsigned long long uv = vec_perm (ua, ub, ca);
4528
+ vector long long lw = vec_sel (la, lb, lc);
4529
+ vector long long lx = vec_sel (la, lb, uc);
4530
+ vector long long ly = vec_sel (la, lb, ld);
4532
+ vector unsigned long long uw = vec_sel (ua, ub, lc);
4533
+ vector unsigned long long ux = vec_sel (ua, ub, uc);
4534
+ vector unsigned long long uy = vec_sel (ua, ub, ld);
4536
+ vector long long lz = vec_xor (la, lb);
4537
+ vector long long l0 = vec_xor (la, ld);
4538
+ vector long long l1 = vec_xor (ld, la);
4540
+ vector unsigned long long uz = vec_xor (ua, ub);
4541
+ vector unsigned long long u0 = vec_xor (ua, ud);
4542
+ vector unsigned long long u1 = vec_xor (ud, ua);
4544
+ int ia = vec_all_eq (ua, ub);
4545
+ int ib = vec_all_ge (ua, ub);
4546
+ int ic = vec_all_gt (ua, ub);
4547
+ int id = vec_all_le (ua, ub);
4548
+ int ie = vec_all_lt (ua, ub);
4549
+ int ig = vec_all_ne (ua, ub);
4551
+ int ih = vec_any_eq (ua, ub);
4552
+ int ii = vec_any_ge (ua, ub);
4553
+ int ij = vec_any_gt (ua, ub);
4554
+ int ik = vec_any_le (ua, ub);
4555
+ int il = vec_any_lt (ua, ub);
4556
+ int im = vec_any_ne (ua, ub);
4558
+ vector int sia = {9, 16, 25, 36};
4559
+ vector int sib = {-8, -27, -64, -125};
4560
+ vector int sic = vec_mergee (sia, sib);
4561
+ vector int sid = vec_mergeo (sia, sib);
4563
+ vector unsigned int uia = {9, 16, 25, 36};
4564
+ vector unsigned int uib = {8, 27, 64, 125};
4565
+ vector unsigned int uic = vec_mergee (uia, uib);
4566
+ vector unsigned int uid = vec_mergeo (uia, uib);
4568
+ vector bool int bia = {0, -1, -1, 0};
4569
+ vector bool int bib = {-1, -1, 0, -1};
4570
+ vector bool int bic = vec_mergee (bia, bib);
4571
+ vector bool int bid = vec_mergeo (bia, bib);
4573
+ vector unsigned int uie = vec_packsu (ua, ub);
4575
+ vector long long l2 = vec_cntlz (la);
4576
+ vector unsigned long long u2 = vec_cntlz (ua);
4577
+ vector int sie = vec_cntlz (sia);
4578
+ vector unsigned int uif = vec_cntlz (uia);
4579
+ vector short ssa = {20, -40, -60, 80, 100, -120, -140, 160};
4580
+ vector short ssb = vec_cntlz (ssa);
4581
+ vector unsigned short usa = {81, 72, 63, 54, 45, 36, 27, 18};
4582
+ vector unsigned short usb = vec_cntlz (usa);
4583
+ vector signed char sca = {-4, 3, -9, 15, -31, 31, 0, 0,
4584
+ 1, 117, -36, 99, 98, 97, 96, 95};
4585
+ vector signed char scb = vec_cntlz (sca);
4586
+ vector unsigned char cb = vec_cntlz (ca);
4588
+ vector double dd = vec_xl (0, &y);
4589
+ vec_xst (dd, 0, &z);
4591
+ vector double de = vec_round (dd);
4593
+ vector double df = vec_splat (de, 0);
4594
+ vector double dg = vec_splat (de, 1);
4595
+ vector long long l3 = vec_splat (l2, 0);
4596
+ vector long long l4 = vec_splat (l2, 1);
4597
+ vector unsigned long long u3 = vec_splat (u2, 0);
4598
+ vector unsigned long long u4 = vec_splat (u2, 1);
4599
+ vector bool long long l5 = vec_splat (ld, 0);
4600
+ vector bool long long l6 = vec_splat (ld, 1);
4602
+ vector long long l7 = vec_div (l3, l4);
4603
+ vector unsigned long long u5 = vec_div (u3, u4);
4605
+ vector long long l8 = vec_mul (l3, l4);
4606
+ vector unsigned long long u6 = vec_mul (u3, u4);
4608
+ vector double dh = vec_ctf (la, -2);
4609
+ vector double di = vec_ctf (ua, 2);
4610
+ vector long long l9 = vec_cts (dh, -2);
4611
+ vector unsigned long long u7 = vec_ctu (di, 2);
4615
Index: gcc/testsuite/gcc.target/powerpc/tfmode_off.c
4616
===================================================================
4617
--- a/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../tags/gcc_4_8_3_release)
4618
+++ b/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../branches/gcc-4_8-branch)
4620
/* { dg-do assemble } */
4621
/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
4622
/* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */
4623
+/* { dg-require-effective-target longdouble128 } */
4624
/* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
4626
typedef float TFmode __attribute__ ((mode (TF)));
4627
Index: gcc/testsuite/gcc.target/powerpc/pack02.c
4628
===================================================================
4629
--- a/src/gcc/testsuite/gcc.target/powerpc/pack02.c (.../tags/gcc_4_8_3_release)
4630
+++ b/src/gcc/testsuite/gcc.target/powerpc/pack02.c (.../branches/gcc-4_8-branch)
4632
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
4633
/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
4634
/* { dg-require-effective-target powerpc_fprs } */
4635
+/* { dg-require-effective-target longdouble128 } */
4636
/* { dg-options "-O2 -mhard-float" } */
4639
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c
4640
===================================================================
4641
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c (.../tags/gcc_4_8_3_release)
4642
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c (.../branches/gcc-4_8-branch)
4644
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
4645
+/* { dg-options "-mabi=elfv2" } */
4652
+void test (struct f8 a, struct f8 b) /* { dg-message "note: the ABI of passing homogeneous float aggregates will change" } */
4656
Index: gcc/testsuite/gcc.target/powerpc/htm-ttest.c
4657
===================================================================
4658
--- a/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../tags/gcc_4_8_3_release)
4659
+++ b/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../branches/gcc-4_8-branch)
4661
+/* { dg-do compile { target { powerpc*-*-* } } } */
4662
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
4663
+/* { dg-require-effective-target powerpc_htm_ok } */
4664
+/* { dg-options "-O2 -mhtm" } */
4666
+/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
4667
+/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
4669
+#include <htmintrin.h>
4673
+ return _HTM_STATE(__builtin_ttest());
4675
Index: gcc/testsuite/gcc.target/powerpc/builtins-2.c
4676
===================================================================
4677
--- a/src/gcc/testsuite/gcc.target/powerpc/builtins-2.c (.../tags/gcc_4_8_3_release)
4678
+++ b/src/gcc/testsuite/gcc.target/powerpc/builtins-2.c (.../branches/gcc-4_8-branch)
4680
+/* { dg-do run { target { powerpc64le-*-* } } } */
4681
+/* { dg-options "-mcpu=power8 " } */
4683
+#include <altivec.h>
4689
+ vector long long sa = {27L, -14L};
4690
+ vector long long sb = {-9L, -2L};
4692
+ vector unsigned long long ua = {27L, 14L};
4693
+ vector unsigned long long ub = {9L, 2L};
4695
+ vector long long sc = vec_div (sa, sb);
4696
+ vector unsigned long long uc = vec_div (ua, ub);
4698
+ if (sc[0] != -3L || sc[1] != 7L || uc[0] != 3L || uc[1] != 7L)
4701
+ vector long long sd = vec_mul (sa, sb);
4702
+ vector unsigned long long ud = vec_mul (ua, ub);
4704
+ if (sd[0] != -243L || sd[1] != 28L || ud[0] != 243L || ud[1] != 28L)
4707
+ vector long long se = vec_splat (sa, 0);
4708
+ vector long long sf = vec_splat (sa, 1);
4709
+ vector unsigned long long ue = vec_splat (ua, 0);
4710
+ vector unsigned long long uf = vec_splat (ua, 1);
4712
+ if (se[0] != 27L || se[1] != 27L || sf[0] != -14L || sf[1] != -14L
4713
+ || ue[0] != 27L || ue[1] != 27L || uf[0] != 14L || uf[1] != 14L)
4716
+ vector double da = vec_ctf (sa, -2);
4717
+ vector double db = vec_ctf (ua, 2);
4718
+ vector long long sg = vec_cts (da, -2);
4719
+ vector unsigned long long ug = vec_ctu (db, 2);
4721
+ if (da[0] != 108.0 || da[1] != -56.0 || db[0] != 6.75 || db[1] != 3.5
4722
+ || sg[0] != 27L || sg[1] != -14L || ug[0] != 27L || ug[1] != 14L)
4727
Index: gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
4728
===================================================================
4729
--- a/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c (.../tags/gcc_4_8_3_release)
4730
+++ b/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c (.../branches/gcc-4_8-branch)
4732
+/* Test expected code generation for lvsl and lvsr on little endian.
4733
+ Note that lvsl and lvsr are each produced once, but the filename
4734
+ causes them to appear twice in the file. */
4736
+/* { dg-do compile { target { powerpc64le-*-* } } } */
4737
+/* { dg-options "-O0 -Wno-deprecated" } */
4738
+/* { dg-final { scan-assembler-times "lvsl" 2 } } */
4739
+/* { dg-final { scan-assembler-times "lvsr" 2 } } */
4740
+/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
4741
+/* { dg-final { scan-assembler-times "vperm" 2 } } */
4744
+#include <altivec.h>
4750
+ vector unsigned char a = vec_lvsl (4, f);
4751
+ vector unsigned char b = vec_lvsr (8, f);
4753
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
4754
===================================================================
4755
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c (.../tags/gcc_4_8_3_release)
4756
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c (.../branches/gcc-4_8-branch)
4758
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
4759
+/* { dg-options "-mno-compat-align-parm" } */
4763
+ long a __attribute__((aligned (16)));
4766
+void test (struct test a) /* { dg-message "note: the ABI of passing aggregates with 16-byte alignment will change" } */
4770
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
4771
===================================================================
4772
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../tags/gcc_4_8_3_release)
4773
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../branches/gcc-4_8-branch)
4775
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
4776
+/* { dg-require-effective-target powerpc_altivec_ok } */
4777
+/* { dg-options "-maltivec" } */
4781
+ int a __attribute__((vector_size (8)));
4782
+ }; /* { dg-message "note: the layout of aggregates containing vectors with 8-byte alignment will change" } */
4784
Index: gcc/testsuite/gcc.target/powerpc/altivec-6.c
4785
===================================================================
4786
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c (.../tags/gcc_4_8_3_release)
4787
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c (.../branches/gcc-4_8-branch)
4789
/* { dg-do compile { target powerpc*-*-* } } */
4790
/* { dg-require-effective-target powerpc_altivec_ok } */
4791
-/* { dg-options "-maltivec -O0 -Wall" } */
4792
+/* { dg-options "-maltivec -O0 -Wall -Wno-deprecated" } */
4794
#include <altivec.h>
4796
Index: gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
4797
===================================================================
4798
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c (.../tags/gcc_4_8_3_release)
4799
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c (.../branches/gcc-4_8-branch)
4801
/* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
4802
/* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
4803
/* { dg-require-effective-target powerpc_altivec_ok } */
4804
-/* { dg-options "-maltivec -O2" } */
4805
+/* { dg-options "-maltivec -O2 -Wno-deprecated" } */
4807
#include <altivec.h>
4809
Index: gcc/testsuite/gcc.target/powerpc/altivec-20.c
4810
===================================================================
4811
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../tags/gcc_4_8_3_release)
4812
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../branches/gcc-4_8-branch)
4814
/* { dg-do compile { target powerpc_altivec_ok } } */
4815
-/* { dg-options "-maltivec -mcpu=G5 -O2" } */
4816
+/* { dg-options "-maltivec -mcpu=G5 -O2 -Wno-deprecated" } */
4818
#include <altivec.h>
4820
Index: gcc/testsuite/gcc.target/alpha/pr61586.c
4821
===================================================================
4822
--- a/src/gcc/testsuite/gcc.target/alpha/pr61586.c (.../tags/gcc_4_8_3_release)
4823
+++ b/src/gcc/testsuite/gcc.target/alpha/pr61586.c (.../branches/gcc-4_8-branch)
4825
+/* { dg-do compile } */
4826
+/* { dg-options "-O2 -mieee" } */
4828
+void foo (int *dimensions, double **params, int hh)
4832
+ else if (dimensions[hh] > 0)
4833
+ params[hh][0] = 1.0f;
4835
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
4836
===================================================================
4837
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../tags/gcc_4_8_3_release)
4838
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../branches/gcc-4_8-branch)
4840
+/* Test AAPCS64 layout and __builtin_va_start.
4842
+ Pass named HFA/HVA argument on stack. */
4844
+/* { dg-do run { target aarch64*-*-* } } */
4846
+#ifndef IN_FRAMEWORK
4847
+#define AAPCS64_TEST_STDARG
4848
+#define TESTFILE "va_arg-14.c"
4849
+#include "type-def.h"
4851
+struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f};
4852
+struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f};
4853
+vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f};
4854
+vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f};
4856
+#include "abitest.h"
4858
+ ARG (float, 1.0f, S0, 0)
4859
+ ARG (float, 2.0f, S1, 1)
4860
+ ARG (float, 3.0f, S2, 2)
4861
+ ARG (float, 4.0f, S3, 3)
4862
+ ARG (float, 5.0f, S4, 4)
4863
+ ARG (float, 6.0f, S5, 5)
4864
+ ARG (float, 7.0f, S6, 6)
4865
+ ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7)
4866
+ /* Previous argument size has been rounded up to the nearest multiple of
4868
+ ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8)
4869
+ /* NSAA is rounded up to the nearest natural alignment of float32x4. */
4870
+ ARG (vf4_t, float32x4, STACK + 32, 9)
4871
+ ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID)
4873
+ LAST_ANON (double, 123456789.987, STACK + 64, 11)
4875
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
4876
===================================================================
4877
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../tags/gcc_4_8_3_release)
4878
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../branches/gcc-4_8-branch)
4893
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
4894
===================================================================
4895
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../tags/gcc_4_8_3_release)
4896
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../branches/gcc-4_8-branch)
4898
+/* Test AAPCS64 layout and __builtin_va_start.
4900
+ Pass named HFA/HVA argument on stack. */
4902
+/* { dg-do run { target aarch64*-*-* } } */
4904
+#ifndef IN_FRAMEWORK
4905
+#define AAPCS64_TEST_STDARG
4906
+#define TESTFILE "va_arg-13.c"
4908
+struct float_float_t
4920
+#define HAS_DATA_INIT_FUNC
4924
+ float_float.a = 1.2f;
4925
+ float_float.b = 2.2f;
4927
+ float_int.b8 = 4983.80f;
4930
+#include "abitest.h"
4932
+ ARG (float, 1.0f, S0, 0)
4933
+ ARG (float, 2.0f, S1, 1)
4934
+ ARG (float, 3.0f, S2, 2)
4935
+ ARG (float, 4.0f, S3, 3)
4936
+ ARG (float, 5.0f, S4, 4)
4937
+ ARG (float, 6.0f, S5, 5)
4938
+ ARG (float, 7.0f, S6, 6)
4939
+ ARG (struct float_float_t, float_float, STACK, 7)
4940
+ ARG (int, 9, W0, 8)
4941
+ ARG (int, 10, W1, 9)
4942
+ ARG (int, 11, W2, 10)
4943
+ ARG (int, 12, W3, 11)
4944
+ ARG (int, 13, W4, 12)
4945
+ ARG (int, 14, W5, 13)
4946
+ ARG (int, 15, W6, LAST_NAMED_ARG_ID)
4948
+ /* Note on the reason of using 'X7' instead of 'W7' here:
4949
+ Using 'X7' makes sure the test works in the big-endian mode.
4950
+ According to PCS rules B.4 and C.10, the size of float_int is rounded
4951
+ to 8 bytes and prepared in the register X7 as if loaded via LDR from
4952
+ the memory, with the content of the other 4 bytes unspecified. The
4953
+ test framework will only compare the 4 relavent bytes. */
4954
+ ANON (union float_int_t, float_int, X7, 15)
4955
+ LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
4957
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
4958
===================================================================
4959
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../tags/gcc_4_8_3_release)
4960
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../branches/gcc-4_8-branch)
4962
+/* Test AAPCS64 layout and __builtin_va_start.
4964
+ Pass named __128int argument on stack. */
4966
+/* { dg-do run { target aarch64*-*-* } } */
4968
+#ifndef IN_FRAMEWORK
4969
+#define AAPCS64_TEST_STDARG
4970
+#define TESTFILE "va_arg-15.c"
4971
+#include "type-def.h"
4973
+union int128_t qword;
4975
+#define HAS_DATA_INIT_FUNC
4979
+ /* Init signed quad-word integer. */
4980
+ qword.l64 = 0xfdb9753102468aceLL;
4981
+ qword.h64 = 0xeca8642013579bdfLL;
4984
+#include "abitest.h"
4986
+ ARG (int, 1, W0, 0)
4987
+ ARG (int, 2, W1, 1)
4988
+ ARG (int, 3, W2, 2)
4989
+ ARG (int, 4, W3, 3)
4990
+ ARG (int, 5, W4, 4)
4991
+ ARG (int, 6, W5, 5)
4992
+ ARG (int, 7, W6, 6)
4993
+ ARG (__int128, qword.i, STACK, LAST_NAMED_ARG_ID)
4995
+#ifndef __AAPCS64_BIG_ENDIAN__
4996
+ LAST_ANON (int, 8, STACK + 16, 8)
4998
+ LAST_ANON (int, 8, STACK + 20, 8)
5001
Index: gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
5002
===================================================================
5003
--- a/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c (.../tags/gcc_4_8_3_release)
5004
+++ b/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c (.../branches/gcc-4_8-branch)
5006
+/* { dg-do assemble } */
5007
+/* { dg-options "-O2 -mfix-cortex-a53-835769" } */
5010
+test (int a, double b, int c, int d, int e)
5013
+ __asm__ __volatile ("// %0, %1"
5016
+ : /* No clobbers */
5020
Index: gcc/testsuite/gcc.target/avr/torture/pr61443.c
5021
===================================================================
5022
--- a/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../tags/gcc_4_8_3_release)
5023
+++ b/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../branches/gcc-4_8-branch)
5025
+/* { dg-do run } */
5026
+/* { dg-options "-std=gnu99" } */
5028
+#include <stdlib.h>
5029
+#include <stdarg.h>
5031
+#define NC __attribute__((noinline,noclone))
5033
+void NC vfun (char n, ...)
5044
+ if (11 != va_arg (ap, int))
5048
+ if (2222 != va_arg (ap, int))
5052
+ if (333333 != va_arg (ap, __int24))
5056
+ if (44444444 != va_arg (ap, long))
5060
+ if (8888888888888888 != va_arg (ap, long long))
5069
+void NC boo_qi (const __flash char *p)
5074
+void NC boox_qi (const __memx char *p)
5079
+void NC boo_hi (const __flash int *p)
5084
+void NC boox_hi (const __memx int *p)
5089
+void NC boo_psi (const __flash __int24 *p)
5094
+void NC boox_psi (const __memx __int24 *p)
5099
+void NC boo_si (const __flash long *p)
5104
+void NC boox_si (const __memx long *p)
5109
+void NC boo_di (const __flash long long *p)
5114
+void NC boox_di (const __memx long long *p)
5119
+const __flash char f_qi = 11;
5120
+const __flash int f_hi = 2222;
5121
+const __flash __int24 f_psi = 333333;
5122
+const __flash long f_si = 44444444;
5123
+const __flash long long f_di = 8888888888888888;
5125
+const __memx char x_qi = 11;
5126
+const __memx int x_hi = 2222;
5127
+const __memx __int24 x_psi = 333333;
5128
+const __memx long x_si = 44444444;
5129
+const __memx long long x_di = 8888888888888888;
5133
+__int24 r_psi = 333333;
5134
+long r_si = 44444444;
5135
+long long r_di = 8888888888888888;
5147
+ boox_psi (&x_psi);
5153
+ boox_psi (&r_psi);
5159
Index: gcc/testsuite/gcc.target/i386/pr61923.c
5160
===================================================================
5161
--- a/src/gcc/testsuite/gcc.target/i386/pr61923.c (.../tags/gcc_4_8_3_release)
5162
+++ b/src/gcc/testsuite/gcc.target/i386/pr61923.c (.../branches/gcc-4_8-branch)
5164
+/* PR debug/61923 */
5165
+/* { dg-do compile } */
5166
+/* { dg-options "-O2 -fcompare-debug" } */
5178
+struct ext4_map_blocks
5184
+int ext4_da_map_blocks_ei_0;
5185
+void fn1 (int p1, struct ext4_map_blocks *p2)
5190
+ ext4_da_map_blocks_ei_0++;
5191
+ arch_spinlock_t *lock;
5192
+ switch (sizeof *&lock->tickets.head)
5194
+ asm("" : "+m"(*&lock->tickets.head) : ""(0));
5198
+ fn2 (p2->m_lblk, p2->m_len);
5200
Index: gcc/testsuite/gcc.target/i386/pr61423.c
5201
===================================================================
5202
--- a/src/gcc/testsuite/gcc.target/i386/pr61423.c (.../tags/gcc_4_8_3_release)
5203
+++ b/src/gcc/testsuite/gcc.target/i386/pr61423.c (.../branches/gcc-4_8-branch)
5205
+/* PR target/61423 */
5206
+/* { dg-do run { target ia32 } } */
5207
+/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
5210
+static unsigned int A[N];
5213
+__attribute__((noinline))
5216
+ unsigned int sum = 0;
5220
+ for (i = 0; i < N; i++)
5233
+ for(i = 0; i < N; i++)
5239
+ __builtin_abort ();
5243
Index: gcc/testsuite/gcc.target/i386/pr60901.c
5244
===================================================================
5245
--- a/src/gcc/testsuite/gcc.target/i386/pr60901.c (.../tags/gcc_4_8_3_release)
5246
+++ b/src/gcc/testsuite/gcc.target/i386/pr60901.c (.../branches/gcc-4_8-branch)
5248
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts" } */
5251
+extern void bar (void);
5252
+extern int baz (int);
5258
+ for (j = 0; j < n; j++)
5260
+ for (i = 1; i < j; i++)
5265
Index: gcc/testsuite/gcc.target/i386/pr61801.c
5266
===================================================================
5267
--- a/src/gcc/testsuite/gcc.target/i386/pr61801.c (.../tags/gcc_4_8_3_release)
5268
+++ b/src/gcc/testsuite/gcc.target/i386/pr61801.c (.../branches/gcc-4_8-branch)
5270
+/* PR rtl-optimization/61801 */
5271
+/* { dg-do compile } */
5272
+/* { dg-options "-Os -fcompare-debug" } */
5286
+ asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
5291
Index: gcc/testsuite/gcc.target/i386/pr61446.c
5292
===================================================================
5293
--- a/src/gcc/testsuite/gcc.target/i386/pr61446.c (.../tags/gcc_4_8_3_release)
5294
+++ b/src/gcc/testsuite/gcc.target/i386/pr61446.c (.../branches/gcc-4_8-branch)
5296
+/* PR rtl-optimization/61446 */
5298
+/* { dg-do compile { target { ia32 } } } */
5299
+/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
5304
+ const double dfa = a;
5305
+ const unsigned int hi = dfa / 0x1p32f;
5306
+ const unsigned int lo = dfa - (double) hi * 0x1p32f;
5308
+ return ((unsigned long long) hi << (4 * (8))) | lo;
5310
Index: gcc/testsuite/gcc.target/i386/pr63947.c
5311
===================================================================
5312
--- a/src/gcc/testsuite/gcc.target/i386/pr63947.c (.../tags/gcc_4_8_3_release)
5313
+++ b/src/gcc/testsuite/gcc.target/i386/pr63947.c (.../branches/gcc-4_8-branch)
5315
+/* PR target/63947 */
5316
+/* { dg-do assemble } */
5317
+/* { dg-options "-Os" } */
5318
+/* { dg-additional-options "-march=i686" { target ia32 } } */
5320
+long double foo (unsigned a, unsigned b)
5324
Index: gcc/testsuite/gcc.target/mips/pr62030-octeon.c
5325
===================================================================
5326
--- a/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c (.../tags/gcc_4_8_3_release)
5327
+++ b/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c (.../branches/gcc-4_8-branch)
5329
+/* { dg-do run } */
5330
+/* { dg-options "-march=octeon" } */
5332
+extern void abort (void);
5336
+ struct node *next;
5337
+ struct node *prev;
5344
+ struct node *first;
5347
+struct head heads[5];
5351
+struct head *head = &heads[2];
5353
+static int __attribute__((noinline))
5356
+ node.prev = (void *)head;
5357
+ head->first = &node;
5359
+ struct node *n = head->first;
5360
+ struct head *h = &heads[k];
5361
+ struct node *next = n->next;
5363
+ if (n->prev == (void *)h)
5366
+ n->prev->next = next;
5368
+ n->next = h->first;
5369
+ return n->next == &node;
5379
Index: gcc/testsuite/gcc.target/sh/pr61996.c
5380
===================================================================
5381
--- a/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../tags/gcc_4_8_3_release)
5382
+++ b/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../branches/gcc-4_8-branch)
5384
+/* Check that the option -musermode has no effect on targets that do not
5385
+ support user/privileged mode and that it does not interfere with option
5386
+ -matomic-model=soft-imask. */
5387
+/* { dg-do compile } */
5388
+/* { dg-options "-matomic-model=soft-imask" } */
5389
+/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1*" "-m2*" } } */
5396
Index: gcc/testsuite/lib/target-supports.exp
5397
===================================================================
5398
--- a/src/gcc/testsuite/lib/target-supports.exp (.../tags/gcc_4_8_3_release)
5399
+++ b/src/gcc/testsuite/lib/target-supports.exp (.../branches/gcc-4_8-branch)
5400
@@ -1790,6 +1790,15 @@
5404
+# Return 1 if the target supports long double of 128 bits,
5407
+proc check_effective_target_longdouble128 { } {
5408
+ return [check_no_compiler_messages longdouble128 object {
5409
+ int dummy[sizeof(long double) == 16 ? 1 : -1];
5413
# Return 1 if the target supports double of 64 bits,
5416
@@ -5329,3 +5338,40 @@
5421
+# Return 1 if <fenv.h> is available with all the standard IEEE
5422
+# exceptions and floating-point exceptions are raised by arithmetic
5423
+# operations. (If the target requires special options for "inexact"
5424
+# exceptions, those need to be specified in the testcases.)
5426
+proc check_effective_target_fenv_exceptions {} {
5427
+ return [check_runtime fenv_exceptions {
5429
+ #include <stdlib.h>
5430
+ #ifndef FE_DIVBYZERO
5431
+ # error Missing FE_DIVBYZERO
5433
+ #ifndef FE_INEXACT
5434
+ # error Missing FE_INEXACT
5436
+ #ifndef FE_INVALID
5437
+ # error Missing FE_INVALID
5439
+ #ifndef FE_OVERFLOW
5440
+ # error Missing FE_OVERFLOW
5442
+ #ifndef FE_UNDERFLOW
5443
+ # error Missing FE_UNDERFLOW
5445
+ volatile float a = 0.0f, r;
5450
+ if (fetestexcept (FE_INVALID))
5457
Index: gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
5458
===================================================================
5459
--- a/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../tags/gcc_4_8_3_release)
5460
+++ b/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../branches/gcc-4_8-branch)
5462
! { dg-require-effective-target fortran_large_real }
5463
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
5464
-! Test XFAILed on these platforms because the system's printf() lacks
5465
+! { dg-do run { xfail powerpc*-apple-darwin* } }
5466
+! Test XFAILed on this platform because the system's printf() lacks
5467
! proper support for denormalized long doubles. See PR24685
5469
! This tests that the default formats for formatted I/O of reals are
5470
Index: gcc/testsuite/gfortran.dg/dot_product_3.f90
5471
===================================================================
5472
--- a/src/gcc/testsuite/gfortran.dg/dot_product_3.f90 (.../tags/gcc_4_8_3_release)
5473
+++ b/src/gcc/testsuite/gfortran.dg/dot_product_3.f90 (.../branches/gcc-4_8-branch)
5475
+! { dg-do compile }
5476
+! { dg-options "-fdump-tree-original" }
5477
+! PR 61999 - this used to ICE.
5478
+! Original test case by A. Kasahara
5480
+ use, intrinsic:: iso_fortran_env, only: output_unit
5484
+ write(output_unit, *) dot_product([1, 2], [2.0, 3.0])
5488
+! { dg-final { scan-tree-dump-times "8\\.0e\\+0" 1 "original" } }
5489
+! { dg-final { cleanup-tree-dump "original" } }
5490
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90
5491
===================================================================
5492
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 (.../tags/gcc_4_8_3_release)
5493
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 (.../branches/gcc-4_8-branch)
5496
+! { dg-do compile }
5497
+! { dg-options "-fopenmp" }
5500
+ integer, parameter :: p(2) = (/ 11, 12 /)
5503
+ !$omp parallel do default(none)
5508
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90
5509
===================================================================
5510
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 (.../tags/gcc_4_8_3_release)
5511
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 (.../branches/gcc-4_8-branch)
5514
+! { dg-do compile }
5515
+! { dg-options "-fopenmp" }
5519
+ integer :: s1, s2, s3
5522
+ type(t), parameter :: u = t(1, 2, 3)
5524
+ !$omp parallel do default(none)
5529
Index: gcc/testsuite/gfortran.dg/cray_pointers_10.f90
5530
===================================================================
5531
--- a/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../tags/gcc_4_8_3_release)
5532
+++ b/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../branches/gcc-4_8-branch)
5535
+! { dg-options "-fcray-pointer" }
5550
+ if (z /= 42) call abort
5552
Index: gcc/testsuite/gfortran.dg/dependency_44.f90
5553
===================================================================
5554
--- a/src/gcc/testsuite/gfortran.dg/dependency_44.f90 (.../tags/gcc_4_8_3_release)
5555
+++ b/src/gcc/testsuite/gfortran.dg/dependency_44.f90 (.../branches/gcc-4_8-branch)
5558
+! Tests fix for PR61780 in which the loop reversal mechanism was
5559
+! not accounting for the first index being an element so that no
5560
+! loop in this dimension is created.
5562
+! Contributed by Manfred Tietze on clf.
5566
+ integer, parameter :: n = 10, k = 3
5568
+ integer, dimension(n,n) :: y
5569
+ integer :: res1(n), res2(n)
5582
+ y(k,4:n) = y(k,3:n-1)
5586
+ y(k,n:4:-1) = y(k,n-1:3:-1)
5591
+ if (any(res1 /= res2)) call abort ()
5593
Index: gcc/testsuite/gfortran.dg/oldstyle_5.f
5594
===================================================================
5595
--- a/src/gcc/testsuite/gfortran.dg/oldstyle_5.f (.../tags/gcc_4_8_3_release)
5596
+++ b/src/gcc/testsuite/gfortran.dg/oldstyle_5.f (.../branches/gcc-4_8-branch)
5598
+C { dg-do compile }
5600
+ INTEGER A(2)/1,2/ ! { dg-error "Invalid old style initialization for derived type component" }
5603
+ INTEGER B/1/ ! { dg-error "Invalid old style initialization for derived type component" }
5606
Index: gcc/testsuite/gfortran.dg/nint_2.f90
5607
===================================================================
5608
--- a/src/gcc/testsuite/gfortran.dg/nint_2.f90 (.../tags/gcc_4_8_3_release)
5609
+++ b/src/gcc/testsuite/gfortran.dg/nint_2.f90 (.../branches/gcc-4_8-branch)
5611
! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
5614
-! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc*-*-linux* *-*-mingw* } { "-O0" } { "" } }
5615
+! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc-*-linux* powerpc64-*-linux* *-*-mingw* } { "-O0" } { "" } }
5616
+! Note that this doesn't fail on powerpc64le-*-linux*.
5618
integer(kind=8) :: i1, i2
5620
Index: gcc/testsuite/gfortran.dg/pointer_intent_7.f90
5621
===================================================================
5622
--- a/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90 (.../tags/gcc_4_8_3_release)
5623
+++ b/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90 (.../branches/gcc-4_8-branch)
5627
call bar2p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
5628
- call bar3p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
5629
+ call bar3p (b) ! { dg-error "Actual argument to .n. at \\(1\\) must be polymorphic" }
5630
call bar2p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
5631
call bar3p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
5633
Index: gcc/testsuite/gfortran.dg/array_assignment_5.f90
5634
===================================================================
5635
--- a/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90 (.../tags/gcc_4_8_3_release)
5636
+++ b/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90 (.../branches/gcc-4_8-branch)
5639
+! { dg-options "-ffrontend-optimize" }
5640
+! PR 62214 - this used to give the wrong result.
5641
+! Original test case by Oliver Fuhrer
5644
+ CHARACTER(LEN=20) :: fullNames(2)
5645
+ CHARACTER(LEN=255) :: pathName
5646
+ CHARACTER(LEN=5) :: fileNames(2)
5648
+ pathName = "/dir1/dir2/"
5649
+ fileNames = (/ "file1", "file2" /)
5650
+ fullNames = SPREAD(TRIM(pathName),1,2) // fileNames
5651
+ if (fullNames(1) /= '/dir1/dir2/file1' .or. &
5652
+ & fullnames(2) /= '/dir1/dir2/file2') call abort
5654
Index: gcc/testsuite/gfortran.dg/pr45636.f90
5655
===================================================================
5656
--- a/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../tags/gcc_4_8_3_release)
5657
+++ b/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../branches/gcc-4_8-branch)
5662
-! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { mips*-*-* && { ! nomips16 } } } } }
5663
+! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { { hppa*-*-* && { ! lp64 } } || { mips*-*-* && { ! nomips16 } } } } } }
5664
! { dg-final { cleanup-tree-dump "forwprop2" } }
5665
Index: gcc/testsuite/gfortran.dg/allocatable_function_8.f90
5666
===================================================================
5667
--- a/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../tags/gcc_4_8_3_release)
5668
+++ b/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../branches/gcc-4_8-branch)
5671
+! Test the fix for PR61459.
5673
+! Contributed by John Wingate <johnww@tds.net>
5679
+ public :: f_segfault, f_segfault_plus, f_workaround
5680
+ integer, dimension(2,2) :: b = reshape([1,-1,1,1],[2,2])
5684
+ function f_segfault(x)
5685
+ real, dimension(:), allocatable :: f_segfault
5686
+ real, dimension(:), intent(in) :: x
5687
+ allocate(f_segfault(2))
5688
+ f_segfault = matmul(b,x)
5689
+ end function f_segfault
5691
+! Sefaulted without the ALLOCATE as well.
5692
+ function f_segfault_plus(x)
5693
+ real, dimension(:), allocatable :: f_segfault_plus
5694
+ real, dimension(:), intent(in) :: x
5695
+ f_segfault_plus = matmul(b,x)
5696
+ end function f_segfault_plus
5698
+ function f_workaround(x)
5699
+ real, dimension(:), allocatable :: f_workaround
5700
+ real, dimension(:), intent(in) :: x
5701
+ real, dimension(:), allocatable :: tmp
5702
+ allocate(f_workaround(2),tmp(2))
5704
+ f_workaround = tmp
5705
+ end function f_workaround
5712
+ real, dimension(2) :: x = 1.0, y
5713
+ y = f_workaround (x)
5714
+ if (any (f_segfault (x) .ne. y)) call abort
5715
+ if (any (f_segfault_plus (x) .ne. y)) call abort
5717
Index: gcc/testsuite/gfortran.dg/bessel_7.f90
5718
===================================================================
5719
--- a/src/gcc/testsuite/gfortran.dg/bessel_7.f90 (.../tags/gcc_4_8_3_release)
5720
+++ b/src/gcc/testsuite/gfortran.dg/bessel_7.f90 (.../branches/gcc-4_8-branch)
5723
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]
5724
real,parameter :: myeps(size(values)) = epsilon(0.0) &
5725
- * [2, 3, 4, 5, 8, 2, 12, 6, 7, 6, 36, 168 ]
5726
+ * [2, 3, 4, 5, 8, 2, 13, 6, 7, 6, 36, 168 ]
5727
! The following is sufficient for me - the values above are a bit
5729
! * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]
5730
Index: gcc/testsuite/gcc.c-torture/execute/pr63659.c
5731
===================================================================
5732
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr63659.c (.../tags/gcc_4_8_3_release)
5733
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr63659.c (.../branches/gcc-4_8-branch)
5735
+/* PR rtl-optimization/63659 */
5737
+int a, b, c, *d = &b, g, h, i;
5746
+ for (a = 0; a; a++)
5753
+ char j = c, k = -1, l;
5755
+ f = l == 0 ? k : k % l;
5760
+ __builtin_abort ();
5764
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
5765
===================================================================
5766
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../tags/gcc_4_8_3_release)
5767
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../branches/gcc-4_8-branch)
5769
+#ifdef __INT32_TYPE__
5770
+typedef __INT32_TYPE__ int32_t;
5772
+typedef int int32_t;
5775
+#ifdef __UINT32_TYPE__
5776
+typedef __UINT32_TYPE__ uint32_t;
5778
+typedef unsigned uint32_t;
5781
+#define __fake_const_swab32(x) ((uint32_t)( \
5782
+ (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
5783
+ (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
5784
+ (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
5785
+ (( (int32_t)(x) & (int32_t)0xff000000UL) >> 24)))
5787
+/* Previous version of bswap optimization failed to consider sign extension
5788
+ and as a result would replace an expression *not* doing a bswap by a
5791
+__attribute__ ((noinline, noclone)) uint32_t
5792
+fake_bswap32 (uint32_t in)
5794
+ return __fake_const_swab32 (in);
5800
+ if (sizeof (int32_t) * __CHAR_BIT__ != 32)
5802
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
5804
+ if (fake_bswap32 (0x87654321) != 0xffffff87)
5805
+ __builtin_abort ();
5808
Index: gcc/testsuite/gcc.c-torture/execute/pr23135.x
5809
===================================================================
5810
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../tags/gcc_4_8_3_release)
5811
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../branches/gcc-4_8-branch)
5813
+set additional_flags "-Wno-psabi"
5815
Index: gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
5816
===================================================================
5817
--- a/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c (.../tags/gcc_4_8_3_release)
5818
+++ b/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c (.../branches/gcc-4_8-branch)
5826
+static union U u = { 0x12345678 };
5828
+/* Constant folding used to fail to account for endianness when folding a
5834
+#ifdef __BYTE_ORDER__
5835
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
5836
+ return u.b - 0x45678;
5838
+ return u.b - 0x12345;
5843
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
5844
===================================================================
5845
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../tags/gcc_4_8_3_release)
5846
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../branches/gcc-4_8-branch)
5858
+ __builtin_abort ();
5861
Index: gcc/testsuite/gcc.c-torture/execute/20050604-1.x
5862
===================================================================
5863
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x (.../tags/gcc_4_8_3_release)
5864
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x (.../branches/gcc-4_8-branch)
5866
set additional_flags "-mno-mmx"
5869
+set additional_flags "-Wno-psabi"
5871
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
5872
===================================================================
5873
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../tags/gcc_4_8_3_release)
5874
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../branches/gcc-4_8-branch)
5876
+#ifdef __INT16_TYPE__
5877
+typedef __INT16_TYPE__ int16_t;
5879
+typedef short int16_t;
5882
+#ifdef __UINT32_TYPE__
5883
+typedef __UINT32_TYPE__ uint32_t;
5885
+typedef unsigned uint32_t;
5888
+#define __fake_const_swab32(x) ((uint32_t)( \
5889
+ (((uint32_t) (x) & (uint32_t)0x000000ffUL) << 24) | \
5890
+ (((uint32_t)(int16_t)(x) & (uint32_t)0x00ffff00UL) << 8) | \
5891
+ (((uint32_t) (x) & (uint32_t)0x00ff0000UL) >> 8) | \
5892
+ (((uint32_t) (x) & (uint32_t)0xff000000UL) >> 24)))
5895
+/* Previous version of bswap optimization failed to consider sign extension
5896
+ and as a result would replace an expression *not* doing a bswap by a
5899
+__attribute__ ((noinline, noclone)) uint32_t
5900
+fake_bswap32 (uint32_t in)
5902
+ return __fake_const_swab32 (in);
5908
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
5910
+ if (sizeof (int16_t) * __CHAR_BIT__ != 16)
5912
+ if (fake_bswap32 (0x81828384) != 0xff838281)
5913
+ __builtin_abort ();
5916
Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c
5917
===================================================================
5918
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../tags/gcc_4_8_3_release)
5919
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../branches/gcc-4_8-branch)
5921
+#ifdef __UINT64_TYPE__
5922
+typedef __UINT64_TYPE__ uint64_t;
5924
+typedef unsigned long long uint64_t;
5927
+#ifndef __SIZEOF_INT128__
5928
+#define __int128 long long
5931
+/* Some version of bswap optimization would ICE when analyzing a mask constant
5932
+ too big for an HOST_WIDE_INT (PR61375). */
5934
+__attribute__ ((noinline, noclone)) uint64_t
5935
+uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2)
5937
+ __int128 mask = (__int128)0xffff << 56;
5938
+ return ((in1 & mask) >> 56) | in2;
5945
+#ifdef __SIZEOF_INT128__
5948
+ if (sizeof (uint64_t) * __CHAR_BIT__ != 64)
5950
+ if (sizeof (unsigned __int128) * __CHAR_BIT__ != 128)
5952
+ if (uint128_central_bitsi_ior (in, 2) != 0x102)
5953
+ __builtin_abort ();
5956
Index: gcc/testsuite/gcc.c-torture/execute/20050316-1.x
5957
===================================================================
5958
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x (.../tags/gcc_4_8_3_release)
5959
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x (.../branches/gcc-4_8-branch)
5964
+set additional_flags "-Wno-psabi"
5966
Index: gcc/testsuite/gcc.c-torture/execute/20050316-3.x
5967
===================================================================
5968
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x (.../tags/gcc_4_8_3_release)
5969
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x (.../branches/gcc-4_8-branch)
5971
+set additional_flags "-Wno-psabi"
5973
Index: gcc/testsuite/gcc.c-torture/compile/pr61684.c
5974
===================================================================
5975
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../tags/gcc_4_8_3_release)
5976
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../branches/gcc-4_8-branch)
5978
+/* PR tree-optimization/61684 */
5983
+static short **e = 0;
5988
+ for (; c < 1; c++)
5991
+ a = d && (c && 1) & *b;
5993
Index: gcc/testsuite/gcc.c-torture/compile/pr64067.c
5994
===================================================================
5995
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr64067.c (.../tags/gcc_4_8_3_release)
5996
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr64067.c (.../branches/gcc-4_8-branch)
5998
+/* PR middle-end/64067 */
6000
+struct S { int s; };
6001
+int *const v[1] = { &((struct S) { .s = 42 }).s };
6008
Index: gcc/testsuite/gcc.c-torture/compile/pr64269.c
6009
===================================================================
6010
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr64269.c (.../tags/gcc_4_8_3_release)
6011
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr64269.c (.../branches/gcc-4_8-branch)
6013
+/* PR tree-optimization/64269 */
6018
+ __SIZE_TYPE__ s = ~(__SIZE_TYPE__)0;
6020
+ __builtin_memset (p + 1, 0, s);
6022
Index: gcc/testsuite/gcc.c-torture/compile/pr63282.c
6023
===================================================================
6024
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../tags/gcc_4_8_3_release)
6025
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../branches/gcc-4_8-branch)
6027
+/* PR inline-asm/63282 */
6034
+ asm volatile goto ("" : : : : a, b);
6040
Index: gcc/testsuite/gnat.dg/opt41_pkg.adb
6041
===================================================================
6042
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.adb (.../tags/gcc_4_8_3_release)
6043
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.adb (.../branches/gcc-4_8-branch)
6045
+with Ada.Streams; use Ada.Streams;
6047
+package body Opt41_Pkg is
6049
+ type Wstream is new Root_Stream_Type with record
6050
+ S : Unbounded_String;
6053
+ procedure Read (Stream : in out Wstream;
6054
+ Item : out Stream_Element_Array;
6055
+ Last : out Stream_Element_Offset) is null;
6057
+ procedure Write (Stream : in out Wstream; Item : Stream_Element_Array) is
6059
+ for J in Item'Range loop
6060
+ Append (Stream.S, Character'Val (Item (J)));
6064
+ function Rec_Write (R : Rec) return Unbounded_String is
6065
+ S : aliased Wstream;
6067
+ Rec'Output (S'Access, R);
6071
+ type Rstream is new Root_Stream_Type with record
6072
+ S : String_Access;
6073
+ Idx : Integer := 1;
6076
+ procedure Write (Stream : in out Rstream; Item : Stream_Element_Array) is null;
6078
+ procedure Read (Stream : in out Rstream;
6079
+ Item : out Stream_Element_Array;
6080
+ Last : out Stream_Element_Offset) is
6082
+ Last := Stream_Element_Offset'Min
6083
+ (Item'Last, Item'First + Stream_Element_Offset (Stream.S'Last - Stream.Idx));
6084
+ for I in Item'First .. Last loop
6085
+ Item (I) := Stream_Element (Character'Pos (Stream.S (Stream.Idx)));
6086
+ Stream.Idx := Stream.Idx + 1;
6090
+ function Rec_Read (Str : String_Access) return Rec is
6091
+ S : aliased Rstream;
6094
+ return Rec'Input (S'Access);
6098
Index: gcc/testsuite/gnat.dg/opt41_pkg.ads
6099
===================================================================
6100
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.ads (.../tags/gcc_4_8_3_release)
6101
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.ads (.../branches/gcc-4_8-branch)
6103
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
6105
+package Opt41_Pkg is
6107
+ type Enum is (One, Two, Three, Four, Five, Six);
6109
+ type Rec (D : Enum) is record
6113
+ when Two | Five | Six =>
6114
+ S : Unbounded_String;
6116
+ when Two => B : Boolean;
6117
+ when others => null;
6124
+ type Rec_Ptr is access all Rec;
6126
+ function Rec_Write (R : Rec) return Unbounded_String;
6128
+ function Rec_Read (Str : String_Access) return Rec;
6131
Index: gcc/testsuite/gnat.dg/opt39.adb
6132
===================================================================
6133
--- a/src/gcc/testsuite/gnat.dg/opt39.adb (.../tags/gcc_4_8_3_release)
6134
+++ b/src/gcc/testsuite/gnat.dg/opt39.adb (.../branches/gcc-4_8-branch)
6136
+-- { dg-do compile }
6137
+-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
6139
+procedure Opt39 (I : Integer) is
6141
+ type Rec is record
6149
+ procedure Set (A : access Rec; I : Integer) is
6150
+ Tmp : Rec := A.all;
6159
+ Set (R'Access, I);
6161
+ raise Program_Error;
6165
+-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }
6166
+-- { dg-final { cleanup-tree-dump "optimized" } }
6167
Index: gcc/testsuite/gnat.dg/opt41.adb
6168
===================================================================
6169
--- a/src/gcc/testsuite/gnat.dg/opt41.adb (.../tags/gcc_4_8_3_release)
6170
+++ b/src/gcc/testsuite/gnat.dg/opt41.adb (.../branches/gcc-4_8-branch)
6173
+-- { dg-options "-Os" }
6175
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
6176
+with Opt41_Pkg; use Opt41_Pkg;
6179
+ R : Rec := (Five, To_Unbounded_String ("CONFIG"));
6180
+ SP : String_Access := new String'(To_String (Rec_Write (R)));
6181
+ RP : Rec_Ptr := new Rec'(Rec_Read (SP));
6183
+ if RP.D /= R.D then
6184
+ raise Program_Error;
6187
Index: gcc/testsuite/gnat.dg/overflow_fixed.adb
6188
===================================================================
6189
--- a/src/gcc/testsuite/gnat.dg/overflow_fixed.adb (.../tags/gcc_4_8_3_release)
6190
+++ b/src/gcc/testsuite/gnat.dg/overflow_fixed.adb (.../branches/gcc-4_8-branch)
6193
+-- { dg-options "-gnato -O" }
6195
+procedure Overflow_Fixed is
6197
+ type Unsigned_8_Bit is mod 2**8;
6199
+ procedure Fixed_To_Eight (Value : Duration) is
6200
+ Item : Unsigned_8_Bit;
6202
+ Item := Unsigned_8_Bit(Value);
6203
+ raise Program_Error;
6205
+ when Constraint_Error => null; -- expected case
6209
+ Fixed_To_Eight (-0.5);
6211
Index: gcc/testsuite/gnat.dg/aliasing1.adb
6212
===================================================================
6213
--- a/src/gcc/testsuite/gnat.dg/aliasing1.adb (.../tags/gcc_4_8_3_release)
6214
+++ b/src/gcc/testsuite/gnat.dg/aliasing1.adb (.../branches/gcc-4_8-branch)
6219
--- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
6220
+-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
6221
-- { dg-final { cleanup-tree-dump "optimized" } }
6222
Index: gcc/testsuite/gcc.dg/pr60866.c
6223
===================================================================
6224
--- a/src/gcc/testsuite/gcc.dg/pr60866.c (.../tags/gcc_4_8_3_release)
6225
+++ b/src/gcc/testsuite/gcc.dg/pr60866.c (.../branches/gcc-4_8-branch)
6227
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
6228
+/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns" } */
6233
+foo (int w, int **dnroot, int **dn)
6236
+ int *xchild = xchild;
6237
+ for (; w < n; w++)
6241
+ for (child = *dn; child; child = xchild)
6245
Index: gcc/testsuite/gcc.dg/pr51879-12.c
6246
===================================================================
6247
--- a/src/gcc/testsuite/gcc.dg/pr51879-12.c (.../tags/gcc_4_8_3_release)
6248
+++ b/src/gcc/testsuite/gcc.dg/pr51879-12.c (.../branches/gcc-4_8-branch)
6253
-/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre"} } */
6254
-/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre"} } */
6255
+/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre" { xfail *-*-* } } } */
6256
+/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre" { xfail *-*-* } } } */
6257
/* { dg-final { cleanup-tree-dump "pre" } } */
6258
Index: gcc/testsuite/gcc.dg/vmx/3c-01a.c
6259
===================================================================
6260
--- a/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c (.../tags/gcc_4_8_3_release)
6261
+++ b/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c (.../branches/gcc-4_8-branch)
6263
/* { dg-do compile } */
6264
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
6265
#include <altivec.h>
6266
typedef const volatile unsigned int _1;
6267
typedef const unsigned int _2;
6268
Index: gcc/testsuite/gcc.dg/vmx/ops.c
6269
===================================================================
6270
--- a/src/gcc/testsuite/gcc.dg/vmx/ops.c (.../tags/gcc_4_8_3_release)
6271
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops.c (.../branches/gcc-4_8-branch)
6273
/* { dg-do compile } */
6274
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
6275
#include <altivec.h>
6277
extern char * *var_char_ptr;
6278
Index: gcc/testsuite/gcc.dg/vmx/ops-long-1.c
6279
===================================================================
6280
--- a/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../tags/gcc_4_8_3_release)
6281
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../branches/gcc-4_8-branch)
6283
/* { dg-do compile } */
6284
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
6286
/* Checks from the original ops.c that pass pointers to long or
6287
unsigned long for operations that support that in released versions
6288
Index: gcc/testsuite/gcc.dg/pr63665.c
6289
===================================================================
6290
--- a/src/gcc/testsuite/gcc.dg/pr63665.c (.../tags/gcc_4_8_3_release)
6291
+++ b/src/gcc/testsuite/gcc.dg/pr63665.c (.../branches/gcc-4_8-branch)
6293
+/* { dg-do run } */
6294
+/* { dg-require-effective-target int32plus } */
6295
+/* { dg-options "-O -fno-tree-ccp -fno-tree-fre -fno-tree-copy-prop -fwrapv" } */
6300
+ int y = 0x80000000;
6307
+ if (test5 (0x80000000) != 0)
6308
+ __builtin_abort ();
6311
Index: gcc/testsuite/gcc.dg/pr63342.c
6312
===================================================================
6313
--- a/src/gcc/testsuite/gcc.dg/pr63342.c (.../tags/gcc_4_8_3_release)
6314
+++ b/src/gcc/testsuite/gcc.dg/pr63342.c (.../branches/gcc-4_8-branch)
6316
+/* PR debug/63342 */
6317
+/* { dg-do compile } */
6318
+/* { dg-options "-g -O2" } */
6319
+/* { dg-additional-options "-fpic" { target fpic } } */
6321
+static __thread double u[9], v[9];
6324
+foo (double **p, double **q)
6335
+ for (i = 0; i < 9; i++)
6337
+ double a = x + v[i];
6338
+ s += u[i] * a * a;
6342
Index: gcc/testsuite/gcc.dg/pr63284.c
6343
===================================================================
6344
--- a/src/gcc/testsuite/gcc.dg/pr63284.c (.../tags/gcc_4_8_3_release)
6345
+++ b/src/gcc/testsuite/gcc.dg/pr63284.c (.../branches/gcc-4_8-branch)
6347
+/* PR debug/63284 */
6348
+/* { dg-do compile } */
6349
+/* { dg-options "-O2 -fcompare-debug" } */
6351
+int a[10], *b, *d, c, f;
6389
Index: gcc/testsuite/gcc.dg/pr61045.c
6390
===================================================================
6391
--- a/src/gcc/testsuite/gcc.dg/pr61045.c (.../tags/gcc_4_8_3_release)
6392
+++ b/src/gcc/testsuite/gcc.dg/pr61045.c (.../branches/gcc-4_8-branch)
6394
+/* { dg-do run } */
6395
+/* { dg-options "-fstrict-overflow" } */
6400
+ int b = __INT_MAX__;
6401
+ int t = (a - 2) > (b - 1);
6403
+ __builtin_abort();
6406
Index: gcc/testsuite/gcc.dg/pr62167-run.c
6407
===================================================================
6408
--- a/src/gcc/testsuite/gcc.dg/pr62167-run.c (.../tags/gcc_4_8_3_release)
6409
+++ b/src/gcc/testsuite/gcc.dg/pr62167-run.c (.../branches/gcc-4_8-branch)
6411
+/* { dg-do run } */
6412
+/* { dg-options "-O2 -ftree-tail-merge" } */
6416
+ struct node *next;
6417
+ struct node *prev;
6424
+ struct node *first;
6427
+struct head heads[5];
6431
+struct head *head = &heads[2];
6438
+ node.next = (void*)0;
6440
+ node.prev = (void *)head;
6442
+ head->first = &node;
6444
+ struct node *n = head->first;
6446
+ struct head *h = &heads[k];
6448
+ heads[2].first = n->next;
6450
+ if ((void*)n->prev == (void *)h)
6453
+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
6454
+ p = n->prev->next;
6456
+ return !(p == (void*)0);
6458
Index: gcc/testsuite/gcc.dg/pr52769.c
6459
===================================================================
6460
--- a/src/gcc/testsuite/gcc.dg/pr52769.c (.../tags/gcc_4_8_3_release)
6461
+++ b/src/gcc/testsuite/gcc.dg/pr52769.c (.../branches/gcc-4_8-branch)
6464
+/* { dg-do run } */
6465
+/* { dg-options "-O3" } */
6469
+ int should_be_zero;
6477
+ volatile foo_t foo = {
6482
+ if (foo.should_be_zero != 0)
6483
+ __builtin_abort ();
6487
Index: gcc/testsuite/gcc.dg/pr62167.c
6488
===================================================================
6489
--- a/src/gcc/testsuite/gcc.dg/pr62167.c (.../tags/gcc_4_8_3_release)
6490
+++ b/src/gcc/testsuite/gcc.dg/pr62167.c (.../branches/gcc-4_8-branch)
6492
+/* { dg-do compile } */
6493
+/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */
6497
+ struct node *next;
6498
+ struct node *prev;
6505
+ struct node *first;
6508
+struct head heads[5];
6512
+struct head *head = &heads[2];
6519
+ node.next = (void*)0;
6521
+ node.prev = (void *)head;
6523
+ head->first = &node;
6525
+ struct node *n = head->first;
6527
+ struct head *h = &heads[k];
6529
+ heads[2].first = n->next;
6531
+ if ((void*)n->prev == (void *)h)
6534
+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
6535
+ p = n->prev->next;
6537
+ return !(p == (void*)0);
6540
+/* { dg-final { scan-tree-dump-not "Removing basic block" "pre"} } */
6541
+/* { dg-final { cleanup-tree-dump "pre" } } */
6542
Index: gcc/testsuite/gcc.dg/pr62004.c
6543
===================================================================
6544
--- a/src/gcc/testsuite/gcc.dg/pr62004.c (.../tags/gcc_4_8_3_release)
6545
+++ b/src/gcc/testsuite/gcc.dg/pr62004.c (.../branches/gcc-4_8-branch)
6547
+/* { dg-do run } */
6548
+/* { dg-options "-O2 -fno-tree-tail-merge" } */
6552
+ struct node *next;
6553
+ struct node *prev;
6560
+ struct node *first;
6563
+struct head heads[5];
6567
+struct head *head = &heads[2];
6574
+ node.next = (void*)0;
6576
+ node.prev = (void *)head;
6578
+ head->first = &node;
6580
+ struct node *n = head->first;
6582
+ struct head *h = &heads[k];
6584
+ heads[2].first = n->next;
6586
+ if ((void*)n->prev == (void *)h)
6589
+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
6590
+ p = n->prev->next;
6592
+ return !(p == (void*)0);
6594
Index: gcc/testsuite/gcc.dg/pr51879-18.c
6595
===================================================================
6596
--- a/src/gcc/testsuite/gcc.dg/pr51879-18.c (.../tags/gcc_4_8_3_release)
6597
+++ b/src/gcc/testsuite/gcc.dg/pr51879-18.c (.../branches/gcc-4_8-branch)
6602
-/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */
6603
+/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre" { xfail *-*-* } } } */
6604
/* { dg-final { cleanup-tree-dump "pre" } } */
6605
Index: gcc/testsuite/gcc.dg/torture/pr61964.c
6606
===================================================================
6607
--- a/src/gcc/testsuite/gcc.dg/torture/pr61964.c (.../tags/gcc_4_8_3_release)
6608
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61964.c (.../branches/gcc-4_8-branch)
6610
+/* { dg-do run } */
6612
+extern void abort (void);
6614
+struct node { struct node *next, *prev; } node;
6615
+struct head { struct node *first; } heads[5];
6617
+struct head *head = &heads[2];
6619
+static int __attribute__((noinline))
6622
+ node.prev = (void *)head;
6623
+ head->first = &node;
6625
+ struct node *n = head->first;
6626
+ struct head *h = &heads[k];
6628
+ if (n->prev == (void *)h)
6629
+ h->first = n->next;
6631
+ n->prev->next = n->next;
6633
+ n->next = h->first;
6634
+ return n->next == &node;
6643
Index: gcc/testsuite/gcc.dg/torture/pr61010.c
6644
===================================================================
6645
--- a/src/gcc/testsuite/gcc.dg/torture/pr61010.c (.../tags/gcc_4_8_3_release)
6646
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61010.c (.../branches/gcc-4_8-branch)
6648
+/* { dg-do compile } */
6653
+ unsigned b = (a * 64 & 192) | 63U;
6656
Index: gcc/testsuite/gcc.dg/torture/pr61452.c
6657
===================================================================
6658
--- a/src/gcc/testsuite/gcc.dg/torture/pr61452.c (.../tags/gcc_4_8_3_release)
6659
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61452.c (.../branches/gcc-4_8-branch)
6661
+/* { dg-do run } */
6668
+fn1 (int p1, char p2)
6670
+ return p1 || p2 ? 0 : p2;
6681
+ b = fn1 (g = d = e, g);
6692
Index: gcc/testsuite/gcc.dg/torture/pr61383-1.c
6693
===================================================================
6694
--- a/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../tags/gcc_4_8_3_release)
6695
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../branches/gcc-4_8-branch)
6697
+/* { dg-do run } */
6699
+int a, b = 1, c, d, e, f, g;
6708
+ g = g ? 0 : 1 % g;
6710
+ for (; d < 1; d = e)
6732
Index: gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
6733
===================================================================
6734
--- a/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c (.../tags/gcc_4_8_3_release)
6735
+++ b/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c (.../branches/gcc-4_8-branch)
6737
+/* Test that exact underflow in __float128 signals the underflow
6738
+ exception if trapping is enabled, but does not raise the flag
6741
+/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* } } */
6742
+/* { dg-options "-D_GNU_SOURCE" } */
6743
+/* { dg-require-effective-target fenv_exceptions } */
6746
+#include <setjmp.h>
6747
+#include <signal.h>
6748
+#include <stdlib.h>
6750
+volatile sig_atomic_t caught_sigfpe;
6754
+handle_sigfpe (int sig)
6756
+ caught_sigfpe = 1;
6757
+ siglongjmp (buf, 1);
6763
+ volatile __float128 a = 0x1p-16382q, b = 0x1p-2q;
6764
+ volatile __float128 r;
6766
+ if (fetestexcept (FE_UNDERFLOW))
6768
+ if (r != 0x1p-16384q)
6770
+ feenableexcept (FE_UNDERFLOW);
6771
+ signal (SIGFPE, handle_sigfpe);
6772
+ if (sigsetjmp (buf, 1) == 0)
6774
+ if (!caught_sigfpe)
6778
Index: gcc/testsuite/gcc.dg/torture/pr62031.c
6779
===================================================================
6780
--- a/src/gcc/testsuite/gcc.dg/torture/pr62031.c (.../tags/gcc_4_8_3_release)
6781
+++ b/src/gcc/testsuite/gcc.dg/torture/pr62031.c (.../branches/gcc-4_8-branch)
6783
+/* { dg-do run } */
6785
+#include <stdlib.h>
6787
+#define NUM_OF_STATES 4
6788
+typedef unsigned int entry_t[2];
6789
+typedef struct entries_item { entry_t metricEntries_[0]; } entries_item_t;
6791
+void __attribute__((noinline,noclone))
6792
+test_00(size_t numOfStates, entries_item_t* p_bm,
6793
+ const unsigned int* polyArray,
6794
+ size_t polyArraySize)
6797
+ unsigned int hlp0, hlp1;
6798
+ for (idx = 0; idx < numOfStates; ++idx)
6802
+ hlp0 = (idx << 1) | 0x00;
6803
+ hlp1 = (idx << 1) | 0x01;
6804
+ p_bm->metricEntries_[idx][0] = 0;
6805
+ p_bm->metricEntries_[idx][1] = 0;
6806
+ for (idy = 0; idy < polyArraySize; ++idy)
6808
+ p_bm->metricEntries_[idx][0]
6809
+ |= __builtin_parity(hlp0 & polyArray[idy]) << idy;
6810
+ p_bm->metricEntries_[idx][1]
6811
+ |= __builtin_parity(hlp1 & polyArray[idy]) << idy;
6818
+ unsigned int polyArray[] = { 0x07, 0x05 };
6819
+ entries_item_t* pBranchMetrics;
6820
+ pBranchMetrics = malloc(sizeof(entry_t) * NUM_OF_STATES);
6821
+ test_00(NUM_OF_STATES, pBranchMetrics, polyArray,
6822
+ sizeof(polyArray) / sizeof(polyArray[0]));
6823
+ if (pBranchMetrics->metricEntries_[0][0] != 0
6824
+ || pBranchMetrics->metricEntries_[0][1] != 3
6825
+ || pBranchMetrics->metricEntries_[1][0] != 1
6826
+ || pBranchMetrics->metricEntries_[1][1] != 2
6827
+ || pBranchMetrics->metricEntries_[2][0] != 3
6828
+ || pBranchMetrics->metricEntries_[2][1] != 0
6829
+ || pBranchMetrics->metricEntries_[3][0] != 2
6830
+ || pBranchMetrics->metricEntries_[3][1] != 1)
6832
+ free(pBranchMetrics);
6835
Index: gcc/testsuite/gcc.dg/torture/vshuf-4.inc
6836
===================================================================
6837
--- a/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc (.../tags/gcc_4_8_3_release)
6838
+++ b/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc (.../branches/gcc-4_8-branch)
6840
T (20, 0, 4, 1, 5) \
6841
T (21, 2, 6, 3, 7) \
6842
T (22, 1, 2, 3, 0) \
6844
+T (23, 2, 1, 0, 3) \
6847
T (116, 1, 2, 4, 3) \
6848
T (117, 7, 3, 3, 0) \
6850
T (119, 0, 3, 5, 6) \
6851
T (120, 0, 0, 1, 5) \
6852
T (121, 4, 6, 2, 1) \
6853
-T (122, 2, 5, 6, 3) \
6854
T (123, 4, 6, 3, 2) \
6855
T (124, 4, 7, 5, 6) \
6856
T (125, 0, 4, 2, 4) \
6857
Index: gcc/testsuite/gcc.dg/stack-usage-2.c
6858
===================================================================
6859
--- a/src/gcc/testsuite/gcc.dg/stack-usage-2.c (.../tags/gcc_4_8_3_release)
6860
+++ b/src/gcc/testsuite/gcc.dg/stack-usage-2.c (.../branches/gcc-4_8-branch)
6862
/* { dg-do compile } */
6863
/* { dg-options "-Wstack-usage=512" } */
6866
+int foo1 (void) /* { dg-bogus "stack usage" } */
6871
-} /* { dg-bogus "stack usage" } */
6875
+int foo2 (void) /* { dg-warning "stack usage is \[0-9\]* bytes" } */
6880
-} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
6884
+int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
6886
char arr[1024] __attribute__((aligned (512)));
6889
/* Force dynamic realignment of argument pointer. */
6890
__builtin_apply ((void (*)()) foo2, 0, 0);
6894
-} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
6897
+int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
6902
-} /* { dg-warning "stack usage might be unbounded" } */
6904
Index: gcc/testsuite/gcc.dg/ipa/pr61986.c
6905
===================================================================
6906
--- a/src/gcc/testsuite/gcc.dg/ipa/pr61986.c (.../tags/gcc_4_8_3_release)
6907
+++ b/src/gcc/testsuite/gcc.dg/ipa/pr61986.c (.../branches/gcc-4_8-branch)
6909
+/* { dg-do compile } */
6910
+/* { dg-options "-O3" } */
6920
+static int fn2 (struct S);
6921
+void fn3 (struct S);
6926
+ struct S h = { 0, 0 };
6934
+ struct S j = { 0, 0 };
6953
+ struct S f = { 0, 0 };
6957
Index: gcc/testsuite/gcc.dg/pr62030.c
6958
===================================================================
6959
--- a/src/gcc/testsuite/gcc.dg/pr62030.c (.../tags/gcc_4_8_3_release)
6960
+++ b/src/gcc/testsuite/gcc.dg/pr62030.c (.../branches/gcc-4_8-branch)
6962
+/* { dg-do run } */
6963
+/* { dg-options "-O2" } */
6965
+extern void abort (void);
6969
+ struct node *next;
6970
+ struct node *prev;
6977
+ struct node *first;
6980
+struct head heads[5];
6984
+struct head *head = &heads[2];
6986
+static int __attribute__((noinline))
6989
+ node.prev = (void *)head;
6990
+ head->first = &node;
6992
+ struct node *n = head->first;
6993
+ struct head *h = &heads[k];
6994
+ struct node *next = n->next;
6996
+ if (n->prev == (void *)h)
6999
+ n->prev->next = next;
7001
+ n->next = h->first;
7002
+ return n->next == &node;
7012
Index: gcc/testsuite/gcc.dg/vect/pr63341-2.c
7013
===================================================================
7014
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../tags/gcc_4_8_3_release)
7015
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../branches/gcc-4_8-branch)
7017
+/* PR tree-optimization/63341 */
7018
+/* { dg-do run } */
7020
+#include "tree-vect.h"
7022
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
7023
+struct S { char e __attribute__((aligned (64))); U s[32]; };
7024
+struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
7025
+ {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
7026
+ {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
7027
+ {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
7028
+unsigned short d[32] = { 1 };
7030
+__attribute__((noinline, noclone)) void
7034
+ for (i = 0; i < 32; i++)
7035
+ d[i] = t.s[i].s + 4;
7036
+ for (i = 0; i < 32; i++)
7037
+ if (d[i] != t.s[i].s + 4)
7040
+ asm volatile ("" : : : "memory");
7051
+/* { dg-final { cleanup-tree-dump "vect" } } */
7052
Index: gcc/testsuite/gcc.dg/vect/pr63189.c
7053
===================================================================
7054
--- a/src/gcc/testsuite/gcc.dg/vect/pr63189.c (.../tags/gcc_4_8_3_release)
7055
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63189.c (.../branches/gcc-4_8-branch)
7057
+/* PR tree-optimization/63189 */
7058
+/* { dg-do run } */
7060
+#include "tree-vect.h"
7062
+short int d[16] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
7064
+__attribute__((noinline, noclone)) void
7068
+ for (j = 0; j < 8; j++)
7082
+/* { dg-final { cleanup-tree-dump "vect" } } */
7083
Index: gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c
7084
===================================================================
7085
--- a/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c (.../tags/gcc_4_8_3_release)
7086
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c (.../branches/gcc-4_8-branch)
7088
+/* { dg-require-effective-target vect_int } */
7090
+#include <stdarg.h>
7091
+#include "tree-vect.h"
7096
+signed short X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
7097
+signed int Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
7099
+/* (short, int)->int->int dot product.
7100
+ Not detected as a dot-product pattern. */
7102
+__attribute__ ((noinline)) int
7108
+ for (i = 0; i < len; i++)
7110
+ result += (X[i] * Y[i]);
7116
+/* (int, short)->int->int dot product.
7117
+ Not detected as a dot-product pattern. */
7119
+__attribute__ ((noinline)) int
7125
+ for (i = 0; i < len; i++)
7127
+ result += (Y[i] * X[i]);
7140
+ for (i = 0; i < N; i++)
7144
+ __asm__ volatile ("");
7158
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
7159
+/* { dg-final { cleanup-tree-dump "vect" } } */
7161
Index: gcc/testsuite/gcc.dg/vect/pr63379.c
7162
===================================================================
7163
--- a/src/gcc/testsuite/gcc.dg/vect/pr63379.c (.../tags/gcc_4_8_3_release)
7164
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63379.c (.../branches/gcc-4_8-branch)
7166
+/* PR tree-optimization/63379 */
7167
+/* { dg-do run } */
7169
+#include "tree-vect.h"
7171
+extern void abort (void);
7178
+Point pt_array[25];
7180
+void __attribute__((noinline,noclone))
7181
+generate_array(void)
7184
+ for (i = 0; i<25; i++)
7186
+ pt_array[i].x = i;
7187
+ pt_array[i].y = 1000+i;
7194
+ generate_array ();
7195
+ Point min_pt = pt_array[0];
7196
+ Point *ptr, *ptr_end;
7197
+ for (ptr = pt_array+1, ptr_end = pt_array+25; ptr != ptr_end; ++ptr)
7199
+ min_pt.x = (min_pt.x < ptr->x) ? min_pt.x : ptr->x;
7200
+ min_pt.y = (min_pt.y < ptr->y) ? min_pt.y : ptr->y;
7203
+ if (min_pt.x != 0 || min_pt.y != 1000)
7208
+/* { dg-final { cleanup-tree-dump "vect" } } */
7209
Index: gcc/testsuite/gcc.dg/vect/pr62073.c
7210
===================================================================
7211
--- a/src/gcc/testsuite/gcc.dg/vect/pr62073.c (.../tags/gcc_4_8_3_release)
7212
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62073.c (.../branches/gcc-4_8-branch)
7214
+/* { dg-do compile } */
7215
+/* { dg-additional-options "-O1" } */
7225
+int foo (long long p_56, int * p_57)
7232
+ int **l_78 = &l_77;
7237
+ for (g_76 = 1; g_76 >= 0; g_76--)
7240
+ for (l_101 = 4; l_101 >= 0; l_101--)
7245
+ int **l_113 = &l_77;
7253
+/* { dg-final { cleanup-tree-dump "vect" } } */
7254
Index: gcc/testsuite/gcc.dg/vect/pr60196-1.c
7255
===================================================================
7256
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../tags/gcc_4_8_3_release)
7257
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../branches/gcc-4_8-branch)
7259
+/* PR tree-optimization/63189 */
7260
+/* { dg-additional-options "-fwrapv" } */
7261
+/* { dg-do run } */
7263
+#include "tree-vect.h"
7265
+__attribute__((noinline, noclone)) static int
7266
+bar (const short *a, int len)
7271
+ for (x = 0; x < len; x++)
7276
+__attribute__((noinline, noclone)) void
7279
+ short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
7280
+ if (bar (stuff, 9) != 36)
7292
+/* { dg-final { cleanup-tree-dump "vect" } } */
7293
Index: gcc/testsuite/gcc.dg/vect/pr62075.c
7294
===================================================================
7295
--- a/src/gcc/testsuite/gcc.dg/vect/pr62075.c (.../tags/gcc_4_8_3_release)
7296
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62075.c (.../branches/gcc-4_8-branch)
7298
+/* { dg-do compile } */
7311
+ for (i = 0; i < 16; ++i)
7313
+ x->b[i][0] = a[i][0];
7314
+ x->c[i][0] = 0 != a[i][0];
7315
+ x->b[i][1] = a[i][1];
7319
+/* { dg-final { cleanup-tree-dump "vect" } } */
7320
Index: gcc/testsuite/gcc.dg/vect/pr60196-2.c
7321
===================================================================
7322
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../tags/gcc_4_8_3_release)
7323
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../branches/gcc-4_8-branch)
7325
+/* PR tree-optimization/63189 */
7326
+/* { dg-do run } */
7328
+#include "tree-vect.h"
7330
+static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 };
7331
+static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 };
7333
+__attribute__((noinline, noclone)) static int
7337
+ for (i = 0; i < 8; ++i)
7338
+ sum += a[i] * b[i];
7342
+__attribute__((noinline, noclone)) void
7357
+/* { dg-final { cleanup-tree-dump "vect" } } */
7358
Index: gcc/testsuite/gcc.dg/vect/pr63605.c
7359
===================================================================
7360
--- a/src/gcc/testsuite/gcc.dg/vect/pr63605.c (.../tags/gcc_4_8_3_release)
7361
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63605.c (.../branches/gcc-4_8-branch)
7363
+/* { dg-do run } */
7365
+#include "tree-vect.h"
7367
+extern void abort (void);
7369
+int a, b[8] = { 2, 0, 0, 0, 0, 0, 0, 0 }, c[8];
7376
+ for (; a < 8; a++)
7385
Index: gcc/testsuite/gcc.dg/vect/pr63341-1.c
7386
===================================================================
7387
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../tags/gcc_4_8_3_release)
7388
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../branches/gcc-4_8-branch)
7390
+/* PR tree-optimization/63341 */
7391
+/* { dg-do run } */
7393
+#include "tree-vect.h"
7395
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
7396
+struct S { char e __attribute__((aligned (64))); U s[32]; };
7397
+struct S t = {0, {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8},
7398
+ {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
7399
+ {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24},
7400
+ {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}}};
7401
+unsigned short d[32] = { 1 };
7403
+__attribute__((noinline, noclone)) void
7407
+ for (i = 0; i < 32; i++)
7409
+ if (__builtin_memcmp (d, t.s, sizeof d))
7421
+/* { dg-final { cleanup-tree-dump "vect" } } */
7422
Index: gcc/testsuite/ChangeLog
7423
===================================================================
7424
--- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_4_8_3_release)
7425
+++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-4_8-branch)
7427
+2014-12-13 Jakub Jelinek <jakub@redhat.com>
7429
+ Backported from mainline
7430
+ 2014-12-12 Jakub Jelinek <jakub@redhat.com>
7432
+ PR tree-optimization/64269
7433
+ * gcc.c-torture/compile/pr64269.c: New test.
7435
+2014-12-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7437
+ Backport from mainline
7438
+ 2014-09-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7440
+ * gcc.target/powerpc/builtins-1.c: Add tests for vec_ctf,
7441
+ vec_cts, and vec_ctu.
7442
+ * gcc.target/powerpc/builtins-2.c: Likewise.
7444
+ Backport from mainline
7445
+ 2014-08-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7447
+ * gcc.target/powerpc/builtins-1.c: Add tests for vec_xl, vec_xst,
7448
+ vec_round, vec_splat, vec_div, and vec_mul.
7449
+ * gcc.target/powerpc/builtins-2.c: New test.
7451
+ Backport from mainline
7452
+ 2014-08-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7454
+ * testsuite/gcc.target/powerpc/builtins-1.c: New test.
7456
+2014-12-09 Uros Bizjak <ubizjak@gmail.com>
7458
+ PR bootstrap/64213
7460
+ 2014-11-28 H.J. Lu <hongjiu.lu@intel.com>
7462
+ PR rtl-optimization/64037
7463
+ * g++.dg/pr64037.C: New test.
7465
+2014-12-05 H.J. Lu <hongjiu.lu@intel.com>
7467
+ Backport from mainline
7468
+ 2014-11-28 H.J. Lu <hongjiu.lu@intel.com>
7470
+ PR rtl-optimization/64037
7471
+ * g++.dg/pr64037.C: New test.
7473
+2014-12-04 Jakub Jelinek <jakub@redhat.com>
7476
+ * c-c++-common/pr56493.c: New test.
7478
+2014-11-28 Jakub Jelinek <jakub@redhat.com>
7480
+ Backported from mainline
7481
+ 2014-11-27 Jakub Jelinek <jakub@redhat.com>
7483
+ PR middle-end/64067
7484
+ * gcc.c-torture/compile/pr64067.c: New test.
7486
+ 2014-10-31 Jakub Jelinek <jakub@redhat.com>
7488
+ PR rtl-optimization/63659
7489
+ * gcc.c-torture/execute/pr63659.c: New test.
7491
+ 2014-10-03 Jakub Jelinek <jakub@redhat.com>
7494
+ * c-c++-common/gomp/pr61200.c: New test.
7496
+2014-11-26 Richard Biener <rguenther@suse.de>
7498
+ Backport from mainline
7499
+ 2014-08-15 Richard Biener <rguenther@suse.de>
7501
+ PR tree-optimization/62031
7502
+ * gcc.dg/torture/pr62031.c: New testcase.
7504
+ 2014-10-10 Richard Biener <rguenther@suse.de>
7506
+ PR tree-optimization/63379
7507
+ * gcc.dg/vect/pr63379.c: New testcase.
7509
+ 2014-11-07 Richard Biener <rguenther@suse.de>
7511
+ PR tree-optimization/63605
7512
+ * gcc.dg/vect/pr63605.c: New testcase.
7514
+ 2014-10-28 Richard Biener <rguenther@suse.de>
7516
+ PR middle-end/63665
7517
+ * gcc.dg/pr63665.c: New testcase.
7519
+2014-11-19 Uros Bizjak <ubizjak@gmail.com>
7522
+ * gcc.target/i386/pr63947.c: New test.
7524
+2014-11-19 Tom de Vries <tom@codesourcery.com>
7526
+ Backport from mainline
7527
+ PR tree-optimization/62167
7528
+ * gcc.dg/pr51879-12.c: Add xfails.
7529
+ * gcc.dg/pr62167-run.c: New test.
7530
+ * gcc.dg/pr62167.c: New test.
7532
+2014-11-18 Teresa Johnson <tejohnson@google.com>
7534
+ Backport from mainline and gcc-4_9 branch.
7535
+ 2014-11-13 Teresa Johnson <tejohnson@google.com>
7537
+ PR tree-optimization/63841
7538
+ * g++.dg/tree-ssa/pr63841.C: New test.
7540
+2014-11-12 Jakub Jelinek <jakub@redhat.com>
7543
+ * g++.dg/ipa/pr63838.C: New test.
7545
+2014-11-03 Marek Polacek <polacek@redhat.com>
7548
+ * gcc.dg/pr52769.c: New test.
7550
+2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7552
+ * gcc.target/aarch64/madd_after_asm_1.c: New test.
7554
+2014-10-15 Eric Botcazou <ebotcazou@adacore.com>
7556
+ * gnat.dg/opt41.adb: New test.
7557
+ * gnat.dg/opt41_pkg.ad[sb]: New helper.
7559
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7561
+ Backport from mainline r215880
7562
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7564
+ * g++.dg/ext/altivec-2.C: Compile with -Wno-deprecated to avoid
7565
+ failing with the new warning message.
7566
+ * gcc.dg/vmx/3c-01a.c: Likewise.
7567
+ * gcc.dg/vmx/ops-long-1.c: Likewise.
7568
+ * gcc.dg/vmx/ops.c: Likewise.
7569
+ * gcc.target/powerpc/altivec-20.c: Likewise.
7570
+ * gcc.target/powerpc/altivec-6.c: Likewise.
7571
+ * gcc.target/powerpc/altivec-vec-merge.c: Likewise.
7572
+ * gcc.target/powerpc/vsx-builtin-8.c: Likewise.
7573
+ * gcc.target/powerpc/warn-lvsl-lvsr.c: New test.
7575
+ Backport from mainline r215882
7576
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7578
+ * gcc.target/powerpc/lvsl-lvsr.c: New test.
7580
+ Backport from mainline r216017
7581
+ 2014-10-08 Pat Haugen <pthaugen@us.ibm.com>
7583
+ * gcc.dg/vmx/3c-01a.c: Add default options from vmx.exp.
7584
+ * gcc.dg/vmx/ops.c: Likewise.
7585
+ * gcc.dg/vmx/ops-long-1.c: Likewise.
7587
+2014-10-10 Jakub Jelinek <jakub@redhat.com>
7590
+ * gfortran.dg/gomp/pr59488-1.f90: New test.
7591
+ * gfortran.dg/gomp/pr59488-2.f90: New test.
7593
+2014-10-01 Jakub Jelinek <jakub@redhat.com>
7596
+ * gcc.dg/pr63342.c: New test.
7599
+ * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS
7600
+ to test 24 in TESTS.
7602
+2014-10-01 Uros Bizjak <ubizjak@gmail.com>
7604
+ Backport from mainline
7605
+ 2013-11-07 Joseph Myers <joseph@codesourcery.com>
7607
+ * lib/target-supports.exp
7608
+ (check_effective_target_fenv_exceptions): New function.
7610
+2014-09-30 Jakub Jelinek <jakub@redhat.com>
7612
+ PR inline-asm/63282
7613
+ * gcc.c-torture/compile/pr63282.c: New test.
7615
+2014-09-26 Jakub Jelinek <jakub@redhat.com>
7617
+ * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
7618
+ to default options.
7620
+2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7622
+ Backport from mainline r215559
7623
+ 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7626
+ * gcc.target/powerpc/pr63335.c: New test.
7628
+2014-09-25 Jakub Jelinek <jakub@redhat.com>
7630
+ PR tree-optimization/63341
7631
+ * gcc.dg/vect/pr63341-1.c: New test.
7632
+ * gcc.dg/vect/pr63341-2.c: New test.
7634
+2014-09-18 Joseph Myers <joseph@codesourcery.com>
7636
+ * gcc.dg/torture/float128-exact-underflow.c: New test.
7638
+2014-09-17 Jakub Jelinek <jakub@redhat.com>
7641
+ * gcc.dg/pr63284.c: New test.
7643
+2014-09-09 Richard Biener <rguenther@suse.de>
7645
+ Backport from mainline
7646
+ 2014-06-11 Richard Biener <rguenther@suse.de>
7648
+ PR tree-optimization/61452
7649
+ * gcc.dg/torture/pr61452.c: New testcase.
7651
+2014-09-09 Richard Biener <rguenther@suse.de>
7653
+ Backport from mainline
7654
+ 2014-05-05 Richard Biener <rguenther@suse.de>
7656
+ PR middle-end/61010
7657
+ * gcc.dg/torture/pr61010.c: New testcase.
7659
+ 2014-05-28 Richard Biener <rguenther@suse.de>
7661
+ PR middle-end/61045
7662
+ * gcc.dg/pr61045.c: New testcase.
7664
+ 2014-08-11 Richard Biener <rguenther@suse.de>
7666
+ PR tree-optimization/62075
7667
+ * gcc.dg/vect/pr62075.c: New testcase.
7669
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
7671
+ PR tree-optimization/60196
7672
+ PR tree-optimization/63189
7673
+ * gcc.dg/vect/pr63189.c: New test.
7674
+ * gcc.dg/vect/pr60196-1.c: New test.
7675
+ * gcc.dg/vect/pr60196-2.c: New test.
7677
+ Backported from mainline
7678
+ 2013-09-17 Cong Hou <congh@google.com>
7680
+ * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product
7681
+ on two arrays with short and int types. This should not be recognized
7682
+ as a dot product pattern.
7684
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
7686
+ Backported from mainline
7687
+ 2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
7690
+ * gcc.target/i386/pr61923.c: New test.
7692
+2014-09-06 John David Anglin <danglin@gcc.gnu.org>
7694
+ PR testsuite/56194
7695
+ * g++.dg/init/const9.C: Skip scan-assembler-not "rodata" on hppa*-*-*.
7697
+2014-09-03 Marek Polacek <polacek@redhat.com>
7699
+ Backport from mainline
7700
+ 2014-09-02 Marek Polacek <polacek@redhat.com>
7703
+ * gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
7705
+2014-09-03 Martin Jambor <mjambor@suse.cz>
7708
+ * g++.dg/ipa/pr62015.C: New test.
7710
+2014-09-03 Martin Jambor <mjambor@suse.cz>
7713
+ * gcc.dg/ipa/pr61986.c: New test.
7715
+2014-08-26 Dominik Vogt <vogt@linux.vnet.ibm.com>
7717
+ * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
7718
+ failure on s390*-*-linux-gnu.
7720
+2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
7722
+ Backport from mainline
7723
+ 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
7726
+ * gcc.target/sh/pr61996.c: New.
7728
+2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
7730
+ Backport from trunk
7732
+ * gfortran.dg/array_assignment_5.f90: New test.
7734
+2014-08-15 Tom de Vries <tom@codesourcery.com>
7736
+ Backport from mainline:
7737
+ 2014-08-14 Tom de Vries <tom@codesourcery.com>
7739
+ PR rtl-optimization/62004
7740
+ PR rtl-optimization/62030
7741
+ * gcc.dg/pr62004.c: New test.
7742
+ * gcc.dg/pr62030.c: Same.
7743
+ * gcc.target/mips/pr62030-octeon.c: Same.
7745
+2014-08-13 Felix Yang <fei.yang0953@gmail.com>
7747
+ PR tree-optimization/62073
7748
+ * gcc.dg/vect/pr62073.c: New test.
7750
+2014-08-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
7752
+ Backport from mainline
7753
+ 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
7755
+ PR middle-end/62103
7756
+ * gcc.c-torture/execute/bitfld-6.c: New test.
7758
+2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
7760
+ Backport from trunk
7762
+ * gfortran.dg/dot_product_3.f90: New test case.
7764
+2014-08-07 John David Anglin <danglin@gcc.gnu.org>
7766
+ PR tree-optimization/60707
7767
+ * gfortran.dg/pr45636.f90: xfail on 32-bit hppa*-*-*.
7769
+2014-08-06 Jakub Jelinek <jakub@redhat.com>
7771
+ PR rtl-optimization/61801
7772
+ * gcc.target/i386/pr61801.c: Rewritten.
7774
+2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
7776
+ Backport from mainline
7777
+ 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
7779
+ PR tree-optimization/61375
7780
+ * gcc.c-torture/execute/pr61375-1.c: New test.
7782
+2014-08-01 Richard Biener <rguenther@suse.de>
7784
+ PR tree-optimization/61964
7785
+ * gcc.dg/torture/pr61964.c: New testcase.
7786
+ * gcc.dg/pr51879-18.c: XFAIL.
7788
+2014-07-28 Richard Biener <rguenther@suse.de>
7790
+ PR rtl-optimization/61801
7791
+ * gcc.target/i386/pr61801.c: Fix testcase.
7793
+2014-07-28 Richard Biener <rguenther@suse.de>
7795
+ PR rtl-optimization/61801
7796
+ * gcc.target/i386/pr61801.c: New testcase.
7798
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7800
+ Backport from mainline:
7801
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7803
+ * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
7805
+ * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
7806
+ * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
7807
+ * gcc.c-torture/execute/20050316-3.x: New file. Add -Wno-psabi.
7808
+ * gcc.c-torture/execute/pr23135.x: Likewise.
7810
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7812
+ Backport from mainline:
7813
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7815
+ * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
7817
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7819
+ Backport from mainline:
7820
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7822
+ * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
7824
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7826
+ Backport from mainline:
7827
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7829
+ * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
7831
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
7833
+ * gcc.dg/stack-usage-2.c: Adjust.
7835
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
7837
+ Backport from trunk.
7839
+ * gfortran.dg/dependency_44.f90 : New test
7841
+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
7843
+ * gnat.dg/opt39.adb: New test.
7845
+2014-07-08 Paul Thomas <pault@gcc.gnu.org>
7849
+ * gfortran.dg/allocatable_function_8.f90 : New test
7851
+2014-07-04 Jakub Jelinek <jakub@redhat.com>
7853
+ PR tree-optimization/61684
7854
+ * gcc.c-torture/compile/pr61684.c: New test.
7856
+2014-07-02 Jakub Jelinek <jakub@redhat.com>
7857
+ Fritz Reese <Reese-Fritz@zai.com>
7859
+ * gfortran.dg/oldstyle_5.f: New test.
7861
+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
7863
+ Backport from mainline
7864
+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
7866
+ PR tree-optimization/61306
7867
+ * gcc.c-torture/execute/pr61306-1.c: New test.
7868
+ * gcc.c-torture/execute/pr61306-2.c: Likewise.
7869
+ * gcc.c-torture/execute/pr61306-3.c: Likewise.
7871
+2014-06-27 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7873
+ * gfortran.dg/nint_2.f90: Don't XFAIL for powerpc64le-*-linux*.
7875
+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
7877
+ Backport from mainline
7878
+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
7881
+ * gcc.target/alpha/pr61586.c: New test.
7883
+2014-06-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7885
+ * gfortran.dg/default_format_denormal_2.f90: Remove xfail for
7886
+ powerpc*-*-linux*.
7888
+2014-06-18 Uros Bizjak <ubizjak@gmail.com>
7890
+ Backport from mainline
7891
+ 2014-06-13 Ilya Enkovich <ilya.enkovich@intel.com>
7893
+ PR rtl-optimization/61094
7894
+ PR rtl-optimization/61446
7895
+ * gcc.target/i386/pr61446.c : New.
7897
+ Backport from mainline
7898
+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
7901
+ * gcc.target/i386/pr61423.c: New test.
7903
+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
7905
+ Backport from mainline
7908
+ * gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
7909
+ * gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
7910
+ * gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
7911
+ * gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.
7913
+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7915
+ Backport from trunk.
7917
+ * gfortran.dg/cray_pointers_10.f90: New file.
7919
+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
7921
+ Backport from mainline
7923
+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
7925
+ * lib/target-supports.exp (check_effective_target_longdouble128): New.
7926
+ * gcc.target/powerpc/pack02.c: Use it.
7927
+ * gcc.target/powerpc/tfmode_off.c: Likewise.
7929
+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
7931
+ Backport from 2014-06-12 trunk r211491
7934
+ * gcc.target/avr/torture/pr61443.c: New test.
7936
+2014-06-04 Richard Biener <rguenther@suse.de>
7938
+ PR tree-optimization/61383
7939
+ * gcc.dg/torture/pr61383-1.c: New testcase.
7941
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
7943
+ Backport from mainline
7944
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
7946
+ PR rtl-optimization/60866
7947
+ * gcc.dg/pr60866.c: New test.
7949
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
7951
+ Backport from mainline
7952
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
7954
+ PR rtl-optimization/60901
7955
+ * gcc.target/i386/pr60901.c: New test.
7957
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
7959
+ Backport from mainline
7960
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
7962
+ * gnat.dg/overflow_fixed.adb: New test.
7964
+2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
7966
+ * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
7968
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
7970
+ Backport from mainline
7971
+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
7973
+ * gcc.target/powerpc/htm-ttest.c: New test.
7975
2014-05-22 Release Manager
7977
* GCC 4.8.3 released.
7978
Index: gcc/testsuite/g++.dg/rtti/dyncast7.C
7979
===================================================================
7980
--- a/src/gcc/testsuite/g++.dg/rtti/dyncast7.C (.../tags/gcc_4_8_3_release)
7981
+++ b/src/gcc/testsuite/g++.dg/rtti/dyncast7.C (.../branches/gcc-4_8-branch)
7983
+// I think this dynamic_cast has undefined behavior when destroying E::o
7984
+// because we're the F period of destruction has started and ap doesn't
7985
+// point to the object currently being destroyed--but the reasonable
7986
+// options are success or failure, not SEGV.
7990
+extern "C" void abort();
7992
+struct A { virtual ~A(); };
7993
+struct B { virtual ~B() { } };
7994
+struct C : B, A { };
7995
+struct E : virtual B { A o; };
7996
+struct F : virtual C, virtual E { };
8002
+ C* cp2 = dynamic_cast<C*>(ap);
8003
+ if (cp2 != cp && cp2 != 0)
8011
Index: gcc/testsuite/g++.dg/ext/altivec-2.C
8012
===================================================================
8013
--- a/src/gcc/testsuite/g++.dg/ext/altivec-2.C (.../tags/gcc_4_8_3_release)
8014
+++ b/src/gcc/testsuite/g++.dg/ext/altivec-2.C (.../branches/gcc-4_8-branch)
8016
/* { dg-do compile { target powerpc*-*-* } } */
8017
/* { dg-require-effective-target powerpc_altivec_ok } */
8018
-/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable" } */
8019
+/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable -Wno-deprecated" } */
8021
/* This test checks if AltiVec builtins accept const-qualified
8023
Index: gcc/testsuite/g++.dg/ext/stmtexpr16.C
8024
===================================================================
8025
--- a/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../tags/gcc_4_8_3_release)
8026
+++ b/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../branches/gcc-4_8-branch)
8029
+// { dg-options "-std=gnu++11" }
8035
+ // without '+0', gcc 4.6 gives a different error (no ICE though)
8036
+ decltype(({ int y = x; y; })+0) v1 = 0;
8038
Index: gcc/testsuite/g++.dg/expr/cond12.C
8039
===================================================================
8040
--- a/src/gcc/testsuite/g++.dg/expr/cond12.C (.../tags/gcc_4_8_3_release)
8041
+++ b/src/gcc/testsuite/g++.dg/expr/cond12.C (.../branches/gcc-4_8-branch)
8047
+ X& operator=(const X&){}
8048
+ X& operator=(X&){__builtin_abort();}
8051
+int main(int argv,char**) {
8053
+ ((argv > 2) ? a : b) = X();
8055
Index: gcc/testsuite/g++.dg/init/const9.C
8056
===================================================================
8057
--- a/src/gcc/testsuite/g++.dg/init/const9.C (.../tags/gcc_4_8_3_release)
8058
+++ b/src/gcc/testsuite/g++.dg/init/const9.C (.../branches/gcc-4_8-branch)
8061
-// { dg-final { scan-assembler-not "rodata" } }
8062
+// { dg-final { scan-assembler-not "rodata" { target { ! hppa*-*-* } } } }
8066
Index: gcc/testsuite/g++.dg/tree-ssa/pr63841.C
8067
===================================================================
8068
--- a/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C (.../tags/gcc_4_8_3_release)
8069
+++ b/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C (.../branches/gcc-4_8-branch)
8071
+/* { dg-do run } */
8072
+/* { dg-options "-O2" } */
8076
+std::string __attribute__ ((noinline)) comp_test_write() {
8079
+ for (int i = 0; i < 2; ++i) {
8080
+ char b = 1 >> (i * 8);
8081
+ data.append(&b, 1);
8087
+std::string __attribute__ ((noinline)) comp_test_write_good() {
8091
+ for (int i = 0; i < 2; ++i) {
8093
+ data.append(&b, 1);
8100
+ std::string good = comp_test_write_good();
8101
+ std::string bad = comp_test_write();
8104
+ __builtin_abort ();
8106
Index: gcc/testsuite/g++.dg/tls/thread_local10.C
8107
===================================================================
8108
--- a/src/gcc/testsuite/g++.dg/tls/thread_local10.C (.../tags/gcc_4_8_3_release)
8109
+++ b/src/gcc/testsuite/g++.dg/tls/thread_local10.C (.../branches/gcc-4_8-branch)
8113
+// { dg-do run { target c++11 } }
8114
+// { dg-add-options tls }
8115
+// { dg-require-effective-target tls_runtime }
8119
+template <typename> struct A
8121
+ static thread_local int s;
8126
+int f() { return 42; }
8127
+template <typename T> thread_local int A<T>::s = f();
8132
+ __builtin_abort();
8134
Index: gcc/testsuite/g++.dg/parse/typename7.C
8135
===================================================================
8136
--- a/src/gcc/testsuite/g++.dg/parse/typename7.C (.../tags/gcc_4_8_3_release)
8137
+++ b/src/gcc/testsuite/g++.dg/parse/typename7.C (.../branches/gcc-4_8-branch)
8142
- template<typename> void foo(int); // { dg-message "note" }
8143
- template<typename T> void bar(T t) { // { dg-message "note" }
8144
+ template<typename> void foo(int);
8145
+ template<typename T> void bar(T t) {
8146
this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
8147
- // { dg-message "candidate" "candidate note" { target *-*-* } 12 }
8148
template<typename T> void bad(T t) {
8149
foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
8154
A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" }
8155
- // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
8157
B<typename T>::bar(t); } // { dg-error "invalid|not a template" }
8159
Index: gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
8160
===================================================================
8161
--- a/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C (.../tags/gcc_4_8_3_release)
8162
+++ b/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C (.../branches/gcc-4_8-branch)
8164
-void f (int i, int p[i]); // { dg-error "use of parameter .i. outside function body" }
8165
+void f (int i, int p[i]); // { dg-error "use of parameter.*outside function body" }
8166
// { dg-prune-output "array bound" }
8167
Index: gcc/testsuite/g++.dg/parse/ambig7.C
8168
===================================================================
8169
--- a/src/gcc/testsuite/g++.dg/parse/ambig7.C (.../tags/gcc_4_8_3_release)
8170
+++ b/src/gcc/testsuite/g++.dg/parse/ambig7.C (.../branches/gcc-4_8-branch)
8176
+ Helper(int a, void (*pfunc)());
8179
+template <int I> void function();
8184
+Helper testOk(A, function<A>);
8185
+Helper testOk2(int(A), function<B>);
8186
+Helper testOk3((int(A)), function<A>);
8187
+Helper testFail(int(A), function<A>);
8188
Index: gcc/testsuite/g++.dg/compat/struct-layout-1.exp
8189
===================================================================
8190
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp (.../tags/gcc_4_8_3_release)
8191
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp (.../branches/gcc-4_8-branch)
8193
# This must be done after the compat-use-*-compiler definitions.
8196
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
8197
+load_lib g++-dg.exp
8201
# Save variables for the C++ compiler under test, which each test will
8202
Index: gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
8203
===================================================================
8204
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (.../tags/gcc_4_8_3_release)
8205
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (.../branches/gcc-4_8-branch)
8207
/* Structure layout test generator.
8208
- Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
8209
+ Copyright (C) 2004-2014
8210
Free Software Foundation, Inc.
8211
Contributed by Jakub Jelinek <jakub@redhat.com>.
8216
const char *dg_options[] = {
8217
-"/* { dg-options \"%s-I%s\" } */\n",
8218
+"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
8219
"/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
8220
"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
8221
"/* { 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",
8222
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
8223
===================================================================
8224
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../tags/gcc_4_8_3_release)
8225
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../branches/gcc-4_8-branch)
8228
+// { dg-do compile { target c++11 } }
8230
+template <class Coord> struct BasePoint
8233
+ constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
8235
+template <class T> struct BaseCoord
8238
+ constexpr BaseCoord (T) : value (1) {}
8240
+template <class units> struct IntCoordTyped : BaseCoord<int>, units
8242
+ typedef BaseCoord Super;
8243
+ constexpr IntCoordTyped (int) : Super (0) {}
8245
+template <class units>
8246
+struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
8248
+ typedef BasePoint<IntCoordTyped<units> > Super;
8249
+ constexpr IntPointTyped (int, int) : Super (0, 0) {}
8254
+IntPointTyped<A> a (0, 0);
8255
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
8256
===================================================================
8257
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C (.../tags/gcc_4_8_3_release)
8258
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C (.../branches/gcc-4_8-branch)
8261
+// { dg-options "-std=c++11 -Wall" }
8266
+ return [&]() -> int {int __t; __t = t; return __t; }();
8267
+ return [&t]() -> int {int __t; __t = t; return __t; }();
8269
Index: gcc/testsuite/g++.dg/cpp0x/variadic158.C
8270
===================================================================
8271
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../tags/gcc_4_8_3_release)
8272
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../branches/gcc-4_8-branch)
8275
+// { dg-do compile { target c++11 } }
8279
+template <typename>
8281
+ typedef const char* name;
8284
+template <typename VT, typename... Fields>
8285
+void New(const char* name,
8286
+ typename Fixed<Fields>::name... field_names);
8288
+template <typename VT, typename... Fields>
8289
+void CreateMetric(const char* name,
8290
+ typename Fixed<Fields>::name... field_names,
8296
+ CreateMetric<int, const char*>("abcd", "def", Base());
8298
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C
8299
===================================================================
8300
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C (.../tags/gcc_4_8_3_release)
8301
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C (.../branches/gcc-4_8-branch)
8304
+// { dg-do compile { target c++11 } }
8306
+template <typename T>
8308
+ static constexpr int value = int(T{});
8310
Index: gcc/testsuite/g++.dg/cpp0x/variadic160.C
8311
===================================================================
8312
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../tags/gcc_4_8_3_release)
8313
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../branches/gcc-4_8-branch)
8316
+// { dg-do compile { target c++11 } }
8318
+template <typename _CharT> class A;
8319
+template <typename> class B;
8320
+template <class charT> class C;
8321
+template <> class C<char>
8323
+ virtual void xparse (int &, const B<A<char> > &) const;
8325
+template <class T, class charT = char> class G : C<charT>
8329
+ void default_value (const T &);
8330
+ void xparse (int &, const B<A<charT> > &) const;
8332
+template <class T, class charT>
8333
+void validate (int &, const B<A<charT> > &, T *, int);
8334
+template <class T, class charT>
8335
+void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
8337
+ validate (p1, p2, (T *)0, 0);
8339
+template <class T> G<T> *value (T *) { return new G<T>(0); }
8342
+template <typename T> struct D;
8343
+template <typename, int, int, int = 0, int = 0, int = 0 > class F;
8344
+template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
8346
+struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
8348
+ typedef _Scalar Scalar;
8350
+template <typename, int, int, int, int, int _MaxCols> class F
8353
+ typedef typename Eigen::D<F>::Scalar Scalar;
8354
+ F (const Scalar &, const Scalar &, const Scalar &);
8356
+template <class... T>
8357
+void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
8359
+int main (int, char *[])
8361
+ Eigen::F<double, 3, 1> a (0, 0, 0);
8362
+ value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
8364
Index: gcc/testsuite/g++.dg/cpp0x/rv-cond1.C
8365
===================================================================
8366
--- a/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../tags/gcc_4_8_3_release)
8367
+++ b/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../branches/gcc-4_8-branch)
8370
+// { dg-do compile { target c++11 } }
8373
+ X& operator=(const X&) = delete;
8374
+ X& operator=(X&& ) = default;
8379
+ *(t ? &a : &b) = X();
8380
+ (t ? a : b) = X();
8382
Index: gcc/testsuite/g++.dg/cpp0x/overload3.C
8383
===================================================================
8384
--- a/src/gcc/testsuite/g++.dg/cpp0x/overload3.C (.../tags/gcc_4_8_3_release)
8385
+++ b/src/gcc/testsuite/g++.dg/cpp0x/overload3.C (.../branches/gcc-4_8-branch)
8388
+// { dg-options "-std=c++11" }
8392
+void f(X&&); // { dg-message "void f" }
8396
+ operator const X&() const;
8402
+ f(w); // { dg-error "lvalue" }
8404
Index: gcc/testsuite/g++.dg/ipa/pr63838.C
8405
===================================================================
8406
--- a/src/gcc/testsuite/g++.dg/ipa/pr63838.C (.../tags/gcc_4_8_3_release)
8407
+++ b/src/gcc/testsuite/g++.dg/ipa/pr63838.C (.../branches/gcc-4_8-branch)
8411
+// { dg-options "-O2 -fdump-ipa-pure-const" }
8412
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void foo" "pure-const" } }
8413
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void bar" "pure-const" } }
8414
+// { dg-final { cleanup-ipa-dump "pure-const" } }
8416
+__attribute__((noinline, noclone)) static void bar (int);
8419
+struct S { S () { v++; } ~S () { v++; } };
8421
+__attribute__((noinline, noclone)) static void
8429
+__attribute__((noinline, noclone)) static void
8439
+__attribute__((noinline, noclone)) int
8456
+ asm volatile ("" : : : "memory");
8465
Index: gcc/testsuite/g++.dg/ipa/pr62015.C
8466
===================================================================
8467
--- a/src/gcc/testsuite/g++.dg/ipa/pr62015.C (.../tags/gcc_4_8_3_release)
8468
+++ b/src/gcc/testsuite/g++.dg/ipa/pr62015.C (.../branches/gcc-4_8-branch)
8470
+/* { dg-do run } */
8471
+/* { dg-options "-O3 -std=c++11" } */
8474
+extern "C" int printf(const char *fmt, ...);
8475
+extern "C" void abort(void);
8478
+ enum _Value { Left, Right, Invalid };
8480
+ constexpr Side() : _value(Invalid) {}
8481
+ constexpr Side(_Value value) : _value(value) {}
8482
+ operator _Value() const { return (_Value)_value; }
8490
+ void adjust(Side side, bool final);
8491
+ void move(Side side);
8496
+ adjust(Side::Invalid, false);
8499
+static void __attribute__((noinline))
8500
+check (int v, int final)
8507
+__attribute__((noinline))
8508
+void A::adjust(Side side, bool final)
8510
+ check ((int)side, final);
8513
+void A::move(Side side)
8515
+ adjust(side, false);
8516
+ adjust(side, true);
8522
+ t.move(Side::Left);
8525
Index: gcc/testsuite/g++.dg/template/local-fn1.C
8526
===================================================================
8527
--- a/src/gcc/testsuite/g++.dg/template/local-fn1.C (.../tags/gcc_4_8_3_release)
8528
+++ b/src/gcc/testsuite/g++.dg/template/local-fn1.C (.../branches/gcc-4_8-branch)
8532
+template <typename T = int>
8538
Index: gcc/testsuite/g++.dg/template/conv14.C
8539
===================================================================
8540
--- a/src/gcc/testsuite/g++.dg/template/conv14.C (.../tags/gcc_4_8_3_release)
8541
+++ b/src/gcc/testsuite/g++.dg/template/conv14.C (.../branches/gcc-4_8-branch)
8547
+template<typename Container, typename Key>
8550
+template<typename Container, typename Key, typename KeyStore = Key>
8556
+ Variant(Container st, const Key& i) : index(i), state(st) {}
8558
+ template<typename T>
8559
+ operator T() const {
8560
+ return Accessor<Container, KeyStore>::template get<T>(state, index);
8564
+class AutoCleanVariant : public Variant<XX*, int> {
8566
+ AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
8568
+ template<typename T>
8569
+ operator T() const {
8570
+ return Variant<XX*, int>::operator T();
8573
Index: gcc/testsuite/g++.dg/template/friend55.C
8574
===================================================================
8575
--- a/src/gcc/testsuite/g++.dg/template/friend55.C (.../tags/gcc_4_8_3_release)
8576
+++ b/src/gcc/testsuite/g++.dg/template/friend55.C (.../branches/gcc-4_8-branch)
8580
+template <int I> struct A;
8581
+template <int I> class B {
8583
+ template <int A_S> friend void A<A_S>::impl();
8587
+template<int I>struct A { void impl(); };
8590
+template<int I> void A<I>::impl() { ++b1.i; ++b2.i; }
8596
Index: gcc/testsuite/g++.dg/template/memclass5.C
8597
===================================================================
8598
--- a/src/gcc/testsuite/g++.dg/template/memclass5.C (.../tags/gcc_4_8_3_release)
8599
+++ b/src/gcc/testsuite/g++.dg/template/memclass5.C (.../branches/gcc-4_8-branch)
8603
+template <typename T>
8606
+ template <typename U>
8609
+ typedef T result2;
8612
+ typedef y<int> zy;
8619
+ typedef double result2;
8624
+ x<int>::zy::result2 xxx;
8625
+ x<int>::y<int>::result2 xxx2;
8627
Index: gcc/testsuite/g++.dg/template/ptrmem27.C
8628
===================================================================
8629
--- a/src/gcc/testsuite/g++.dg/template/ptrmem27.C (.../tags/gcc_4_8_3_release)
8630
+++ b/src/gcc/testsuite/g++.dg/template/ptrmem27.C (.../branches/gcc-4_8-branch)
8638
+ int foo(int X::* ptr);
8640
+ template <int X::* ptr>
8644
+int X::foo(int X::* ptr) {
8645
+ int* p = &(this->*ptr); // OK.
8649
+template <int X::* ptr>
8651
+ int* p = &(this->*ptr); // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
8654
Index: gcc/testsuite/c-c++-common/pr56493.c
8655
===================================================================
8656
--- a/src/gcc/testsuite/c-c++-common/pr56493.c (.../tags/gcc_4_8_3_release)
8657
+++ b/src/gcc/testsuite/c-c++-common/pr56493.c (.../branches/gcc-4_8-branch)
8660
+/* { dg-do compile } */
8661
+/* { dg-options "-O2 -fdump-tree-gimple" } */
8663
+unsigned long long bar (void);
8672
+/* Verify we narrow the addition from unsigned long long to unsigned int type. */
8673
+/* { dg-final { scan-tree-dump " (\[a-zA-Z._0-9]*) = \\(unsigned int\\) \[^;\n\r]*;.* (\[a-zA-Z._0-9]*) = \\(unsigned int\\) \[^;\n\r]*;.* = \\1 \\+ \\2;" "gimple" { target { ilp32 || lp64 } } } } */
8674
+/* { dg-final { cleanup-tree-dump "gimple" } } */
8675
Index: gcc/testsuite/c-c++-common/gomp/pr61200.c
8676
===================================================================
8677
--- a/src/gcc/testsuite/c-c++-common/gomp/pr61200.c (.../tags/gcc_4_8_3_release)
8678
+++ b/src/gcc/testsuite/c-c++-common/gomp/pr61200.c (.../branches/gcc-4_8-branch)
8680
+/* PR libgomp/61200 */
8686
+ #pragma omp parallel
8688
+ __builtin_abort ();
8689
+ #pragma omp task shared(var)
8693
Index: gcc/cp/tree.c
8694
===================================================================
8695
--- a/src/gcc/cp/tree.c (.../tags/gcc_4_8_3_release)
8696
+++ b/src/gcc/cp/tree.c (.../branches/gcc-4_8-branch)
8699
return lvalue_kind (TREE_OPERAND (ref, 0));
8702
+ case DOTSTAR_EXPR:
8703
+ if (TREE_CODE (ref) == MEMBER_REF)
8704
+ op1_lvalue_kind = clk_ordinary;
8706
+ op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
8707
+ if (TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (ref, 1))))
8708
+ op1_lvalue_kind = clk_none;
8709
+ return op1_lvalue_kind;
8712
op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
8713
/* Look at the member designator. */
8714
@@ -3738,6 +3748,10 @@
8716
init_expr = get_target_expr (exp);
8717
exp = TARGET_EXPR_SLOT (init_expr);
8718
+ if (CLASS_TYPE_P (TREE_TYPE (exp)))
8721
+ exp = rvalue (exp);
8725
Index: gcc/cp/ChangeLog
8726
===================================================================
8727
--- a/src/gcc/cp/ChangeLog (.../tags/gcc_4_8_3_release)
8728
+++ b/src/gcc/cp/ChangeLog (.../branches/gcc-4_8-branch)
8730
+2014-10-15 Jason Merrill <jason@redhat.com>
8734
+ * parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
8735
+ committed to this tentative parse.
8738
+ * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
8739
+ (iterative_hash_template_arg): Likewise.
8742
+ * semantics.c (finish_member_declaration): Don't push closure
8746
+ * pt.c (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
8747
+ * semantics.c (finish_id_expression): Don't call TLS wrapper in a
8750
+2014-08-07 Jason Merrill <jason@redhat.com>
8753
+ * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
8756
+ * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
8758
+2014-01-27 Jason Merrill <jason@redhat.com>
8762
+ * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
8763
+ list-initialization. A conversion to rvalue ref that involves
8764
+ an lvalue-rvalue conversion is bad.
8765
+ (convert_like_real): Give helpful error message.
8767
+2014-01-29 Jason Merrill <jason@redhat.com>
8770
+ * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
8771
+ have a friend template in a class template.
8772
+ * pt.c (tsubst_friend_function): Look through it.
8773
+ (push_template_decl_real): A friend member template is
8776
+2014-02-21 Jason Merrill <jason@redhat.com>
8779
+ * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
8780
+ of the partial instantiation, not the most general template.
8781
+ (maybe_process_partial_specialization): Reassign everything on
8784
+2014-03-05 Jason Merrill <jason@redhat.com>
8787
+ * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
8788
+ if re-parsing might succeed.
8789
+ * semantics.c (finish_id_expression): Use of a parameter outside
8790
+ the function body is a parse error.
8792
+2014-06-30 Jason Merrill <jason@redhat.com>
8795
+ * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
8798
+ * pt.c (unify_one_argument): Type/expression mismatch just causes
8799
+ deduction failure.
8802
+ * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
8804
+2014-06-17 Jason Merrill <jason@redhat.com>
8807
+ * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
8809
+2014-06-02 Jason Merrill <jason@redhat.com>
8812
+ * pt.c (pack_deducible_p): Handle canonicalization.
8814
2014-05-22 Release Manager
8816
* GCC 4.8.3 released.
8818
===================================================================
8819
--- a/src/gcc/cp/pt.c (.../tags/gcc_4_8_3_release)
8820
+++ b/src/gcc/cp/pt.c (.../branches/gcc-4_8-branch)
8821
@@ -907,11 +907,13 @@
8822
t; t = TREE_CHAIN (t))
8824
tree inst = TREE_VALUE (t);
8825
- if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst))
8826
+ if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst)
8827
+ || !COMPLETE_OR_OPEN_TYPE_P (inst))
8829
/* We already have a full specialization of this partial
8830
- instantiation. Reassign it to the new member
8831
- specialization template. */
8832
+ instantiation, or a full specialization has been
8833
+ looked up but not instantiated. Reassign it to the
8834
+ new member specialization template. */
8842
- else if (COMPLETE_OR_OPEN_TYPE_P (inst))
8844
/* But if we've had an implicit instantiation, that's a
8845
problem ([temp.expl.spec]/6). */
8846
error ("specialization %qT after instantiation %qT",
8847
@@ -1569,6 +1571,7 @@
8851
+ iterative_hash_template_arg (TREE_TYPE (arg), val);
8852
FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (arg), i, field, value)
8854
val = iterative_hash_template_arg (field, val);
8855
@@ -4308,7 +4311,8 @@
8856
in the template-parameter-list of the definition of a member of a
8859
- if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL)
8860
+ if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
8861
+ || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
8862
/* You can't have a function template declaration in a local
8863
scope, nor you can you define a member of a class template in a
8865
@@ -4572,7 +4576,8 @@
8866
DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
8868
/* See if this is a primary template. */
8869
- if (is_friend && ctx)
8870
+ if (is_friend && ctx
8871
+ && uses_template_parms_level (ctx, processing_template_decl))
8872
/* A friend template that specifies a class context, i.e.
8873
template <typename T> friend void A<T>::f();
8875
@@ -7454,7 +7459,7 @@
8878
/* Let's consider the explicit specialization of a member
8879
- of a class template specialization that is implicitely instantiated,
8880
+ of a class template specialization that is implicitly instantiated,
8884
@@ -7552,9 +7557,9 @@
8886
/* Note this use of the partial instantiation so we can check it
8887
later in maybe_process_partial_specialization. */
8888
- DECL_TEMPLATE_INSTANTIATIONS (templ)
8889
+ DECL_TEMPLATE_INSTANTIATIONS (found)
8890
= tree_cons (arglist, t,
8891
- DECL_TEMPLATE_INSTANTIATIONS (templ));
8892
+ DECL_TEMPLATE_INSTANTIATIONS (found));
8894
if (TREE_CODE (template_type) == ENUMERAL_TYPE && !is_dependent_type)
8895
/* Now that the type has been registered on the instantiations
8896
@@ -8289,10 +8294,17 @@
8898
if (COMPLETE_TYPE_P (context))
8900
+ tree fn = new_friend;
8901
+ /* do_friend adds the TEMPLATE_DECL for any member friend
8902
+ template even if it isn't a member template, i.e.
8903
+ template <class T> friend A<T>::f();
8904
+ Look through it in that case. */
8905
+ if (TREE_CODE (fn) == TEMPLATE_DECL
8906
+ && !PRIMARY_TEMPLATE_P (fn))
8907
+ fn = DECL_TEMPLATE_RESULT (fn);
8908
/* Check to see that the declaration is really present, and,
8909
possibly obtain an improved declaration. */
8910
- tree fn = check_classfn (context,
8911
- new_friend, NULL_TREE);
8912
+ fn = check_classfn (context, fn, NULL_TREE);
8916
@@ -14488,6 +14500,16 @@
8919
tree r = tsubst_copy (t, args, complain, in_decl);
8920
+ if (TREE_CODE (r) == VAR_DECL
8921
+ && !processing_template_decl
8922
+ && !cp_unevaluated_operand
8923
+ && DECL_THREAD_LOCAL_P (r))
8925
+ if (tree wrap = get_tls_wrapper_fn (r))
8926
+ /* Replace an evaluated use of the thread_local variable with
8927
+ a call to its wrapper. */
8928
+ r = build_cxx_call (wrap, 0, NULL, tf_warning_or_error);
8931
if (TREE_CODE (TREE_TYPE (t)) != REFERENCE_TYPE)
8932
/* If the original type was a reference, we'll be wrapped in
8933
@@ -14934,7 +14956,7 @@
8935
for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
8936
packs; packs = TREE_CHAIN (packs))
8937
- if (TREE_VALUE (packs) == parm)
8938
+ if (template_args_equal (TREE_VALUE (packs), parm))
8940
/* The template parameter pack is used in a function parameter
8941
pack. If this is the end of the parameter list, the
8942
@@ -15502,8 +15524,9 @@
8943
maybe_adjust_types_for_deduction (strict, &parm, &arg, arg_expr);
8946
- gcc_assert ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
8947
- == (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL));
8948
+ if ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
8949
+ != (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL))
8950
+ return unify_template_argument_mismatch (explain_p, parm, arg);
8952
/* For deduction from an init-list we need the actual list. */
8953
if (arg_expr && BRACE_ENCLOSED_INITIALIZER_P (arg_expr))
8954
@@ -19804,6 +19827,8 @@
8958
+ if (dependent_type_p (TREE_TYPE (expression)))
8960
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (expression), ix, val)
8961
if (value_dependent_expression_p (val))
8963
@@ -20009,7 +20034,12 @@
8966
if (BASELINK_P (expression))
8967
- expression = BASELINK_FUNCTIONS (expression);
8969
+ if (BASELINK_OPTYPE (expression)
8970
+ && dependent_type_p (BASELINK_OPTYPE (expression)))
8972
+ expression = BASELINK_FUNCTIONS (expression);
8975
if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
8977
Index: gcc/cp/semantics.c
8978
===================================================================
8979
--- a/src/gcc/cp/semantics.c (.../tags/gcc_4_8_3_release)
8980
+++ b/src/gcc/cp/semantics.c (.../branches/gcc-4_8-branch)
8981
@@ -2735,8 +2735,10 @@
8985
- /* Enter the DECL into the scope of the class. */
8986
- else if (pushdecl_class_level (decl))
8987
+ /* Enter the DECL into the scope of the class, if the class
8988
+ isn't a closure (whose fields are supposed to be unnamed). */
8989
+ else if (CLASSTYPE_LAMBDA_EXPR (current_class_type)
8990
+ || pushdecl_class_level (decl))
8992
if (TREE_CODE (decl) == USING_DECL)
8994
@@ -3108,7 +3110,7 @@
8995
&& DECL_CONTEXT (decl) == NULL_TREE
8996
&& !cp_unevaluated_operand)
8998
- error ("use of parameter %qD outside function body", decl);
8999
+ *error_msg = "use of parameter outside function body";
9000
return error_mark_node;
9003
@@ -3343,6 +3345,7 @@
9005
if (TREE_CODE (decl) == VAR_DECL
9006
&& !cp_unevaluated_operand
9007
+ && !processing_template_decl
9008
&& DECL_THREAD_LOCAL_P (decl)
9009
&& (wrap = get_tls_wrapper_fn (decl)))
9011
@@ -7296,7 +7299,9 @@
9012
constructor_elt *inner = base_field_constructor_elt (n, ce->index);
9015
- else if (ce->index && TREE_CODE (ce->index) == NOP_EXPR)
9016
+ else if (ce->index
9017
+ && (TREE_CODE (ce->index) == NOP_EXPR
9018
+ || TREE_CODE (ce->index) == POINTER_PLUS_EXPR))
9020
/* This is an initializer for an empty base; now that we've
9021
checked that it's constant, we can ignore it. */
9022
Index: gcc/cp/parser.c
9023
===================================================================
9024
--- a/src/gcc/cp/parser.c (.../tags/gcc_4_8_3_release)
9025
+++ b/src/gcc/cp/parser.c (.../branches/gcc-4_8-branch)
9026
@@ -12831,7 +12831,12 @@
9027
the effort required to do the parse, nor will we issue duplicate
9028
error messages about problems during instantiation of the
9032
+ /* Don't do this if we had a parse error in a declarator; re-parsing
9033
+ might succeed if a name changes meaning (60361). */
9034
+ && !(cp_parser_error_occurred (parser)
9035
+ && cp_parser_parsing_tentatively (parser)
9036
+ && parser->in_declarator_p))
9038
cp_token *token = cp_lexer_token_at (parser->lexer, start_of_id);
9040
@@ -23774,8 +23779,6 @@
9042
cp_parser_abort_tentative_parse (cp_parser* parser)
9044
- gcc_assert (parser->context->status != CP_PARSER_STATUS_KIND_COMMITTED
9045
- || errorcount > 0);
9046
cp_parser_simulate_error (parser);
9047
/* Now, pretend that we want to see if the construct was
9048
successfully parsed. */
9049
Index: gcc/cp/call.c
9050
===================================================================
9051
--- a/src/gcc/cp/call.c (.../tags/gcc_4_8_3_release)
9052
+++ b/src/gcc/cp/call.c (.../branches/gcc-4_8-branch)
9053
@@ -1464,7 +1464,7 @@
9055
maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
9056
conv = implicit_conversion (to, from, expr, c_cast_p,
9058
+ flags|LOOKUP_NO_TEMP_BIND, complain);
9059
if (!CLASS_TYPE_P (to)
9060
&& CONSTRUCTOR_NELTS (expr) == 1)
9062
@@ -1624,9 +1624,9 @@
9066
- Otherwise, the reference shall be to a non-volatile const type.
9068
- Under C++0x, [8.5.3/5 dcl.init.ref] it may also be an rvalue reference */
9069
+ Otherwise, the reference shall be an lvalue reference to a
9070
+ non-volatile const type, or the reference shall be an rvalue
9072
if (!CP_TYPE_CONST_NON_VOLATILE_P (to) && !TYPE_REF_IS_RVALUE (rto))
9075
@@ -1664,7 +1664,16 @@
9076
/* This reference binding, unlike those above, requires the
9077
creation of a temporary. */
9078
conv->need_temporary_p = true;
9079
- conv->rvaluedness_matches_p = TYPE_REF_IS_RVALUE (rto);
9080
+ if (TYPE_REF_IS_RVALUE (rto))
9082
+ conv->rvaluedness_matches_p = 1;
9083
+ /* In the second case, if the reference is an rvalue reference and
9084
+ the second standard conversion sequence of the user-defined
9085
+ conversion sequence includes an lvalue-to-rvalue conversion, the
9086
+ program is ill-formed. */
9087
+ if (conv->user_conv_p && next_conversion (conv)->kind == ck_rvalue)
9093
@@ -5811,7 +5820,7 @@
9094
&& convs->kind != ck_list
9095
&& convs->kind != ck_ambig
9096
&& (convs->kind != ck_ref_bind
9097
- || convs->user_conv_p)
9098
+ || (convs->user_conv_p && next_conversion (convs)->bad_p))
9099
&& (convs->kind != ck_rvalue
9100
|| SCALAR_TYPE_P (totype))
9101
&& convs->kind != ck_base)
9102
@@ -6110,7 +6119,8 @@
9103
if (convs->bad_p && !next_conversion (convs)->bad_p)
9105
gcc_assert (TYPE_REF_IS_RVALUE (ref_type)
9106
- && real_lvalue_p (expr));
9107
+ && (real_lvalue_p (expr)
9108
+ || next_conversion(convs)->kind == ck_rvalue));
9110
error_at (loc, "cannot bind %qT lvalue to %qT",
9111
TREE_TYPE (expr), totype);
9112
Index: gcc/cp/friend.c
9113
===================================================================
9114
--- a/src/gcc/cp/friend.c (.../tags/gcc_4_8_3_release)
9115
+++ b/src/gcc/cp/friend.c (.../branches/gcc-4_8-branch)
9116
@@ -502,7 +502,13 @@
9117
? current_template_parms
9120
- if (template_member_p && decl && TREE_CODE (decl) == FUNCTION_DECL)
9121
+ if ((template_member_p
9122
+ /* Always pull out the TEMPLATE_DECL if we have a friend
9123
+ template in a class template so that it gets tsubsted
9124
+ properly later on (59956). tsubst_friend_function knows
9125
+ how to tell this apart from a member template. */
9126
+ || (class_template_depth && friend_depth))
9127
+ && decl && TREE_CODE (decl) == FUNCTION_DECL)
9128
decl = DECL_TI_TEMPLATE (decl);
9131
Index: gcc/haifa-sched.c
9132
===================================================================
9133
--- a/src/gcc/haifa-sched.c (.../tags/gcc_4_8_3_release)
9134
+++ b/src/gcc/haifa-sched.c (.../branches/gcc-4_8-branch)
9135
@@ -2931,7 +2931,7 @@
9137
advance_state (curr_state);
9138
if (sched_verbose >= 6)
9139
- fprintf (sched_dump, ";;\tAdvanced a state.\n");
9140
+ fprintf (sched_dump, ";;\tAdvance the current state.\n");
9143
/* Update register pressure after scheduling INSN. */
9144
@@ -5964,6 +5964,7 @@
9145
modulo_insns_scheduled = 0;
9147
ls.modulo_epilogue = false;
9148
+ ls.first_cycle_insn_p = true;
9150
/* Loop until all the insns in BB are scheduled. */
9151
while ((*current_sched_info->schedule_more_p) ())
9152
@@ -6034,7 +6035,6 @@
9156
- ls.first_cycle_insn_p = true;
9157
ls.shadows_only_p = false;
9158
cycle_issued_insns = 0;
9159
ls.can_issue_more = issue_rate;
9160
@@ -6321,11 +6321,13 @@
9164
+ ls.first_cycle_insn_p = true;
9166
if (ls.modulo_epilogue)
9169
- advance_one_cycle ();
9170
+ if (!ls.first_cycle_insn_p)
9171
+ advance_one_cycle ();
9172
perform_replacements_new_cycle ();
9175
Index: gcc/double-int.c
9176
===================================================================
9177
--- a/src/gcc/double-int.c (.../tags/gcc_4_8_3_release)
9178
+++ b/src/gcc/double-int.c (.../branches/gcc-4_8-branch)
9180
== (unsigned HOST_WIDE_INT) htwice)
9181
&& (labs_den <= ltwice)))
9185
/* quo = quo - 1; */
9186
add_double (*lquo, *hquo,
9187
(HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
9188
Index: gcc/ipa-pure-const.c
9189
===================================================================
9190
--- a/src/gcc/ipa-pure-const.c (.../tags/gcc_4_8_3_release)
9191
+++ b/src/gcc/ipa-pure-const.c (.../branches/gcc-4_8-branch)
9192
@@ -1429,7 +1429,7 @@
9193
else if (e->can_throw_external && !TREE_NOTHROW (y->symbol.decl))
9196
- for (ie = node->indirect_calls; ie; ie = ie->next_callee)
9197
+ for (ie = w->indirect_calls; ie; ie = ie->next_callee)
9198
if (ie->can_throw_external)
9200
w_info = (struct ipa_dfs_info *) w->symbol.aux;
9201
Index: gcc/tree-ssa-math-opts.c
9202
===================================================================
9203
--- a/src/gcc/tree-ssa-math-opts.c (.../tags/gcc_4_8_3_release)
9204
+++ b/src/gcc/tree-ssa-math-opts.c (.../branches/gcc-4_8-branch)
9205
@@ -1537,7 +1537,7 @@
9207
struct symbolic_number {
9208
unsigned HOST_WIDEST_INT n;
9213
/* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
9214
@@ -1549,13 +1549,15 @@
9215
struct symbolic_number *n,
9218
+ int bitsize = TYPE_PRECISION (n->type);
9223
/* Zero out the extra bits of N in order to avoid them being shifted
9224
into the significant bits. */
9225
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
9226
- n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
9227
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
9228
+ n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
9232
@@ -1563,20 +1565,24 @@
9236
+ /* Arithmetic shift of signed type: result is dependent on the value. */
9237
+ if (!TYPE_UNSIGNED (n->type)
9238
+ && (n->n & ((unsigned HOST_WIDEST_INT) 0xff << (bitsize - 8))))
9243
- n->n = (n->n << count) | (n->n >> ((n->size * BITS_PER_UNIT) - count));
9244
+ n->n = (n->n << count) | (n->n >> (bitsize - count));
9247
- n->n = (n->n >> count) | (n->n << ((n->size * BITS_PER_UNIT) - count));
9248
+ n->n = (n->n >> count) | (n->n << (bitsize - count));
9253
/* Zero unused bits for size. */
9254
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
9255
- n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
9256
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
9257
+ n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
9261
@@ -1593,7 +1599,7 @@
9262
if (TREE_CODE (lhs_type) != INTEGER_TYPE)
9265
- if (TYPE_PRECISION (lhs_type) != n->size * BITS_PER_UNIT)
9266
+ if (TYPE_PRECISION (lhs_type) != TYPE_PRECISION (n->type))
9270
@@ -1650,20 +1656,25 @@
9271
to initialize the symbolic number. */
9276
/* Set up the symbolic number N by setting each byte to a
9277
value between 1 and the byte size of rhs1. The highest
9278
order byte is set to n->size and the lowest order
9280
- n->size = TYPE_PRECISION (TREE_TYPE (rhs1));
9281
- if (n->size % BITS_PER_UNIT != 0)
9282
+ n->type = TREE_TYPE (rhs1);
9283
+ size = TYPE_PRECISION (n->type);
9284
+ if (size % BITS_PER_UNIT != 0)
9286
- n->size /= BITS_PER_UNIT;
9287
+ if (size > HOST_BITS_PER_WIDEST_INT)
9289
+ size /= BITS_PER_UNIT;
9290
n->n = (sizeof (HOST_WIDEST_INT) < 8 ? 0 :
9291
(unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201);
9293
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
9294
+ if (size < (int)sizeof (HOST_WIDEST_INT))
9295
n->n &= ((unsigned HOST_WIDEST_INT)1 <<
9296
- (n->size * BITS_PER_UNIT)) - 1;
9297
+ (size * BITS_PER_UNIT)) - 1;
9299
source_expr1 = rhs1;
9301
@@ -1672,12 +1683,12 @@
9306
+ int i, size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
9307
unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
9308
unsigned HOST_WIDEST_INT tmp = val;
9310
/* Only constants masking full bytes are allowed. */
9311
- for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
9312
+ for (i = 0; i < size; i++, tmp >>= BITS_PER_UNIT)
9313
if ((tmp & 0xff) != 0 && (tmp & 0xff) != 0xff)
9316
@@ -1693,12 +1704,24 @@
9321
+ int type_size, old_type_size;
9324
- type_size = TYPE_PRECISION (gimple_expr_type (stmt));
9325
+ type = gimple_expr_type (stmt);
9326
+ type_size = TYPE_PRECISION (type);
9327
if (type_size % BITS_PER_UNIT != 0)
9329
+ if (type_size > (int) HOST_BITS_PER_WIDEST_INT)
9332
+ /* Sign extension: result is dependent on the value. */
9333
+ old_type_size = TYPE_PRECISION (n->type);
9334
+ if (!TYPE_UNSIGNED (n->type)
9335
+ && type_size > old_type_size
9337
+ ((unsigned HOST_WIDEST_INT) 0xff << (old_type_size - 8)))
9340
if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
9342
/* If STMT casts to a smaller type mask out the bits not
9343
@@ -1705,7 +1728,7 @@
9344
belonging to the target type. */
9345
n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
9347
- n->size = type_size / BITS_PER_UNIT;
9352
@@ -1718,7 +1741,7 @@
9354
if (rhs_class == GIMPLE_BINARY_RHS)
9358
struct symbolic_number n1, n2;
9359
unsigned HOST_WIDEST_INT mask;
9361
@@ -1742,11 +1765,12 @@
9362
source_expr2 = find_bswap_1 (rhs2_stmt, &n2, limit - 1);
9364
if (source_expr1 != source_expr2
9365
- || n1.size != n2.size)
9366
+ || TYPE_PRECISION (n1.type) != TYPE_PRECISION (n2.type))
9369
- n->size = n1.size;
9370
- for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
9371
+ n->type = n1.type;
9372
+ size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
9373
+ for (i = 0, mask = 0xff; i < size; i++, mask <<= BITS_PER_UNIT)
9375
unsigned HOST_WIDEST_INT masked1, masked2;
9377
@@ -1785,7 +1809,7 @@
9379
struct symbolic_number n;
9382
+ int limit, bitsize;
9384
/* The last parameter determines the depth search limit. It usually
9385
correlates directly to the number of bytes to be touched. We
9386
@@ -1800,13 +1824,14 @@
9389
/* Zero out the extra bits of N and CMP. */
9390
- if (n.size < (int)sizeof (HOST_WIDEST_INT))
9391
+ bitsize = TYPE_PRECISION (n.type);
9392
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
9394
unsigned HOST_WIDEST_INT mask =
9395
- ((unsigned HOST_WIDEST_INT)1 << (n.size * BITS_PER_UNIT)) - 1;
9396
+ ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
9399
- cmp >>= (sizeof (HOST_WIDEST_INT) - n.size) * BITS_PER_UNIT;
9400
+ cmp >>= sizeof (HOST_WIDEST_INT) * BITS_PER_UNIT - bitsize;
9403
/* A complete byte swap should make the symbolic number to start
9404
@@ -1828,7 +1853,7 @@
9405
bool changed = false;
9406
tree bswap16_type = NULL_TREE, bswap32_type = NULL_TREE, bswap64_type = NULL_TREE;
9408
- if (BITS_PER_UNIT != 8)
9409
+ if (BITS_PER_UNIT != 8 || CHAR_BIT != 8)
9412
if (sizeof (HOST_WIDEST_INT) < 8)
9413
Index: gcc/tree-nrv.c
9414
===================================================================
9415
--- a/src/gcc/tree-nrv.c (.../tags/gcc_4_8_3_release)
9416
+++ b/src/gcc/tree-nrv.c (.../branches/gcc-4_8-branch)
9418
same type and alignment as the function's result. */
9419
if (TREE_CODE (found) != VAR_DECL
9420
|| TREE_THIS_VOLATILE (found)
9421
- || DECL_CONTEXT (found) != current_function_decl
9422
- || TREE_STATIC (found)
9423
+ || !auto_var_in_fn_p (found, current_function_decl)
9424
|| TREE_ADDRESSABLE (found)
9425
|| DECL_ALIGN (found) > DECL_ALIGN (result)
9426
|| !useless_type_conversion_p (result_type,
9427
Index: gcc/config.in
9428
===================================================================
9429
--- a/src/gcc/config.in (.../tags/gcc_4_8_3_release)
9430
+++ b/src/gcc/config.in (.../branches/gcc-4_8-branch)
9431
@@ -1175,6 +1175,12 @@
9435
+/* Define if isl_schedule_constraints_compute_schedule exists. */
9436
+#ifndef USED_FOR_TARGET
9437
+#undef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
9441
/* Define to 1 if you have the `kill' function. */
9442
#ifndef USED_FOR_TARGET
9445
===================================================================
9446
--- a/src/gcc/ifcvt.c (.../tags/gcc_4_8_3_release)
9447
+++ b/src/gcc/ifcvt.c (.../branches/gcc-4_8-branch)
9448
@@ -294,6 +294,28 @@
9450
return (e) ? e->dest : NULL_BLOCK;
9453
+/* Return true if RTXs A and B can be safely interchanged. */
9456
+rtx_interchangeable_p (const_rtx a, const_rtx b)
9458
+ if (!rtx_equal_p (a, b))
9461
+ if (GET_CODE (a) != MEM)
9464
+ /* A dead type-unsafe memory reference is legal, but a live type-unsafe memory
9465
+ reference is not. Interchanging a dead type-unsafe memory reference with
9466
+ a live type-safe one creates a live type-unsafe memory reference, in other
9467
+ words, it makes the program illegal.
9468
+ We check here conservatively whether the two memory references have equal
9469
+ memory attributes. */
9471
+ return mem_attrs_eq_p (get_mem_attrs (a), get_mem_attrs (b));
9475
/* Go through a bunch of insns, converting them to conditional
9476
execution format if possible. Return TRUE if all of the non-note
9477
@@ -1014,6 +1036,9 @@
9478
|| (rtx_equal_p (if_info->a, XEXP (cond, 1))
9479
&& rtx_equal_p (if_info->b, XEXP (cond, 0))))
9481
+ if (!rtx_interchangeable_p (if_info->a, if_info->b))
9484
y = (code == EQ) ? if_info->a : if_info->b;
9486
/* Avoid generating the move if the source is the destination. */
9487
@@ -2483,7 +2508,7 @@
9489
|| insn_b != last_active_insn (else_bb, FALSE)
9490
|| (set_b = single_set (insn_b)) == NULL_RTX
9491
- || ! rtx_equal_p (x, SET_DEST (set_b)))
9492
+ || ! rtx_interchangeable_p (x, SET_DEST (set_b)))
9496
@@ -2496,7 +2521,7 @@
9497
|| BLOCK_FOR_INSN (insn_b) != BLOCK_FOR_INSN (if_info->cond_earliest)
9498
|| !NONJUMP_INSN_P (insn_b)
9499
|| (set_b = single_set (insn_b)) == NULL_RTX
9500
- || ! rtx_equal_p (x, SET_DEST (set_b))
9501
+ || ! rtx_interchangeable_p (x, SET_DEST (set_b))
9502
|| ! noce_operand_ok (SET_SRC (set_b))
9503
|| reg_overlap_mentioned_p (x, SET_SRC (set_b))
9504
|| modified_between_p (SET_SRC (set_b), insn_b, jump)
9505
@@ -2562,7 +2587,7 @@
9507
/* Look and see if A and B are really the same. Avoid creating silly
9508
cmove constructs that no one will fix up later. */
9509
- if (rtx_equal_p (a, b))
9510
+ if (rtx_interchangeable_p (a, b))
9512
/* If we have an INSN_B, we don't have to create any new rtl. Just
9513
move the instruction that we already have. If we don't have an
9514
@@ -4246,6 +4271,9 @@
9515
old_dest = JUMP_LABEL (jump);
9516
if (other_bb != new_dest)
9518
+ if (!any_condjump_p (jump))
9521
if (JUMP_P (BB_END (dest_edge->src)))
9522
new_dest_label = JUMP_LABEL (BB_END (dest_edge->src));
9523
else if (new_dest == EXIT_BLOCK_PTR)
9524
Index: gcc/dwarf2out.c
9525
===================================================================
9526
--- a/src/gcc/dwarf2out.c (.../tags/gcc_4_8_3_release)
9527
+++ b/src/gcc/dwarf2out.c (.../branches/gcc-4_8-branch)
9528
@@ -12234,7 +12234,7 @@
9529
op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode,
9530
VAR_INIT_STATUS_INITIALIZED);
9534
add_loc_descr (&mem_loc_result, op1);
9535
add_loc_descr (&mem_loc_result,
9536
new_loc_descr (DW_OP_plus, 0, 0));
9537
@@ -13882,6 +13882,10 @@
9541
+ case TARGET_MEM_REF:
9546
return loc_list_from_tree (TREE_OPERAND (loc, 1), want_address);
9549
===================================================================
9550
--- a/src/gcc/expr.c (.../tags/gcc_4_8_3_release)
9551
+++ b/src/gcc/expr.c (.../branches/gcc-4_8-branch)
9552
@@ -7590,11 +7590,13 @@
9555
case COMPOUND_LITERAL_EXPR:
9556
- /* Allow COMPOUND_LITERAL_EXPR in initializers, if e.g.
9557
- rtl_for_decl_init is called on DECL_INITIAL with
9558
- COMPOUNT_LITERAL_EXPRs in it, they aren't gimplified. */
9559
- if (modifier == EXPAND_INITIALIZER
9560
- && COMPOUND_LITERAL_EXPR_DECL (exp))
9561
+ /* Allow COMPOUND_LITERAL_EXPR in initializers or coming from
9562
+ initializers, if e.g. rtl_for_decl_init is called on DECL_INITIAL
9563
+ with COMPOUND_LITERAL_EXPRs in it, or ARRAY_REF on a const static
9564
+ array with address of COMPOUND_LITERAL_EXPR in DECL_INITIAL;
9565
+ the initializers aren't gimplified. */
9566
+ if (COMPOUND_LITERAL_EXPR_DECL (exp)
9567
+ && TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (exp)))
9568
return expand_expr_addr_expr_1 (COMPOUND_LITERAL_EXPR_DECL (exp),
9569
target, tmode, modifier, as);
9571
@@ -10603,7 +10605,7 @@
9572
|| !host_integerp (TREE_OPERAND (offset, 1), 1)
9573
|| compare_tree_int (TREE_OPERAND (offset, 1),
9574
BIGGEST_ALIGNMENT / BITS_PER_UNIT) <= 0
9575
- || !exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
9576
+ || exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
9579
/* Look at the first operand of BIT_AND_EXPR and strip any conversion.
9580
Index: gcc/ada/socket.c
9581
===================================================================
9582
--- a/src/gcc/ada/socket.c (.../tags/gcc_4_8_3_release)
9583
+++ b/src/gcc/ada/socket.c (.../branches/gcc-4_8-branch)
9588
-#if defined(__linux__) || defined(__GLIBC__)
9589
+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
9590
(void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
9592
rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
9593
Index: gcc/ada/uintp.adb
9594
===================================================================
9595
--- a/src/gcc/ada/uintp.adb (.../tags/gcc_4_8_3_release)
9596
+++ b/src/gcc/ada/uintp.adb (.../branches/gcc-4_8-branch)
9597
@@ -171,22 +171,6 @@
9598
-- If Discard_Quotient is True, Quotient is set to No_Uint
9599
-- If Discard_Remainder is True, Remainder is set to No_Uint
9601
- function Vector_To_Uint
9602
- (In_Vec : UI_Vector;
9603
- Negative : Boolean) return Uint;
9604
- -- Functions that calculate values in UI_Vectors, call this function to
9605
- -- create and return the Uint value. In_Vec contains the multiple precision
9606
- -- (Base) representation of a non-negative value. Leading zeroes are
9607
- -- permitted. Negative is set if the desired result is the negative of the
9608
- -- given value. The result will be either the appropriate directly
9609
- -- represented value, or a table entry in the proper canonical format is
9610
- -- created and returned.
9612
- -- Note that Init_Operand puts a signed value in the result vector, but
9613
- -- Vector_To_Uint is always presented with a non-negative value. The
9614
- -- processing of signs is something that is done by the caller before
9615
- -- calling Vector_To_Uint.
9620
Index: gcc/ada/uintp.ads
9621
===================================================================
9622
--- a/src/gcc/ada/uintp.ads (.../tags/gcc_4_8_3_release)
9623
+++ b/src/gcc/ada/uintp.ads (.../branches/gcc-4_8-branch)
9625
Uint_Minus_80 : constant Uint;
9626
Uint_Minus_128 : constant Uint;
9628
+ type UI_Vector is array (Pos range <>) of Int;
9629
+ -- Vector containing the integer values of a Uint value
9631
+ -- Note: An earlier version of this package used pointers of arrays of Ints
9632
+ -- (dynamically allocated) for the Uint type. The change leads to a few
9633
+ -- less natural idioms used throughout this code, but eliminates all uses
9634
+ -- of the heap except for the table package itself. For example, Uint
9635
+ -- parameters are often converted to UI_Vectors for internal manipulation.
9636
+ -- This is done by creating the local UI_Vector using the function N_Digits
9637
+ -- on the Uint to find the size needed for the vector, and then calling
9638
+ -- Init_Operand to copy the values out of the table into the vector.
9643
@@ -252,6 +264,22 @@
9644
-- function is used for capacity checks, and it can be one bit off
9645
-- without affecting its usage.
9647
+ function Vector_To_Uint
9648
+ (In_Vec : UI_Vector;
9649
+ Negative : Boolean) return Uint;
9650
+ -- Functions that calculate values in UI_Vectors, call this function to
9651
+ -- create and return the Uint value. In_Vec contains the multiple precision
9652
+ -- (Base) representation of a non-negative value. Leading zeroes are
9653
+ -- permitted. Negative is set if the desired result is the negative of the
9654
+ -- given value. The result will be either the appropriate directly
9655
+ -- represented value, or a table entry in the proper canonical format is
9656
+ -- created and returned.
9658
+ -- Note that Init_Operand puts a signed value in the result vector, but
9659
+ -- Vector_To_Uint is always presented with a non-negative value. The
9660
+ -- processing of signs is something that is done by the caller before
9661
+ -- calling Vector_To_Uint.
9663
---------------------
9664
-- Output Routines --
9665
---------------------
9666
@@ -494,18 +522,6 @@
9667
-- UI_Vector is defined for this purpose and some internal subprograms
9668
-- used for converting from one to the other are defined.
9670
- type UI_Vector is array (Pos range <>) of Int;
9671
- -- Vector containing the integer values of a Uint value
9673
- -- Note: An earlier version of this package used pointers of arrays of Ints
9674
- -- (dynamically allocated) for the Uint type. The change leads to a few
9675
- -- less natural idioms used throughout this code, but eliminates all uses
9676
- -- of the heap except for the table package itself. For example, Uint
9677
- -- parameters are often converted to UI_Vectors for internal manipulation.
9678
- -- This is done by creating the local UI_Vector using the function N_Digits
9679
- -- on the Uint to find the size needed for the vector, and then calling
9680
- -- Init_Operand to copy the values out of the table into the vector.
9682
type Uint_Entry is record
9684
-- Length of entry in Udigits table in digits (i.e. in words)
9685
Index: gcc/ada/ChangeLog
9686
===================================================================
9687
--- a/src/gcc/ada/ChangeLog (.../tags/gcc_4_8_3_release)
9688
+++ b/src/gcc/ada/ChangeLog (.../branches/gcc-4_8-branch)
9690
+2014-11-22 Eric Botcazou <ebotcazou@adacore.com>
9692
+ Backport from mainline
9693
+ 2014-11-20 Vincent Celier <celier@adacore.com>
9696
+ * back_end.adb (Scan_Back_End_Switches): Skip switch -G and
9699
+2014-10-13 Eric Botcazou <ebotcazou@adacore.com>
9700
+ Alan Modra <amodra@gmail.com>
9703
+ * uintp.adb (Vector_To_Uint): Move from here to...
9704
+ * uintp.ads (UI_Vector): Make public.
9705
+ (Vector_To_Uint): ...here.
9707
+2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
9709
+ * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
9710
+ * gsocket.h Add include of <unistd.h> on RTEMS.
9712
+2014-08-11 Joel Sherrill <joel.sherrill@oarcorp.com>
9714
+ * s-osinte-rtems.adb: Correct formatting of line in license block.
9716
2014-05-22 Release Manager
9718
* GCC 4.8.3 released.
9719
Index: gcc/ada/s-osinte-rtems.adb
9720
===================================================================
9721
--- a/src/gcc/ada/s-osinte-rtems.adb (.../tags/gcc_4_8_3_release)
9722
+++ b/src/gcc/ada/s-osinte-rtems.adb (.../branches/gcc-4_8-branch)
9724
-- You should have received a copy of the GNU General Public License and --
9725
-- a copy of the GCC Runtime Library Exception along with this program; --
9726
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
9727
--- <http://www.gnu.org/licenses/>.
9728
+-- <http://www.gnu.org/licenses/>. --
9730
-- GNARL was developed by the GNARL team at Florida State University. It is --
9731
-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
9732
Index: gcc/ada/gsocket.h
9733
===================================================================
9734
--- a/src/gcc/ada/gsocket.h (.../tags/gcc_4_8_3_release)
9735
+++ b/src/gcc/ada/gsocket.h (.../branches/gcc-4_8-branch)
9736
@@ -183,6 +183,11 @@
9737
#include <sys/time.h>
9740
+#if defined(__rtems__)
9741
+#include <unistd.h>
9742
+/* Required, for read(), write(), and close() */
9746
* RTEMS has these .h files but not until you have built and installed RTEMS.
9747
* When building a C/C++ toolset, you also build the newlib C library, so the
9748
Index: gcc/ada/back_end.adb
9749
===================================================================
9750
--- a/src/gcc/ada/back_end.adb (.../tags/gcc_4_8_3_release)
9751
+++ b/src/gcc/ada/back_end.adb (.../branches/gcc-4_8-branch)
9752
@@ -209,9 +209,10 @@
9753
Last : constant Natural := Switch_Last (Switch_Chars);
9756
- -- Skip -o or internal GCC switches together with their argument
9757
+ -- Skip -o, -G or internal GCC switches together with their argument.
9759
if Switch_Chars (First .. Last) = "o"
9760
+ or else Switch_Chars (First .. Last) = "G"
9761
or else Is_Internal_GCC_Switch (Switch_Chars)
9763
Next_Arg := Next_Arg + 1;
9764
Index: gcc/tree-ssa-ifcombine.c
9765
===================================================================
9766
--- a/src/gcc/tree-ssa-ifcombine.c (.../tags/gcc_4_8_3_release)
9767
+++ b/src/gcc/tree-ssa-ifcombine.c (.../branches/gcc-4_8-branch)
9768
@@ -105,7 +105,11 @@
9770
gimple stmt = gsi_stmt (gsi);
9772
+ if (is_gimple_debug (stmt))
9775
if (gimple_has_side_effects (stmt)
9776
+ || gimple_could_trap_p (stmt)
9777
|| gimple_vuse (stmt))
9781
while (is_gimple_assign (stmt)
9782
&& ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
9783
&& (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
9784
- <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
9785
+ <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt))))
9786
+ && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
9787
|| gimple_assign_ssa_name_copy_p (stmt)))
9788
stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
9790
Index: gcc/sel-sched-ir.c
9791
===================================================================
9792
--- a/src/gcc/sel-sched-ir.c (.../tags/gcc_4_8_3_release)
9793
+++ b/src/gcc/sel-sched-ir.c (.../branches/gcc-4_8-branch)
9795
static void free_av_set (basic_block);
9796
static void invalidate_av_set (basic_block);
9797
static void extend_insn_data (void);
9798
-static void sel_init_new_insn (insn_t, int);
9799
+static void sel_init_new_insn (insn_t, int, int = -1);
9800
static void finish_insns (void);
9802
/* Various list functions. */
9803
@@ -4011,9 +4011,10 @@
9807
-/* Compute seqno for INSN by its preds or succs. */
9808
+/* Compute seqno for INSN by its preds or succs. Use OLD_SEQNO to compute
9809
+ seqno in corner cases. */
9811
-get_seqno_for_a_jump (insn_t insn)
9812
+get_seqno_for_a_jump (insn_t insn, int old_seqno)
9816
@@ -4069,8 +4070,16 @@
9818
seqno = get_seqno_by_succs (insn);
9822
+ /* The only case where this could be here legally is that the only
9823
+ unscheduled insn was a conditional jump that got removed and turned
9824
+ into this unconditional one. Initialize from the old seqno
9825
+ of that jump passed down to here. */
9826
+ seqno = old_seqno;
9829
gcc_assert (seqno >= 0);
9834
@@ -4250,22 +4259,24 @@
9837
/* This is used to initialize spurious jumps generated by
9838
- sel_redirect_edge (). */
9839
+ sel_redirect_edge (). OLD_SEQNO is used for initializing seqnos
9840
+ in corner cases within get_seqno_for_a_jump. */
9842
-init_simplejump_data (insn_t insn)
9843
+init_simplejump_data (insn_t insn, int old_seqno)
9845
init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
9846
REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
9847
vNULL, true, false, false,
9849
- INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
9850
+ INSN_SEQNO (insn) = get_seqno_for_a_jump (insn, old_seqno);
9851
init_first_time_insn_data (insn);
9854
/* Perform deferred initialization of insns. This is used to process
9855
- a new jump that may be created by redirect_edge. */
9857
-sel_init_new_insn (insn_t insn, int flags)
9858
+ a new jump that may be created by redirect_edge. OLD_SEQNO is used
9859
+ for initializing simplejumps in init_simplejump_data. */
9861
+sel_init_new_insn (insn_t insn, int flags, int old_seqno)
9863
/* We create data structures for bb when the first insn is emitted in it. */
9865
@@ -4292,7 +4303,7 @@
9866
if (flags & INSN_INIT_TODO_SIMPLEJUMP)
9868
extend_insn_data ();
9869
- init_simplejump_data (insn);
9870
+ init_simplejump_data (insn, old_seqno);
9873
gcc_assert (CONTAINING_RGN (BLOCK_NUM (insn))
9874
@@ -5578,8 +5589,7 @@
9877
/* A wrapper for redirect_edge_and_branch_force, which also initializes
9878
- data structures for possibly created bb and insns. Returns the newly
9879
- added bb or NULL, when a bb was not needed. */
9880
+ data structures for possibly created bb and insns. */
9882
sel_redirect_edge_and_branch_force (edge e, basic_block to)
9884
@@ -5586,6 +5596,7 @@
9885
basic_block jump_bb, src, orig_dest = e->dest;
9888
+ int old_seqno = -1;
9890
/* This function is now used only for bookkeeping code creation, where
9891
we'll never get the single pred of orig_dest block and thus will not
9892
@@ -5594,8 +5605,13 @@
9893
&& !single_pred_p (orig_dest));
9895
prev_max_uid = get_max_uid ();
9896
+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
9897
+ when the conditional jump being redirected may become unconditional. */
9898
+ if (any_condjump_p (BB_END (src))
9899
+ && INSN_SEQNO (BB_END (src)) >= 0)
9900
+ old_seqno = INSN_SEQNO (BB_END (src));
9902
jump_bb = redirect_edge_and_branch_force (e, to);
9904
if (jump_bb != NULL)
9905
sel_add_bb (jump_bb);
9907
@@ -5607,7 +5623,8 @@
9909
jump = find_new_jump (src, jump_bb, prev_max_uid);
9911
- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
9912
+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP,
9914
set_immediate_dominator (CDI_DOMINATORS, to,
9915
recompute_dominator (CDI_DOMINATORS, to));
9916
set_immediate_dominator (CDI_DOMINATORS, orig_dest,
9917
@@ -5626,6 +5643,7 @@
9919
bool recompute_toporder_p = false;
9920
bool maybe_unreachable = single_pred_p (orig_dest);
9921
+ int old_seqno = -1;
9923
latch_edge_p = (pipelining_p
9924
&& current_loop_nest
9925
@@ -5634,6 +5652,12 @@
9927
prev_max_uid = get_max_uid ();
9929
+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
9930
+ when the conditional jump being redirected may become unconditional. */
9931
+ if (any_condjump_p (BB_END (src))
9932
+ && INSN_SEQNO (BB_END (src)) >= 0)
9933
+ old_seqno = INSN_SEQNO (BB_END (src));
9935
redirected = redirect_edge_and_branch (e, to);
9937
gcc_assert (redirected && !last_added_blocks.exists ());
9938
@@ -5654,7 +5678,7 @@
9940
jump = find_new_jump (src, NULL, prev_max_uid);
9942
- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
9943
+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP, old_seqno);
9945
/* Only update dominator info when we don't have unreachable blocks.
9946
Otherwise we'll update in maybe_tidy_empty_bb. */
9947
Index: gcc/fortran/interface.c
9948
===================================================================
9949
--- a/src/gcc/fortran/interface.c (.../tags/gcc_4_8_3_release)
9950
+++ b/src/gcc/fortran/interface.c (.../branches/gcc-4_8-branch)
9951
@@ -1923,7 +1923,7 @@
9952
/* F2008, 12.5.2.5; IR F08/0073. */
9953
if (formal->ts.type == BT_CLASS && actual->expr_type != EXPR_NULL
9954
&& ((CLASS_DATA (formal)->attr.class_pointer
9955
- && !formal->attr.intent == INTENT_IN)
9956
+ && formal->attr.intent != INTENT_IN)
9957
|| CLASS_DATA (formal)->attr.allocatable))
9959
if (actual->ts.type != BT_CLASS)
9960
Index: gcc/fortran/trans-expr.c
9961
===================================================================
9962
--- a/src/gcc/fortran/trans-expr.c (.../tags/gcc_4_8_3_release)
9963
+++ b/src/gcc/fortran/trans-expr.c (.../branches/gcc-4_8-branch)
9964
@@ -7096,7 +7096,7 @@
9966
res_desc = gfc_evaluate_now (desc, &se->pre);
9967
gfc_conv_descriptor_data_set (&se->pre, res_desc, null_pointer_node);
9968
- se->expr = gfc_build_addr_expr (TREE_TYPE (se->expr), res_desc);
9969
+ se->expr = gfc_build_addr_expr (NULL_TREE, res_desc);
9971
/* Free the lhs after the function call and copy the result data to
9972
the lhs descriptor. */
9973
Index: gcc/fortran/decl.c
9974
===================================================================
9975
--- a/src/gcc/fortran/decl.c (.../tags/gcc_4_8_3_release)
9976
+++ b/src/gcc/fortran/decl.c (.../branches/gcc-4_8-branch)
9977
@@ -1996,6 +1996,13 @@
9978
if (gfc_notify_std (GFC_STD_GNU, "Old-style "
9979
"initialization at %C") == FAILURE)
9981
+ else if (gfc_current_state () == COMP_DERIVED)
9983
+ gfc_error ("Invalid old style initialization for derived type "
9984
+ "component at %C");
9989
return match_old_style_init (name);
9991
Index: gcc/fortran/trans-openmp.c
9992
===================================================================
9993
--- a/src/gcc/fortran/trans-openmp.c (.../tags/gcc_4_8_3_release)
9994
+++ b/src/gcc/fortran/trans-openmp.c (.../branches/gcc-4_8-branch)
9995
@@ -115,6 +115,16 @@
9996
if (GFC_DECL_RESULT (decl) && ! DECL_HAS_VALUE_EXPR_P (decl))
9997
return OMP_CLAUSE_DEFAULT_SHARED;
9999
+ /* These are either array or derived parameters, or vtables.
10000
+ In the former cases, the OpenMP standard doesn't consider them to be
10001
+ variables at all (they can't be redefined), but they can nevertheless appear
10002
+ in parallel/task regions and for default(none) purposes treat them as shared.
10003
+ For vtables likely the same handling is desirable. */
10004
+ if (TREE_CODE (decl) == VAR_DECL
10005
+ && TREE_READONLY (decl)
10006
+ && TREE_STATIC (decl))
10007
+ return OMP_CLAUSE_DEFAULT_SHARED;
10009
return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
10012
@@ -1217,6 +1227,18 @@
10015
lhsaddr = save_expr (lhsaddr);
10016
+ if (TREE_CODE (lhsaddr) != SAVE_EXPR
10017
+ && (TREE_CODE (lhsaddr) != ADDR_EXPR
10018
+ || TREE_CODE (TREE_OPERAND (lhsaddr, 0)) != VAR_DECL))
10020
+ /* Make sure LHS is simple enough so that goa_lhs_expr_p can recognize
10021
+ it even after unsharing function body. */
10022
+ tree var = create_tmp_var_raw (TREE_TYPE (lhsaddr), NULL);
10023
+ DECL_CONTEXT (var) = current_function_decl;
10024
+ lhsaddr = build4 (TARGET_EXPR, TREE_TYPE (lhsaddr), var, lhsaddr,
10025
+ NULL_TREE, NULL_TREE);
10028
rhs = gfc_evaluate_now (rse.expr, &block);
10030
if (atomic_code->ext.omp_atomic == GFC_OMP_ATOMIC_WRITE)
10031
Index: gcc/fortran/ChangeLog
10032
===================================================================
10033
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_8_3_release)
10034
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch)
10036
+2014-11-28 Jakub Jelinek <jakub@redhat.com>
10038
+ Backported from mainline
10039
+ 2014-11-24 Jakub Jelinek <jakub@redhat.com>
10042
+ * trans-openmp.c (gfc_trans_omp_atomic): Make sure lhsaddr is
10043
+ simple enough for goa_lhs_expr_p.
10045
+2014-10-10 Jakub Jelinek <jakub@redhat.com>
10048
+ * trans-openmp.c (gfc_omp_predetermined_sharing): Return
10049
+ OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
10051
+2014-09-03 Marek Polacek <polacek@redhat.com>
10053
+ Backport from trunk
10055
+ * interface.c (compare_parameter): Fix condition.
10057
+2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
10059
+ Backport from trunk
10061
+ * gfortran.dg/array_assignment_5.f90: New test.
10063
+2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
10065
+ Backport from trunk
10067
+ * simplify.c (gfc_simplify_dot_product): Convert types of
10068
+ vectors before calculating the result.
10070
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
10072
+ Backport from trunk.
10074
+ * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
10075
+ that elements are skipped. This then correctly aligns 'reverse'
10076
+ with the scalarizer loops.
10078
+2014-07-08 Paul Thomas <pault@gcc.gnu.org>
10082
+ * trans-expr.c (fcncall_realloc_result): Use the natural type
10083
+ for the address expression of 'res_desc'.
10085
+2014-07-02 Jakub Jelinek <jakub@redhat.com>
10086
+ Fritz Reese <Reese-Fritz@zai.com>
10088
+ * decl.c (variable_decl): Reject old style initialization
10089
+ for derived type components.
10091
+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10093
+ Backport from trunk.
10095
+ * trans-decl.c (gfc_create_module_variable): Don't create
10096
+ Cray-pointee decls twice.
10098
+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
10100
+ Backport from mainline
10101
+ PR libfortran/61310
10102
+ * intrinsics.texi (CTIME): Remove mention of locale-dependent
10105
2014-05-22 Release Manager
10107
* GCC 4.8.3 released.
10108
Index: gcc/fortran/frontend-passes.c
10109
===================================================================
10110
--- a/src/gcc/fortran/frontend-passes.c (.../tags/gcc_4_8_3_release)
10111
+++ b/src/gcc/fortran/frontend-passes.c (.../branches/gcc-4_8-branch)
10112
@@ -874,6 +874,10 @@
10116
+ case INTRINSIC_CONCAT:
10117
+ /* Do not do string concatenations. */
10121
/* Binary operators. */
10122
if (optimize_binop_array_assignment (c, &e->value.op.op1, true))
10123
Index: gcc/fortran/trans-decl.c
10124
===================================================================
10125
--- a/src/gcc/fortran/trans-decl.c (.../tags/gcc_4_8_3_release)
10126
+++ b/src/gcc/fortran/trans-decl.c (.../branches/gcc-4_8-branch)
10127
@@ -4084,8 +4084,8 @@
10130
/* Don't generate variables from other modules. Variables from
10131
- COMMONs will already have been generated. */
10132
- if (sym->attr.use_assoc || sym->attr.in_common)
10133
+ COMMONs and Cray pointees will already have been generated. */
10134
+ if (sym->attr.use_assoc || sym->attr.in_common || sym->attr.cray_pointee)
10137
/* Equivalenced variables arrive here after creation. */
10138
Index: gcc/fortran/dependency.c
10139
===================================================================
10140
--- a/src/gcc/fortran/dependency.c (.../tags/gcc_4_8_3_release)
10141
+++ b/src/gcc/fortran/dependency.c (.../branches/gcc-4_8-branch)
10142
@@ -1779,6 +1779,7 @@
10143
gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
10147
gfc_dependency fin_dep;
10148
gfc_dependency this_dep;
10150
@@ -1828,6 +1829,8 @@
10154
+ /* Index for the reverse array. */
10156
for (n=0; n < lref->u.ar.dimen; n++)
10158
/* Assume dependency when either of array reference is vector
10159
@@ -1862,31 +1865,37 @@
10160
The ability to reverse or not is set by previous conditions
10161
in this dimension. If reversal is not activated, the
10162
value GFC_DEP_BACKWARD is reset to GFC_DEP_OVERLAP. */
10164
+ /* Get the indexing right for the scalarizing loop. If this
10165
+ is an element, there is no corresponding loop. */
10166
+ if (lref->u.ar.dimen_type[n] != DIMEN_ELEMENT)
10169
if (rref->u.ar.dimen_type[n] == DIMEN_RANGE
10170
&& lref->u.ar.dimen_type[n] == DIMEN_RANGE)
10172
/* Set reverse if backward dependence and not inhibited. */
10173
- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
10174
- reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
10175
- GFC_REVERSE_SET : reverse[n];
10176
+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
10177
+ reverse[m] = (this_dep == GFC_DEP_BACKWARD) ?
10178
+ GFC_REVERSE_SET : reverse[m];
10180
/* Set forward if forward dependence and not inhibited. */
10181
- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
10182
- reverse[n] = (this_dep == GFC_DEP_FORWARD) ?
10183
- GFC_FORWARD_SET : reverse[n];
10184
+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
10185
+ reverse[m] = (this_dep == GFC_DEP_FORWARD) ?
10186
+ GFC_FORWARD_SET : reverse[m];
10188
/* Flag up overlap if dependence not compatible with
10189
the overall state of the expression. */
10190
- if (reverse && reverse[n] == GFC_REVERSE_SET
10191
+ if (reverse && reverse[m] == GFC_REVERSE_SET
10192
&& this_dep == GFC_DEP_FORWARD)
10194
- reverse[n] = GFC_INHIBIT_REVERSE;
10195
+ reverse[m] = GFC_INHIBIT_REVERSE;
10196
this_dep = GFC_DEP_OVERLAP;
10198
- else if (reverse && reverse[n] == GFC_FORWARD_SET
10199
+ else if (reverse && reverse[m] == GFC_FORWARD_SET
10200
&& this_dep == GFC_DEP_BACKWARD)
10202
- reverse[n] = GFC_INHIBIT_REVERSE;
10203
+ reverse[m] = GFC_INHIBIT_REVERSE;
10204
this_dep = GFC_DEP_OVERLAP;
10207
@@ -1893,7 +1902,7 @@
10208
/* If no intention of reversing or reversing is explicitly
10209
inhibited, convert backward dependence to overlap. */
10210
if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
10211
- || (reverse != NULL && reverse[n] == GFC_INHIBIT_REVERSE))
10212
+ || (reverse != NULL && reverse[m] == GFC_INHIBIT_REVERSE))
10213
this_dep = GFC_DEP_OVERLAP;
10216
Index: gcc/fortran/simplify.c
10217
===================================================================
10218
--- a/src/gcc/fortran/simplify.c (.../tags/gcc_4_8_3_release)
10219
+++ b/src/gcc/fortran/simplify.c (.../branches/gcc-4_8-branch)
10220
@@ -1877,6 +1877,9 @@
10222
gfc_simplify_dot_product (gfc_expr *vector_a, gfc_expr *vector_b)
10227
if (!is_constant_array_expr (vector_a)
10228
|| !is_constant_array_expr (vector_b))
10230
@@ -1883,8 +1886,14 @@
10232
gcc_assert (vector_a->rank == 1);
10233
gcc_assert (vector_b->rank == 1);
10234
- gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts));
10236
+ temp.expr_type = EXPR_OP;
10237
+ gfc_clear_ts (&temp.ts);
10238
+ temp.value.op.op = INTRINSIC_NONE;
10239
+ temp.value.op.op1 = vector_a;
10240
+ temp.value.op.op2 = vector_b;
10241
+ gfc_type_convert_binary (&temp, 1);
10243
return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true);
10246
Index: gcc/configure.ac
10247
===================================================================
10248
--- a/src/gcc/configure.ac (.../tags/gcc_4_8_3_release)
10249
+++ b/src/gcc/configure.ac (.../branches/gcc-4_8-branch)
10250
@@ -3443,6 +3443,32 @@
10251
AC_MSG_RESULT($gcc_cv_lto_plugin)
10256
+ # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
10257
+ AC_ARG_ENABLE(fix-cortex-a53-835769,
10259
+AS_HELP_STRING([--enable-fix-cortex-a53-835769],
10260
+ [enable workaround for AArch64 Cortex-A53 erratum 835769 by default])
10261
+AS_HELP_STRING([--disable-fix-cortex-a53-835769],
10262
+ [disable workaround for AArch64 Cortex-A53 erratum 835769 by default])
10265
+ case $enableval in
10267
+ tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
10272
+ AC_MSG_ERROR(['$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
10273
+ Valid choices are 'yes' and 'no'.])
10280
# All TARGET_ABI_OSF targets.
10281
alpha*-*-linux* | alpha*-*-*bsd*)
10282
gcc_GAS_CHECK_FEATURE([explicit relocation support],
10283
@@ -5185,8 +5211,31 @@
10284
AC_ARG_VAR(CLOOGINC,[How to find CLOOG include files])
10285
if test "x${CLOOGLIBS}" != "x" ; then
10286
AC_DEFINE(HAVE_cloog, 1, [Define if cloog is in use.])
10288
+ # Check whether isl_schedule_constraints_compute_schedule is available;
10289
+ # it's new in ISL-0.13.
10290
+ saved_CFLAGS="$CFLAGS"
10291
+ CFLAGS="$CFLAGS $ISLINC"
10292
+ saved_LIBS="$LIBS"
10293
+ LIBS="$LIBS $CLOOGLIBS $ISLLIBS $GMPLIBS"
10295
+ AC_MSG_CHECKING([Checking for isl_schedule_constraints_compute_schedule])
10296
+ AC_TRY_LINK([#include <isl/schedule.h>],
10297
+ [isl_schedule_constraints_compute_schedule (NULL);],
10298
+ [ac_has_isl_schedule_constraints_compute_schedule=yes],
10299
+ [ac_has_isl_schedule_constraints_compute_schedule=no])
10300
+ AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule)
10302
+ LIBS="$saved_LIBS"
10303
+ CFLAGS="$saved_CFLAGS"
10305
+ if test x"$ac_has_isl_schedule_constraints_compute_schedule" = x"yes"; then
10306
+ AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1,
10307
+ [Define if isl_schedule_constraints_compute_schedule exists.])
10312
# Check for plugin support
10313
AC_ARG_ENABLE(plugin,
10314
[AS_HELP_STRING([--enable-plugin], [enable plugin support])],
10315
Index: gcc/function.c
10316
===================================================================
10317
--- a/src/gcc/function.c (.../tags/gcc_4_8_3_release)
10318
+++ b/src/gcc/function.c (.../branches/gcc-4_8-branch)
10319
@@ -1354,9 +1354,13 @@
10320
#define STACK_POINTER_OFFSET 0
10323
+#if defined (REG_PARM_STACK_SPACE) && !defined (INCOMING_REG_PARM_STACK_SPACE)
10324
+#define INCOMING_REG_PARM_STACK_SPACE REG_PARM_STACK_SPACE
10327
/* If not defined, pick an appropriate default for the offset of dynamically
10328
allocated memory depending on the value of ACCUMULATE_OUTGOING_ARGS,
10329
- REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
10330
+ INCOMING_REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
10332
#ifndef STACK_DYNAMIC_OFFSET
10334
@@ -1368,12 +1372,12 @@
10335
`crtl->outgoing_args_size'. Nevertheless, we must allow
10336
for it when allocating stack dynamic objects. */
10338
-#if defined(REG_PARM_STACK_SPACE)
10339
+#ifdef INCOMING_REG_PARM_STACK_SPACE
10340
#define STACK_DYNAMIC_OFFSET(FNDECL) \
10341
((ACCUMULATE_OUTGOING_ARGS \
10342
? (crtl->outgoing_args_size \
10343
+ (OUTGOING_REG_PARM_STACK_SPACE ((!(FNDECL) ? NULL_TREE : TREE_TYPE (FNDECL))) ? 0 \
10344
- : REG_PARM_STACK_SPACE (FNDECL))) \
10345
+ : INCOMING_REG_PARM_STACK_SPACE (FNDECL))) \
10346
: 0) + (STACK_POINTER_OFFSET))
10348
#define STACK_DYNAMIC_OFFSET(FNDECL) \
10349
@@ -2211,8 +2215,9 @@
10351
all->args_so_far = pack_cumulative_args (&all->args_so_far_v);
10353
-#ifdef REG_PARM_STACK_SPACE
10354
- all->reg_parm_stack_space = REG_PARM_STACK_SPACE (current_function_decl);
10355
+#ifdef INCOMING_REG_PARM_STACK_SPACE
10356
+ all->reg_parm_stack_space
10357
+ = INCOMING_REG_PARM_STACK_SPACE (current_function_decl);
10361
@@ -4518,6 +4523,7 @@
10362
/* ??? This could be set on a per-function basis by the front-end
10363
but is this worth the hassle? */
10364
cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
10365
+ cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions;
10369
Index: gcc/tree-vectorizer.h
10370
===================================================================
10371
--- a/src/gcc/tree-vectorizer.h (.../tags/gcc_4_8_3_release)
10372
+++ b/src/gcc/tree-vectorizer.h (.../branches/gcc-4_8-branch)
10373
@@ -324,9 +324,9 @@
10374
#define LOOP_VINFO_OPERANDS_SWAPPED(L) (L)->operands_swapped
10376
#define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
10377
-(L)->may_misalign_stmts.length () > 0
10378
+((L)->may_misalign_stmts.length () > 0)
10379
#define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L) \
10380
-(L)->may_alias_ddrs.length () > 0
10381
+((L)->may_alias_ddrs.length () > 0)
10383
#define NITERS_KNOWN_P(n) \
10384
(host_integerp ((n),0) \
10385
@@ -931,7 +931,8 @@
10386
extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *);
10387
extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree,
10388
tree *, gimple_stmt_iterator *,
10389
- gimple *, bool, bool *);
10390
+ gimple *, bool, bool *,
10391
+ tree = NULL_TREE);
10392
extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
10393
extern tree vect_create_destination_var (tree, tree);
10394
extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT);
10395
@@ -949,7 +950,8 @@
10396
extern int vect_get_place_in_interleaving_chain (gimple, gimple);
10397
extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
10398
extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
10399
- tree, struct loop *);
10400
+ tree, struct loop *,
10401
+ tree = NULL_TREE);
10403
/* In tree-vect-loop.c. */
10404
/* FORNOW: Used in tree-parloops.c. */
10405
Index: gcc/stor-layout.c
10406
===================================================================
10407
--- a/src/gcc/stor-layout.c (.../tags/gcc_4_8_3_release)
10408
+++ b/src/gcc/stor-layout.c (.../branches/gcc-4_8-branch)
10409
@@ -234,12 +234,7 @@
10410
param_type = TREE_TYPE (ref);
10412
= build_decl (input_location, PARM_DECL, param_name, param_type);
10413
- if (targetm.calls.promote_prototypes (NULL_TREE)
10414
- && INTEGRAL_TYPE_P (param_type)
10415
- && TYPE_PRECISION (param_type) < TYPE_PRECISION (integer_type_node))
10416
- DECL_ARG_TYPE (param_decl) = integer_type_node;
10418
- DECL_ARG_TYPE (param_decl) = param_type;
10419
+ DECL_ARG_TYPE (param_decl) = param_type;
10420
DECL_ARTIFICIAL (param_decl) = 1;
10421
TREE_READONLY (param_decl) = 1;
10423
Index: gcc/tree-vect-loop.c
10424
===================================================================
10425
--- a/src/gcc/tree-vect-loop.c (.../tags/gcc_4_8_3_release)
10426
+++ b/src/gcc/tree-vect-loop.c (.../branches/gcc-4_8-branch)
10427
@@ -2205,7 +2205,8 @@
10430
def1 = SSA_NAME_DEF_STMT (op1);
10431
- if (flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
10432
+ if (gimple_bb (def1)
10433
+ && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
10435
&& flow_bb_inside_loop_p (loop->inner, gimple_bb (def1))
10436
&& is_gimple_assign (def1))
10437
Index: gcc/tree-data-ref.c
10438
===================================================================
10439
--- a/src/gcc/tree-data-ref.c (.../tags/gcc_4_8_3_release)
10440
+++ b/src/gcc/tree-data-ref.c (.../branches/gcc-4_8-branch)
10441
@@ -919,7 +919,6 @@
10442
ref = fold_build2_loc (EXPR_LOCATION (ref),
10443
MEM_REF, TREE_TYPE (ref),
10445
- DR_UNCONSTRAINED_BASE (dr) = true;
10446
access_fns.safe_push (access_fn);
10449
@@ -1326,14 +1325,20 @@
10453
- /* If we had an evolution in a MEM_REF BASE_OBJECT we do not know
10454
- the size of the base-object. So we cannot do any offset/overlap
10455
- based analysis but have to rely on points-to information only. */
10456
+ /* If we had an evolution in a pointer-based MEM_REF BASE_OBJECT we
10457
+ do not know the size of the base-object. So we cannot do any
10458
+ offset/overlap based analysis but have to rely on points-to
10459
+ information only. */
10460
if (TREE_CODE (addr_a) == MEM_REF
10461
- && DR_UNCONSTRAINED_BASE (a))
10462
+ && TREE_CODE (TREE_OPERAND (addr_a, 0)) == SSA_NAME)
10464
- if (TREE_CODE (addr_b) == MEM_REF
10465
- && DR_UNCONSTRAINED_BASE (b))
10466
+ /* For true dependences we can apply TBAA. */
10467
+ if (flag_strict_aliasing
10468
+ && DR_IS_WRITE (a) && DR_IS_READ (b)
10469
+ && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
10470
+ get_alias_set (DR_REF (b))))
10472
+ if (TREE_CODE (addr_b) == MEM_REF)
10473
return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
10474
TREE_OPERAND (addr_b, 0));
10476
@@ -1341,9 +1346,21 @@
10477
build_fold_addr_expr (addr_b));
10479
else if (TREE_CODE (addr_b) == MEM_REF
10480
- && DR_UNCONSTRAINED_BASE (b))
10481
- return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
10482
- TREE_OPERAND (addr_b, 0));
10483
+ && TREE_CODE (TREE_OPERAND (addr_b, 0)) == SSA_NAME)
10485
+ /* For true dependences we can apply TBAA. */
10486
+ if (flag_strict_aliasing
10487
+ && DR_IS_WRITE (a) && DR_IS_READ (b)
10488
+ && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
10489
+ get_alias_set (DR_REF (b))))
10491
+ if (TREE_CODE (addr_a) == MEM_REF)
10492
+ return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
10493
+ TREE_OPERAND (addr_b, 0));
10495
+ return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
10496
+ TREE_OPERAND (addr_b, 0));
10499
/* Otherwise DR_BASE_OBJECT is an access that covers the whole object
10500
that is being subsetted in the loop nest. */
10501
Index: gcc/tree-data-ref.h
10502
===================================================================
10503
--- a/src/gcc/tree-data-ref.h (.../tags/gcc_4_8_3_release)
10504
+++ b/src/gcc/tree-data-ref.h (.../branches/gcc-4_8-branch)
10507
/* A list of chrecs. Access functions of the indices. */
10508
vec<tree> access_fns;
10510
- /* Whether BASE_OBJECT is an access representing the whole object
10511
- or whether the access could not be constrained. */
10512
- bool unconstrained_base;
10516
@@ -195,7 +191,6 @@
10517
#define DR_STMT(DR) (DR)->stmt
10518
#define DR_REF(DR) (DR)->ref
10519
#define DR_BASE_OBJECT(DR) (DR)->indices.base_object
10520
-#define DR_UNCONSTRAINED_BASE(DR) (DR)->indices.unconstrained_base
10521
#define DR_ACCESS_FNS(DR) (DR)->indices.access_fns
10522
#define DR_ACCESS_FN(DR, I) DR_ACCESS_FNS (DR)[I]
10523
#define DR_NUM_DIMENSIONS(DR) DR_ACCESS_FNS (DR).length ()
10524
Index: gcc/tree-vect-data-refs.c
10525
===================================================================
10526
--- a/src/gcc/tree-vect-data-refs.c (.../tags/gcc_4_8_3_release)
10527
+++ b/src/gcc/tree-vect-data-refs.c (.../branches/gcc-4_8-branch)
10528
@@ -3553,6 +3553,9 @@
10530
if LOOP=i_loop: &in (relative to i_loop)
10531
if LOOP=j_loop: &in+i*2B (relative to j_loop)
10532
+ BYTE_OFFSET: Optional, defaulted to NULL. If supplied, it is added to the
10533
+ initial address. Unlike OFFSET, which is number of elements to
10534
+ be added, BYTE_OFFSET is measured in bytes.
10537
1. Return an SSA_NAME whose value is the address of the memory location of
10538
@@ -3566,7 +3569,8 @@
10539
vect_create_addr_base_for_vector_ref (gimple stmt,
10540
gimple_seq *new_stmt_list,
10542
- struct loop *loop)
10543
+ struct loop *loop,
10544
+ tree byte_offset)
10546
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
10547
struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
10548
@@ -3628,7 +3632,17 @@
10549
base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
10550
gimple_seq_add_seq (new_stmt_list, seq);
10554
+ tree tmp = create_tmp_var (sizetype, "offset");
10556
+ byte_offset = fold_convert (sizetype, byte_offset);
10557
+ base_offset = fold_build2 (PLUS_EXPR, sizetype,
10558
+ base_offset, byte_offset);
10559
+ base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
10560
+ gimple_seq_add_seq (new_stmt_list, seq);
10563
/* base + base_offset */
10565
addr_base = fold_build_pointer_plus (data_ref_base, base_offset);
10566
@@ -3692,6 +3706,10 @@
10567
5. BSI: location where the new stmts are to be placed if there is no loop
10568
6. ONLY_INIT: indicate if ap is to be updated in the loop, or remain
10569
pointing to the initial address.
10570
+ 7. BYTE_OFFSET (optional, defaults to NULL): a byte offset to be added
10571
+ to the initial address accessed by the data-ref in STMT. This is
10572
+ similar to OFFSET, but OFFSET is counted in elements, while BYTE_OFFSET
10576
1. Declare a new ptr to vector_type, and have it point to the base of the
10577
@@ -3705,6 +3723,8 @@
10578
initial_address = &a[init];
10579
if OFFSET is supplied:
10580
initial_address = &a[init + OFFSET];
10581
+ if BYTE_OFFSET is supplied:
10582
+ initial_address = &a[init] + BYTE_OFFSET;
10584
Return the initial_address in INITIAL_ADDRESS.
10586
@@ -3722,7 +3742,7 @@
10587
vect_create_data_ref_ptr (gimple stmt, tree aggr_type, struct loop *at_loop,
10588
tree offset, tree *initial_address,
10589
gimple_stmt_iterator *gsi, gimple *ptr_incr,
10590
- bool only_init, bool *inv_p)
10591
+ bool only_init, bool *inv_p, tree byte_offset)
10593
const char *base_name;
10594
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
10595
@@ -3881,10 +3901,10 @@
10596
/* (2) Calculate the initial address of the aggregate-pointer, and set
10597
the aggregate-pointer to point to it before the loop. */
10599
- /* Create: (&(base[init_val+offset]) in the loop preheader. */
10600
+ /* Create: (&(base[init_val+offset]+byte_offset) in the loop preheader. */
10602
new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
10604
+ offset, loop, byte_offset);
10608
Index: gcc/emit-rtl.c
10609
===================================================================
10610
--- a/src/gcc/emit-rtl.c (.../tags/gcc_4_8_3_release)
10611
+++ b/src/gcc/emit-rtl.c (.../branches/gcc-4_8-branch)
10612
@@ -263,7 +263,7 @@
10614
/* Return true if the given memory attributes are equal. */
10618
mem_attrs_eq_p (const struct mem_attrs *p, const struct mem_attrs *q)
10620
return (p->alias == q->alias
10621
Index: gcc/gimple-fold.c
10622
===================================================================
10623
--- a/src/gcc/gimple-fold.c (.../tags/gcc_4_8_3_release)
10624
+++ b/src/gcc/gimple-fold.c (.../branches/gcc-4_8-branch)
10625
@@ -2955,8 +2955,8 @@
10627
if (!AGGREGATE_TYPE_P (TREE_TYPE (ctor)) && !offset
10628
/* VIEW_CONVERT_EXPR is defined only for matching sizes. */
10629
- && operand_equal_p (TYPE_SIZE (type),
10630
- TYPE_SIZE (TREE_TYPE (ctor)), 0))
10631
+ && !compare_tree_int (TYPE_SIZE (type), size)
10632
+ && !compare_tree_int (TYPE_SIZE (TREE_TYPE (ctor)), size))
10634
ret = canonicalize_constructor_val (unshare_expr (ctor), from_decl);
10635
ret = fold_unary (VIEW_CONVERT_EXPR, type, ret);
10636
Index: gcc/emit-rtl.h
10637
===================================================================
10638
--- a/src/gcc/emit-rtl.h (.../tags/gcc_4_8_3_release)
10639
+++ b/src/gcc/emit-rtl.h (.../branches/gcc-4_8-branch)
10641
#ifndef GCC_EMIT_RTL_H
10642
#define GCC_EMIT_RTL_H
10644
+/* Return whether two MEM_ATTRs are equal. */
10645
+bool mem_attrs_eq_p (const struct mem_attrs *, const struct mem_attrs *);
10647
/* Set the alias set of MEM to SET. */
10648
extern void set_mem_alias_set (rtx, alias_set_type);
10650
Index: gcc/tree-cfgcleanup.c
10651
===================================================================
10652
--- a/src/gcc/tree-cfgcleanup.c (.../tags/gcc_4_8_3_release)
10653
+++ b/src/gcc/tree-cfgcleanup.c (.../branches/gcc-4_8-branch)
10654
@@ -498,7 +498,20 @@
10656
/* First split basic block if stmt is not last. */
10657
if (stmt != gsi_stmt (gsi_last_bb (bb)))
10658
- split_block (bb, stmt);
10660
+ if (stmt == gsi_stmt (gsi_last_nondebug_bb (bb)))
10662
+ /* Don't split if there are only debug stmts
10663
+ after stmt, that can result in -fcompare-debug
10664
+ failures. Remove the debug stmts instead,
10665
+ they should be all unreachable anyway. */
10666
+ gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
10667
+ for (gsi_next (&gsi); !gsi_end_p (gsi); )
10668
+ gsi_remove (&gsi, true);
10671
+ split_block (bb, stmt);
10674
changed |= remove_fallthru_edge (bb->succs);
10676
Index: gcc/tree-sra.c
10677
===================================================================
10678
--- a/src/gcc/tree-sra.c (.../tags/gcc_4_8_3_release)
10679
+++ b/src/gcc/tree-sra.c (.../branches/gcc-4_8-branch)
10680
@@ -1030,6 +1030,11 @@
10684
+ if (TREE_THIS_VOLATILE (expr))
10686
+ disqualify_base_of_expr (expr, "part of a volatile reference.");
10690
switch (TREE_CODE (expr))
10692
Index: gcc/tree-ssa-forwprop.c
10693
===================================================================
10694
--- a/src/gcc/tree-ssa-forwprop.c (.../tags/gcc_4_8_3_release)
10695
+++ b/src/gcc/tree-ssa-forwprop.c (.../branches/gcc-4_8-branch)
10696
@@ -1438,7 +1438,8 @@
10697
use_operand_p use_p;
10699
if (!host_integerp (val2, 0)
10700
- || !host_integerp (len2, 1))
10701
+ || !host_integerp (len2, 1)
10702
+ || compare_tree_int (len2, 1024) == 1)
10704
if (is_gimple_call (stmt1))
10706
@@ -1504,7 +1505,8 @@
10707
is not constant, or is bigger than memcpy length, bail out. */
10709
|| !host_integerp (diff, 1)
10710
- || tree_int_cst_lt (len1, diff))
10711
+ || tree_int_cst_lt (len1, diff)
10712
+ || compare_tree_int (diff, 1024) == 1)
10715
/* Use maximum of difference plus memset length and memcpy length
10716
Index: gcc/graphite-clast-to-gimple.c
10717
===================================================================
10718
--- a/src/gcc/graphite-clast-to-gimple.c (.../tags/gcc_4_8_3_release)
10719
+++ b/src/gcc/graphite-clast-to-gimple.c (.../branches/gcc-4_8-branch)
10721
#include <isl/aff.h>
10722
#include <cloog/cloog.h>
10723
#include <cloog/isl/domain.h>
10724
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10725
+#include <isl/deprecated/int.h>
10726
+#include <isl/lp.h>
10727
+#include <isl/deprecated/ilp_int.h>
10731
#include "system.h"
10732
#include "coretypes.h"
10733
Index: gcc/common.opt
10734
===================================================================
10735
--- a/src/gcc/common.opt (.../tags/gcc_4_8_3_release)
10736
+++ b/src/gcc/common.opt (.../branches/gcc-4_8-branch)
10737
@@ -1226,6 +1226,10 @@
10738
Common Report Var(flag_tm)
10739
Enable support for GNU transactional memory
10742
+Common Report Var(flag_gnu_unique) Init(1)
10743
+Use STB_GNU_UNIQUE if supported by the assembler
10747
Does nothing. Preserved for backward compatibility.
10748
Index: gcc/graphite-optimize-isl.c
10749
===================================================================
10750
--- a/src/gcc/graphite-optimize-isl.c (.../tags/gcc_4_8_3_release)
10751
+++ b/src/gcc/graphite-optimize-isl.c (.../branches/gcc-4_8-branch)
10753
#include <isl/band.h>
10754
#include <isl/aff.h>
10755
#include <isl/options.h>
10756
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10757
+#include <isl/deprecated/int.h>
10758
+#include <isl/deprecated/aff_int.h>
10762
#include "system.h"
10763
#include "coretypes.h"
10764
@@ -365,7 +369,11 @@
10766
for (i = ScheduleDimensions - 1 ; i >= 0 ; i--)
10768
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10769
+ if (isl_band_member_is_coincident (Band, i))
10771
if (isl_band_member_is_zero_distance(Band, i))
10775
isl_union_map *TileUMap;
10776
Index: gcc/tree-vect-patterns.c
10777
===================================================================
10778
--- a/src/gcc/tree-vect-patterns.c (.../tags/gcc_4_8_3_release)
10779
+++ b/src/gcc/tree-vect-patterns.c (.../branches/gcc-4_8-branch)
10780
@@ -395,7 +395,7 @@
10783
oprnd00 = gimple_assign_rhs1 (def_stmt);
10784
- if (!type_conversion_p (oprnd0, stmt, true, &half_type1, &def_stmt,
10785
+ if (!type_conversion_p (oprnd1, stmt, true, &half_type1, &def_stmt,
10789
Index: gcc/sched-deps.c
10790
===================================================================
10791
--- a/src/gcc/sched-deps.c (.../tags/gcc_4_8_3_release)
10792
+++ b/src/gcc/sched-deps.c (.../branches/gcc-4_8-branch)
10793
@@ -2744,7 +2744,8 @@
10794
Consider for instance a volatile asm that changes the fpu rounding
10795
mode. An insn should not be moved across this even if it only uses
10796
pseudo-regs because it might give an incorrectly rounded result. */
10797
- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
10798
+ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
10799
+ && !DEBUG_INSN_P (insn))
10800
reg_pending_barrier = TRUE_BARRIER;
10802
/* For all ASM_OPERANDS, we must traverse the vector of input operands.
10803
Index: gcc/graphite-poly.c
10804
===================================================================
10805
--- a/src/gcc/graphite-poly.c (.../tags/gcc_4_8_3_release)
10806
+++ b/src/gcc/graphite-poly.c (.../branches/gcc-4_8-branch)
10808
#include <isl/aff.h>
10809
#include <cloog/cloog.h>
10810
#include <cloog/isl/domain.h>
10811
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10812
+#include <isl/deprecated/int.h>
10813
+#include <isl/deprecated/ilp_int.h>
10817
#include "system.h"
10818
#include "coretypes.h"
10819
Index: gcc/tree-vect-stmts.c
10820
===================================================================
10821
--- a/src/gcc/tree-vect-stmts.c (.../tags/gcc_4_8_3_release)
10822
+++ b/src/gcc/tree-vect-stmts.c (.../branches/gcc-4_8-branch)
10823
@@ -4319,6 +4319,7 @@
10824
int i, j, group_size;
10825
tree msq = NULL_TREE, lsq;
10826
tree offset = NULL_TREE;
10827
+ tree byte_offset = NULL_TREE;
10828
tree realignment_token = NULL_TREE;
10830
vec<tree> dr_chain = vNULL;
10831
@@ -4934,7 +4935,8 @@
10832
if (alignment_support_scheme == dr_explicit_realign_optimized)
10834
phi = SSA_NAME_DEF_STMT (msq);
10835
- offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
10836
+ byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype),
10841
@@ -4955,7 +4957,8 @@
10843
dataref_ptr = vect_create_data_ref_ptr (first_stmt, aggr_type, at_loop,
10844
offset, &dummy, gsi,
10845
- &ptr_incr, false, &inv_p);
10846
+ &ptr_incr, false, &inv_p,
10849
dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
10850
TYPE_SIZE_UNIT (aggr_type));
10851
Index: gcc/graphite-sese-to-poly.c
10852
===================================================================
10853
--- a/src/gcc/graphite-sese-to-poly.c (.../tags/gcc_4_8_3_release)
10854
+++ b/src/gcc/graphite-sese-to-poly.c (.../branches/gcc-4_8-branch)
10856
#include <cloog/cloog.h>
10857
#include <cloog/cloog.h>
10858
#include <cloog/isl/domain.h>
10859
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10860
+#include <isl/deprecated/int.h>
10861
+#include <isl/deprecated/aff_int.h>
10862
+#include <isl/deprecated/constraint_int.h>
10866
#include "system.h"
10867
#include "coretypes.h"
10868
Index: gcc/config.gcc
10869
===================================================================
10870
--- a/src/gcc/config.gcc (.../tags/gcc_4_8_3_release)
10871
+++ b/src/gcc/config.gcc (.../branches/gcc-4_8-branch)
10872
@@ -2466,7 +2466,7 @@
10875
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
10876
- tmake_file="sparc/t-sparc sparc/t-elf sparc/t-rtems t-rtems"
10877
+ tmake_file="sparc/t-sparc sparc/t-rtems t-rtems"
10880
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
10881
@@ -2992,6 +2992,9 @@
10889
with_cpu="`echo ${target} | sed 's/-.*$//'`"
10891
@@ -3630,7 +3633,7 @@
10893
"" | sparc | sparcv9 | sparc64 \
10895
- | v8 | supersparc | hypersparc | leon | leon3 \
10896
+ | v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \
10897
| sparclite | f930 | f934 | sparclite86x \
10898
| sparclet | tsc701 \
10899
| v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
10901
===================================================================
10902
--- a/src/gcc/ree.c (.../tags/gcc_4_8_3_release)
10903
+++ b/src/gcc/ree.c (.../branches/gcc-4_8-branch)
10904
@@ -261,6 +261,50 @@
10906
static int max_insn_uid;
10908
+/* Update or remove REG_EQUAL or REG_EQUIV notes for INSN. */
10911
+update_reg_equal_equiv_notes (rtx insn, enum machine_mode new_mode,
10912
+ enum machine_mode old_mode, enum rtx_code code)
10914
+ rtx *loc = ®_NOTES (insn);
10917
+ enum reg_note kind = REG_NOTE_KIND (*loc);
10918
+ if (kind == REG_EQUAL || kind == REG_EQUIV)
10920
+ rtx orig_src = XEXP (*loc, 0);
10921
+ /* Update equivalency constants. Recall that RTL constants are
10922
+ sign-extended. */
10923
+ if (GET_CODE (orig_src) == CONST_INT
10924
+ && HOST_BITS_PER_WIDE_INT >= GET_MODE_BITSIZE (new_mode))
10926
+ if (INTVAL (orig_src) >= 0 || code == SIGN_EXTEND)
10927
+ /* Nothing needed. */;
10930
+ /* Zero-extend the negative constant by masking out the
10931
+ bits outside the source mode. */
10932
+ rtx new_const_int
10933
+ = gen_int_mode (INTVAL (orig_src)
10934
+ & GET_MODE_MASK (old_mode),
10936
+ if (!validate_change (insn, &XEXP (*loc, 0),
10937
+ new_const_int, true))
10940
+ loc = &XEXP (*loc, 1);
10942
+ /* Drop all other notes, they assume a wrong mode. */
10943
+ else if (!validate_change (insn, loc, XEXP (*loc, 1), true))
10947
+ loc = &XEXP (*loc, 1);
10952
/* Given a insn (CURR_INSN), an extension candidate for removal (CAND)
10953
and a pointer to the SET rtx (ORIG_SET) that needs to be modified,
10954
this code modifies the SET rtx to a new SET rtx that extends the
10955
@@ -282,6 +326,7 @@
10956
combine_set_extension (ext_cand *cand, rtx curr_insn, rtx *orig_set)
10958
rtx orig_src = SET_SRC (*orig_set);
10959
+ enum machine_mode orig_mode = GET_MODE (SET_DEST (*orig_set));
10960
rtx new_reg = gen_rtx_REG (cand->mode, REGNO (SET_DEST (*orig_set)));
10963
@@ -296,9 +341,8 @@
10965
/* Zero-extend the negative constant by masking out the bits outside
10966
the source mode. */
10967
- enum machine_mode src_mode = GET_MODE (SET_DEST (*orig_set));
10969
- = GEN_INT (INTVAL (orig_src) & GET_MODE_MASK (src_mode));
10970
+ = GEN_INT (INTVAL (orig_src) & GET_MODE_MASK (orig_mode));
10971
new_set = gen_rtx_SET (VOIDmode, new_reg, new_const_int);
10974
@@ -336,7 +380,9 @@
10976
/* This change is a part of a group of changes. Hence,
10977
validate_change will not try to commit the change. */
10978
- if (validate_change (curr_insn, orig_set, new_set, true))
10979
+ if (validate_change (curr_insn, orig_set, new_set, true)
10980
+ && update_reg_equal_equiv_notes (curr_insn, cand->mode, orig_mode,
10985
@@ -385,7 +431,9 @@
10986
ifexpr = gen_rtx_IF_THEN_ELSE (cand->mode, cond, map_srcreg, map_srcreg2);
10987
new_set = gen_rtx_SET (VOIDmode, map_dstreg, ifexpr);
10989
- if (validate_change (def_insn, &PATTERN (def_insn), new_set, true))
10990
+ if (validate_change (def_insn, &PATTERN (def_insn), new_set, true)
10991
+ && update_reg_equal_equiv_notes (def_insn, cand->mode, GET_MODE (dstreg),
10996
Index: gcc/tree-ssa-reassoc.c
10997
===================================================================
10998
--- a/src/gcc/tree-ssa-reassoc.c (.../tags/gcc_4_8_3_release)
10999
+++ b/src/gcc/tree-ssa-reassoc.c (.../branches/gcc-4_8-branch)
11000
@@ -1898,7 +1898,7 @@
11004
- else if (p->high != NULL_TREE)
11005
+ else if (q->high != NULL_TREE)
11007
/* If both ranges are the same, sort below by ascending idx. */
11009
@@ -3297,6 +3297,9 @@
11010
switch (DECL_FUNCTION_CODE (fndecl))
11012
CASE_FLT_FN (BUILT_IN_POW):
11013
+ if (flag_errno_math)
11016
*base = gimple_call_arg (stmt, 0);
11017
arg1 = gimple_call_arg (stmt, 1);
11019
Index: gcc/config/alpha/elf.h
11020
===================================================================
11021
--- a/src/gcc/config/alpha/elf.h (.../tags/gcc_4_8_3_release)
11022
+++ b/src/gcc/config/alpha/elf.h (.../branches/gcc-4_8-branch)
11023
@@ -126,6 +126,10 @@
11024
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
11025
%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
11027
+/* This variable should be set to 'true' if the target ABI requires
11028
+ unwinding tables even when exceptions are not used. */
11029
+#define TARGET_UNWIND_TABLES_DEFAULT true
11031
/* Select a format to encode pointers in exception handling data. CODE
11032
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
11033
true if the symbol may be affected by dynamic relocations.
11034
Index: gcc/config/alpha/alpha.c
11035
===================================================================
11036
--- a/src/gcc/config/alpha/alpha.c (.../tags/gcc_4_8_3_release)
11037
+++ b/src/gcc/config/alpha/alpha.c (.../branches/gcc-4_8-branch)
11038
@@ -8658,6 +8658,11 @@
11043
+ /* __builtin_unreachable can expand to no code at all,
11044
+ leaving (barrier) RTXes in the instruction stream. */
11045
+ goto close_shadow_notrapb;
11050
@@ -8673,6 +8678,7 @@
11051
n = emit_insn_before (gen_trapb (), i);
11052
PUT_MODE (n, TImode);
11053
PUT_MODE (i, TImode);
11054
+ close_shadow_notrapb:
11057
shadow.used.fp = 0;
11058
Index: gcc/config/elfos.h
11059
===================================================================
11060
--- a/src/gcc/config/elfos.h (.../tags/gcc_4_8_3_release)
11061
+++ b/src/gcc/config/elfos.h (.../branches/gcc-4_8-branch)
11062
@@ -287,7 +287,7 @@
11063
/* Write the extra assembler code needed to declare an object properly. */
11065
#ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
11066
-#define USE_GNU_UNIQUE_OBJECT 1
11067
+#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
11069
#define USE_GNU_UNIQUE_OBJECT 0
11071
Index: gcc/config/sparc/t-rtems
11072
===================================================================
11073
--- a/src/gcc/config/sparc/t-rtems (.../tags/gcc_4_8_3_release)
11074
+++ b/src/gcc/config/sparc/t-rtems (.../branches/gcc-4_8-branch)
11076
# <http://www.gnu.org/licenses/>.
11079
-MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3
11080
-MULTILIB_DIRNAMES = soft v8 leon3
11081
+MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3/mcpu=leon3v7 muser-mode
11082
+MULTILIB_DIRNAMES = soft v8 leon3 leon3v7 user-mode
11083
MULTILIB_MATCHES = msoft-float=mno-fpu
11085
+MULTILIB_EXCEPTIONS = muser-mode
11086
+MULTILIB_EXCEPTIONS += mcpu=leon3
11087
+MULTILIB_EXCEPTIONS += mcpu=leon3v7
11088
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3
11089
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3v7
11090
+MULTILIB_EXCEPTIONS += msoft-float/muser-mode
11091
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=v8/muser-mode
11092
+MULTILIB_EXCEPTIONS += mcpu=v8/muser-mode
11093
Index: gcc/config/sparc/sparc.md
11094
===================================================================
11095
--- a/src/gcc/config/sparc/sparc.md (.../tags/gcc_4_8_3_release)
11096
+++ b/src/gcc/config/sparc/sparc.md (.../branches/gcc-4_8-branch)
11097
@@ -215,6 +215,7 @@
11105
Index: gcc/config/sparc/sparc.opt
11106
===================================================================
11107
--- a/src/gcc/config/sparc/sparc.opt (.../tags/gcc_4_8_3_release)
11108
+++ b/src/gcc/config/sparc/sparc.opt (.../branches/gcc-4_8-branch)
11109
@@ -153,6 +153,9 @@
11110
Enum(sparc_processor_type) String(leon3) Value(PROCESSOR_LEON3)
11113
+Enum(sparc_processor_type) String(leon3v7) Value(PROCESSOR_LEON3V7)
11116
Enum(sparc_processor_type) String(sparclite) Value(PROCESSOR_SPARCLITE)
11119
Index: gcc/config/sparc/sync.md
11120
===================================================================
11121
--- a/src/gcc/config/sparc/sync.md (.../tags/gcc_4_8_3_release)
11122
+++ b/src/gcc/config/sparc/sync.md (.../branches/gcc-4_8-branch)
11123
@@ -64,11 +64,19 @@
11125
[(set_attr "type" "multi")])
11127
+;; For LEON3, STB has the effect of membar #StoreLoad.
11128
+(define_insn "*membar_storeload_leon3"
11129
+ [(set (match_operand:BLK 0 "" "")
11130
+ (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
11132
+ "stb\t%%g0, [%%sp-1]"
11133
+ [(set_attr "type" "store")])
11135
;; For V8, LDSTUB has the effect of membar #StoreLoad.
11136
(define_insn "*membar_storeload"
11137
[(set (match_operand:BLK 0 "" "")
11138
(unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
11140
+ "TARGET_V8 && !TARGET_LEON3"
11141
"ldstub\t[%%sp-1], %%g0"
11142
[(set_attr "type" "multi")])
11144
Index: gcc/config/sparc/sparc-opts.h
11145
===================================================================
11146
--- a/src/gcc/config/sparc/sparc-opts.h (.../tags/gcc_4_8_3_release)
11147
+++ b/src/gcc/config/sparc/sparc-opts.h (.../branches/gcc-4_8-branch)
11149
PROCESSOR_HYPERSPARC,
11152
+ PROCESSOR_LEON3V7,
11153
PROCESSOR_SPARCLITE,
11156
Index: gcc/config/sparc/sparc.c
11157
===================================================================
11158
--- a/src/gcc/config/sparc/sparc.c (.../tags/gcc_4_8_3_release)
11159
+++ b/src/gcc/config/sparc/sparc.c (.../branches/gcc-4_8-branch)
11160
@@ -1210,6 +1210,7 @@
11161
{ TARGET_CPU_hypersparc, PROCESSOR_HYPERSPARC },
11162
{ TARGET_CPU_leon, PROCESSOR_LEON },
11163
{ TARGET_CPU_leon3, PROCESSOR_LEON3 },
11164
+ { TARGET_CPU_leon3v7, PROCESSOR_LEON3V7 },
11165
{ TARGET_CPU_sparclite, PROCESSOR_F930 },
11166
{ TARGET_CPU_sparclite86x, PROCESSOR_SPARCLITE86X },
11167
{ TARGET_CPU_sparclet, PROCESSOR_TSC701 },
11168
@@ -1238,6 +1239,7 @@
11169
{ "hypersparc", MASK_ISA, MASK_V8|MASK_FPU },
11170
{ "leon", MASK_ISA, MASK_V8|MASK_LEON|MASK_FPU },
11171
{ "leon3", MASK_ISA, MASK_V8|MASK_LEON3|MASK_FPU },
11172
+ { "leon3v7", MASK_ISA, MASK_LEON3|MASK_FPU },
11173
{ "sparclite", MASK_ISA, MASK_SPARCLITE },
11174
/* The Fujitsu MB86930 is the original sparclite chip, with no FPU. */
11175
{ "f930", MASK_ISA|MASK_FPU, MASK_SPARCLITE },
11176
@@ -1490,6 +1492,7 @@
11177
sparc_costs = &leon_costs;
11179
case PROCESSOR_LEON3:
11180
+ case PROCESSOR_LEON3V7:
11181
sparc_costs = &leon3_costs;
11183
case PROCESSOR_SPARCLET:
11184
Index: gcc/config/sparc/leon.md
11185
===================================================================
11186
--- a/src/gcc/config/sparc/leon.md (.../tags/gcc_4_8_3_release)
11187
+++ b/src/gcc/config/sparc/leon.md (.../branches/gcc-4_8-branch)
11188
@@ -29,11 +29,11 @@
11190
;; Use a double reservation to work around the load pipeline hazard on UT699.
11191
(define_insn_reservation "leon3_load" 1
11192
- (and (eq_attr "cpu" "leon3") (eq_attr "type" "load,sload"))
11193
+ (and (eq_attr "cpu" "leon3,leon3v7") (eq_attr "type" "load,sload"))
11196
(define_insn_reservation "leon_store" 2
11197
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "store"))
11198
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "store"))
11201
;; This describes Gaisler Research's FPU
11202
@@ -44,21 +44,21 @@
11203
(define_cpu_unit "grfpu_ds" "grfpu")
11205
(define_insn_reservation "leon_fp_alu" 4
11206
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fp,fpcmp,fpmul"))
11207
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fp,fpcmp,fpmul"))
11208
"grfpu_alu, nothing*3")
11210
(define_insn_reservation "leon_fp_divs" 16
11211
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivs"))
11212
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivs"))
11213
"grfpu_ds*14, nothing*2")
11215
(define_insn_reservation "leon_fp_divd" 17
11216
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivd"))
11217
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivd"))
11218
"grfpu_ds*15, nothing*2")
11220
(define_insn_reservation "leon_fp_sqrts" 24
11221
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrts"))
11222
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrts"))
11223
"grfpu_ds*22, nothing*2")
11225
(define_insn_reservation "leon_fp_sqrtd" 25
11226
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrtd"))
11227
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrtd"))
11228
"grfpu_ds*23, nothing*2")
11229
Index: gcc/config/sparc/sparc.h
11230
===================================================================
11231
--- a/src/gcc/config/sparc/sparc.h (.../tags/gcc_4_8_3_release)
11232
+++ b/src/gcc/config/sparc/sparc.h (.../branches/gcc-4_8-branch)
11233
@@ -137,21 +137,22 @@
11234
#define TARGET_CPU_hypersparc 3
11235
#define TARGET_CPU_leon 4
11236
#define TARGET_CPU_leon3 5
11237
-#define TARGET_CPU_sparclite 6
11238
-#define TARGET_CPU_f930 6 /* alias */
11239
-#define TARGET_CPU_f934 6 /* alias */
11240
-#define TARGET_CPU_sparclite86x 7
11241
-#define TARGET_CPU_sparclet 8
11242
-#define TARGET_CPU_tsc701 8 /* alias */
11243
-#define TARGET_CPU_v9 9 /* generic v9 implementation */
11244
-#define TARGET_CPU_sparcv9 9 /* alias */
11245
-#define TARGET_CPU_sparc64 9 /* alias */
11246
-#define TARGET_CPU_ultrasparc 10
11247
-#define TARGET_CPU_ultrasparc3 11
11248
-#define TARGET_CPU_niagara 12
11249
-#define TARGET_CPU_niagara2 13
11250
-#define TARGET_CPU_niagara3 14
11251
-#define TARGET_CPU_niagara4 15
11252
+#define TARGET_CPU_leon3v7 6
11253
+#define TARGET_CPU_sparclite 7
11254
+#define TARGET_CPU_f930 7 /* alias */
11255
+#define TARGET_CPU_f934 7 /* alias */
11256
+#define TARGET_CPU_sparclite86x 8
11257
+#define TARGET_CPU_sparclet 9
11258
+#define TARGET_CPU_tsc701 9 /* alias */
11259
+#define TARGET_CPU_v9 10 /* generic v9 implementation */
11260
+#define TARGET_CPU_sparcv9 10 /* alias */
11261
+#define TARGET_CPU_sparc64 10 /* alias */
11262
+#define TARGET_CPU_ultrasparc 11
11263
+#define TARGET_CPU_ultrasparc3 12
11264
+#define TARGET_CPU_niagara 13
11265
+#define TARGET_CPU_niagara2 14
11266
+#define TARGET_CPU_niagara3 15
11267
+#define TARGET_CPU_niagara4 16
11269
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
11270
|| TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
11271
@@ -239,8 +240,13 @@
11272
#define ASM_CPU32_DEFAULT_SPEC AS_LEON_FLAG
11275
+#if TARGET_CPU_DEFAULT == TARGET_CPU_leon3v7
11276
+#define CPP_CPU32_DEFAULT_SPEC "-D__leon__"
11277
+#define ASM_CPU32_DEFAULT_SPEC AS_LEONV7_FLAG
11282
#if !defined(CPP_CPU32_DEFAULT_SPEC) || !defined(CPP_CPU64_DEFAULT_SPEC)
11283
#error Unrecognized value in TARGET_CPU_DEFAULT.
11285
@@ -285,6 +291,7 @@
11286
%{mcpu=hypersparc:-D__hypersparc__ -D__sparc_v8__} \
11287
%{mcpu=leon:-D__leon__ -D__sparc_v8__} \
11288
%{mcpu=leon3:-D__leon__ -D__sparc_v8__} \
11289
+%{mcpu=leon3v7:-D__leon__} \
11290
%{mcpu=v9:-D__sparc_v9__} \
11291
%{mcpu=ultrasparc:-D__sparc_v9__} \
11292
%{mcpu=ultrasparc3:-D__sparc_v9__} \
11293
@@ -334,6 +341,7 @@
11294
%{mcpu=hypersparc:-Av8} \
11295
%{mcpu=leon:" AS_LEON_FLAG "} \
11296
%{mcpu=leon3:" AS_LEON_FLAG "} \
11297
+%{mcpu=leon3v7:" AS_LEONV7_FLAG "} \
11298
%{mv8plus:-Av8plus} \
11300
%{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \
11301
@@ -1760,8 +1768,10 @@
11303
#ifdef HAVE_AS_LEON
11304
#define AS_LEON_FLAG "-Aleon"
11305
+#define AS_LEONV7_FLAG "-Aleon"
11307
#define AS_LEON_FLAG "-Av8"
11308
+#define AS_LEONV7_FLAG "-Av7"
11311
/* We use gcc _mcount for profiling. */
11312
Index: gcc/config/i386/i386.md
11313
===================================================================
11314
--- a/src/gcc/config/i386/i386.md (.../tags/gcc_4_8_3_release)
11315
+++ b/src/gcc/config/i386/i386.md (.../branches/gcc-4_8-branch)
11316
@@ -5339,66 +5339,37 @@
11318
;; Avoid store forwarding (partial memory) stall penalty by extending
11319
;; SImode value to DImode through XMM register instead of pushing two
11320
-;; SImode values to stack. Note that even !TARGET_INTER_UNIT_MOVES
11321
-;; targets benefit from this optimization. Also note that fild
11322
-;; loads from memory only.
11323
+;; SImode values to stack. Also note that fild loads from memory only.
11325
-(define_insn "*floatunssi<mode>2_1"
11326
- [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
11327
+(define_insn_and_split "*floatunssi<mode>2_i387_with_xmm"
11328
+ [(set (match_operand:X87MODEF 0 "register_operand" "=f")
11329
(unsigned_float:X87MODEF
11330
- (match_operand:SI 1 "nonimmediate_operand" "x,m")))
11331
- (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
11332
- (clobber (match_scratch:SI 3 "=X,x"))]
11333
+ (match_operand:SI 1 "nonimmediate_operand" "rm")))
11334
+ (clobber (match_scratch:DI 3 "=x"))
11335
+ (clobber (match_operand:DI 2 "memory_operand" "=m"))]
11337
&& TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
11339
+ && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES"
11341
+ "&& reload_completed"
11342
+ [(set (match_dup 3) (zero_extend:DI (match_dup 1)))
11343
+ (set (match_dup 2) (match_dup 3))
11344
+ (set (match_dup 0)
11345
+ (float:X87MODEF (match_dup 2)))]
11347
[(set_attr "type" "multi")
11348
(set_attr "mode" "<MODE>")])
11351
- [(set (match_operand:X87MODEF 0 "register_operand")
11352
- (unsigned_float:X87MODEF
11353
- (match_operand:SI 1 "register_operand")))
11354
- (clobber (match_operand:DI 2 "memory_operand"))
11355
- (clobber (match_scratch:SI 3))]
11357
- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
11359
- && reload_completed"
11360
- [(set (match_dup 2) (match_dup 1))
11361
- (set (match_dup 0)
11362
- (float:X87MODEF (match_dup 2)))]
11363
- "operands[1] = simplify_gen_subreg (DImode, operands[1], SImode, 0);")
11366
- [(set (match_operand:X87MODEF 0 "register_operand")
11367
- (unsigned_float:X87MODEF
11368
- (match_operand:SI 1 "memory_operand")))
11369
- (clobber (match_operand:DI 2 "memory_operand"))
11370
- (clobber (match_scratch:SI 3))]
11372
- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
11374
- && reload_completed"
11375
- [(set (match_dup 2) (match_dup 3))
11376
- (set (match_dup 0)
11377
- (float:X87MODEF (match_dup 2)))]
11379
- emit_move_insn (operands[3], operands[1]);
11380
- operands[3] = simplify_gen_subreg (DImode, operands[3], SImode, 0);
11383
(define_expand "floatunssi<mode>2"
11385
[(set (match_operand:X87MODEF 0 "register_operand")
11386
(unsigned_float:X87MODEF
11387
(match_operand:SI 1 "nonimmediate_operand")))
11388
- (clobber (match_dup 2))
11389
- (clobber (match_scratch:SI 3))])]
11390
+ (clobber (match_scratch:DI 3))
11391
+ (clobber (match_dup 2))])]
11393
&& ((TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
11395
+ && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES)
11396
|| (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))"
11398
if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
11399
@@ -13545,7 +13516,8 @@
11400
(set (reg:CCFP FPSR_REG)
11401
(unspec:CCFP [(match_dup 2) (match_dup 3)]
11403
- "TARGET_USE_FANCY_MATH_387"
11404
+ "TARGET_USE_FANCY_MATH_387
11405
+ && flag_finite_math_only"
11407
[(set_attr "type" "fpspc")
11408
(set_attr "mode" "XF")])
11409
@@ -13554,7 +13526,8 @@
11410
[(use (match_operand:XF 0 "register_operand"))
11411
(use (match_operand:XF 1 "general_operand"))
11412
(use (match_operand:XF 2 "general_operand"))]
11413
- "TARGET_USE_FANCY_MATH_387"
11414
+ "TARGET_USE_FANCY_MATH_387
11415
+ && flag_finite_math_only"
11417
rtx label = gen_label_rtx ();
11419
@@ -13577,7 +13550,8 @@
11420
[(use (match_operand:MODEF 0 "register_operand"))
11421
(use (match_operand:MODEF 1 "general_operand"))
11422
(use (match_operand:MODEF 2 "general_operand"))]
11423
- "TARGET_USE_FANCY_MATH_387"
11424
+ "TARGET_USE_FANCY_MATH_387
11425
+ && flag_finite_math_only"
11427
rtx (*gen_truncxf) (rtx, rtx);
11429
@@ -13616,7 +13590,8 @@
11430
(set (reg:CCFP FPSR_REG)
11431
(unspec:CCFP [(match_dup 2) (match_dup 3)]
11433
- "TARGET_USE_FANCY_MATH_387"
11434
+ "TARGET_USE_FANCY_MATH_387
11435
+ && flag_finite_math_only"
11437
[(set_attr "type" "fpspc")
11438
(set_attr "mode" "XF")])
11439
@@ -13625,7 +13600,8 @@
11440
[(use (match_operand:XF 0 "register_operand"))
11441
(use (match_operand:XF 1 "general_operand"))
11442
(use (match_operand:XF 2 "general_operand"))]
11443
- "TARGET_USE_FANCY_MATH_387"
11444
+ "TARGET_USE_FANCY_MATH_387
11445
+ && flag_finite_math_only"
11447
rtx label = gen_label_rtx ();
11449
@@ -13648,7 +13624,8 @@
11450
[(use (match_operand:MODEF 0 "register_operand"))
11451
(use (match_operand:MODEF 1 "general_operand"))
11452
(use (match_operand:MODEF 2 "general_operand"))]
11453
- "TARGET_USE_FANCY_MATH_387"
11454
+ "TARGET_USE_FANCY_MATH_387
11455
+ && flag_finite_math_only"
11457
rtx (*gen_truncxf) (rtx, rtx);
11459
Index: gcc/config/i386/driver-i386.c
11460
===================================================================
11461
--- a/src/gcc/config/i386/driver-i386.c (.../tags/gcc_4_8_3_release)
11462
+++ b/src/gcc/config/i386/driver-i386.c (.../branches/gcc-4_8-branch)
11463
@@ -713,6 +713,11 @@
11464
/* Assume Core 2. */
11467
+ else if (has_longmode)
11468
+ /* Perhaps some emulator? Assume x86-64, otherwise gcc
11469
+ -march=native would be unusable for 64-bit compilations,
11470
+ as all the CPUs below are 32-bit only. */
11473
/* It is Core Duo. */
11475
Index: gcc/config/i386/i386.c
11476
===================================================================
11477
--- a/src/gcc/config/i386/i386.c (.../tags/gcc_4_8_3_release)
11478
+++ b/src/gcc/config/i386/i386.c (.../branches/gcc-4_8-branch)
11479
@@ -13800,7 +13800,7 @@
11480
if (mode == CCmode)
11482
else if (mode == CCCmode)
11484
+ suffix = fp ? "b" : "c";
11486
gcc_unreachable ();
11488
@@ -13823,9 +13823,9 @@
11491
if (mode == CCmode)
11492
- suffix = fp ? "nb" : "ae";
11494
else if (mode == CCCmode)
11496
+ suffix = fp ? "nb" : "nc";
11498
gcc_unreachable ();
11500
@@ -20505,7 +20505,7 @@
11501
t1 = gen_reg_rtx (V32QImode);
11502
t2 = gen_reg_rtx (V32QImode);
11503
t3 = gen_reg_rtx (V32QImode);
11504
- vt2 = GEN_INT (128);
11505
+ vt2 = GEN_INT (-128);
11506
for (i = 0; i < 32; i++)
11508
vt = gen_rtx_CONST_VECTOR (V32QImode, gen_rtvec_v (32, vec));
11509
@@ -24640,13 +24640,17 @@
11513
- /* Assume that region is SCC, i.e. all immediate predecessors
11514
- of non-head block are in the same region. */
11516
+ /* Regions are SCCs with the exception of selective
11517
+ scheduling with pipelining of outer blocks enabled.
11518
+ So also check that immediate predecessors of a non-head
11519
+ block are in the same region. */
11520
FOR_EACH_EDGE (e, ei, bb->preds)
11522
/* Avoid creating of loop-carried dependencies through
11523
- using topological odering in region. */
11524
- if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
11525
+ using topological ordering in the region. */
11526
+ if (rgn == CONTAINING_RGN (e->src->index)
11527
+ && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
11528
add_dependee_for_func_arg (first_arg, e->src);
11531
@@ -38807,8 +38811,8 @@
11532
op0 = gen_lowpart (V4DImode, d->op0);
11533
op1 = gen_lowpart (V4DImode, d->op1);
11535
- = GEN_INT (((d->perm[0] & (nelt / 2)) ? 1 : 0)
11536
- || ((d->perm[nelt / 2] & (nelt / 2)) ? 2 : 0));
11537
+ = GEN_INT ((d->perm[0] / (nelt / 2))
11538
+ | ((d->perm[nelt / 2] / (nelt / 2)) * 16));
11539
emit_insn (gen_avx2_permv2ti (target, op0, op1, rperm[0]));
11542
Index: gcc/config/sh/sh.c
11543
===================================================================
11544
--- a/src/gcc/config/sh/sh.c (.../tags/gcc_4_8_3_release)
11545
+++ b/src/gcc/config/sh/sh.c (.../branches/gcc-4_8-branch)
11546
@@ -808,6 +808,12 @@
11547
targetm.asm_out.aligned_op.di = NULL;
11548
targetm.asm_out.unaligned_op.di = NULL;
11551
+ /* User/priviledged mode is supported only on SH3*, SH4* and SH5*.
11552
+ Disable it for everything else. */
11553
+ if (! (TARGET_SH3 || TARGET_SH5) && TARGET_USERMODE)
11554
+ TARGET_USERMODE = false;
11558
if (! strcmp (sh_div_str, "call-div1"))
11559
@@ -3036,7 +3042,7 @@
11560
struct ashl_lshr_sequence
11564
+ signed char amount[6];
11568
Index: gcc/config/sh/sync.md
11569
===================================================================
11570
--- a/src/gcc/config/sh/sync.md (.../tags/gcc_4_8_3_release)
11571
+++ b/src/gcc/config/sh/sync.md (.../branches/gcc-4_8-branch)
11572
@@ -466,6 +466,7 @@
11573
(set (mem:SI (match_dup 1))
11575
[(match_operand:SI 2 "arith_operand" "rI08")] UNSPEC_ATOMIC))
11576
+ (set (reg:SI T_REG) (const_int 1))
11577
(clobber (reg:SI R0_REG))]
11578
"TARGET_ATOMIC_HARD_LLCS
11579
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11580
@@ -484,6 +485,7 @@
11581
(set (mem:QIHI (match_dup 1))
11583
[(match_operand:QIHI 2 "register_operand" "r")] UNSPEC_ATOMIC))
11584
+ (set (reg:SI T_REG) (const_int 1))
11585
(clobber (reg:SI R0_REG))
11586
(clobber (match_scratch:SI 3 "=&r"))
11587
(clobber (match_scratch:SI 4 "=1"))]
11588
@@ -617,6 +619,7 @@
11589
[(FETCHOP:SI (mem:SI (match_dup 1))
11590
(match_operand:SI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
11592
+ (set (reg:SI T_REG) (const_int 1))
11593
(clobber (reg:SI R0_REG))]
11594
"TARGET_ATOMIC_HARD_LLCS
11595
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11596
@@ -637,6 +640,7 @@
11597
[(FETCHOP:QIHI (mem:QIHI (match_dup 1))
11598
(match_operand:QIHI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
11600
+ (set (reg:SI T_REG) (const_int 1))
11601
(clobber (reg:SI R0_REG))
11602
(clobber (match_scratch:SI 3 "=&r"))
11603
(clobber (match_scratch:SI 4 "=1"))]
11604
@@ -784,6 +788,7 @@
11605
[(not:SI (and:SI (mem:SI (match_dup 1))
11606
(match_operand:SI 2 "logical_operand" "rK08")))]
11608
+ (set (reg:SI T_REG) (const_int 1))
11609
(clobber (reg:SI R0_REG))]
11610
"TARGET_ATOMIC_HARD_LLCS
11611
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11612
@@ -805,6 +810,7 @@
11613
[(not:QIHI (and:QIHI (mem:QIHI (match_dup 1))
11614
(match_operand:QIHI 2 "logical_operand" "rK08")))]
11616
+ (set (reg:SI T_REG) (const_int 1))
11617
(clobber (reg:SI R0_REG))
11618
(clobber (match_scratch:SI 3 "=&r"))
11619
(clobber (match_scratch:SI 4 "=1"))]
11620
@@ -903,7 +909,7 @@
11623
" mov.<bwl> %3,@%1" "\n"
11627
[(set_attr "length" "20")])
11629
@@ -960,7 +966,8 @@
11630
(set (mem:SI (match_dup 1))
11632
[(FETCHOP:SI (mem:SI (match_dup 1)) (match_dup 2))]
11635
+ (set (reg:SI T_REG) (const_int 1))]
11636
"TARGET_ATOMIC_HARD_LLCS
11637
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11639
@@ -980,6 +987,7 @@
11641
[(FETCHOP:QIHI (mem:QIHI (match_dup 1)) (match_dup 2))]
11643
+ (set (reg:SI T_REG) (const_int 1))
11644
(clobber (reg:SI R0_REG))
11645
(clobber (match_scratch:SI 3 "=&r"))
11646
(clobber (match_scratch:SI 4 "=1"))]
11647
@@ -1124,7 +1132,8 @@
11648
(set (mem:SI (match_dup 1))
11650
[(not:SI (and:SI (mem:SI (match_dup 1)) (match_dup 2)))]
11653
+ (set (reg:SI T_REG) (const_int 1))]
11654
"TARGET_ATOMIC_HARD_LLCS
11655
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11657
@@ -1145,6 +1154,7 @@
11659
[(not:QIHI (and:QIHI (mem:QIHI (match_dup 1)) (match_dup 2)))]
11661
+ (set (reg:SI T_REG) (const_int 1))
11662
(clobber (reg:SI R0_REG))
11663
(clobber (match_scratch:SI 3 "=&r"))
11664
(clobber (match_scratch:SI 4 "=1"))]
11665
@@ -1353,7 +1363,7 @@
11667
" mov.b @%0,r0" "\n"
11668
" mov.b %1,@%0" "\n"
11669
- " stc %2,sr" "\n"
11670
+ " ldc %2,sr" "\n"
11673
[(set_attr "length" "16")])
11674
Index: gcc/config/sh/sh.md
11675
===================================================================
11676
--- a/src/gcc/config/sh/sh.md (.../tags/gcc_4_8_3_release)
11677
+++ b/src/gcc/config/sh/sh.md (.../branches/gcc-4_8-branch)
11678
@@ -6133,10 +6133,9 @@
11681
(define_expand "extendqihi2"
11682
- [(set (match_operand:HI 0 "arith_reg_dest" "")
11683
- (sign_extend:HI (match_operand:QI 1 "arith_reg_operand" "")))]
11686
+ [(set (match_operand:HI 0 "arith_reg_dest")
11687
+ (sign_extend:HI (match_operand:QI 1 "arith_reg_operand")))]
11690
(define_insn "*extendqihi2_compact_reg"
11691
[(set (match_operand:HI 0 "arith_reg_dest" "=r")
11692
Index: gcc/config/sh/sh.opt
11693
===================================================================
11694
--- a/src/gcc/config/sh/sh.opt (.../tags/gcc_4_8_3_release)
11695
+++ b/src/gcc/config/sh/sh.opt (.../branches/gcc-4_8-branch)
11696
@@ -343,7 +343,7 @@
11697
Cost to assume for a multiply insn
11700
-Target Report RejectNegative Var(TARGET_USERMODE)
11701
+Target Var(TARGET_USERMODE)
11702
Don't generate privileged-mode only code; implies -mno-inline-ic_invalidate if the inline code would not work in user mode.
11704
;; We might want to enable this by default for TARGET_HARD_SH4, because
11705
Index: gcc/config/microblaze/predicates.md
11706
===================================================================
11707
--- a/src/gcc/config/microblaze/predicates.md (.../tags/gcc_4_8_3_release)
11708
+++ b/src/gcc/config/microblaze/predicates.md (.../branches/gcc-4_8-branch)
11710
(ior (match_operand 0 "const_0_operand")
11711
(match_operand 0 "register_operand")))
11713
-(define_predicate "reg_or_mem_operand"
11714
- (ior (match_operand 0 "memory_operand")
11715
- (match_operand 0 "register_operand")))
11717
;; Return if the operand is either the PC or a label_ref.
11718
(define_special_predicate "pc_or_label_operand"
11719
(ior (match_code "pc,label_ref")
11720
Index: gcc/config/microblaze/microblaze.md
11721
===================================================================
11722
--- a/src/gcc/config/microblaze/microblaze.md (.../tags/gcc_4_8_3_release)
11723
+++ b/src/gcc/config/microblaze/microblaze.md (.../branches/gcc-4_8-branch)
11724
@@ -1119,18 +1119,6 @@
11728
-;;Load and store reverse
11729
-(define_insn "movsi4_rev"
11730
- [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q")
11731
- (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))]
11736
- [(set_attr "type" "load,store")
11737
- (set_attr "mode" "SI")
11738
- (set_attr "length" "4,4")])
11740
;; 32-bit floating point moves
11742
(define_expand "movsf"
11743
Index: gcc/config/avr/avr-fixed.md
11744
===================================================================
11745
--- a/src/gcc/config/avr/avr-fixed.md (.../tags/gcc_4_8_3_release)
11746
+++ b/src/gcc/config/avr/avr-fixed.md (.../branches/gcc-4_8-branch)
11747
@@ -430,8 +430,8 @@
11750
// Input and output of the libgcc function
11751
- const unsigned int regno_in[] = { -1, 22, 22, -1, 18 };
11752
- const unsigned int regno_out[] = { -1, 24, 24, -1, 22 };
11753
+ const unsigned int regno_in[] = { -1U, 22, 22, -1U, 18 };
11754
+ const unsigned int regno_out[] = { -1U, 24, 24, -1U, 22 };
11756
operands[3] = gen_rtx_REG (<MODE>mode, regno_out[(size_t) GET_MODE_SIZE (<MODE>mode)]);
11757
operands[4] = gen_rtx_REG (<MODE>mode, regno_in[(size_t) GET_MODE_SIZE (<MODE>mode)]);
11758
Index: gcc/config/avr/avr.md
11759
===================================================================
11760
--- a/src/gcc/config/avr/avr.md (.../tags/gcc_4_8_3_release)
11761
+++ b/src/gcc/config/avr/avr.md (.../branches/gcc-4_8-branch)
11762
@@ -367,6 +367,15 @@
11767
+ // Avoid (subreg (mem)) for non-generic address spaces below. Because
11768
+ // of the poor addressing capabilities of these spaces it's better to
11769
+ // load them in one chunk. And it avoids PR61443.
11771
+ if (MEM_P (operands[0])
11772
+ && !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[0])))
11773
+ operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
11775
for (i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
11777
rtx part = simplify_gen_subreg (QImode, operands[0], <MODE>mode, i);
11778
Index: gcc/config/avr/avr.h
11779
===================================================================
11780
--- a/src/gcc/config/avr/avr.h (.../tags/gcc_4_8_3_release)
11781
+++ b/src/gcc/config/avr/avr.h (.../branches/gcc-4_8-branch)
11782
@@ -250,18 +250,18 @@
11783
#define REG_CLASS_CONTENTS { \
11784
{0x00000000,0x00000000}, /* NO_REGS */ \
11785
{0x00000001,0x00000000}, /* R0_REG */ \
11786
- {3 << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
11787
- {3 << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
11788
- {3 << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
11789
+ {3u << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
11790
+ {3u << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
11791
+ {3u << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
11792
{0x00000000,0x00000003}, /* STACK_REG, STACK */ \
11793
- {(3 << REG_Y) | (3 << REG_Z), \
11794
+ {(3u << REG_Y) | (3u << REG_Z), \
11795
0x00000000}, /* BASE_POINTER_REGS, r28 - r31 */ \
11796
- {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z), \
11797
+ {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z), \
11798
0x00000000}, /* POINTER_REGS, r26 - r31 */ \
11799
- {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W), \
11800
+ {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z) | (3u << REG_W), \
11801
0x00000000}, /* ADDW_REGS, r24 - r31 */ \
11802
{0x00ff0000,0x00000000}, /* SIMPLE_LD_REGS r16 - r23 */ \
11803
- {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16), \
11804
+ {(3u << REG_X)|(3u << REG_Y)|(3u << REG_Z)|(3u << REG_W)|(0xffu << 16),\
11805
0x00000000}, /* LD_REGS, r16 - r31 */ \
11806
{0x0000ffff,0x00000000}, /* NO_LD_REGS r0 - r15 */ \
11807
{0xffffffff,0x00000000}, /* GENERAL_REGS, r0 - r31 */ \
11808
Index: gcc/config/aarch64/arm_neon.h
11809
===================================================================
11810
--- a/src/gcc/config/aarch64/arm_neon.h (.../tags/gcc_4_8_3_release)
11811
+++ b/src/gcc/config/aarch64/arm_neon.h (.../branches/gcc-4_8-branch)
11812
@@ -13815,7 +13815,7 @@
11814
__asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
11818
: /* No clobbers */);
11821
@@ -13837,7 +13837,7 @@
11823
__asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
11827
: /* No clobbers */);
11830
Index: gcc/config/aarch64/aarch64.md
11831
===================================================================
11832
--- a/src/gcc/config/aarch64/aarch64.md (.../tags/gcc_4_8_3_release)
11833
+++ b/src/gcc/config/aarch64/aarch64.md (.../branches/gcc-4_8-branch)
11834
@@ -3292,6 +3292,7 @@
11835
(unspec:DI [(match_operand:DI 0 "aarch64_valid_symref" "S")]
11837
(clobber (reg:DI LR_REGNUM))
11838
+ (clobber (reg:CC CC_REGNUM))
11839
(clobber (match_scratch:DI 1 "=r"))]
11841
"adrp\\tx0, %A0\;ldr\\t%1, [x0, #%L0]\;add\\tx0, x0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
11842
Index: gcc/config/aarch64/aarch64.opt
11843
===================================================================
11844
--- a/src/gcc/config/aarch64/aarch64.opt (.../tags/gcc_4_8_3_release)
11845
+++ b/src/gcc/config/aarch64/aarch64.opt (.../branches/gcc-4_8-branch)
11847
Target Report RejectNegative Mask(GENERAL_REGS_ONLY)
11848
Generate code which uses only the general registers
11850
+mfix-cortex-a53-835769
11851
+Target Report Var(aarch64_fix_a53_err835769) Init(2)
11852
+Workaround for ARM Cortex-A53 Erratum number 835769
11855
Target Report RejectNegative InverseMask(BIG_END)
11856
Assume target CPU is configured as little endian
11857
Index: gcc/config/aarch64/aarch64-protos.h
11858
===================================================================
11859
--- a/src/gcc/config/aarch64/aarch64-protos.h (.../tags/gcc_4_8_3_release)
11860
+++ b/src/gcc/config/aarch64/aarch64-protos.h (.../branches/gcc-4_8-branch)
11861
@@ -247,6 +247,8 @@
11863
extern void aarch64_split_combinev16qi (rtx operands[3]);
11864
extern void aarch64_expand_vec_perm (rtx target, rtx op0, rtx op1, rtx sel);
11865
+extern bool aarch64_madd_needs_nop (rtx);
11866
+extern void aarch64_final_prescan_insn (rtx);
11868
aarch64_expand_vec_perm_const (rtx target, rtx op0, rtx op1, rtx sel);
11870
Index: gcc/config/aarch64/aarch64.c
11871
===================================================================
11872
--- a/src/gcc/config/aarch64/aarch64.c (.../tags/gcc_4_8_3_release)
11873
+++ b/src/gcc/config/aarch64/aarch64.c (.../branches/gcc-4_8-branch)
11874
@@ -1201,6 +1201,7 @@
11875
CUMULATIVE_ARGS *pcum = get_cumulative_args (pcum_v);
11876
int ncrn, nvrn, nregs;
11877
bool allocate_ncrn, allocate_nvrn;
11878
+ HOST_WIDE_INT size;
11880
/* We need to do this once per argument. */
11881
if (pcum->aapcs_arg_processed)
11882
@@ -1208,6 +1209,11 @@
11884
pcum->aapcs_arg_processed = true;
11886
+ /* Size in bytes, rounded to the nearest multiple of 8 bytes. */
11888
+ = AARCH64_ROUND_UP (type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode),
11891
allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
11892
allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v,
11894
@@ -1258,10 +1264,8 @@
11897
ncrn = pcum->aapcs_ncrn;
11898
- nregs = ((type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode))
11899
- + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
11900
+ nregs = size / UNITS_PER_WORD;
11903
/* C6 - C9. though the sign and zero extension semantics are
11904
handled elsewhere. This is the case where the argument fits
11905
entirely general registers. */
11906
@@ -1309,13 +1313,12 @@
11907
pcum->aapcs_nextncrn = NUM_ARG_REGS;
11909
/* The argument is passed on stack; record the needed number of words for
11910
- this argument (we can re-use NREGS) and align the total size if
11912
+ this argument and align the total size if necessary. */
11914
- pcum->aapcs_stack_words = nregs;
11915
+ pcum->aapcs_stack_words = size / UNITS_PER_WORD;
11916
if (aarch64_function_arg_alignment (mode, type) == 16 * BITS_PER_UNIT)
11917
pcum->aapcs_stack_size = AARCH64_ROUND_UP (pcum->aapcs_stack_size,
11918
- 16 / UNITS_PER_WORD) + 1;
11919
+ 16 / UNITS_PER_WORD);
11923
@@ -4845,6 +4848,15 @@
11924
aarch64_tune = selected_tune->core;
11925
aarch64_tune_params = selected_tune->tune;
11927
+ if (aarch64_fix_a53_err835769 == 2)
11929
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
11930
+ aarch64_fix_a53_err835769 = 1;
11932
+ aarch64_fix_a53_err835769 = 0;
11936
aarch64_override_options_after_change ();
11939
@@ -6037,6 +6049,135 @@
11944
+/* Return true iff X is a MEM rtx. */
11947
+is_mem_p (rtx *x, void *data ATTRIBUTE_UNUSED)
11949
+ return MEM_P (*x);
11953
+/* Return true if mem_insn contains a MEM RTX somewhere in it. */
11956
+has_memory_op (rtx mem_insn)
11958
+ rtx pattern = PATTERN (mem_insn);
11959
+ return for_each_rtx (&pattern, is_mem_p, NULL);
11963
+/* Find the first rtx before insn that will generate an assembly
11967
+aarch64_prev_real_insn (rtx insn)
11974
+ insn = prev_real_insn (insn);
11976
+ while (insn && recog_memoized (insn) < 0);
11981
+/* Return true iff t1 is the v8type of a multiply-accumulate instruction. */
11984
+is_madd_op (enum attr_v8type t1)
11986
+ return t1 == V8TYPE_MADD
11987
+ || t1 == V8TYPE_MADDL;
11991
+/* Check if there is a register dependency between a load and the insn
11992
+ for which we hold recog_data. */
11995
+dep_between_memop_and_curr (rtx memop)
12000
+ gcc_assert (GET_CODE (memop) == SET);
12002
+ if (!REG_P (SET_DEST (memop)))
12005
+ load_reg = SET_DEST (memop);
12006
+ for (opno = 1; opno < recog_data.n_operands; opno++)
12008
+ rtx operand = recog_data.operand[opno];
12009
+ if (REG_P (operand)
12010
+ && reg_overlap_mentioned_p (load_reg, operand))
12019
+/* When working around the Cortex-A53 erratum 835769,
12020
+ given rtx_insn INSN, return true if it is a 64-bit multiply-accumulate
12021
+ instruction and has a preceding memory instruction such that a NOP
12022
+ should be inserted between them. */
12025
+aarch64_madd_needs_nop (rtx insn)
12027
+ enum attr_v8type attr_type;
12031
+ if (!aarch64_fix_a53_err835769)
12034
+ if (recog_memoized (insn) < 0)
12037
+ attr_type = get_attr_v8type (insn);
12038
+ if (!is_madd_op (attr_type))
12041
+ prev = aarch64_prev_real_insn (insn);
12042
+ /* aarch64_prev_real_insn can call recog_memoized on insns other than INSN.
12043
+ Restore recog state to INSN to avoid state corruption. */
12044
+ extract_constrain_insn_cached (insn);
12046
+ if (!prev || !has_memory_op (prev))
12049
+ body = single_set (prev);
12051
+ /* If the previous insn is a memory op and there is no dependency between
12052
+ it and the madd, emit a nop between them. If we know it's a memop but
12053
+ body is NULL, return true to be safe. */
12054
+ if (GET_MODE (recog_data.operand[0]) == DImode
12055
+ && (!body || !dep_between_memop_and_curr (body)))
12062
+/* Implement FINAL_PRESCAN_INSN. */
12065
+aarch64_final_prescan_insn (rtx insn)
12067
+ if (aarch64_madd_needs_nop (insn))
12068
+ fprintf (asm_out_file, "\tnop // between mem op and mult-accumulate\n");
12072
/* Return the equivalent letter for size. */
12073
static unsigned char
12074
sizetochar (int size)
12075
Index: gcc/config/aarch64/aarch64-elf-raw.h
12076
===================================================================
12077
--- a/src/gcc/config/aarch64/aarch64-elf-raw.h (.../tags/gcc_4_8_3_release)
12078
+++ b/src/gcc/config/aarch64/aarch64-elf-raw.h (.../branches/gcc-4_8-branch)
12080
#define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
12081
#define ENDFILE_SPEC " crtend%O%s crtn%O%s"
12083
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
12084
+#define CA53_ERR_835769_SPEC \
12085
+ " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
12087
+#define CA53_ERR_835769_SPEC \
12088
+ " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
12092
-#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
12093
+#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X" \
12094
+ CA53_ERR_835769_SPEC
12097
#endif /* GCC_AARCH64_ELF_RAW_H */
12098
Index: gcc/config/aarch64/aarch64-linux.h
12099
===================================================================
12100
--- a/src/gcc/config/aarch64/aarch64-linux.h (.../tags/gcc_4_8_3_release)
12101
+++ b/src/gcc/config/aarch64/aarch64-linux.h (.../branches/gcc-4_8-branch)
12104
%{mbig-endian:-EB} %{mlittle-endian:-EL}"
12106
-#define LINK_SPEC LINUX_TARGET_LINK_SPEC
12107
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
12108
+#define CA53_ERR_835769_SPEC \
12109
+ " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
12111
+#define CA53_ERR_835769_SPEC \
12112
+ " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
12115
+#define LINK_SPEC LINUX_TARGET_LINK_SPEC \
12116
+ CA53_ERR_835769_SPEC
12118
#define TARGET_OS_CPP_BUILTINS() \
12125
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
12127
#endif /* GCC_AARCH64_LINUX_H */
12128
Index: gcc/config/aarch64/aarch64.h
12129
===================================================================
12130
--- a/src/gcc/config/aarch64/aarch64.h (.../tags/gcc_4_8_3_release)
12131
+++ b/src/gcc/config/aarch64/aarch64.h (.../branches/gcc-4_8-branch)
12132
@@ -465,6 +465,18 @@
12133
(TARGET_CPU_generic | (AARCH64_CPU_DEFAULT_FLAGS << 6))
12136
+/* If inserting NOP before a mult-accumulate insn remember to adjust the
12137
+ length so that conditional branching code is updated appropriately. */
12138
+#define ADJUST_INSN_LENGTH(insn, length) \
12141
+ if (aarch64_madd_needs_nop (insn)) \
12145
+#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
12146
+ aarch64_final_prescan_insn (INSN); \
12148
/* The processor for which instructions should be scheduled. */
12149
extern enum aarch64_processor aarch64_tune;
12151
Index: gcc/config/rs6000/constraints.md
12152
===================================================================
12153
--- a/src/gcc/config/rs6000/constraints.md (.../tags/gcc_4_8_3_release)
12154
+++ b/src/gcc/config/rs6000/constraints.md (.../branches/gcc-4_8-branch)
12156
(define_register_constraint "wg" "rs6000_constraints[RS6000_CONSTRAINT_wg]"
12157
"If -mmfpgpr was used, a floating point register or NO_REGS.")
12159
+(define_register_constraint "wh" "rs6000_constraints[RS6000_CONSTRAINT_wh]"
12160
+ "Floating point register if direct moves are available, or NO_REGS.")
12162
+;; At present, DImode is not allowed in the Altivec registers. If in the
12163
+;; future it is allowed, wi/wj can be set to VSX_REGS instead of FLOAT_REGS.
12164
+(define_register_constraint "wi" "rs6000_constraints[RS6000_CONSTRAINT_wi]"
12165
+ "FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS.")
12167
+(define_register_constraint "wj" "rs6000_constraints[RS6000_CONSTRAINT_wj]"
12168
+ "FP or VSX register to hold 64-bit integers for direct moves or NO_REGS.")
12170
+(define_register_constraint "wk" "rs6000_constraints[RS6000_CONSTRAINT_wk]"
12171
+ "FP or VSX register to hold 64-bit doubles for direct moves or NO_REGS.")
12173
(define_register_constraint "wl" "rs6000_constraints[RS6000_CONSTRAINT_wl]"
12174
"Floating point register if the LFIWAX instruction is enabled or NO_REGS.")
12177
"Floating point register if the STFIWX instruction is enabled or NO_REGS.")
12179
(define_register_constraint "wy" "rs6000_constraints[RS6000_CONSTRAINT_wy]"
12180
- "VSX vector register to hold scalar float values or NO_REGS.")
12181
+ "FP or VSX register to perform ISA 2.07 float ops or NO_REGS.")
12183
(define_register_constraint "wz" "rs6000_constraints[RS6000_CONSTRAINT_wz]"
12184
"Floating point register if the LFIWZX instruction is enabled or NO_REGS.")
12185
Index: gcc/config/rs6000/predicates.md
12186
===================================================================
12187
--- a/src/gcc/config/rs6000/predicates.md (.../tags/gcc_4_8_3_release)
12188
+++ b/src/gcc/config/rs6000/predicates.md (.../branches/gcc-4_8-branch)
12189
@@ -1795,7 +1795,7 @@
12190
(define_predicate "fusion_gpr_mem_load"
12191
(match_code "mem,sign_extend,zero_extend")
12194
+ rtx addr, base, offset;
12196
/* Handle sign/zero extend. */
12197
if (GET_CODE (op) == ZERO_EXTEND
12198
@@ -1825,24 +1825,79 @@
12201
addr = XEXP (op, 0);
12202
+ if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
12205
+ base = XEXP (addr, 0);
12206
+ if (!base_reg_operand (base, GET_MODE (base)))
12209
+ offset = XEXP (addr, 1);
12211
if (GET_CODE (addr) == PLUS)
12212
+ return satisfies_constraint_I (offset);
12214
+ else if (GET_CODE (addr) == LO_SUM)
12216
- rtx base = XEXP (addr, 0);
12217
- rtx offset = XEXP (addr, 1);
12218
+ if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
12219
+ return small_toc_ref (offset, GET_MODE (offset));
12221
- return (base_reg_operand (base, GET_MODE (base))
12222
- && satisfies_constraint_I (offset));
12223
+ else if (TARGET_ELF && !TARGET_POWERPC64)
12224
+ return CONSTANT_P (offset);
12227
- else if (GET_CODE (addr) == LO_SUM)
12231
+;; Match a GPR load (lbz, lhz, lwz, ld) that uses a combined address in the
12232
+;; memory field with both the addis and the memory offset. Sign extension
12233
+;; is not handled here, since lha and lwa are not fused.
12234
+(define_predicate "fusion_gpr_mem_combo"
12235
+ (match_code "mem,zero_extend")
12237
+ rtx addr, base, offset;
12239
+ /* Handle zero extend. */
12240
+ if (GET_CODE (op) == ZERO_EXTEND)
12242
- rtx base = XEXP (addr, 0);
12243
- rtx offset = XEXP (addr, 1);
12244
+ op = XEXP (op, 0);
12245
+ mode = GET_MODE (op);
12248
- if (!base_reg_operand (base, GET_MODE (base)))
12260
+ if (!TARGET_POWERPC64)
12264
- else if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
12269
+ addr = XEXP (op, 0);
12270
+ if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
12273
+ base = XEXP (addr, 0);
12274
+ if (!fusion_gpr_addis (base, GET_MODE (base)))
12277
+ offset = XEXP (addr, 1);
12278
+ if (GET_CODE (addr) == PLUS)
12279
+ return satisfies_constraint_I (offset);
12281
+ else if (GET_CODE (addr) == LO_SUM)
12283
+ if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
12284
return small_toc_ref (offset, GET_MODE (offset));
12286
else if (TARGET_ELF && !TARGET_POWERPC64)
12287
Index: gcc/config/rs6000/htm.md
12288
===================================================================
12289
--- a/src/gcc/config/rs6000/htm.md (.../tags/gcc_4_8_3_release)
12290
+++ b/src/gcc/config/rs6000/htm.md (.../branches/gcc-4_8-branch)
12291
@@ -179,7 +179,7 @@
12293
UNSPECV_HTM_TABORTWCI))
12294
(set (subreg:CC (match_dup 2) 0) (match_dup 1))
12295
- (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 24)))
12296
+ (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
12297
(parallel [(set (match_operand:SI 0 "int_reg_operand" "")
12298
(and:SI (match_dup 3) (const_int 15)))
12299
(clobber (scratch:CC))])]
12300
Index: gcc/config/rs6000/freebsd64.h
12301
===================================================================
12302
--- a/src/gcc/config/rs6000/freebsd64.h (.../tags/gcc_4_8_3_release)
12303
+++ b/src/gcc/config/rs6000/freebsd64.h (.../branches/gcc-4_8-branch)
12304
@@ -367,7 +367,7 @@
12305
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
12306
#undef ADJUST_FIELD_ALIGN
12307
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
12308
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
12309
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
12312
&& TARGET_ALIGN_NATURAL == 0 \
12313
Index: gcc/config/rs6000/rs6000-protos.h
12314
===================================================================
12315
--- a/src/gcc/config/rs6000/rs6000-protos.h (.../tags/gcc_4_8_3_release)
12316
+++ b/src/gcc/config/rs6000/rs6000-protos.h (.../branches/gcc-4_8-branch)
12318
extern void altivec_expand_stvex_be (rtx, rtx, enum machine_mode, unsigned);
12319
extern void rs6000_expand_extract_even (rtx, rtx, rtx);
12320
extern void rs6000_expand_interleave (rtx, rtx, rtx, bool);
12321
+extern void rs6000_scale_v2df (rtx, rtx, int);
12322
extern void build_mask64_2_operands (rtx, rtx *);
12323
extern int expand_block_clear (rtx[]);
12324
extern int expand_block_move (rtx[]);
12326
extern bool gpr_or_gpr_p (rtx, rtx);
12327
extern bool direct_move_p (rtx, rtx);
12328
extern bool quad_load_store_p (rtx, rtx);
12329
-extern bool fusion_gpr_load_p (rtx *, bool);
12330
+extern bool fusion_gpr_load_p (rtx, rtx, rtx, rtx);
12331
extern void expand_fusion_gpr_load (rtx *);
12332
-extern const char *emit_fusion_gpr_load (rtx *);
12333
+extern const char *emit_fusion_gpr_load (rtx, rtx);
12334
extern enum reg_class (*rs6000_preferred_reload_class_ptr) (rtx,
12336
extern enum reg_class (*rs6000_secondary_reload_class_ptr) (enum reg_class,
12337
@@ -153,6 +154,7 @@
12340
extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
12341
+extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
12342
extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
12344
extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
12345
@@ -161,7 +163,7 @@
12346
extern rtx rs6000_libcall_value (enum machine_mode);
12347
extern rtx rs6000_va_arg (tree, tree);
12348
extern int function_ok_for_sibcall (tree);
12349
-extern int rs6000_reg_parm_stack_space (tree);
12350
+extern int rs6000_reg_parm_stack_space (tree, bool);
12351
extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
12352
extern bool rs6000_elf_in_small_data_p (const_tree);
12353
#ifdef ARGS_SIZE_RTX
12354
Index: gcc/config/rs6000/xcoff.h
12355
===================================================================
12356
--- a/src/gcc/config/rs6000/xcoff.h (.../tags/gcc_4_8_3_release)
12357
+++ b/src/gcc/config/rs6000/xcoff.h (.../branches/gcc-4_8-branch)
12359
/* Definitions of target machine for GNU compiler,
12360
for some generic XCOFF file format
12361
- Copyright (C) 2001-2013 Free Software Foundation, Inc.
12362
+ Copyright (C) 2001-2014 Free Software Foundation, Inc.
12364
This file is part of GCC.
12366
@@ -304,14 +304,15 @@
12367
do { fputs (LOCAL_COMMON_ASM_OP, (FILE)); \
12368
RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
12369
if ((ALIGN) > 32) \
12370
- fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s,%u\n", \
12371
+ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s%u_,%u\n", \
12372
(SIZE), xcoff_bss_section_name, \
12373
+ floor_log2 ((ALIGN) / BITS_PER_UNIT), \
12374
floor_log2 ((ALIGN) / BITS_PER_UNIT)); \
12375
else if ((SIZE) > 4) \
12376
- fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s,3\n", \
12377
+ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s3_,3\n", \
12378
(SIZE), xcoff_bss_section_name); \
12380
- fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s\n", \
12381
+ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s,2\n", \
12382
(SIZE), xcoff_bss_section_name); \
12385
Index: gcc/config/rs6000/rs6000-builtin.def
12386
===================================================================
12387
--- a/src/gcc/config/rs6000/rs6000-builtin.def (.../tags/gcc_4_8_3_release)
12388
+++ b/src/gcc/config/rs6000/rs6000-builtin.def (.../branches/gcc-4_8-branch)
12389
@@ -622,20 +622,13 @@
12390
| RS6000_BTC_TERNARY), \
12391
CODE_FOR_ ## ICODE) /* ICODE */
12393
-/* Miscellaneous builtins. */
12394
-#define BU_MISC_1(ENUM, NAME, ATTR, ICODE) \
12395
+/* 128-bit long double floating point builtins. */
12396
+#define BU_LDBL128_2(ENUM, NAME, ATTR, ICODE) \
12397
RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
12398
"__builtin_" NAME, /* NAME */ \
12399
- RS6000_BTM_HARD_FLOAT, /* MASK */ \
12400
+ (RS6000_BTM_HARD_FLOAT /* MASK */ \
12401
+ | RS6000_BTM_LDBL128), \
12402
(RS6000_BTC_ ## ATTR /* ATTR */ \
12403
- | RS6000_BTC_UNARY), \
12404
- CODE_FOR_ ## ICODE) /* ICODE */
12406
-#define BU_MISC_2(ENUM, NAME, ATTR, ICODE) \
12407
- RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
12408
- "__builtin_" NAME, /* NAME */ \
12409
- RS6000_BTM_HARD_FLOAT, /* MASK */ \
12410
- (RS6000_BTC_ ## ATTR /* ATTR */ \
12411
| RS6000_BTC_BINARY), \
12412
CODE_FOR_ ## ICODE) /* ICODE */
12414
@@ -1265,7 +1258,17 @@
12415
BU_VSX_2 (VEC_MERGEL_V2DI, "mergel_2di", CONST, vsx_mergel_v2di)
12416
BU_VSX_2 (VEC_MERGEH_V2DF, "mergeh_2df", CONST, vsx_mergeh_v2df)
12417
BU_VSX_2 (VEC_MERGEH_V2DI, "mergeh_2di", CONST, vsx_mergeh_v2di)
12418
+BU_VSX_2 (XXSPLTD_V2DF, "xxspltd_2df", CONST, vsx_xxspltd_v2df)
12419
+BU_VSX_2 (XXSPLTD_V2DI, "xxspltd_2di", CONST, vsx_xxspltd_v2di)
12420
+BU_VSX_2 (DIV_V2DI, "div_2di", CONST, vsx_div_v2di)
12421
+BU_VSX_2 (UDIV_V2DI, "udiv_2di", CONST, vsx_udiv_v2di)
12422
+BU_VSX_2 (MUL_V2DI, "mul_2di", CONST, vsx_mul_v2di)
12424
+BU_VSX_2 (XVCVSXDDP_SCALE, "xvcvsxddp_scale", CONST, vsx_xvcvsxddp_scale)
12425
+BU_VSX_2 (XVCVUXDDP_SCALE, "xvcvuxddp_scale", CONST, vsx_xvcvuxddp_scale)
12426
+BU_VSX_2 (XVCVDPSXDS_SCALE, "xvcvdpsxds_scale", CONST, vsx_xvcvdpsxds_scale)
12427
+BU_VSX_2 (XVCVDPUXDS_SCALE, "xvcvdpuxds_scale", CONST, vsx_xvcvdpuxds_scale)
12429
/* VSX abs builtin functions. */
12430
BU_VSX_A (XVABSDP, "xvabsdp", CONST, absv2df2)
12431
BU_VSX_A (XVNABSDP, "xvnabsdp", CONST, vsx_nabsv2df2)
12432
@@ -1593,10 +1596,8 @@
12433
BU_DFP_MISC_2 (PACK_TD, "pack_dec128", CONST, packtd)
12434
BU_DFP_MISC_2 (UNPACK_TD, "unpack_dec128", CONST, unpacktd)
12436
-BU_MISC_2 (PACK_TF, "pack_longdouble", CONST, packtf)
12437
-BU_MISC_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
12438
-BU_MISC_1 (UNPACK_TF_0, "longdouble_dw0", CONST, unpacktf_0)
12439
-BU_MISC_1 (UNPACK_TF_1, "longdouble_dw1", CONST, unpacktf_1)
12440
+BU_LDBL128_2 (PACK_TF, "pack_longdouble", CONST, packtf)
12441
+BU_LDBL128_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
12443
BU_P7_MISC_2 (PACK_V1TI, "pack_vector_int128", CONST, packv1ti)
12444
BU_P7_MISC_2 (UNPACK_V1TI, "unpack_vector_int128", CONST, unpackv1ti)
12445
Index: gcc/config/rs6000/rs6000-c.c
12446
===================================================================
12447
--- a/src/gcc/config/rs6000/rs6000-c.c (.../tags/gcc_4_8_3_release)
12448
+++ b/src/gcc/config/rs6000/rs6000-c.c (.../branches/gcc-4_8-branch)
12449
@@ -595,6 +595,8 @@
12450
RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0, 0 },
12451
{ ALTIVEC_BUILTIN_VEC_ROUND, ALTIVEC_BUILTIN_VRFIN,
12452
RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0, 0 },
12453
+ { ALTIVEC_BUILTIN_VEC_ROUND, VSX_BUILTIN_XVRDPI,
12454
+ RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0, 0 },
12455
{ ALTIVEC_BUILTIN_VEC_RECIP, ALTIVEC_BUILTIN_VRECIPFP,
12456
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
12457
{ ALTIVEC_BUILTIN_VEC_RECIP, VSX_BUILTIN_RECIP_V2DF,
12458
@@ -875,6 +877,18 @@
12459
{ ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12460
RS6000_BTI_V2DF, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DF, 0 },
12461
{ ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12462
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12463
+ { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12464
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, 0 },
12465
+ { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12466
+ RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, 0 },
12467
+ { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12468
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12469
+ { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12470
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, 0 },
12471
+ { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12472
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12473
+ { ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12474
RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
12475
{ ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
12476
RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
12477
@@ -929,6 +943,18 @@
12478
{ ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12479
RS6000_BTI_V2DF, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DF, 0 },
12480
{ ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12481
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12482
+ { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12483
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, 0 },
12484
+ { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12485
+ RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, 0 },
12486
+ { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12487
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12488
+ { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12489
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, 0 },
12490
+ { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12491
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12492
+ { ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12493
RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
12494
{ ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
12495
RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
12496
@@ -1116,6 +1142,10 @@
12497
RS6000_BTI_V4SF, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, 0 },
12498
{ ALTIVEC_BUILTIN_VEC_CTF, ALTIVEC_BUILTIN_VCFSX,
12499
RS6000_BTI_V4SF, RS6000_BTI_V4SI, RS6000_BTI_INTSI, 0 },
12500
+ { ALTIVEC_BUILTIN_VEC_CTF, VSX_BUILTIN_XVCVSXDDP_SCALE,
12501
+ RS6000_BTI_V2DF, RS6000_BTI_V2DI, RS6000_BTI_INTSI, 0},
12502
+ { ALTIVEC_BUILTIN_VEC_CTF, VSX_BUILTIN_XVCVUXDDP_SCALE,
12503
+ RS6000_BTI_V2DF, RS6000_BTI_unsigned_V2DI, RS6000_BTI_INTSI, 0},
12504
{ ALTIVEC_BUILTIN_VEC_VCFSX, ALTIVEC_BUILTIN_VCFSX,
12505
RS6000_BTI_V4SF, RS6000_BTI_V4SI, RS6000_BTI_INTSI, 0 },
12506
{ ALTIVEC_BUILTIN_VEC_VCFUX, ALTIVEC_BUILTIN_VCFUX,
12507
@@ -1122,12 +1152,20 @@
12508
RS6000_BTI_V4SF, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, 0 },
12509
{ ALTIVEC_BUILTIN_VEC_CTS, ALTIVEC_BUILTIN_VCTSXS,
12510
RS6000_BTI_V4SI, RS6000_BTI_V4SF, RS6000_BTI_INTSI, 0 },
12511
+ { ALTIVEC_BUILTIN_VEC_CTS, VSX_BUILTIN_XVCVDPSXDS_SCALE,
12512
+ RS6000_BTI_V2DI, RS6000_BTI_V2DF, RS6000_BTI_INTSI, 0 },
12513
{ ALTIVEC_BUILTIN_VEC_CTU, ALTIVEC_BUILTIN_VCTUXS,
12514
RS6000_BTI_unsigned_V4SI, RS6000_BTI_V4SF, RS6000_BTI_INTSI, 0 },
12515
+ { ALTIVEC_BUILTIN_VEC_CTU, VSX_BUILTIN_XVCVDPUXDS_SCALE,
12516
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_V2DF, RS6000_BTI_INTSI, 0 },
12517
{ VSX_BUILTIN_VEC_DIV, VSX_BUILTIN_XVDIVSP,
12518
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
12519
{ VSX_BUILTIN_VEC_DIV, VSX_BUILTIN_XVDIVDP,
12520
RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0 },
12521
+ { VSX_BUILTIN_VEC_DIV, VSX_BUILTIN_DIV_V2DI,
12522
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12523
+ { VSX_BUILTIN_VEC_DIV, VSX_BUILTIN_UDIV_V2DI,
12524
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12525
{ ALTIVEC_BUILTIN_VEC_LD, ALTIVEC_BUILTIN_LVX_V2DF,
12526
RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF, 0 },
12527
{ ALTIVEC_BUILTIN_VEC_LD, ALTIVEC_BUILTIN_LVX_V2DI,
12528
@@ -1593,6 +1631,16 @@
12529
RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0 },
12530
{ ALTIVEC_BUILTIN_VEC_MERGEH, VSX_BUILTIN_VEC_MERGEH_V2DI,
12531
RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12532
+ { ALTIVEC_BUILTIN_VEC_MERGEH, VSX_BUILTIN_VEC_MERGEH_V2DI,
12533
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, 0 },
12534
+ { ALTIVEC_BUILTIN_VEC_MERGEH, VSX_BUILTIN_VEC_MERGEH_V2DI,
12535
+ RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, 0 },
12536
+ { ALTIVEC_BUILTIN_VEC_MERGEH, VSX_BUILTIN_VEC_MERGEH_V2DI,
12537
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12538
+ { ALTIVEC_BUILTIN_VEC_MERGEH, VSX_BUILTIN_VEC_MERGEH_V2DI,
12539
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, 0 },
12540
+ { ALTIVEC_BUILTIN_VEC_MERGEH, VSX_BUILTIN_VEC_MERGEH_V2DI,
12541
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12542
{ ALTIVEC_BUILTIN_VEC_VMRGHW, ALTIVEC_BUILTIN_VMRGHW,
12543
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
12544
{ ALTIVEC_BUILTIN_VEC_VMRGHW, ALTIVEC_BUILTIN_VMRGHW,
12545
@@ -1641,6 +1689,16 @@
12546
RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0 },
12547
{ ALTIVEC_BUILTIN_VEC_MERGEL, VSX_BUILTIN_VEC_MERGEL_V2DI,
12548
RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12549
+ { ALTIVEC_BUILTIN_VEC_MERGEL, VSX_BUILTIN_VEC_MERGEL_V2DI,
12550
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, 0 },
12551
+ { ALTIVEC_BUILTIN_VEC_MERGEL, VSX_BUILTIN_VEC_MERGEL_V2DI,
12552
+ RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, 0 },
12553
+ { ALTIVEC_BUILTIN_VEC_MERGEL, VSX_BUILTIN_VEC_MERGEL_V2DI,
12554
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12555
+ { ALTIVEC_BUILTIN_VEC_MERGEL, VSX_BUILTIN_VEC_MERGEL_V2DI,
12556
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, 0 },
12557
+ { ALTIVEC_BUILTIN_VEC_MERGEL, VSX_BUILTIN_VEC_MERGEL_V2DI,
12558
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12559
{ ALTIVEC_BUILTIN_VEC_VMRGLW, ALTIVEC_BUILTIN_VMRGLW,
12560
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
12561
{ ALTIVEC_BUILTIN_VEC_VMRGLW, ALTIVEC_BUILTIN_VMRGLW,
12562
@@ -1769,6 +1827,10 @@
12563
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
12564
{ VSX_BUILTIN_VEC_MUL, VSX_BUILTIN_XVMULDP,
12565
RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0 },
12566
+ { VSX_BUILTIN_VEC_MUL, VSX_BUILTIN_MUL_V2DI,
12567
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12568
+ { VSX_BUILTIN_VEC_MUL, VSX_BUILTIN_MUL_V2DI,
12569
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12570
{ ALTIVEC_BUILTIN_VEC_MULE, ALTIVEC_BUILTIN_VMULEUB,
12571
RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 },
12572
{ ALTIVEC_BUILTIN_VEC_MULE, ALTIVEC_BUILTIN_VMULESB,
12573
@@ -1810,6 +1872,18 @@
12574
{ ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12575
RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0 },
12576
{ ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12577
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12578
+ { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12579
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, 0 },
12580
+ { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12581
+ RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, 0 },
12582
+ { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12583
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12584
+ { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12585
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, 0 },
12586
+ { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12587
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12588
+ { ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12589
RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
12590
{ ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
12591
RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 },
12592
@@ -1840,6 +1914,18 @@
12593
{ ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12594
RS6000_BTI_V2DF, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DF, 0 },
12595
{ ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12596
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12597
+ { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12598
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, 0 },
12599
+ { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12600
+ RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, 0 },
12601
+ { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12602
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12603
+ { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12604
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, 0 },
12605
+ { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12606
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12607
+ { ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12608
RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
12609
{ ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
12610
RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
12611
@@ -1943,6 +2029,8 @@
12612
RS6000_BTI_unsigned_V8HI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
12613
{ ALTIVEC_BUILTIN_VEC_PACKSU, P8V_BUILTIN_VPKSDUS,
12614
RS6000_BTI_unsigned_V4SI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12615
+ { ALTIVEC_BUILTIN_VEC_PACKSU, P8V_BUILTIN_VPKSDUS,
12616
+ RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12617
{ ALTIVEC_BUILTIN_VEC_VPKSWUS, ALTIVEC_BUILTIN_VPKSWUS,
12618
RS6000_BTI_unsigned_V8HI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
12619
{ ALTIVEC_BUILTIN_VEC_VPKSHUS, ALTIVEC_BUILTIN_VPKSHUS,
12620
@@ -2125,6 +2213,14 @@
12621
RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, 0 },
12622
{ ALTIVEC_BUILTIN_VEC_SPLAT, ALTIVEC_BUILTIN_VSPLTW,
12623
RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, 0 },
12624
+ { ALTIVEC_BUILTIN_VEC_SPLAT, VSX_BUILTIN_XXSPLTD_V2DF,
12625
+ RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_INTSI, 0 },
12626
+ { ALTIVEC_BUILTIN_VEC_SPLAT, VSX_BUILTIN_XXSPLTD_V2DI,
12627
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_INTSI, 0 },
12628
+ { ALTIVEC_BUILTIN_VEC_SPLAT, VSX_BUILTIN_XXSPLTD_V2DI,
12629
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_INTSI, 0 },
12630
+ { ALTIVEC_BUILTIN_VEC_SPLAT, VSX_BUILTIN_XXSPLTD_V2DI,
12631
+ RS6000_BTI_bool_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_INTSI, 0 },
12632
{ ALTIVEC_BUILTIN_VEC_VSPLTW, ALTIVEC_BUILTIN_VSPLTW,
12633
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_INTSI, 0 },
12634
{ ALTIVEC_BUILTIN_VEC_VSPLTW, ALTIVEC_BUILTIN_VSPLTW,
12635
@@ -2517,6 +2613,18 @@
12636
{ ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12637
RS6000_BTI_V2DF, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DF, 0 },
12638
{ ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12639
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0 },
12640
+ { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12641
+ RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, 0 },
12642
+ { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12643
+ RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI, 0 },
12644
+ { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12645
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12646
+ { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12647
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, 0 },
12648
+ { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12649
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
12650
+ { ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12651
RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
12652
{ ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
12653
RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
12654
@@ -2776,6 +2884,8 @@
12655
RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_unsigned_V16QI },
12656
{ ALTIVEC_BUILTIN_VEC_PERM, ALTIVEC_BUILTIN_VPERM_2DI,
12657
RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_unsigned_V16QI },
12658
+ { ALTIVEC_BUILTIN_VEC_PERM, ALTIVEC_BUILTIN_VPERM_2DI,
12659
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V16QI },
12660
{ ALTIVEC_BUILTIN_VEC_PERM, ALTIVEC_BUILTIN_VPERM_4SF,
12661
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_unsigned_V16QI },
12662
{ ALTIVEC_BUILTIN_VEC_PERM, ALTIVEC_BUILTIN_VPERM_4SI,
12663
@@ -2816,6 +2926,12 @@
12664
RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_unsigned_V2DI },
12665
{ ALTIVEC_BUILTIN_VEC_SEL, ALTIVEC_BUILTIN_VSEL_2DI,
12666
RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_V2DI },
12667
+ { ALTIVEC_BUILTIN_VEC_SEL, ALTIVEC_BUILTIN_VSEL_2DI,
12668
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI },
12669
+ { ALTIVEC_BUILTIN_VEC_SEL, ALTIVEC_BUILTIN_VSEL_2DI,
12670
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI },
12671
+ { ALTIVEC_BUILTIN_VEC_SEL, ALTIVEC_BUILTIN_VSEL_2DI,
12672
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_V2DI },
12673
{ ALTIVEC_BUILTIN_VEC_SEL, ALTIVEC_BUILTIN_VSEL_4SF,
12674
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_bool_V4SI },
12675
{ ALTIVEC_BUILTIN_VEC_SEL, ALTIVEC_BUILTIN_VSEL_4SF,
12676
@@ -3265,6 +3381,8 @@
12678
{ VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
12679
RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF, 0 },
12680
+ { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
12681
+ RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double, 0 },
12682
{ VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
12683
RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI, 0 },
12684
{ VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
12685
@@ -3319,6 +3437,8 @@
12687
{ VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
12688
RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF },
12689
+ { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
12690
+ RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double },
12691
{ VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
12692
RS6000_BTI_void, RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI },
12693
{ VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
12694
@@ -3429,6 +3549,18 @@
12695
RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI },
12696
{ ALTIVEC_BUILTIN_VEC_VCMPGT_P, ALTIVEC_BUILTIN_VCMPGTSW_P,
12697
RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_V4SI, RS6000_BTI_V4SI },
12698
+ { ALTIVEC_BUILTIN_VEC_VCMPGT_P, P8V_BUILTIN_VCMPGTUD_P,
12699
+ RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_bool_V2DI, RS6000_BTI_unsigned_V2DI },
12700
+ { ALTIVEC_BUILTIN_VEC_VCMPGT_P, P8V_BUILTIN_VCMPGTUD_P,
12701
+ RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_bool_V2DI },
12702
+ { ALTIVEC_BUILTIN_VEC_VCMPGT_P, P8V_BUILTIN_VCMPGTUD_P,
12703
+ RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI },
12704
+ { ALTIVEC_BUILTIN_VEC_VCMPGT_P, P8V_BUILTIN_VCMPGTSD_P,
12705
+ RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_bool_V2DI, RS6000_BTI_V2DI },
12706
+ { ALTIVEC_BUILTIN_VEC_VCMPGT_P, P8V_BUILTIN_VCMPGTSD_P,
12707
+ RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_V2DI, RS6000_BTI_bool_V2DI },
12708
+ { ALTIVEC_BUILTIN_VEC_VCMPGT_P, P8V_BUILTIN_VCMPGTSD_P,
12709
+ RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_V2DI, RS6000_BTI_V2DI },
12710
{ ALTIVEC_BUILTIN_VEC_VCMPGT_P, ALTIVEC_BUILTIN_VCMPGTFP_P,
12711
RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_V4SF, RS6000_BTI_V4SF },
12712
{ ALTIVEC_BUILTIN_VEC_VCMPGT_P, VSX_BUILTIN_XVCMPGTDP_P,
12713
@@ -3887,6 +4019,8 @@
12714
{ P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VMRGEW,
12715
RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI,
12716
RS6000_BTI_unsigned_V4SI, 0 },
12717
+ { P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VMRGEW,
12718
+ RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
12720
{ P8V_BUILTIN_VEC_VMRGOW, P8V_BUILTIN_VMRGOW,
12721
RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
12722
@@ -3893,6 +4027,8 @@
12723
{ P8V_BUILTIN_VEC_VMRGOW, P8V_BUILTIN_VMRGOW,
12724
RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI,
12725
RS6000_BTI_unsigned_V4SI, 0 },
12726
+ { P8V_BUILTIN_VEC_VMRGOW, P8V_BUILTIN_VMRGOW,
12727
+ RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
12729
{ P8V_BUILTIN_VEC_VPOPCNT, P8V_BUILTIN_VPOPCNTB,
12730
RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0, 0 },
12731
@@ -4126,7 +4262,8 @@
12732
argument) is reversed. Patch the arguments here before building
12733
the resolved CALL_EXPR. */
12734
if (desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
12735
- && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P)
12736
+ && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P
12737
+ && desc->overloaded_code != VSX_BUILTIN_XVCMPGEDP_P)
12740
t = args[2], args[2] = args[1], args[1] = t;
12741
@@ -4184,6 +4321,14 @@
12742
if (TARGET_DEBUG_BUILTIN)
12743
fprintf (stderr, "altivec_resolve_overloaded_builtin, code = %4d, %s\n",
12744
(int)fcode, IDENTIFIER_POINTER (DECL_NAME (fndecl)));
12746
+ /* vec_lvsl and vec_lvsr are deprecated for use with LE element order. */
12747
+ if (fcode == ALTIVEC_BUILTIN_VEC_LVSL && !VECTOR_ELT_ORDER_BIG)
12748
+ warning (OPT_Wdeprecated, "vec_lvsl is deprecated for little endian; use \
12749
+assignment for unaligned loads and stores");
12750
+ else if (fcode == ALTIVEC_BUILTIN_VEC_LVSR && !VECTOR_ELT_ORDER_BIG)
12751
+ warning (OPT_Wdeprecated, "vec_lvsr is deprecated for little endian; use \
12752
+assignment for unaligned loads and stores");
12754
/* For now treat vec_splats and vec_promote as the same. */
12755
if (fcode == ALTIVEC_BUILTIN_VEC_SPLATS
12756
Index: gcc/config/rs6000/linux64.h
12757
===================================================================
12758
--- a/src/gcc/config/rs6000/linux64.h (.../tags/gcc_4_8_3_release)
12759
+++ b/src/gcc/config/rs6000/linux64.h (.../branches/gcc-4_8-branch)
12760
@@ -246,7 +246,7 @@
12761
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
12762
#undef ADJUST_FIELD_ALIGN
12763
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
12764
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
12765
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
12768
&& TARGET_ALIGN_NATURAL == 0 \
12769
Index: gcc/config/rs6000/rs6000.c
12770
===================================================================
12771
--- a/src/gcc/config/rs6000/rs6000.c (.../tags/gcc_4_8_3_release)
12772
+++ b/src/gcc/config/rs6000/rs6000.c (.../branches/gcc-4_8-branch)
12775
#include "tree-vectorizer.h"
12776
#include "dumpfile.h"
12779
#include "xcoffout.h" /* get declarations of xcoff_*_section_name */
12781
@@ -369,6 +370,7 @@
12782
enum insn_code reload_gpr_vsx; /* INSN to move from GPR to VSX. */
12783
enum insn_code reload_vsx_gpr; /* INSN to move from VSX to GPR. */
12784
addr_mask_type addr_mask[(int)N_RELOAD_REG]; /* Valid address masks. */
12785
+ bool scalar_in_vmx_p; /* Scalar value can go in VMX. */
12788
static struct rs6000_reg_addr reg_addr[NUM_MACHINE_MODES];
12789
@@ -1704,8 +1706,7 @@
12791
if (TARGET_VSX && VSX_REGNO_P (regno)
12792
&& (VECTOR_MEM_VSX_P (mode)
12793
- || (TARGET_VSX_SCALAR_FLOAT && mode == SFmode)
12794
- || (TARGET_VSX_SCALAR_DOUBLE && (mode == DFmode || mode == DImode))
12795
+ || reg_addr[mode].scalar_in_vmx_p
12796
|| (TARGET_VSX_TIMODE && mode == TImode)
12797
|| (TARGET_VADDUQM && mode == V1TImode)))
12799
@@ -1714,12 +1715,9 @@
12801
if (ALTIVEC_REGNO_P (regno))
12803
- if (mode == SFmode && !TARGET_UPPER_REGS_SF)
12804
+ if (GET_MODE_SIZE (mode) != 16 && !reg_addr[mode].scalar_in_vmx_p)
12807
- if ((mode == DFmode || mode == DImode) && !TARGET_UPPER_REGS_DF)
12810
return ALTIVEC_REGNO_P (last_regno);
12813
@@ -1897,14 +1895,16 @@
12814
if (rs6000_vector_unit[m] != VECTOR_NONE
12815
|| rs6000_vector_mem[m] != VECTOR_NONE
12816
|| (reg_addr[m].reload_store != CODE_FOR_nothing)
12817
- || (reg_addr[m].reload_load != CODE_FOR_nothing))
12818
+ || (reg_addr[m].reload_load != CODE_FOR_nothing)
12819
+ || reg_addr[m].scalar_in_vmx_p)
12822
- " Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c",
12823
+ " Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c Upper=%c",
12824
rs6000_debug_vector_unit (rs6000_vector_unit[m]),
12825
rs6000_debug_vector_unit (rs6000_vector_mem[m]),
12826
(reg_addr[m].reload_store != CODE_FOR_nothing) ? 's' : '*',
12827
- (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*');
12828
+ (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*',
12829
+ (reg_addr[m].scalar_in_vmx_p) ? 'y' : 'n');
12832
fputs ("\n", stderr);
12833
@@ -2021,6 +2021,10 @@
12834
"wd reg_class = %s\n"
12835
"wf reg_class = %s\n"
12836
"wg reg_class = %s\n"
12837
+ "wh reg_class = %s\n"
12838
+ "wi reg_class = %s\n"
12839
+ "wj reg_class = %s\n"
12840
+ "wk reg_class = %s\n"
12841
"wl reg_class = %s\n"
12842
"wm reg_class = %s\n"
12843
"wr reg_class = %s\n"
12844
@@ -2040,6 +2044,10 @@
12845
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wd]],
12846
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wf]],
12847
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wg]],
12848
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wh]],
12849
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wi]],
12850
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wj]],
12851
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wk]],
12852
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wl]],
12853
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wm]],
12854
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wr]],
12855
@@ -2324,6 +2332,8 @@
12857
for (m = 0; m < NUM_MACHINE_MODES; ++m)
12859
+ enum machine_mode m2 = (enum machine_mode)m;
12861
/* SDmode is special in that we want to access it only via REG+REG
12862
addressing on power7 and above, since we want to use the LFIWZX and
12863
STFIWZX instructions to load it. */
12864
@@ -2358,13 +2368,12 @@
12867
&& (rc == RELOAD_REG_GPR || rc == RELOAD_REG_FPR)
12868
- && GET_MODE_SIZE (m) <= 8
12869
- && !VECTOR_MODE_P (m)
12870
- && !COMPLEX_MODE_P (m)
12871
+ && GET_MODE_SIZE (m2) <= 8
12872
+ && !VECTOR_MODE_P (m2)
12873
+ && !COMPLEX_MODE_P (m2)
12875
- && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m) == 8)
12876
- && !(m == DFmode && TARGET_UPPER_REGS_DF)
12877
- && !(m == SFmode && TARGET_UPPER_REGS_SF))
12878
+ && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m2) == 8)
12879
+ && !reg_addr[m2].scalar_in_vmx_p)
12881
addr_mask |= RELOAD_REG_PRE_INCDEC;
12883
@@ -2595,16 +2604,22 @@
12884
f - Register class to use with traditional SFmode instructions.
12885
v - Altivec register.
12886
wa - Any VSX register.
12887
+ wc - Reserved to represent individual CR bits (used in LLVM).
12888
wd - Preferred register class for V2DFmode.
12889
wf - Preferred register class for V4SFmode.
12890
wg - Float register for power6x move insns.
12891
+ wh - FP register for direct move instructions.
12892
+ wi - FP or VSX register to hold 64-bit integers for VSX insns.
12893
+ wj - FP or VSX register to hold 64-bit integers for direct moves.
12894
+ wk - FP or VSX register to hold 64-bit doubles for direct moves.
12895
wl - Float register if we can do 32-bit signed int loads.
12896
wm - VSX register for ISA 2.07 direct move operations.
12897
+ wn - always NO_REGS.
12898
wr - GPR if 64-bit mode is permitted.
12899
ws - Register class to do ISA 2.06 DF operations.
12900
+ wt - VSX register for TImode in VSX registers.
12901
wu - Altivec register for ISA 2.07 VSX SF/SI load/stores.
12902
wv - Altivec register for ISA 2.06 VSX DF/DI load/stores.
12903
- wt - VSX register for TImode in VSX registers.
12904
ww - Register class to do SF conversions in with VSX operations.
12905
wx - Float register if we can do 32-bit int stores.
12906
wy - Register class to do ISA 2.07 SF operations.
12907
@@ -2611,21 +2626,22 @@
12908
wz - Float register if we can do 32-bit unsigned int loads. */
12910
if (TARGET_HARD_FLOAT && TARGET_FPRS)
12911
- rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;
12912
+ rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS; /* SFmode */
12914
if (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
12915
- rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS;
12916
+ rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS; /* DFmode */
12920
rs6000_constraints[RS6000_CONSTRAINT_wa] = VSX_REGS;
12921
- rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;
12922
- rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;
12923
+ rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS; /* V2DFmode */
12924
+ rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS; /* V4SFmode */
12925
+ rs6000_constraints[RS6000_CONSTRAINT_wi] = FLOAT_REGS; /* DImode */
12927
if (TARGET_VSX_TIMODE)
12928
- rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;
12929
+ rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS; /* TImode */
12931
- if (TARGET_UPPER_REGS_DF)
12932
+ if (TARGET_UPPER_REGS_DF) /* DFmode */
12934
rs6000_constraints[RS6000_CONSTRAINT_ws] = VSX_REGS;
12935
rs6000_constraints[RS6000_CONSTRAINT_wv] = ALTIVEC_REGS;
12936
@@ -2639,19 +2655,26 @@
12937
if (TARGET_ALTIVEC)
12938
rs6000_constraints[RS6000_CONSTRAINT_v] = ALTIVEC_REGS;
12940
- if (TARGET_MFPGPR)
12941
+ if (TARGET_MFPGPR) /* DFmode */
12942
rs6000_constraints[RS6000_CONSTRAINT_wg] = FLOAT_REGS;
12945
- rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;
12946
+ rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS; /* DImode */
12948
if (TARGET_DIRECT_MOVE)
12949
- rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
12951
+ rs6000_constraints[RS6000_CONSTRAINT_wh] = FLOAT_REGS;
12952
+ rs6000_constraints[RS6000_CONSTRAINT_wj] /* DImode */
12953
+ = rs6000_constraints[RS6000_CONSTRAINT_wi];
12954
+ rs6000_constraints[RS6000_CONSTRAINT_wk] /* DFmode */
12955
+ = rs6000_constraints[RS6000_CONSTRAINT_ws];
12956
+ rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
12959
if (TARGET_POWERPC64)
12960
rs6000_constraints[RS6000_CONSTRAINT_wr] = GENERAL_REGS;
12962
- if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)
12963
+ if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF) /* SFmode */
12965
rs6000_constraints[RS6000_CONSTRAINT_wu] = ALTIVEC_REGS;
12966
rs6000_constraints[RS6000_CONSTRAINT_wy] = VSX_REGS;
12967
@@ -2666,10 +2689,10 @@
12968
rs6000_constraints[RS6000_CONSTRAINT_ww] = FLOAT_REGS;
12971
- rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;
12972
+ rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS; /* DImode */
12975
- rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;
12976
+ rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS; /* DImode */
12978
/* Set up the reload helper and direct move functions. */
12979
if (TARGET_VSX || TARGET_ALTIVEC)
12980
@@ -2692,10 +2715,11 @@
12981
reg_addr[V2DFmode].reload_load = CODE_FOR_reload_v2df_di_load;
12982
if (TARGET_VSX && TARGET_UPPER_REGS_DF)
12984
- reg_addr[DFmode].reload_store = CODE_FOR_reload_df_di_store;
12985
- reg_addr[DFmode].reload_load = CODE_FOR_reload_df_di_load;
12986
- reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_di_store;
12987
- reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_di_load;
12988
+ reg_addr[DFmode].reload_store = CODE_FOR_reload_df_di_store;
12989
+ reg_addr[DFmode].reload_load = CODE_FOR_reload_df_di_load;
12990
+ reg_addr[DFmode].scalar_in_vmx_p = true;
12991
+ reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_di_store;
12992
+ reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_di_load;
12994
if (TARGET_P8_VECTOR)
12996
@@ -2703,6 +2727,8 @@
12997
reg_addr[SFmode].reload_load = CODE_FOR_reload_sf_di_load;
12998
reg_addr[SDmode].reload_store = CODE_FOR_reload_sd_di_store;
12999
reg_addr[SDmode].reload_load = CODE_FOR_reload_sd_di_load;
13000
+ if (TARGET_UPPER_REGS_SF)
13001
+ reg_addr[SFmode].scalar_in_vmx_p = true;
13003
if (TARGET_VSX_TIMODE)
13005
@@ -2759,10 +2785,11 @@
13006
reg_addr[V2DFmode].reload_load = CODE_FOR_reload_v2df_si_load;
13007
if (TARGET_VSX && TARGET_UPPER_REGS_DF)
13009
- reg_addr[DFmode].reload_store = CODE_FOR_reload_df_si_store;
13010
- reg_addr[DFmode].reload_load = CODE_FOR_reload_df_si_load;
13011
- reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_si_store;
13012
- reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_si_load;
13013
+ reg_addr[DFmode].reload_store = CODE_FOR_reload_df_si_store;
13014
+ reg_addr[DFmode].reload_load = CODE_FOR_reload_df_si_load;
13015
+ reg_addr[DFmode].scalar_in_vmx_p = true;
13016
+ reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_si_store;
13017
+ reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_si_load;
13019
if (TARGET_P8_VECTOR)
13021
@@ -2770,6 +2797,8 @@
13022
reg_addr[SFmode].reload_load = CODE_FOR_reload_sf_si_load;
13023
reg_addr[SDmode].reload_store = CODE_FOR_reload_sd_si_store;
13024
reg_addr[SDmode].reload_load = CODE_FOR_reload_sd_si_load;
13025
+ if (TARGET_UPPER_REGS_SF)
13026
+ reg_addr[SFmode].scalar_in_vmx_p = true;
13028
if (TARGET_VSX_TIMODE)
13030
@@ -2810,6 +2839,7 @@
13032
for (m = 0; m < NUM_MACHINE_MODES; ++m)
13034
+ enum machine_mode m2 = (enum machine_mode)m;
13035
int reg_size2 = reg_size;
13037
/* TFmode/TDmode always takes 2 registers, even in VSX. */
13038
@@ -2818,7 +2848,7 @@
13039
reg_size2 = UNITS_PER_FP_WORD;
13041
rs6000_class_max_nregs[m][c]
13042
- = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2;
13043
+ = (GET_MODE_SIZE (m2) + reg_size2 - 1) / reg_size2;
13047
@@ -3014,7 +3044,8 @@
13048
| ((TARGET_CRYPTO) ? RS6000_BTM_CRYPTO : 0)
13049
| ((TARGET_HTM) ? RS6000_BTM_HTM : 0)
13050
| ((TARGET_DFP) ? RS6000_BTM_DFP : 0)
13051
- | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0));
13052
+ | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0)
13053
+ | ((TARGET_LONG_DOUBLE_128) ? RS6000_BTM_LDBL128 : 0));
13056
/* Override command line options. Mostly we process the processor type and
13057
@@ -5861,6 +5892,34 @@
13061
+/* Previous GCC releases forced all vector types to have 16-byte alignment. */
13064
+rs6000_special_adjust_field_align_p (tree field, unsigned int computed)
13066
+ if (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (field)) == VECTOR_TYPE)
13068
+ if (computed != 128)
13070
+ static bool warned;
13071
+ if (!warned && warn_psabi)
13074
+ inform (input_location,
13075
+ "the layout of aggregates containing vectors with"
13076
+ " %d-byte alignment will change in a future GCC release",
13077
+ computed / BITS_PER_UNIT);
13080
+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
13081
+ keep the special treatment of vector types, but warn if there will
13082
+ be differences in future GCC releases. */
13089
/* AIX increases natural record alignment to doubleword if the first
13090
field is an FP double while the FP fields remain word aligned. */
13092
@@ -6109,7 +6168,8 @@
13095
extra = GET_MODE_SIZE (mode) - UNITS_PER_WORD;
13096
- gcc_assert (extra >= 0);
13100
if (GET_CODE (addr) == LO_SUM)
13101
/* For lo_sum addresses, we must allow any offset except one that
13102
@@ -6818,24 +6878,6 @@
13103
if (GET_CODE (y) == UNSPEC
13104
&& XINT (y, 1) == UNSPEC_TOCREL)
13106
-#ifdef ENABLE_CHECKING
13107
- if (REG_P (XVECEXP (y, 0, 1))
13108
- && REGNO (XVECEXP (y, 0, 1)) == TOC_REGISTER)
13112
- else if (GET_CODE (XVECEXP (y, 0, 1)) == DEBUG_EXPR)
13114
- /* Weirdness alert. df_note_compute can replace r2 with a
13115
- debug_expr when this unspec is in a debug_insn.
13116
- Seen in gcc.dg/pr51957-1.c */
13120
- debug_rtx (orig_x);
13124
y = XVECEXP (y, 0, 0);
13127
@@ -9198,14 +9240,51 @@
13128
|| (type && TREE_CODE (type) == VECTOR_TYPE
13129
&& int_size_in_bytes (type) >= 16))
13131
- else if (((TARGET_MACHO && rs6000_darwin64_abi)
13132
- || DEFAULT_ABI == ABI_ELFv2
13133
- || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
13134
- && mode == BLKmode
13135
- && type && TYPE_ALIGN (type) > 64)
13137
+ /* Aggregate types that need > 8 byte alignment are quadword-aligned
13138
+ in the parameter area in the ELFv2 ABI, and in the AIX ABI unless
13139
+ -mcompat-align-parm is used. */
13140
+ if (((DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm)
13141
+ || DEFAULT_ABI == ABI_ELFv2)
13142
+ && type && TYPE_ALIGN (type) > 64)
13144
+ /* "Aggregate" means any AGGREGATE_TYPE except for single-element
13145
+ or homogeneous float/vector aggregates here. We already handled
13146
+ vector aggregates above, but still need to check for float here. */
13147
+ bool aggregate_p = (AGGREGATE_TYPE_P (type)
13148
+ && !SCALAR_FLOAT_MODE_P (elt_mode));
13150
+ /* We used to check for BLKmode instead of the above aggregate type
13151
+ check. Warn when this results in any difference to the ABI. */
13152
+ if (aggregate_p != (mode == BLKmode))
13154
+ static bool warned;
13155
+ if (!warned && warn_psabi)
13158
+ inform (input_location,
13159
+ "the ABI of passing aggregates with %d-byte alignment"
13160
+ " will change in a future GCC release",
13161
+ (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
13165
+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
13166
+ keep using the BLKmode check, but warn if there will be differences
13167
+ in future GCC releases. */
13168
+ if (mode == BLKmode)
13172
+ /* Similar for the Darwin64 ABI. Note that for historical reasons we
13173
+ implement the "aggregate type" check as a BLKmode check here; this
13174
+ means certain aggregate types are in fact not aligned. */
13175
+ if (TARGET_MACHO && rs6000_darwin64_abi
13176
+ && mode == BLKmode
13177
+ && type && TYPE_ALIGN (type) > 64)
13180
- return PARM_BOUNDARY;
13182
+ return PARM_BOUNDARY;
13185
/* The offset in words to the start of the parameter save area. */
13186
@@ -10243,6 +10322,7 @@
13189
unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
13192
/* Do we also need to pass this argument in the parameter
13194
@@ -10271,6 +10351,37 @@
13195
rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
13198
+ /* If there were not enough FPRs to hold the argument, the rest
13199
+ usually goes into memory. However, if the current position
13200
+ is still within the register parameter area, a portion may
13201
+ actually have to go into GPRs.
13203
+ Note that it may happen that the portion of the argument
13204
+ passed in the first "half" of the first GPR was already
13205
+ passed in the last FPR as well.
13207
+ For unnamed arguments, we already set up GPRs to cover the
13208
+ whole argument in rs6000_psave_function_arg, so there is
13209
+ nothing further to do at this point.
13211
+ GCC 4.8/4.9 Note: This was implemented incorrectly in earlier
13212
+ GCC releases. To avoid any ABI change on the release branch,
13213
+ we retain that original implementation here, but warn if we
13214
+ encounter a case where the ABI will change in the future. */
13215
+ fpr_words = (i * GET_MODE_SIZE (elt_mode)) / (TARGET_32BIT ? 4 : 8);
13216
+ if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
13217
+ && cum->nargs_prototype > 0)
13219
+ static bool warned;
13220
+ if (!warned && warn_psabi)
13223
+ inform (input_location,
13224
+ "the ABI of passing homogeneous float aggregates"
13225
+ " will change in a future GCC release");
13229
return rs6000_finish_function_arg (mode, rvec, k);
13231
else if (align_words < GP_ARG_NUM_REG)
13232
@@ -10497,10 +10608,9 @@
13233
list, or passes any parameter in memory. */
13236
-rs6000_function_parms_need_stack (tree fun)
13237
+rs6000_function_parms_need_stack (tree fun, bool incoming)
13239
- function_args_iterator args_iter;
13241
+ tree fntype, result;
13242
CUMULATIVE_ARGS args_so_far_v;
13243
cumulative_args_t args_so_far;
13245
@@ -10507,26 +10617,57 @@
13247
/* Must be a libcall, all of which only use reg parms. */
13252
- fun = TREE_TYPE (fun);
13253
+ fntype = TREE_TYPE (fun);
13255
/* Varargs functions need the parameter save area. */
13256
- if (!prototype_p (fun) || stdarg_p (fun))
13257
+ if ((!incoming && !prototype_p (fntype)) || stdarg_p (fntype))
13260
- INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fun, NULL_RTX);
13261
+ INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fntype, NULL_RTX);
13262
args_so_far = pack_cumulative_args (&args_so_far_v);
13264
- if (aggregate_value_p (TREE_TYPE (fun), fun))
13265
+ /* When incoming, we will have been passed the function decl.
13266
+ It is necessary to use the decl to handle K&R style functions,
13267
+ where TYPE_ARG_TYPES may not be available. */
13270
- tree type = build_pointer_type (TREE_TYPE (fun));
13271
- rs6000_parm_needs_stack (args_so_far, type);
13272
+ gcc_assert (DECL_P (fun));
13273
+ result = DECL_RESULT (fun);
13276
+ result = TREE_TYPE (fntype);
13278
- FOREACH_FUNCTION_ARGS (fun, arg_type, args_iter)
13279
- if (rs6000_parm_needs_stack (args_so_far, arg_type))
13281
+ if (result && aggregate_value_p (result, fntype))
13283
+ if (!TYPE_P (result))
13284
+ result = TREE_TYPE (result);
13285
+ result = build_pointer_type (result);
13286
+ rs6000_parm_needs_stack (args_so_far, result);
13293
+ for (parm = DECL_ARGUMENTS (fun);
13294
+ parm && parm != void_list_node;
13295
+ parm = TREE_CHAIN (parm))
13296
+ if (rs6000_parm_needs_stack (args_so_far, TREE_TYPE (parm)))
13301
+ function_args_iterator args_iter;
13304
+ FOREACH_FUNCTION_ARGS (fntype, arg_type, args_iter)
13305
+ if (rs6000_parm_needs_stack (args_so_far, arg_type))
13312
@@ -10537,7 +10678,7 @@
13313
all parameters in registers. */
13316
-rs6000_reg_parm_stack_space (tree fun)
13317
+rs6000_reg_parm_stack_space (tree fun, bool incoming)
13319
int reg_parm_stack_space;
13321
@@ -10555,7 +10696,7 @@
13323
/* ??? Recomputing this every time is a bit expensive. Is there
13324
a place to cache this information? */
13325
- if (rs6000_function_parms_need_stack (fun))
13326
+ if (rs6000_function_parms_need_stack (fun, incoming))
13327
reg_parm_stack_space = TARGET_64BIT ? 64 : 32;
13329
reg_parm_stack_space = 0;
13330
@@ -13544,11 +13685,15 @@
13331
else if ((fnmask & (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
13332
== (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
13333
error ("Builtin function %s requires the -mhard-dfp and"
13334
- "-mpower8-vector options", name);
13335
+ " -mpower8-vector options", name);
13336
else if ((fnmask & RS6000_BTM_DFP) != 0)
13337
error ("Builtin function %s requires the -mhard-dfp option", name);
13338
else if ((fnmask & RS6000_BTM_P8_VECTOR) != 0)
13339
error ("Builtin function %s requires the -mpower8-vector option", name);
13340
+ else if ((fnmask & (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
13341
+ == (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
13342
+ error ("Builtin function %s requires the -mhard-float and"
13343
+ " -mlong-double-128 options", name);
13344
else if ((fnmask & RS6000_BTM_HARD_FLOAT) != 0)
13345
error ("Builtin function %s requires the -mhard-float option", name);
13347
@@ -13649,8 +13794,8 @@
13348
case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
13349
case ALTIVEC_BUILTIN_MASK_FOR_STORE:
13351
- int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr
13352
- : (int) CODE_FOR_altivec_lvsl);
13353
+ int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr_direct
13354
+ : (int) CODE_FOR_altivec_lvsl_direct);
13355
enum machine_mode tmode = insn_data[icode].operand[0].mode;
13356
enum machine_mode mode = insn_data[icode].operand[1].mode;
13358
@@ -13678,7 +13823,6 @@
13359
|| ! (*insn_data[icode].operand[0].predicate) (target, tmode))
13360
target = gen_reg_rtx (tmode);
13362
- /*pat = gen_altivec_lvsr (target, op);*/
13363
pat = GEN_FCN (icode) (target, op);
13366
@@ -17099,7 +17243,14 @@
13367
prefer Altivec loads.. */
13368
if (rclass == VSX_REGS)
13370
- if (GET_MODE_SIZE (mode) <= 8)
13371
+ if (MEM_P (x) && reg_addr[mode].scalar_in_vmx_p)
13373
+ rtx addr = XEXP (x, 0);
13374
+ if (rs6000_legitimate_offset_address_p (mode, addr, false, true)
13375
+ || legitimate_lo_sum_address_p (mode, addr, false))
13376
+ return FLOAT_REGS;
13378
+ else if (GET_MODE_SIZE (mode) <= 8 && !reg_addr[mode].scalar_in_vmx_p)
13381
if (VECTOR_UNIT_ALTIVEC_P (mode) || VECTOR_MEM_ALTIVEC_P (mode)
13382
@@ -30865,6 +31016,23 @@
13383
rs6000_do_expand_vec_perm (target, op0, op1, vmode, nelt, perm);
13386
+/* Scale a V2DF vector SRC by two to the SCALE and place in TGT. */
13388
+rs6000_scale_v2df (rtx tgt, rtx src, int scale)
13390
+ HOST_WIDE_INT hwi_scale (scale);
13391
+ REAL_VALUE_TYPE r_pow;
13392
+ rtvec v = rtvec_alloc (2);
13394
+ rtx scale_vec = gen_reg_rtx (V2DFmode);
13395
+ (void)real_powi (&r_pow, DFmode, &dconst2, hwi_scale);
13396
+ elt = CONST_DOUBLE_FROM_REAL_VALUE (r_pow, DFmode);
13397
+ RTVEC_ELT (v, 0) = elt;
13398
+ RTVEC_ELT (v, 1) = elt;
13399
+ rs6000_expand_vector_init (scale_vec, gen_rtx_PARALLEL (V2DFmode, v));
13400
+ emit_insn (gen_mulv2df3 (tgt, src, scale_vec));
13403
/* Return an RTX representing where to find the function value of a
13404
function returning MODE. */
13406
@@ -31413,6 +31581,7 @@
13407
{ "htm", RS6000_BTM_HTM, false, false },
13408
{ "hard-dfp", RS6000_BTM_DFP, false, false },
13409
{ "hard-float", RS6000_BTM_HARD_FLOAT, false, false },
13410
+ { "long-double-128", RS6000_BTM_LDBL128, false, false },
13413
/* Option variables that we want to support inside attribute((target)) and
13414
@@ -32663,25 +32832,14 @@
13416
/* Return true if the peephole2 can combine a load involving a combination of
13417
an addis instruction and a load with an offset that can be fused together on
13421
- The operands are:
13422
- operands[0] register set with addis
13423
- operands[1] value set via addis
13424
- operands[2] target register being loaded
13425
- operands[3] D-form memory reference using operands[0].
13427
- In addition, we are passed a boolean that is true if this is a peephole2,
13428
- and we can use see if the addis_reg is dead after the insn and can be
13429
- replaced by the target register. */
13432
-fusion_gpr_load_p (rtx *operands, bool peep2_p)
13433
+fusion_gpr_load_p (rtx addis_reg, /* register set via addis. */
13434
+ rtx addis_value, /* addis value. */
13435
+ rtx target, /* target register that is loaded. */
13436
+ rtx mem) /* bottom part of the memory addr. */
13438
- rtx addis_reg = operands[0];
13439
- rtx addis_value = operands[1];
13440
- rtx target = operands[2];
13441
- rtx mem = operands[3];
13445
@@ -32695,9 +32853,6 @@
13446
if (!fusion_gpr_addis (addis_value, GET_MODE (addis_value)))
13449
- if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
13452
/* Allow sign/zero extension. */
13453
if (GET_CODE (mem) == ZERO_EXTEND
13454
|| (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN))
13455
@@ -32706,22 +32861,22 @@
13459
+ if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
13462
addr = XEXP (mem, 0); /* either PLUS or LO_SUM. */
13463
if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
13466
/* Validate that the register used to load the high value is either the
13467
- register being loaded, or we can safely replace its use in a peephole2.
13468
+ register being loaded, or we can safely replace its use.
13470
- If this is a peephole2, we assume that there are 2 instructions in the
13471
- peephole (addis and load), so we want to check if the target register was
13472
- not used in the memory address and the register to hold the addis result
13473
- is dead after the peephole. */
13474
+ This function is only called from the peephole2 pass and we assume that
13475
+ there are 2 instructions in the peephole (addis and load), so we want to
13476
+ check if the target register was not used in the memory address and the
13477
+ register to hold the addis result is dead after the peephole. */
13478
if (REGNO (addis_reg) != REGNO (target))
13483
if (reg_mentioned_p (target, mem))
13486
@@ -32762,9 +32917,6 @@
13487
enum machine_mode extend_mode = target_mode;
13488
enum machine_mode ptr_mode = Pmode;
13489
enum rtx_code extend = UNKNOWN;
13490
- rtx addis_reg = ((ptr_mode == target_mode)
13492
- : simplify_subreg (ptr_mode, target, target_mode, 0));
13494
if (GET_CODE (orig_mem) == ZERO_EXTEND
13495
|| (TARGET_P8_FUSION_SIGN && GET_CODE (orig_mem) == SIGN_EXTEND))
13496
@@ -32781,13 +32933,14 @@
13497
gcc_assert (plus_or_lo_sum == PLUS || plus_or_lo_sum == LO_SUM);
13499
offset = XEXP (orig_addr, 1);
13500
- new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_reg, offset);
13501
- new_mem = change_address (orig_mem, target_mode, new_addr);
13502
+ new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_value, offset);
13503
+ new_mem = replace_equiv_address_nv (orig_mem, new_addr);
13505
if (extend != UNKNOWN)
13506
new_mem = gen_rtx_fmt_e (ZERO_EXTEND, extend_mode, new_mem);
13508
- emit_insn (gen_rtx_SET (VOIDmode, addis_reg, addis_value));
13509
+ new_mem = gen_rtx_UNSPEC (extend_mode, gen_rtvec (1, new_mem),
13510
+ UNSPEC_FUSION_GPR);
13511
emit_insn (gen_rtx_SET (VOIDmode, target, new_mem));
13513
if (extend == SIGN_EXTEND)
13514
@@ -32806,55 +32959,40 @@
13517
/* Return a string to fuse an addis instruction with a gpr load to the same
13518
- register that we loaded up the addis instruction. The code is complicated,
13519
- so we call output_asm_insn directly, and just return "".
13520
+ register that we loaded up the addis instruction. The address that is used
13521
+ is the logical address that was formed during peephole2:
13522
+ (lo_sum (high) (low-part))
13524
- The operands are:
13525
- operands[0] register set with addis (must be same reg as target).
13526
- operands[1] value set via addis
13527
- operands[2] target register being loaded
13528
- operands[3] D-form memory reference using operands[0]. */
13529
+ The code is complicated, so we call output_asm_insn directly, and just
13533
-emit_fusion_gpr_load (rtx *operands)
13534
+emit_fusion_gpr_load (rtx target, rtx mem)
13536
- rtx addis_reg = operands[0];
13537
- rtx addis_value = operands[1];
13538
- rtx target = operands[2];
13539
- rtx mem = operands[3];
13544
const char *addis_str = NULL;
13545
const char *load_str = NULL;
13546
- const char *extend_insn = NULL;
13547
const char *mode_name = NULL;
13548
char insn_template[80];
13549
enum machine_mode mode;
13550
const char *comment_str = ASM_COMMENT_START;
13551
- bool sign_p = false;
13553
- gcc_assert (REG_P (addis_reg) && REG_P (target));
13554
- gcc_assert (REGNO (addis_reg) == REGNO (target));
13555
+ if (GET_CODE (mem) == ZERO_EXTEND)
13556
+ mem = XEXP (mem, 0);
13558
+ gcc_assert (REG_P (target) && MEM_P (mem));
13560
if (*comment_str == ' ')
13563
- /* Allow sign/zero extension. */
13564
- if (GET_CODE (mem) == ZERO_EXTEND)
13565
- mem = XEXP (mem, 0);
13567
- else if (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN)
13570
- mem = XEXP (mem, 0);
13573
- gcc_assert (MEM_P (mem));
13574
addr = XEXP (mem, 0);
13575
if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
13576
gcc_unreachable ();
13578
+ addis_value = XEXP (addr, 0);
13579
load_offset = XEXP (addr, 1);
13581
/* Now emit the load instruction to the same register. */
13582
@@ -32864,29 +33002,22 @@
13584
mode_name = "char";
13586
- extend_insn = "extsb %0,%0";
13590
mode_name = "short";
13592
- extend_insn = "extsh %0,%0";
13598
- extend_insn = "extsw %0,%0";
13602
- if (TARGET_POWERPC64)
13604
- mode_name = "long";
13608
- gcc_unreachable ();
13609
+ gcc_assert (TARGET_POWERPC64);
13610
+ mode_name = "long";
13615
@@ -33030,14 +33161,6 @@
13617
fatal_insn ("Unable to generate load offset for fusion", load_offset);
13619
- /* Handle sign extension. The peephole2 pass generates this as a separate
13620
- insn, but we handle it just in case it got reattached. */
13623
- gcc_assert (extend_insn != NULL);
13624
- output_asm_insn (extend_insn, fuse_ops);
13630
Index: gcc/config/rs6000/vsx.md
13631
===================================================================
13632
--- a/src/gcc/config/rs6000/vsx.md (.../tags/gcc_4_8_3_release)
13633
+++ b/src/gcc/config/rs6000/vsx.md (.../branches/gcc-4_8-branch)
13635
;; Iterator for the 2 64-bit vector types
13636
(define_mode_iterator VSX_D [V2DF V2DI])
13638
+;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
13639
+;; lxvd2x to properly handle swapping words on little endian
13640
+(define_mode_iterator VSX_LE [V2DF
13643
+ (TI "VECTOR_MEM_VSX_P (TImode)")])
13645
;; Iterator for the 2 32-bit vector types
13646
(define_mode_iterator VSX_W [V4SF V4SI])
13648
@@ -79,19 +86,26 @@
13659
-;; Map the register class used for float<->int conversions
13660
+;; Map the register class used for float<->int conversions (floating point side)
13661
+;; VSr2 is the preferred register class, VSr3 is any register class that will
13663
(define_mode_attr VSr2 [(V2DF "wd")
13670
(define_mode_attr VSr3 [(V2DF "wa")
13677
;; Map the register class for sp<->dp float conversions, destination
13678
(define_mode_attr VSr4 [(SF "ws")
13679
@@ -99,12 +113,27 @@
13683
-;; Map the register class for sp<->dp float conversions, destination
13684
+;; Map the register class for sp<->dp float conversions, source
13685
(define_mode_attr VSr5 [(SF "ws")
13690
+;; The VSX register class that a type can occupy, even if it is not the
13691
+;; preferred register class (VSr is the preferred register class that will get
13692
+;; allocated first).
13693
+(define_mode_attr VSa [(V16QI "wa")
13705
;; Same size integer type for floating point data
13706
(define_mode_attr VSi [(V4SF "v4si")
13708
@@ -200,6 +229,16 @@
13712
+;; Map register class for 64-bit element in 128-bit vector for direct moves
13714
+(define_mode_attr VS_64dm [(V2DF "wk")
13717
+;; Map register class for 64-bit element in 128-bit vector for normal register
13718
+;; to register moves
13719
+(define_mode_attr VS_64reg [(V2DF "ws")
13722
;; Constants for creating unspecs
13723
(define_c_enum "unspec"
13725
@@ -221,6 +260,14 @@
13726
UNSPEC_VSX_ROUND_IC
13729
+ UNSPEC_VSX_XXSPLTD
13733
+ UNSPEC_VSX_XVCVSXDDP
13734
+ UNSPEC_VSX_XVCVUXDDP
13735
+ UNSPEC_VSX_XVCVDPSXDS
13736
+ UNSPEC_VSX_XVCVDPUXDS
13740
@@ -228,8 +275,8 @@
13741
;; The patterns for LE permuted loads and stores come before the general
13742
;; VSX moves so they match first.
13743
(define_insn_and_split "*vsx_le_perm_load_<mode>"
13744
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
13745
- (match_operand:VSX_D 1 "memory_operand" "Z"))]
13746
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
13747
+ (match_operand:VSX_LE 1 "memory_operand" "Z"))]
13748
"!BYTES_BIG_ENDIAN && TARGET_VSX"
13750
"!BYTES_BIG_ENDIAN && TARGET_VSX"
13751
@@ -251,7 +298,7 @@
13752
(set_attr "length" "8")])
13754
(define_insn_and_split "*vsx_le_perm_load_<mode>"
13755
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
13756
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
13757
(match_operand:VSX_W 1 "memory_operand" "Z"))]
13758
"!BYTES_BIG_ENDIAN && TARGET_VSX"
13760
@@ -342,8 +389,8 @@
13761
(set_attr "length" "8")])
13763
(define_insn "*vsx_le_perm_store_<mode>"
13764
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
13765
- (match_operand:VSX_D 1 "vsx_register_operand" "+wa"))]
13766
+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
13767
+ (match_operand:VSX_LE 1 "vsx_register_operand" "+<VSa>"))]
13768
"!BYTES_BIG_ENDIAN && TARGET_VSX"
13770
[(set_attr "type" "vecstore")
13771
@@ -350,8 +397,8 @@
13772
(set_attr "length" "12")])
13775
- [(set (match_operand:VSX_D 0 "memory_operand" "")
13776
- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
13777
+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
13778
+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
13779
"!BYTES_BIG_ENDIAN && TARGET_VSX && !reload_completed"
13780
[(set (match_dup 2)
13782
@@ -369,8 +416,8 @@
13783
;; The post-reload split requires that we re-permute the source
13784
;; register in case it is still live.
13786
- [(set (match_operand:VSX_D 0 "memory_operand" "")
13787
- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
13788
+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
13789
+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
13790
"!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed"
13791
[(set (match_dup 1)
13793
@@ -388,7 +435,7 @@
13795
(define_insn "*vsx_le_perm_store_<mode>"
13796
[(set (match_operand:VSX_W 0 "memory_operand" "=Z")
13797
- (match_operand:VSX_W 1 "vsx_register_operand" "+wa"))]
13798
+ (match_operand:VSX_W 1 "vsx_register_operand" "+<VSa>"))]
13799
"!BYTES_BIG_ENDIAN && TARGET_VSX"
13801
[(set_attr "type" "vecstore")
13802
@@ -578,8 +625,8 @@
13805
(define_insn "*vsx_mov<mode>"
13806
- [(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")
13807
- (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,wa,Z,wa,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
13808
+ [(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")
13809
+ (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,<VSa>,Z,<VSa>,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
13810
"VECTOR_MEM_VSX_P (<MODE>mode)
13811
&& (register_operand (operands[0], <MODE>mode)
13812
|| register_operand (operands[1], <MODE>mode))"
13813
@@ -681,9 +728,9 @@
13814
;; instructions are now combined with the insn for the traditional floating
13816
(define_insn "*vsx_add<mode>3"
13817
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13818
- (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
13819
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
13820
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13821
+ (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
13822
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
13823
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13824
"xvadd<VSs> %x0,%x1,%x2"
13825
[(set_attr "type" "<VStype_simple>")
13826
@@ -690,9 +737,9 @@
13827
(set_attr "fp_type" "<VSfptype_simple>")])
13829
(define_insn "*vsx_sub<mode>3"
13830
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13831
- (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
13832
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
13833
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13834
+ (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
13835
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
13836
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13837
"xvsub<VSs> %x0,%x1,%x2"
13838
[(set_attr "type" "<VStype_simple>")
13839
@@ -699,23 +746,106 @@
13840
(set_attr "fp_type" "<VSfptype_simple>")])
13842
(define_insn "*vsx_mul<mode>3"
13843
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13844
- (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
13845
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
13846
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13847
+ (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
13848
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
13849
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13850
"xvmul<VSs> %x0,%x1,%x2"
13851
[(set_attr "type" "<VStype_simple>")
13852
(set_attr "fp_type" "<VSfptype_mul>")])
13854
+; Emulate vector with scalar for vec_mul in V2DImode
13855
+(define_insn_and_split "vsx_mul_v2di"
13856
+ [(set (match_operand:V2DI 0 "vsx_register_operand" "=wa")
13857
+ (unspec:V2DI [(match_operand:V2DI 1 "vsx_register_operand" "wa")
13858
+ (match_operand:V2DI 2 "vsx_register_operand" "wa")]
13859
+ UNSPEC_VSX_MULSD))]
13860
+ "VECTOR_MEM_VSX_P (V2DImode)"
13862
+ "VECTOR_MEM_VSX_P (V2DImode) && !reload_completed && !reload_in_progress"
13866
+ rtx op0 = operands[0];
13867
+ rtx op1 = operands[1];
13868
+ rtx op2 = operands[2];
13869
+ rtx op3 = gen_reg_rtx (DImode);
13870
+ rtx op4 = gen_reg_rtx (DImode);
13871
+ rtx op5 = gen_reg_rtx (DImode);
13872
+ emit_insn (gen_vsx_extract_v2di (op3, op1, GEN_INT (0)));
13873
+ emit_insn (gen_vsx_extract_v2di (op4, op2, GEN_INT (0)));
13874
+ emit_insn (gen_muldi3 (op5, op3, op4));
13875
+ emit_insn (gen_vsx_extract_v2di (op3, op1, GEN_INT (1)));
13876
+ emit_insn (gen_vsx_extract_v2di (op4, op2, GEN_INT (1)));
13877
+ emit_insn (gen_muldi3 (op3, op3, op4));
13878
+ emit_insn (gen_vsx_concat_v2di (op0, op5, op3));
13880
+ [(set_attr "type" "vecdouble")])
13882
(define_insn "*vsx_div<mode>3"
13883
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13884
- (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
13885
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
13886
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13887
+ (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
13888
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
13889
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13890
"xvdiv<VSs> %x0,%x1,%x2"
13891
[(set_attr "type" "<VStype_div>")
13892
(set_attr "fp_type" "<VSfptype_div>")])
13894
+; Emulate vector with scalar for vec_div in V2DImode
13895
+(define_insn_and_split "vsx_div_v2di"
13896
+ [(set (match_operand:V2DI 0 "vsx_register_operand" "=wa")
13897
+ (unspec:V2DI [(match_operand:V2DI 1 "vsx_register_operand" "wa")
13898
+ (match_operand:V2DI 2 "vsx_register_operand" "wa")]
13899
+ UNSPEC_VSX_DIVSD))]
13900
+ "VECTOR_MEM_VSX_P (V2DImode)"
13902
+ "VECTOR_MEM_VSX_P (V2DImode) && !reload_completed && !reload_in_progress"
13906
+ rtx op0 = operands[0];
13907
+ rtx op1 = operands[1];
13908
+ rtx op2 = operands[2];
13909
+ rtx op3 = gen_reg_rtx (DImode);
13910
+ rtx op4 = gen_reg_rtx (DImode);
13911
+ rtx op5 = gen_reg_rtx (DImode);
13912
+ emit_insn (gen_vsx_extract_v2di (op3, op1, GEN_INT (0)));
13913
+ emit_insn (gen_vsx_extract_v2di (op4, op2, GEN_INT (0)));
13914
+ emit_insn (gen_divdi3 (op5, op3, op4));
13915
+ emit_insn (gen_vsx_extract_v2di (op3, op1, GEN_INT (1)));
13916
+ emit_insn (gen_vsx_extract_v2di (op4, op2, GEN_INT (1)));
13917
+ emit_insn (gen_divdi3 (op3, op3, op4));
13918
+ emit_insn (gen_vsx_concat_v2di (op0, op5, op3));
13920
+ [(set_attr "type" "vecdiv")])
13922
+(define_insn_and_split "vsx_udiv_v2di"
13923
+ [(set (match_operand:V2DI 0 "vsx_register_operand" "=wa")
13924
+ (unspec:V2DI [(match_operand:V2DI 1 "vsx_register_operand" "wa")
13925
+ (match_operand:V2DI 2 "vsx_register_operand" "wa")]
13926
+ UNSPEC_VSX_DIVUD))]
13927
+ "VECTOR_MEM_VSX_P (V2DImode)"
13929
+ "VECTOR_MEM_VSX_P (V2DImode) && !reload_completed && !reload_in_progress"
13933
+ rtx op0 = operands[0];
13934
+ rtx op1 = operands[1];
13935
+ rtx op2 = operands[2];
13936
+ rtx op3 = gen_reg_rtx (DImode);
13937
+ rtx op4 = gen_reg_rtx (DImode);
13938
+ rtx op5 = gen_reg_rtx (DImode);
13939
+ emit_insn (gen_vsx_extract_v2di (op3, op1, GEN_INT (0)));
13940
+ emit_insn (gen_vsx_extract_v2di (op4, op2, GEN_INT (0)));
13941
+ emit_insn (gen_udivdi3 (op5, op3, op4));
13942
+ emit_insn (gen_vsx_extract_v2di (op3, op1, GEN_INT (1)));
13943
+ emit_insn (gen_vsx_extract_v2di (op4, op2, GEN_INT (1)));
13944
+ emit_insn (gen_udivdi3 (op3, op3, op4));
13945
+ emit_insn (gen_vsx_concat_v2di (op0, op5, op3));
13947
+ [(set_attr "type" "vecdiv")])
13949
;; *tdiv* instruction returning the FG flag
13950
(define_expand "vsx_tdiv<mode>3_fg"
13951
[(set (match_dup 3)
13952
@@ -746,8 +876,8 @@
13954
(define_insn "*vsx_tdiv<mode>3_internal"
13955
[(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
13956
- (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")
13957
- (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,wa")]
13958
+ (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")
13959
+ (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,<VSa>")]
13961
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13962
"x<VSv>tdiv<VSs> %0,%x1,%x2"
13963
@@ -755,8 +885,8 @@
13964
(set_attr "fp_type" "<VSfptype_simple>")])
13966
(define_insn "vsx_fre<mode>2"
13967
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13968
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
13969
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13970
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
13972
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13973
"xvre<VSs> %x0,%x1"
13974
@@ -764,8 +894,8 @@
13975
(set_attr "fp_type" "<VSfptype_simple>")])
13977
(define_insn "*vsx_neg<mode>2"
13978
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13979
- (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
13980
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13981
+ (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
13982
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13983
"xvneg<VSs> %x0,%x1"
13984
[(set_attr "type" "<VStype_simple>")
13985
@@ -772,8 +902,8 @@
13986
(set_attr "fp_type" "<VSfptype_simple>")])
13988
(define_insn "*vsx_abs<mode>2"
13989
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13990
- (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
13991
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13992
+ (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
13993
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13994
"xvabs<VSs> %x0,%x1"
13995
[(set_attr "type" "<VStype_simple>")
13996
@@ -780,10 +910,10 @@
13997
(set_attr "fp_type" "<VSfptype_simple>")])
13999
(define_insn "vsx_nabs<mode>2"
14000
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14001
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14004
- (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa"))))]
14005
+ (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>"))))]
14006
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14007
"xvnabs<VSs> %x0,%x1"
14008
[(set_attr "type" "<VStype_simple>")
14009
@@ -790,9 +920,9 @@
14010
(set_attr "fp_type" "<VSfptype_simple>")])
14012
(define_insn "vsx_smax<mode>3"
14013
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14014
- (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
14015
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
14016
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14017
+ (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
14018
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
14019
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14020
"xvmax<VSs> %x0,%x1,%x2"
14021
[(set_attr "type" "<VStype_simple>")
14022
@@ -799,9 +929,9 @@
14023
(set_attr "fp_type" "<VSfptype_simple>")])
14025
(define_insn "*vsx_smin<mode>3"
14026
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14027
- (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
14028
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
14029
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14030
+ (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
14031
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
14032
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14033
"xvmin<VSs> %x0,%x1,%x2"
14034
[(set_attr "type" "<VStype_simple>")
14035
@@ -808,8 +938,8 @@
14036
(set_attr "fp_type" "<VSfptype_simple>")])
14038
(define_insn "*vsx_sqrt<mode>2"
14039
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14040
- (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
14041
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14042
+ (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
14043
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14044
"xvsqrt<VSs> %x0,%x1"
14045
[(set_attr "type" "<VStype_sqrt>")
14046
@@ -816,8 +946,8 @@
14047
(set_attr "fp_type" "<VSfptype_sqrt>")])
14049
(define_insn "*vsx_rsqrte<mode>2"
14050
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14051
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
14052
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14053
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
14055
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14056
"xvrsqrte<VSs> %x0,%x1"
14057
@@ -852,7 +982,7 @@
14059
(define_insn "*vsx_tsqrt<mode>2_internal"
14060
[(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
14061
- (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
14062
+ (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
14063
UNSPEC_VSX_TSQRT))]
14064
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14065
"x<VSv>tsqrt<VSs> %0,%x1"
14066
@@ -865,11 +995,11 @@
14069
(define_insn "*vsx_fmav4sf4"
14070
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,ws,?wa,?wa,v")
14071
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,wf,?wa,?wa,v")
14073
- (match_operand:V4SF 1 "vsx_register_operand" "%ws,ws,wa,wa,v")
14074
- (match_operand:V4SF 2 "vsx_register_operand" "ws,0,wa,0,v")
14075
- (match_operand:V4SF 3 "vsx_register_operand" "0,ws,0,wa,v")))]
14076
+ (match_operand:V4SF 1 "vsx_register_operand" "%wf,wf,wa,wa,v")
14077
+ (match_operand:V4SF 2 "vsx_register_operand" "wf,0,wa,0,v")
14078
+ (match_operand:V4SF 3 "vsx_register_operand" "0,wf,0,wa,v")))]
14079
"VECTOR_UNIT_VSX_P (V4SFmode)"
14081
xvmaddasp %x0,%x1,%x2
14082
@@ -880,11 +1010,11 @@
14083
[(set_attr "type" "vecfloat")])
14085
(define_insn "*vsx_fmav2df4"
14086
- [(set (match_operand:V2DF 0 "vsx_register_operand" "=ws,ws,?wa,?wa")
14087
+ [(set (match_operand:V2DF 0 "vsx_register_operand" "=wd,wd,?wa,?wa")
14089
- (match_operand:V2DF 1 "vsx_register_operand" "%ws,ws,wa,wa")
14090
- (match_operand:V2DF 2 "vsx_register_operand" "ws,0,wa,0")
14091
- (match_operand:V2DF 3 "vsx_register_operand" "0,ws,0,wa")))]
14092
+ (match_operand:V2DF 1 "vsx_register_operand" "%wd,wd,wa,wa")
14093
+ (match_operand:V2DF 2 "vsx_register_operand" "wd,0,wa,0")
14094
+ (match_operand:V2DF 3 "vsx_register_operand" "0,wd,0,wa")))]
14095
"VECTOR_UNIT_VSX_P (V2DFmode)"
14097
xvmaddadp %x0,%x1,%x2
14098
@@ -894,12 +1024,12 @@
14099
[(set_attr "type" "vecdouble")])
14101
(define_insn "*vsx_fms<mode>4"
14102
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
14103
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
14105
- (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,wa,wa")
14106
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
14107
+ (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,<VSa>,<VSa>")
14108
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
14110
- (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
14111
+ (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
14112
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14114
xvmsuba<VSs> %x0,%x1,%x2
14115
@@ -909,12 +1039,12 @@
14116
[(set_attr "type" "<VStype_mul>")])
14118
(define_insn "*vsx_nfma<mode>4"
14119
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
14120
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
14123
- (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,wa,wa")
14124
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
14125
- (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
14126
+ (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,<VSa>,<VSa>")
14127
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
14128
+ (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
14129
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14131
xvnmadda<VSs> %x0,%x1,%x2
14132
@@ -959,9 +1089,9 @@
14134
;; Vector conditional expressions (no scalar version for these instructions)
14135
(define_insn "vsx_eq<mode>"
14136
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14137
- (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
14138
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
14139
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14140
+ (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
14141
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
14142
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14143
"xvcmpeq<VSs> %x0,%x1,%x2"
14144
[(set_attr "type" "<VStype_simple>")
14145
@@ -968,9 +1098,9 @@
14146
(set_attr "fp_type" "<VSfptype_simple>")])
14148
(define_insn "vsx_gt<mode>"
14149
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14150
- (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
14151
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
14152
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14153
+ (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
14154
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
14155
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14156
"xvcmpgt<VSs> %x0,%x1,%x2"
14157
[(set_attr "type" "<VStype_simple>")
14158
@@ -977,9 +1107,9 @@
14159
(set_attr "fp_type" "<VSfptype_simple>")])
14161
(define_insn "*vsx_ge<mode>"
14162
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14163
- (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
14164
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
14165
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14166
+ (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
14167
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
14168
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14169
"xvcmpge<VSs> %x0,%x1,%x2"
14170
[(set_attr "type" "<VStype_simple>")
14171
@@ -990,10 +1120,10 @@
14172
(define_insn "*vsx_eq_<mode>_p"
14175
- [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
14176
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
14177
+ [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
14178
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
14180
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14181
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14182
(eq:VSX_F (match_dup 1)
14184
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14185
@@ -1003,10 +1133,10 @@
14186
(define_insn "*vsx_gt_<mode>_p"
14189
- [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
14190
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
14191
+ [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
14192
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
14194
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14195
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14196
(gt:VSX_F (match_dup 1)
14198
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14199
@@ -1016,10 +1146,10 @@
14200
(define_insn "*vsx_ge_<mode>_p"
14203
- [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
14204
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
14205
+ [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
14206
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
14208
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14209
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14210
(ge:VSX_F (match_dup 1)
14212
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14213
@@ -1028,23 +1158,23 @@
14216
(define_insn "*vsx_xxsel<mode>"
14217
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
14218
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14219
(if_then_else:VSX_L
14220
- (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
14221
+ (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
14222
(match_operand:VSX_L 4 "zero_constant" ""))
14223
- (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
14224
- (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
14225
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
14226
+ (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
14227
"VECTOR_MEM_VSX_P (<MODE>mode)"
14228
"xxsel %x0,%x3,%x2,%x1"
14229
[(set_attr "type" "vecperm")])
14231
(define_insn "*vsx_xxsel<mode>_uns"
14232
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
14233
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14234
(if_then_else:VSX_L
14235
- (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
14236
+ (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
14237
(match_operand:VSX_L 4 "zero_constant" ""))
14238
- (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
14239
- (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
14240
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
14241
+ (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
14242
"VECTOR_MEM_VSX_P (<MODE>mode)"
14243
"xxsel %x0,%x3,%x2,%x1"
14244
[(set_attr "type" "vecperm")])
14245
@@ -1051,10 +1181,10 @@
14248
(define_insn "vsx_copysign<mode>3"
14249
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14250
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14252
- [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
14253
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")]
14254
+ [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
14255
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")]
14257
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14258
"xvcpsgn<VSs> %x0,%x2,%x1"
14259
@@ -1067,7 +1197,7 @@
14260
;; in rs6000.md so don't test VECTOR_UNIT_VSX_P, just test against VSX.
14261
;; Don't use vsx_register_operand here, use gpc_reg_operand to match rs6000.md.
14262
(define_insn "vsx_float<VSi><mode>2"
14263
- [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
14264
+ [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
14265
(float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
14266
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14267
"x<VSv>cvsx<VSc><VSs> %x0,%x1"
14268
@@ -1075,7 +1205,7 @@
14269
(set_attr "fp_type" "<VSfptype_simple>")])
14271
(define_insn "vsx_floatuns<VSi><mode>2"
14272
- [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
14273
+ [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
14274
(unsigned_float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
14275
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14276
"x<VSv>cvux<VSc><VSs> %x0,%x1"
14277
@@ -1084,7 +1214,7 @@
14279
(define_insn "vsx_fix_trunc<mode><VSi>2"
14280
[(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
14281
- (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
14282
+ (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
14283
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14284
"x<VSv>cv<VSs>sx<VSc>s %x0,%x1"
14285
[(set_attr "type" "<VStype_simple>")
14286
@@ -1092,7 +1222,7 @@
14288
(define_insn "vsx_fixuns_trunc<mode><VSi>2"
14289
[(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
14290
- (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
14291
+ (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
14292
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14293
"x<VSv>cv<VSs>ux<VSc>s %x0,%x1"
14294
[(set_attr "type" "<VStype_simple>")
14295
@@ -1100,8 +1230,8 @@
14297
;; Math rounding functions
14298
(define_insn "vsx_x<VSv>r<VSs>i"
14299
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
14300
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
14301
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14302
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
14303
UNSPEC_VSX_ROUND_I))]
14304
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14305
"x<VSv>r<VSs>i %x0,%x1"
14306
@@ -1109,8 +1239,8 @@
14307
(set_attr "fp_type" "<VSfptype_simple>")])
14309
(define_insn "vsx_x<VSv>r<VSs>ic"
14310
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
14311
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
14312
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14313
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
14314
UNSPEC_VSX_ROUND_IC))]
14315
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14316
"x<VSv>r<VSs>ic %x0,%x1"
14317
@@ -1118,8 +1248,8 @@
14318
(set_attr "fp_type" "<VSfptype_simple>")])
14320
(define_insn "vsx_btrunc<mode>2"
14321
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14322
- (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
14323
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14324
+ (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
14325
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14326
"xvr<VSs>iz %x0,%x1"
14327
[(set_attr "type" "<VStype_simple>")
14328
@@ -1126,8 +1256,8 @@
14329
(set_attr "fp_type" "<VSfptype_simple>")])
14331
(define_insn "*vsx_b2trunc<mode>2"
14332
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
14333
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
14334
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14335
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
14337
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14338
"x<VSv>r<VSs>iz %x0,%x1"
14339
@@ -1135,8 +1265,8 @@
14340
(set_attr "fp_type" "<VSfptype_simple>")])
14342
(define_insn "vsx_floor<mode>2"
14343
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14344
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
14345
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14346
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
14348
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14349
"xvr<VSs>im %x0,%x1"
14350
@@ -1144,8 +1274,8 @@
14351
(set_attr "fp_type" "<VSfptype_simple>")])
14353
(define_insn "vsx_ceil<mode>2"
14354
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
14355
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
14356
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14357
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
14359
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14360
"xvr<VSs>ip %x0,%x1"
14361
@@ -1160,8 +1290,8 @@
14362
;; scalar single precision instructions internally use the double format.
14363
;; Prefer the altivec registers, since we likely will need to do a vperm
14364
(define_insn "vsx_<VS_spdp_insn>"
14365
- [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?wa")
14366
- (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,wa")]
14367
+ [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?<VSa>")
14368
+ (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,<VSa>")]
14369
UNSPEC_VSX_CVSPDP))]
14370
"VECTOR_UNIT_VSX_P (<MODE>mode)"
14371
"<VS_spdp_insn> %x0,%x1"
14372
@@ -1169,8 +1299,8 @@
14374
;; xscvspdp, represent the scalar SF type as V4SF
14375
(define_insn "vsx_xscvspdp"
14376
- [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
14377
- (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
14378
+ [(set (match_operand:DF 0 "vsx_register_operand" "=ws")
14379
+ (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa")]
14380
UNSPEC_VSX_CVSPDP))]
14381
"VECTOR_UNIT_VSX_P (V4SFmode)"
14383
@@ -1197,7 +1327,7 @@
14385
;; ISA 2.07 xscvdpspn/xscvspdpn that does not raise an error on signalling NaNs
14386
(define_insn "vsx_xscvdpspn"
14387
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,?wa")
14388
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=ww,?ww")
14389
(unspec:V4SF [(match_operand:DF 1 "vsx_register_operand" "wd,wa")]
14390
UNSPEC_VSX_CVDPSPN))]
14392
@@ -1205,8 +1335,8 @@
14393
[(set_attr "type" "fp")])
14395
(define_insn "vsx_xscvspdpn"
14396
- [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
14397
- (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
14398
+ [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?ws")
14399
+ (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wf,wa")]
14400
UNSPEC_VSX_CVSPDPN))]
14402
"xscvspdpn %x0,%x1"
14403
@@ -1213,8 +1343,8 @@
14404
[(set_attr "type" "fp")])
14406
(define_insn "vsx_xscvdpspn_scalar"
14407
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=wa")
14408
- (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "f")]
14409
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,?wa")
14410
+ (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "ww,ww")]
14411
UNSPEC_VSX_CVDPSPN))]
14413
"xscvdpspn %x0,%x1"
14414
@@ -1229,6 +1359,102 @@
14415
"xscvspdpn %x0,%x1"
14416
[(set_attr "type" "fp")])
14418
+;; Convert and scale (used by vec_ctf, vec_cts, vec_ctu for double/long long)
14420
+(define_expand "vsx_xvcvsxddp_scale"
14421
+ [(match_operand:V2DF 0 "vsx_register_operand" "")
14422
+ (match_operand:V2DI 1 "vsx_register_operand" "")
14423
+ (match_operand:QI 2 "immediate_operand" "")]
14424
+ "VECTOR_UNIT_VSX_P (V2DFmode)"
14426
+ rtx op0 = operands[0];
14427
+ rtx op1 = operands[1];
14428
+ int scale = INTVAL(operands[2]);
14429
+ emit_insn (gen_vsx_xvcvsxddp (op0, op1));
14431
+ rs6000_scale_v2df (op0, op0, -scale);
14435
+(define_insn "vsx_xvcvsxddp"
14436
+ [(set (match_operand:V2DF 0 "vsx_register_operand" "=wa")
14437
+ (unspec:V2DF [(match_operand:V2DI 1 "vsx_register_operand" "wa")]
14438
+ UNSPEC_VSX_XVCVSXDDP))]
14439
+ "VECTOR_UNIT_VSX_P (V2DFmode)"
14440
+ "xvcvsxddp %x0,%x1"
14441
+ [(set_attr "type" "vecdouble")])
14443
+(define_expand "vsx_xvcvuxddp_scale"
14444
+ [(match_operand:V2DF 0 "vsx_register_operand" "")
14445
+ (match_operand:V2DI 1 "vsx_register_operand" "")
14446
+ (match_operand:QI 2 "immediate_operand" "")]
14447
+ "VECTOR_UNIT_VSX_P (V2DFmode)"
14449
+ rtx op0 = operands[0];
14450
+ rtx op1 = operands[1];
14451
+ int scale = INTVAL(operands[2]);
14452
+ emit_insn (gen_vsx_xvcvuxddp (op0, op1));
14454
+ rs6000_scale_v2df (op0, op0, -scale);
14458
+(define_insn "vsx_xvcvuxddp"
14459
+ [(set (match_operand:V2DF 0 "vsx_register_operand" "=wa")
14460
+ (unspec:V2DF [(match_operand:V2DI 1 "vsx_register_operand" "wa")]
14461
+ UNSPEC_VSX_XVCVUXDDP))]
14462
+ "VECTOR_UNIT_VSX_P (V2DFmode)"
14463
+ "xvcvuxddp %x0,%x1"
14464
+ [(set_attr "type" "vecdouble")])
14466
+(define_expand "vsx_xvcvdpsxds_scale"
14467
+ [(match_operand:V2DI 0 "vsx_register_operand" "")
14468
+ (match_operand:V2DF 1 "vsx_register_operand" "")
14469
+ (match_operand:QI 2 "immediate_operand" "")]
14470
+ "VECTOR_UNIT_VSX_P (V2DFmode)"
14472
+ rtx op0 = operands[0];
14473
+ rtx op1 = operands[1];
14474
+ rtx tmp = gen_reg_rtx (V2DFmode);
14475
+ int scale = INTVAL(operands[2]);
14477
+ rs6000_scale_v2df (tmp, op1, scale);
14478
+ emit_insn (gen_vsx_xvcvdpsxds (op0, tmp));
14482
+(define_insn "vsx_xvcvdpsxds"
14483
+ [(set (match_operand:V2DI 0 "vsx_register_operand" "=wa")
14484
+ (unspec:V2DI [(match_operand:V2DF 1 "vsx_register_operand" "wa")]
14485
+ UNSPEC_VSX_XVCVDPSXDS))]
14486
+ "VECTOR_UNIT_VSX_P (V2DFmode)"
14487
+ "xvcvdpsxds %x0,%x1"
14488
+ [(set_attr "type" "vecdouble")])
14490
+(define_expand "vsx_xvcvdpuxds_scale"
14491
+ [(match_operand:V2DI 0 "vsx_register_operand" "")
14492
+ (match_operand:V2DF 1 "vsx_register_operand" "")
14493
+ (match_operand:QI 2 "immediate_operand" "")]
14494
+ "VECTOR_UNIT_VSX_P (V2DFmode)"
14496
+ rtx op0 = operands[0];
14497
+ rtx op1 = operands[1];
14498
+ rtx tmp = gen_reg_rtx (V2DFmode);
14499
+ int scale = INTVAL(operands[2]);
14501
+ rs6000_scale_v2df (tmp, op1, scale);
14502
+ emit_insn (gen_vsx_xvcvdpuxds (op0, tmp));
14506
+(define_insn "vsx_xvcvdpuxds"
14507
+ [(set (match_operand:V2DI 0 "vsx_register_operand" "=wa")
14508
+ (unspec:V2DI [(match_operand:V2DF 1 "vsx_register_operand" "wa")]
14509
+ UNSPEC_VSX_XVCVDPUXDS))]
14510
+ "VECTOR_UNIT_VSX_P (V2DFmode)"
14511
+ "xvcvdpuxds %x0,%x1"
14512
+ [(set_attr "type" "vecdouble")])
14514
;; Convert from 64-bit to 32-bit types
14515
;; Note, favor the Altivec registers since the usual use of these instructions
14516
;; is in vector converts and we need to use the Altivec vperm instruction.
14517
@@ -1302,10 +1528,10 @@
14518
;; since the xsrdpiz instruction does not truncate the value if the floating
14519
;; point value is < LONG_MIN or > LONG_MAX.
14520
(define_insn "*vsx_float_fix_<mode>2"
14521
- [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?wa")
14522
+ [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14525
- (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?wa"))))]
14526
+ (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?<VSa>"))))]
14527
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
14528
&& VECTOR_UNIT_VSX_P (<MODE>mode) && flag_unsafe_math_optimizations
14529
&& !flag_trapping_math && TARGET_FRIZ"
14530
@@ -1318,10 +1544,10 @@
14532
;; Build a V2DF/V2DI vector from two scalars
14533
(define_insn "vsx_concat_<mode>"
14534
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?wa")
14535
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?<VSa>")
14537
- (match_operand:<VS_scalar> 1 "vsx_register_operand" "ws,wa")
14538
- (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")))]
14539
+ (match_operand:<VS_scalar> 1 "vsx_register_operand" "<VS_64reg>,<VSa>")
14540
+ (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")))]
14541
"VECTOR_MEM_VSX_P (<MODE>mode)"
14543
if (BYTES_BIG_ENDIAN)
14544
@@ -1352,9 +1578,9 @@
14545
;; xxpermdi for little endian loads and stores. We need several of
14546
;; these since the form of the PARALLEL differs by mode.
14547
(define_insn "*vsx_xxpermdi2_le_<mode>"
14548
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
14549
- (vec_select:VSX_D
14550
- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
14551
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
14552
+ (vec_select:VSX_LE
14553
+ (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
14554
(parallel [(const_int 1) (const_int 0)])))]
14555
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
14556
"xxpermdi %x0,%x1,%x1,2"
14557
@@ -1361,9 +1587,9 @@
14558
[(set_attr "type" "vecperm")])
14560
(define_insn "*vsx_xxpermdi4_le_<mode>"
14561
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
14562
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
14564
- (match_operand:VSX_W 1 "vsx_register_operand" "wa")
14565
+ (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
14566
(parallel [(const_int 2) (const_int 3)
14567
(const_int 0) (const_int 1)])))]
14568
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
14569
@@ -1401,9 +1627,9 @@
14570
;; lxvd2x for little endian loads. We need several of
14571
;; these since the form of the PARALLEL differs by mode.
14572
(define_insn "*vsx_lxvd2x2_le_<mode>"
14573
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
14574
- (vec_select:VSX_D
14575
- (match_operand:VSX_D 1 "memory_operand" "Z")
14576
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
14577
+ (vec_select:VSX_LE
14578
+ (match_operand:VSX_LE 1 "memory_operand" "Z")
14579
(parallel [(const_int 1) (const_int 0)])))]
14580
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
14582
@@ -1410,7 +1636,7 @@
14583
[(set_attr "type" "vecload")])
14585
(define_insn "*vsx_lxvd2x4_le_<mode>"
14586
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
14587
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
14589
(match_operand:VSX_W 1 "memory_operand" "Z")
14590
(parallel [(const_int 2) (const_int 3)
14591
@@ -1450,9 +1676,9 @@
14592
;; stxvd2x for little endian stores. We need several of
14593
;; these since the form of the PARALLEL differs by mode.
14594
(define_insn "*vsx_stxvd2x2_le_<mode>"
14595
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
14596
- (vec_select:VSX_D
14597
- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
14598
+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
14599
+ (vec_select:VSX_LE
14600
+ (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
14601
(parallel [(const_int 1) (const_int 0)])))]
14602
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
14604
@@ -1461,7 +1687,7 @@
14605
(define_insn "*vsx_stxvd2x4_le_<mode>"
14606
[(set (match_operand:VSX_W 0 "memory_operand" "=Z")
14608
- (match_operand:VSX_W 1 "vsx_register_operand" "wa")
14609
+ (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
14610
(parallel [(const_int 2) (const_int 3)
14611
(const_int 0) (const_int 1)])))]
14612
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
14613
@@ -1513,11 +1739,12 @@
14615
;; Set the element of a V2DI/VD2F mode
14616
(define_insn "vsx_set_<mode>"
14617
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?wa")
14618
- (unspec:VSX_D [(match_operand:VSX_D 1 "vsx_register_operand" "wd,wa")
14619
- (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")
14620
- (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
14621
- UNSPEC_VSX_SET))]
14622
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?<VSa>")
14624
+ [(match_operand:VSX_D 1 "vsx_register_operand" "wd,<VSa>")
14625
+ (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")
14626
+ (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
14627
+ UNSPEC_VSX_SET))]
14628
"VECTOR_MEM_VSX_P (<MODE>mode)"
14630
int idx_first = BYTES_BIG_ENDIAN ? 0 : 1;
14631
@@ -1582,7 +1809,7 @@
14632
(define_insn_and_split "vsx_extract_v4sf"
14633
[(set (match_operand:SF 0 "vsx_register_operand" "=f,f")
14635
- (match_operand:V4SF 1 "vsx_register_operand" "wa,wa")
14636
+ (match_operand:V4SF 1 "vsx_register_operand" "<VSa>,<VSa>")
14637
(parallel [(match_operand:QI 2 "u5bit_cint_operand" "O,i")])))
14638
(clobber (match_scratch:V4SF 3 "=X,0"))]
14639
"VECTOR_UNIT_VSX_P (V4SFmode)"
14640
@@ -1606,7 +1833,7 @@
14642
if (GET_CODE (op3) == SCRATCH)
14643
op3 = gen_reg_rtx (V4SFmode);
14644
- emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, op2));
14645
+ emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, GEN_INT (ele)));
14648
emit_insn (gen_vsx_xscvspdp_scalar2 (op0, tmp));
14649
@@ -1765,9 +1992,9 @@
14652
(define_insn "vsx_splat_<mode>"
14653
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?wa,?wa,?wa")
14654
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?<VSa>,?<VSa>,?<VSa>")
14655
(vec_duplicate:VSX_D
14656
- (match_operand:<VS_scalar> 1 "splat_input_operand" "ws,f,Z,wa,wa,Z")))]
14657
+ (match_operand:<VS_scalar> 1 "splat_input_operand" "<VS_64reg>,f,Z,<VSa>,<VSa>,Z")))]
14658
"VECTOR_MEM_VSX_P (<MODE>mode)"
14660
xxpermdi %x0,%x1,%x1,0
14661
@@ -1780,10 +2007,10 @@
14664
(define_insn "vsx_xxspltw_<mode>"
14665
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
14666
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
14667
(vec_duplicate:VSX_W
14668
(vec_select:<VS_scalar>
14669
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
14670
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
14672
[(match_operand:QI 2 "u5bit_cint_operand" "i,i")]))))]
14673
"VECTOR_MEM_VSX_P (<MODE>mode)"
14674
@@ -1796,8 +2023,8 @@
14675
[(set_attr "type" "vecperm")])
14677
(define_insn "vsx_xxspltw_<mode>_direct"
14678
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
14679
- (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
14680
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
14681
+ (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
14682
(match_operand:QI 2 "u5bit_cint_operand" "i,i")]
14683
UNSPEC_VSX_XXSPLTW))]
14684
"VECTOR_MEM_VSX_P (<MODE>mode)"
14685
@@ -1804,13 +2031,29 @@
14686
"xxspltw %x0,%x1,%2"
14687
[(set_attr "type" "vecperm")])
14689
+;; V2DF/V2DI splat for use by vec_splat builtin
14690
+(define_insn "vsx_xxspltd_<mode>"
14691
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
14692
+ (unspec:VSX_D [(match_operand:VSX_D 1 "vsx_register_operand" "wa")
14693
+ (match_operand:QI 2 "u5bit_cint_operand" "i")]
14694
+ UNSPEC_VSX_XXSPLTD))]
14695
+ "VECTOR_MEM_VSX_P (<MODE>mode)"
14697
+ if ((VECTOR_ELT_ORDER_BIG && INTVAL (operands[2]) == 0)
14698
+ || (!VECTOR_ELT_ORDER_BIG && INTVAL (operands[2]) == 1))
14699
+ return "xxpermdi %x0,%x1,%x1,0";
14701
+ return "xxpermdi %x0,%x1,%x1,3";
14703
+ [(set_attr "type" "vecperm")])
14705
;; V4SF/V4SI interleave
14706
(define_insn "vsx_xxmrghw_<mode>"
14707
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
14708
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
14710
(vec_concat:<VS_double>
14711
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
14712
- (match_operand:VSX_W 2 "vsx_register_operand" "wf,wa"))
14713
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
14714
+ (match_operand:VSX_W 2 "vsx_register_operand" "wf,<VSa>"))
14715
(parallel [(const_int 0) (const_int 4)
14716
(const_int 1) (const_int 5)])))]
14717
"VECTOR_MEM_VSX_P (<MODE>mode)"
14718
@@ -1823,11 +2066,11 @@
14719
[(set_attr "type" "vecperm")])
14721
(define_insn "vsx_xxmrglw_<mode>"
14722
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
14723
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
14725
(vec_concat:<VS_double>
14726
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
14727
- (match_operand:VSX_W 2 "vsx_register_operand" "wf,?wa"))
14728
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
14729
+ (match_operand:VSX_W 2 "vsx_register_operand" "wf,?<VSa>"))
14730
(parallel [(const_int 2) (const_int 6)
14731
(const_int 3) (const_int 7)])))]
14732
"VECTOR_MEM_VSX_P (<MODE>mode)"
14733
@@ -1841,9 +2084,9 @@
14735
;; Shift left double by word immediate
14736
(define_insn "vsx_xxsldwi_<mode>"
14737
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=wa")
14738
- (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "wa")
14739
- (match_operand:VSX_L 2 "vsx_register_operand" "wa")
14740
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSa>")
14741
+ (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "<VSa>")
14742
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSa>")
14743
(match_operand:QI 3 "u5bit_cint_operand" "i")]
14744
UNSPEC_VSX_SLDWI))]
14745
"VECTOR_MEM_VSX_P (<MODE>mode)"
14746
@@ -1924,7 +2167,7 @@
14747
;; to the top element of the V2DF array without doing an extract.
14749
(define_insn_and_split "*vsx_reduc_<VEC_reduc_name>_v2df_scalar"
14750
- [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?wa,ws,?wa")
14751
+ [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?ws,ws,?ws")
14755
Index: gcc/config/rs6000/rs6000.h
14756
===================================================================
14757
--- a/src/gcc/config/rs6000/rs6000.h (.../tags/gcc_4_8_3_release)
14758
+++ b/src/gcc/config/rs6000/rs6000.h (.../branches/gcc-4_8-branch)
14759
@@ -1438,6 +1438,10 @@
14760
RS6000_CONSTRAINT_wd, /* VSX register for V2DF */
14761
RS6000_CONSTRAINT_wf, /* VSX register for V4SF */
14762
RS6000_CONSTRAINT_wg, /* FPR register for -mmfpgpr */
14763
+ RS6000_CONSTRAINT_wh, /* FPR register for direct moves. */
14764
+ RS6000_CONSTRAINT_wi, /* FPR/VSX register to hold DImode */
14765
+ RS6000_CONSTRAINT_wj, /* FPR/VSX register for DImode direct moves. */
14766
+ RS6000_CONSTRAINT_wk, /* FPR/VSX register for DFmode direct moves. */
14767
RS6000_CONSTRAINT_wl, /* FPR register for LFIWAX */
14768
RS6000_CONSTRAINT_wm, /* VSX register for direct move */
14769
RS6000_CONSTRAINT_wr, /* GPR register if 64-bit */
14770
@@ -1462,6 +1466,9 @@
14771
#define VSX_REG_CLASS_P(CLASS) \
14772
((CLASS) == VSX_REGS || (CLASS) == FLOAT_REGS || (CLASS) == ALTIVEC_REGS)
14774
+/* Return whether a given register class targets general purpose registers. */
14775
+#define GPR_REG_CLASS_P(CLASS) ((CLASS) == GENERAL_REGS || (CLASS) == BASE_REGS)
14777
/* Given an rtx X being reloaded into a reg required to be
14778
in class CLASS, return the class of reg to actually use.
14779
In general this is just CLASS; but on some machines
14780
@@ -1593,8 +1600,15 @@
14781
/* Define this if stack space is still allocated for a parameter passed
14782
in a register. The value is the number of bytes allocated to this
14784
-#define REG_PARM_STACK_SPACE(FNDECL) rs6000_reg_parm_stack_space((FNDECL))
14785
+#define REG_PARM_STACK_SPACE(FNDECL) \
14786
+ rs6000_reg_parm_stack_space ((FNDECL), false)
14788
+/* Define this macro if space guaranteed when compiling a function body
14789
+ is different to space required when making a call, a situation that
14790
+ can arise with K&R style function definitions. */
14791
+#define INCOMING_REG_PARM_STACK_SPACE(FNDECL) \
14792
+ rs6000_reg_parm_stack_space ((FNDECL), true)
14794
/* Define this if the above stack space is to be considered part of the
14795
space allocated by the caller. */
14796
#define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
14797
@@ -2483,8 +2497,8 @@
14798
#define RS6000_BTC_SAT RS6000_BTC_MISC /* saturate sets VSCR. */
14800
/* Builtin targets. For now, we reuse the masks for those options that are in
14801
- target flags, and pick two random bits for SPE and paired which aren't in
14803
+ target flags, and pick three random bits for SPE, paired and ldbl128 which
14804
+ aren't in target_flags. */
14805
#define RS6000_BTM_ALWAYS 0 /* Always enabled. */
14806
#define RS6000_BTM_ALTIVEC MASK_ALTIVEC /* VMX/altivec vectors. */
14807
#define RS6000_BTM_VSX MASK_VSX /* VSX (vector/scalar). */
14808
@@ -2501,6 +2515,7 @@
14809
#define RS6000_BTM_CELL MASK_FPRND /* Target is cell powerpc. */
14810
#define RS6000_BTM_DFP MASK_DFP /* Decimal floating point. */
14811
#define RS6000_BTM_HARD_FLOAT MASK_SOFT_FLOAT /* Hardware floating point. */
14812
+#define RS6000_BTM_LDBL128 MASK_MULTIPLE /* 128-bit long double. */
14814
#define RS6000_BTM_COMMON (RS6000_BTM_ALTIVEC \
14816
@@ -2514,7 +2529,8 @@
14817
| RS6000_BTM_POPCNTD \
14818
| RS6000_BTM_CELL \
14820
- | RS6000_BTM_HARD_FLOAT)
14821
+ | RS6000_BTM_HARD_FLOAT \
14822
+ | RS6000_BTM_LDBL128)
14824
/* Define builtin enum index. */
14826
Index: gcc/config/rs6000/altivec.md
14827
===================================================================
14828
--- a/src/gcc/config/rs6000/altivec.md (.../tags/gcc_4_8_3_release)
14829
+++ b/src/gcc/config/rs6000/altivec.md (.../branches/gcc-4_8-branch)
14836
UNSPEC_VUNPACK_HI_SIGN
14837
UNSPEC_VUNPACK_LO_SIGN
14838
UNSPEC_VUNPACK_HI_SIGN_DIRECT
14839
@@ -2077,7 +2077,7 @@
14840
(unspec:VM [(match_operand:VM 1 "register_operand" "v")
14841
(match_operand:VM 2 "register_operand" "v")
14842
(match_operand:QI 3 "immediate_operand" "i")]
14846
"vsldoi %0,%1,%2,%3"
14847
[(set_attr "type" "vecperm")])
14848
@@ -2297,7 +2297,31 @@
14850
[(set_attr "type" "vecsimple")])
14852
-(define_insn "altivec_lvsl"
14853
+(define_expand "altivec_lvsl"
14854
+ [(use (match_operand:V16QI 0 "register_operand" ""))
14855
+ (use (match_operand:V16QI 1 "memory_operand" ""))]
14858
+ if (VECTOR_ELT_ORDER_BIG)
14859
+ emit_insn (gen_altivec_lvsl_direct (operands[0], operands[1]));
14863
+ rtx mask, perm[16], constv, vperm;
14864
+ mask = gen_reg_rtx (V16QImode);
14865
+ emit_insn (gen_altivec_lvsl_direct (mask, operands[1]));
14866
+ for (i = 0; i < 16; ++i)
14867
+ perm[i] = GEN_INT (i);
14868
+ constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
14869
+ constv = force_reg (V16QImode, constv);
14870
+ vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
14872
+ emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
14877
+(define_insn "altivec_lvsl_direct"
14878
[(set (match_operand:V16QI 0 "register_operand" "=v")
14879
(unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
14881
@@ -2305,7 +2329,31 @@
14883
[(set_attr "type" "vecload")])
14885
-(define_insn "altivec_lvsr"
14886
+(define_expand "altivec_lvsr"
14887
+ [(use (match_operand:V16QI 0 "register_operand" ""))
14888
+ (use (match_operand:V16QI 1 "memory_operand" ""))]
14891
+ if (VECTOR_ELT_ORDER_BIG)
14892
+ emit_insn (gen_altivec_lvsr_direct (operands[0], operands[1]));
14896
+ rtx mask, perm[16], constv, vperm;
14897
+ mask = gen_reg_rtx (V16QImode);
14898
+ emit_insn (gen_altivec_lvsr_direct (mask, operands[1]));
14899
+ for (i = 0; i < 16; ++i)
14900
+ perm[i] = GEN_INT (i);
14901
+ constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
14902
+ constv = force_reg (V16QImode, constv);
14903
+ vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
14905
+ emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
14910
+(define_insn "altivec_lvsr_direct"
14911
[(set (match_operand:V16QI 0 "register_operand" "=v")
14912
(unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
14914
Index: gcc/config/rs6000/rs6000.md
14915
===================================================================
14916
--- a/src/gcc/config/rs6000/rs6000.md (.../tags/gcc_4_8_3_release)
14917
+++ b/src/gcc/config/rs6000/rs6000.md (.../branches/gcc-4_8-branch)
14918
@@ -134,6 +134,7 @@
14919
UNSPEC_UNPACK_128BIT
14922
+ UNSPEC_FUSION_GPR
14926
@@ -317,8 +318,25 @@
14927
(define_mode_attr f32_sv [(SF "stxsspx %x1,%y0") (SD "stxsiwzx %x1,%y0")])
14929
; Definitions for 32-bit fpr direct move
14930
-(define_mode_attr f32_dm [(SF "wn") (SD "wm")])
14931
+; At present, the decimal modes are not allowed in the traditional altivec
14932
+; registers, so restrict the constraints to just the traditional FPRs.
14933
+(define_mode_attr f32_dm [(SF "wn") (SD "wh")])
14935
+; Definitions for 32-bit VSX
14936
+(define_mode_attr f32_vsx [(SF "ww") (SD "wn")])
14938
+; Definitions for 32-bit use of altivec registers
14939
+(define_mode_attr f32_av [(SF "wu") (SD "wn")])
14941
+; Definitions for 64-bit VSX
14942
+(define_mode_attr f64_vsx [(DF "ws") (DD "wn")])
14944
+; Definitions for 64-bit direct move
14945
+(define_mode_attr f64_dm [(DF "wk") (DD "wh")])
14947
+; Definitions for 64-bit use of altivec registers
14948
+(define_mode_attr f64_av [(DF "wv") (DD "wn")])
14950
; These modes do not fit in integer registers in 32-bit mode.
14951
; but on e500v2, the gpr are 64 bit registers
14952
(define_mode_iterator DIFD [DI (DF "!TARGET_E500_DOUBLE") DD])
14953
@@ -424,7 +442,7 @@
14956
;; Mode attribute for boolean operation register constraints for output
14957
-(define_mode_attr BOOL_REGS_OUTPUT [(TI "&r,r,r,wa,v")
14958
+(define_mode_attr BOOL_REGS_OUTPUT [(TI "&r,r,r,wt,v")
14960
(V16QI "wa,v,&?r,?r,?r")
14961
(V8HI "wa,v,&?r,?r,?r")
14962
@@ -435,7 +453,7 @@
14963
(V1TI "wa,v,&?r,?r,?r")])
14965
;; Mode attribute for boolean operation register constraints for operand1
14966
-(define_mode_attr BOOL_REGS_OP1 [(TI "r,0,r,wa,v")
14967
+(define_mode_attr BOOL_REGS_OP1 [(TI "r,0,r,wt,v")
14969
(V16QI "wa,v,r,0,r")
14970
(V8HI "wa,v,r,0,r")
14971
@@ -446,7 +464,7 @@
14972
(V1TI "wa,v,r,0,r")])
14974
;; Mode attribute for boolean operation register constraints for operand2
14975
-(define_mode_attr BOOL_REGS_OP2 [(TI "r,r,0,wa,v")
14976
+(define_mode_attr BOOL_REGS_OP2 [(TI "r,r,0,wt,v")
14978
(V16QI "wa,v,r,r,0")
14979
(V8HI "wa,v,r,r,0")
14980
@@ -459,7 +477,7 @@
14981
;; Mode attribute for boolean operation register constraints for operand1
14982
;; for one_cmpl. To simplify things, we repeat the constraint where 0
14983
;; is used for operand1 or operand2
14984
-(define_mode_attr BOOL_REGS_UNARY [(TI "r,0,0,wa,v")
14985
+(define_mode_attr BOOL_REGS_UNARY [(TI "r,0,0,wt,v")
14987
(V16QI "wa,v,r,0,0")
14988
(V8HI "wa,v,r,0,0")
14989
@@ -566,7 +584,7 @@
14992
(define_insn "*zero_extendsidi2_lfiwzx"
14993
- [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wz,!wu")
14994
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wz,!wu")
14995
(zero_extend:DI (match_operand:SI 1 "reg_or_mem_operand" "m,r,r,Z,Z")))]
14996
"TARGET_POWERPC64 && TARGET_LFIWZX"
14998
@@ -736,8 +754,8 @@
15001
(define_insn "*extendsidi2_lfiwax"
15002
- [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wl,!wu")
15003
- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r,r,Z,Z")))]
15004
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wl,!wu")
15005
+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r,r,Z,Z")))]
15006
"TARGET_POWERPC64 && TARGET_LFIWAX"
15009
@@ -760,7 +778,7 @@
15011
(define_insn "*extendsidi2_nocell"
15012
[(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
15013
- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
15014
+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r")))]
15015
"TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
15018
@@ -5614,7 +5632,7 @@
15019
; We don't define lfiwax/lfiwzx with the normal definition, because we
15020
; don't want to support putting SImode in FPR registers.
15021
(define_insn "lfiwax"
15022
- [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
15023
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
15024
(unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
15026
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWAX"
15027
@@ -5694,7 +5712,7 @@
15028
(set_attr "type" "fpload")])
15030
(define_insn "lfiwzx"
15031
- [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
15032
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
15033
(unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
15035
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWZX"
15036
@@ -9210,8 +9228,8 @@
15039
(define_insn "mov<mode>_hardfloat"
15040
- [(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")
15041
- (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"))]
15042
+ [(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")
15043
+ (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"))]
15044
"(gpc_reg_operand (operands[0], <MODE>mode)
15045
|| gpc_reg_operand (operands[1], <MODE>mode))
15046
&& (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT)"
15047
@@ -9422,8 +9440,8 @@
15050
(define_insn "*mov<mode>_hardfloat32"
15051
- [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,!r,!r,!r")
15052
- (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,G,H,F"))]
15053
+ [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,!r,!r,!r")
15054
+ (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,G,H,F"))]
15055
"! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
15056
&& (gpc_reg_operand (operands[0], <MODE>mode)
15057
|| gpc_reg_operand (operands[1], <MODE>mode))"
15058
@@ -9491,8 +9509,8 @@
15059
; ld/std require word-aligned displacements -> 'Y' constraint.
15060
; List Y->r and r->Y before r->r for reload.
15061
(define_insn "*mov<mode>_hardfloat64"
15062
- [(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")
15063
- (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"))]
15064
+ [(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>")
15065
+ (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"))]
15066
"TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
15067
&& (gpc_reg_operand (operands[0], <MODE>mode)
15068
|| gpc_reg_operand (operands[1], <MODE>mode))"
15069
@@ -10272,8 +10290,8 @@
15070
{ rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
15072
(define_insn "*movdi_internal64"
15073
- [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wm")
15074
- (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wm,r"))]
15075
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wj,?*wi")
15076
+ (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wj,r,O"))]
15078
&& (gpc_reg_operand (operands[0], DImode)
15079
|| gpc_reg_operand (operands[1], DImode))"
15080
@@ -10293,7 +10311,8 @@
15086
+ xxlxor %x0,%x0,%x0"
15087
[(set_attr_alternative "type"
15089
(match_test "update_indexed_address_mem (operands[0], VOIDmode)")
15090
@@ -10334,8 +10353,9 @@
15091
(const_string "mftgpr")
15092
(const_string "mffgpr")
15093
(const_string "mftgpr")
15094
- (const_string "mffgpr")])
15095
- (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4")])
15096
+ (const_string "mffgpr")
15097
+ (const_string "vecsimple")])
15098
+ (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4,4")])
15100
;; immediate value valid for a single instruction hiding in a const_double
15102
@@ -15751,23 +15771,10 @@
15103
;; a GPR. The addis instruction must be adjacent to the load, and use the same
15104
;; register that is being loaded. The fused ops must be physically adjacent.
15106
-;; We use define_peephole for the actual addis/load, and the register used to
15107
-;; hold the addis value must be the same as the register being loaded. We use
15108
-;; define_peephole2 to change the register used for addis to be the register
15109
-;; being loaded, since we can look at whether it is dead after the load insn.
15110
+;; Find cases where the addis that feeds into a load instruction is either used
15111
+;; once or is the same as the target register, and replace it with the fusion
15115
- [(set (match_operand:P 0 "base_reg_operand" "")
15116
- (match_operand:P 1 "fusion_gpr_addis" ""))
15117
- (set (match_operand:INT1 2 "base_reg_operand" "")
15118
- (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
15119
- "TARGET_P8_FUSION && fusion_gpr_load_p (operands, false)"
15121
- return emit_fusion_gpr_load (operands);
15123
- [(set_attr "type" "load")
15124
- (set_attr "length" "8")])
15127
[(set (match_operand:P 0 "base_reg_operand" "")
15128
(match_operand:P 1 "fusion_gpr_addis" ""))
15129
@@ -15774,9 +15781,8 @@
15130
(set (match_operand:INT1 2 "base_reg_operand" "")
15131
(match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
15133
- && (REGNO (operands[0]) != REGNO (operands[2])
15134
- || GET_CODE (operands[3]) == SIGN_EXTEND)
15135
- && fusion_gpr_load_p (operands, true)"
15136
+ && fusion_gpr_load_p (operands[0], operands[1], operands[2],
15140
expand_fusion_gpr_load (operands);
15141
@@ -15783,6 +15789,20 @@
15145
+;; Fusion insn, created by the define_peephole2 above (and eventually by
15148
+(define_insn "fusion_gpr_load_<mode>"
15149
+ [(set (match_operand:INT1 0 "base_reg_operand" "=&b")
15150
+ (unspec:INT1 [(match_operand:INT1 1 "fusion_gpr_mem_combo" "")]
15151
+ UNSPEC_FUSION_GPR))]
15152
+ "TARGET_P8_FUSION"
15154
+ return emit_fusion_gpr_load (operands[0], operands[1]);
15156
+ [(set_attr "type" "load")
15157
+ (set_attr "length" "8")])
15160
;; Miscellaneous ISA 2.06 (power7) instructions
15161
(define_insn "addg6s"
15162
@@ -15847,26 +15867,6 @@
15166
-;; The Advance Toolchain 7.0-3 added private builtins: __builtin_longdouble_dw0
15167
-;; and __builtin_longdouble_dw1 to optimize glibc. Add support for these
15170
-(define_expand "unpacktf_0"
15171
- [(set (match_operand:DF 0 "nonimmediate_operand" "")
15172
- (unspec:DF [(match_operand:TF 1 "register_operand" "")
15174
- UNSPEC_UNPACK_128BIT))]
15178
-(define_expand "unpacktf_1"
15179
- [(set (match_operand:DF 0 "nonimmediate_operand" "")
15180
- (unspec:DF [(match_operand:TF 1 "register_operand" "")
15182
- UNSPEC_UNPACK_128BIT))]
15186
(define_insn_and_split "unpack<mode>_dm"
15187
[(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m,d,r,m")
15189
Index: gcc/config/rs6000/altivec.h
15190
===================================================================
15191
--- a/src/gcc/config/rs6000/altivec.h (.../tags/gcc_4_8_3_release)
15192
+++ b/src/gcc/config/rs6000/altivec.h (.../branches/gcc-4_8-branch)
15193
@@ -124,6 +124,7 @@
15194
#define vec_vcfux __builtin_vec_vcfux
15195
#define vec_cts __builtin_vec_cts
15196
#define vec_ctu __builtin_vec_ctu
15197
+#define vec_cpsgn __builtin_vec_copysign
15198
#define vec_expte __builtin_vec_expte
15199
#define vec_floor __builtin_vec_floor
15200
#define vec_loge __builtin_vec_loge
15201
@@ -214,8 +215,10 @@
15202
#define vec_lvsl __builtin_vec_lvsl
15203
#define vec_lvsr __builtin_vec_lvsr
15204
#define vec_max __builtin_vec_max
15205
+#define vec_mergee __builtin_vec_vmrgew
15206
#define vec_mergeh __builtin_vec_mergeh
15207
#define vec_mergel __builtin_vec_mergel
15208
+#define vec_mergeo __builtin_vec_vmrgow
15209
#define vec_min __builtin_vec_min
15210
#define vec_mladd __builtin_vec_mladd
15211
#define vec_msum __builtin_vec_msum
15212
@@ -319,6 +322,8 @@
15213
#define vec_sqrt __builtin_vec_sqrt
15214
#define vec_vsx_ld __builtin_vec_vsx_ld
15215
#define vec_vsx_st __builtin_vec_vsx_st
15216
+#define vec_xl __builtin_vec_vsx_ld
15217
+#define vec_xst __builtin_vec_vsx_st
15219
/* Note, xxsldi and xxpermdi were added as __builtin_vsx_<xxx> functions
15220
instead of __builtin_vec_<xxx> */
15221
@@ -336,6 +341,7 @@
15222
#define vec_vadduqm __builtin_vec_vadduqm
15223
#define vec_vbpermq __builtin_vec_vbpermq
15224
#define vec_vclz __builtin_vec_vclz
15225
+#define vec_cntlz __builtin_vec_vclz
15226
#define vec_vclzb __builtin_vec_vclzb
15227
#define vec_vclzd __builtin_vec_vclzd
15228
#define vec_vclzh __builtin_vec_vclzh
15229
Index: gcc/config/rs6000/sysv4.h
15230
===================================================================
15231
--- a/src/gcc/config/rs6000/sysv4.h (.../tags/gcc_4_8_3_release)
15232
+++ b/src/gcc/config/rs6000/sysv4.h (.../branches/gcc-4_8-branch)
15233
@@ -292,7 +292,7 @@
15234
/* An expression for the alignment of a structure field FIELD if the
15235
alignment computed in the usual way is COMPUTED. */
15236
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
15237
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
15238
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
15241
#undef BIGGEST_FIELD_ALIGNMENT
15242
@@ -949,3 +949,27 @@
15243
#define TARGET_USES_SYSV4_OPT 1
15245
#undef DBX_REGISTER_NUMBER
15247
+/* Link -lasan early on the command line. For -static-libasan, don't link
15248
+ it for -shared link, the executable should be compiled with -static-libasan
15249
+ in that case, and for executable link link with --{,no-}whole-archive around
15250
+ it to force everything into the executable. And similarly for -ltsan. */
15251
+#if defined(HAVE_LD_STATIC_DYNAMIC)
15252
+#undef LIBASAN_EARLY_SPEC
15253
+#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
15254
+ "%{static-libasan:%{!shared:" \
15255
+ LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
15256
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
15257
+#undef LIBTSAN_EARLY_SPEC
15258
+#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
15259
+ LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
15260
+ LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
15263
+/* Additional libraries needed by -static-libasan. */
15264
+#undef STATIC_LIBASAN_LIBS
15265
+#define STATIC_LIBASAN_LIBS "-ldl -lpthread"
15267
+/* Additional libraries needed by -static-libtsan. */
15268
+#undef STATIC_LIBTSAN_LIBS
15269
+#define STATIC_LIBTSAN_LIBS "-ldl -lpthread"
15270
Index: gcc/config/arm/arm.c
15271
===================================================================
15272
--- a/src/gcc/config/arm/arm.c (.../tags/gcc_4_8_3_release)
15273
+++ b/src/gcc/config/arm/arm.c (.../branches/gcc-4_8-branch)
15275
static reg_class_t arm_preferred_reload_class (rtx, reg_class_t);
15276
static rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
15277
inline static int thumb1_index_register_rtx_p (rtx, int);
15278
-static bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
15279
static int thumb_far_jump_used_p (void);
15280
static bool thumb_force_lr_save (void);
15281
static unsigned arm_size_return_regs (void);
15282
@@ -24476,9 +24475,13 @@
15283
fputs (":\n", file);
15286
- /* Output ".word .LTHUNKn-7-.LTHUNKPCn". */
15287
+ /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn". */
15288
rtx tem = XEXP (DECL_RTL (function), 0);
15289
- tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
15290
+ /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
15291
+ pipeline offset is four rather than eight. Adjust the offset
15293
+ tem = plus_constant (GET_MODE (tem), tem,
15294
+ TARGET_THUMB1_ONLY ? -3 : -7);
15295
tem = gen_rtx_MINUS (GET_MODE (tem),
15297
gen_rtx_SYMBOL_REF (Pmode,
15298
@@ -27462,4 +27465,13 @@
15302
+/* return TRUE if x is a reference to a value in a constant pool */
15304
+arm_is_constant_pool_ref (rtx x)
15306
+ return (MEM_P (x)
15307
+ && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
15308
+ && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)));
15311
#include "gt-arm.h"
15312
Index: gcc/config/arm/arm.h
15313
===================================================================
15314
--- a/src/gcc/config/arm/arm.h (.../tags/gcc_4_8_3_release)
15315
+++ b/src/gcc/config/arm/arm.h (.../branches/gcc-4_8-branch)
15316
@@ -2082,9 +2082,10 @@
15317
? reverse_condition_maybe_unordered (code) \
15318
: reverse_condition (code))
15320
-/* The arm5 clz instruction returns 32. */
15321
-#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1)
15322
-#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1)
15323
+#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
15324
+ ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
15325
+#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
15326
+ ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
15328
#define CC_STATUS_INIT \
15329
do { cfun->machine->thumb1_cc_insn = NULL_RTX; } while (0)
15330
Index: gcc/config/arm/arm-protos.h
15331
===================================================================
15332
--- a/src/gcc/config/arm/arm-protos.h (.../tags/gcc_4_8_3_release)
15333
+++ b/src/gcc/config/arm/arm-protos.h (.../branches/gcc-4_8-branch)
15335
extern int legitimate_pic_operand_p (rtx);
15336
extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
15337
extern rtx legitimize_tls_address (rtx, rtx);
15338
+extern bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
15339
extern int arm_legitimate_address_outer_p (enum machine_mode, rtx, RTX_CODE, int);
15340
extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
15341
extern bool arm_legitimize_reload_address (rtx *, enum machine_mode, int, int,
15342
@@ -286,4 +287,6 @@
15344
extern void arm_emit_eabi_attribute (const char *, int, int);
15346
+extern bool arm_is_constant_pool_ref (rtx);
15348
#endif /* ! GCC_ARM_PROTOS_H */
15349
Index: gcc/config/arm/constraints.md
15350
===================================================================
15351
--- a/src/gcc/config/arm/constraints.md (.../tags/gcc_4_8_3_release)
15352
+++ b/src/gcc/config/arm/constraints.md (.../branches/gcc-4_8-branch)
15354
;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py
15356
;; The following memory constraints have been used:
15357
-;; in ARM/Thumb-2 state: Q, Ut, Uv, Uy, Un, Um, Us
15358
+;; in ARM/Thumb-2 state: Q, Uh, Ut, Uv, Uy, Un, Um, Us
15359
;; in ARM state: Uq
15360
;; in Thumb state: Uu, Uw
15362
@@ -310,6 +310,12 @@
15363
An address valid for loading/storing register exclusive"
15364
(match_operand 0 "mem_noofs_operand"))
15366
+(define_memory_constraint "Uh"
15368
+ An address suitable for byte and half-word loads which does not point inside a constant pool"
15369
+ (and (match_code "mem")
15370
+ (match_test "arm_legitimate_address_p (GET_MODE (op), XEXP (op, 0), false) && !arm_is_constant_pool_ref (op)")))
15372
(define_memory_constraint "Ut"
15374
In ARM/Thumb-2 state an address valid for loading/storing opaque structure
15375
@@ -356,7 +362,8 @@
15376
(and (match_code "mem")
15377
(match_test "TARGET_ARM
15378
&& arm_legitimate_address_outer_p (GET_MODE (op), XEXP (op, 0),
15379
- SIGN_EXTEND, 0)")))
15381
+ && !arm_is_constant_pool_ref (op)")))
15383
(define_memory_constraint "Q"
15385
Index: gcc/config/arm/arm.md
15386
===================================================================
15387
--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_8_3_release)
15388
+++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_8-branch)
15390
; This can be "a" for ARM, "t" for either of the Thumbs, "32" for
15391
; TARGET_32BIT, "t1" or "t2" to specify a specific Thumb mode. "v6"
15392
; for ARM or Thumb-2 with arm_arch6, and nov6 for ARM without
15393
-; arm_arch6. This attribute is used to compute attribute "enabled",
15394
-; use type "any" to enable an alternative in all cases.
15395
-(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,onlya8,neon_onlya8,nota8,neon_nota8,iwmmxt,iwmmxt2"
15396
+; arm_arch6. "v6t2" for Thumb-2 with arm_arch6. This attribute is
15397
+; used to compute attribute "enabled", use type "any" to enable an
15398
+; alternative in all cases.
15400
+(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,v6t2,onlya8,neon_onlya8,nota8,neon_nota8,iwmmxt,iwmmxt2"
15401
(const_string "any"))
15403
(define_attr "arch_enabled" "no,yes"
15404
@@ -129,6 +131,10 @@
15405
(match_test "TARGET_32BIT && !arm_arch6"))
15406
(const_string "yes")
15408
+ (and (eq_attr "arch" "v6t2")
15409
+ (match_test "TARGET_32BIT && arm_arch6 && arm_arch_thumb2"))
15410
+ (const_string "yes")
15412
(and (eq_attr "arch" "onlya8")
15413
(eq_attr "tune" "cortexa8"))
15414
(const_string "yes")
15415
@@ -4047,7 +4053,7 @@
15416
(define_insn "unaligned_loadhis"
15417
[(set (match_operand:SI 0 "s_register_operand" "=l,r")
15419
- (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")]
15420
+ (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,Uh")]
15421
UNSPEC_UNALIGNED_LOAD)))]
15422
"unaligned_access && TARGET_32BIT"
15423
"ldr%(sh%)\t%0, %1\t@ unaligned"
15424
@@ -4655,7 +4661,7 @@
15426
(define_insn "*arm_zero_extendhisi2_v6"
15427
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
15428
- (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
15429
+ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
15430
"TARGET_ARM && arm_arch6"
15433
@@ -4748,7 +4754,7 @@
15435
(define_insn "*arm_zero_extendqisi2_v6"
15436
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
15437
- (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
15438
+ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uh")))]
15439
"TARGET_ARM && arm_arch6"
15442
@@ -4980,7 +4986,7 @@
15444
(define_insn "*arm_extendhisi2"
15445
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
15446
- (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
15447
+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
15448
"TARGET_ARM && arm_arch4 && !arm_arch6"
15451
@@ -4987,23 +4993,19 @@
15452
ldr%(sh%)\\t%0, %1"
15453
[(set_attr "length" "8,4")
15454
(set_attr "type" "alu_shift,load_byte")
15455
- (set_attr "predicable" "yes")
15456
- (set_attr "pool_range" "*,256")
15457
- (set_attr "neg_pool_range" "*,244")]
15458
+ (set_attr "predicable" "yes")]
15461
;; ??? Check Thumb-2 pool range
15462
(define_insn "*arm_extendhisi2_v6"
15463
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
15464
- (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
15465
+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
15466
"TARGET_32BIT && arm_arch6"
15469
ldr%(sh%)\\t%0, %1"
15470
[(set_attr "type" "simple_alu_shift,load_byte")
15471
- (set_attr "predicable" "yes")
15472
- (set_attr "pool_range" "*,256")
15473
- (set_attr "neg_pool_range" "*,244")]
15474
+ (set_attr "predicable" "yes")]
15477
(define_insn "*arm_extendhisi2addsi"
15478
@@ -5045,9 +5047,7 @@
15479
"TARGET_ARM && arm_arch4"
15480
"ldr%(sb%)\\t%0, %1"
15481
[(set_attr "type" "load_byte")
15482
- (set_attr "predicable" "yes")
15483
- (set_attr "pool_range" "256")
15484
- (set_attr "neg_pool_range" "244")]
15485
+ (set_attr "predicable" "yes")]
15488
(define_expand "extendqisi2"
15489
@@ -5087,9 +5087,7 @@
15490
ldr%(sb%)\\t%0, %1"
15491
[(set_attr "length" "8,4")
15492
(set_attr "type" "alu_shift,load_byte")
15493
- (set_attr "predicable" "yes")
15494
- (set_attr "pool_range" "*,256")
15495
- (set_attr "neg_pool_range" "*,244")]
15496
+ (set_attr "predicable" "yes")]
15499
(define_insn "*arm_extendqisi_v6"
15500
@@ -5101,9 +5099,7 @@
15502
ldr%(sb%)\\t%0, %1"
15503
[(set_attr "type" "simple_alu_shift,load_byte")
15504
- (set_attr "predicable" "yes")
15505
- (set_attr "pool_range" "*,256")
15506
- (set_attr "neg_pool_range" "*,244")]
15507
+ (set_attr "predicable" "yes")]
15510
(define_insn "*arm_extendqisi2addsi"
15511
@@ -6292,8 +6288,8 @@
15513
;; Pattern to recognize insn generated default case above
15514
(define_insn "*movhi_insn_arch4"
15515
- [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,m,r")
15516
- (match_operand:HI 1 "general_operand" "rI,K,r,mi"))]
15517
+ [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,m,r")
15518
+ (match_operand:HI 1 "general_operand" "rI,K,n,r,mi"))]
15521
&& (register_operand (operands[0], HImode)
15522
@@ -6301,17 +6297,20 @@
15524
mov%?\\t%0, %1\\t%@ movhi
15525
mvn%?\\t%0, #%B1\\t%@ movhi
15526
+ movw%?\\t%0, %L1\\t%@ movhi
15527
str%(h%)\\t%1, %0\\t%@ movhi
15528
ldr%(h%)\\t%0, %1\\t%@ movhi"
15529
[(set_attr "predicable" "yes")
15530
- (set_attr "insn" "mov,mvn,*,*")
15531
- (set_attr "pool_range" "*,*,*,256")
15532
- (set_attr "neg_pool_range" "*,*,*,244")
15533
+ (set_attr "insn" "mov,mvn,mov,*,*")
15534
+ (set_attr "pool_range" "*,*,*,*,256")
15535
+ (set_attr "neg_pool_range" "*,*,*,*,244")
15536
+ (set_attr "arch" "*,*,v6t2,*,*")
15537
(set_attr_alternative "type"
15538
[(if_then_else (match_operand 1 "const_int_operand" "")
15539
(const_string "simple_alu_imm" )
15540
(const_string "*"))
15541
(const_string "simple_alu_imm")
15542
+ (const_string "simple_alu_imm")
15543
(const_string "store1")
15544
(const_string "load1")])]
15546
@@ -7630,12 +7629,13 @@
15548
(define_insn "*arm_cmpdi_unsigned"
15549
[(set (reg:CC_CZ CC_REGNUM)
15550
- (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r")
15551
- (match_operand:DI 1 "arm_di_operand" "rDi")))]
15552
+ (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r,r")
15553
+ (match_operand:DI 1 "arm_di_operand" "rDi,rDi")))]
15555
"cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
15556
[(set_attr "conds" "set")
15557
- (set_attr "length" "8")]
15558
+ (set_attr "arch" "a,t2")
15559
+ (set_attr "length" "8,10")]
15562
(define_insn "*arm_cmpdi_zero"
15563
Index: gcc/config/arm/t-rtems-eabi
15564
===================================================================
15565
--- a/src/gcc/config/arm/t-rtems-eabi (.../tags/gcc_4_8_3_release)
15566
+++ b/src/gcc/config/arm/t-rtems-eabi (.../branches/gcc-4_8-branch)
15568
# Custom RTEMS EABI multilibs
15570
-MULTILIB_OPTIONS = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
15571
-MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
15572
+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
15573
+MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m neon vfpv3-d16 fpv4-sp-d16 hard
15575
# Enumeration of multilibs
15577
MULTILIB_EXCEPTIONS =
15578
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
15579
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon
15580
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
15581
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16
15582
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15583
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16
15584
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfloat-abi=hard
15585
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m
15586
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
15587
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon
15588
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
15589
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16
15590
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
15591
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16
15592
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfloat-abi=hard
15593
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a
15594
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
15595
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon
15596
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
15597
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16
15598
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
15599
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16
15600
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfloat-abi=hard
15601
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r
15602
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
15603
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon
15604
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
15605
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16
15606
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15607
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16
15608
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfloat-abi=hard
15609
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m
15610
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon/mfloat-abi=hard
15611
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon
15612
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
15613
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16
15614
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
15615
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16
15616
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfloat-abi=hard
15617
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb
15618
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon/mfloat-abi=hard
15619
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon
15620
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
15621
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16
15622
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15623
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16
15624
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfloat-abi=hard
15625
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m
15626
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon/mfloat-abi=hard
15627
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon
15628
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
15629
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16
15630
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
15631
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16
15632
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfloat-abi=hard
15633
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a
15634
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon/mfloat-abi=hard
15635
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon
15636
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
15637
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16
15638
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
15639
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16
15640
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfloat-abi=hard
15641
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r
15642
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon/mfloat-abi=hard
15643
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon
15644
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
15645
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16
15646
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15647
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16
15648
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfloat-abi=hard
15649
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m
15650
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon/mfloat-abi=hard
15651
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon
15652
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16/mfloat-abi=hard
15653
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16
15654
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16/mfloat-abi=hard
15655
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16
15656
+MULTILIB_EXCEPTIONS += mbig-endian/mfloat-abi=hard
15657
+MULTILIB_EXCEPTIONS += mbig-endian
15658
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
15659
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
15660
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
15661
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16
15662
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15663
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16
15664
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
15665
# MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
15666
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
15667
MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
15668
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
15669
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16
15670
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
15671
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16
15672
MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
15673
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
15674
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
15675
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
15676
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
15677
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16
15678
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
15679
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16
15680
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
15681
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
15682
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
15683
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
15684
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
15685
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16
15686
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15687
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16
15688
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
15689
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
15690
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
15691
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
15692
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
15693
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16
15694
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
15695
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16
15696
MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
15697
# MULTILIB_EXCEPTIONS += mthumb
15698
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
15699
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
15700
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
15701
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16
15702
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15703
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16
15704
MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
15705
MULTILIB_EXCEPTIONS += march=armv6-m
15706
MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
15707
MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
15708
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
15709
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16
15710
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
15711
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16
15712
MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
15713
MULTILIB_EXCEPTIONS += march=armv7-a
15714
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
15715
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
15716
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
15717
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16
15718
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
15719
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16
15720
MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
15721
MULTILIB_EXCEPTIONS += march=armv7-r
15722
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
15723
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
15724
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
15725
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16
15726
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
15727
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16
15728
MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
15729
MULTILIB_EXCEPTIONS += march=armv7-m
15730
MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
15731
MULTILIB_EXCEPTIONS += mfpu=neon
15732
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16/mfloat-abi=hard
15733
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16
15734
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16/mfloat-abi=hard
15735
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16
15736
MULTILIB_EXCEPTIONS += mfloat-abi=hard
15737
Index: gcc/config/pa/pa.md
15738
===================================================================
15739
--- a/src/gcc/config/pa/pa.md (.../tags/gcc_4_8_3_release)
15740
+++ b/src/gcc/config/pa/pa.md (.../branches/gcc-4_8-branch)
15741
@@ -123,7 +123,7 @@
15742
;; type "binary" insns have two input operands (1,2) and one output (0)
15744
(define_attr "type"
15745
- "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"
15746
+ "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"
15747
(const_string "binary"))
15749
(define_attr "pa_combine_type"
15750
@@ -166,7 +166,7 @@
15751
;; For conditional branches. Frame related instructions are not allowed
15752
;; because they confuse the unwind support.
15753
(define_attr "in_branch_delay" "false,true"
15754
- (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
15755
+ (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")
15756
(eq_attr "length" "4")
15757
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
15758
(const_string "true")
15759
@@ -175,7 +175,7 @@
15760
;; Disallow instructions which use the FPU since they will tie up the FPU
15761
;; even if the instruction is nullified.
15762
(define_attr "in_nullified_branch_delay" "false,true"
15763
- (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")
15764
+ (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")
15765
(eq_attr "length" "4")
15766
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
15767
(const_string "true")
15768
@@ -184,7 +184,7 @@
15769
;; For calls and millicode calls. Allow unconditional branches in the
15771
(define_attr "in_call_delay" "false,true"
15772
- (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
15773
+ (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch,trap")
15774
(eq_attr "length" "4")
15775
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
15776
(const_string "true")
15777
@@ -5331,6 +5331,15 @@
15778
[(set_attr "type" "binary,binary")
15779
(set_attr "length" "4,4")])
15781
+;; Trap instructions.
15783
+(define_insn "trap"
15784
+ [(trap_if (const_int 1) (const_int 0))]
15786
+ "{addit|addi,tc},<> 1,%%r0,%%r0"
15787
+ [(set_attr "type" "trap")
15788
+ (set_attr "length" "4")])
15790
;; Clobbering a "register_operand" instead of a match_scratch
15791
;; in operand3 of millicode calls avoids spilling %r1 and
15792
;; produces better code.
15793
Index: gcc/config/pa/pa.c
15794
===================================================================
15795
--- a/src/gcc/config/pa/pa.c (.../tags/gcc_4_8_3_release)
15796
+++ b/src/gcc/config/pa/pa.c (.../branches/gcc-4_8-branch)
15797
@@ -3237,7 +3237,12 @@
15799
&& function_label_operand (x, VOIDmode))
15801
- fputs (size == 8? "\t.dword\tP%" : "\t.word\tP%", asm_out_file);
15802
+ fputs (size == 8? "\t.dword\t" : "\t.word\t", asm_out_file);
15804
+ /* We don't want an OPD when generating fast indirect calls. */
15805
+ if (!TARGET_FAST_INDIRECT_CALLS)
15806
+ fputs ("P%", asm_out_file);
15808
output_addr_const (asm_out_file, x);
15809
fputc ('\n', asm_out_file);
15811
@@ -4160,9 +4165,8 @@
15812
pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
15814
rtx insn = get_last_insn ();
15817
- last_address = 0;
15819
/* pa_expand_epilogue does the dirty work now. We just need
15820
to output the assembler directives which denote the end
15822
@@ -4185,14 +4189,16 @@
15823
if (insn && GET_CODE (insn) == CALL_INSN)
15825
fputs ("\tnop\n", file);
15826
- last_address += 4;
15827
+ extra_nop = true;
15830
+ extra_nop = false;
15832
fputs ("\t.EXIT\n\t.PROCEND\n", file);
15834
if (TARGET_SOM && TARGET_GAS)
15836
- /* We done with this subspace except possibly for some additional
15837
+ /* We are done with this subspace except possibly for some additional
15838
debug information. Forget that we are in this subspace to ensure
15839
that the next function is output in its own subspace. */
15841
@@ -4199,12 +4205,20 @@
15842
cfun->machine->in_nsubspa = 2;
15845
+ /* Thunks do their own insn accounting. */
15846
+ if (cfun->is_thunk)
15849
if (INSN_ADDRESSES_SET_P ())
15851
+ last_address = extra_nop ? 4 : 0;
15852
insn = get_last_nonnote_insn ();
15853
- last_address += INSN_ADDRESSES (INSN_UID (insn));
15854
- if (INSN_P (insn))
15855
- last_address += insn_default_length (insn);
15858
+ last_address += INSN_ADDRESSES (INSN_UID (insn));
15859
+ if (INSN_P (insn))
15860
+ last_address += insn_default_length (insn);
15862
last_address = ((last_address + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1)
15863
& ~(FUNCTION_BOUNDARY / BITS_PER_UNIT - 1));
15865
@@ -8270,8 +8284,7 @@
15866
xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
15867
xoperands[2] = GEN_INT (delta);
15869
- ASM_OUTPUT_LABEL (file, XSTR (xoperands[1], 0));
15870
- fprintf (file, "\t.PROC\n\t.CALLINFO FRAME=0,NO_CALLS\n\t.ENTRY\n");
15871
+ final_start_function (emit_barrier (), file, 1);
15873
/* Output the thunk. We know that the function is in the same
15874
translation unit (i.e., the same space) as the thunk, and that
15875
@@ -8301,12 +8314,16 @@
15876
|| ((DECL_SECTION_NAME (thunk_fndecl)
15877
== DECL_SECTION_NAME (function))
15878
&& last_address < 262132)))
15879
+ /* In this case, we need to be able to reach the start of
15880
+ the stub table even though the function is likely closer
15881
+ and can be jumped to directly. */
15882
|| (targetm_common.have_named_sections
15883
&& DECL_SECTION_NAME (thunk_fndecl) == NULL
15884
&& DECL_SECTION_NAME (function) == NULL
15885
- && last_address < 262132)
15886
+ && total_code_bytes < MAX_PCREL17F_OFFSET)
15888
|| (!targetm_common.have_named_sections
15889
- && last_address < 262132))))
15890
+ && total_code_bytes < MAX_PCREL17F_OFFSET))))
15893
output_asm_insn ("addil L'%2,%%r26", xoperands);
15894
@@ -8477,17 +8494,8 @@
15898
- fprintf (file, "\t.EXIT\n\t.PROCEND\n");
15899
+ final_end_function ();
15901
- if (TARGET_SOM && TARGET_GAS)
15903
- /* We done with this subspace except possibly for some additional
15904
- debug information. Forget that we are in this subspace to ensure
15905
- that the next function is output in its own subspace. */
15906
- in_section = NULL;
15907
- cfun->machine->in_nsubspa = 2;
15910
if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
15912
switch_to_section (data_section);
15913
Index: gcc/tree-vect-slp.c
15914
===================================================================
15915
--- a/src/gcc/tree-vect-slp.c (.../tags/gcc_4_8_3_release)
15916
+++ b/src/gcc/tree-vect-slp.c (.../branches/gcc-4_8-branch)
15917
@@ -1837,7 +1837,10 @@
15918
&& (stmt_vinfo = vinfo_for_stmt (use_stmt))
15919
&& !STMT_SLP_TYPE (stmt_vinfo)
15920
&& (STMT_VINFO_RELEVANT (stmt_vinfo)
15921
- || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo)))
15922
+ || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo))
15923
+ || (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)
15924
+ && STMT_VINFO_RELATED_STMT (stmt_vinfo)
15925
+ && !STMT_SLP_TYPE (vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_vinfo)))))
15926
&& !(gimple_code (use_stmt) == GIMPLE_PHI
15927
&& STMT_VINFO_DEF_TYPE (stmt_vinfo)
15928
== vect_reduction_def))
15929
@@ -2377,13 +2380,21 @@
15930
neutral_op = build_int_cst (TREE_TYPE (op), -1);
15935
- def_stmt = SSA_NAME_DEF_STMT (op);
15936
- loop = (gimple_bb (stmt))->loop_father;
15937
- neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
15938
- loop_preheader_edge (loop));
15940
+ /* For MIN/MAX we don't have an easy neutral operand but
15941
+ the initial values can be used fine here. Only for
15942
+ a reduction chain we have to force a neutral element. */
15945
+ if (!GROUP_FIRST_ELEMENT (stmt_vinfo))
15946
+ neutral_op = NULL;
15949
+ def_stmt = SSA_NAME_DEF_STMT (op);
15950
+ loop = (gimple_bb (stmt))->loop_father;
15951
+ neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
15952
+ loop_preheader_edge (loop));
15958
Index: gcc/convert.c
15959
===================================================================
15960
--- a/src/gcc/convert.c (.../tags/gcc_4_8_3_release)
15961
+++ b/src/gcc/convert.c (.../branches/gcc-4_8-branch)
15963
enum built_in_function fcode = builtin_mathfn_code (expr);
15964
tree itype = TREE_TYPE (expr);
15966
+ if (TREE_CODE (expr) == COMPOUND_EXPR)
15968
+ tree t = convert_to_real (type, TREE_OPERAND (expr, 1));
15969
+ if (t == TREE_OPERAND (expr, 1))
15971
+ return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
15972
+ TREE_OPERAND (expr, 0), t);
15975
/* Disable until we figure out how to decide whether the functions are
15976
present in runtime. */
15977
/* Convert (float)sqrt((double)x) where x is float into sqrtf(x) */
15978
@@ -366,6 +375,15 @@
15979
return error_mark_node;
15982
+ if (ex_form == COMPOUND_EXPR)
15984
+ tree t = convert_to_integer (type, TREE_OPERAND (expr, 1));
15985
+ if (t == TREE_OPERAND (expr, 1))
15987
+ return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
15988
+ TREE_OPERAND (expr, 0), t);
15991
/* Convert e.g. (long)round(d) -> lround(d). */
15992
/* If we're converting to char, we may encounter differing behavior
15993
between converting from double->char vs double->long->char.
15994
@@ -854,6 +872,14 @@
15996
if (TYPE_MAIN_VARIANT (elt_type) == TYPE_MAIN_VARIANT (subtype))
15998
+ else if (TREE_CODE (expr) == COMPOUND_EXPR)
16000
+ tree t = convert_to_complex (type, TREE_OPERAND (expr, 1));
16001
+ if (t == TREE_OPERAND (expr, 1))
16003
+ return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR,
16004
+ TREE_TYPE (t), TREE_OPERAND (expr, 0), t);
16006
else if (TREE_CODE (expr) == COMPLEX_EXPR)
16007
return fold_build2 (COMPLEX_EXPR, type,
16008
convert (subtype, TREE_OPERAND (expr, 0)),
16009
Index: gcc/regcprop.c
16010
===================================================================
16011
--- a/src/gcc/regcprop.c (.../tags/gcc_4_8_3_release)
16012
+++ b/src/gcc/regcprop.c (.../branches/gcc-4_8-branch)
16013
@@ -1039,7 +1039,17 @@
16014
but instead among CLOBBERs on the CALL_INSN, we could wrongly
16015
assume the value in it is still live. */
16016
if (ksvd.ignore_set_reg)
16017
- note_stores (PATTERN (insn), kill_clobbered_value, vd);
16019
+ note_stores (PATTERN (insn), kill_clobbered_value, vd);
16020
+ for (exp = CALL_INSN_FUNCTION_USAGE (insn);
16022
+ exp = XEXP (exp, 1))
16024
+ rtx x = XEXP (exp, 0);
16025
+ if (GET_CODE (x) == CLOBBER)
16026
+ kill_value (SET_DEST (x), vd);
16031
/* Notice stores. */
16032
Index: gcc/graphite-interchange.c
16033
===================================================================
16034
--- a/src/gcc/graphite-interchange.c (.../tags/gcc_4_8_3_release)
16035
+++ b/src/gcc/graphite-interchange.c (.../branches/gcc-4_8-branch)
16037
#include <isl/ilp.h>
16038
#include <cloog/cloog.h>
16039
#include <cloog/isl/domain.h>
16040
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
16041
+#include <isl/deprecated/int.h>
16042
+#include <isl/deprecated/aff_int.h>
16043
+#include <isl/deprecated/ilp_int.h>
16044
+#include <isl/deprecated/constraint_int.h>
16048
#include "system.h"
16049
#include "coretypes.h"
16050
Index: libobjc/encoding.c
16051
===================================================================
16052
--- a/src/libobjc/encoding.c (.../tags/gcc_4_8_3_release)
16053
+++ b/src/libobjc/encoding.c (.../branches/gcc-4_8-branch)
16054
@@ -192,6 +192,8 @@
16055
? MAX (MAX (COMPUTED, SPECIFIED), 64) \
16056
: MAX (COMPUTED, SPECIFIED));})
16058
+#define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) \
16059
+ (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)
16061
/* Skip a variable name, enclosed in quotes ("). */
16063
Index: libobjc/ChangeLog
16064
===================================================================
16065
--- a/src/libobjc/ChangeLog (.../tags/gcc_4_8_3_release)
16066
+++ b/src/libobjc/ChangeLog (.../branches/gcc-4_8-branch)
16068
+2014-07-27 Ulrich Weigand <uweigand@de.ibm.com>
16071
+ * encoding.c (rs6000_special_adjust_field_align_p): Use definition
16072
+ that matches the 4.8 branch ABI.
16074
+2014-07-27 Alan Modra <amodra@gmail.com>
16075
+ Matthias Klose <doko@ubuntu.com>
16079
+ * encoding.c: Define rs6000_special_adjust_field_align_p.
16081
2014-05-22 Release Manager
16083
* GCC 4.8.3 released.
16084
Index: libgfortran/m4/in_pack.m4
16085
===================================================================
16086
--- a/src/libgfortran/m4/in_pack.m4 (.../tags/gcc_4_8_3_release)
16087
+++ b/src/libgfortran/m4/in_pack.m4 (.../branches/gcc-4_8-branch)
16089
return source->base_addr;
16091
/* Allocate storage for the destination. */
16092
- destptr = ('rtype_name` *)xmalloc (ssize * sizeof ('rtype_name`));
16093
+ destptr = xmallocarray (ssize, sizeof ('rtype_name`));
16095
src = source->base_addr;
16096
stride0 = stride[0];
16097
Index: libgfortran/m4/pack.m4
16098
===================================================================
16099
--- a/src/libgfortran/m4/pack.m4 (.../tags/gcc_4_8_3_release)
16100
+++ b/src/libgfortran/m4/pack.m4 (.../branches/gcc-4_8-branch)
16101
@@ -168,8 +168,8 @@
16105
- /* xmalloc allocates a single byte for zero size. */
16106
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * total);
16107
+ /* xmallocarray allocates a single byte for zero size. */
16108
+ ret->base_addr = xmallocarray (total, sizeof ('rtype_name`));
16112
Index: libgfortran/m4/spread.m4
16113
===================================================================
16114
--- a/src/libgfortran/m4/spread.m4 (.../tags/gcc_4_8_3_release)
16115
+++ b/src/libgfortran/m4/spread.m4 (.../branches/gcc-4_8-branch)
16116
@@ -102,8 +102,8 @@
16120
- /* xmalloc allocates a single byte for zero size. */
16121
- ret->base_addr = xmalloc (rs * sizeof('rtype_name`));
16122
+ /* xmallocarray allocates a single byte for zero size. */
16123
+ ret->base_addr = xmallocarray (rs, sizeof('rtype_name`));
16127
@@ -245,7 +245,7 @@
16129
if (ret->base_addr == NULL)
16131
- ret->base_addr = xmalloc (ncopies * sizeof ('rtype_name`));
16132
+ ret->base_addr = xmallocarray (ncopies, sizeof ('rtype_name`));
16134
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
16136
Index: libgfortran/m4/transpose.m4
16137
===================================================================
16138
--- a/src/libgfortran/m4/transpose.m4 (.../tags/gcc_4_8_3_release)
16139
+++ b/src/libgfortran/m4/transpose.m4 (.../branches/gcc-4_8-branch)
16141
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
16142
GFC_DESCRIPTOR_EXTENT(source, 1));
16144
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) ret));
16145
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
16146
+ sizeof ('rtype_name`));
16148
} else if (unlikely (compile_options.bounds_check))
16150
Index: libgfortran/m4/iforeach.m4
16151
===================================================================
16152
--- a/src/libgfortran/m4/iforeach.m4 (.../tags/gcc_4_8_3_release)
16153
+++ b/src/libgfortran/m4/iforeach.m4 (.../branches/gcc-4_8-branch)
16155
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16156
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16157
retarray->offset = 0;
16158
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
16159
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
16163
@@ -133,7 +133,7 @@
16164
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16165
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16166
retarray->offset = 0;
16167
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
16168
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
16172
@@ -264,7 +264,7 @@
16173
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16174
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16175
retarray->offset = 0;
16176
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
16177
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
16179
else if (unlikely (compile_options.bounds_check))
16181
Index: libgfortran/m4/eoshift1.m4
16182
===================================================================
16183
--- a/src/libgfortran/m4/eoshift1.m4 (.../tags/gcc_4_8_3_release)
16184
+++ b/src/libgfortran/m4/eoshift1.m4 (.../branches/gcc-4_8-branch)
16185
@@ -106,8 +106,8 @@
16186
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
16189
- /* xmalloc allocates a single byte for zero size. */
16190
- ret->base_addr = xmalloc (size * arraysize);
16191
+ /* xmallocarray allocates a single byte for zero size. */
16192
+ ret->base_addr = xmallocarray (arraysize, size);
16195
else if (unlikely (compile_options.bounds_check))
16196
Index: libgfortran/m4/eoshift3.m4
16197
===================================================================
16198
--- a/src/libgfortran/m4/eoshift3.m4 (.../tags/gcc_4_8_3_release)
16199
+++ b/src/libgfortran/m4/eoshift3.m4 (.../branches/gcc-4_8-branch)
16204
- ret->base_addr = xmalloc (size * arraysize);
16205
+ ret->base_addr = xmallocarray (arraysize, size);
16207
ret->dtype = array->dtype;
16208
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
16209
@@ -108,8 +108,8 @@
16210
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
16213
- /* xmalloc allocates a single byte for zero size. */
16214
- ret->base_addr = xmalloc (size * arraysize);
16215
+ /* xmallocarray allocates a single byte for zero size. */
16216
+ ret->base_addr = xmallocarray (arraysize, size);
16219
else if (unlikely (compile_options.bounds_check))
16220
Index: libgfortran/m4/shape.m4
16221
===================================================================
16222
--- a/src/libgfortran/m4/shape.m4 (.../tags/gcc_4_8_3_release)
16223
+++ b/src/libgfortran/m4/shape.m4 (.../branches/gcc-4_8-branch)
16226
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
16228
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * rank);
16229
+ ret->base_addr = xmallocarray (rank, sizeof ('rtype_name`));
16232
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
16233
Index: libgfortran/m4/cshift1.m4
16234
===================================================================
16235
--- a/src/libgfortran/m4/cshift1.m4 (.../tags/gcc_4_8_3_release)
16236
+++ b/src/libgfortran/m4/cshift1.m4 (.../branches/gcc-4_8-branch)
16241
- ret->base_addr = xmalloc (size * arraysize);
16242
+ ret->base_addr = xmallocarray (arraysize, size);
16244
ret->dtype = array->dtype;
16245
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
16246
Index: libgfortran/m4/matmull.m4
16247
===================================================================
16248
--- a/src/libgfortran/m4/matmull.m4 (.../tags/gcc_4_8_3_release)
16249
+++ b/src/libgfortran/m4/matmull.m4 (.../branches/gcc-4_8-branch)
16253
retarray->base_addr
16254
- = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
16255
+ = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
16256
retarray->offset = 0;
16258
else if (unlikely (compile_options.bounds_check))
16259
Index: libgfortran/m4/bessel.m4
16260
===================================================================
16261
--- a/src/libgfortran/m4/bessel.m4 (.../tags/gcc_4_8_3_release)
16262
+++ b/src/libgfortran/m4/bessel.m4 (.../branches/gcc-4_8-branch)
16265
size_t size = n2 < n1 ? 0 : n2-n1+1;
16266
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
16267
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
16268
+ ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
16272
@@ -123,7 +123,7 @@
16274
size_t size = n2 < n1 ? 0 : n2-n1+1;
16275
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
16276
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
16277
+ ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
16281
@@ -163,7 +163,7 @@
16283
x2rev = GFC_REAL_'rtype_kind`_LITERAL(2.)/x;
16285
- for (i = 2; i <= n1+n2; i++)
16286
+ for (i = 2; i <= n2 - n1; i++)
16288
#if defined('rtype_name`_INFINITY)
16289
if (unlikely (last2 == -'rtype_name`_INFINITY))
16290
Index: libgfortran/m4/unpack.m4
16291
===================================================================
16292
--- a/src/libgfortran/m4/unpack.m4 (.../tags/gcc_4_8_3_release)
16293
+++ b/src/libgfortran/m4/unpack.m4 (.../branches/gcc-4_8-branch)
16294
@@ -100,7 +100,7 @@
16298
- ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
16299
+ ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
16303
@@ -245,7 +245,7 @@
16307
- ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
16308
+ ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
16312
Index: libgfortran/m4/reshape.m4
16313
===================================================================
16314
--- a/src/libgfortran/m4/reshape.m4 (.../tags/gcc_4_8_3_release)
16315
+++ b/src/libgfortran/m4/reshape.m4 (.../branches/gcc-4_8-branch)
16316
@@ -115,11 +115,11 @@
16319
if (unlikely (rs < 1))
16323
- alloc_size = rs * sizeof ('rtype_name`);
16326
- ret->base_addr = xmalloc (alloc_size);
16327
+ ret->base_addr = xmallocarray (alloc_size, sizeof ('rtype_name`));
16328
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
16331
Index: libgfortran/m4/ifunction_logical.m4
16332
===================================================================
16333
--- a/src/libgfortran/m4/ifunction_logical.m4 (.../tags/gcc_4_8_3_release)
16334
+++ b/src/libgfortran/m4/ifunction_logical.m4 (.../branches/gcc-4_8-branch)
16336
retarray->offset = 0;
16337
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16339
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16340
- * extent[rank-1];
16341
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16343
if (alloc_size == 0)
16349
- retarray->base_addr = xmalloc (alloc_size);
16350
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
16354
Index: libgfortran/m4/ifunction.m4
16355
===================================================================
16356
--- a/src/libgfortran/m4/ifunction.m4 (.../tags/gcc_4_8_3_release)
16357
+++ b/src/libgfortran/m4/ifunction.m4 (.../branches/gcc-4_8-branch)
16359
retarray->offset = 0;
16360
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16362
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16363
- * extent[rank-1];
16364
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16366
- retarray->base_addr = xmalloc (alloc_size);
16367
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
16368
if (alloc_size == 0)
16370
/* Make sure we have a zero-sized array. */
16371
@@ -260,8 +259,7 @@
16375
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16376
- * extent[rank-1];
16377
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16379
retarray->offset = 0;
16380
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16381
@@ -273,7 +271,7 @@
16385
- retarray->base_addr = xmalloc (alloc_size);
16386
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
16390
@@ -417,8 +415,7 @@
16391
retarray->offset = 0;
16392
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16394
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16395
- * extent[rank-1];
16396
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16398
if (alloc_size == 0)
16400
@@ -427,7 +424,7 @@
16404
- retarray->base_addr = xmalloc (alloc_size);
16405
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
16409
Index: libgfortran/m4/matmul.m4
16410
===================================================================
16411
--- a/src/libgfortran/m4/matmul.m4 (.../tags/gcc_4_8_3_release)
16412
+++ b/src/libgfortran/m4/matmul.m4 (.../branches/gcc-4_8-branch)
16413
@@ -125,7 +125,7 @@
16416
retarray->base_addr
16417
- = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
16418
+ = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
16419
retarray->offset = 0;
16421
else if (unlikely (compile_options.bounds_check))
16422
Index: libgfortran/configure
16423
===================================================================
16424
--- a/src/libgfortran/configure (.../tags/gcc_4_8_3_release)
16425
+++ b/src/libgfortran/configure (.../branches/gcc-4_8-branch)
16426
@@ -2595,6 +2595,7 @@
16427
as_fn_append ac_func_list " getegid"
16428
as_fn_append ac_func_list " secure_getenv"
16429
as_fn_append ac_func_list " __secure_getenv"
16430
+as_fn_append ac_func_list " strtok_r"
16431
as_fn_append ac_header_list " math.h"
16432
# Check that the precious variables saved in the cache have kept the same
16434
@@ -12339,7 +12340,7 @@
16435
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16436
lt_status=$lt_dlunknown
16437
cat > conftest.$ac_ext <<_LT_EOF
16438
-#line 12342 "configure"
16439
+#line 12343 "configure"
16440
#include "confdefs.h"
16443
@@ -12445,7 +12446,7 @@
16444
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16445
lt_status=$lt_dlunknown
16446
cat > conftest.$ac_ext <<_LT_EOF
16447
-#line 12448 "configure"
16448
+#line 12449 "configure"
16449
#include "confdefs.h"
16452
@@ -16506,6 +16507,8 @@
16461
Index: libgfortran/runtime/in_pack_generic.c
16462
===================================================================
16463
--- a/src/libgfortran/runtime/in_pack_generic.c (.../tags/gcc_4_8_3_release)
16464
+++ b/src/libgfortran/runtime/in_pack_generic.c (.../branches/gcc-4_8-branch)
16465
@@ -180,7 +180,7 @@
16466
return source->base_addr;
16468
/* Allocate storage for the destination. */
16469
- destptr = xmalloc (ssize * size);
16470
+ destptr = xmallocarray (ssize, size);
16471
dest = (char *)destptr;
16472
src = source->base_addr;
16473
stride0 = stride[0] * size;
16474
Index: libgfortran/runtime/memory.c
16475
===================================================================
16476
--- a/src/libgfortran/runtime/memory.c (.../tags/gcc_4_8_3_release)
16477
+++ b/src/libgfortran/runtime/memory.c (.../branches/gcc-4_8-branch)
16480
#include "libgfortran.h"
16481
#include <stdlib.h>
16482
+#include <errno.h>
16485
+#define SIZE_MAX ((size_t)-1)
16492
@@ -44,12 +49,34 @@
16497
+xmallocarray (size_t nmemb, size_t size)
16501
+ if (!nmemb || !size)
16502
+ size = nmemb = 1;
16503
+ else if (nmemb > SIZE_MAX / size)
16506
+ os_error ("Integer overflow in xmallocarray");
16509
+ p = malloc (nmemb * size);
16512
+ os_error ("Memory allocation failed in xmallocarray");
16518
/* calloc wrapper that aborts on error. */
16521
xcalloc (size_t nmemb, size_t size)
16523
- if (nmemb * size == 0)
16524
+ if (!nmemb || !size)
16527
void *p = calloc (nmemb, size);
16528
Index: libgfortran/runtime/convert_char.c
16529
===================================================================
16530
--- a/src/libgfortran/runtime/convert_char.c (.../tags/gcc_4_8_3_release)
16531
+++ b/src/libgfortran/runtime/convert_char.c (.../branches/gcc-4_8-branch)
16533
gfc_charlen_type i, l;
16535
l = len > 0 ? len : 0;
16536
- *dst = xmalloc ((l + 1) * sizeof (gfc_char4_t));
16537
+ *dst = xmallocarray ((l + 1), sizeof (gfc_char4_t));
16539
for (i = 0; i < l; i++)
16540
(*dst)[i] = src[i];
16542
gfc_charlen_type i, l;
16544
l = len > 0 ? len : 0;
16545
- *dst = xmalloc ((l + 1) * sizeof (unsigned char));
16546
+ *dst = xmalloc (l + 1);
16548
for (i = 0; i < l; i++)
16549
(*dst)[i] = src[i];
16550
Index: libgfortran/runtime/environ.c
16551
===================================================================
16552
--- a/src/libgfortran/runtime/environ.c (.../tags/gcc_4_8_3_release)
16553
+++ b/src/libgfortran/runtime/environ.c (.../branches/gcc-4_8-branch)
16554
@@ -833,7 +833,7 @@
16558
- elist = xmalloc (unit_count * sizeof (exception_t));
16559
+ elist = xmallocarray (unit_count, sizeof (exception_t));
16563
Index: libgfortran/runtime/main.c
16564
===================================================================
16565
--- a/src/libgfortran/runtime/main.c (.../tags/gcc_4_8_3_release)
16566
+++ b/src/libgfortran/runtime/main.c (.../branches/gcc-4_8-branch)
16567
@@ -153,6 +153,16 @@
16571
+#ifndef HAVE_STRTOK_R
16573
+gfstrtok_r (char *str, const char *delim,
16574
+ char **saveptr __attribute__ ((unused)))
16576
+ return strtok (str, delim);
16578
+#define strtok_r gfstrtok_r
16581
char *addr2line_path;
16583
/* Find addr2line and store the path. */
16584
@@ -161,30 +171,32 @@
16585
find_addr2line (void)
16588
-#define A2L_LEN 10
16589
+#define A2L_LEN 11
16590
char *path = secure_getenv ("PATH");
16593
+ char *tp = strdup (path);
16596
size_t n = strlen (path);
16597
- char ap[n + 1 + A2L_LEN];
16599
- for (size_t i = 0; i < n; i++)
16600
+ char *ap = xmalloc (n + A2L_LEN);
16602
+ for (char *str = tp;; str = NULL)
16604
- if (path[i] != ':')
16605
- ap[ai++] = path[i];
16607
+ char *token = strtok_r (str, ":", &saveptr);
16610
+ size_t toklen = strlen (token);
16611
+ memcpy (ap, token, toklen);
16612
+ memcpy (ap + toklen, "/addr2line", A2L_LEN);
16613
+ if (access (ap, R_OK|X_OK) == 0)
16616
- memcpy (ap + ai, "addr2line", A2L_LEN);
16617
- if (access (ap, R_OK|X_OK) == 0)
16619
- addr2line_path = strdup (ap);
16624
+ addr2line_path = strdup (ap);
16633
Index: libgfortran/intrinsics/string_intrinsics_inc.c
16634
===================================================================
16635
--- a/src/libgfortran/intrinsics/string_intrinsics_inc.c (.../tags/gcc_4_8_3_release)
16636
+++ b/src/libgfortran/intrinsics/string_intrinsics_inc.c (.../branches/gcc-4_8-branch)
16637
@@ -164,7 +164,7 @@
16640
/* Allocate space for result string. */
16641
- *dest = xmalloc (*len * sizeof (CHARTYPE));
16642
+ *dest = xmallocarray (*len, sizeof (CHARTYPE));
16644
/* Copy string if necessary. */
16645
memcpy (*dest, src, *len * sizeof (CHARTYPE));
16646
@@ -442,7 +442,7 @@
16647
*dest = &zero_length_string;
16650
- CHARTYPE *tmp = xmalloc (*rlen * sizeof (CHARTYPE));
16651
+ CHARTYPE *tmp = xmallocarray (*rlen, sizeof (CHARTYPE));
16652
memcpy (tmp, res, reslen * sizeof (CHARTYPE));
16653
MEMSET (&tmp[reslen], ' ', *rlen - reslen);
16655
Index: libgfortran/intrinsics/pack_generic.c
16656
===================================================================
16657
--- a/src/libgfortran/intrinsics/pack_generic.c (.../tags/gcc_4_8_3_release)
16658
+++ b/src/libgfortran/intrinsics/pack_generic.c (.../branches/gcc-4_8-branch)
16659
@@ -152,8 +152,8 @@
16660
GFC_DIMENSION_SET(ret->dim[0], 0, total-1, 1);
16663
- /* xmalloc allocates a single byte for zero size. */
16664
- ret->base_addr = xmalloc (size * total);
16665
+ /* xmallocarray allocates a single byte for zero size. */
16666
+ ret->base_addr = xmallocarray (total, size);
16669
return; /* In this case, nothing remains to be done. */
16670
@@ -519,7 +519,7 @@
16674
- ret->base_addr = xmalloc (size * total);
16675
+ ret->base_addr = xmallocarray (total, size);
16679
Index: libgfortran/intrinsics/transpose_generic.c
16680
===================================================================
16681
--- a/src/libgfortran/intrinsics/transpose_generic.c (.../tags/gcc_4_8_3_release)
16682
+++ b/src/libgfortran/intrinsics/transpose_generic.c (.../branches/gcc-4_8-branch)
16684
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
16685
GFC_DESCRIPTOR_EXTENT(source, 1));
16687
- ret->base_addr = xmalloc (size * size0 ((array_t*)ret));
16688
+ ret->base_addr = xmallocarray (size0 ((array_t*)ret), size);
16691
else if (unlikely (compile_options.bounds_check))
16692
Index: libgfortran/intrinsics/cshift0.c
16693
===================================================================
16694
--- a/src/libgfortran/intrinsics/cshift0.c (.../tags/gcc_4_8_3_release)
16695
+++ b/src/libgfortran/intrinsics/cshift0.c (.../branches/gcc-4_8-branch)
16697
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
16700
- /* xmalloc allocates a single byte for zero size. */
16701
- ret->base_addr = xmalloc (size * arraysize);
16702
+ /* xmallocarray allocates a single byte for zero size. */
16703
+ ret->base_addr = xmallocarray (arraysize, size);
16705
else if (unlikely (compile_options.bounds_check))
16707
Index: libgfortran/intrinsics/ctime.c
16708
===================================================================
16709
--- a/src/libgfortran/intrinsics/ctime.c (.../tags/gcc_4_8_3_release)
16710
+++ b/src/libgfortran/intrinsics/ctime.c (.../branches/gcc-4_8-branch)
16711
@@ -31,31 +31,53 @@
16712
#include <string.h>
16715
-/* strftime-like function that fills a C string with %c format which
16716
- is identical to ctime in the default locale. As ctime and ctime_r
16717
- are poorly specified and their usage not recommended, the
16718
- implementation instead uses strftime. */
16719
+/* Maximum space a ctime-like string might need. A "normal" ctime
16720
+ string is 26 bytes, and in our case 24 bytes as we don't include
16721
+ the trailing newline and null. However, the longest possible year
16722
+ number is -2,147,481,748 (1900 - 2,147,483,648, since tm_year is a
16723
+ 32-bit signed integer) so an extra 7 bytes are needed. */
16724
+#define CTIME_BUFSZ 31
16727
-strctime (char *s, size_t max, const time_t *timep)
16729
+/* Thread-safe ctime-like function that fills a Fortran
16730
+ string. ctime_r is a portability headache and marked as obsolescent
16731
+ in POSIX 2008, which recommends strftime in its place. However,
16732
+ strftime(..., "%c",...) doesn't produce ctime-like output on
16733
+ MinGW, so do it manually with snprintf. */
16736
+gf_ctime (char *s, size_t max, const time_t timev)
16740
+ char buf[CTIME_BUFSZ + 1];
16741
/* Some targets provide a localtime_r based on a draft of the POSIX
16742
standard where the return type is int rather than the
16743
standardized struct tm*. */
16744
- __builtin_choose_expr (__builtin_classify_type (localtime_r (timep, <m))
16745
+ __builtin_choose_expr (__builtin_classify_type (localtime_r (&timev, <m))
16747
- failed = localtime_r (timep, <m) == NULL,
16748
- failed = localtime_r (timep, <m) != 0);
16749
+ failed = localtime_r (&timev, <m) == NULL,
16750
+ failed = localtime_r (&timev, <m) != 0);
16753
- return strftime (s, max, "%c", <m);
16755
+ int n = snprintf (buf, sizeof (buf),
16756
+ "%3.3s %3.3s%3d %.2d:%.2d:%.2d %d",
16757
+ "SunMonTueWedThuFriSat" + ltm.tm_wday * 3,
16758
+ "JanFebMarAprMayJunJulAugSepOctNovDec" + ltm.tm_mon * 3,
16759
+ ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec,
16760
+ 1900 + ltm.tm_year);
16763
+ if ((size_t) n <= max)
16765
+ cf_strcpy (s, max, buf);
16769
+ memset (s, ' ', max);
16773
-/* In the default locale, the date and time representation fits in 26
16774
- bytes. However, other locales might need more space. */
16777
extern void fdate (char **, gfc_charlen_type *);
16778
export_proto(fdate);
16780
fdate (char ** date, gfc_charlen_type * date_len)
16782
time_t now = time(NULL);
16783
- *date = xmalloc (CSZ);
16784
- *date_len = strctime (*date, CSZ, &now);
16785
+ *date = xmalloc (CTIME_BUFSZ);
16786
+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
16791
fdate_sub (char * date, gfc_charlen_type date_len)
16793
time_t now = time(NULL);
16794
- char *s = xmalloc (date_len + 1);
16795
- size_t n = strctime (s, date_len + 1, &now);
16796
- fstrcpy (date, date_len, s, n);
16798
+ gf_ctime (date, date_len, now);
16803
PREFIX(ctime) (char ** date, gfc_charlen_type * date_len, GFC_INTEGER_8 t)
16806
- *date = xmalloc (CSZ);
16807
- *date_len = strctime (*date, CSZ, &now);
16808
+ *date = xmalloc (CTIME_BUFSZ);
16809
+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
16813
@@ -103,8 +122,5 @@
16814
ctime_sub (GFC_INTEGER_8 * t, char * date, gfc_charlen_type date_len)
16817
- char *s = xmalloc (date_len + 1);
16818
- size_t n = strctime (s, date_len + 1, &now);
16819
- fstrcpy (date, date_len, s, n);
16821
+ gf_ctime (date, date_len, now);
16823
Index: libgfortran/intrinsics/spread_generic.c
16824
===================================================================
16825
--- a/src/libgfortran/intrinsics/spread_generic.c (.../tags/gcc_4_8_3_release)
16826
+++ b/src/libgfortran/intrinsics/spread_generic.c (.../branches/gcc-4_8-branch)
16827
@@ -100,7 +100,7 @@
16828
GFC_DIMENSION_SET(ret->dim[n], 0, ub, stride);
16831
- ret->base_addr = xmalloc (rs * size);
16832
+ ret->base_addr = xmallocarray (rs, size);
16836
@@ -245,7 +245,7 @@
16838
if (ret->base_addr == NULL)
16840
- ret->base_addr = xmalloc (ncopies * size);
16841
+ ret->base_addr = xmallocarray (ncopies, size);
16843
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
16845
Index: libgfortran/intrinsics/unpack_generic.c
16846
===================================================================
16847
--- a/src/libgfortran/intrinsics/unpack_generic.c (.../tags/gcc_4_8_3_release)
16848
+++ b/src/libgfortran/intrinsics/unpack_generic.c (.../branches/gcc-4_8-branch)
16849
@@ -125,7 +125,7 @@
16853
- ret->base_addr = xmalloc (rs * size);
16854
+ ret->base_addr = xmallocarray (rs, size);
16858
Index: libgfortran/intrinsics/eoshift0.c
16859
===================================================================
16860
--- a/src/libgfortran/intrinsics/eoshift0.c (.../tags/gcc_4_8_3_release)
16861
+++ b/src/libgfortran/intrinsics/eoshift0.c (.../branches/gcc-4_8-branch)
16866
- /* xmalloc allocates a single byte for zero size. */
16867
- ret->base_addr = xmalloc (size * arraysize);
16868
+ /* xmallocarray allocates a single byte for zero size. */
16869
+ ret->base_addr = xmallocarray (arraysize, size);
16871
else if (unlikely (compile_options.bounds_check))
16873
Index: libgfortran/intrinsics/eoshift2.c
16874
===================================================================
16875
--- a/src/libgfortran/intrinsics/eoshift2.c (.../tags/gcc_4_8_3_release)
16876
+++ b/src/libgfortran/intrinsics/eoshift2.c (.../branches/gcc-4_8-branch)
16879
ret->dtype = array->dtype;
16881
- /* xmalloc allocates a single byte for zero size. */
16882
- ret->base_addr = xmalloc (size * arraysize);
16883
+ /* xmallocarray allocates a single byte for zero size. */
16884
+ ret->base_addr = xmallocarray (arraysize, size);
16886
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
16888
Index: libgfortran/intrinsics/reshape_generic.c
16889
===================================================================
16890
--- a/src/libgfortran/intrinsics/reshape_generic.c (.../tags/gcc_4_8_3_release)
16891
+++ b/src/libgfortran/intrinsics/reshape_generic.c (.../branches/gcc-4_8-branch)
16892
@@ -99,11 +99,11 @@
16895
if (unlikely (rs < 1))
16897
+ alloc_size = 0; /* xmalloc will allocate 1 byte. */
16899
- alloc_size = rs * size;
16902
- ret->base_addr = xmalloc (alloc_size);
16903
+ ret->base_addr = xmallocarray (alloc_size, size);
16905
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
16907
Index: libgfortran/configure.ac
16908
===================================================================
16909
--- a/src/libgfortran/configure.ac (.../tags/gcc_4_8_3_release)
16910
+++ b/src/libgfortran/configure.ac (.../branches/gcc-4_8-branch)
16911
@@ -267,7 +267,7 @@
16912
strcasestr getrlimit gettimeofday stat fstat lstat getpwuid vsnprintf dup \
16913
getcwd localtime_r gmtime_r getpwuid_r ttyname_r clock_gettime \
16914
readlink getgid getpid getppid getuid geteuid umask getegid \
16915
-secure_getenv __secure_getenv)
16916
+secure_getenv __secure_getenv strtok_r)
16918
# Check strerror_r, cannot be above as versions with two and three arguments exist
16919
LIBGFOR_CHECK_STRERROR_R
16920
Index: libgfortran/ChangeLog
16921
===================================================================
16922
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_8_3_release)
16923
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_8-branch)
16925
+2014-10-20 Janne Blomqvist <jb@gcc.gnu.org>
16927
+ PR libfortran/63589
16928
+ * configure.ac: Check for strtok_r.
16929
+ * runtime/main.c (gfstrtok_r): Fallback implementation of
16931
+ (find_addr2line): Use strtok_r to split PATH.
16932
+ * config.h.in: Regenerated.
16933
+ * configure: Regenerated.
16935
+2014-08-20 Steven G. Kargl <kargl@gcc.gnu.org>
16937
+ PR libgfortran/62188
16938
+ * m4/bessel.m4: Avoid indexing off the end of an array.
16939
+ * generated/bessel_r10.c: Regenerated.
16940
+ * generated/bessel_r16.c: Ditto.
16941
+ * generated/bessel_r4.c: Ditto.
16942
+ * generated/bessel_r8.c: Ditto.
16944
+2014-07-31 Janne Blomqvist <jb@gcc.gnu.org>
16946
+ Backport from mainline
16948
+ * libgfortran.h (xmallocarray): New prototype.
16949
+ * runtime/memory.c (xmallocarray): New function.
16950
+ (xcalloc): Check for nonzero separately instead of multiplying.
16951
+ * generated/*.c: Regenerated.
16952
+ * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
16954
+ * intrinsics/eoshift0.c (eoshift0): Likewise.
16955
+ * intrinsics/eoshift2.c (eoshift2): Likewise.
16956
+ * intrinsics/pack_generic.c (pack_internal): Likewise.
16957
+ (pack_s_internal): Likewise.
16958
+ * intrinsics/reshape_generic.c (reshape_internal): Likewise.
16959
+ * intrinsics/spread_generic.c (spread_internal): Likewise.
16960
+ (spread_internal_scalar): Likewise.
16961
+ * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
16962
+ (string_minmax): Likewise.
16963
+ * intrinsics/transpose_generic.c (transpose_internal): Likewise.
16964
+ * intrinsics/unpack_generic.c (unpack_internal): Likewise.
16965
+ * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
16966
+ * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
16968
+ * io/unit.c (get_internal_unit): Likewise.
16969
+ (filename_from_unit): Don't cast xmalloc return value.
16970
+ * io/write.c (nml_write_obj): Likewise, formatting.
16971
+ * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
16972
+ instead of xmalloc.
16973
+ (besse_yn_r'rtype_kind`): Likewise.
16974
+ * m4/cshift1.m4 (cshift1): Likewise.
16975
+ * m4/eoshift1.m4 (eoshift1): Likewise.
16976
+ * m4/eoshift3.m4 (eoshift3): Likewise.
16977
+ * m4/iforeach.m4: Likewise.
16978
+ * m4/ifunction.m4: Likewise.
16979
+ * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
16981
+ * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
16982
+ * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
16983
+ * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
16984
+ * m4/pack.m4 (pack_'rtype_code`): Likewise.
16985
+ * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
16986
+ * m4/shape.m4 (shape_'rtype_kind`): Likewise.
16987
+ * m4/spread.m4 (spread_'rtype_code`): Likewise.
16988
+ (spread_scalar_'rtype_code`): Likewise.
16989
+ * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
16990
+ * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
16991
+ (unpack1_'rtype_code`): Likewise.
16992
+ * runtime/convert_char.c (convert_char1_to_char4): Likewise.
16993
+ (convert_char4_to_char1): Simplify.
16994
+ * runtime/environ.c (init_unformatted): Call xmallocarray instead
16996
+ * runtime/in_pack_generic.c (internal_pack): Likewise.
16998
+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
17000
+ Backport from mainline
17001
+ PR libfortran/61310
17002
+ * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
17003
+ instead of strftime.
17004
+ (fdate): Use gf_ctime.
17005
+ (fdate_sub): Likewise.
17006
+ (ctime): Likewise.
17007
+ (ctime_sub): Likewise.
17009
+2014-05-25 Janne Blomqvist <jb@gcc.gnu.org>
17011
+ Backport from trunk.
17012
+ PR libfortran/61187
17013
+ * io/unix.c (raw_close): Check if s->fd is -1.
17014
+ (fd_to_stream): Check return value of fstat(), handle error.
17016
2014-05-22 Release Manager
17018
* GCC 4.8.3 released.
17019
Index: libgfortran/generated/spread_r10.c
17020
===================================================================
17021
--- a/src/libgfortran/generated/spread_r10.c (.../tags/gcc_4_8_3_release)
17022
+++ b/src/libgfortran/generated/spread_r10.c (.../branches/gcc-4_8-branch)
17023
@@ -101,8 +101,8 @@
17027
- /* xmalloc allocates a single byte for zero size. */
17028
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_10));
17029
+ /* xmallocarray allocates a single byte for zero size. */
17030
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_10));
17034
@@ -244,7 +244,7 @@
17036
if (ret->base_addr == NULL)
17038
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_10));
17039
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_10));
17041
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17043
Index: libgfortran/generated/maxloc1_4_r8.c
17044
===================================================================
17045
--- a/src/libgfortran/generated/maxloc1_4_r8.c (.../tags/gcc_4_8_3_release)
17046
+++ b/src/libgfortran/generated/maxloc1_4_r8.c (.../branches/gcc-4_8-branch)
17048
retarray->offset = 0;
17049
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17051
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17052
- * extent[rank-1];
17053
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17055
- retarray->base_addr = xmalloc (alloc_size);
17056
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17057
if (alloc_size == 0)
17059
/* Make sure we have a zero-sized array. */
17060
@@ -294,8 +293,7 @@
17064
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17065
- * extent[rank-1];
17066
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17068
retarray->offset = 0;
17069
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17070
@@ -307,7 +305,7 @@
17074
- retarray->base_addr = xmalloc (alloc_size);
17075
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17079
@@ -485,8 +483,7 @@
17080
retarray->offset = 0;
17081
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17083
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17084
- * extent[rank-1];
17085
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17087
if (alloc_size == 0)
17089
@@ -495,7 +492,7 @@
17093
- retarray->base_addr = xmalloc (alloc_size);
17094
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17098
Index: libgfortran/generated/norm2_r4.c
17099
===================================================================
17100
--- a/src/libgfortran/generated/norm2_r4.c (.../tags/gcc_4_8_3_release)
17101
+++ b/src/libgfortran/generated/norm2_r4.c (.../branches/gcc-4_8-branch)
17102
@@ -101,10 +101,9 @@
17103
retarray->offset = 0;
17104
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17106
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17107
- * extent[rank-1];
17108
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17110
- retarray->base_addr = xmalloc (alloc_size);
17111
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17112
if (alloc_size == 0)
17114
/* Make sure we have a zero-sized array. */
17115
Index: libgfortran/generated/parity_l2.c
17116
===================================================================
17117
--- a/src/libgfortran/generated/parity_l2.c (.../tags/gcc_4_8_3_release)
17118
+++ b/src/libgfortran/generated/parity_l2.c (.../branches/gcc-4_8-branch)
17120
retarray->offset = 0;
17121
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17123
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17124
- * extent[rank-1];
17125
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17127
- retarray->base_addr = xmalloc (alloc_size);
17128
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
17129
if (alloc_size == 0)
17131
/* Make sure we have a zero-sized array. */
17132
Index: libgfortran/generated/eoshift3_4.c
17133
===================================================================
17134
--- a/src/libgfortran/generated/eoshift3_4.c (.../tags/gcc_4_8_3_release)
17135
+++ b/src/libgfortran/generated/eoshift3_4.c (.../branches/gcc-4_8-branch)
17140
- ret->base_addr = xmalloc (size * arraysize);
17141
+ ret->base_addr = xmallocarray (arraysize, size);
17143
ret->dtype = array->dtype;
17144
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
17145
@@ -107,8 +107,8 @@
17146
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
17149
- /* xmalloc allocates a single byte for zero size. */
17150
- ret->base_addr = xmalloc (size * arraysize);
17151
+ /* xmallocarray allocates a single byte for zero size. */
17152
+ ret->base_addr = xmallocarray (arraysize, size);
17155
else if (unlikely (compile_options.bounds_check))
17156
Index: libgfortran/generated/transpose_c8.c
17157
===================================================================
17158
--- a/src/libgfortran/generated/transpose_c8.c (.../tags/gcc_4_8_3_release)
17159
+++ b/src/libgfortran/generated/transpose_c8.c (.../branches/gcc-4_8-branch)
17161
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
17162
GFC_DESCRIPTOR_EXTENT(source, 1));
17164
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) ret));
17165
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
17166
+ sizeof (GFC_COMPLEX_8));
17168
} else if (unlikely (compile_options.bounds_check))
17170
Index: libgfortran/generated/eoshift1_8.c
17171
===================================================================
17172
--- a/src/libgfortran/generated/eoshift1_8.c (.../tags/gcc_4_8_3_release)
17173
+++ b/src/libgfortran/generated/eoshift1_8.c (.../branches/gcc-4_8-branch)
17174
@@ -105,8 +105,8 @@
17175
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
17178
- /* xmalloc allocates a single byte for zero size. */
17179
- ret->base_addr = xmalloc (size * arraysize);
17180
+ /* xmallocarray allocates a single byte for zero size. */
17181
+ ret->base_addr = xmallocarray (arraysize, size);
17184
else if (unlikely (compile_options.bounds_check))
17185
Index: libgfortran/generated/reshape_r16.c
17186
===================================================================
17187
--- a/src/libgfortran/generated/reshape_r16.c (.../tags/gcc_4_8_3_release)
17188
+++ b/src/libgfortran/generated/reshape_r16.c (.../branches/gcc-4_8-branch)
17189
@@ -111,11 +111,11 @@
17192
if (unlikely (rs < 1))
17196
- alloc_size = rs * sizeof (GFC_REAL_16);
17199
- ret->base_addr = xmalloc (alloc_size);
17200
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
17201
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
17204
Index: libgfortran/generated/bessel_r4.c
17205
===================================================================
17206
--- a/src/libgfortran/generated/bessel_r4.c (.../tags/gcc_4_8_3_release)
17207
+++ b/src/libgfortran/generated/bessel_r4.c (.../branches/gcc-4_8-branch)
17210
size_t size = n2 < n1 ? 0 : n2-n1+1;
17211
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
17212
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
17213
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
17217
@@ -122,7 +122,7 @@
17219
size_t size = n2 < n1 ? 0 : n2-n1+1;
17220
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
17221
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
17222
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
17226
@@ -162,7 +162,7 @@
17228
x2rev = GFC_REAL_4_LITERAL(2.)/x;
17230
- for (i = 2; i <= n1+n2; i++)
17231
+ for (i = 2; i <= n2 - n1; i++)
17233
#if defined(GFC_REAL_4_INFINITY)
17234
if (unlikely (last2 == -GFC_REAL_4_INFINITY))
17235
Index: libgfortran/generated/any_l2.c
17236
===================================================================
17237
--- a/src/libgfortran/generated/any_l2.c (.../tags/gcc_4_8_3_release)
17238
+++ b/src/libgfortran/generated/any_l2.c (.../branches/gcc-4_8-branch)
17239
@@ -101,8 +101,7 @@
17240
retarray->offset = 0;
17241
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17243
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17244
- * extent[rank-1];
17245
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17247
if (alloc_size == 0)
17249
@@ -111,7 +110,7 @@
17253
- retarray->base_addr = xmalloc (alloc_size);
17254
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
17258
Index: libgfortran/generated/product_r4.c
17259
===================================================================
17260
--- a/src/libgfortran/generated/product_r4.c (.../tags/gcc_4_8_3_release)
17261
+++ b/src/libgfortran/generated/product_r4.c (.../branches/gcc-4_8-branch)
17263
retarray->offset = 0;
17264
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17266
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17267
- * extent[rank-1];
17268
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17270
- retarray->base_addr = xmalloc (alloc_size);
17271
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17272
if (alloc_size == 0)
17274
/* Make sure we have a zero-sized array. */
17275
@@ -272,8 +271,7 @@
17279
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17280
- * extent[rank-1];
17281
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17283
retarray->offset = 0;
17284
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17285
@@ -285,7 +283,7 @@
17289
- retarray->base_addr = xmalloc (alloc_size);
17290
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17294
@@ -430,8 +428,7 @@
17295
retarray->offset = 0;
17296
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17298
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17299
- * extent[rank-1];
17300
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17302
if (alloc_size == 0)
17304
@@ -440,7 +437,7 @@
17308
- retarray->base_addr = xmalloc (alloc_size);
17309
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17313
Index: libgfortran/generated/iany_i1.c
17314
===================================================================
17315
--- a/src/libgfortran/generated/iany_i1.c (.../tags/gcc_4_8_3_release)
17316
+++ b/src/libgfortran/generated/iany_i1.c (.../branches/gcc-4_8-branch)
17318
retarray->offset = 0;
17319
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17321
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17322
- * extent[rank-1];
17323
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17325
- retarray->base_addr = xmalloc (alloc_size);
17326
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17327
if (alloc_size == 0)
17329
/* Make sure we have a zero-sized array. */
17330
@@ -272,8 +271,7 @@
17334
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17335
- * extent[rank-1];
17336
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17338
retarray->offset = 0;
17339
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17340
@@ -285,7 +283,7 @@
17344
- retarray->base_addr = xmalloc (alloc_size);
17345
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17349
@@ -430,8 +428,7 @@
17350
retarray->offset = 0;
17351
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17353
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17354
- * extent[rank-1];
17355
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17357
if (alloc_size == 0)
17359
@@ -440,7 +437,7 @@
17363
- retarray->base_addr = xmalloc (alloc_size);
17364
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17368
Index: libgfortran/generated/parity_l16.c
17369
===================================================================
17370
--- a/src/libgfortran/generated/parity_l16.c (.../tags/gcc_4_8_3_release)
17371
+++ b/src/libgfortran/generated/parity_l16.c (.../branches/gcc-4_8-branch)
17373
retarray->offset = 0;
17374
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17376
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17377
- * extent[rank-1];
17378
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17380
- retarray->base_addr = xmalloc (alloc_size);
17381
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
17382
if (alloc_size == 0)
17384
/* Make sure we have a zero-sized array. */
17385
Index: libgfortran/generated/in_pack_r4.c
17386
===================================================================
17387
--- a/src/libgfortran/generated/in_pack_r4.c (.../tags/gcc_4_8_3_release)
17388
+++ b/src/libgfortran/generated/in_pack_r4.c (.../branches/gcc-4_8-branch)
17390
return source->base_addr;
17392
/* Allocate storage for the destination. */
17393
- destptr = (GFC_REAL_4 *)xmalloc (ssize * sizeof (GFC_REAL_4));
17394
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_4));
17396
src = source->base_addr;
17397
stride0 = stride[0];
17398
Index: libgfortran/generated/product_i2.c
17399
===================================================================
17400
--- a/src/libgfortran/generated/product_i2.c (.../tags/gcc_4_8_3_release)
17401
+++ b/src/libgfortran/generated/product_i2.c (.../branches/gcc-4_8-branch)
17403
retarray->offset = 0;
17404
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17406
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17407
- * extent[rank-1];
17408
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17410
- retarray->base_addr = xmalloc (alloc_size);
17411
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17412
if (alloc_size == 0)
17414
/* Make sure we have a zero-sized array. */
17415
@@ -272,8 +271,7 @@
17419
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17420
- * extent[rank-1];
17421
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17423
retarray->offset = 0;
17424
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17425
@@ -285,7 +283,7 @@
17429
- retarray->base_addr = xmalloc (alloc_size);
17430
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17434
@@ -430,8 +428,7 @@
17435
retarray->offset = 0;
17436
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17438
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17439
- * extent[rank-1];
17440
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17442
if (alloc_size == 0)
17444
@@ -440,7 +437,7 @@
17448
- retarray->base_addr = xmalloc (alloc_size);
17449
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17453
Index: libgfortran/generated/iparity_i4.c
17454
===================================================================
17455
--- a/src/libgfortran/generated/iparity_i4.c (.../tags/gcc_4_8_3_release)
17456
+++ b/src/libgfortran/generated/iparity_i4.c (.../branches/gcc-4_8-branch)
17458
retarray->offset = 0;
17459
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17461
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17462
- * extent[rank-1];
17463
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17465
- retarray->base_addr = xmalloc (alloc_size);
17466
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17467
if (alloc_size == 0)
17469
/* Make sure we have a zero-sized array. */
17470
@@ -272,8 +271,7 @@
17474
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17475
- * extent[rank-1];
17476
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17478
retarray->offset = 0;
17479
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17480
@@ -285,7 +283,7 @@
17484
- retarray->base_addr = xmalloc (alloc_size);
17485
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17489
@@ -430,8 +428,7 @@
17490
retarray->offset = 0;
17491
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17493
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17494
- * extent[rank-1];
17495
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17497
if (alloc_size == 0)
17499
@@ -440,7 +437,7 @@
17503
- retarray->base_addr = xmalloc (alloc_size);
17504
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17508
Index: libgfortran/generated/minloc0_4_i1.c
17509
===================================================================
17510
--- a/src/libgfortran/generated/minloc0_4_i1.c (.../tags/gcc_4_8_3_release)
17511
+++ b/src/libgfortran/generated/minloc0_4_i1.c (.../branches/gcc-4_8-branch)
17513
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17514
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17515
retarray->offset = 0;
17516
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17517
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17521
@@ -199,7 +199,7 @@
17522
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17523
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17524
retarray->offset = 0;
17525
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17526
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17530
@@ -367,7 +367,7 @@
17531
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17532
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17533
retarray->offset = 0;
17534
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17535
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17537
else if (unlikely (compile_options.bounds_check))
17539
Index: libgfortran/generated/reshape_c4.c
17540
===================================================================
17541
--- a/src/libgfortran/generated/reshape_c4.c (.../tags/gcc_4_8_3_release)
17542
+++ b/src/libgfortran/generated/reshape_c4.c (.../branches/gcc-4_8-branch)
17543
@@ -111,11 +111,11 @@
17546
if (unlikely (rs < 1))
17550
- alloc_size = rs * sizeof (GFC_COMPLEX_4);
17553
- ret->base_addr = xmalloc (alloc_size);
17554
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
17555
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
17558
Index: libgfortran/generated/maxloc0_4_r16.c
17559
===================================================================
17560
--- a/src/libgfortran/generated/maxloc0_4_r16.c (.../tags/gcc_4_8_3_release)
17561
+++ b/src/libgfortran/generated/maxloc0_4_r16.c (.../branches/gcc-4_8-branch)
17563
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17564
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17565
retarray->offset = 0;
17566
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17567
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17571
@@ -199,7 +199,7 @@
17572
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17573
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17574
retarray->offset = 0;
17575
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17576
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17580
@@ -367,7 +367,7 @@
17581
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17582
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17583
retarray->offset = 0;
17584
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17585
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17587
else if (unlikely (compile_options.bounds_check))
17589
Index: libgfortran/generated/iall_i8.c
17590
===================================================================
17591
--- a/src/libgfortran/generated/iall_i8.c (.../tags/gcc_4_8_3_release)
17592
+++ b/src/libgfortran/generated/iall_i8.c (.../branches/gcc-4_8-branch)
17594
retarray->offset = 0;
17595
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17597
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17598
- * extent[rank-1];
17599
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17601
- retarray->base_addr = xmalloc (alloc_size);
17602
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17603
if (alloc_size == 0)
17605
/* Make sure we have a zero-sized array. */
17606
@@ -272,8 +271,7 @@
17610
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17611
- * extent[rank-1];
17612
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17614
retarray->offset = 0;
17615
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17616
@@ -285,7 +283,7 @@
17620
- retarray->base_addr = xmalloc (alloc_size);
17621
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17625
@@ -430,8 +428,7 @@
17626
retarray->offset = 0;
17627
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17629
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17630
- * extent[rank-1];
17631
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17633
if (alloc_size == 0)
17635
@@ -440,7 +437,7 @@
17639
- retarray->base_addr = xmalloc (alloc_size);
17640
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17644
Index: libgfortran/generated/maxloc1_8_r16.c
17645
===================================================================
17646
--- a/src/libgfortran/generated/maxloc1_8_r16.c (.../tags/gcc_4_8_3_release)
17647
+++ b/src/libgfortran/generated/maxloc1_8_r16.c (.../branches/gcc-4_8-branch)
17649
retarray->offset = 0;
17650
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17652
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17653
- * extent[rank-1];
17654
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17656
- retarray->base_addr = xmalloc (alloc_size);
17657
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17658
if (alloc_size == 0)
17660
/* Make sure we have a zero-sized array. */
17661
@@ -294,8 +293,7 @@
17665
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17666
- * extent[rank-1];
17667
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17669
retarray->offset = 0;
17670
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17671
@@ -307,7 +305,7 @@
17675
- retarray->base_addr = xmalloc (alloc_size);
17676
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17680
@@ -485,8 +483,7 @@
17681
retarray->offset = 0;
17682
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17684
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17685
- * extent[rank-1];
17686
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17688
if (alloc_size == 0)
17690
@@ -495,7 +492,7 @@
17694
- retarray->base_addr = xmalloc (alloc_size);
17695
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17699
Index: libgfortran/generated/sum_r16.c
17700
===================================================================
17701
--- a/src/libgfortran/generated/sum_r16.c (.../tags/gcc_4_8_3_release)
17702
+++ b/src/libgfortran/generated/sum_r16.c (.../branches/gcc-4_8-branch)
17704
retarray->offset = 0;
17705
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17707
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17708
- * extent[rank-1];
17709
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17711
- retarray->base_addr = xmalloc (alloc_size);
17712
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
17713
if (alloc_size == 0)
17715
/* Make sure we have a zero-sized array. */
17716
@@ -272,8 +271,7 @@
17720
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17721
- * extent[rank-1];
17722
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17724
retarray->offset = 0;
17725
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17726
@@ -285,7 +283,7 @@
17730
- retarray->base_addr = xmalloc (alloc_size);
17731
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
17735
@@ -430,8 +428,7 @@
17736
retarray->offset = 0;
17737
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17739
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17740
- * extent[rank-1];
17741
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17743
if (alloc_size == 0)
17745
@@ -440,7 +437,7 @@
17749
- retarray->base_addr = xmalloc (alloc_size);
17750
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
17754
Index: libgfortran/generated/sum_i1.c
17755
===================================================================
17756
--- a/src/libgfortran/generated/sum_i1.c (.../tags/gcc_4_8_3_release)
17757
+++ b/src/libgfortran/generated/sum_i1.c (.../branches/gcc-4_8-branch)
17759
retarray->offset = 0;
17760
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17762
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17763
- * extent[rank-1];
17764
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17766
- retarray->base_addr = xmalloc (alloc_size);
17767
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17768
if (alloc_size == 0)
17770
/* Make sure we have a zero-sized array. */
17771
@@ -272,8 +271,7 @@
17775
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17776
- * extent[rank-1];
17777
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17779
retarray->offset = 0;
17780
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17781
@@ -285,7 +283,7 @@
17785
- retarray->base_addr = xmalloc (alloc_size);
17786
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17790
@@ -430,8 +428,7 @@
17791
retarray->offset = 0;
17792
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17794
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17795
- * extent[rank-1];
17796
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17798
if (alloc_size == 0)
17800
@@ -440,7 +437,7 @@
17804
- retarray->base_addr = xmalloc (alloc_size);
17805
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
17809
Index: libgfortran/generated/in_pack_i2.c
17810
===================================================================
17811
--- a/src/libgfortran/generated/in_pack_i2.c (.../tags/gcc_4_8_3_release)
17812
+++ b/src/libgfortran/generated/in_pack_i2.c (.../branches/gcc-4_8-branch)
17814
return source->base_addr;
17816
/* Allocate storage for the destination. */
17817
- destptr = (GFC_INTEGER_2 *)xmalloc (ssize * sizeof (GFC_INTEGER_2));
17818
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_2));
17820
src = source->base_addr;
17821
stride0 = stride[0];
17822
Index: libgfortran/generated/transpose_r10.c
17823
===================================================================
17824
--- a/src/libgfortran/generated/transpose_r10.c (.../tags/gcc_4_8_3_release)
17825
+++ b/src/libgfortran/generated/transpose_r10.c (.../branches/gcc-4_8-branch)
17827
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
17828
GFC_DESCRIPTOR_EXTENT(source, 1));
17830
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) ret));
17831
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
17832
+ sizeof (GFC_REAL_10));
17834
} else if (unlikely (compile_options.bounds_check))
17836
Index: libgfortran/generated/maxloc1_16_r16.c
17837
===================================================================
17838
--- a/src/libgfortran/generated/maxloc1_16_r16.c (.../tags/gcc_4_8_3_release)
17839
+++ b/src/libgfortran/generated/maxloc1_16_r16.c (.../branches/gcc-4_8-branch)
17841
retarray->offset = 0;
17842
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17844
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17845
- * extent[rank-1];
17846
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17848
- retarray->base_addr = xmalloc (alloc_size);
17849
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17850
if (alloc_size == 0)
17852
/* Make sure we have a zero-sized array. */
17853
@@ -294,8 +293,7 @@
17857
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17858
- * extent[rank-1];
17859
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17861
retarray->offset = 0;
17862
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17863
@@ -307,7 +305,7 @@
17867
- retarray->base_addr = xmalloc (alloc_size);
17868
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17872
@@ -485,8 +483,7 @@
17873
retarray->offset = 0;
17874
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17876
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17877
- * extent[rank-1];
17878
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17880
if (alloc_size == 0)
17882
@@ -495,7 +492,7 @@
17886
- retarray->base_addr = xmalloc (alloc_size);
17887
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17891
Index: libgfortran/generated/maxloc1_16_i4.c
17892
===================================================================
17893
--- a/src/libgfortran/generated/maxloc1_16_i4.c (.../tags/gcc_4_8_3_release)
17894
+++ b/src/libgfortran/generated/maxloc1_16_i4.c (.../branches/gcc-4_8-branch)
17896
retarray->offset = 0;
17897
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17899
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17900
- * extent[rank-1];
17901
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17903
- retarray->base_addr = xmalloc (alloc_size);
17904
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17905
if (alloc_size == 0)
17907
/* Make sure we have a zero-sized array. */
17908
@@ -294,8 +293,7 @@
17912
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17913
- * extent[rank-1];
17914
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17916
retarray->offset = 0;
17917
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17918
@@ -307,7 +305,7 @@
17922
- retarray->base_addr = xmalloc (alloc_size);
17923
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17927
@@ -485,8 +483,7 @@
17928
retarray->offset = 0;
17929
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17931
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17932
- * extent[rank-1];
17933
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17935
if (alloc_size == 0)
17937
@@ -495,7 +492,7 @@
17941
- retarray->base_addr = xmalloc (alloc_size);
17942
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17946
Index: libgfortran/generated/spread_i1.c
17947
===================================================================
17948
--- a/src/libgfortran/generated/spread_i1.c (.../tags/gcc_4_8_3_release)
17949
+++ b/src/libgfortran/generated/spread_i1.c (.../branches/gcc-4_8-branch)
17950
@@ -101,8 +101,8 @@
17954
- /* xmalloc allocates a single byte for zero size. */
17955
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_1));
17956
+ /* xmallocarray allocates a single byte for zero size. */
17957
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_1));
17961
@@ -244,7 +244,7 @@
17963
if (ret->base_addr == NULL)
17965
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_1));
17966
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_1));
17968
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17970
Index: libgfortran/generated/maxloc0_16_i8.c
17971
===================================================================
17972
--- a/src/libgfortran/generated/maxloc0_16_i8.c (.../tags/gcc_4_8_3_release)
17973
+++ b/src/libgfortran/generated/maxloc0_16_i8.c (.../branches/gcc-4_8-branch)
17975
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17976
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17977
retarray->offset = 0;
17978
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17979
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17983
@@ -199,7 +199,7 @@
17984
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17985
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17986
retarray->offset = 0;
17987
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17988
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17992
@@ -367,7 +367,7 @@
17993
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17994
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17995
retarray->offset = 0;
17996
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17997
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17999
else if (unlikely (compile_options.bounds_check))
18001
Index: libgfortran/generated/maxval_r16.c
18002
===================================================================
18003
--- a/src/libgfortran/generated/maxval_r16.c (.../tags/gcc_4_8_3_release)
18004
+++ b/src/libgfortran/generated/maxval_r16.c (.../branches/gcc-4_8-branch)
18006
retarray->offset = 0;
18007
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18009
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18010
- * extent[rank-1];
18011
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18013
- retarray->base_addr = xmalloc (alloc_size);
18014
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
18015
if (alloc_size == 0)
18017
/* Make sure we have a zero-sized array. */
18018
@@ -286,8 +285,7 @@
18022
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18023
- * extent[rank-1];
18024
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18026
retarray->offset = 0;
18027
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18028
@@ -299,7 +297,7 @@
18032
- retarray->base_addr = xmalloc (alloc_size);
18033
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
18037
@@ -472,8 +470,7 @@
18038
retarray->offset = 0;
18039
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18041
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18042
- * extent[rank-1];
18043
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18045
if (alloc_size == 0)
18047
@@ -482,7 +479,7 @@
18051
- retarray->base_addr = xmalloc (alloc_size);
18052
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
18056
Index: libgfortran/generated/product_c10.c
18057
===================================================================
18058
--- a/src/libgfortran/generated/product_c10.c (.../tags/gcc_4_8_3_release)
18059
+++ b/src/libgfortran/generated/product_c10.c (.../branches/gcc-4_8-branch)
18061
retarray->offset = 0;
18062
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18064
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18065
- * extent[rank-1];
18066
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18068
- retarray->base_addr = xmalloc (alloc_size);
18069
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
18070
if (alloc_size == 0)
18072
/* Make sure we have a zero-sized array. */
18073
@@ -272,8 +271,7 @@
18077
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18078
- * extent[rank-1];
18079
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18081
retarray->offset = 0;
18082
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18083
@@ -285,7 +283,7 @@
18087
- retarray->base_addr = xmalloc (alloc_size);
18088
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
18092
@@ -430,8 +428,7 @@
18093
retarray->offset = 0;
18094
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18096
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18097
- * extent[rank-1];
18098
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18100
if (alloc_size == 0)
18102
@@ -440,7 +437,7 @@
18106
- retarray->base_addr = xmalloc (alloc_size);
18107
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
18111
Index: libgfortran/generated/minloc1_8_i4.c
18112
===================================================================
18113
--- a/src/libgfortran/generated/minloc1_8_i4.c (.../tags/gcc_4_8_3_release)
18114
+++ b/src/libgfortran/generated/minloc1_8_i4.c (.../branches/gcc-4_8-branch)
18116
retarray->offset = 0;
18117
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18119
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18120
- * extent[rank-1];
18121
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18123
- retarray->base_addr = xmalloc (alloc_size);
18124
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18125
if (alloc_size == 0)
18127
/* Make sure we have a zero-sized array. */
18128
@@ -294,8 +293,7 @@
18132
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18133
- * extent[rank-1];
18134
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18136
retarray->offset = 0;
18137
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18138
@@ -307,7 +305,7 @@
18142
- retarray->base_addr = xmalloc (alloc_size);
18143
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18147
@@ -485,8 +483,7 @@
18148
retarray->offset = 0;
18149
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18151
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18152
- * extent[rank-1];
18153
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18155
if (alloc_size == 0)
18157
@@ -495,7 +492,7 @@
18161
- retarray->base_addr = xmalloc (alloc_size);
18162
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18166
Index: libgfortran/generated/minloc0_16_i16.c
18167
===================================================================
18168
--- a/src/libgfortran/generated/minloc0_16_i16.c (.../tags/gcc_4_8_3_release)
18169
+++ b/src/libgfortran/generated/minloc0_16_i16.c (.../branches/gcc-4_8-branch)
18171
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18172
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18173
retarray->offset = 0;
18174
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18175
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18179
@@ -199,7 +199,7 @@
18180
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18181
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18182
retarray->offset = 0;
18183
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18184
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18188
@@ -367,7 +367,7 @@
18189
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18190
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18191
retarray->offset = 0;
18192
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18193
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18195
else if (unlikely (compile_options.bounds_check))
18197
Index: libgfortran/generated/matmul_r16.c
18198
===================================================================
18199
--- a/src/libgfortran/generated/matmul_r16.c (.../tags/gcc_4_8_3_release)
18200
+++ b/src/libgfortran/generated/matmul_r16.c (.../branches/gcc-4_8-branch)
18201
@@ -124,7 +124,7 @@
18204
retarray->base_addr
18205
- = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) retarray));
18206
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_16));
18207
retarray->offset = 0;
18209
else if (unlikely (compile_options.bounds_check))
18210
Index: libgfortran/generated/minloc0_4_r4.c
18211
===================================================================
18212
--- a/src/libgfortran/generated/minloc0_4_r4.c (.../tags/gcc_4_8_3_release)
18213
+++ b/src/libgfortran/generated/minloc0_4_r4.c (.../branches/gcc-4_8-branch)
18215
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18216
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18217
retarray->offset = 0;
18218
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18219
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18223
@@ -199,7 +199,7 @@
18224
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18225
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18226
retarray->offset = 0;
18227
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18228
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18232
@@ -367,7 +367,7 @@
18233
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18234
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18235
retarray->offset = 0;
18236
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18237
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18239
else if (unlikely (compile_options.bounds_check))
18241
Index: libgfortran/generated/iany_i2.c
18242
===================================================================
18243
--- a/src/libgfortran/generated/iany_i2.c (.../tags/gcc_4_8_3_release)
18244
+++ b/src/libgfortran/generated/iany_i2.c (.../branches/gcc-4_8-branch)
18246
retarray->offset = 0;
18247
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18249
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18250
- * extent[rank-1];
18251
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18253
- retarray->base_addr = xmalloc (alloc_size);
18254
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18255
if (alloc_size == 0)
18257
/* Make sure we have a zero-sized array. */
18258
@@ -272,8 +271,7 @@
18262
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18263
- * extent[rank-1];
18264
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18266
retarray->offset = 0;
18267
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18268
@@ -285,7 +283,7 @@
18272
- retarray->base_addr = xmalloc (alloc_size);
18273
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18277
@@ -430,8 +428,7 @@
18278
retarray->offset = 0;
18279
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18281
- alloc_size = sizeof (GFC_INTEGER_2) * 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
@@ -440,7 +437,7 @@
18291
- retarray->base_addr = xmalloc (alloc_size);
18292
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18296
Index: libgfortran/generated/sum_r4.c
18297
===================================================================
18298
--- a/src/libgfortran/generated/sum_r4.c (.../tags/gcc_4_8_3_release)
18299
+++ b/src/libgfortran/generated/sum_r4.c (.../branches/gcc-4_8-branch)
18301
retarray->offset = 0;
18302
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18304
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18305
- * extent[rank-1];
18306
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18308
- retarray->base_addr = xmalloc (alloc_size);
18309
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
18310
if (alloc_size == 0)
18312
/* Make sure we have a zero-sized array. */
18313
@@ -272,8 +271,7 @@
18317
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18318
- * extent[rank-1];
18319
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18321
retarray->offset = 0;
18322
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18323
@@ -285,7 +283,7 @@
18327
- retarray->base_addr = xmalloc (alloc_size);
18328
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
18332
@@ -430,8 +428,7 @@
18333
retarray->offset = 0;
18334
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18336
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18337
- * extent[rank-1];
18338
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18340
if (alloc_size == 0)
18342
@@ -440,7 +437,7 @@
18346
- retarray->base_addr = xmalloc (alloc_size);
18347
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
18351
Index: libgfortran/generated/unpack_c8.c
18352
===================================================================
18353
--- a/src/libgfortran/generated/unpack_c8.c (.../tags/gcc_4_8_3_release)
18354
+++ b/src/libgfortran/generated/unpack_c8.c (.../branches/gcc-4_8-branch)
18359
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
18360
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
18364
@@ -244,7 +244,7 @@
18368
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
18369
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
18373
Index: libgfortran/generated/in_pack_c16.c
18374
===================================================================
18375
--- a/src/libgfortran/generated/in_pack_c16.c (.../tags/gcc_4_8_3_release)
18376
+++ b/src/libgfortran/generated/in_pack_c16.c (.../branches/gcc-4_8-branch)
18378
return source->base_addr;
18380
/* Allocate storage for the destination. */
18381
- destptr = (GFC_COMPLEX_16 *)xmalloc (ssize * sizeof (GFC_COMPLEX_16));
18382
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_16));
18384
src = source->base_addr;
18385
stride0 = stride[0];
18386
Index: libgfortran/generated/minloc0_4_i2.c
18387
===================================================================
18388
--- a/src/libgfortran/generated/minloc0_4_i2.c (.../tags/gcc_4_8_3_release)
18389
+++ b/src/libgfortran/generated/minloc0_4_i2.c (.../branches/gcc-4_8-branch)
18391
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18392
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18393
retarray->offset = 0;
18394
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18395
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18399
@@ -199,7 +199,7 @@
18400
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18401
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18402
retarray->offset = 0;
18403
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18404
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18408
@@ -367,7 +367,7 @@
18409
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18410
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18411
retarray->offset = 0;
18412
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18413
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18415
else if (unlikely (compile_options.bounds_check))
18417
Index: libgfortran/generated/spread_c10.c
18418
===================================================================
18419
--- a/src/libgfortran/generated/spread_c10.c (.../tags/gcc_4_8_3_release)
18420
+++ b/src/libgfortran/generated/spread_c10.c (.../branches/gcc-4_8-branch)
18421
@@ -101,8 +101,8 @@
18425
- /* xmalloc allocates a single byte for zero size. */
18426
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_10));
18427
+ /* xmallocarray allocates a single byte for zero size. */
18428
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_10));
18432
@@ -244,7 +244,7 @@
18434
if (ret->base_addr == NULL)
18436
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_10));
18437
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_10));
18439
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
18441
Index: libgfortran/generated/maxloc0_8_i1.c
18442
===================================================================
18443
--- a/src/libgfortran/generated/maxloc0_8_i1.c (.../tags/gcc_4_8_3_release)
18444
+++ b/src/libgfortran/generated/maxloc0_8_i1.c (.../branches/gcc-4_8-branch)
18446
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18447
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18448
retarray->offset = 0;
18449
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18450
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18454
@@ -199,7 +199,7 @@
18455
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18456
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18457
retarray->offset = 0;
18458
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18459
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18463
@@ -367,7 +367,7 @@
18464
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18465
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18466
retarray->offset = 0;
18467
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18468
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18470
else if (unlikely (compile_options.bounds_check))
18472
Index: libgfortran/generated/spread_r4.c
18473
===================================================================
18474
--- a/src/libgfortran/generated/spread_r4.c (.../tags/gcc_4_8_3_release)
18475
+++ b/src/libgfortran/generated/spread_r4.c (.../branches/gcc-4_8-branch)
18476
@@ -101,8 +101,8 @@
18480
- /* xmalloc allocates a single byte for zero size. */
18481
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_4));
18482
+ /* xmallocarray allocates a single byte for zero size. */
18483
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_4));
18487
@@ -244,7 +244,7 @@
18489
if (ret->base_addr == NULL)
18491
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_4));
18492
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_4));
18494
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
18496
Index: libgfortran/generated/minloc0_8_i8.c
18497
===================================================================
18498
--- a/src/libgfortran/generated/minloc0_8_i8.c (.../tags/gcc_4_8_3_release)
18499
+++ b/src/libgfortran/generated/minloc0_8_i8.c (.../branches/gcc-4_8-branch)
18501
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18502
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18503
retarray->offset = 0;
18504
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18505
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18509
@@ -199,7 +199,7 @@
18510
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18511
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18512
retarray->offset = 0;
18513
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18514
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18518
@@ -367,7 +367,7 @@
18519
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18520
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18521
retarray->offset = 0;
18522
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18523
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18525
else if (unlikely (compile_options.bounds_check))
18527
Index: libgfortran/generated/matmul_c8.c
18528
===================================================================
18529
--- a/src/libgfortran/generated/matmul_c8.c (.../tags/gcc_4_8_3_release)
18530
+++ b/src/libgfortran/generated/matmul_c8.c (.../branches/gcc-4_8-branch)
18531
@@ -124,7 +124,7 @@
18534
retarray->base_addr
18535
- = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) retarray));
18536
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_8));
18537
retarray->offset = 0;
18539
else if (unlikely (compile_options.bounds_check))
18540
Index: libgfortran/generated/minloc1_16_r10.c
18541
===================================================================
18542
--- a/src/libgfortran/generated/minloc1_16_r10.c (.../tags/gcc_4_8_3_release)
18543
+++ b/src/libgfortran/generated/minloc1_16_r10.c (.../branches/gcc-4_8-branch)
18545
retarray->offset = 0;
18546
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18548
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18549
- * extent[rank-1];
18550
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18552
- retarray->base_addr = xmalloc (alloc_size);
18553
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18554
if (alloc_size == 0)
18556
/* Make sure we have a zero-sized array. */
18557
@@ -294,8 +293,7 @@
18561
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18562
- * extent[rank-1];
18563
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18565
retarray->offset = 0;
18566
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18567
@@ -307,7 +305,7 @@
18571
- retarray->base_addr = xmalloc (alloc_size);
18572
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18576
@@ -485,8 +483,7 @@
18577
retarray->offset = 0;
18578
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18580
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18581
- * extent[rank-1];
18582
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18584
if (alloc_size == 0)
18586
@@ -495,7 +492,7 @@
18590
- retarray->base_addr = xmalloc (alloc_size);
18591
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18595
Index: libgfortran/generated/sum_i2.c
18596
===================================================================
18597
--- a/src/libgfortran/generated/sum_i2.c (.../tags/gcc_4_8_3_release)
18598
+++ b/src/libgfortran/generated/sum_i2.c (.../branches/gcc-4_8-branch)
18600
retarray->offset = 0;
18601
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18603
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18604
- * extent[rank-1];
18605
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18607
- retarray->base_addr = xmalloc (alloc_size);
18608
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18609
if (alloc_size == 0)
18611
/* Make sure we have a zero-sized array. */
18612
@@ -272,8 +271,7 @@
18616
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18617
- * extent[rank-1];
18618
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18620
retarray->offset = 0;
18621
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18622
@@ -285,7 +283,7 @@
18626
- retarray->base_addr = xmalloc (alloc_size);
18627
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18631
@@ -430,8 +428,7 @@
18632
retarray->offset = 0;
18633
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18635
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18636
- * extent[rank-1];
18637
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18639
if (alloc_size == 0)
18641
@@ -440,7 +437,7 @@
18645
- retarray->base_addr = xmalloc (alloc_size);
18646
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18650
Index: libgfortran/generated/iparity_i16.c
18651
===================================================================
18652
--- a/src/libgfortran/generated/iparity_i16.c (.../tags/gcc_4_8_3_release)
18653
+++ b/src/libgfortran/generated/iparity_i16.c (.../branches/gcc-4_8-branch)
18655
retarray->offset = 0;
18656
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18658
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18659
- * extent[rank-1];
18660
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18662
- retarray->base_addr = xmalloc (alloc_size);
18663
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18664
if (alloc_size == 0)
18666
/* Make sure we have a zero-sized array. */
18667
@@ -272,8 +271,7 @@
18671
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18672
- * extent[rank-1];
18673
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18675
retarray->offset = 0;
18676
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18677
@@ -285,7 +283,7 @@
18681
- retarray->base_addr = xmalloc (alloc_size);
18682
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18686
@@ -430,8 +428,7 @@
18687
retarray->offset = 0;
18688
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18690
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18691
- * extent[rank-1];
18692
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18694
if (alloc_size == 0)
18696
@@ -440,7 +437,7 @@
18700
- retarray->base_addr = xmalloc (alloc_size);
18701
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18705
Index: libgfortran/generated/minloc0_16_i1.c
18706
===================================================================
18707
--- a/src/libgfortran/generated/minloc0_16_i1.c (.../tags/gcc_4_8_3_release)
18708
+++ b/src/libgfortran/generated/minloc0_16_i1.c (.../branches/gcc-4_8-branch)
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_16) * rank);
18714
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18718
@@ -199,7 +199,7 @@
18719
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18720
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18721
retarray->offset = 0;
18722
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18723
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18727
@@ -367,7 +367,7 @@
18728
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18729
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18730
retarray->offset = 0;
18731
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18732
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18734
else if (unlikely (compile_options.bounds_check))
18736
Index: libgfortran/generated/reshape_c16.c
18737
===================================================================
18738
--- a/src/libgfortran/generated/reshape_c16.c (.../tags/gcc_4_8_3_release)
18739
+++ b/src/libgfortran/generated/reshape_c16.c (.../branches/gcc-4_8-branch)
18740
@@ -111,11 +111,11 @@
18743
if (unlikely (rs < 1))
18747
- alloc_size = rs * sizeof (GFC_COMPLEX_16);
18750
- ret->base_addr = xmalloc (alloc_size);
18751
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
18752
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
18755
Index: libgfortran/generated/pack_c4.c
18756
===================================================================
18757
--- a/src/libgfortran/generated/pack_c4.c (.../tags/gcc_4_8_3_release)
18758
+++ b/src/libgfortran/generated/pack_c4.c (.../branches/gcc-4_8-branch)
18759
@@ -167,8 +167,8 @@
18763
- /* xmalloc allocates a single byte for zero size. */
18764
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * total);
18765
+ /* xmallocarray allocates a single byte for zero size. */
18766
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_4));
18770
Index: libgfortran/generated/parity_l4.c
18771
===================================================================
18772
--- a/src/libgfortran/generated/parity_l4.c (.../tags/gcc_4_8_3_release)
18773
+++ b/src/libgfortran/generated/parity_l4.c (.../branches/gcc-4_8-branch)
18775
retarray->offset = 0;
18776
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18778
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18779
- * extent[rank-1];
18780
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18782
- retarray->base_addr = xmalloc (alloc_size);
18783
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
18784
if (alloc_size == 0)
18786
/* Make sure we have a zero-sized array. */
18787
Index: libgfortran/generated/spread_i2.c
18788
===================================================================
18789
--- a/src/libgfortran/generated/spread_i2.c (.../tags/gcc_4_8_3_release)
18790
+++ b/src/libgfortran/generated/spread_i2.c (.../branches/gcc-4_8-branch)
18791
@@ -101,8 +101,8 @@
18795
- /* xmalloc allocates a single byte for zero size. */
18796
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_2));
18797
+ /* xmallocarray allocates a single byte for zero size. */
18798
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_2));
18802
@@ -244,7 +244,7 @@
18804
if (ret->base_addr == NULL)
18806
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_2));
18807
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_2));
18809
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
18811
Index: libgfortran/generated/any_l4.c
18812
===================================================================
18813
--- a/src/libgfortran/generated/any_l4.c (.../tags/gcc_4_8_3_release)
18814
+++ b/src/libgfortran/generated/any_l4.c (.../branches/gcc-4_8-branch)
18815
@@ -101,8 +101,7 @@
18816
retarray->offset = 0;
18817
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18819
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18820
- * extent[rank-1];
18821
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18823
if (alloc_size == 0)
18825
@@ -111,7 +110,7 @@
18829
- retarray->base_addr = xmalloc (alloc_size);
18830
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
18834
Index: libgfortran/generated/maxloc1_4_i8.c
18835
===================================================================
18836
--- a/src/libgfortran/generated/maxloc1_4_i8.c (.../tags/gcc_4_8_3_release)
18837
+++ b/src/libgfortran/generated/maxloc1_4_i8.c (.../branches/gcc-4_8-branch)
18839
retarray->offset = 0;
18840
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18842
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18843
- * extent[rank-1];
18844
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18846
- retarray->base_addr = xmalloc (alloc_size);
18847
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18848
if (alloc_size == 0)
18850
/* Make sure we have a zero-sized array. */
18851
@@ -294,8 +293,7 @@
18855
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18856
- * extent[rank-1];
18857
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18859
retarray->offset = 0;
18860
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18861
@@ -307,7 +305,7 @@
18865
- retarray->base_addr = xmalloc (alloc_size);
18866
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18870
@@ -485,8 +483,7 @@
18871
retarray->offset = 0;
18872
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18874
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18875
- * extent[rank-1];
18876
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18878
if (alloc_size == 0)
18880
@@ -495,7 +492,7 @@
18884
- retarray->base_addr = xmalloc (alloc_size);
18885
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18889
Index: libgfortran/generated/maxloc0_8_r4.c
18890
===================================================================
18891
--- a/src/libgfortran/generated/maxloc0_8_r4.c (.../tags/gcc_4_8_3_release)
18892
+++ b/src/libgfortran/generated/maxloc0_8_r4.c (.../branches/gcc-4_8-branch)
18894
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18895
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18896
retarray->offset = 0;
18897
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18898
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18902
@@ -199,7 +199,7 @@
18903
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18904
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18905
retarray->offset = 0;
18906
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18907
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18911
@@ -367,7 +367,7 @@
18912
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18913
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18914
retarray->offset = 0;
18915
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18916
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18918
else if (unlikely (compile_options.bounds_check))
18920
Index: libgfortran/generated/maxloc1_4_i16.c
18921
===================================================================
18922
--- a/src/libgfortran/generated/maxloc1_4_i16.c (.../tags/gcc_4_8_3_release)
18923
+++ b/src/libgfortran/generated/maxloc1_4_i16.c (.../branches/gcc-4_8-branch)
18925
retarray->offset = 0;
18926
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18928
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18929
- * extent[rank-1];
18930
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18932
- retarray->base_addr = xmalloc (alloc_size);
18933
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18934
if (alloc_size == 0)
18936
/* Make sure we have a zero-sized array. */
18937
@@ -294,8 +293,7 @@
18941
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18942
- * extent[rank-1];
18943
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18945
retarray->offset = 0;
18946
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18947
@@ -307,7 +305,7 @@
18951
- retarray->base_addr = xmalloc (alloc_size);
18952
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18956
@@ -485,8 +483,7 @@
18957
retarray->offset = 0;
18958
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18960
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18961
- * extent[rank-1];
18962
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18964
if (alloc_size == 0)
18966
@@ -495,7 +492,7 @@
18970
- retarray->base_addr = xmalloc (alloc_size);
18971
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18975
Index: libgfortran/generated/minloc0_4_r10.c
18976
===================================================================
18977
--- a/src/libgfortran/generated/minloc0_4_r10.c (.../tags/gcc_4_8_3_release)
18978
+++ b/src/libgfortran/generated/minloc0_4_r10.c (.../branches/gcc-4_8-branch)
18980
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18981
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18982
retarray->offset = 0;
18983
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18984
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18988
@@ -199,7 +199,7 @@
18989
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18990
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18991
retarray->offset = 0;
18992
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18993
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18997
@@ -367,7 +367,7 @@
18998
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18999
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19000
retarray->offset = 0;
19001
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19002
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19004
else if (unlikely (compile_options.bounds_check))
19006
Index: libgfortran/generated/minloc0_8_i16.c
19007
===================================================================
19008
--- a/src/libgfortran/generated/minloc0_8_i16.c (.../tags/gcc_4_8_3_release)
19009
+++ b/src/libgfortran/generated/minloc0_8_i16.c (.../branches/gcc-4_8-branch)
19011
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19012
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19013
retarray->offset = 0;
19014
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19015
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19019
@@ -199,7 +199,7 @@
19020
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19021
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19022
retarray->offset = 0;
19023
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19024
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19028
@@ -367,7 +367,7 @@
19029
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19030
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19031
retarray->offset = 0;
19032
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19033
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19035
else if (unlikely (compile_options.bounds_check))
19037
Index: libgfortran/generated/minloc1_8_r10.c
19038
===================================================================
19039
--- a/src/libgfortran/generated/minloc1_8_r10.c (.../tags/gcc_4_8_3_release)
19040
+++ b/src/libgfortran/generated/minloc1_8_r10.c (.../branches/gcc-4_8-branch)
19042
retarray->offset = 0;
19043
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19045
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19046
- * extent[rank-1];
19047
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19049
- retarray->base_addr = xmalloc (alloc_size);
19050
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19051
if (alloc_size == 0)
19053
/* Make sure we have a zero-sized array. */
19054
@@ -294,8 +293,7 @@
19058
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19059
- * extent[rank-1];
19060
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19062
retarray->offset = 0;
19063
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19064
@@ -307,7 +305,7 @@
19068
- retarray->base_addr = xmalloc (alloc_size);
19069
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19073
@@ -485,8 +483,7 @@
19074
retarray->offset = 0;
19075
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19077
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19078
- * extent[rank-1];
19079
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19081
if (alloc_size == 0)
19083
@@ -495,7 +492,7 @@
19087
- retarray->base_addr = xmalloc (alloc_size);
19088
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19092
Index: libgfortran/generated/minloc0_16_r4.c
19093
===================================================================
19094
--- a/src/libgfortran/generated/minloc0_16_r4.c (.../tags/gcc_4_8_3_release)
19095
+++ b/src/libgfortran/generated/minloc0_16_r4.c (.../branches/gcc-4_8-branch)
19097
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19098
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19099
retarray->offset = 0;
19100
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19101
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19105
@@ -199,7 +199,7 @@
19106
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19107
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19108
retarray->offset = 0;
19109
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19110
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19114
@@ -367,7 +367,7 @@
19115
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19116
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19117
retarray->offset = 0;
19118
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19119
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19121
else if (unlikely (compile_options.bounds_check))
19123
Index: libgfortran/generated/product_i4.c
19124
===================================================================
19125
--- a/src/libgfortran/generated/product_i4.c (.../tags/gcc_4_8_3_release)
19126
+++ b/src/libgfortran/generated/product_i4.c (.../branches/gcc-4_8-branch)
19128
retarray->offset = 0;
19129
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19131
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19132
- * extent[rank-1];
19133
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19135
- retarray->base_addr = xmalloc (alloc_size);
19136
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19137
if (alloc_size == 0)
19139
/* Make sure we have a zero-sized array. */
19140
@@ -272,8 +271,7 @@
19144
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19145
- * extent[rank-1];
19146
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19148
retarray->offset = 0;
19149
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19150
@@ -285,7 +283,7 @@
19154
- retarray->base_addr = xmalloc (alloc_size);
19155
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19159
@@ -430,8 +428,7 @@
19160
retarray->offset = 0;
19161
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19163
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19164
- * extent[rank-1];
19165
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19167
if (alloc_size == 0)
19169
@@ -440,7 +437,7 @@
19173
- retarray->base_addr = xmalloc (alloc_size);
19174
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19178
Index: libgfortran/generated/sum_c16.c
19179
===================================================================
19180
--- a/src/libgfortran/generated/sum_c16.c (.../tags/gcc_4_8_3_release)
19181
+++ b/src/libgfortran/generated/sum_c16.c (.../branches/gcc-4_8-branch)
19183
retarray->offset = 0;
19184
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19186
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19187
- * extent[rank-1];
19188
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19190
- retarray->base_addr = xmalloc (alloc_size);
19191
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
19192
if (alloc_size == 0)
19194
/* Make sure we have a zero-sized array. */
19195
@@ -272,8 +271,7 @@
19199
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19200
- * extent[rank-1];
19201
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19203
retarray->offset = 0;
19204
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19205
@@ -285,7 +283,7 @@
19209
- retarray->base_addr = xmalloc (alloc_size);
19210
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
19214
@@ -430,8 +428,7 @@
19215
retarray->offset = 0;
19216
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19218
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19219
- * extent[rank-1];
19220
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19222
if (alloc_size == 0)
19224
@@ -440,7 +437,7 @@
19228
- retarray->base_addr = xmalloc (alloc_size);
19229
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
19233
Index: libgfortran/generated/transpose_c10.c
19234
===================================================================
19235
--- a/src/libgfortran/generated/transpose_c10.c (.../tags/gcc_4_8_3_release)
19236
+++ b/src/libgfortran/generated/transpose_c10.c (.../branches/gcc-4_8-branch)
19238
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
19239
GFC_DESCRIPTOR_EXTENT(source, 1));
19241
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) ret));
19242
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
19243
+ sizeof (GFC_COMPLEX_10));
19245
} else if (unlikely (compile_options.bounds_check))
19247
Index: libgfortran/generated/maxloc1_16_r8.c
19248
===================================================================
19249
--- a/src/libgfortran/generated/maxloc1_16_r8.c (.../tags/gcc_4_8_3_release)
19250
+++ b/src/libgfortran/generated/maxloc1_16_r8.c (.../branches/gcc-4_8-branch)
19252
retarray->offset = 0;
19253
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19255
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19256
- * extent[rank-1];
19257
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19259
- retarray->base_addr = xmalloc (alloc_size);
19260
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19261
if (alloc_size == 0)
19263
/* Make sure we have a zero-sized array. */
19264
@@ -294,8 +293,7 @@
19268
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19269
- * extent[rank-1];
19270
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19272
retarray->offset = 0;
19273
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19274
@@ -307,7 +305,7 @@
19278
- retarray->base_addr = xmalloc (alloc_size);
19279
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19283
@@ -485,8 +483,7 @@
19284
retarray->offset = 0;
19285
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19287
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19288
- * extent[rank-1];
19289
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19291
if (alloc_size == 0)
19293
@@ -495,7 +492,7 @@
19297
- retarray->base_addr = xmalloc (alloc_size);
19298
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19302
Index: libgfortran/generated/transpose_r4.c
19303
===================================================================
19304
--- a/src/libgfortran/generated/transpose_r4.c (.../tags/gcc_4_8_3_release)
19305
+++ b/src/libgfortran/generated/transpose_r4.c (.../branches/gcc-4_8-branch)
19307
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
19308
GFC_DESCRIPTOR_EXTENT(source, 1));
19310
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) ret));
19311
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
19312
+ sizeof (GFC_REAL_4));
19314
} else if (unlikely (compile_options.bounds_check))
19316
Index: libgfortran/generated/cshift1_4.c
19317
===================================================================
19318
--- a/src/libgfortran/generated/cshift1_4.c (.../tags/gcc_4_8_3_release)
19319
+++ b/src/libgfortran/generated/cshift1_4.c (.../branches/gcc-4_8-branch)
19324
- ret->base_addr = xmalloc (size * arraysize);
19325
+ ret->base_addr = xmallocarray (arraysize, size);
19327
ret->dtype = array->dtype;
19328
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
19329
Index: libgfortran/generated/maxloc0_8_i2.c
19330
===================================================================
19331
--- a/src/libgfortran/generated/maxloc0_8_i2.c (.../tags/gcc_4_8_3_release)
19332
+++ b/src/libgfortran/generated/maxloc0_8_i2.c (.../branches/gcc-4_8-branch)
19334
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19335
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19336
retarray->offset = 0;
19337
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19338
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19342
@@ -199,7 +199,7 @@
19343
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19344
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19345
retarray->offset = 0;
19346
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19347
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19351
@@ -367,7 +367,7 @@
19352
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19353
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19354
retarray->offset = 0;
19355
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19356
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19358
else if (unlikely (compile_options.bounds_check))
19360
Index: libgfortran/generated/count_8_l.c
19361
===================================================================
19362
--- a/src/libgfortran/generated/count_8_l.c (.../tags/gcc_4_8_3_release)
19363
+++ b/src/libgfortran/generated/count_8_l.c (.../branches/gcc-4_8-branch)
19364
@@ -101,8 +101,7 @@
19365
retarray->offset = 0;
19366
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19368
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19369
- * extent[rank-1];
19370
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19372
if (alloc_size == 0)
19374
@@ -111,7 +110,7 @@
19378
- retarray->base_addr = xmalloc (alloc_size);
19379
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19383
Index: libgfortran/generated/in_pack_i4.c
19384
===================================================================
19385
--- a/src/libgfortran/generated/in_pack_i4.c (.../tags/gcc_4_8_3_release)
19386
+++ b/src/libgfortran/generated/in_pack_i4.c (.../branches/gcc-4_8-branch)
19388
return source->base_addr;
19390
/* Allocate storage for the destination. */
19391
- destptr = (GFC_INTEGER_4 *)xmalloc (ssize * sizeof (GFC_INTEGER_4));
19392
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_4));
19394
src = source->base_addr;
19395
stride0 = stride[0];
19396
Index: libgfortran/generated/minloc0_16_i2.c
19397
===================================================================
19398
--- a/src/libgfortran/generated/minloc0_16_i2.c (.../tags/gcc_4_8_3_release)
19399
+++ b/src/libgfortran/generated/minloc0_16_i2.c (.../branches/gcc-4_8-branch)
19401
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19402
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19403
retarray->offset = 0;
19404
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19405
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19409
@@ -199,7 +199,7 @@
19410
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19411
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19412
retarray->offset = 0;
19413
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19414
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19418
@@ -367,7 +367,7 @@
19419
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19420
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19421
retarray->offset = 0;
19422
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19423
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19425
else if (unlikely (compile_options.bounds_check))
19427
Index: libgfortran/generated/minloc1_8_r8.c
19428
===================================================================
19429
--- a/src/libgfortran/generated/minloc1_8_r8.c (.../tags/gcc_4_8_3_release)
19430
+++ b/src/libgfortran/generated/minloc1_8_r8.c (.../branches/gcc-4_8-branch)
19432
retarray->offset = 0;
19433
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19435
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19436
- * extent[rank-1];
19437
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19439
- retarray->base_addr = xmalloc (alloc_size);
19440
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19441
if (alloc_size == 0)
19443
/* Make sure we have a zero-sized array. */
19444
@@ -294,8 +293,7 @@
19448
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19449
- * extent[rank-1];
19450
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19452
retarray->offset = 0;
19453
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19454
@@ -307,7 +305,7 @@
19458
- retarray->base_addr = xmalloc (alloc_size);
19459
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19463
@@ -485,8 +483,7 @@
19464
retarray->offset = 0;
19465
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19467
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19468
- * extent[rank-1];
19469
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19471
if (alloc_size == 0)
19473
@@ -495,7 +492,7 @@
19477
- retarray->base_addr = xmalloc (alloc_size);
19478
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19482
Index: libgfortran/generated/matmul_c16.c
19483
===================================================================
19484
--- a/src/libgfortran/generated/matmul_c16.c (.../tags/gcc_4_8_3_release)
19485
+++ b/src/libgfortran/generated/matmul_c16.c (.../branches/gcc-4_8-branch)
19486
@@ -124,7 +124,7 @@
19489
retarray->base_addr
19490
- = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) retarray));
19491
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_16));
19492
retarray->offset = 0;
19494
else if (unlikely (compile_options.bounds_check))
19495
Index: libgfortran/generated/minval_i1.c
19496
===================================================================
19497
--- a/src/libgfortran/generated/minval_i1.c (.../tags/gcc_4_8_3_release)
19498
+++ b/src/libgfortran/generated/minval_i1.c (.../branches/gcc-4_8-branch)
19500
retarray->offset = 0;
19501
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19503
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19504
- * extent[rank-1];
19505
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19507
- retarray->base_addr = xmalloc (alloc_size);
19508
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19509
if (alloc_size == 0)
19511
/* Make sure we have a zero-sized array. */
19512
@@ -286,8 +285,7 @@
19516
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19517
- * extent[rank-1];
19518
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19520
retarray->offset = 0;
19521
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19522
@@ -299,7 +297,7 @@
19526
- retarray->base_addr = xmalloc (alloc_size);
19527
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19531
@@ -472,8 +470,7 @@
19532
retarray->offset = 0;
19533
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19535
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19536
- * extent[rank-1];
19537
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19539
if (alloc_size == 0)
19541
@@ -482,7 +479,7 @@
19545
- retarray->base_addr = xmalloc (alloc_size);
19546
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19550
Index: libgfortran/generated/shape_i16.c
19551
===================================================================
19552
--- a/src/libgfortran/generated/shape_i16.c (.../tags/gcc_4_8_3_release)
19553
+++ b/src/libgfortran/generated/shape_i16.c (.../branches/gcc-4_8-branch)
19556
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
19558
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19559
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19562
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
19563
Index: libgfortran/generated/iany_i4.c
19564
===================================================================
19565
--- a/src/libgfortran/generated/iany_i4.c (.../tags/gcc_4_8_3_release)
19566
+++ b/src/libgfortran/generated/iany_i4.c (.../branches/gcc-4_8-branch)
19568
retarray->offset = 0;
19569
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19571
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19572
- * extent[rank-1];
19573
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19575
- retarray->base_addr = xmalloc (alloc_size);
19576
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19577
if (alloc_size == 0)
19579
/* Make sure we have a zero-sized array. */
19580
@@ -272,8 +271,7 @@
19584
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19585
- * extent[rank-1];
19586
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19588
retarray->offset = 0;
19589
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19590
@@ -285,7 +283,7 @@
19594
- retarray->base_addr = xmalloc (alloc_size);
19595
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19599
@@ -430,8 +428,7 @@
19600
retarray->offset = 0;
19601
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19603
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19604
- * extent[rank-1];
19605
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19607
if (alloc_size == 0)
19609
@@ -440,7 +437,7 @@
19613
- retarray->base_addr = xmalloc (alloc_size);
19614
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19618
Index: libgfortran/generated/minloc0_16_r16.c
19619
===================================================================
19620
--- a/src/libgfortran/generated/minloc0_16_r16.c (.../tags/gcc_4_8_3_release)
19621
+++ b/src/libgfortran/generated/minloc0_16_r16.c (.../branches/gcc-4_8-branch)
19623
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19624
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19625
retarray->offset = 0;
19626
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19627
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19631
@@ -199,7 +199,7 @@
19632
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19633
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19634
retarray->offset = 0;
19635
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19636
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19640
@@ -367,7 +367,7 @@
19641
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19642
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19643
retarray->offset = 0;
19644
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19645
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19647
else if (unlikely (compile_options.bounds_check))
19649
Index: libgfortran/generated/product_i16.c
19650
===================================================================
19651
--- a/src/libgfortran/generated/product_i16.c (.../tags/gcc_4_8_3_release)
19652
+++ b/src/libgfortran/generated/product_i16.c (.../branches/gcc-4_8-branch)
19654
retarray->offset = 0;
19655
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19657
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19658
- * extent[rank-1];
19659
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19661
- retarray->base_addr = xmalloc (alloc_size);
19662
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19663
if (alloc_size == 0)
19665
/* Make sure we have a zero-sized array. */
19666
@@ -272,8 +271,7 @@
19670
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19671
- * extent[rank-1];
19672
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19674
retarray->offset = 0;
19675
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19676
@@ -285,7 +283,7 @@
19680
- retarray->base_addr = xmalloc (alloc_size);
19681
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19685
@@ -430,8 +428,7 @@
19686
retarray->offset = 0;
19687
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19689
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19690
- * extent[rank-1];
19691
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19693
if (alloc_size == 0)
19695
@@ -440,7 +437,7 @@
19699
- retarray->base_addr = xmalloc (alloc_size);
19700
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19704
Index: libgfortran/generated/unpack_i1.c
19705
===================================================================
19706
--- a/src/libgfortran/generated/unpack_i1.c (.../tags/gcc_4_8_3_release)
19707
+++ b/src/libgfortran/generated/unpack_i1.c (.../branches/gcc-4_8-branch)
19712
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
19713
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
19717
@@ -244,7 +244,7 @@
19721
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
19722
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
19726
Index: libgfortran/generated/minloc0_4_i4.c
19727
===================================================================
19728
--- a/src/libgfortran/generated/minloc0_4_i4.c (.../tags/gcc_4_8_3_release)
19729
+++ b/src/libgfortran/generated/minloc0_4_i4.c (.../branches/gcc-4_8-branch)
19731
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19732
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19733
retarray->offset = 0;
19734
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19735
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19739
@@ -199,7 +199,7 @@
19740
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19741
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19742
retarray->offset = 0;
19743
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19744
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19748
@@ -367,7 +367,7 @@
19749
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19750
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19751
retarray->offset = 0;
19752
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19753
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19755
else if (unlikely (compile_options.bounds_check))
19757
Index: libgfortran/generated/matmul_i1.c
19758
===================================================================
19759
--- a/src/libgfortran/generated/matmul_i1.c (.../tags/gcc_4_8_3_release)
19760
+++ b/src/libgfortran/generated/matmul_i1.c (.../branches/gcc-4_8-branch)
19761
@@ -124,7 +124,7 @@
19764
retarray->base_addr
19765
- = xmalloc (sizeof (GFC_INTEGER_1) * size0 ((array_t *) retarray));
19766
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_1));
19767
retarray->offset = 0;
19769
else if (unlikely (compile_options.bounds_check))
19770
Index: libgfortran/generated/minval_r4.c
19771
===================================================================
19772
--- a/src/libgfortran/generated/minval_r4.c (.../tags/gcc_4_8_3_release)
19773
+++ b/src/libgfortran/generated/minval_r4.c (.../branches/gcc-4_8-branch)
19775
retarray->offset = 0;
19776
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19778
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19779
- * extent[rank-1];
19780
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19782
- retarray->base_addr = xmalloc (alloc_size);
19783
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
19784
if (alloc_size == 0)
19786
/* Make sure we have a zero-sized array. */
19787
@@ -286,8 +285,7 @@
19791
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19792
- * extent[rank-1];
19793
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19795
retarray->offset = 0;
19796
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19797
@@ -299,7 +297,7 @@
19801
- retarray->base_addr = xmalloc (alloc_size);
19802
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
19806
@@ -472,8 +470,7 @@
19807
retarray->offset = 0;
19808
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19810
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19811
- * extent[rank-1];
19812
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19814
if (alloc_size == 0)
19816
@@ -482,7 +479,7 @@
19820
- retarray->base_addr = xmalloc (alloc_size);
19821
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
19825
Index: libgfortran/generated/spread_i16.c
19826
===================================================================
19827
--- a/src/libgfortran/generated/spread_i16.c (.../tags/gcc_4_8_3_release)
19828
+++ b/src/libgfortran/generated/spread_i16.c (.../branches/gcc-4_8-branch)
19829
@@ -101,8 +101,8 @@
19833
- /* xmalloc allocates a single byte for zero size. */
19834
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_16));
19835
+ /* xmallocarray allocates a single byte for zero size. */
19836
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_16));
19840
@@ -244,7 +244,7 @@
19842
if (ret->base_addr == NULL)
19844
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_16));
19845
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_16));
19847
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
19849
Index: libgfortran/generated/sum_i4.c
19850
===================================================================
19851
--- a/src/libgfortran/generated/sum_i4.c (.../tags/gcc_4_8_3_release)
19852
+++ b/src/libgfortran/generated/sum_i4.c (.../branches/gcc-4_8-branch)
19854
retarray->offset = 0;
19855
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19857
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19858
- * extent[rank-1];
19859
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19861
- retarray->base_addr = xmalloc (alloc_size);
19862
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19863
if (alloc_size == 0)
19865
/* Make sure we have a zero-sized array. */
19866
@@ -272,8 +271,7 @@
19870
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19871
- * extent[rank-1];
19872
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19874
retarray->offset = 0;
19875
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19876
@@ -285,7 +283,7 @@
19880
- retarray->base_addr = xmalloc (alloc_size);
19881
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19885
@@ -430,8 +428,7 @@
19886
retarray->offset = 0;
19887
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19889
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19890
- * extent[rank-1];
19891
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19893
if (alloc_size == 0)
19895
@@ -440,7 +437,7 @@
19899
- retarray->base_addr = xmalloc (alloc_size);
19900
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19904
Index: libgfortran/generated/unpack_r10.c
19905
===================================================================
19906
--- a/src/libgfortran/generated/unpack_r10.c (.../tags/gcc_4_8_3_release)
19907
+++ b/src/libgfortran/generated/unpack_r10.c (.../branches/gcc-4_8-branch)
19912
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
19913
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
19917
@@ -244,7 +244,7 @@
19921
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
19922
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
19926
Index: libgfortran/generated/bessel_r16.c
19927
===================================================================
19928
--- a/src/libgfortran/generated/bessel_r16.c (.../tags/gcc_4_8_3_release)
19929
+++ b/src/libgfortran/generated/bessel_r16.c (.../branches/gcc-4_8-branch)
19932
size_t size = n2 < n1 ? 0 : n2-n1+1;
19933
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
19934
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
19935
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
19939
@@ -126,7 +126,7 @@
19941
size_t size = n2 < n1 ? 0 : n2-n1+1;
19942
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
19943
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
19944
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
19948
@@ -166,7 +166,7 @@
19950
x2rev = GFC_REAL_16_LITERAL(2.)/x;
19952
- for (i = 2; i <= n1+n2; i++)
19953
+ for (i = 2; i <= n2 - n1; i++)
19955
#if defined(GFC_REAL_16_INFINITY)
19956
if (unlikely (last2 == -GFC_REAL_16_INFINITY))
19957
Index: libgfortran/generated/norm2_r8.c
19958
===================================================================
19959
--- a/src/libgfortran/generated/norm2_r8.c (.../tags/gcc_4_8_3_release)
19960
+++ b/src/libgfortran/generated/norm2_r8.c (.../branches/gcc-4_8-branch)
19961
@@ -101,10 +101,9 @@
19962
retarray->offset = 0;
19963
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19965
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19966
- * extent[rank-1];
19967
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19969
- retarray->base_addr = xmalloc (alloc_size);
19970
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19971
if (alloc_size == 0)
19973
/* Make sure we have a zero-sized array. */
19974
Index: libgfortran/generated/spread_i4.c
19975
===================================================================
19976
--- a/src/libgfortran/generated/spread_i4.c (.../tags/gcc_4_8_3_release)
19977
+++ b/src/libgfortran/generated/spread_i4.c (.../branches/gcc-4_8-branch)
19978
@@ -101,8 +101,8 @@
19982
- /* xmalloc allocates a single byte for zero size. */
19983
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_4));
19984
+ /* xmallocarray allocates a single byte for zero size. */
19985
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_4));
19989
@@ -244,7 +244,7 @@
19991
if (ret->base_addr == NULL)
19993
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_4));
19994
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_4));
19996
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
19998
Index: libgfortran/generated/eoshift3_8.c
19999
===================================================================
20000
--- a/src/libgfortran/generated/eoshift3_8.c (.../tags/gcc_4_8_3_release)
20001
+++ b/src/libgfortran/generated/eoshift3_8.c (.../branches/gcc-4_8-branch)
20006
- ret->base_addr = xmalloc (size * arraysize);
20007
+ ret->base_addr = xmallocarray (arraysize, size);
20009
ret->dtype = array->dtype;
20010
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
20011
@@ -107,8 +107,8 @@
20012
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
20015
- /* xmalloc allocates a single byte for zero size. */
20016
- ret->base_addr = xmalloc (size * arraysize);
20017
+ /* xmallocarray allocates a single byte for zero size. */
20018
+ ret->base_addr = xmallocarray (arraysize, size);
20021
else if (unlikely (compile_options.bounds_check))
20022
Index: libgfortran/generated/minloc1_4_i1.c
20023
===================================================================
20024
--- a/src/libgfortran/generated/minloc1_4_i1.c (.../tags/gcc_4_8_3_release)
20025
+++ b/src/libgfortran/generated/minloc1_4_i1.c (.../branches/gcc-4_8-branch)
20027
retarray->offset = 0;
20028
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20030
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20031
- * extent[rank-1];
20032
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20034
- retarray->base_addr = xmalloc (alloc_size);
20035
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20036
if (alloc_size == 0)
20038
/* Make sure we have a zero-sized array. */
20039
@@ -294,8 +293,7 @@
20043
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20044
- * extent[rank-1];
20045
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20047
retarray->offset = 0;
20048
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20049
@@ -307,7 +305,7 @@
20053
- retarray->base_addr = xmalloc (alloc_size);
20054
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20058
@@ -485,8 +483,7 @@
20059
retarray->offset = 0;
20060
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20062
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20063
- * extent[rank-1];
20064
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20066
if (alloc_size == 0)
20068
@@ -495,7 +492,7 @@
20072
- retarray->base_addr = xmalloc (alloc_size);
20073
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20077
Index: libgfortran/generated/minval_i2.c
20078
===================================================================
20079
--- a/src/libgfortran/generated/minval_i2.c (.../tags/gcc_4_8_3_release)
20080
+++ b/src/libgfortran/generated/minval_i2.c (.../branches/gcc-4_8-branch)
20082
retarray->offset = 0;
20083
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20085
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20086
- * extent[rank-1];
20087
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20089
- retarray->base_addr = xmalloc (alloc_size);
20090
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
20091
if (alloc_size == 0)
20093
/* Make sure we have a zero-sized array. */
20094
@@ -286,8 +285,7 @@
20098
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20099
- * extent[rank-1];
20100
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20102
retarray->offset = 0;
20103
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20104
@@ -299,7 +297,7 @@
20108
- retarray->base_addr = xmalloc (alloc_size);
20109
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
20113
@@ -472,8 +470,7 @@
20114
retarray->offset = 0;
20115
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20117
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20118
- * extent[rank-1];
20119
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20121
if (alloc_size == 0)
20123
@@ -482,7 +479,7 @@
20127
- retarray->base_addr = xmalloc (alloc_size);
20128
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
20132
Index: libgfortran/generated/bessel_r8.c
20133
===================================================================
20134
--- a/src/libgfortran/generated/bessel_r8.c (.../tags/gcc_4_8_3_release)
20135
+++ b/src/libgfortran/generated/bessel_r8.c (.../branches/gcc-4_8-branch)
20138
size_t size = n2 < n1 ? 0 : n2-n1+1;
20139
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
20140
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
20141
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
20145
@@ -122,7 +122,7 @@
20147
size_t size = n2 < n1 ? 0 : n2-n1+1;
20148
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
20149
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
20150
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
20154
@@ -162,7 +162,7 @@
20156
x2rev = GFC_REAL_8_LITERAL(2.)/x;
20158
- for (i = 2; i <= n1+n2; i++)
20159
+ for (i = 2; i <= n2 - n1; i++)
20161
#if defined(GFC_REAL_8_INFINITY)
20162
if (unlikely (last2 == -GFC_REAL_8_INFINITY))
20163
Index: libgfortran/generated/unpack_r4.c
20164
===================================================================
20165
--- a/src/libgfortran/generated/unpack_r4.c (.../tags/gcc_4_8_3_release)
20166
+++ b/src/libgfortran/generated/unpack_r4.c (.../branches/gcc-4_8-branch)
20171
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
20172
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
20176
@@ -244,7 +244,7 @@
20180
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
20181
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
20185
Index: libgfortran/generated/product_r8.c
20186
===================================================================
20187
--- a/src/libgfortran/generated/product_r8.c (.../tags/gcc_4_8_3_release)
20188
+++ b/src/libgfortran/generated/product_r8.c (.../branches/gcc-4_8-branch)
20190
retarray->offset = 0;
20191
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20193
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20194
- * extent[rank-1];
20195
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20197
- retarray->base_addr = xmalloc (alloc_size);
20198
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
20199
if (alloc_size == 0)
20201
/* Make sure we have a zero-sized array. */
20202
@@ -272,8 +271,7 @@
20206
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20207
- * extent[rank-1];
20208
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20210
retarray->offset = 0;
20211
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20212
@@ -285,7 +283,7 @@
20216
- retarray->base_addr = xmalloc (alloc_size);
20217
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
20221
@@ -430,8 +428,7 @@
20222
retarray->offset = 0;
20223
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20225
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20226
- * extent[rank-1];
20227
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20229
if (alloc_size == 0)
20231
@@ -440,7 +437,7 @@
20235
- retarray->base_addr = xmalloc (alloc_size);
20236
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
20240
Index: libgfortran/generated/matmul_r4.c
20241
===================================================================
20242
--- a/src/libgfortran/generated/matmul_r4.c (.../tags/gcc_4_8_3_release)
20243
+++ b/src/libgfortran/generated/matmul_r4.c (.../branches/gcc-4_8-branch)
20244
@@ -124,7 +124,7 @@
20247
retarray->base_addr
20248
- = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) retarray));
20249
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_4));
20250
retarray->offset = 0;
20252
else if (unlikely (compile_options.bounds_check))
20253
Index: libgfortran/generated/unpack_i2.c
20254
===================================================================
20255
--- a/src/libgfortran/generated/unpack_i2.c (.../tags/gcc_4_8_3_release)
20256
+++ b/src/libgfortran/generated/unpack_i2.c (.../branches/gcc-4_8-branch)
20261
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
20262
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
20266
@@ -244,7 +244,7 @@
20270
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
20271
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
20275
Index: libgfortran/generated/in_pack_r8.c
20276
===================================================================
20277
--- a/src/libgfortran/generated/in_pack_r8.c (.../tags/gcc_4_8_3_release)
20278
+++ b/src/libgfortran/generated/in_pack_r8.c (.../branches/gcc-4_8-branch)
20280
return source->base_addr;
20282
/* Allocate storage for the destination. */
20283
- destptr = (GFC_REAL_8 *)xmalloc (ssize * sizeof (GFC_REAL_8));
20284
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_8));
20286
src = source->base_addr;
20287
stride0 = stride[0];
20288
Index: libgfortran/generated/maxloc1_4_r16.c
20289
===================================================================
20290
--- a/src/libgfortran/generated/maxloc1_4_r16.c (.../tags/gcc_4_8_3_release)
20291
+++ b/src/libgfortran/generated/maxloc1_4_r16.c (.../branches/gcc-4_8-branch)
20293
retarray->offset = 0;
20294
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20296
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20297
- * extent[rank-1];
20298
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20300
- retarray->base_addr = xmalloc (alloc_size);
20301
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20302
if (alloc_size == 0)
20304
/* Make sure we have a zero-sized array. */
20305
@@ -294,8 +293,7 @@
20309
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20310
- * extent[rank-1];
20311
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20313
retarray->offset = 0;
20314
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20315
@@ -307,7 +305,7 @@
20319
- retarray->base_addr = xmalloc (alloc_size);
20320
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20324
@@ -485,8 +483,7 @@
20325
retarray->offset = 0;
20326
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20328
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20329
- * extent[rank-1];
20330
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20332
if (alloc_size == 0)
20334
@@ -495,7 +492,7 @@
20338
- retarray->base_addr = xmalloc (alloc_size);
20339
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20343
Index: libgfortran/generated/minloc0_8_r16.c
20344
===================================================================
20345
--- a/src/libgfortran/generated/minloc0_8_r16.c (.../tags/gcc_4_8_3_release)
20346
+++ b/src/libgfortran/generated/minloc0_8_r16.c (.../branches/gcc-4_8-branch)
20348
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20349
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20350
retarray->offset = 0;
20351
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20352
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20356
@@ -199,7 +199,7 @@
20357
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20358
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20359
retarray->offset = 0;
20360
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20361
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20365
@@ -367,7 +367,7 @@
20366
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20367
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20368
retarray->offset = 0;
20369
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20370
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20372
else if (unlikely (compile_options.bounds_check))
20374
Index: libgfortran/generated/reshape_c8.c
20375
===================================================================
20376
--- a/src/libgfortran/generated/reshape_c8.c (.../tags/gcc_4_8_3_release)
20377
+++ b/src/libgfortran/generated/reshape_c8.c (.../branches/gcc-4_8-branch)
20378
@@ -111,11 +111,11 @@
20381
if (unlikely (rs < 1))
20385
- alloc_size = rs * sizeof (GFC_COMPLEX_8);
20388
- ret->base_addr = xmalloc (alloc_size);
20389
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
20390
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
20393
Index: libgfortran/generated/iparity_i8.c
20394
===================================================================
20395
--- a/src/libgfortran/generated/iparity_i8.c (.../tags/gcc_4_8_3_release)
20396
+++ b/src/libgfortran/generated/iparity_i8.c (.../branches/gcc-4_8-branch)
20398
retarray->offset = 0;
20399
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20401
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20402
- * extent[rank-1];
20403
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20405
- retarray->base_addr = xmalloc (alloc_size);
20406
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20407
if (alloc_size == 0)
20409
/* Make sure we have a zero-sized array. */
20410
@@ -272,8 +271,7 @@
20414
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20415
- * extent[rank-1];
20416
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20418
retarray->offset = 0;
20419
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20420
@@ -285,7 +283,7 @@
20424
- retarray->base_addr = xmalloc (alloc_size);
20425
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20429
@@ -430,8 +428,7 @@
20430
retarray->offset = 0;
20431
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20433
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20434
- * extent[rank-1];
20435
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20437
if (alloc_size == 0)
20439
@@ -440,7 +437,7 @@
20443
- retarray->base_addr = xmalloc (alloc_size);
20444
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20448
Index: libgfortran/generated/count_1_l.c
20449
===================================================================
20450
--- a/src/libgfortran/generated/count_1_l.c (.../tags/gcc_4_8_3_release)
20451
+++ b/src/libgfortran/generated/count_1_l.c (.../branches/gcc-4_8-branch)
20452
@@ -101,8 +101,7 @@
20453
retarray->offset = 0;
20454
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20456
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20457
- * extent[rank-1];
20458
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20460
if (alloc_size == 0)
20462
@@ -111,7 +110,7 @@
20466
- retarray->base_addr = xmalloc (alloc_size);
20467
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
20471
Index: libgfortran/generated/maxloc0_8_i4.c
20472
===================================================================
20473
--- a/src/libgfortran/generated/maxloc0_8_i4.c (.../tags/gcc_4_8_3_release)
20474
+++ b/src/libgfortran/generated/maxloc0_8_i4.c (.../branches/gcc-4_8-branch)
20476
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20477
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20478
retarray->offset = 0;
20479
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20480
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20484
@@ -199,7 +199,7 @@
20485
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20486
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20487
retarray->offset = 0;
20488
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20489
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20493
@@ -367,7 +367,7 @@
20494
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20495
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20496
retarray->offset = 0;
20497
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20498
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20500
else if (unlikely (compile_options.bounds_check))
20502
Index: libgfortran/generated/matmul_i2.c
20503
===================================================================
20504
--- a/src/libgfortran/generated/matmul_i2.c (.../tags/gcc_4_8_3_release)
20505
+++ b/src/libgfortran/generated/matmul_i2.c (.../branches/gcc-4_8-branch)
20506
@@ -124,7 +124,7 @@
20509
retarray->base_addr
20510
- = xmalloc (sizeof (GFC_INTEGER_2) * size0 ((array_t *) retarray));
20511
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_2));
20512
retarray->offset = 0;
20514
else if (unlikely (compile_options.bounds_check))
20515
Index: libgfortran/generated/minloc1_4_r4.c
20516
===================================================================
20517
--- a/src/libgfortran/generated/minloc1_4_r4.c (.../tags/gcc_4_8_3_release)
20518
+++ b/src/libgfortran/generated/minloc1_4_r4.c (.../branches/gcc-4_8-branch)
20520
retarray->offset = 0;
20521
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20523
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20524
- * extent[rank-1];
20525
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20527
- retarray->base_addr = xmalloc (alloc_size);
20528
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20529
if (alloc_size == 0)
20531
/* Make sure we have a zero-sized array. */
20532
@@ -294,8 +293,7 @@
20536
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20537
- * extent[rank-1];
20538
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20540
retarray->offset = 0;
20541
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20542
@@ -307,7 +305,7 @@
20546
- retarray->base_addr = xmalloc (alloc_size);
20547
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20551
@@ -485,8 +483,7 @@
20552
retarray->offset = 0;
20553
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20555
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20556
- * extent[rank-1];
20557
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20559
if (alloc_size == 0)
20561
@@ -495,7 +492,7 @@
20565
- retarray->base_addr = xmalloc (alloc_size);
20566
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20570
Index: libgfortran/generated/transpose_i16.c
20571
===================================================================
20572
--- a/src/libgfortran/generated/transpose_i16.c (.../tags/gcc_4_8_3_release)
20573
+++ b/src/libgfortran/generated/transpose_i16.c (.../branches/gcc-4_8-branch)
20575
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
20576
GFC_DESCRIPTOR_EXTENT(source, 1));
20578
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) ret));
20579
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
20580
+ sizeof (GFC_INTEGER_16));
20582
} else if (unlikely (compile_options.bounds_check))
20584
Index: libgfortran/generated/minloc0_16_i4.c
20585
===================================================================
20586
--- a/src/libgfortran/generated/minloc0_16_i4.c (.../tags/gcc_4_8_3_release)
20587
+++ b/src/libgfortran/generated/minloc0_16_i4.c (.../branches/gcc-4_8-branch)
20589
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20590
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20591
retarray->offset = 0;
20592
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20593
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20597
@@ -199,7 +199,7 @@
20598
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20599
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20600
retarray->offset = 0;
20601
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20602
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20606
@@ -367,7 +367,7 @@
20607
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20608
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20609
retarray->offset = 0;
20610
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20611
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20613
else if (unlikely (compile_options.bounds_check))
20615
Index: libgfortran/generated/transpose_i4.c
20616
===================================================================
20617
--- a/src/libgfortran/generated/transpose_i4.c (.../tags/gcc_4_8_3_release)
20618
+++ b/src/libgfortran/generated/transpose_i4.c (.../branches/gcc-4_8-branch)
20620
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
20621
GFC_DESCRIPTOR_EXTENT(source, 1));
20623
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) ret));
20624
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
20625
+ sizeof (GFC_INTEGER_4));
20627
} else if (unlikely (compile_options.bounds_check))
20629
Index: libgfortran/generated/maxloc1_16_i8.c
20630
===================================================================
20631
--- a/src/libgfortran/generated/maxloc1_16_i8.c (.../tags/gcc_4_8_3_release)
20632
+++ b/src/libgfortran/generated/maxloc1_16_i8.c (.../branches/gcc-4_8-branch)
20634
retarray->offset = 0;
20635
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20637
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20638
- * extent[rank-1];
20639
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20641
- retarray->base_addr = xmalloc (alloc_size);
20642
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20643
if (alloc_size == 0)
20645
/* Make sure we have a zero-sized array. */
20646
@@ -294,8 +293,7 @@
20650
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20651
- * extent[rank-1];
20652
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20654
retarray->offset = 0;
20655
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20656
@@ -307,7 +305,7 @@
20660
- retarray->base_addr = xmalloc (alloc_size);
20661
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20665
@@ -485,8 +483,7 @@
20666
retarray->offset = 0;
20667
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20669
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20670
- * extent[rank-1];
20671
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20673
if (alloc_size == 0)
20675
@@ -495,7 +492,7 @@
20679
- retarray->base_addr = xmalloc (alloc_size);
20680
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20684
Index: libgfortran/generated/minloc1_4_i2.c
20685
===================================================================
20686
--- a/src/libgfortran/generated/minloc1_4_i2.c (.../tags/gcc_4_8_3_release)
20687
+++ b/src/libgfortran/generated/minloc1_4_i2.c (.../branches/gcc-4_8-branch)
20689
retarray->offset = 0;
20690
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20692
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20693
- * extent[rank-1];
20694
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20696
- retarray->base_addr = xmalloc (alloc_size);
20697
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20698
if (alloc_size == 0)
20700
/* Make sure we have a zero-sized array. */
20701
@@ -294,8 +293,7 @@
20705
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20706
- * extent[rank-1];
20707
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20709
retarray->offset = 0;
20710
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20711
@@ -307,7 +305,7 @@
20715
- retarray->base_addr = xmalloc (alloc_size);
20716
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20720
@@ -485,8 +483,7 @@
20721
retarray->offset = 0;
20722
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20724
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20725
- * extent[rank-1];
20726
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20728
if (alloc_size == 0)
20730
@@ -495,7 +492,7 @@
20734
- retarray->base_addr = xmalloc (alloc_size);
20735
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20739
Index: libgfortran/generated/matmul_l16.c
20740
===================================================================
20741
--- a/src/libgfortran/generated/matmul_l16.c (.../tags/gcc_4_8_3_release)
20742
+++ b/src/libgfortran/generated/matmul_l16.c (.../branches/gcc-4_8-branch)
20746
retarray->base_addr
20747
- = xmalloc (sizeof (GFC_LOGICAL_16) * size0 ((array_t *) retarray));
20748
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_16));
20749
retarray->offset = 0;
20751
else if (unlikely (compile_options.bounds_check))
20752
Index: libgfortran/generated/maxloc1_8_i1.c
20753
===================================================================
20754
--- a/src/libgfortran/generated/maxloc1_8_i1.c (.../tags/gcc_4_8_3_release)
20755
+++ b/src/libgfortran/generated/maxloc1_8_i1.c (.../branches/gcc-4_8-branch)
20757
retarray->offset = 0;
20758
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20760
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20761
- * extent[rank-1];
20762
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20764
- retarray->base_addr = xmalloc (alloc_size);
20765
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20766
if (alloc_size == 0)
20768
/* Make sure we have a zero-sized array. */
20769
@@ -294,8 +293,7 @@
20773
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20774
- * extent[rank-1];
20775
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20777
retarray->offset = 0;
20778
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20779
@@ -307,7 +305,7 @@
20783
- retarray->base_addr = xmalloc (alloc_size);
20784
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20788
@@ -485,8 +483,7 @@
20789
retarray->offset = 0;
20790
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20792
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20793
- * extent[rank-1];
20794
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20796
if (alloc_size == 0)
20798
@@ -495,7 +492,7 @@
20802
- retarray->base_addr = xmalloc (alloc_size);
20803
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20807
Index: libgfortran/generated/minloc1_8_i8.c
20808
===================================================================
20809
--- a/src/libgfortran/generated/minloc1_8_i8.c (.../tags/gcc_4_8_3_release)
20810
+++ b/src/libgfortran/generated/minloc1_8_i8.c (.../branches/gcc-4_8-branch)
20812
retarray->offset = 0;
20813
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20815
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20816
- * extent[rank-1];
20817
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20819
- retarray->base_addr = xmalloc (alloc_size);
20820
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20821
if (alloc_size == 0)
20823
/* Make sure we have a zero-sized array. */
20824
@@ -294,8 +293,7 @@
20828
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20829
- * extent[rank-1];
20830
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20832
retarray->offset = 0;
20833
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20834
@@ -307,7 +305,7 @@
20838
- retarray->base_addr = xmalloc (alloc_size);
20839
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20843
@@ -485,8 +483,7 @@
20844
retarray->offset = 0;
20845
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20847
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20848
- * extent[rank-1];
20849
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20851
if (alloc_size == 0)
20853
@@ -495,7 +492,7 @@
20857
- retarray->base_addr = xmalloc (alloc_size);
20858
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20862
Index: libgfortran/generated/minloc0_4_r8.c
20863
===================================================================
20864
--- a/src/libgfortran/generated/minloc0_4_r8.c (.../tags/gcc_4_8_3_release)
20865
+++ b/src/libgfortran/generated/minloc0_4_r8.c (.../branches/gcc-4_8-branch)
20867
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20868
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20869
retarray->offset = 0;
20870
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20871
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20875
@@ -199,7 +199,7 @@
20876
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20877
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20878
retarray->offset = 0;
20879
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20880
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20884
@@ -367,7 +367,7 @@
20885
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20886
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20887
retarray->offset = 0;
20888
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20889
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20891
else if (unlikely (compile_options.bounds_check))
20893
Index: libgfortran/generated/product_r16.c
20894
===================================================================
20895
--- a/src/libgfortran/generated/product_r16.c (.../tags/gcc_4_8_3_release)
20896
+++ b/src/libgfortran/generated/product_r16.c (.../branches/gcc-4_8-branch)
20898
retarray->offset = 0;
20899
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20901
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20902
- * extent[rank-1];
20903
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20905
- retarray->base_addr = xmalloc (alloc_size);
20906
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
20907
if (alloc_size == 0)
20909
/* Make sure we have a zero-sized array. */
20910
@@ -272,8 +271,7 @@
20914
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20915
- * extent[rank-1];
20916
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20918
retarray->offset = 0;
20919
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20920
@@ -285,7 +283,7 @@
20924
- retarray->base_addr = xmalloc (alloc_size);
20925
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
20929
@@ -430,8 +428,7 @@
20930
retarray->offset = 0;
20931
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20933
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20934
- * extent[rank-1];
20935
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20937
if (alloc_size == 0)
20939
@@ -440,7 +437,7 @@
20943
- retarray->base_addr = xmalloc (alloc_size);
20944
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
20948
Index: libgfortran/generated/sum_r8.c
20949
===================================================================
20950
--- a/src/libgfortran/generated/sum_r8.c (.../tags/gcc_4_8_3_release)
20951
+++ b/src/libgfortran/generated/sum_r8.c (.../branches/gcc-4_8-branch)
20953
retarray->offset = 0;
20954
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20956
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20957
- * extent[rank-1];
20958
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20960
- retarray->base_addr = xmalloc (alloc_size);
20961
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
20962
if (alloc_size == 0)
20964
/* Make sure we have a zero-sized array. */
20965
@@ -272,8 +271,7 @@
20969
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20970
- * extent[rank-1];
20971
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20973
retarray->offset = 0;
20974
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20975
@@ -285,7 +283,7 @@
20979
- retarray->base_addr = xmalloc (alloc_size);
20980
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
20984
@@ -430,8 +428,7 @@
20985
retarray->offset = 0;
20986
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20988
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20989
- * extent[rank-1];
20990
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20992
if (alloc_size == 0)
20994
@@ -440,7 +437,7 @@
20998
- retarray->base_addr = xmalloc (alloc_size);
20999
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
21003
Index: libgfortran/generated/norm2_r10.c
21004
===================================================================
21005
--- a/src/libgfortran/generated/norm2_r10.c (.../tags/gcc_4_8_3_release)
21006
+++ b/src/libgfortran/generated/norm2_r10.c (.../branches/gcc-4_8-branch)
21007
@@ -101,10 +101,9 @@
21008
retarray->offset = 0;
21009
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21011
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21012
- * extent[rank-1];
21013
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21015
- retarray->base_addr = xmalloc (alloc_size);
21016
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21017
if (alloc_size == 0)
21019
/* Make sure we have a zero-sized array. */
21020
Index: libgfortran/generated/unpack_c10.c
21021
===================================================================
21022
--- a/src/libgfortran/generated/unpack_c10.c (.../tags/gcc_4_8_3_release)
21023
+++ b/src/libgfortran/generated/unpack_c10.c (.../branches/gcc-4_8-branch)
21028
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
21029
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
21033
@@ -244,7 +244,7 @@
21037
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
21038
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
21042
Index: libgfortran/generated/spread_r8.c
21043
===================================================================
21044
--- a/src/libgfortran/generated/spread_r8.c (.../tags/gcc_4_8_3_release)
21045
+++ b/src/libgfortran/generated/spread_r8.c (.../branches/gcc-4_8-branch)
21046
@@ -101,8 +101,8 @@
21050
- /* xmalloc allocates a single byte for zero size. */
21051
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_8));
21052
+ /* xmallocarray allocates a single byte for zero size. */
21053
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_8));
21057
@@ -244,7 +244,7 @@
21059
if (ret->base_addr == NULL)
21061
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_8));
21062
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_8));
21064
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
21066
Index: libgfortran/generated/minloc1_16_i16.c
21067
===================================================================
21068
--- a/src/libgfortran/generated/minloc1_16_i16.c (.../tags/gcc_4_8_3_release)
21069
+++ b/src/libgfortran/generated/minloc1_16_i16.c (.../branches/gcc-4_8-branch)
21071
retarray->offset = 0;
21072
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21074
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21075
- * extent[rank-1];
21076
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21078
- retarray->base_addr = xmalloc (alloc_size);
21079
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21080
if (alloc_size == 0)
21082
/* Make sure we have a zero-sized array. */
21083
@@ -294,8 +293,7 @@
21087
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21088
- * extent[rank-1];
21089
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21091
retarray->offset = 0;
21092
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21093
@@ -307,7 +305,7 @@
21097
- retarray->base_addr = xmalloc (alloc_size);
21098
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21102
@@ -485,8 +483,7 @@
21103
retarray->offset = 0;
21104
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21106
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21107
- * extent[rank-1];
21108
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21110
if (alloc_size == 0)
21112
@@ -495,7 +492,7 @@
21116
- retarray->base_addr = xmalloc (alloc_size);
21117
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21121
Index: libgfortran/generated/maxloc1_8_r4.c
21122
===================================================================
21123
--- a/src/libgfortran/generated/maxloc1_8_r4.c (.../tags/gcc_4_8_3_release)
21124
+++ b/src/libgfortran/generated/maxloc1_8_r4.c (.../branches/gcc-4_8-branch)
21126
retarray->offset = 0;
21127
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21129
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21130
- * extent[rank-1];
21131
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21133
- retarray->base_addr = xmalloc (alloc_size);
21134
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21135
if (alloc_size == 0)
21137
/* Make sure we have a zero-sized array. */
21138
@@ -294,8 +293,7 @@
21142
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21143
- * extent[rank-1];
21144
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21146
retarray->offset = 0;
21147
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21148
@@ -307,7 +305,7 @@
21152
- retarray->base_addr = xmalloc (alloc_size);
21153
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21157
@@ -485,8 +483,7 @@
21158
retarray->offset = 0;
21159
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21161
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21162
- * extent[rank-1];
21163
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21165
if (alloc_size == 0)
21167
@@ -495,7 +492,7 @@
21171
- retarray->base_addr = xmalloc (alloc_size);
21172
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21176
Index: libgfortran/generated/minloc1_16_i1.c
21177
===================================================================
21178
--- a/src/libgfortran/generated/minloc1_16_i1.c (.../tags/gcc_4_8_3_release)
21179
+++ b/src/libgfortran/generated/minloc1_16_i1.c (.../branches/gcc-4_8-branch)
21181
retarray->offset = 0;
21182
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21184
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21185
- * extent[rank-1];
21186
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21188
- retarray->base_addr = xmalloc (alloc_size);
21189
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21190
if (alloc_size == 0)
21192
/* Make sure we have a zero-sized array. */
21193
@@ -294,8 +293,7 @@
21197
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21198
- * extent[rank-1];
21199
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21201
retarray->offset = 0;
21202
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21203
@@ -307,7 +305,7 @@
21207
- retarray->base_addr = xmalloc (alloc_size);
21208
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21212
@@ -485,8 +483,7 @@
21213
retarray->offset = 0;
21214
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21216
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21217
- * extent[rank-1];
21218
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21220
if (alloc_size == 0)
21222
@@ -495,7 +492,7 @@
21226
- retarray->base_addr = xmalloc (alloc_size);
21227
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21231
Index: libgfortran/generated/spread_r16.c
21232
===================================================================
21233
--- a/src/libgfortran/generated/spread_r16.c (.../tags/gcc_4_8_3_release)
21234
+++ b/src/libgfortran/generated/spread_r16.c (.../branches/gcc-4_8-branch)
21235
@@ -101,8 +101,8 @@
21239
- /* xmalloc allocates a single byte for zero size. */
21240
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_16));
21241
+ /* xmallocarray allocates a single byte for zero size. */
21242
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_16));
21246
@@ -244,7 +244,7 @@
21248
if (ret->base_addr == NULL)
21250
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_16));
21251
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_16));
21253
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
21255
Index: libgfortran/generated/pack_c8.c
21256
===================================================================
21257
--- a/src/libgfortran/generated/pack_c8.c (.../tags/gcc_4_8_3_release)
21258
+++ b/src/libgfortran/generated/pack_c8.c (.../branches/gcc-4_8-branch)
21259
@@ -167,8 +167,8 @@
21263
- /* xmalloc allocates a single byte for zero size. */
21264
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * total);
21265
+ /* xmallocarray allocates a single byte for zero size. */
21266
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_8));
21270
Index: libgfortran/generated/minval_r10.c
21271
===================================================================
21272
--- a/src/libgfortran/generated/minval_r10.c (.../tags/gcc_4_8_3_release)
21273
+++ b/src/libgfortran/generated/minval_r10.c (.../branches/gcc-4_8-branch)
21275
retarray->offset = 0;
21276
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21278
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21279
- * extent[rank-1];
21280
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21282
- retarray->base_addr = xmalloc (alloc_size);
21283
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21284
if (alloc_size == 0)
21286
/* Make sure we have a zero-sized array. */
21287
@@ -286,8 +285,7 @@
21291
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21292
- * extent[rank-1];
21293
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21295
retarray->offset = 0;
21296
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21297
@@ -299,7 +297,7 @@
21301
- retarray->base_addr = xmalloc (alloc_size);
21302
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21306
@@ -472,8 +470,7 @@
21307
retarray->offset = 0;
21308
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21310
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21311
- * extent[rank-1];
21312
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21314
if (alloc_size == 0)
21316
@@ -482,7 +479,7 @@
21320
- retarray->base_addr = xmalloc (alloc_size);
21321
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
21325
Index: libgfortran/generated/parity_l8.c
21326
===================================================================
21327
--- a/src/libgfortran/generated/parity_l8.c (.../tags/gcc_4_8_3_release)
21328
+++ b/src/libgfortran/generated/parity_l8.c (.../branches/gcc-4_8-branch)
21330
retarray->offset = 0;
21331
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21333
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21334
- * extent[rank-1];
21335
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21337
- retarray->base_addr = xmalloc (alloc_size);
21338
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
21339
if (alloc_size == 0)
21341
/* Make sure we have a zero-sized array. */
21342
Index: libgfortran/generated/minval_i4.c
21343
===================================================================
21344
--- a/src/libgfortran/generated/minval_i4.c (.../tags/gcc_4_8_3_release)
21345
+++ b/src/libgfortran/generated/minval_i4.c (.../branches/gcc-4_8-branch)
21347
retarray->offset = 0;
21348
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21350
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21351
- * extent[rank-1];
21352
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21354
- retarray->base_addr = xmalloc (alloc_size);
21355
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21356
if (alloc_size == 0)
21358
/* Make sure we have a zero-sized array. */
21359
@@ -286,8 +285,7 @@
21363
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21364
- * extent[rank-1];
21365
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21367
retarray->offset = 0;
21368
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21369
@@ -299,7 +297,7 @@
21373
- retarray->base_addr = xmalloc (alloc_size);
21374
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21378
@@ -472,8 +470,7 @@
21379
retarray->offset = 0;
21380
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21382
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21383
- * extent[rank-1];
21384
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21386
if (alloc_size == 0)
21388
@@ -482,7 +479,7 @@
21392
- retarray->base_addr = xmalloc (alloc_size);
21393
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21397
Index: libgfortran/generated/maxloc1_8_i2.c
21398
===================================================================
21399
--- a/src/libgfortran/generated/maxloc1_8_i2.c (.../tags/gcc_4_8_3_release)
21400
+++ b/src/libgfortran/generated/maxloc1_8_i2.c (.../branches/gcc-4_8-branch)
21402
retarray->offset = 0;
21403
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21405
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21406
- * extent[rank-1];
21407
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21409
- retarray->base_addr = xmalloc (alloc_size);
21410
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21411
if (alloc_size == 0)
21413
/* Make sure we have a zero-sized array. */
21414
@@ -294,8 +293,7 @@
21418
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21419
- * extent[rank-1];
21420
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21422
retarray->offset = 0;
21423
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21424
@@ -307,7 +305,7 @@
21428
- retarray->base_addr = xmalloc (alloc_size);
21429
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21433
@@ -485,8 +483,7 @@
21434
retarray->offset = 0;
21435
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21437
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21438
- * extent[rank-1];
21439
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21441
if (alloc_size == 0)
21443
@@ -495,7 +492,7 @@
21447
- retarray->base_addr = xmalloc (alloc_size);
21448
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21452
Index: libgfortran/generated/any_l8.c
21453
===================================================================
21454
--- a/src/libgfortran/generated/any_l8.c (.../tags/gcc_4_8_3_release)
21455
+++ b/src/libgfortran/generated/any_l8.c (.../branches/gcc-4_8-branch)
21456
@@ -101,8 +101,7 @@
21457
retarray->offset = 0;
21458
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21460
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21461
- * extent[rank-1];
21462
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21464
if (alloc_size == 0)
21466
@@ -111,7 +110,7 @@
21470
- retarray->base_addr = xmalloc (alloc_size);
21471
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
21475
Index: libgfortran/generated/maxloc0_16_r10.c
21476
===================================================================
21477
--- a/src/libgfortran/generated/maxloc0_16_r10.c (.../tags/gcc_4_8_3_release)
21478
+++ b/src/libgfortran/generated/maxloc0_16_r10.c (.../branches/gcc-4_8-branch)
21480
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21481
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21482
retarray->offset = 0;
21483
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21484
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21488
@@ -199,7 +199,7 @@
21489
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21490
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21491
retarray->offset = 0;
21492
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21493
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21497
@@ -367,7 +367,7 @@
21498
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21499
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21500
retarray->offset = 0;
21501
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21502
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21504
else if (unlikely (compile_options.bounds_check))
21506
Index: libgfortran/generated/minloc0_4_i16.c
21507
===================================================================
21508
--- a/src/libgfortran/generated/minloc0_4_i16.c (.../tags/gcc_4_8_3_release)
21509
+++ b/src/libgfortran/generated/minloc0_4_i16.c (.../branches/gcc-4_8-branch)
21511
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21512
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21513
retarray->offset = 0;
21514
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21515
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21519
@@ -199,7 +199,7 @@
21520
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21521
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21522
retarray->offset = 0;
21523
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21524
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21528
@@ -367,7 +367,7 @@
21529
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21530
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21531
retarray->offset = 0;
21532
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21533
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21535
else if (unlikely (compile_options.bounds_check))
21537
Index: libgfortran/generated/maxloc0_8_r8.c
21538
===================================================================
21539
--- a/src/libgfortran/generated/maxloc0_8_r8.c (.../tags/gcc_4_8_3_release)
21540
+++ b/src/libgfortran/generated/maxloc0_8_r8.c (.../branches/gcc-4_8-branch)
21542
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21543
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21544
retarray->offset = 0;
21545
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21546
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21550
@@ -199,7 +199,7 @@
21551
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21552
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21553
retarray->offset = 0;
21554
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21555
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21559
@@ -367,7 +367,7 @@
21560
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21561
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21562
retarray->offset = 0;
21563
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21564
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21566
else if (unlikely (compile_options.bounds_check))
21568
Index: libgfortran/generated/minloc1_4_r10.c
21569
===================================================================
21570
--- a/src/libgfortran/generated/minloc1_4_r10.c (.../tags/gcc_4_8_3_release)
21571
+++ b/src/libgfortran/generated/minloc1_4_r10.c (.../branches/gcc-4_8-branch)
21573
retarray->offset = 0;
21574
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21576
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21577
- * extent[rank-1];
21578
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21580
- retarray->base_addr = xmalloc (alloc_size);
21581
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21582
if (alloc_size == 0)
21584
/* Make sure we have a zero-sized array. */
21585
@@ -294,8 +293,7 @@
21589
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21590
- * extent[rank-1];
21591
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21593
retarray->offset = 0;
21594
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21595
@@ -307,7 +305,7 @@
21599
- retarray->base_addr = xmalloc (alloc_size);
21600
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21604
@@ -485,8 +483,7 @@
21605
retarray->offset = 0;
21606
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21608
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21609
- * extent[rank-1];
21610
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21612
if (alloc_size == 0)
21614
@@ -495,7 +492,7 @@
21618
- retarray->base_addr = xmalloc (alloc_size);
21619
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21623
Index: libgfortran/generated/minloc1_8_i16.c
21624
===================================================================
21625
--- a/src/libgfortran/generated/minloc1_8_i16.c (.../tags/gcc_4_8_3_release)
21626
+++ b/src/libgfortran/generated/minloc1_8_i16.c (.../branches/gcc-4_8-branch)
21628
retarray->offset = 0;
21629
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21631
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21632
- * extent[rank-1];
21633
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21635
- retarray->base_addr = xmalloc (alloc_size);
21636
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21637
if (alloc_size == 0)
21639
/* Make sure we have a zero-sized array. */
21640
@@ -294,8 +293,7 @@
21644
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21645
- * extent[rank-1];
21646
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21648
retarray->offset = 0;
21649
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21650
@@ -307,7 +305,7 @@
21654
- retarray->base_addr = xmalloc (alloc_size);
21655
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21659
@@ -485,8 +483,7 @@
21660
retarray->offset = 0;
21661
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21663
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21664
- * extent[rank-1];
21665
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21667
if (alloc_size == 0)
21669
@@ -495,7 +492,7 @@
21673
- retarray->base_addr = xmalloc (alloc_size);
21674
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21678
Index: libgfortran/generated/maxloc0_8_r10.c
21679
===================================================================
21680
--- a/src/libgfortran/generated/maxloc0_8_r10.c (.../tags/gcc_4_8_3_release)
21681
+++ b/src/libgfortran/generated/maxloc0_8_r10.c (.../branches/gcc-4_8-branch)
21683
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21684
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21685
retarray->offset = 0;
21686
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21687
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21691
@@ -199,7 +199,7 @@
21692
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21693
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21694
retarray->offset = 0;
21695
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21696
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21700
@@ -367,7 +367,7 @@
21701
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21702
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21703
retarray->offset = 0;
21704
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21705
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21707
else if (unlikely (compile_options.bounds_check))
21709
Index: libgfortran/generated/unpack_i4.c
21710
===================================================================
21711
--- a/src/libgfortran/generated/unpack_i4.c (.../tags/gcc_4_8_3_release)
21712
+++ b/src/libgfortran/generated/unpack_i4.c (.../branches/gcc-4_8-branch)
21717
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
21718
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
21722
@@ -244,7 +244,7 @@
21726
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
21727
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
21731
Index: libgfortran/generated/minloc1_16_r4.c
21732
===================================================================
21733
--- a/src/libgfortran/generated/minloc1_16_r4.c (.../tags/gcc_4_8_3_release)
21734
+++ b/src/libgfortran/generated/minloc1_16_r4.c (.../branches/gcc-4_8-branch)
21736
retarray->offset = 0;
21737
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21739
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21740
- * extent[rank-1];
21741
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21743
- retarray->base_addr = xmalloc (alloc_size);
21744
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21745
if (alloc_size == 0)
21747
/* Make sure we have a zero-sized array. */
21748
@@ -294,8 +293,7 @@
21752
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21753
- * extent[rank-1];
21754
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21756
retarray->offset = 0;
21757
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21758
@@ -307,7 +305,7 @@
21762
- retarray->base_addr = xmalloc (alloc_size);
21763
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21767
@@ -485,8 +483,7 @@
21768
retarray->offset = 0;
21769
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21771
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21772
- * extent[rank-1];
21773
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21775
if (alloc_size == 0)
21777
@@ -495,7 +492,7 @@
21781
- retarray->base_addr = xmalloc (alloc_size);
21782
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21786
Index: libgfortran/generated/product_i8.c
21787
===================================================================
21788
--- a/src/libgfortran/generated/product_i8.c (.../tags/gcc_4_8_3_release)
21789
+++ b/src/libgfortran/generated/product_i8.c (.../branches/gcc-4_8-branch)
21791
retarray->offset = 0;
21792
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21794
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21795
- * extent[rank-1];
21796
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21798
- retarray->base_addr = xmalloc (alloc_size);
21799
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21800
if (alloc_size == 0)
21802
/* Make sure we have a zero-sized array. */
21803
@@ -272,8 +271,7 @@
21807
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21808
- * extent[rank-1];
21809
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21811
retarray->offset = 0;
21812
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21813
@@ -285,7 +283,7 @@
21817
- retarray->base_addr = xmalloc (alloc_size);
21818
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21822
@@ -430,8 +428,7 @@
21823
retarray->offset = 0;
21824
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21826
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21827
- * extent[rank-1];
21828
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21830
if (alloc_size == 0)
21832
@@ -440,7 +437,7 @@
21836
- retarray->base_addr = xmalloc (alloc_size);
21837
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21841
Index: libgfortran/generated/minloc0_16_r8.c
21842
===================================================================
21843
--- a/src/libgfortran/generated/minloc0_16_r8.c (.../tags/gcc_4_8_3_release)
21844
+++ b/src/libgfortran/generated/minloc0_16_r8.c (.../branches/gcc-4_8-branch)
21846
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21847
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21848
retarray->offset = 0;
21849
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21850
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21854
@@ -199,7 +199,7 @@
21855
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21856
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21857
retarray->offset = 0;
21858
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21859
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21863
@@ -367,7 +367,7 @@
21864
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21865
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21866
retarray->offset = 0;
21867
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
21868
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
21870
else if (unlikely (compile_options.bounds_check))
21872
Index: libgfortran/generated/count_2_l.c
21873
===================================================================
21874
--- a/src/libgfortran/generated/count_2_l.c (.../tags/gcc_4_8_3_release)
21875
+++ b/src/libgfortran/generated/count_2_l.c (.../branches/gcc-4_8-branch)
21876
@@ -101,8 +101,7 @@
21877
retarray->offset = 0;
21878
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21880
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21881
- * extent[rank-1];
21882
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21884
if (alloc_size == 0)
21886
@@ -111,7 +110,7 @@
21890
- retarray->base_addr = xmalloc (alloc_size);
21891
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
21895
Index: libgfortran/generated/transpose_r8.c
21896
===================================================================
21897
--- a/src/libgfortran/generated/transpose_r8.c (.../tags/gcc_4_8_3_release)
21898
+++ b/src/libgfortran/generated/transpose_r8.c (.../branches/gcc-4_8-branch)
21900
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
21901
GFC_DESCRIPTOR_EXTENT(source, 1));
21903
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) ret));
21904
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
21905
+ sizeof (GFC_REAL_8));
21907
} else if (unlikely (compile_options.bounds_check))
21909
Index: libgfortran/generated/cshift1_8.c
21910
===================================================================
21911
--- a/src/libgfortran/generated/cshift1_8.c (.../tags/gcc_4_8_3_release)
21912
+++ b/src/libgfortran/generated/cshift1_8.c (.../branches/gcc-4_8-branch)
21917
- ret->base_addr = xmalloc (size * arraysize);
21918
+ ret->base_addr = xmallocarray (arraysize, size);
21920
ret->dtype = array->dtype;
21921
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
21922
Index: libgfortran/generated/matmul_i4.c
21923
===================================================================
21924
--- a/src/libgfortran/generated/matmul_i4.c (.../tags/gcc_4_8_3_release)
21925
+++ b/src/libgfortran/generated/matmul_i4.c (.../branches/gcc-4_8-branch)
21926
@@ -124,7 +124,7 @@
21929
retarray->base_addr
21930
- = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) retarray));
21931
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_4));
21932
retarray->offset = 0;
21934
else if (unlikely (compile_options.bounds_check))
21935
Index: libgfortran/generated/pack_r10.c
21936
===================================================================
21937
--- a/src/libgfortran/generated/pack_r10.c (.../tags/gcc_4_8_3_release)
21938
+++ b/src/libgfortran/generated/pack_r10.c (.../branches/gcc-4_8-branch)
21939
@@ -167,8 +167,8 @@
21943
- /* xmalloc allocates a single byte for zero size. */
21944
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * total);
21945
+ /* xmallocarray allocates a single byte for zero size. */
21946
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_10));
21950
Index: libgfortran/generated/minloc1_16_i2.c
21951
===================================================================
21952
--- a/src/libgfortran/generated/minloc1_16_i2.c (.../tags/gcc_4_8_3_release)
21953
+++ b/src/libgfortran/generated/minloc1_16_i2.c (.../branches/gcc-4_8-branch)
21955
retarray->offset = 0;
21956
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21958
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21959
- * extent[rank-1];
21960
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21962
- retarray->base_addr = xmalloc (alloc_size);
21963
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21964
if (alloc_size == 0)
21966
/* Make sure we have a zero-sized array. */
21967
@@ -294,8 +293,7 @@
21971
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21972
- * extent[rank-1];
21973
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21975
retarray->offset = 0;
21976
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21977
@@ -307,7 +305,7 @@
21981
- retarray->base_addr = xmalloc (alloc_size);
21982
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21986
@@ -485,8 +483,7 @@
21987
retarray->offset = 0;
21988
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21990
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21991
- * extent[rank-1];
21992
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21994
if (alloc_size == 0)
21996
@@ -495,7 +492,7 @@
22000
- retarray->base_addr = xmalloc (alloc_size);
22001
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22005
Index: libgfortran/generated/in_pack_i8.c
22006
===================================================================
22007
--- a/src/libgfortran/generated/in_pack_i8.c (.../tags/gcc_4_8_3_release)
22008
+++ b/src/libgfortran/generated/in_pack_i8.c (.../branches/gcc-4_8-branch)
22010
return source->base_addr;
22012
/* Allocate storage for the destination. */
22013
- destptr = (GFC_INTEGER_8 *)xmalloc (ssize * sizeof (GFC_INTEGER_8));
22014
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_8));
22016
src = source->base_addr;
22017
stride0 = stride[0];
22018
Index: libgfortran/generated/transpose_r16.c
22019
===================================================================
22020
--- a/src/libgfortran/generated/transpose_r16.c (.../tags/gcc_4_8_3_release)
22021
+++ b/src/libgfortran/generated/transpose_r16.c (.../branches/gcc-4_8-branch)
22023
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
22024
GFC_DESCRIPTOR_EXTENT(source, 1));
22026
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) ret));
22027
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
22028
+ sizeof (GFC_REAL_16));
22030
} else if (unlikely (compile_options.bounds_check))
22032
Index: libgfortran/generated/minloc1_4_i4.c
22033
===================================================================
22034
--- a/src/libgfortran/generated/minloc1_4_i4.c (.../tags/gcc_4_8_3_release)
22035
+++ b/src/libgfortran/generated/minloc1_4_i4.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_INTEGER_4) * 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_INTEGER_4));
22046
if (alloc_size == 0)
22048
/* Make sure we have a zero-sized array. */
22049
@@ -294,8 +293,7 @@
22053
- alloc_size = sizeof (GFC_INTEGER_4) * 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
@@ -307,7 +305,7 @@
22063
- retarray->base_addr = xmalloc (alloc_size);
22064
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22068
@@ -485,8 +483,7 @@
22069
retarray->offset = 0;
22070
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22072
- alloc_size = sizeof (GFC_INTEGER_4) * 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
@@ -495,7 +492,7 @@
22082
- retarray->base_addr = xmalloc (alloc_size);
22083
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22087
Index: libgfortran/generated/maxval_i1.c
22088
===================================================================
22089
--- a/src/libgfortran/generated/maxval_i1.c (.../tags/gcc_4_8_3_release)
22090
+++ b/src/libgfortran/generated/maxval_i1.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_INTEGER_1) * 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_INTEGER_1));
22101
if (alloc_size == 0)
22103
/* Make sure we have a zero-sized array. */
22104
@@ -286,8 +285,7 @@
22108
- alloc_size = sizeof (GFC_INTEGER_1) * 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
@@ -299,7 +297,7 @@
22118
- retarray->base_addr = xmalloc (alloc_size);
22119
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22123
@@ -472,8 +470,7 @@
22124
retarray->offset = 0;
22125
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22127
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22128
- * extent[rank-1];
22129
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22131
if (alloc_size == 0)
22133
@@ -482,7 +479,7 @@
22137
- retarray->base_addr = xmalloc (alloc_size);
22138
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22142
Index: libgfortran/generated/product_c16.c
22143
===================================================================
22144
--- a/src/libgfortran/generated/product_c16.c (.../tags/gcc_4_8_3_release)
22145
+++ b/src/libgfortran/generated/product_c16.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_COMPLEX_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_COMPLEX_16));
22156
if (alloc_size == 0)
22158
/* Make sure we have a zero-sized array. */
22159
@@ -272,8 +271,7 @@
22163
- alloc_size = sizeof (GFC_COMPLEX_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
@@ -285,7 +283,7 @@
22173
- retarray->base_addr = xmalloc (alloc_size);
22174
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
22178
@@ -430,8 +428,7 @@
22179
retarray->offset = 0;
22180
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22182
- alloc_size = sizeof (GFC_COMPLEX_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
@@ -440,7 +437,7 @@
22192
- retarray->base_addr = xmalloc (alloc_size);
22193
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
22197
Index: libgfortran/generated/reshape_r4.c
22198
===================================================================
22199
--- a/src/libgfortran/generated/reshape_r4.c (.../tags/gcc_4_8_3_release)
22200
+++ b/src/libgfortran/generated/reshape_r4.c (.../branches/gcc-4_8-branch)
22201
@@ -111,11 +111,11 @@
22204
if (unlikely (rs < 1))
22208
- alloc_size = rs * sizeof (GFC_REAL_4);
22211
- ret->base_addr = xmalloc (alloc_size);
22212
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
22213
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
22216
Index: libgfortran/generated/iany_i8.c
22217
===================================================================
22218
--- a/src/libgfortran/generated/iany_i8.c (.../tags/gcc_4_8_3_release)
22219
+++ b/src/libgfortran/generated/iany_i8.c (.../branches/gcc-4_8-branch)
22221
retarray->offset = 0;
22222
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22224
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22225
- * extent[rank-1];
22226
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22228
- retarray->base_addr = xmalloc (alloc_size);
22229
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22230
if (alloc_size == 0)
22232
/* Make sure we have a zero-sized array. */
22233
@@ -272,8 +271,7 @@
22237
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22238
- * extent[rank-1];
22239
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22241
retarray->offset = 0;
22242
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22243
@@ -285,7 +283,7 @@
22247
- retarray->base_addr = xmalloc (alloc_size);
22248
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22252
@@ -430,8 +428,7 @@
22253
retarray->offset = 0;
22254
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22256
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22257
- * extent[rank-1];
22258
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22260
if (alloc_size == 0)
22262
@@ -440,7 +437,7 @@
22266
- retarray->base_addr = xmalloc (alloc_size);
22267
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22271
Index: libgfortran/generated/cshift1_16.c
22272
===================================================================
22273
--- a/src/libgfortran/generated/cshift1_16.c (.../tags/gcc_4_8_3_release)
22274
+++ b/src/libgfortran/generated/cshift1_16.c (.../branches/gcc-4_8-branch)
22279
- ret->base_addr = xmalloc (size * arraysize);
22280
+ ret->base_addr = xmallocarray (arraysize, size);
22282
ret->dtype = array->dtype;
22283
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
22284
Index: libgfortran/generated/maxloc0_4_i1.c
22285
===================================================================
22286
--- a/src/libgfortran/generated/maxloc0_4_i1.c (.../tags/gcc_4_8_3_release)
22287
+++ b/src/libgfortran/generated/maxloc0_4_i1.c (.../branches/gcc-4_8-branch)
22289
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22290
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22291
retarray->offset = 0;
22292
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22293
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22297
@@ -199,7 +199,7 @@
22298
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22299
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22300
retarray->offset = 0;
22301
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22302
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22306
@@ -367,7 +367,7 @@
22307
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22308
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22309
retarray->offset = 0;
22310
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22311
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22313
else if (unlikely (compile_options.bounds_check))
22315
Index: libgfortran/generated/minloc0_4_i8.c
22316
===================================================================
22317
--- a/src/libgfortran/generated/minloc0_4_i8.c (.../tags/gcc_4_8_3_release)
22318
+++ b/src/libgfortran/generated/minloc0_4_i8.c (.../branches/gcc-4_8-branch)
22320
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22321
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22322
retarray->offset = 0;
22323
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22324
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22328
@@ -199,7 +199,7 @@
22329
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22330
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22331
retarray->offset = 0;
22332
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22333
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22337
@@ -367,7 +367,7 @@
22338
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22339
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22340
retarray->offset = 0;
22341
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22342
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22344
else if (unlikely (compile_options.bounds_check))
22346
Index: libgfortran/generated/spread_c16.c
22347
===================================================================
22348
--- a/src/libgfortran/generated/spread_c16.c (.../tags/gcc_4_8_3_release)
22349
+++ b/src/libgfortran/generated/spread_c16.c (.../branches/gcc-4_8-branch)
22350
@@ -101,8 +101,8 @@
22354
- /* xmalloc allocates a single byte for zero size. */
22355
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_16));
22356
+ /* xmallocarray allocates a single byte for zero size. */
22357
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_16));
22361
@@ -244,7 +244,7 @@
22363
if (ret->base_addr == NULL)
22365
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_16));
22366
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_16));
22368
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
22370
Index: libgfortran/generated/maxval_r4.c
22371
===================================================================
22372
--- a/src/libgfortran/generated/maxval_r4.c (.../tags/gcc_4_8_3_release)
22373
+++ b/src/libgfortran/generated/maxval_r4.c (.../branches/gcc-4_8-branch)
22375
retarray->offset = 0;
22376
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22378
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22379
- * extent[rank-1];
22380
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22382
- retarray->base_addr = xmalloc (alloc_size);
22383
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
22384
if (alloc_size == 0)
22386
/* Make sure we have a zero-sized array. */
22387
@@ -286,8 +285,7 @@
22391
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22392
- * extent[rank-1];
22393
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22395
retarray->offset = 0;
22396
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22397
@@ -299,7 +297,7 @@
22401
- retarray->base_addr = xmalloc (alloc_size);
22402
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
22406
@@ -472,8 +470,7 @@
22407
retarray->offset = 0;
22408
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22410
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22411
- * extent[rank-1];
22412
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22414
if (alloc_size == 0)
22416
@@ -482,7 +479,7 @@
22420
- retarray->base_addr = xmalloc (alloc_size);
22421
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
22425
Index: libgfortran/generated/minval_r8.c
22426
===================================================================
22427
--- a/src/libgfortran/generated/minval_r8.c (.../tags/gcc_4_8_3_release)
22428
+++ b/src/libgfortran/generated/minval_r8.c (.../branches/gcc-4_8-branch)
22430
retarray->offset = 0;
22431
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22433
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22434
- * extent[rank-1];
22435
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22437
- retarray->base_addr = xmalloc (alloc_size);
22438
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
22439
if (alloc_size == 0)
22441
/* Make sure we have a zero-sized array. */
22442
@@ -286,8 +285,7 @@
22446
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22447
- * extent[rank-1];
22448
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22450
retarray->offset = 0;
22451
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22452
@@ -299,7 +297,7 @@
22456
- retarray->base_addr = xmalloc (alloc_size);
22457
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
22461
@@ -472,8 +470,7 @@
22462
retarray->offset = 0;
22463
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22465
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22466
- * extent[rank-1];
22467
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22469
if (alloc_size == 0)
22471
@@ -482,7 +479,7 @@
22475
- retarray->base_addr = xmalloc (alloc_size);
22476
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
22480
Index: libgfortran/generated/minloc1_16_r16.c
22481
===================================================================
22482
--- a/src/libgfortran/generated/minloc1_16_r16.c (.../tags/gcc_4_8_3_release)
22483
+++ b/src/libgfortran/generated/minloc1_16_r16.c (.../branches/gcc-4_8-branch)
22485
retarray->offset = 0;
22486
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22488
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22489
- * extent[rank-1];
22490
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22492
- retarray->base_addr = xmalloc (alloc_size);
22493
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22494
if (alloc_size == 0)
22496
/* Make sure we have a zero-sized array. */
22497
@@ -294,8 +293,7 @@
22501
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22502
- * extent[rank-1];
22503
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22505
retarray->offset = 0;
22506
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22507
@@ -307,7 +305,7 @@
22511
- retarray->base_addr = xmalloc (alloc_size);
22512
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22516
@@ -485,8 +483,7 @@
22517
retarray->offset = 0;
22518
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22520
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22521
- * extent[rank-1];
22522
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22524
if (alloc_size == 0)
22526
@@ -495,7 +492,7 @@
22530
- retarray->base_addr = xmalloc (alloc_size);
22531
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22535
Index: libgfortran/generated/unpack_i16.c
22536
===================================================================
22537
--- a/src/libgfortran/generated/unpack_i16.c (.../tags/gcc_4_8_3_release)
22538
+++ b/src/libgfortran/generated/unpack_i16.c (.../branches/gcc-4_8-branch)
22543
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
22544
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
22548
@@ -244,7 +244,7 @@
22552
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
22553
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
22557
Index: libgfortran/generated/sum_i8.c
22558
===================================================================
22559
--- a/src/libgfortran/generated/sum_i8.c (.../tags/gcc_4_8_3_release)
22560
+++ b/src/libgfortran/generated/sum_i8.c (.../branches/gcc-4_8-branch)
22562
retarray->offset = 0;
22563
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22565
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22566
- * extent[rank-1];
22567
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22569
- retarray->base_addr = xmalloc (alloc_size);
22570
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22571
if (alloc_size == 0)
22573
/* Make sure we have a zero-sized array. */
22574
@@ -272,8 +271,7 @@
22578
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22579
- * extent[rank-1];
22580
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22582
retarray->offset = 0;
22583
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22584
@@ -285,7 +283,7 @@
22588
- retarray->base_addr = xmalloc (alloc_size);
22589
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22593
@@ -430,8 +428,7 @@
22594
retarray->offset = 0;
22595
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22597
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22598
- * extent[rank-1];
22599
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22601
if (alloc_size == 0)
22603
@@ -440,7 +437,7 @@
22607
- retarray->base_addr = xmalloc (alloc_size);
22608
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22612
Index: libgfortran/generated/pack_i1.c
22613
===================================================================
22614
--- a/src/libgfortran/generated/pack_i1.c (.../tags/gcc_4_8_3_release)
22615
+++ b/src/libgfortran/generated/pack_i1.c (.../branches/gcc-4_8-branch)
22616
@@ -167,8 +167,8 @@
22620
- /* xmalloc allocates a single byte for zero size. */
22621
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_1) * total);
22622
+ /* xmallocarray allocates a single byte for zero size. */
22623
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_1));
22627
Index: libgfortran/generated/any_l16.c
22628
===================================================================
22629
--- a/src/libgfortran/generated/any_l16.c (.../tags/gcc_4_8_3_release)
22630
+++ b/src/libgfortran/generated/any_l16.c (.../branches/gcc-4_8-branch)
22631
@@ -101,8 +101,7 @@
22632
retarray->offset = 0;
22633
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22635
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22636
- * extent[rank-1];
22637
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22639
if (alloc_size == 0)
22641
@@ -111,7 +110,7 @@
22645
- retarray->base_addr = xmalloc (alloc_size);
22646
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
22650
Index: libgfortran/generated/spread_i8.c
22651
===================================================================
22652
--- a/src/libgfortran/generated/spread_i8.c (.../tags/gcc_4_8_3_release)
22653
+++ b/src/libgfortran/generated/spread_i8.c (.../branches/gcc-4_8-branch)
22654
@@ -101,8 +101,8 @@
22658
- /* xmalloc allocates a single byte for zero size. */
22659
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_8));
22660
+ /* xmallocarray allocates a single byte for zero size. */
22661
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_8));
22665
@@ -244,7 +244,7 @@
22667
if (ret->base_addr == NULL)
22669
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_8));
22670
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_8));
22672
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
22674
Index: libgfortran/generated/maxval_i2.c
22675
===================================================================
22676
--- a/src/libgfortran/generated/maxval_i2.c (.../tags/gcc_4_8_3_release)
22677
+++ b/src/libgfortran/generated/maxval_i2.c (.../branches/gcc-4_8-branch)
22679
retarray->offset = 0;
22680
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22682
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22683
- * extent[rank-1];
22684
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22686
- retarray->base_addr = xmalloc (alloc_size);
22687
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
22688
if (alloc_size == 0)
22690
/* Make sure we have a zero-sized array. */
22691
@@ -286,8 +285,7 @@
22695
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22696
- * extent[rank-1];
22697
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22699
retarray->offset = 0;
22700
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22701
@@ -299,7 +297,7 @@
22705
- retarray->base_addr = xmalloc (alloc_size);
22706
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
22710
@@ -472,8 +470,7 @@
22711
retarray->offset = 0;
22712
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22714
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22715
- * extent[rank-1];
22716
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22718
if (alloc_size == 0)
22720
@@ -482,7 +479,7 @@
22724
- retarray->base_addr = xmalloc (alloc_size);
22725
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
22729
Index: libgfortran/generated/maxloc1_8_i4.c
22730
===================================================================
22731
--- a/src/libgfortran/generated/maxloc1_8_i4.c (.../tags/gcc_4_8_3_release)
22732
+++ b/src/libgfortran/generated/maxloc1_8_i4.c (.../branches/gcc-4_8-branch)
22734
retarray->offset = 0;
22735
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22737
- alloc_size = sizeof (GFC_INTEGER_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->base_addr = xmalloc (alloc_size);
22742
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22743
if (alloc_size == 0)
22745
/* Make sure we have a zero-sized array. */
22746
@@ -294,8 +293,7 @@
22750
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22751
- * extent[rank-1];
22752
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22754
retarray->offset = 0;
22755
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22756
@@ -307,7 +305,7 @@
22760
- retarray->base_addr = xmalloc (alloc_size);
22761
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22765
@@ -485,8 +483,7 @@
22766
retarray->offset = 0;
22767
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22769
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22770
- * extent[rank-1];
22771
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22773
if (alloc_size == 0)
22775
@@ -495,7 +492,7 @@
22779
- retarray->base_addr = xmalloc (alloc_size);
22780
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22784
Index: libgfortran/generated/unpack_r8.c
22785
===================================================================
22786
--- a/src/libgfortran/generated/unpack_r8.c (.../tags/gcc_4_8_3_release)
22787
+++ b/src/libgfortran/generated/unpack_r8.c (.../branches/gcc-4_8-branch)
22792
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
22793
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
22797
@@ -244,7 +244,7 @@
22801
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
22802
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
22806
Index: libgfortran/generated/maxloc0_4_r4.c
22807
===================================================================
22808
--- a/src/libgfortran/generated/maxloc0_4_r4.c (.../tags/gcc_4_8_3_release)
22809
+++ b/src/libgfortran/generated/maxloc0_4_r4.c (.../branches/gcc-4_8-branch)
22811
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22812
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22813
retarray->offset = 0;
22814
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22815
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22819
@@ -199,7 +199,7 @@
22820
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22821
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22822
retarray->offset = 0;
22823
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22824
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22828
@@ -367,7 +367,7 @@
22829
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22830
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22831
retarray->offset = 0;
22832
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22833
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22835
else if (unlikely (compile_options.bounds_check))
22837
Index: libgfortran/generated/all_l1.c
22838
===================================================================
22839
--- a/src/libgfortran/generated/all_l1.c (.../tags/gcc_4_8_3_release)
22840
+++ b/src/libgfortran/generated/all_l1.c (.../branches/gcc-4_8-branch)
22841
@@ -101,8 +101,7 @@
22842
retarray->offset = 0;
22843
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22845
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22846
- * extent[rank-1];
22847
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22849
if (alloc_size == 0)
22851
@@ -111,7 +110,7 @@
22855
- retarray->base_addr = xmalloc (alloc_size);
22856
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
22860
Index: libgfortran/generated/matmul_r8.c
22861
===================================================================
22862
--- a/src/libgfortran/generated/matmul_r8.c (.../tags/gcc_4_8_3_release)
22863
+++ b/src/libgfortran/generated/matmul_r8.c (.../branches/gcc-4_8-branch)
22864
@@ -124,7 +124,7 @@
22867
retarray->base_addr
22868
- = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) retarray));
22869
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_8));
22870
retarray->offset = 0;
22872
else if (unlikely (compile_options.bounds_check))
22873
Index: libgfortran/generated/minloc0_4_r16.c
22874
===================================================================
22875
--- a/src/libgfortran/generated/minloc0_4_r16.c (.../tags/gcc_4_8_3_release)
22876
+++ b/src/libgfortran/generated/minloc0_4_r16.c (.../branches/gcc-4_8-branch)
22878
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22879
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22880
retarray->offset = 0;
22881
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22882
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22886
@@ -199,7 +199,7 @@
22887
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22888
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22889
retarray->offset = 0;
22890
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22891
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22895
@@ -367,7 +367,7 @@
22896
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22897
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22898
retarray->offset = 0;
22899
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22900
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22902
else if (unlikely (compile_options.bounds_check))
22904
Index: libgfortran/generated/maxloc0_4_i2.c
22905
===================================================================
22906
--- a/src/libgfortran/generated/maxloc0_4_i2.c (.../tags/gcc_4_8_3_release)
22907
+++ b/src/libgfortran/generated/maxloc0_4_i2.c (.../branches/gcc-4_8-branch)
22909
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22910
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22911
retarray->offset = 0;
22912
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22913
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22917
@@ -199,7 +199,7 @@
22918
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22919
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22920
retarray->offset = 0;
22921
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22922
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22926
@@ -367,7 +367,7 @@
22927
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22928
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22929
retarray->offset = 0;
22930
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22931
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22933
else if (unlikely (compile_options.bounds_check))
22935
Index: libgfortran/generated/minloc1_8_r16.c
22936
===================================================================
22937
--- a/src/libgfortran/generated/minloc1_8_r16.c (.../tags/gcc_4_8_3_release)
22938
+++ b/src/libgfortran/generated/minloc1_8_r16.c (.../branches/gcc-4_8-branch)
22940
retarray->offset = 0;
22941
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22943
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22944
- * extent[rank-1];
22945
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22947
- retarray->base_addr = xmalloc (alloc_size);
22948
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22949
if (alloc_size == 0)
22951
/* Make sure we have a zero-sized array. */
22952
@@ -294,8 +293,7 @@
22956
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22957
- * extent[rank-1];
22958
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22960
retarray->offset = 0;
22961
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22962
@@ -307,7 +305,7 @@
22966
- retarray->base_addr = xmalloc (alloc_size);
22967
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22971
@@ -485,8 +483,7 @@
22972
retarray->offset = 0;
22973
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22975
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22976
- * extent[rank-1];
22977
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22979
if (alloc_size == 0)
22981
@@ -495,7 +492,7 @@
22985
- retarray->base_addr = xmalloc (alloc_size);
22986
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22990
Index: libgfortran/generated/pack_c10.c
22991
===================================================================
22992
--- a/src/libgfortran/generated/pack_c10.c (.../tags/gcc_4_8_3_release)
22993
+++ b/src/libgfortran/generated/pack_c10.c (.../branches/gcc-4_8-branch)
22994
@@ -167,8 +167,8 @@
22998
- /* xmalloc allocates a single byte for zero size. */
22999
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * total);
23000
+ /* xmallocarray allocates a single byte for zero size. */
23001
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_10));
23005
Index: libgfortran/generated/pack_r4.c
23006
===================================================================
23007
--- a/src/libgfortran/generated/pack_r4.c (.../tags/gcc_4_8_3_release)
23008
+++ b/src/libgfortran/generated/pack_r4.c (.../branches/gcc-4_8-branch)
23009
@@ -167,8 +167,8 @@
23013
- /* xmalloc allocates a single byte for zero size. */
23014
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * total);
23015
+ /* xmallocarray allocates a single byte for zero size. */
23016
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_4));
23020
Index: libgfortran/generated/transpose_c16.c
23021
===================================================================
23022
--- a/src/libgfortran/generated/transpose_c16.c (.../tags/gcc_4_8_3_release)
23023
+++ b/src/libgfortran/generated/transpose_c16.c (.../branches/gcc-4_8-branch)
23025
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
23026
GFC_DESCRIPTOR_EXTENT(source, 1));
23028
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) ret));
23029
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
23030
+ sizeof (GFC_COMPLEX_16));
23032
} else if (unlikely (compile_options.bounds_check))
23034
Index: libgfortran/generated/maxloc0_8_i8.c
23035
===================================================================
23036
--- a/src/libgfortran/generated/maxloc0_8_i8.c (.../tags/gcc_4_8_3_release)
23037
+++ b/src/libgfortran/generated/maxloc0_8_i8.c (.../branches/gcc-4_8-branch)
23039
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23040
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23041
retarray->offset = 0;
23042
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23043
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23047
@@ -199,7 +199,7 @@
23048
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23049
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23050
retarray->offset = 0;
23051
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23052
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23056
@@ -367,7 +367,7 @@
23057
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23058
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23059
retarray->offset = 0;
23060
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23061
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23063
else if (unlikely (compile_options.bounds_check))
23065
Index: libgfortran/generated/minloc1_4_r8.c
23066
===================================================================
23067
--- a/src/libgfortran/generated/minloc1_4_r8.c (.../tags/gcc_4_8_3_release)
23068
+++ b/src/libgfortran/generated/minloc1_4_r8.c (.../branches/gcc-4_8-branch)
23070
retarray->offset = 0;
23071
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23073
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23074
- * extent[rank-1];
23075
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23077
- retarray->base_addr = xmalloc (alloc_size);
23078
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23079
if (alloc_size == 0)
23081
/* Make sure we have a zero-sized array. */
23082
@@ -294,8 +293,7 @@
23086
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23087
- * extent[rank-1];
23088
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23090
retarray->offset = 0;
23091
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23092
@@ -307,7 +305,7 @@
23096
- retarray->base_addr = xmalloc (alloc_size);
23097
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23101
@@ -485,8 +483,7 @@
23102
retarray->offset = 0;
23103
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23105
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23106
- * extent[rank-1];
23107
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23109
if (alloc_size == 0)
23111
@@ -495,7 +492,7 @@
23115
- retarray->base_addr = xmalloc (alloc_size);
23116
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23120
Index: libgfortran/generated/minloc1_16_i4.c
23121
===================================================================
23122
--- a/src/libgfortran/generated/minloc1_16_i4.c (.../tags/gcc_4_8_3_release)
23123
+++ b/src/libgfortran/generated/minloc1_16_i4.c (.../branches/gcc-4_8-branch)
23125
retarray->offset = 0;
23126
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23128
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23129
- * extent[rank-1];
23130
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23132
- retarray->base_addr = xmalloc (alloc_size);
23133
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23134
if (alloc_size == 0)
23136
/* Make sure we have a zero-sized array. */
23137
@@ -294,8 +293,7 @@
23141
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23142
- * extent[rank-1];
23143
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23145
retarray->offset = 0;
23146
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23147
@@ -307,7 +305,7 @@
23151
- retarray->base_addr = xmalloc (alloc_size);
23152
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23156
@@ -485,8 +483,7 @@
23157
retarray->offset = 0;
23158
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23160
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23161
- * extent[rank-1];
23162
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23164
if (alloc_size == 0)
23166
@@ -495,7 +492,7 @@
23170
- retarray->base_addr = xmalloc (alloc_size);
23171
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23175
Index: libgfortran/generated/minloc0_16_i8.c
23176
===================================================================
23177
--- a/src/libgfortran/generated/minloc0_16_i8.c (.../tags/gcc_4_8_3_release)
23178
+++ b/src/libgfortran/generated/minloc0_16_i8.c (.../branches/gcc-4_8-branch)
23180
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23181
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23182
retarray->offset = 0;
23183
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23184
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23188
@@ -199,7 +199,7 @@
23189
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23190
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23191
retarray->offset = 0;
23192
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23193
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23197
@@ -367,7 +367,7 @@
23198
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23199
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23200
retarray->offset = 0;
23201
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23202
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23204
else if (unlikely (compile_options.bounds_check))
23206
Index: libgfortran/generated/pack_i2.c
23207
===================================================================
23208
--- a/src/libgfortran/generated/pack_i2.c (.../tags/gcc_4_8_3_release)
23209
+++ b/src/libgfortran/generated/pack_i2.c (.../branches/gcc-4_8-branch)
23210
@@ -167,8 +167,8 @@
23214
- /* xmalloc allocates a single byte for zero size. */
23215
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_2) * total);
23216
+ /* xmallocarray allocates a single byte for zero size. */
23217
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_2));
23221
Index: libgfortran/generated/transpose_i8.c
23222
===================================================================
23223
--- a/src/libgfortran/generated/transpose_i8.c (.../tags/gcc_4_8_3_release)
23224
+++ b/src/libgfortran/generated/transpose_i8.c (.../branches/gcc-4_8-branch)
23226
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
23227
GFC_DESCRIPTOR_EXTENT(source, 1));
23229
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) ret));
23230
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
23231
+ sizeof (GFC_INTEGER_8));
23233
} else if (unlikely (compile_options.bounds_check))
23235
Index: libgfortran/generated/eoshift1_16.c
23236
===================================================================
23237
--- a/src/libgfortran/generated/eoshift1_16.c (.../tags/gcc_4_8_3_release)
23238
+++ b/src/libgfortran/generated/eoshift1_16.c (.../branches/gcc-4_8-branch)
23239
@@ -105,8 +105,8 @@
23240
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
23243
- /* xmalloc allocates a single byte for zero size. */
23244
- ret->base_addr = xmalloc (size * arraysize);
23245
+ /* xmallocarray allocates a single byte for zero size. */
23246
+ ret->base_addr = xmallocarray (arraysize, size);
23249
else if (unlikely (compile_options.bounds_check))
23250
Index: libgfortran/generated/all_l2.c
23251
===================================================================
23252
--- a/src/libgfortran/generated/all_l2.c (.../tags/gcc_4_8_3_release)
23253
+++ b/src/libgfortran/generated/all_l2.c (.../branches/gcc-4_8-branch)
23254
@@ -101,8 +101,7 @@
23255
retarray->offset = 0;
23256
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23258
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23259
- * extent[rank-1];
23260
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23262
if (alloc_size == 0)
23264
@@ -111,7 +110,7 @@
23268
- retarray->base_addr = xmalloc (alloc_size);
23269
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
23273
Index: libgfortran/generated/product_c4.c
23274
===================================================================
23275
--- a/src/libgfortran/generated/product_c4.c (.../tags/gcc_4_8_3_release)
23276
+++ b/src/libgfortran/generated/product_c4.c (.../branches/gcc-4_8-branch)
23278
retarray->offset = 0;
23279
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23281
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23282
- * extent[rank-1];
23283
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23285
- retarray->base_addr = xmalloc (alloc_size);
23286
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
23287
if (alloc_size == 0)
23289
/* Make sure we have a zero-sized array. */
23290
@@ -272,8 +271,7 @@
23294
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23295
- * extent[rank-1];
23296
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23298
retarray->offset = 0;
23299
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23300
@@ -285,7 +283,7 @@
23304
- retarray->base_addr = xmalloc (alloc_size);
23305
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
23309
@@ -430,8 +428,7 @@
23310
retarray->offset = 0;
23311
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23313
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23314
- * extent[rank-1];
23315
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23317
if (alloc_size == 0)
23319
@@ -440,7 +437,7 @@
23323
- retarray->base_addr = xmalloc (alloc_size);
23324
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
23328
Index: libgfortran/generated/iall_i1.c
23329
===================================================================
23330
--- a/src/libgfortran/generated/iall_i1.c (.../tags/gcc_4_8_3_release)
23331
+++ b/src/libgfortran/generated/iall_i1.c (.../branches/gcc-4_8-branch)
23333
retarray->offset = 0;
23334
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23336
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23337
- * extent[rank-1];
23338
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23340
- retarray->base_addr = xmalloc (alloc_size);
23341
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
23342
if (alloc_size == 0)
23344
/* Make sure we have a zero-sized array. */
23345
@@ -272,8 +271,7 @@
23349
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23350
- * extent[rank-1];
23351
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23353
retarray->offset = 0;
23354
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23355
@@ -285,7 +283,7 @@
23359
- retarray->base_addr = xmalloc (alloc_size);
23360
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
23364
@@ -430,8 +428,7 @@
23365
retarray->offset = 0;
23366
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23368
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23369
- * extent[rank-1];
23370
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23372
if (alloc_size == 0)
23374
@@ -440,7 +437,7 @@
23378
- retarray->base_addr = xmalloc (alloc_size);
23379
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
23383
Index: libgfortran/generated/reshape_i4.c
23384
===================================================================
23385
--- a/src/libgfortran/generated/reshape_i4.c (.../tags/gcc_4_8_3_release)
23386
+++ b/src/libgfortran/generated/reshape_i4.c (.../branches/gcc-4_8-branch)
23387
@@ -111,11 +111,11 @@
23390
if (unlikely (rs < 1))
23394
- alloc_size = rs * sizeof (GFC_INTEGER_4);
23397
- ret->base_addr = xmalloc (alloc_size);
23398
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23399
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
23402
Index: libgfortran/generated/in_pack_r10.c
23403
===================================================================
23404
--- a/src/libgfortran/generated/in_pack_r10.c (.../tags/gcc_4_8_3_release)
23405
+++ b/src/libgfortran/generated/in_pack_r10.c (.../branches/gcc-4_8-branch)
23407
return source->base_addr;
23409
/* Allocate storage for the destination. */
23410
- destptr = (GFC_REAL_10 *)xmalloc (ssize * sizeof (GFC_REAL_10));
23411
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_10));
23413
src = source->base_addr;
23414
stride0 = stride[0];
23415
Index: libgfortran/generated/in_pack_c4.c
23416
===================================================================
23417
--- a/src/libgfortran/generated/in_pack_c4.c (.../tags/gcc_4_8_3_release)
23418
+++ b/src/libgfortran/generated/in_pack_c4.c (.../branches/gcc-4_8-branch)
23420
return source->base_addr;
23422
/* Allocate storage for the destination. */
23423
- destptr = (GFC_COMPLEX_4 *)xmalloc (ssize * sizeof (GFC_COMPLEX_4));
23424
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_4));
23426
src = source->base_addr;
23427
stride0 = stride[0];
23428
Index: libgfortran/generated/all_l16.c
23429
===================================================================
23430
--- a/src/libgfortran/generated/all_l16.c (.../tags/gcc_4_8_3_release)
23431
+++ b/src/libgfortran/generated/all_l16.c (.../branches/gcc-4_8-branch)
23432
@@ -101,8 +101,7 @@
23433
retarray->offset = 0;
23434
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23436
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23437
- * extent[rank-1];
23438
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23440
if (alloc_size == 0)
23442
@@ -111,7 +110,7 @@
23446
- retarray->base_addr = xmalloc (alloc_size);
23447
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
23451
Index: libgfortran/generated/maxloc0_16_i1.c
23452
===================================================================
23453
--- a/src/libgfortran/generated/maxloc0_16_i1.c (.../tags/gcc_4_8_3_release)
23454
+++ b/src/libgfortran/generated/maxloc0_16_i1.c (.../branches/gcc-4_8-branch)
23456
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23457
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23458
retarray->offset = 0;
23459
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23460
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23464
@@ -199,7 +199,7 @@
23465
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23466
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23467
retarray->offset = 0;
23468
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23469
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23473
@@ -367,7 +367,7 @@
23474
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23475
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23476
retarray->offset = 0;
23477
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23478
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23480
else if (unlikely (compile_options.bounds_check))
23482
Index: libgfortran/generated/maxloc1_8_r8.c
23483
===================================================================
23484
--- a/src/libgfortran/generated/maxloc1_8_r8.c (.../tags/gcc_4_8_3_release)
23485
+++ b/src/libgfortran/generated/maxloc1_8_r8.c (.../branches/gcc-4_8-branch)
23487
retarray->offset = 0;
23488
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23490
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23491
- * extent[rank-1];
23492
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23494
- retarray->base_addr = xmalloc (alloc_size);
23495
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23496
if (alloc_size == 0)
23498
/* Make sure we have a zero-sized array. */
23499
@@ -294,8 +293,7 @@
23503
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23504
- * extent[rank-1];
23505
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23507
retarray->offset = 0;
23508
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23509
@@ -307,7 +305,7 @@
23513
- retarray->base_addr = xmalloc (alloc_size);
23514
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23518
@@ -485,8 +483,7 @@
23519
retarray->offset = 0;
23520
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23522
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23523
- * extent[rank-1];
23524
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23526
if (alloc_size == 0)
23528
@@ -495,7 +492,7 @@
23532
- retarray->base_addr = xmalloc (alloc_size);
23533
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23537
Index: libgfortran/generated/minval_i16.c
23538
===================================================================
23539
--- a/src/libgfortran/generated/minval_i16.c (.../tags/gcc_4_8_3_release)
23540
+++ b/src/libgfortran/generated/minval_i16.c (.../branches/gcc-4_8-branch)
23542
retarray->offset = 0;
23543
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23545
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23546
- * extent[rank-1];
23547
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23549
- retarray->base_addr = xmalloc (alloc_size);
23550
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23551
if (alloc_size == 0)
23553
/* Make sure we have a zero-sized array. */
23554
@@ -286,8 +285,7 @@
23558
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23559
- * extent[rank-1];
23560
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23562
retarray->offset = 0;
23563
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23564
@@ -299,7 +297,7 @@
23568
- retarray->base_addr = xmalloc (alloc_size);
23569
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23573
@@ -472,8 +470,7 @@
23574
retarray->offset = 0;
23575
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23577
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23578
- * extent[rank-1];
23579
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23581
if (alloc_size == 0)
23583
@@ -482,7 +479,7 @@
23587
- retarray->base_addr = xmalloc (alloc_size);
23588
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23592
Index: libgfortran/generated/reshape_r10.c
23593
===================================================================
23594
--- a/src/libgfortran/generated/reshape_r10.c (.../tags/gcc_4_8_3_release)
23595
+++ b/src/libgfortran/generated/reshape_r10.c (.../branches/gcc-4_8-branch)
23596
@@ -111,11 +111,11 @@
23599
if (unlikely (rs < 1))
23603
- alloc_size = rs * sizeof (GFC_REAL_10);
23606
- ret->base_addr = xmalloc (alloc_size);
23607
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
23608
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
23611
Index: libgfortran/generated/unpack_r16.c
23612
===================================================================
23613
--- a/src/libgfortran/generated/unpack_r16.c (.../tags/gcc_4_8_3_release)
23614
+++ b/src/libgfortran/generated/unpack_r16.c (.../branches/gcc-4_8-branch)
23619
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
23620
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
23624
@@ -244,7 +244,7 @@
23628
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
23629
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
23633
Index: libgfortran/generated/maxval_i4.c
23634
===================================================================
23635
--- a/src/libgfortran/generated/maxval_i4.c (.../tags/gcc_4_8_3_release)
23636
+++ b/src/libgfortran/generated/maxval_i4.c (.../branches/gcc-4_8-branch)
23638
retarray->offset = 0;
23639
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23641
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23642
- * extent[rank-1];
23643
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23645
- retarray->base_addr = xmalloc (alloc_size);
23646
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23647
if (alloc_size == 0)
23649
/* Make sure we have a zero-sized array. */
23650
@@ -286,8 +285,7 @@
23654
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23655
- * extent[rank-1];
23656
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23658
retarray->offset = 0;
23659
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23660
@@ -299,7 +297,7 @@
23664
- retarray->base_addr = xmalloc (alloc_size);
23665
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23669
@@ -472,8 +470,7 @@
23670
retarray->offset = 0;
23671
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23673
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23674
- * extent[rank-1];
23675
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23677
if (alloc_size == 0)
23679
@@ -482,7 +479,7 @@
23683
- retarray->base_addr = xmalloc (alloc_size);
23684
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23688
Index: libgfortran/generated/minval_i8.c
23689
===================================================================
23690
--- a/src/libgfortran/generated/minval_i8.c (.../tags/gcc_4_8_3_release)
23691
+++ b/src/libgfortran/generated/minval_i8.c (.../branches/gcc-4_8-branch)
23693
retarray->offset = 0;
23694
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23696
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23697
- * extent[rank-1];
23698
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23700
- retarray->base_addr = xmalloc (alloc_size);
23701
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23702
if (alloc_size == 0)
23704
/* Make sure we have a zero-sized array. */
23705
@@ -286,8 +285,7 @@
23709
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23710
- * extent[rank-1];
23711
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23713
retarray->offset = 0;
23714
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23715
@@ -299,7 +297,7 @@
23719
- retarray->base_addr = xmalloc (alloc_size);
23720
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23724
@@ -472,8 +470,7 @@
23725
retarray->offset = 0;
23726
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23728
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23729
- * extent[rank-1];
23730
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23732
if (alloc_size == 0)
23734
@@ -482,7 +479,7 @@
23738
- retarray->base_addr = xmalloc (alloc_size);
23739
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23743
Index: libgfortran/generated/maxloc0_16_i16.c
23744
===================================================================
23745
--- a/src/libgfortran/generated/maxloc0_16_i16.c (.../tags/gcc_4_8_3_release)
23746
+++ b/src/libgfortran/generated/maxloc0_16_i16.c (.../branches/gcc-4_8-branch)
23748
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23749
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23750
retarray->offset = 0;
23751
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23752
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23756
@@ -199,7 +199,7 @@
23757
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23758
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23759
retarray->offset = 0;
23760
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23761
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23765
@@ -367,7 +367,7 @@
23766
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23767
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23768
retarray->offset = 0;
23769
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23770
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23772
else if (unlikely (compile_options.bounds_check))
23774
Index: libgfortran/generated/shape_i4.c
23775
===================================================================
23776
--- a/src/libgfortran/generated/shape_i4.c (.../tags/gcc_4_8_3_release)
23777
+++ b/src/libgfortran/generated/shape_i4.c (.../branches/gcc-4_8-branch)
23780
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
23782
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23783
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23786
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
23787
Index: libgfortran/generated/minloc1_4_i16.c
23788
===================================================================
23789
--- a/src/libgfortran/generated/minloc1_4_i16.c (.../tags/gcc_4_8_3_release)
23790
+++ b/src/libgfortran/generated/minloc1_4_i16.c (.../branches/gcc-4_8-branch)
23792
retarray->offset = 0;
23793
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23795
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23796
- * extent[rank-1];
23797
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23799
- retarray->base_addr = xmalloc (alloc_size);
23800
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23801
if (alloc_size == 0)
23803
/* Make sure we have a zero-sized array. */
23804
@@ -294,8 +293,7 @@
23808
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23809
- * extent[rank-1];
23810
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23812
retarray->offset = 0;
23813
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23814
@@ -307,7 +305,7 @@
23818
- retarray->base_addr = xmalloc (alloc_size);
23819
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23823
@@ -485,8 +483,7 @@
23824
retarray->offset = 0;
23825
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23827
- alloc_size = sizeof (GFC_INTEGER_4) * 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
@@ -495,7 +492,7 @@
23837
- retarray->base_addr = xmalloc (alloc_size);
23838
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23842
Index: libgfortran/generated/maxloc0_4_r10.c
23843
===================================================================
23844
--- a/src/libgfortran/generated/maxloc0_4_r10.c (.../tags/gcc_4_8_3_release)
23845
+++ b/src/libgfortran/generated/maxloc0_4_r10.c (.../branches/gcc-4_8-branch)
23847
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23848
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23849
retarray->offset = 0;
23850
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23851
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23855
@@ -199,7 +199,7 @@
23856
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23857
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23858
retarray->offset = 0;
23859
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23860
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23864
@@ -367,7 +367,7 @@
23865
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23866
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23867
retarray->offset = 0;
23868
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23869
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23871
else if (unlikely (compile_options.bounds_check))
23873
Index: libgfortran/generated/maxloc0_8_i16.c
23874
===================================================================
23875
--- a/src/libgfortran/generated/maxloc0_8_i16.c (.../tags/gcc_4_8_3_release)
23876
+++ b/src/libgfortran/generated/maxloc0_8_i16.c (.../branches/gcc-4_8-branch)
23878
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23879
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23880
retarray->offset = 0;
23881
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23882
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23886
@@ -199,7 +199,7 @@
23887
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23888
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23889
retarray->offset = 0;
23890
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23891
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23895
@@ -367,7 +367,7 @@
23896
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23897
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23898
retarray->offset = 0;
23899
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23900
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23902
else if (unlikely (compile_options.bounds_check))
23904
Index: libgfortran/generated/iall_i2.c
23905
===================================================================
23906
--- a/src/libgfortran/generated/iall_i2.c (.../tags/gcc_4_8_3_release)
23907
+++ b/src/libgfortran/generated/iall_i2.c (.../branches/gcc-4_8-branch)
23909
retarray->offset = 0;
23910
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23912
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23913
- * extent[rank-1];
23914
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23916
- retarray->base_addr = xmalloc (alloc_size);
23917
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
23918
if (alloc_size == 0)
23920
/* Make sure we have a zero-sized array. */
23921
@@ -272,8 +271,7 @@
23925
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23926
- * extent[rank-1];
23927
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23929
retarray->offset = 0;
23930
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23931
@@ -285,7 +283,7 @@
23935
- retarray->base_addr = xmalloc (alloc_size);
23936
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
23940
@@ -430,8 +428,7 @@
23941
retarray->offset = 0;
23942
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23944
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23945
- * extent[rank-1];
23946
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23948
if (alloc_size == 0)
23950
@@ -440,7 +437,7 @@
23954
- retarray->base_addr = xmalloc (alloc_size);
23955
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
23959
Index: libgfortran/generated/maxloc1_8_r10.c
23960
===================================================================
23961
--- a/src/libgfortran/generated/maxloc1_8_r10.c (.../tags/gcc_4_8_3_release)
23962
+++ b/src/libgfortran/generated/maxloc1_8_r10.c (.../branches/gcc-4_8-branch)
23964
retarray->offset = 0;
23965
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23967
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23968
- * extent[rank-1];
23969
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23971
- retarray->base_addr = xmalloc (alloc_size);
23972
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23973
if (alloc_size == 0)
23975
/* Make sure we have a zero-sized array. */
23976
@@ -294,8 +293,7 @@
23980
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23981
- * extent[rank-1];
23982
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23984
retarray->offset = 0;
23985
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23986
@@ -307,7 +305,7 @@
23990
- retarray->base_addr = xmalloc (alloc_size);
23991
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
23995
@@ -485,8 +483,7 @@
23996
retarray->offset = 0;
23997
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23999
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24000
- * extent[rank-1];
24001
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24003
if (alloc_size == 0)
24005
@@ -495,7 +492,7 @@
24009
- retarray->base_addr = xmalloc (alloc_size);
24010
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24014
Index: libgfortran/generated/maxloc0_16_r4.c
24015
===================================================================
24016
--- a/src/libgfortran/generated/maxloc0_16_r4.c (.../tags/gcc_4_8_3_release)
24017
+++ b/src/libgfortran/generated/maxloc0_16_r4.c (.../branches/gcc-4_8-branch)
24019
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24020
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24021
retarray->offset = 0;
24022
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24023
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24027
@@ -199,7 +199,7 @@
24028
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24029
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24030
retarray->offset = 0;
24031
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24032
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24036
@@ -367,7 +367,7 @@
24037
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24038
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24039
retarray->offset = 0;
24040
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24041
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24043
else if (unlikely (compile_options.bounds_check))
24045
Index: libgfortran/generated/minloc0_8_i1.c
24046
===================================================================
24047
--- a/src/libgfortran/generated/minloc0_8_i1.c (.../tags/gcc_4_8_3_release)
24048
+++ b/src/libgfortran/generated/minloc0_8_i1.c (.../branches/gcc-4_8-branch)
24050
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24051
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24052
retarray->offset = 0;
24053
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24054
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24058
@@ -199,7 +199,7 @@
24059
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24060
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24061
retarray->offset = 0;
24062
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24063
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24067
@@ -367,7 +367,7 @@
24068
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24069
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24070
retarray->offset = 0;
24071
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24072
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24074
else if (unlikely (compile_options.bounds_check))
24076
Index: libgfortran/generated/minloc1_16_r8.c
24077
===================================================================
24078
--- a/src/libgfortran/generated/minloc1_16_r8.c (.../tags/gcc_4_8_3_release)
24079
+++ b/src/libgfortran/generated/minloc1_16_r8.c (.../branches/gcc-4_8-branch)
24081
retarray->offset = 0;
24082
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24084
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24085
- * extent[rank-1];
24086
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24088
- retarray->base_addr = xmalloc (alloc_size);
24089
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24090
if (alloc_size == 0)
24092
/* Make sure we have a zero-sized array. */
24093
@@ -294,8 +293,7 @@
24097
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24098
- * extent[rank-1];
24099
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24101
retarray->offset = 0;
24102
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24103
@@ -307,7 +305,7 @@
24107
- retarray->base_addr = xmalloc (alloc_size);
24108
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24112
@@ -485,8 +483,7 @@
24113
retarray->offset = 0;
24114
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24116
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24117
- * extent[rank-1];
24118
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24120
if (alloc_size == 0)
24122
@@ -495,7 +492,7 @@
24126
- retarray->base_addr = xmalloc (alloc_size);
24127
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24131
Index: libgfortran/generated/unpack_i8.c
24132
===================================================================
24133
--- a/src/libgfortran/generated/unpack_i8.c (.../tags/gcc_4_8_3_release)
24134
+++ b/src/libgfortran/generated/unpack_i8.c (.../branches/gcc-4_8-branch)
24139
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
24140
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
24144
@@ -244,7 +244,7 @@
24148
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
24149
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
24153
Index: libgfortran/generated/maxloc0_4_i4.c
24154
===================================================================
24155
--- a/src/libgfortran/generated/maxloc0_4_i4.c (.../tags/gcc_4_8_3_release)
24156
+++ b/src/libgfortran/generated/maxloc0_4_i4.c (.../branches/gcc-4_8-branch)
24158
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24159
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24160
retarray->offset = 0;
24161
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24162
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24166
@@ -199,7 +199,7 @@
24167
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24168
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24169
retarray->offset = 0;
24170
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24171
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24175
@@ -367,7 +367,7 @@
24176
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24177
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24178
retarray->offset = 0;
24179
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24180
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24182
else if (unlikely (compile_options.bounds_check))
24184
Index: libgfortran/generated/count_4_l.c
24185
===================================================================
24186
--- a/src/libgfortran/generated/count_4_l.c (.../tags/gcc_4_8_3_release)
24187
+++ b/src/libgfortran/generated/count_4_l.c (.../branches/gcc-4_8-branch)
24188
@@ -101,8 +101,7 @@
24189
retarray->offset = 0;
24190
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24192
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24193
- * extent[rank-1];
24194
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24196
if (alloc_size == 0)
24198
@@ -111,7 +110,7 @@
24202
- retarray->base_addr = xmalloc (alloc_size);
24203
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24207
Index: libgfortran/generated/sum_r10.c
24208
===================================================================
24209
--- a/src/libgfortran/generated/sum_r10.c (.../tags/gcc_4_8_3_release)
24210
+++ b/src/libgfortran/generated/sum_r10.c (.../branches/gcc-4_8-branch)
24212
retarray->offset = 0;
24213
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24215
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24216
- * extent[rank-1];
24217
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24219
- retarray->base_addr = xmalloc (alloc_size);
24220
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24221
if (alloc_size == 0)
24223
/* Make sure we have a zero-sized array. */
24224
@@ -272,8 +271,7 @@
24228
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24229
- * extent[rank-1];
24230
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24232
retarray->offset = 0;
24233
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24234
@@ -285,7 +283,7 @@
24238
- retarray->base_addr = xmalloc (alloc_size);
24239
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24243
@@ -430,8 +428,7 @@
24244
retarray->offset = 0;
24245
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24247
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24248
- * extent[rank-1];
24249
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24251
if (alloc_size == 0)
24253
@@ -440,7 +437,7 @@
24257
- retarray->base_addr = xmalloc (alloc_size);
24258
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24262
Index: libgfortran/generated/sum_c4.c
24263
===================================================================
24264
--- a/src/libgfortran/generated/sum_c4.c (.../tags/gcc_4_8_3_release)
24265
+++ b/src/libgfortran/generated/sum_c4.c (.../branches/gcc-4_8-branch)
24267
retarray->offset = 0;
24268
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24270
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24271
- * extent[rank-1];
24272
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24274
- retarray->base_addr = xmalloc (alloc_size);
24275
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
24276
if (alloc_size == 0)
24278
/* Make sure we have a zero-sized array. */
24279
@@ -272,8 +271,7 @@
24283
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24284
- * extent[rank-1];
24285
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24287
retarray->offset = 0;
24288
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24289
@@ -285,7 +283,7 @@
24293
- retarray->base_addr = xmalloc (alloc_size);
24294
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
24298
@@ -430,8 +428,7 @@
24299
retarray->offset = 0;
24300
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24302
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24303
- * extent[rank-1];
24304
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24306
if (alloc_size == 0)
24308
@@ -440,7 +437,7 @@
24312
- retarray->base_addr = xmalloc (alloc_size);
24313
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
24317
Index: libgfortran/generated/maxloc1_16_r10.c
24318
===================================================================
24319
--- a/src/libgfortran/generated/maxloc1_16_r10.c (.../tags/gcc_4_8_3_release)
24320
+++ b/src/libgfortran/generated/maxloc1_16_r10.c (.../branches/gcc-4_8-branch)
24322
retarray->offset = 0;
24323
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24325
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24326
- * extent[rank-1];
24327
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24329
- retarray->base_addr = xmalloc (alloc_size);
24330
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24331
if (alloc_size == 0)
24333
/* Make sure we have a zero-sized array. */
24334
@@ -294,8 +293,7 @@
24338
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24339
- * extent[rank-1];
24340
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24342
retarray->offset = 0;
24343
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24344
@@ -307,7 +305,7 @@
24348
- retarray->base_addr = xmalloc (alloc_size);
24349
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24353
@@ -485,8 +483,7 @@
24354
retarray->offset = 0;
24355
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24357
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24358
- * extent[rank-1];
24359
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24361
if (alloc_size == 0)
24363
@@ -495,7 +492,7 @@
24367
- retarray->base_addr = xmalloc (alloc_size);
24368
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24372
Index: libgfortran/generated/pack_i16.c
24373
===================================================================
24374
--- a/src/libgfortran/generated/pack_i16.c (.../tags/gcc_4_8_3_release)
24375
+++ b/src/libgfortran/generated/pack_i16.c (.../branches/gcc-4_8-branch)
24376
@@ -167,8 +167,8 @@
24380
- /* xmalloc allocates a single byte for zero size. */
24381
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * total);
24382
+ /* xmallocarray allocates a single byte for zero size. */
24383
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_16));
24387
Index: libgfortran/generated/matmul_i8.c
24388
===================================================================
24389
--- a/src/libgfortran/generated/matmul_i8.c (.../tags/gcc_4_8_3_release)
24390
+++ b/src/libgfortran/generated/matmul_i8.c (.../branches/gcc-4_8-branch)
24391
@@ -124,7 +124,7 @@
24394
retarray->base_addr
24395
- = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) retarray));
24396
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_8));
24397
retarray->offset = 0;
24399
else if (unlikely (compile_options.bounds_check))
24400
Index: libgfortran/generated/maxloc0_16_i2.c
24401
===================================================================
24402
--- a/src/libgfortran/generated/maxloc0_16_i2.c (.../tags/gcc_4_8_3_release)
24403
+++ b/src/libgfortran/generated/maxloc0_16_i2.c (.../branches/gcc-4_8-branch)
24405
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24406
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24407
retarray->offset = 0;
24408
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24409
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24413
@@ -199,7 +199,7 @@
24414
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24415
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24416
retarray->offset = 0;
24417
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24418
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24422
@@ -367,7 +367,7 @@
24423
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24424
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24425
retarray->offset = 0;
24426
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24427
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24429
else if (unlikely (compile_options.bounds_check))
24431
Index: libgfortran/generated/spread_c4.c
24432
===================================================================
24433
--- a/src/libgfortran/generated/spread_c4.c (.../tags/gcc_4_8_3_release)
24434
+++ b/src/libgfortran/generated/spread_c4.c (.../branches/gcc-4_8-branch)
24435
@@ -101,8 +101,8 @@
24439
- /* xmalloc allocates a single byte for zero size. */
24440
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_4));
24441
+ /* xmallocarray allocates a single byte for zero size. */
24442
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_4));
24446
@@ -244,7 +244,7 @@
24448
if (ret->base_addr == NULL)
24450
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_4));
24451
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_4));
24453
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
24455
Index: libgfortran/generated/maxval_r10.c
24456
===================================================================
24457
--- a/src/libgfortran/generated/maxval_r10.c (.../tags/gcc_4_8_3_release)
24458
+++ b/src/libgfortran/generated/maxval_r10.c (.../branches/gcc-4_8-branch)
24460
retarray->offset = 0;
24461
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24463
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24464
- * extent[rank-1];
24465
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24467
- retarray->base_addr = xmalloc (alloc_size);
24468
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24469
if (alloc_size == 0)
24471
/* Make sure we have a zero-sized array. */
24472
@@ -286,8 +285,7 @@
24476
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24477
- * extent[rank-1];
24478
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24480
retarray->offset = 0;
24481
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24482
@@ -299,7 +297,7 @@
24486
- retarray->base_addr = xmalloc (alloc_size);
24487
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24491
@@ -472,8 +470,7 @@
24492
retarray->offset = 0;
24493
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24495
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24496
- * extent[rank-1];
24497
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24499
if (alloc_size == 0)
24501
@@ -482,7 +479,7 @@
24505
- retarray->base_addr = xmalloc (alloc_size);
24506
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
24510
Index: libgfortran/generated/pack_i4.c
24511
===================================================================
24512
--- a/src/libgfortran/generated/pack_i4.c (.../tags/gcc_4_8_3_release)
24513
+++ b/src/libgfortran/generated/pack_i4.c (.../branches/gcc-4_8-branch)
24514
@@ -167,8 +167,8 @@
24518
- /* xmalloc allocates a single byte for zero size. */
24519
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * total);
24520
+ /* xmallocarray allocates a single byte for zero size. */
24521
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_4));
24525
Index: libgfortran/generated/maxloc1_4_i1.c
24526
===================================================================
24527
--- a/src/libgfortran/generated/maxloc1_4_i1.c (.../tags/gcc_4_8_3_release)
24528
+++ b/src/libgfortran/generated/maxloc1_4_i1.c (.../branches/gcc-4_8-branch)
24530
retarray->offset = 0;
24531
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24533
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24534
- * extent[rank-1];
24535
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24537
- retarray->base_addr = xmalloc (alloc_size);
24538
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24539
if (alloc_size == 0)
24541
/* Make sure we have a zero-sized array. */
24542
@@ -294,8 +293,7 @@
24546
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24547
- * extent[rank-1];
24548
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24550
retarray->offset = 0;
24551
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24552
@@ -307,7 +305,7 @@
24556
- retarray->base_addr = xmalloc (alloc_size);
24557
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24561
@@ -485,8 +483,7 @@
24562
retarray->offset = 0;
24563
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24565
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24566
- * extent[rank-1];
24567
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24569
if (alloc_size == 0)
24571
@@ -495,7 +492,7 @@
24575
- retarray->base_addr = xmalloc (alloc_size);
24576
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24580
Index: libgfortran/generated/matmul_r10.c
24581
===================================================================
24582
--- a/src/libgfortran/generated/matmul_r10.c (.../tags/gcc_4_8_3_release)
24583
+++ b/src/libgfortran/generated/matmul_r10.c (.../branches/gcc-4_8-branch)
24584
@@ -124,7 +124,7 @@
24587
retarray->base_addr
24588
- = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) retarray));
24589
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_10));
24590
retarray->offset = 0;
24592
else if (unlikely (compile_options.bounds_check))
24593
Index: libgfortran/generated/minloc1_4_i8.c
24594
===================================================================
24595
--- a/src/libgfortran/generated/minloc1_4_i8.c (.../tags/gcc_4_8_3_release)
24596
+++ b/src/libgfortran/generated/minloc1_4_i8.c (.../branches/gcc-4_8-branch)
24598
retarray->offset = 0;
24599
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24601
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24602
- * extent[rank-1];
24603
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24605
- retarray->base_addr = xmalloc (alloc_size);
24606
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24607
if (alloc_size == 0)
24609
/* Make sure we have a zero-sized array. */
24610
@@ -294,8 +293,7 @@
24614
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24615
- * extent[rank-1];
24616
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24618
retarray->offset = 0;
24619
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24620
@@ -307,7 +305,7 @@
24624
- retarray->base_addr = xmalloc (alloc_size);
24625
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24629
@@ -485,8 +483,7 @@
24630
retarray->offset = 0;
24631
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24633
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24634
- * extent[rank-1];
24635
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24637
if (alloc_size == 0)
24639
@@ -495,7 +492,7 @@
24643
- retarray->base_addr = xmalloc (alloc_size);
24644
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24648
Index: libgfortran/generated/minloc0_8_r4.c
24649
===================================================================
24650
--- a/src/libgfortran/generated/minloc0_8_r4.c (.../tags/gcc_4_8_3_release)
24651
+++ b/src/libgfortran/generated/minloc0_8_r4.c (.../branches/gcc-4_8-branch)
24653
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24654
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24655
retarray->offset = 0;
24656
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24657
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24661
@@ -199,7 +199,7 @@
24662
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24663
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24664
retarray->offset = 0;
24665
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24666
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24670
@@ -367,7 +367,7 @@
24671
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24672
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24673
retarray->offset = 0;
24674
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24675
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24677
else if (unlikely (compile_options.bounds_check))
24679
Index: libgfortran/generated/matmul_l4.c
24680
===================================================================
24681
--- a/src/libgfortran/generated/matmul_l4.c (.../tags/gcc_4_8_3_release)
24682
+++ b/src/libgfortran/generated/matmul_l4.c (.../branches/gcc-4_8-branch)
24686
retarray->base_addr
24687
- = xmalloc (sizeof (GFC_LOGICAL_4) * size0 ((array_t *) retarray));
24688
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_4));
24689
retarray->offset = 0;
24691
else if (unlikely (compile_options.bounds_check))
24692
Index: libgfortran/generated/reshape_r8.c
24693
===================================================================
24694
--- a/src/libgfortran/generated/reshape_r8.c (.../tags/gcc_4_8_3_release)
24695
+++ b/src/libgfortran/generated/reshape_r8.c (.../branches/gcc-4_8-branch)
24696
@@ -111,11 +111,11 @@
24699
if (unlikely (rs < 1))
24703
- alloc_size = rs * sizeof (GFC_REAL_8);
24706
- ret->base_addr = xmalloc (alloc_size);
24707
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
24708
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
24711
Index: libgfortran/generated/in_pack_c10.c
24712
===================================================================
24713
--- a/src/libgfortran/generated/in_pack_c10.c (.../tags/gcc_4_8_3_release)
24714
+++ b/src/libgfortran/generated/in_pack_c10.c (.../branches/gcc-4_8-branch)
24716
return source->base_addr;
24718
/* Allocate storage for the destination. */
24719
- destptr = (GFC_COMPLEX_10 *)xmalloc (ssize * sizeof (GFC_COMPLEX_10));
24720
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_10));
24722
src = source->base_addr;
24723
stride0 = stride[0];
24724
Index: libgfortran/generated/all_l4.c
24725
===================================================================
24726
--- a/src/libgfortran/generated/all_l4.c (.../tags/gcc_4_8_3_release)
24727
+++ b/src/libgfortran/generated/all_l4.c (.../branches/gcc-4_8-branch)
24728
@@ -101,8 +101,7 @@
24729
retarray->offset = 0;
24730
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24732
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24733
- * extent[rank-1];
24734
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24736
if (alloc_size == 0)
24738
@@ -111,7 +110,7 @@
24742
- retarray->base_addr = xmalloc (alloc_size);
24743
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
24747
Index: libgfortran/generated/minloc0_8_i2.c
24748
===================================================================
24749
--- a/src/libgfortran/generated/minloc0_8_i2.c (.../tags/gcc_4_8_3_release)
24750
+++ b/src/libgfortran/generated/minloc0_8_i2.c (.../branches/gcc-4_8-branch)
24752
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24753
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24754
retarray->offset = 0;
24755
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24756
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24760
@@ -199,7 +199,7 @@
24761
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24762
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24763
retarray->offset = 0;
24764
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24765
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24769
@@ -367,7 +367,7 @@
24770
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24771
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24772
retarray->offset = 0;
24773
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24774
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24776
else if (unlikely (compile_options.bounds_check))
24778
Index: libgfortran/generated/norm2_r16.c
24779
===================================================================
24780
--- a/src/libgfortran/generated/norm2_r16.c (.../tags/gcc_4_8_3_release)
24781
+++ b/src/libgfortran/generated/norm2_r16.c (.../branches/gcc-4_8-branch)
24782
@@ -105,10 +105,9 @@
24783
retarray->offset = 0;
24784
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24786
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24787
- * extent[rank-1];
24788
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24790
- retarray->base_addr = xmalloc (alloc_size);
24791
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
24792
if (alloc_size == 0)
24794
/* Make sure we have a zero-sized array. */
24795
Index: libgfortran/generated/reshape_c10.c
24796
===================================================================
24797
--- a/src/libgfortran/generated/reshape_c10.c (.../tags/gcc_4_8_3_release)
24798
+++ b/src/libgfortran/generated/reshape_c10.c (.../branches/gcc-4_8-branch)
24799
@@ -111,11 +111,11 @@
24802
if (unlikely (rs < 1))
24806
- alloc_size = rs * sizeof (GFC_COMPLEX_10);
24809
- ret->base_addr = xmalloc (alloc_size);
24810
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
24811
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
24814
Index: libgfortran/generated/unpack_c16.c
24815
===================================================================
24816
--- a/src/libgfortran/generated/unpack_c16.c (.../tags/gcc_4_8_3_release)
24817
+++ b/src/libgfortran/generated/unpack_c16.c (.../branches/gcc-4_8-branch)
24822
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
24823
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
24827
@@ -244,7 +244,7 @@
24831
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
24832
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
24836
Index: libgfortran/generated/maxloc1_4_r4.c
24837
===================================================================
24838
--- a/src/libgfortran/generated/maxloc1_4_r4.c (.../tags/gcc_4_8_3_release)
24839
+++ b/src/libgfortran/generated/maxloc1_4_r4.c (.../branches/gcc-4_8-branch)
24841
retarray->offset = 0;
24842
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24844
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24845
- * extent[rank-1];
24846
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24848
- retarray->base_addr = xmalloc (alloc_size);
24849
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24850
if (alloc_size == 0)
24852
/* Make sure we have a zero-sized array. */
24853
@@ -294,8 +293,7 @@
24857
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24858
- * extent[rank-1];
24859
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24861
retarray->offset = 0;
24862
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24863
@@ -307,7 +305,7 @@
24867
- retarray->base_addr = xmalloc (alloc_size);
24868
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24872
@@ -485,8 +483,7 @@
24873
retarray->offset = 0;
24874
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24876
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24877
- * extent[rank-1];
24878
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24880
if (alloc_size == 0)
24882
@@ -495,7 +492,7 @@
24886
- retarray->base_addr = xmalloc (alloc_size);
24887
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24891
Index: libgfortran/generated/maxval_r8.c
24892
===================================================================
24893
--- a/src/libgfortran/generated/maxval_r8.c (.../tags/gcc_4_8_3_release)
24894
+++ b/src/libgfortran/generated/maxval_r8.c (.../branches/gcc-4_8-branch)
24896
retarray->offset = 0;
24897
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24899
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24900
- * extent[rank-1];
24901
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24903
- retarray->base_addr = xmalloc (alloc_size);
24904
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
24905
if (alloc_size == 0)
24907
/* Make sure we have a zero-sized array. */
24908
@@ -286,8 +285,7 @@
24912
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24913
- * extent[rank-1];
24914
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24916
retarray->offset = 0;
24917
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24918
@@ -299,7 +297,7 @@
24922
- retarray->base_addr = xmalloc (alloc_size);
24923
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
24927
@@ -472,8 +470,7 @@
24928
retarray->offset = 0;
24929
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24931
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24932
- * extent[rank-1];
24933
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24935
if (alloc_size == 0)
24937
@@ -482,7 +479,7 @@
24941
- retarray->base_addr = xmalloc (alloc_size);
24942
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
24946
Index: libgfortran/generated/transpose_c4.c
24947
===================================================================
24948
--- a/src/libgfortran/generated/transpose_c4.c (.../tags/gcc_4_8_3_release)
24949
+++ b/src/libgfortran/generated/transpose_c4.c (.../branches/gcc-4_8-branch)
24951
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
24952
GFC_DESCRIPTOR_EXTENT(source, 1));
24954
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) ret));
24955
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
24956
+ sizeof (GFC_COMPLEX_4));
24958
} else if (unlikely (compile_options.bounds_check))
24960
Index: libgfortran/generated/eoshift1_4.c
24961
===================================================================
24962
--- a/src/libgfortran/generated/eoshift1_4.c (.../tags/gcc_4_8_3_release)
24963
+++ b/src/libgfortran/generated/eoshift1_4.c (.../branches/gcc-4_8-branch)
24964
@@ -105,8 +105,8 @@
24965
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
24968
- /* xmalloc allocates a single byte for zero size. */
24969
- ret->base_addr = xmalloc (size * arraysize);
24970
+ /* xmallocarray allocates a single byte for zero size. */
24971
+ ret->base_addr = xmallocarray (arraysize, size);
24974
else if (unlikely (compile_options.bounds_check))
24975
Index: libgfortran/generated/minval_r16.c
24976
===================================================================
24977
--- a/src/libgfortran/generated/minval_r16.c (.../tags/gcc_4_8_3_release)
24978
+++ b/src/libgfortran/generated/minval_r16.c (.../branches/gcc-4_8-branch)
24980
retarray->offset = 0;
24981
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24983
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24984
- * extent[rank-1];
24985
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24987
- retarray->base_addr = xmalloc (alloc_size);
24988
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
24989
if (alloc_size == 0)
24991
/* Make sure we have a zero-sized array. */
24992
@@ -286,8 +285,7 @@
24996
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24997
- * extent[rank-1];
24998
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25000
retarray->offset = 0;
25001
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25002
@@ -299,7 +297,7 @@
25006
- retarray->base_addr = xmalloc (alloc_size);
25007
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
25011
@@ -472,8 +470,7 @@
25012
retarray->offset = 0;
25013
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25015
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25016
- * extent[rank-1];
25017
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25019
if (alloc_size == 0)
25021
@@ -482,7 +479,7 @@
25025
- retarray->base_addr = xmalloc (alloc_size);
25026
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
25030
Index: libgfortran/generated/iany_i16.c
25031
===================================================================
25032
--- a/src/libgfortran/generated/iany_i16.c (.../tags/gcc_4_8_3_release)
25033
+++ b/src/libgfortran/generated/iany_i16.c (.../branches/gcc-4_8-branch)
25035
retarray->offset = 0;
25036
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25038
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25039
- * extent[rank-1];
25040
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25042
- retarray->base_addr = xmalloc (alloc_size);
25043
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25044
if (alloc_size == 0)
25046
/* Make sure we have a zero-sized array. */
25047
@@ -272,8 +271,7 @@
25051
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25052
- * extent[rank-1];
25053
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25055
retarray->offset = 0;
25056
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25057
@@ -285,7 +283,7 @@
25061
- retarray->base_addr = xmalloc (alloc_size);
25062
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25066
@@ -430,8 +428,7 @@
25067
retarray->offset = 0;
25068
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25070
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25071
- * extent[rank-1];
25072
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25074
if (alloc_size == 0)
25076
@@ -440,7 +437,7 @@
25080
- retarray->base_addr = xmalloc (alloc_size);
25081
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25085
Index: libgfortran/generated/maxloc1_4_i2.c
25086
===================================================================
25087
--- a/src/libgfortran/generated/maxloc1_4_i2.c (.../tags/gcc_4_8_3_release)
25088
+++ b/src/libgfortran/generated/maxloc1_4_i2.c (.../branches/gcc-4_8-branch)
25090
retarray->offset = 0;
25091
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25093
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25094
- * extent[rank-1];
25095
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25097
- retarray->base_addr = xmalloc (alloc_size);
25098
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25099
if (alloc_size == 0)
25101
/* Make sure we have a zero-sized array. */
25102
@@ -294,8 +293,7 @@
25106
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25107
- * extent[rank-1];
25108
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25110
retarray->offset = 0;
25111
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25112
@@ -307,7 +305,7 @@
25116
- retarray->base_addr = xmalloc (alloc_size);
25117
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25121
@@ -485,8 +483,7 @@
25122
retarray->offset = 0;
25123
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25125
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25126
- * extent[rank-1];
25127
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25129
if (alloc_size == 0)
25131
@@ -495,7 +492,7 @@
25135
- retarray->base_addr = xmalloc (alloc_size);
25136
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25140
Index: libgfortran/generated/maxloc1_8_i8.c
25141
===================================================================
25142
--- a/src/libgfortran/generated/maxloc1_8_i8.c (.../tags/gcc_4_8_3_release)
25143
+++ b/src/libgfortran/generated/maxloc1_8_i8.c (.../branches/gcc-4_8-branch)
25145
retarray->offset = 0;
25146
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25148
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25149
- * extent[rank-1];
25150
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25152
- retarray->base_addr = xmalloc (alloc_size);
25153
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25154
if (alloc_size == 0)
25156
/* Make sure we have a zero-sized array. */
25157
@@ -294,8 +293,7 @@
25161
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25162
- * extent[rank-1];
25163
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25165
retarray->offset = 0;
25166
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25167
@@ -307,7 +305,7 @@
25171
- retarray->base_addr = xmalloc (alloc_size);
25172
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25176
@@ -485,8 +483,7 @@
25177
retarray->offset = 0;
25178
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25180
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25181
- * extent[rank-1];
25182
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25184
if (alloc_size == 0)
25186
@@ -495,7 +492,7 @@
25190
- retarray->base_addr = xmalloc (alloc_size);
25191
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25195
Index: libgfortran/generated/maxloc0_4_r8.c
25196
===================================================================
25197
--- a/src/libgfortran/generated/maxloc0_4_r8.c (.../tags/gcc_4_8_3_release)
25198
+++ b/src/libgfortran/generated/maxloc0_4_r8.c (.../branches/gcc-4_8-branch)
25200
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25201
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25202
retarray->offset = 0;
25203
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
25204
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
25208
@@ -199,7 +199,7 @@
25209
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25210
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25211
retarray->offset = 0;
25212
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
25213
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
25217
@@ -367,7 +367,7 @@
25218
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25219
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25220
retarray->offset = 0;
25221
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
25222
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
25224
else if (unlikely (compile_options.bounds_check))
25226
Index: libgfortran/generated/maxloc0_16_r16.c
25227
===================================================================
25228
--- a/src/libgfortran/generated/maxloc0_16_r16.c (.../tags/gcc_4_8_3_release)
25229
+++ b/src/libgfortran/generated/maxloc0_16_r16.c (.../branches/gcc-4_8-branch)
25231
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25232
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25233
retarray->offset = 0;
25234
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25235
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25239
@@ -199,7 +199,7 @@
25240
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25241
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25242
retarray->offset = 0;
25243
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25244
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25248
@@ -367,7 +367,7 @@
25249
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25250
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25251
retarray->offset = 0;
25252
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25253
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25255
else if (unlikely (compile_options.bounds_check))
25257
Index: libgfortran/generated/sum_c10.c
25258
===================================================================
25259
--- a/src/libgfortran/generated/sum_c10.c (.../tags/gcc_4_8_3_release)
25260
+++ b/src/libgfortran/generated/sum_c10.c (.../branches/gcc-4_8-branch)
25262
retarray->offset = 0;
25263
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25265
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25266
- * extent[rank-1];
25267
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25269
- retarray->base_addr = xmalloc (alloc_size);
25270
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
25271
if (alloc_size == 0)
25273
/* Make sure we have a zero-sized array. */
25274
@@ -272,8 +271,7 @@
25278
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25279
- * extent[rank-1];
25280
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25282
retarray->offset = 0;
25283
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25284
@@ -285,7 +283,7 @@
25288
- retarray->base_addr = xmalloc (alloc_size);
25289
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
25293
@@ -430,8 +428,7 @@
25294
retarray->offset = 0;
25295
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25297
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25298
- * extent[rank-1];
25299
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25301
if (alloc_size == 0)
25303
@@ -440,7 +437,7 @@
25307
- retarray->base_addr = xmalloc (alloc_size);
25308
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
25312
Index: libgfortran/generated/iall_i4.c
25313
===================================================================
25314
--- a/src/libgfortran/generated/iall_i4.c (.../tags/gcc_4_8_3_release)
25315
+++ b/src/libgfortran/generated/iall_i4.c (.../branches/gcc-4_8-branch)
25317
retarray->offset = 0;
25318
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25320
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25321
- * extent[rank-1];
25322
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25324
- retarray->base_addr = xmalloc (alloc_size);
25325
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25326
if (alloc_size == 0)
25328
/* Make sure we have a zero-sized array. */
25329
@@ -272,8 +271,7 @@
25333
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25334
- * extent[rank-1];
25335
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25337
retarray->offset = 0;
25338
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25339
@@ -285,7 +283,7 @@
25343
- retarray->base_addr = xmalloc (alloc_size);
25344
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25348
@@ -430,8 +428,7 @@
25349
retarray->offset = 0;
25350
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25352
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25353
- * extent[rank-1];
25354
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25356
if (alloc_size == 0)
25358
@@ -440,7 +437,7 @@
25362
- retarray->base_addr = xmalloc (alloc_size);
25363
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25367
Index: libgfortran/generated/minloc1_4_r16.c
25368
===================================================================
25369
--- a/src/libgfortran/generated/minloc1_4_r16.c (.../tags/gcc_4_8_3_release)
25370
+++ b/src/libgfortran/generated/minloc1_4_r16.c (.../branches/gcc-4_8-branch)
25372
retarray->offset = 0;
25373
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25375
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25376
- * extent[rank-1];
25377
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25379
- retarray->base_addr = xmalloc (alloc_size);
25380
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25381
if (alloc_size == 0)
25383
/* Make sure we have a zero-sized array. */
25384
@@ -294,8 +293,7 @@
25388
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25389
- * extent[rank-1];
25390
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25392
retarray->offset = 0;
25393
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25394
@@ -307,7 +305,7 @@
25398
- retarray->base_addr = xmalloc (alloc_size);
25399
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25403
@@ -485,8 +483,7 @@
25404
retarray->offset = 0;
25405
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25407
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25408
- * extent[rank-1];
25409
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25411
if (alloc_size == 0)
25413
@@ -495,7 +492,7 @@
25417
- retarray->base_addr = xmalloc (alloc_size);
25418
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25422
Index: libgfortran/generated/maxloc0_8_r16.c
25423
===================================================================
25424
--- a/src/libgfortran/generated/maxloc0_8_r16.c (.../tags/gcc_4_8_3_release)
25425
+++ b/src/libgfortran/generated/maxloc0_8_r16.c (.../branches/gcc-4_8-branch)
25427
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25428
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25429
retarray->offset = 0;
25430
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25431
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25435
@@ -199,7 +199,7 @@
25436
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25437
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25438
retarray->offset = 0;
25439
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25440
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25444
@@ -367,7 +367,7 @@
25445
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25446
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25447
retarray->offset = 0;
25448
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25449
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25451
else if (unlikely (compile_options.bounds_check))
25453
Index: libgfortran/generated/pack_r8.c
25454
===================================================================
25455
--- a/src/libgfortran/generated/pack_r8.c (.../tags/gcc_4_8_3_release)
25456
+++ b/src/libgfortran/generated/pack_r8.c (.../branches/gcc-4_8-branch)
25457
@@ -167,8 +167,8 @@
25461
- /* xmalloc allocates a single byte for zero size. */
25462
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * total);
25463
+ /* xmallocarray allocates a single byte for zero size. */
25464
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_8));
25468
Index: libgfortran/generated/matmul_c10.c
25469
===================================================================
25470
--- a/src/libgfortran/generated/matmul_c10.c (.../tags/gcc_4_8_3_release)
25471
+++ b/src/libgfortran/generated/matmul_c10.c (.../branches/gcc-4_8-branch)
25472
@@ -124,7 +124,7 @@
25475
retarray->base_addr
25476
- = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) retarray));
25477
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_10));
25478
retarray->offset = 0;
25480
else if (unlikely (compile_options.bounds_check))
25481
Index: libgfortran/generated/maxloc0_16_i4.c
25482
===================================================================
25483
--- a/src/libgfortran/generated/maxloc0_16_i4.c (.../tags/gcc_4_8_3_release)
25484
+++ b/src/libgfortran/generated/maxloc0_16_i4.c (.../branches/gcc-4_8-branch)
25486
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25487
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25488
retarray->offset = 0;
25489
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25490
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25494
@@ -199,7 +199,7 @@
25495
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25496
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25497
retarray->offset = 0;
25498
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25499
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25503
@@ -367,7 +367,7 @@
25504
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25505
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25506
retarray->offset = 0;
25507
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25508
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25510
else if (unlikely (compile_options.bounds_check))
25512
Index: libgfortran/generated/pack_r16.c
25513
===================================================================
25514
--- a/src/libgfortran/generated/pack_r16.c (.../tags/gcc_4_8_3_release)
25515
+++ b/src/libgfortran/generated/pack_r16.c (.../branches/gcc-4_8-branch)
25516
@@ -167,8 +167,8 @@
25520
- /* xmalloc allocates a single byte for zero size. */
25521
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * total);
25522
+ /* xmallocarray allocates a single byte for zero size. */
25523
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_16));
25527
Index: libgfortran/generated/minloc1_16_i8.c
25528
===================================================================
25529
--- a/src/libgfortran/generated/minloc1_16_i8.c (.../tags/gcc_4_8_3_release)
25530
+++ b/src/libgfortran/generated/minloc1_16_i8.c (.../branches/gcc-4_8-branch)
25532
retarray->offset = 0;
25533
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25535
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25536
- * extent[rank-1];
25537
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25539
- retarray->base_addr = xmalloc (alloc_size);
25540
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25541
if (alloc_size == 0)
25543
/* Make sure we have a zero-sized array. */
25544
@@ -294,8 +293,7 @@
25548
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25549
- * extent[rank-1];
25550
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25552
retarray->offset = 0;
25553
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25554
@@ -307,7 +305,7 @@
25558
- retarray->base_addr = xmalloc (alloc_size);
25559
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25563
@@ -485,8 +483,7 @@
25564
retarray->offset = 0;
25565
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25567
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25568
- * extent[rank-1];
25569
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25571
if (alloc_size == 0)
25573
@@ -495,7 +492,7 @@
25577
- retarray->base_addr = xmalloc (alloc_size);
25578
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25582
Index: libgfortran/generated/minloc0_16_r10.c
25583
===================================================================
25584
--- a/src/libgfortran/generated/minloc0_16_r10.c (.../tags/gcc_4_8_3_release)
25585
+++ b/src/libgfortran/generated/minloc0_16_r10.c (.../branches/gcc-4_8-branch)
25587
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25588
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25589
retarray->offset = 0;
25590
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25591
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25595
@@ -199,7 +199,7 @@
25596
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25597
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25598
retarray->offset = 0;
25599
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25600
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25604
@@ -367,7 +367,7 @@
25605
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25606
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25607
retarray->offset = 0;
25608
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25609
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25611
else if (unlikely (compile_options.bounds_check))
25613
Index: libgfortran/generated/unpack_c4.c
25614
===================================================================
25615
--- a/src/libgfortran/generated/unpack_c4.c (.../tags/gcc_4_8_3_release)
25616
+++ b/src/libgfortran/generated/unpack_c4.c (.../branches/gcc-4_8-branch)
25621
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
25622
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
25626
@@ -244,7 +244,7 @@
25630
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
25631
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
25635
Index: libgfortran/generated/iparity_i1.c
25636
===================================================================
25637
--- a/src/libgfortran/generated/iparity_i1.c (.../tags/gcc_4_8_3_release)
25638
+++ b/src/libgfortran/generated/iparity_i1.c (.../branches/gcc-4_8-branch)
25640
retarray->offset = 0;
25641
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25643
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25644
- * extent[rank-1];
25645
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25647
- retarray->base_addr = xmalloc (alloc_size);
25648
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
25649
if (alloc_size == 0)
25651
/* Make sure we have a zero-sized array. */
25652
@@ -272,8 +271,7 @@
25656
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25657
- * extent[rank-1];
25658
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25660
retarray->offset = 0;
25661
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25662
@@ -285,7 +283,7 @@
25666
- retarray->base_addr = xmalloc (alloc_size);
25667
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
25671
@@ -430,8 +428,7 @@
25672
retarray->offset = 0;
25673
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25675
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25676
- * extent[rank-1];
25677
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25679
if (alloc_size == 0)
25681
@@ -440,7 +437,7 @@
25685
- retarray->base_addr = xmalloc (alloc_size);
25686
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
25690
Index: libgfortran/generated/product_c8.c
25691
===================================================================
25692
--- a/src/libgfortran/generated/product_c8.c (.../tags/gcc_4_8_3_release)
25693
+++ b/src/libgfortran/generated/product_c8.c (.../branches/gcc-4_8-branch)
25695
retarray->offset = 0;
25696
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25698
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25699
- * extent[rank-1];
25700
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25702
- retarray->base_addr = xmalloc (alloc_size);
25703
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
25704
if (alloc_size == 0)
25706
/* Make sure we have a zero-sized array. */
25707
@@ -272,8 +271,7 @@
25711
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25712
- * extent[rank-1];
25713
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25715
retarray->offset = 0;
25716
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25717
@@ -285,7 +283,7 @@
25721
- retarray->base_addr = xmalloc (alloc_size);
25722
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
25726
@@ -430,8 +428,7 @@
25727
retarray->offset = 0;
25728
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25730
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25731
- * extent[rank-1];
25732
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25734
if (alloc_size == 0)
25736
@@ -440,7 +437,7 @@
25740
- retarray->base_addr = xmalloc (alloc_size);
25741
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
25745
Index: libgfortran/generated/in_pack_i16.c
25746
===================================================================
25747
--- a/src/libgfortran/generated/in_pack_i16.c (.../tags/gcc_4_8_3_release)
25748
+++ b/src/libgfortran/generated/in_pack_i16.c (.../branches/gcc-4_8-branch)
25750
return source->base_addr;
25752
/* Allocate storage for the destination. */
25753
- destptr = (GFC_INTEGER_16 *)xmalloc (ssize * sizeof (GFC_INTEGER_16));
25754
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_16));
25756
src = source->base_addr;
25757
stride0 = stride[0];
25758
Index: libgfortran/generated/minloc0_8_i4.c
25759
===================================================================
25760
--- a/src/libgfortran/generated/minloc0_8_i4.c (.../tags/gcc_4_8_3_release)
25761
+++ b/src/libgfortran/generated/minloc0_8_i4.c (.../branches/gcc-4_8-branch)
25763
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25764
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25765
retarray->offset = 0;
25766
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25767
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25771
@@ -199,7 +199,7 @@
25772
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25773
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25774
retarray->offset = 0;
25775
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25776
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25780
@@ -367,7 +367,7 @@
25781
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25782
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25783
retarray->offset = 0;
25784
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25785
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25787
else if (unlikely (compile_options.bounds_check))
25789
Index: libgfortran/generated/matmul_c4.c
25790
===================================================================
25791
--- a/src/libgfortran/generated/matmul_c4.c (.../tags/gcc_4_8_3_release)
25792
+++ b/src/libgfortran/generated/matmul_c4.c (.../branches/gcc-4_8-branch)
25793
@@ -124,7 +124,7 @@
25796
retarray->base_addr
25797
- = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) retarray));
25798
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_4));
25799
retarray->offset = 0;
25801
else if (unlikely (compile_options.bounds_check))
25802
Index: libgfortran/generated/reshape_i8.c
25803
===================================================================
25804
--- a/src/libgfortran/generated/reshape_i8.c (.../tags/gcc_4_8_3_release)
25805
+++ b/src/libgfortran/generated/reshape_i8.c (.../branches/gcc-4_8-branch)
25806
@@ -111,11 +111,11 @@
25809
if (unlikely (rs < 1))
25813
- alloc_size = rs * sizeof (GFC_INTEGER_8);
25816
- ret->base_addr = xmalloc (alloc_size);
25817
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25818
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
25821
Index: libgfortran/generated/in_pack_c8.c
25822
===================================================================
25823
--- a/src/libgfortran/generated/in_pack_c8.c (.../tags/gcc_4_8_3_release)
25824
+++ b/src/libgfortran/generated/in_pack_c8.c (.../branches/gcc-4_8-branch)
25826
return source->base_addr;
25828
/* Allocate storage for the destination. */
25829
- destptr = (GFC_COMPLEX_8 *)xmalloc (ssize * sizeof (GFC_COMPLEX_8));
25830
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_8));
25832
src = source->base_addr;
25833
stride0 = stride[0];
25834
Index: libgfortran/generated/bessel_r10.c
25835
===================================================================
25836
--- a/src/libgfortran/generated/bessel_r10.c (.../tags/gcc_4_8_3_release)
25837
+++ b/src/libgfortran/generated/bessel_r10.c (.../branches/gcc-4_8-branch)
25840
size_t size = n2 < n1 ? 0 : n2-n1+1;
25841
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
25842
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
25843
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
25847
@@ -122,7 +122,7 @@
25849
size_t size = n2 < n1 ? 0 : n2-n1+1;
25850
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
25851
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
25852
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
25856
@@ -162,7 +162,7 @@
25858
x2rev = GFC_REAL_10_LITERAL(2.)/x;
25860
- for (i = 2; i <= n1+n2; i++)
25861
+ for (i = 2; i <= n2 - n1; i++)
25863
#if defined(GFC_REAL_10_INFINITY)
25864
if (unlikely (last2 == -GFC_REAL_10_INFINITY))
25865
Index: libgfortran/generated/iall_i16.c
25866
===================================================================
25867
--- a/src/libgfortran/generated/iall_i16.c (.../tags/gcc_4_8_3_release)
25868
+++ b/src/libgfortran/generated/iall_i16.c (.../branches/gcc-4_8-branch)
25870
retarray->offset = 0;
25871
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25873
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25874
- * extent[rank-1];
25875
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25877
- retarray->base_addr = xmalloc (alloc_size);
25878
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25879
if (alloc_size == 0)
25881
/* Make sure we have a zero-sized array. */
25882
@@ -272,8 +271,7 @@
25886
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25887
- * extent[rank-1];
25888
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25890
retarray->offset = 0;
25891
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25892
@@ -285,7 +283,7 @@
25896
- retarray->base_addr = xmalloc (alloc_size);
25897
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25901
@@ -430,8 +428,7 @@
25902
retarray->offset = 0;
25903
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25905
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25906
- * extent[rank-1];
25907
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25909
if (alloc_size == 0)
25911
@@ -440,7 +437,7 @@
25915
- retarray->base_addr = xmalloc (alloc_size);
25916
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25920
Index: libgfortran/generated/maxloc1_16_i1.c
25921
===================================================================
25922
--- a/src/libgfortran/generated/maxloc1_16_i1.c (.../tags/gcc_4_8_3_release)
25923
+++ b/src/libgfortran/generated/maxloc1_16_i1.c (.../branches/gcc-4_8-branch)
25925
retarray->offset = 0;
25926
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25928
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25929
- * extent[rank-1];
25930
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25932
- retarray->base_addr = xmalloc (alloc_size);
25933
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25934
if (alloc_size == 0)
25936
/* Make sure we have a zero-sized array. */
25937
@@ -294,8 +293,7 @@
25941
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25942
- * extent[rank-1];
25943
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25945
retarray->offset = 0;
25946
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25947
@@ -307,7 +305,7 @@
25951
- retarray->base_addr = xmalloc (alloc_size);
25952
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25956
@@ -485,8 +483,7 @@
25957
retarray->offset = 0;
25958
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25960
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25961
- * extent[rank-1];
25962
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25964
if (alloc_size == 0)
25966
@@ -495,7 +492,7 @@
25970
- retarray->base_addr = xmalloc (alloc_size);
25971
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25975
Index: libgfortran/generated/reshape_i16.c
25976
===================================================================
25977
--- a/src/libgfortran/generated/reshape_i16.c (.../tags/gcc_4_8_3_release)
25978
+++ b/src/libgfortran/generated/reshape_i16.c (.../branches/gcc-4_8-branch)
25979
@@ -111,11 +111,11 @@
25982
if (unlikely (rs < 1))
25986
- alloc_size = rs * sizeof (GFC_INTEGER_16);
25989
- ret->base_addr = xmalloc (alloc_size);
25990
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25991
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
25994
Index: libgfortran/generated/count_16_l.c
25995
===================================================================
25996
--- a/src/libgfortran/generated/count_16_l.c (.../tags/gcc_4_8_3_release)
25997
+++ b/src/libgfortran/generated/count_16_l.c (.../branches/gcc-4_8-branch)
25998
@@ -101,8 +101,7 @@
25999
retarray->offset = 0;
26000
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26002
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26003
- * extent[rank-1];
26004
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26006
if (alloc_size == 0)
26008
@@ -111,7 +110,7 @@
26012
- retarray->base_addr = xmalloc (alloc_size);
26013
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26017
Index: libgfortran/generated/minloc1_8_i1.c
26018
===================================================================
26019
--- a/src/libgfortran/generated/minloc1_8_i1.c (.../tags/gcc_4_8_3_release)
26020
+++ b/src/libgfortran/generated/minloc1_8_i1.c (.../branches/gcc-4_8-branch)
26022
retarray->offset = 0;
26023
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26025
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26026
- * extent[rank-1];
26027
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26029
- retarray->base_addr = xmalloc (alloc_size);
26030
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26031
if (alloc_size == 0)
26033
/* Make sure we have a zero-sized array. */
26034
@@ -294,8 +293,7 @@
26038
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26039
- * extent[rank-1];
26040
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26042
retarray->offset = 0;
26043
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26044
@@ -307,7 +305,7 @@
26048
- retarray->base_addr = xmalloc (alloc_size);
26049
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26053
@@ -485,8 +483,7 @@
26054
retarray->offset = 0;
26055
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26057
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26058
- * extent[rank-1];
26059
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26061
if (alloc_size == 0)
26063
@@ -495,7 +492,7 @@
26067
- retarray->base_addr = xmalloc (alloc_size);
26068
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26072
Index: libgfortran/generated/maxloc1_4_i4.c
26073
===================================================================
26074
--- a/src/libgfortran/generated/maxloc1_4_i4.c (.../tags/gcc_4_8_3_release)
26075
+++ b/src/libgfortran/generated/maxloc1_4_i4.c (.../branches/gcc-4_8-branch)
26077
retarray->offset = 0;
26078
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26080
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26081
- * extent[rank-1];
26082
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26084
- retarray->base_addr = xmalloc (alloc_size);
26085
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
26086
if (alloc_size == 0)
26088
/* Make sure we have a zero-sized array. */
26089
@@ -294,8 +293,7 @@
26093
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26094
- * extent[rank-1];
26095
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26097
retarray->offset = 0;
26098
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26099
@@ -307,7 +305,7 @@
26103
- retarray->base_addr = xmalloc (alloc_size);
26104
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
26108
@@ -485,8 +483,7 @@
26109
retarray->offset = 0;
26110
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26112
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26113
- * extent[rank-1];
26114
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26116
if (alloc_size == 0)
26118
@@ -495,7 +492,7 @@
26122
- retarray->base_addr = xmalloc (alloc_size);
26123
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
26127
Index: libgfortran/generated/maxval_i8.c
26128
===================================================================
26129
--- a/src/libgfortran/generated/maxval_i8.c (.../tags/gcc_4_8_3_release)
26130
+++ b/src/libgfortran/generated/maxval_i8.c (.../branches/gcc-4_8-branch)
26132
retarray->offset = 0;
26133
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26135
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26136
- * extent[rank-1];
26137
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26139
- retarray->base_addr = xmalloc (alloc_size);
26140
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26141
if (alloc_size == 0)
26143
/* Make sure we have a zero-sized array. */
26144
@@ -286,8 +285,7 @@
26148
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26149
- * extent[rank-1];
26150
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26152
retarray->offset = 0;
26153
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26154
@@ -299,7 +297,7 @@
26158
- retarray->base_addr = xmalloc (alloc_size);
26159
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26163
@@ -472,8 +470,7 @@
26164
retarray->offset = 0;
26165
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26167
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26168
- * extent[rank-1];
26169
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26171
if (alloc_size == 0)
26173
@@ -482,7 +479,7 @@
26177
- retarray->base_addr = xmalloc (alloc_size);
26178
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26182
Index: libgfortran/generated/eoshift3_16.c
26183
===================================================================
26184
--- a/src/libgfortran/generated/eoshift3_16.c (.../tags/gcc_4_8_3_release)
26185
+++ b/src/libgfortran/generated/eoshift3_16.c (.../branches/gcc-4_8-branch)
26190
- ret->base_addr = xmalloc (size * arraysize);
26191
+ ret->base_addr = xmallocarray (arraysize, size);
26193
ret->dtype = array->dtype;
26194
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
26195
@@ -107,8 +107,8 @@
26196
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
26199
- /* xmalloc allocates a single byte for zero size. */
26200
- ret->base_addr = xmalloc (size * arraysize);
26201
+ /* xmallocarray allocates a single byte for zero size. */
26202
+ ret->base_addr = xmallocarray (arraysize, size);
26205
else if (unlikely (compile_options.bounds_check))
26206
Index: libgfortran/generated/shape_i8.c
26207
===================================================================
26208
--- a/src/libgfortran/generated/shape_i8.c (.../tags/gcc_4_8_3_release)
26209
+++ b/src/libgfortran/generated/shape_i8.c (.../branches/gcc-4_8-branch)
26212
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
26214
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
26215
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
26218
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
26219
Index: libgfortran/generated/maxloc0_4_i16.c
26220
===================================================================
26221
--- a/src/libgfortran/generated/maxloc0_4_i16.c (.../tags/gcc_4_8_3_release)
26222
+++ b/src/libgfortran/generated/maxloc0_4_i16.c (.../branches/gcc-4_8-branch)
26224
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26225
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26226
retarray->offset = 0;
26227
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
26228
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
26232
@@ -199,7 +199,7 @@
26233
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
26234
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26235
retarray->offset = 0;
26236
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
26237
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
26241
@@ -367,7 +367,7 @@
26242
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26243
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26244
retarray->offset = 0;
26245
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
26246
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
26248
else if (unlikely (compile_options.bounds_check))
26250
Index: libgfortran/generated/maxloc1_4_r10.c
26251
===================================================================
26252
--- a/src/libgfortran/generated/maxloc1_4_r10.c (.../tags/gcc_4_8_3_release)
26253
+++ b/src/libgfortran/generated/maxloc1_4_r10.c (.../branches/gcc-4_8-branch)
26255
retarray->offset = 0;
26256
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26258
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26259
- * extent[rank-1];
26260
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26262
- retarray->base_addr = xmalloc (alloc_size);
26263
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
26264
if (alloc_size == 0)
26266
/* Make sure we have a zero-sized array. */
26267
@@ -294,8 +293,7 @@
26271
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26272
- * extent[rank-1];
26273
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26275
retarray->offset = 0;
26276
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26277
@@ -307,7 +305,7 @@
26281
- retarray->base_addr = xmalloc (alloc_size);
26282
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
26286
@@ -485,8 +483,7 @@
26287
retarray->offset = 0;
26288
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26290
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26291
- * extent[rank-1];
26292
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26294
if (alloc_size == 0)
26296
@@ -495,7 +492,7 @@
26300
- retarray->base_addr = xmalloc (alloc_size);
26301
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
26305
Index: libgfortran/generated/maxloc1_8_i16.c
26306
===================================================================
26307
--- a/src/libgfortran/generated/maxloc1_8_i16.c (.../tags/gcc_4_8_3_release)
26308
+++ b/src/libgfortran/generated/maxloc1_8_i16.c (.../branches/gcc-4_8-branch)
26310
retarray->offset = 0;
26311
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26313
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26314
- * extent[rank-1];
26315
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26317
- retarray->base_addr = xmalloc (alloc_size);
26318
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26319
if (alloc_size == 0)
26321
/* Make sure we have a zero-sized array. */
26322
@@ -294,8 +293,7 @@
26326
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26327
- * extent[rank-1];
26328
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26330
retarray->offset = 0;
26331
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26332
@@ -307,7 +305,7 @@
26336
- retarray->base_addr = xmalloc (alloc_size);
26337
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26341
@@ -485,8 +483,7 @@
26342
retarray->offset = 0;
26343
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26345
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26346
- * extent[rank-1];
26347
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26349
if (alloc_size == 0)
26351
@@ -495,7 +492,7 @@
26355
- retarray->base_addr = xmalloc (alloc_size);
26356
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26360
Index: libgfortran/generated/minloc0_8_r10.c
26361
===================================================================
26362
--- a/src/libgfortran/generated/minloc0_8_r10.c (.../tags/gcc_4_8_3_release)
26363
+++ b/src/libgfortran/generated/minloc0_8_r10.c (.../branches/gcc-4_8-branch)
26365
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26366
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26367
retarray->offset = 0;
26368
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
26369
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
26373
@@ -199,7 +199,7 @@
26374
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
26375
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26376
retarray->offset = 0;
26377
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
26378
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
26382
@@ -367,7 +367,7 @@
26383
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26384
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26385
retarray->offset = 0;
26386
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
26387
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
26389
else if (unlikely (compile_options.bounds_check))
26391
Index: libgfortran/generated/iparity_i2.c
26392
===================================================================
26393
--- a/src/libgfortran/generated/iparity_i2.c (.../tags/gcc_4_8_3_release)
26394
+++ b/src/libgfortran/generated/iparity_i2.c (.../branches/gcc-4_8-branch)
26396
retarray->offset = 0;
26397
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26399
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26400
- * extent[rank-1];
26401
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26403
- retarray->base_addr = xmalloc (alloc_size);
26404
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
26405
if (alloc_size == 0)
26407
/* Make sure we have a zero-sized array. */
26408
@@ -272,8 +271,7 @@
26412
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26413
- * extent[rank-1];
26414
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26416
retarray->offset = 0;
26417
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26418
@@ -285,7 +283,7 @@
26422
- retarray->base_addr = xmalloc (alloc_size);
26423
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
26427
@@ -430,8 +428,7 @@
26428
retarray->offset = 0;
26429
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26431
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26432
- * extent[rank-1];
26433
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26435
if (alloc_size == 0)
26437
@@ -440,7 +437,7 @@
26441
- retarray->base_addr = xmalloc (alloc_size);
26442
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
26446
Index: libgfortran/generated/maxloc1_16_r4.c
26447
===================================================================
26448
--- a/src/libgfortran/generated/maxloc1_16_r4.c (.../tags/gcc_4_8_3_release)
26449
+++ b/src/libgfortran/generated/maxloc1_16_r4.c (.../branches/gcc-4_8-branch)
26451
retarray->offset = 0;
26452
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26454
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26455
- * extent[rank-1];
26456
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26458
- retarray->base_addr = xmalloc (alloc_size);
26459
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26460
if (alloc_size == 0)
26462
/* Make sure we have a zero-sized array. */
26463
@@ -294,8 +293,7 @@
26467
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26468
- * extent[rank-1];
26469
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26471
retarray->offset = 0;
26472
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26473
@@ -307,7 +305,7 @@
26477
- retarray->base_addr = xmalloc (alloc_size);
26478
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26482
@@ -485,8 +483,7 @@
26483
retarray->offset = 0;
26484
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26486
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26487
- * extent[rank-1];
26488
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26490
if (alloc_size == 0)
26492
@@ -495,7 +492,7 @@
26496
- retarray->base_addr = xmalloc (alloc_size);
26497
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26501
Index: libgfortran/generated/maxloc0_16_r8.c
26502
===================================================================
26503
--- a/src/libgfortran/generated/maxloc0_16_r8.c (.../tags/gcc_4_8_3_release)
26504
+++ b/src/libgfortran/generated/maxloc0_16_r8.c (.../branches/gcc-4_8-branch)
26506
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26507
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26508
retarray->offset = 0;
26509
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
26510
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
26514
@@ -199,7 +199,7 @@
26515
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
26516
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26517
retarray->offset = 0;
26518
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
26519
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
26523
@@ -367,7 +367,7 @@
26524
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26525
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26526
retarray->offset = 0;
26527
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
26528
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
26530
else if (unlikely (compile_options.bounds_check))
26532
Index: libgfortran/generated/sum_i16.c
26533
===================================================================
26534
--- a/src/libgfortran/generated/sum_i16.c (.../tags/gcc_4_8_3_release)
26535
+++ b/src/libgfortran/generated/sum_i16.c (.../branches/gcc-4_8-branch)
26537
retarray->offset = 0;
26538
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26540
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26541
- * extent[rank-1];
26542
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26544
- retarray->base_addr = xmalloc (alloc_size);
26545
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26546
if (alloc_size == 0)
26548
/* Make sure we have a zero-sized array. */
26549
@@ -272,8 +271,7 @@
26553
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26554
- * extent[rank-1];
26555
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26557
retarray->offset = 0;
26558
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26559
@@ -285,7 +283,7 @@
26563
- retarray->base_addr = xmalloc (alloc_size);
26564
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26568
@@ -430,8 +428,7 @@
26569
retarray->offset = 0;
26570
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26572
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26573
- * extent[rank-1];
26574
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26576
if (alloc_size == 0)
26578
@@ -440,7 +437,7 @@
26582
- retarray->base_addr = xmalloc (alloc_size);
26583
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26587
Index: libgfortran/generated/maxloc0_4_i8.c
26588
===================================================================
26589
--- a/src/libgfortran/generated/maxloc0_4_i8.c (.../tags/gcc_4_8_3_release)
26590
+++ b/src/libgfortran/generated/maxloc0_4_i8.c (.../branches/gcc-4_8-branch)
26592
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26593
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26594
retarray->offset = 0;
26595
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
26596
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
26600
@@ -199,7 +199,7 @@
26601
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
26602
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26603
retarray->offset = 0;
26604
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
26605
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
26609
@@ -367,7 +367,7 @@
26610
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
26611
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
26612
retarray->offset = 0;
26613
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
26614
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
26616
else if (unlikely (compile_options.bounds_check))
26618
Index: libgfortran/generated/pack_c16.c
26619
===================================================================
26620
--- a/src/libgfortran/generated/pack_c16.c (.../tags/gcc_4_8_3_release)
26621
+++ b/src/libgfortran/generated/pack_c16.c (.../branches/gcc-4_8-branch)
26622
@@ -167,8 +167,8 @@
26626
- /* xmalloc allocates a single byte for zero size. */
26627
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * total);
26628
+ /* xmallocarray allocates a single byte for zero size. */
26629
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_16));
26633
Index: libgfortran/generated/maxloc1_16_i16.c
26634
===================================================================
26635
--- a/src/libgfortran/generated/maxloc1_16_i16.c (.../tags/gcc_4_8_3_release)
26636
+++ b/src/libgfortran/generated/maxloc1_16_i16.c (.../branches/gcc-4_8-branch)
26638
retarray->offset = 0;
26639
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26641
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26642
- * extent[rank-1];
26643
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26645
- retarray->base_addr = xmalloc (alloc_size);
26646
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26647
if (alloc_size == 0)
26649
/* Make sure we have a zero-sized array. */
26650
@@ -294,8 +293,7 @@
26654
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26655
- * extent[rank-1];
26656
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26658
retarray->offset = 0;
26659
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26660
@@ -307,7 +305,7 @@
26664
- retarray->base_addr = xmalloc (alloc_size);
26665
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26669
@@ -485,8 +483,7 @@
26670
retarray->offset = 0;
26671
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26673
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26674
- * extent[rank-1];
26675
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26677
if (alloc_size == 0)
26679
@@ -495,7 +492,7 @@
26683
- retarray->base_addr = xmalloc (alloc_size);
26684
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26688
Index: libgfortran/generated/minloc1_8_r4.c
26689
===================================================================
26690
--- a/src/libgfortran/generated/minloc1_8_r4.c (.../tags/gcc_4_8_3_release)
26691
+++ b/src/libgfortran/generated/minloc1_8_r4.c (.../branches/gcc-4_8-branch)
26693
retarray->offset = 0;
26694
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26696
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26697
- * extent[rank-1];
26698
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26700
- retarray->base_addr = xmalloc (alloc_size);
26701
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26702
if (alloc_size == 0)
26704
/* Make sure we have a zero-sized array. */
26705
@@ -294,8 +293,7 @@
26709
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26710
- * extent[rank-1];
26711
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26713
retarray->offset = 0;
26714
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26715
@@ -307,7 +305,7 @@
26719
- retarray->base_addr = xmalloc (alloc_size);
26720
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26724
@@ -485,8 +483,7 @@
26725
retarray->offset = 0;
26726
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26728
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26729
- * extent[rank-1];
26730
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26732
if (alloc_size == 0)
26734
@@ -495,7 +492,7 @@
26738
- retarray->base_addr = xmalloc (alloc_size);
26739
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
26743
Index: libgfortran/generated/sum_c8.c
26744
===================================================================
26745
--- a/src/libgfortran/generated/sum_c8.c (.../tags/gcc_4_8_3_release)
26746
+++ b/src/libgfortran/generated/sum_c8.c (.../branches/gcc-4_8-branch)
26748
retarray->offset = 0;
26749
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26751
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26752
- * extent[rank-1];
26753
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26755
- retarray->base_addr = xmalloc (alloc_size);
26756
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
26757
if (alloc_size == 0)
26759
/* Make sure we have a zero-sized array. */
26760
@@ -272,8 +271,7 @@
26764
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26765
- * extent[rank-1];
26766
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26768
retarray->offset = 0;
26769
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26770
@@ -285,7 +283,7 @@
26774
- retarray->base_addr = xmalloc (alloc_size);
26775
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
26779
@@ -430,8 +428,7 @@
26780
retarray->offset = 0;
26781
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26783
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26784
- * extent[rank-1];
26785
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26787
if (alloc_size == 0)
26789
@@ -440,7 +437,7 @@
26793
- retarray->base_addr = xmalloc (alloc_size);
26794
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
26798
Index: libgfortran/generated/maxloc1_16_i2.c
26799
===================================================================
26800
--- a/src/libgfortran/generated/maxloc1_16_i2.c (.../tags/gcc_4_8_3_release)
26801
+++ b/src/libgfortran/generated/maxloc1_16_i2.c (.../branches/gcc-4_8-branch)
26803
retarray->offset = 0;
26804
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26806
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26807
- * extent[rank-1];
26808
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26810
- retarray->base_addr = xmalloc (alloc_size);
26811
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26812
if (alloc_size == 0)
26814
/* Make sure we have a zero-sized array. */
26815
@@ -294,8 +293,7 @@
26819
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26820
- * extent[rank-1];
26821
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26823
retarray->offset = 0;
26824
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26825
@@ -307,7 +305,7 @@
26829
- retarray->base_addr = xmalloc (alloc_size);
26830
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26834
@@ -485,8 +483,7 @@
26835
retarray->offset = 0;
26836
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26838
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26839
- * extent[rank-1];
26840
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26842
if (alloc_size == 0)
26844
@@ -495,7 +492,7 @@
26848
- retarray->base_addr = xmalloc (alloc_size);
26849
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26853
Index: libgfortran/generated/parity_l1.c
26854
===================================================================
26855
--- a/src/libgfortran/generated/parity_l1.c (.../tags/gcc_4_8_3_release)
26856
+++ b/src/libgfortran/generated/parity_l1.c (.../branches/gcc-4_8-branch)
26858
retarray->offset = 0;
26859
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26861
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26862
- * extent[rank-1];
26863
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26865
- retarray->base_addr = xmalloc (alloc_size);
26866
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
26867
if (alloc_size == 0)
26869
/* Make sure we have a zero-sized array. */
26870
Index: libgfortran/generated/maxval_i16.c
26871
===================================================================
26872
--- a/src/libgfortran/generated/maxval_i16.c (.../tags/gcc_4_8_3_release)
26873
+++ b/src/libgfortran/generated/maxval_i16.c (.../branches/gcc-4_8-branch)
26875
retarray->offset = 0;
26876
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26878
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26879
- * extent[rank-1];
26880
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26882
- retarray->base_addr = xmalloc (alloc_size);
26883
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26884
if (alloc_size == 0)
26886
/* Make sure we have a zero-sized array. */
26887
@@ -286,8 +285,7 @@
26891
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26892
- * extent[rank-1];
26893
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26895
retarray->offset = 0;
26896
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26897
@@ -299,7 +297,7 @@
26901
- retarray->base_addr = xmalloc (alloc_size);
26902
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26906
@@ -472,8 +470,7 @@
26907
retarray->offset = 0;
26908
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26910
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26911
- * extent[rank-1];
26912
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26914
if (alloc_size == 0)
26916
@@ -482,7 +479,7 @@
26920
- retarray->base_addr = xmalloc (alloc_size);
26921
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
26925
Index: libgfortran/generated/spread_c8.c
26926
===================================================================
26927
--- a/src/libgfortran/generated/spread_c8.c (.../tags/gcc_4_8_3_release)
26928
+++ b/src/libgfortran/generated/spread_c8.c (.../branches/gcc-4_8-branch)
26929
@@ -101,8 +101,8 @@
26933
- /* xmalloc allocates a single byte for zero size. */
26934
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_8));
26935
+ /* xmallocarray allocates a single byte for zero size. */
26936
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_8));
26940
@@ -244,7 +244,7 @@
26942
if (ret->base_addr == NULL)
26944
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_8));
26945
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_8));
26947
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
26949
Index: libgfortran/generated/matmul_i16.c
26950
===================================================================
26951
--- a/src/libgfortran/generated/matmul_i16.c (.../tags/gcc_4_8_3_release)
26952
+++ b/src/libgfortran/generated/matmul_i16.c (.../branches/gcc-4_8-branch)
26953
@@ -124,7 +124,7 @@
26956
retarray->base_addr
26957
- = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) retarray));
26958
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_16));
26959
retarray->offset = 0;
26961
else if (unlikely (compile_options.bounds_check))
26962
Index: libgfortran/generated/pack_i8.c
26963
===================================================================
26964
--- a/src/libgfortran/generated/pack_i8.c (.../tags/gcc_4_8_3_release)
26965
+++ b/src/libgfortran/generated/pack_i8.c (.../branches/gcc-4_8-branch)
26966
@@ -167,8 +167,8 @@
26970
- /* xmalloc allocates a single byte for zero size. */
26971
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * total);
26972
+ /* xmallocarray allocates a single byte for zero size. */
26973
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_8));
26977
Index: libgfortran/generated/any_l1.c
26978
===================================================================
26979
--- a/src/libgfortran/generated/any_l1.c (.../tags/gcc_4_8_3_release)
26980
+++ b/src/libgfortran/generated/any_l1.c (.../branches/gcc-4_8-branch)
26981
@@ -101,8 +101,7 @@
26982
retarray->offset = 0;
26983
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26985
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26986
- * extent[rank-1];
26987
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26989
if (alloc_size == 0)
26991
@@ -111,7 +110,7 @@
26995
- retarray->base_addr = xmalloc (alloc_size);
26996
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
27000
Index: libgfortran/generated/minloc1_8_i2.c
27001
===================================================================
27002
--- a/src/libgfortran/generated/minloc1_8_i2.c (.../tags/gcc_4_8_3_release)
27003
+++ b/src/libgfortran/generated/minloc1_8_i2.c (.../branches/gcc-4_8-branch)
27005
retarray->offset = 0;
27006
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27008
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27009
- * extent[rank-1];
27010
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27012
- retarray->base_addr = xmalloc (alloc_size);
27013
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
27014
if (alloc_size == 0)
27016
/* Make sure we have a zero-sized array. */
27017
@@ -294,8 +293,7 @@
27021
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27022
- * extent[rank-1];
27023
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27025
retarray->offset = 0;
27026
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27027
@@ -307,7 +305,7 @@
27031
- retarray->base_addr = xmalloc (alloc_size);
27032
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
27036
@@ -485,8 +483,7 @@
27037
retarray->offset = 0;
27038
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27040
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27041
- * extent[rank-1];
27042
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27044
if (alloc_size == 0)
27046
@@ -495,7 +492,7 @@
27050
- retarray->base_addr = xmalloc (alloc_size);
27051
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
27055
Index: libgfortran/generated/minloc0_8_r8.c
27056
===================================================================
27057
--- a/src/libgfortran/generated/minloc0_8_r8.c (.../tags/gcc_4_8_3_release)
27058
+++ b/src/libgfortran/generated/minloc0_8_r8.c (.../branches/gcc-4_8-branch)
27060
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
27061
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
27062
retarray->offset = 0;
27063
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
27064
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
27068
@@ -199,7 +199,7 @@
27069
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
27070
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
27071
retarray->offset = 0;
27072
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
27073
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
27077
@@ -367,7 +367,7 @@
27078
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
27079
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
27080
retarray->offset = 0;
27081
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
27082
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
27084
else if (unlikely (compile_options.bounds_check))
27086
Index: libgfortran/generated/matmul_l8.c
27087
===================================================================
27088
--- a/src/libgfortran/generated/matmul_l8.c (.../tags/gcc_4_8_3_release)
27089
+++ b/src/libgfortran/generated/matmul_l8.c (.../branches/gcc-4_8-branch)
27093
retarray->base_addr
27094
- = xmalloc (sizeof (GFC_LOGICAL_8) * size0 ((array_t *) retarray));
27095
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_8));
27096
retarray->offset = 0;
27098
else if (unlikely (compile_options.bounds_check))
27099
Index: libgfortran/generated/product_r10.c
27100
===================================================================
27101
--- a/src/libgfortran/generated/product_r10.c (.../tags/gcc_4_8_3_release)
27102
+++ b/src/libgfortran/generated/product_r10.c (.../branches/gcc-4_8-branch)
27104
retarray->offset = 0;
27105
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27107
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27108
- * extent[rank-1];
27109
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27111
- retarray->base_addr = xmalloc (alloc_size);
27112
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
27113
if (alloc_size == 0)
27115
/* Make sure we have a zero-sized array. */
27116
@@ -272,8 +271,7 @@
27120
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27121
- * extent[rank-1];
27122
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27124
retarray->offset = 0;
27125
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27126
@@ -285,7 +283,7 @@
27130
- retarray->base_addr = xmalloc (alloc_size);
27131
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
27135
@@ -430,8 +428,7 @@
27136
retarray->offset = 0;
27137
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27139
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27140
- * extent[rank-1];
27141
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27143
if (alloc_size == 0)
27145
@@ -440,7 +437,7 @@
27149
- retarray->base_addr = xmalloc (alloc_size);
27150
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
27154
Index: libgfortran/generated/product_i1.c
27155
===================================================================
27156
--- a/src/libgfortran/generated/product_i1.c (.../tags/gcc_4_8_3_release)
27157
+++ b/src/libgfortran/generated/product_i1.c (.../branches/gcc-4_8-branch)
27159
retarray->offset = 0;
27160
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27162
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27163
- * extent[rank-1];
27164
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27166
- retarray->base_addr = xmalloc (alloc_size);
27167
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
27168
if (alloc_size == 0)
27170
/* Make sure we have a zero-sized array. */
27171
@@ -272,8 +271,7 @@
27175
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27176
- * extent[rank-1];
27177
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27179
retarray->offset = 0;
27180
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27181
@@ -285,7 +283,7 @@
27185
- retarray->base_addr = xmalloc (alloc_size);
27186
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
27190
@@ -430,8 +428,7 @@
27191
retarray->offset = 0;
27192
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27194
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27195
- * extent[rank-1];
27196
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27198
if (alloc_size == 0)
27200
@@ -440,7 +437,7 @@
27204
- retarray->base_addr = xmalloc (alloc_size);
27205
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
27209
Index: libgfortran/generated/all_l8.c
27210
===================================================================
27211
--- a/src/libgfortran/generated/all_l8.c (.../tags/gcc_4_8_3_release)
27212
+++ b/src/libgfortran/generated/all_l8.c (.../branches/gcc-4_8-branch)
27213
@@ -101,8 +101,7 @@
27214
retarray->offset = 0;
27215
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
27217
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
27218
- * extent[rank-1];
27219
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
27221
if (alloc_size == 0)
27223
@@ -111,7 +110,7 @@
27227
- retarray->base_addr = xmalloc (alloc_size);
27228
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
27232
Index: libgfortran/generated/in_pack_r16.c
27233
===================================================================
27234
--- a/src/libgfortran/generated/in_pack_r16.c (.../tags/gcc_4_8_3_release)
27235
+++ b/src/libgfortran/generated/in_pack_r16.c (.../branches/gcc-4_8-branch)
27237
return source->base_addr;
27239
/* Allocate storage for the destination. */
27240
- destptr = (GFC_REAL_16 *)xmalloc (ssize * sizeof (GFC_REAL_16));
27241
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_16));
27243
src = source->base_addr;
27244
stride0 = stride[0];
27245
Index: libgfortran/generated/in_pack_i1.c
27246
===================================================================
27247
--- a/src/libgfortran/generated/in_pack_i1.c (.../tags/gcc_4_8_3_release)
27248
+++ b/src/libgfortran/generated/in_pack_i1.c (.../branches/gcc-4_8-branch)
27250
return source->base_addr;
27252
/* Allocate storage for the destination. */
27253
- destptr = (GFC_INTEGER_1 *)xmalloc (ssize * sizeof (GFC_INTEGER_1));
27254
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_1));
27256
src = source->base_addr;
27257
stride0 = stride[0];
27258
Index: libgfortran/libgfortran.h
27259
===================================================================
27260
--- a/src/libgfortran/libgfortran.h (.../tags/gcc_4_8_3_release)
27261
+++ b/src/libgfortran/libgfortran.h (.../branches/gcc-4_8-branch)
27262
@@ -751,6 +751,9 @@
27263
extern void *xmalloc (size_t) __attribute__ ((malloc));
27264
internal_proto(xmalloc);
27266
+extern void *xmallocarray (size_t, size_t) __attribute__ ((malloc));
27267
+internal_proto(xmallocarray);
27269
extern void *xcalloc (size_t, size_t) __attribute__ ((malloc));
27270
internal_proto(xcalloc);
27272
Index: libgfortran/config.h.in
27273
===================================================================
27274
--- a/src/libgfortran/config.h.in (.../tags/gcc_4_8_3_release)
27275
+++ b/src/libgfortran/config.h.in (.../branches/gcc-4_8-branch)
27276
@@ -711,6 +711,9 @@
27277
/* Define to 1 if you have the `strtof' function. */
27280
+/* Define to 1 if you have the `strtok_r' function. */
27281
+#undef HAVE_STRTOK_R
27283
/* Define to 1 if you have the `strtold' function. */
27284
#undef HAVE_STRTOLD
27286
Index: libgfortran/io/list_read.c
27287
===================================================================
27288
--- a/src/libgfortran/io/list_read.c (.../tags/gcc_4_8_3_release)
27289
+++ b/src/libgfortran/io/list_read.c (.../branches/gcc-4_8-branch)
27290
@@ -2354,7 +2354,7 @@
27292
index_type len = strlen (nl->var_name) + 1;
27294
- char * ext_name = (char*)xmalloc (len + 1);
27295
+ char * ext_name = xmalloc (len + 1);
27296
memcpy (ext_name, nl->var_name, len-1);
27297
memcpy (ext_name + len - 1, "%", 2);
27298
for (nl = nl->next; nl; nl = nl->next)
27299
Index: libgfortran/io/unit.c
27300
===================================================================
27301
--- a/src/libgfortran/io/unit.c (.../tags/gcc_4_8_3_release)
27302
+++ b/src/libgfortran/io/unit.c (.../branches/gcc-4_8-branch)
27303
@@ -455,7 +455,7 @@
27305
iunit->rank = GFC_DESCRIPTOR_RANK (dtp->internal_unit_desc);
27306
iunit->ls = (array_loop_spec *)
27307
- xmalloc (iunit->rank * sizeof (array_loop_spec));
27308
+ xmallocarray (iunit->rank, sizeof (array_loop_spec));
27309
dtp->internal_unit_len *=
27310
init_loop_spec (dtp->internal_unit_desc, iunit->ls, &start_record);
27312
Index: libgfortran/io/unix.c
27313
===================================================================
27314
--- a/src/libgfortran/io/unix.c (.../tags/gcc_4_8_3_release)
27315
+++ b/src/libgfortran/io/unix.c (.../branches/gcc-4_8-branch)
27316
@@ -407,7 +407,9 @@
27320
- if (s->fd != STDOUT_FILENO
27323
+ else if (s->fd != STDOUT_FILENO
27324
&& s->fd != STDERR_FILENO
27325
&& s->fd != STDIN_FILENO)
27326
retval = close (s->fd);
27327
@@ -983,7 +985,15 @@
27329
/* Get the current length of the file. */
27331
- fstat (fd, &statbuf);
27332
+ if (fstat (fd, &statbuf) == -1)
27334
+ s->st_dev = s->st_ino = -1;
27335
+ s->file_length = 0;
27336
+ if (errno == EBADF)
27339
+ return (stream *) s;
27342
s->st_dev = statbuf.st_dev;
27343
s->st_ino = statbuf.st_ino;
27344
Index: libgfortran/io/transfer.c
27345
===================================================================
27346
--- a/src/libgfortran/io/transfer.c (.../tags/gcc_4_8_3_release)
27347
+++ b/src/libgfortran/io/transfer.c (.../branches/gcc-4_8-branch)
27348
@@ -3776,9 +3776,9 @@
27349
if (nml->var_rank > 0)
27351
nml->dim = (descriptor_dimension*)
27352
- xmalloc (nml->var_rank * sizeof (descriptor_dimension));
27353
+ xmallocarray (nml->var_rank, sizeof (descriptor_dimension));
27354
nml->ls = (array_loop_spec*)
27355
- xmalloc (nml->var_rank * sizeof (array_loop_spec));
27356
+ xmallocarray (nml->var_rank, sizeof (array_loop_spec));
27360
Index: libgfortran/io/write.c
27361
===================================================================
27362
--- a/src/libgfortran/io/write.c (.../tags/gcc_4_8_3_release)
27363
+++ b/src/libgfortran/io/write.c (.../branches/gcc-4_8-branch)
27364
@@ -1863,7 +1863,7 @@
27365
base_var_name_len = base ? strlen (base->var_name) : 0;
27366
ext_name_len = base_name_len + base_var_name_len
27367
+ strlen (obj->var_name) + obj->var_rank * NML_DIGITS + 1;
27368
- ext_name = (char*)xmalloc (ext_name_len);
27369
+ ext_name = xmalloc (ext_name_len);
27371
memcpy (ext_name, base_name, base_name_len);
27372
clen = strlen (obj->var_name + base_var_name_len);
27373
@@ -1892,7 +1892,7 @@
27374
/* Now obj_name. */
27376
obj_name_len = strlen (obj->var_name) + 1;
27377
- obj_name = xmalloc (obj_name_len+1);
27378
+ obj_name = xmalloc (obj_name_len + 1);
27379
memcpy (obj_name, obj->var_name, obj_name_len-1);
27380
memcpy (obj_name + obj_name_len-1, "%", 2);
27382
Index: Makefile.def
27383
===================================================================
27384
--- a/src/Makefile.def (.../tags/gcc_4_8_3_release)
27385
+++ b/src/Makefile.def (.../branches/gcc-4_8-branch)
27386
@@ -292,6 +292,10 @@
27387
// Host modules specific to gcc.
27388
dependencies = { module=configure-gcc; on=configure-intl; };
27389
dependencies = { module=configure-gcc; on=all-gmp; };
27390
+dependencies = { module=configure-gcc; on=all-mpfr; };
27391
+dependencies = { module=configure-gcc; on=all-mpc; };
27392
+dependencies = { module=configure-gcc; on=all-isl; };
27393
+dependencies = { module=configure-gcc; on=all-cloog; };
27394
dependencies = { module=configure-gcc; on=all-lto-plugin; };
27395
dependencies = { module=configure-gcc; on=all-binutils; };
27396
dependencies = { module=configure-gcc; on=all-gas; };
27397
Index: libada/Makefile.in
27398
===================================================================
27399
--- a/src/libada/Makefile.in (.../tags/gcc_4_8_3_release)
27400
+++ b/src/libada/Makefile.in (.../branches/gcc-4_8-branch)
27402
PICFLAG = @PICFLAG@
27403
GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
27404
GNATLIBCFLAGS= -g -O2
27405
-GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \
27406
+GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
27407
-fexceptions -DIN_RTS @have_getipinfo@
27409
host_subdir = @host_subdir@
27410
Index: libada/ChangeLog
27411
===================================================================
27412
--- a/src/libada/ChangeLog (.../tags/gcc_4_8_3_release)
27413
+++ b/src/libada/ChangeLog (.../branches/gcc-4_8-branch)
27415
+2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
27417
+ * Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C.
27419
2014-05-22 Release Manager
27421
* GCC 4.8.3 released.
27422
Index: libffi/src/powerpc/linux64_closure.S
27423
===================================================================
27424
--- a/src/libffi/src/powerpc/linux64_closure.S (.../tags/gcc_4_8_3_release)
27425
+++ b/src/libffi/src/powerpc/linux64_closure.S (.../branches/gcc-4_8-branch)
27426
@@ -381,7 +381,8 @@
27430
-# if defined __ELF__ && defined __linux__
27433
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
27434
.section .note.GNU-stack,"",@progbits
27437
Index: libffi/src/powerpc/linux64.S
27438
===================================================================
27439
--- a/src/libffi/src/powerpc/linux64.S (.../tags/gcc_4_8_3_release)
27440
+++ b/src/libffi/src/powerpc/linux64.S (.../branches/gcc-4_8-branch)
27441
@@ -254,7 +254,8 @@
27445
-# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
27448
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
27449
.section .note.GNU-stack,"",@progbits
27452
Index: libffi/ChangeLog
27453
===================================================================
27454
--- a/src/libffi/ChangeLog (.../tags/gcc_4_8_3_release)
27455
+++ b/src/libffi/ChangeLog (.../branches/gcc-4_8-branch)
27457
+2014-09-11 Jakub Jelinek <jakub@redhat.com>
27459
+ * src/powerpc/linux64.S: Emit .note.GNU-stack even when
27460
+ POWERPC64 is not defined.
27461
+ * src/powerpc/linux64_closure.S: Likewise. Also test _CALL_ELF == 2.
27463
2014-05-22 Release Manager
27465
* GCC 4.8.3 released.
27466
Index: libcpp/line-map.c
27467
===================================================================
27468
--- a/src/libcpp/line-map.c (.../tags/gcc_4_8_3_release)
27469
+++ b/src/libcpp/line-map.c (.../branches/gcc-4_8-branch)
27470
@@ -527,10 +527,10 @@
27471
&& line_delta * ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) > 1000)
27472
|| (max_column_hint >= (1U << ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map)))
27473
|| (max_column_hint <= 80
27474
- && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10))
27478
+ && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10)
27479
+ || (highest > 0x60000000
27480
+ && (set->max_column_hint || highest > 0x70000000)))
27483
max_column_hint = set->max_column_hint;
27485
@@ -541,7 +541,7 @@
27486
/* If the column number is ridiculous or we've allocated a huge
27487
number of source_locations, give up on column numbers. */
27488
max_column_hint = 0;
27489
- if (highest >0x70000000)
27490
+ if (highest > 0x70000000)
27494
Index: libcpp/ChangeLog
27495
===================================================================
27496
--- a/src/libcpp/ChangeLog (.../tags/gcc_4_8_3_release)
27497
+++ b/src/libcpp/ChangeLog (.../branches/gcc-4_8-branch)
27499
+2014-11-28 Jakub Jelinek <jakub@redhat.com>
27501
+ Backported from mainline
27502
+ 2014-11-25 Jakub Jelinek <jakub@redhat.com>
27504
+ PR preprocessor/60436
27505
+ * line-map.c (linemap_line_start): If highest is above 0x60000000
27506
+ and we are still tracking columns or highest is above 0x70000000,
27509
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27511
+ Backport from mainline r215873
27512
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27514
+ * lex.c (search_line_fast): Add new version to be used for Power8
27515
+ and later targets when Altivec is enabled. Restrict the existing
27516
+ Altivec version to big-endian systems so that lvsr is not used on
27517
+ little endian, where it is deprecated. Remove LE-specific code
27518
+ from the now-BE-only version.
27520
2014-05-22 Release Manager
27522
* GCC 4.8.3 released.
27523
Index: libcpp/lex.c
27524
===================================================================
27525
--- a/src/libcpp/lex.c (.../tags/gcc_4_8_3_release)
27526
+++ b/src/libcpp/lex.c (.../branches/gcc-4_8-branch)
27527
@@ -515,9 +515,111 @@
27528
search_line_fast = impl;
27531
-#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__)
27532
+#elif defined(_ARCH_PWR8) && defined(__ALTIVEC__)
27534
-/* A vection of the fast scanner using AltiVec vectorized byte compares. */
27535
+/* A vection of the fast scanner using AltiVec vectorized byte compares
27536
+ and VSX unaligned loads (when VSX is available). This is otherwise
27537
+ the same as the pre-GCC 5 version. */
27539
+static const uchar *
27540
+search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
27542
+ typedef __attribute__((altivec(vector))) unsigned char vc;
27544
+ const vc repl_nl = {
27545
+ '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n',
27546
+ '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n'
27548
+ const vc repl_cr = {
27549
+ '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r',
27550
+ '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r'
27552
+ const vc repl_bs = {
27553
+ '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\',
27554
+ '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\'
27556
+ const vc repl_qm = {
27557
+ '?', '?', '?', '?', '?', '?', '?', '?',
27558
+ '?', '?', '?', '?', '?', '?', '?', '?',
27560
+ const vc zero = { 0 };
27564
+ /* Main loop processing 16 bytes at a time. */
27567
+ vc m_nl, m_cr, m_bs, m_qm;
27569
+ data = *((const vc *)s);
27572
+ m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
27573
+ m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
27574
+ m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
27575
+ m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
27576
+ t = (m_nl | m_cr) | (m_bs | m_qm);
27578
+ /* T now contains 0xff in bytes for which we matched one of the relevant
27579
+ characters. We want to exit the loop if any byte in T is non-zero.
27580
+ Below is the expansion of vec_any_ne(t, zero). */
27582
+ while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
27584
+ /* Restore s to to point to the 16 bytes we just processed. */
27588
+#define N (sizeof(vc) / sizeof(long))
27592
+ /* Statically assert that N is 2 or 4. */
27593
+ unsigned long l[(N == 2 || N == 4) ? N : -1];
27595
+ unsigned long l, i = 0;
27599
+ /* Find the first word of T that is non-zero. */
27606
+ s += sizeof(unsigned long);
27610
+ s += sizeof(unsigned long);
27615
+ s += sizeof(unsigned long);
27619
+ /* L now contains 0xff in bytes for which we matched one of the
27620
+ relevant characters. We can find the byte index by finding
27621
+ its bit index and dividing by 8. */
27622
+#ifdef __BIG_ENDIAN__
27623
+ l = __builtin_clzl(l) >> 3;
27625
+ l = __builtin_ctzl(l) >> 3;
27633
+#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__) && defined (__BIG_ENDIAN__)
27635
+/* A vection of the fast scanner using AltiVec vectorized byte compares.
27636
+ This cannot be used for little endian because vec_lvsl/lvsr are
27637
+ deprecated for little endian and the code won't work properly. */
27638
/* ??? Unfortunately, attribute(target("altivec")) is not yet supported,
27639
so we can't compile this function without -maltivec on the command line
27640
(or implied by some other switch). */
27641
@@ -559,13 +661,8 @@
27642
beginning with all ones and shifting in zeros according to the
27643
mis-alignment. The LVSR instruction pulls the exact shift we
27644
want from the address. */
27645
-#ifdef __BIG_ENDIAN__
27646
mask = __builtin_vec_lvsr(0, s);
27647
mask = __builtin_vec_perm(zero, ones, mask);
27649
- mask = __builtin_vec_lvsl(0, s);
27650
- mask = __builtin_vec_perm(ones, zero, mask);
27654
/* While altivec loads mask addresses, we still need to align S so
27655
@@ -629,11 +726,7 @@
27656
/* L now contains 0xff in bytes for which we matched one of the
27657
relevant characters. We can find the byte index by finding
27658
its bit index and dividing by 8. */
27659
-#ifdef __BIG_ENDIAN__
27660
l = __builtin_clzl(l) >> 3;
27662
- l = __builtin_ctzl(l) >> 3;
27667
Index: fixincludes/ChangeLog
27668
===================================================================
27669
--- a/src/fixincludes/ChangeLog (.../tags/gcc_4_8_3_release)
27670
+++ b/src/fixincludes/ChangeLog (.../branches/gcc-4_8-branch)
27672
+2014-12-13 David Edelsohn <dje.gcc@gmail.com>
27674
+ Backport from mainline:
27675
+ 2013-09-02 David Edelsohn <dje.gcc@gmail.com>
27677
+ * inclhack.def (aix_assert): New fix.
27678
+ * fixincl.x: Regenerate.
27679
+ * tests/base/assert.h [AIX_ASSERT_CHECK]: New check.
27681
2014-05-22 Release Manager
27683
* GCC 4.8.3 released.
27684
Index: fixincludes/tests/base/assert.h
27685
===================================================================
27686
--- a/src/fixincludes/tests/base/assert.h (.../tags/gcc_4_8_3_release)
27687
+++ b/src/fixincludes/tests/base/assert.h (.../branches/gcc-4_8-branch)
27692
+#if defined( AIX_ASSERT_CHECK )
27693
+#ifndef __cplusplus
27694
+#define static_assert _Static_assert
27696
+#endif /* AIX_ASSERT_CHECK */
27699
#if defined( ALPHA___ASSERT_CHECK )
27700
extern void __assert(const char *, const char *, int);
27701
#endif /* ALPHA___ASSERT_CHECK */
27702
Index: fixincludes/fixincl.x
27703
===================================================================
27704
--- a/src/fixincludes/fixincl.x (.../tags/gcc_4_8_3_release)
27705
+++ b/src/fixincludes/fixincl.x (.../branches/gcc-4_8-branch)
27708
* DO NOT EDIT THIS FILE (fixincl.x)
27710
- * It has been AutoGen-ed Thursday May 16, 2013 at 03:34:25 PM MEST
27711
+ * It has been AutoGen-ed December 13, 2014 at 05:31:32 AM by AutoGen 5.12
27712
* From the definitions inclhack.def
27713
* and the template file fixincl
27715
-/* DO NOT SVN-MERGE THIS FILE, EITHER Thu May 16 15:34:25 MEST 2013
27716
+/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Dec 13 05:31:32 PST 2014
27718
* You must regenerate it. Use the ./genfixes script.
27721
* certain ANSI-incompatible system header files which are fixed to work
27722
* correctly with ANSI C and placed in a directory that GNU C will search.
27724
- * This file contains 226 fixup descriptions.
27725
+ * This file contains 227 fixup descriptions.
27727
* See README for more information.
27729
@@ -736,6 +736,45 @@
27731
/* * * * * * * * * * * * * * * * * * * * * * * * * *
27733
+ * Description of Aix_Assert fix
27735
+tSCC zAix_AssertName[] =
27739
+ * File name selection pattern
27741
+tSCC zAix_AssertList[] =
27744
+ * Machine/OS name selection pattern
27746
+tSCC* apzAix_AssertMachs[] = {
27748
+ (const char*)NULL };
27751
+ * content selection pattern - do fix if pattern found
27753
+tSCC zAix_AssertSelect0[] =
27754
+ "#define[ \t]static_assert[ \t]_Static_assert";
27756
+#define AIX_ASSERT_TEST_CT 1
27757
+static tTestDesc aAix_AssertTests[] = {
27758
+ { TT_EGREP, zAix_AssertSelect0, (regex_t*)NULL }, };
27761
+ * Fix Command Arguments for Aix_Assert
27763
+static const char* apzAix_AssertPatch[] = {
27765
+ "#ifndef __cplusplus\n\
27770
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
27772
* Description of Aix_Complex fix
27774
tSCC zAix_ComplexName[] =
27775
@@ -9265,9 +9304,9 @@
27777
* List of all fixes
27779
-#define REGEX_COUNT 264
27780
+#define REGEX_COUNT 265
27781
#define MACH_LIST_SIZE_LIMIT 187
27782
-#define FIX_COUNT 226
27783
+#define FIX_COUNT 227
27786
* Enumerate the fixes
27787
@@ -9285,6 +9324,7 @@
27788
AAB_VXWORKS_REGS_VXTYPES_FIXIDX,
27789
AAB_VXWORKS_STDINT_FIXIDX,
27790
AAB_VXWORKS_UNISTD_FIXIDX,
27791
+ AIX_ASSERT_FIXIDX,
27792
AIX_COMPLEX_FIXIDX,
27794
AIX_NET_IF_ARP_FIXIDX,
27795
@@ -9562,6 +9602,11 @@
27796
AAB_VXWORKS_UNISTD_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
27797
aAab_Vxworks_UnistdTests, apzAab_Vxworks_UnistdPatch, 0 },
27799
+ { zAix_AssertName, zAix_AssertList,
27800
+ apzAix_AssertMachs,
27801
+ AIX_ASSERT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
27802
+ aAix_AssertTests, apzAix_AssertPatch, 0 },
27804
{ zAix_ComplexName, zAix_ComplexList,
27805
apzAix_ComplexMachs,
27806
AIX_COMPLEX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
27807
Index: fixincludes/inclhack.def
27808
===================================================================
27809
--- a/src/fixincludes/inclhack.def (.../tags/gcc_4_8_3_release)
27810
+++ b/src/fixincludes/inclhack.def (.../branches/gcc-4_8-branch)
27811
@@ -574,6 +574,19 @@
27816
+ * assert.h on AIX 7 redefines static_assert as _Static_assert without
27817
+ * protecting C++.
27820
+ hackname = aix_assert;
27821
+ mach = "*-*-aix*";
27822
+ files = assert.h;
27823
+ select = "#define[ \t]static_assert[ \t]_Static_assert";
27825
+ c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
27826
+ test_text = "#define static_assert _Static_assert";
27830
* complex.h on AIX 5 and AIX 6 define _Complex_I and I in terms of __I,
27832
===================================================================
27833
--- a/src/. (.../tags/gcc_4_8_3_release)
27834
+++ b/src/. (.../branches/gcc-4_8-branch)
27836
Property changes on: .
27837
___________________________________________________________________
27838
Modified: svn:mergeinfo
27839
Merged /trunk:r211733,215049