1
# DP: updates from the 4.8 branch upto 20141208 (r218508).
5
cat > ${dir}LAST_UPDATED <<EOF
6
Tue Dec 9 09:08:20 CET 2014
7
Tue Dec 9 08:08:20 UTC 2014 (revision 218508)
11
LANG=C svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_4_8_3_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch \
12
| sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
13
| awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
15
Index: 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-10-26 John David Anglin <danglin@gcc.gnu.org>
2109
+ * config/pa/linux-unwind.h (pa32_read_access_ok): New function.
2110
+ (pa32_fallback_frame_state): Use pa32_read_access_ok to check if
2111
+ memory read accesses are ok.
2113
+2014-09-18 Joseph Myers <joseph@codesourcery.com>
2115
+ * config/i386/sfp-machine.h (FP_TRAPPING_EXCEPTIONS): Treat clear
2116
+ bits not set bits as indicating trapping exceptions.
2118
2014-05-22 Release Manager
2120
* GCC 4.8.3 released.
2121
Index: libgcc/config/i386/sfp-machine.h
2122
===================================================================
2123
--- a/src/libgcc/config/i386/sfp-machine.h (.../tags/gcc_4_8_3_release)
2124
+++ b/src/libgcc/config/i386/sfp-machine.h (.../branches/gcc-4_8-branch)
2126
__sfp_handle_exceptions (_fex); \
2129
-#define FP_TRAPPING_EXCEPTIONS ((_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
2130
+#define FP_TRAPPING_EXCEPTIONS ((~_fcw >> FP_EX_SHIFT) & FP_EX_ALL)
2132
#define FP_ROUNDMODE (_fcw & FP_RND_MASK)
2134
Index: libgcc/config/pa/linux-unwind.h
2135
===================================================================
2136
--- a/src/libgcc/config/pa/linux-unwind.h (.../tags/gcc_4_8_3_release)
2137
+++ b/src/libgcc/config/pa/linux-unwind.h (.../branches/gcc-4_8-branch)
2140
#include <sys/ucontext.h>
2142
+/* Return TRUE if read access to *P is allowed. */
2145
+pa32_read_access_ok (void *p)
2149
+ __asm__ ("proberi (%1),3,%0" : "=r" (ret) : "r" (p) :);
2153
/* Unfortunately, because of various bugs and changes to the kernel,
2154
we have several cases to deal with.
2157
tell us how to locate the sigcontext structure.
2159
Note that with a 2.4 64-bit kernel, the signal context is not properly
2160
- passed back to userspace so the unwind will not work correctly. */
2161
+ passed back to userspace so the unwind will not work correctly.
2163
+ There is also a bug in various glibc versions. The (CONTEXT)->ra
2164
+ for the outermost frame is not marked as undefined, so we need to
2165
+ check whether read access is allowed for all the accesses used in
2166
+ searching for the signal trampoline. */
2168
#define MD_FALLBACK_FRAME_STATE_FOR pa32_fallback_frame_state
2170
static _Unwind_Reason_Code
2172
e4008200 be,l 0x100(%sr2, %r0), %sr0, %r31
2175
- if (pc[0] == 0x34190000 || pc[0] == 0x34190002)
2176
+ if (pa32_read_access_ok (pc)
2177
+ && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
2179
- else if (pc[4] == 0x34190000 || pc[4] == 0x34190002)
2180
+ else if (pa32_read_access_ok (&pc[4])
2181
+ && (pc[4] == 0x34190000 || pc[4] == 0x34190002))
2186
- else if (pc[5] == 0x34190000 || pc[5] == 0x34190002)
2187
+ else if (pa32_read_access_ok (&pc[5])
2188
+ && (pc[5] == 0x34190000 || pc[5] == 0x34190002))
2192
@@ -96,13 +115,16 @@
2193
word boundary and we can then determine the frame offset. */
2194
sp = (unsigned long)context->ra;
2195
pc = (unsigned int *)sp;
2196
- if ((pc[0] == 0x34190000 || pc[0] == 0x34190002) && (sp & 4))
2198
+ && pa32_read_access_ok (pc)
2199
+ && (pc[0] == 0x34190000 || pc[0] == 0x34190002))
2202
return _URC_END_OF_STACK;
2205
- if (pc[1] != 0x3414015a
2206
+ if (!pa32_read_access_ok (&pc[3])
2207
+ || pc[1] != 0x3414015a
2208
|| pc[2] != 0xe4008200
2209
|| pc[3] != 0x08000240)
2210
return _URC_END_OF_STACK;
2211
Index: gcc/tree-ssa-tail-merge.c
2212
===================================================================
2213
--- a/src/gcc/tree-ssa-tail-merge.c (.../tags/gcc_4_8_3_release)
2214
+++ b/src/gcc/tree-ssa-tail-merge.c (.../branches/gcc-4_8-branch)
2216
def_operand_p def_p;
2218
if (gimple_has_side_effects (stmt)
2219
- || gimple_vdef (stmt) != NULL_TREE)
2220
+ || gimple_vdef (stmt) != NULL_TREE
2221
+ || gimple_vuse (stmt) != NULL_TREE)
2224
def_p = SINGLE_SSA_DEF_OPERAND (stmt, SSA_OP_DEF);
2225
@@ -1060,6 +1061,24 @@
2229
+/* Return true if gimple operands T1 and T2 have the same value. */
2232
+gimple_operand_equal_value_p (tree t1, tree t2)
2237
+ if (t1 == NULL_TREE
2238
+ || t2 == NULL_TREE)
2241
+ if (operand_equal_p (t1, t2, 0))
2244
+ return gvn_uses_equal (t1, t2);
2247
/* Return true if gimple statements S1 and S2 are equal. Gimple_bb (s1) and
2248
gimple_bb (s2) are members of SAME_SUCC. */
2250
@@ -1122,11 +1141,13 @@
2251
lhs2 = gimple_get_lhs (s2);
2252
if (TREE_CODE (lhs1) != SSA_NAME
2253
&& TREE_CODE (lhs2) != SSA_NAME)
2254
- return (vn_valueize (gimple_vdef (s1))
2255
- == vn_valueize (gimple_vdef (s2)));
2256
+ return (operand_equal_p (lhs1, lhs2, 0)
2257
+ && gimple_operand_equal_value_p (gimple_assign_rhs1 (s1),
2258
+ gimple_assign_rhs1 (s2)));
2259
else if (TREE_CODE (lhs1) == SSA_NAME
2260
&& TREE_CODE (lhs2) == SSA_NAME)
2261
- return vn_valueize (lhs1) == vn_valueize (lhs2);
2262
+ return operand_equal_p (gimple_assign_rhs1 (s1),
2263
+ gimple_assign_rhs1 (s2), 0);
2267
Index: gcc/DATESTAMP
2268
===================================================================
2269
--- a/src/gcc/DATESTAMP (.../tags/gcc_4_8_3_release)
2270
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_8-branch)
2274
Index: gcc/tree-ssa-strlen.c
2275
===================================================================
2276
--- a/src/gcc/tree-ssa-strlen.c (.../tags/gcc_4_8_3_release)
2277
+++ b/src/gcc/tree-ssa-strlen.c (.../branches/gcc-4_8-branch)
2278
@@ -1777,7 +1777,7 @@
2282
- else if (is_gimple_assign (stmt))
2283
+ else if (is_gimple_assign (stmt) && !gimple_clobber_p (stmt))
2285
tree lhs = gimple_assign_lhs (stmt);
2288
===================================================================
2289
--- a/src/gcc/tree.c (.../tags/gcc_4_8_3_release)
2290
+++ b/src/gcc/tree.c (.../branches/gcc-4_8-branch)
2291
@@ -1130,7 +1130,7 @@
2292
const_tree const t = (const_tree) x;
2294
return (TREE_INT_CST_HIGH (t) ^ TREE_INT_CST_LOW (t)
2295
- ^ htab_hash_pointer (TREE_TYPE (t)));
2296
+ ^ TYPE_UID (TREE_TYPE (t)));
2299
/* Return nonzero if the value represented by *X (an INTEGER_CST tree node)
2301
===================================================================
2302
--- a/src/gcc/ipa-cp.c (.../tags/gcc_4_8_3_release)
2303
+++ b/src/gcc/ipa-cp.c (.../branches/gcc-4_8-branch)
2305
else if (!opt_for_fn (node->symbol.decl, optimize)
2306
|| !opt_for_fn (node->symbol.decl, flag_ipa_cp))
2307
reason = "non-optimized function";
2308
+ else if (node->tm_clone)
2309
+ reason = "transactional memory clone";
2311
if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
2312
fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
2313
@@ -2902,6 +2904,11 @@
2314
intersect_with_agg_replacements (cs->caller, src_idx,
2325
@@ -2917,6 +2924,11 @@
2327
intersect_with_plats (src_plats, &inter, 0);
2336
else if (jfunc->type == IPA_JF_ANCESTOR
2337
@@ -3000,7 +3012,8 @@
2338
vec<cgraph_edge_p> callers)
2340
struct ipa_node_params *dest_info = IPA_NODE_REF (node);
2341
- struct ipa_agg_replacement_value *res = NULL;
2342
+ struct ipa_agg_replacement_value *res;
2343
+ struct ipa_agg_replacement_value **tail = &res;
2344
struct cgraph_edge *cs;
2345
int i, j, count = ipa_get_param_count (dest_info);
2347
@@ -3044,8 +3057,8 @@
2348
v->offset = item->offset;
2349
v->value = item->value;
2350
v->by_ref = plats->aggs_by_ref;
2358
@@ -3052,6 +3065,7 @@
2359
if (inter.exists ())
2366
@@ -3060,7 +3074,8 @@
2367
static struct ipa_agg_replacement_value *
2368
known_aggs_to_agg_replacement_list (vec<ipa_agg_jump_function_t> known_aggs)
2370
- struct ipa_agg_replacement_value *res = NULL;
2371
+ struct ipa_agg_replacement_value *res;
2372
+ struct ipa_agg_replacement_value **tail = &res;
2373
struct ipa_agg_jump_function *aggjf;
2374
struct ipa_agg_jf_item *item;
2376
@@ -3074,9 +3089,10 @@
2377
v->offset = item->offset;
2378
v->value = item->value;
2379
v->by_ref = aggjf->by_ref;
2389
Index: gcc/configure
2390
===================================================================
2391
--- a/src/gcc/configure (.../tags/gcc_4_8_3_release)
2392
+++ b/src/gcc/configure (.../branches/gcc-4_8-branch)
2394
enable_gnu_indirect_function
2395
enable_initfini_array
2397
+enable_fix_cortex_a53_835769
2398
enable_gnu_unique_object
2399
enable_linker_build_id
2400
with_long_double_128
2401
@@ -1619,6 +1620,14 @@
2403
--enable-initfini-array use .init_array/.fini_array sections
2404
--enable-comdat enable COMDAT group support
2406
+ --enable-fix-cortex-a53-835769
2407
+ enable workaround for AArch64 Cortex-A53 erratum
2409
+ --disable-fix-cortex-a53-835769
2410
+ disable workaround for AArch64 Cortex-A53 erratum
2413
--enable-gnu-unique-object
2414
enable the use of the @gnu_unique_object ELF
2415
extension on glibc systems
2416
@@ -17838,7 +17847,7 @@
2417
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2418
lt_status=$lt_dlunknown
2419
cat > conftest.$ac_ext <<_LT_EOF
2420
-#line 17841 "configure"
2421
+#line 17850 "configure"
2422
#include "confdefs.h"
2425
@@ -17944,7 +17953,7 @@
2426
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2427
lt_status=$lt_dlunknown
2428
cat > conftest.$ac_ext <<_LT_EOF
2429
-#line 17947 "configure"
2430
+#line 17956 "configure"
2431
#include "confdefs.h"
2434
@@ -23796,6 +23805,28 @@
2435
$as_echo "$gcc_cv_lto_plugin" >&6; }
2440
+ # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
2441
+ # Check whether --enable-fix-cortex-a53-835769 was given.
2442
+if test "${enable_fix_cortex_a53_835769+set}" = set; then :
2443
+ enableval=$enable_fix_cortex_a53_835769;
2444
+ case $enableval in
2446
+ tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
2451
+ as_fn_error "'$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
2452
+ Valid choices are 'yes' and 'no'." "$LINENO" 5
2460
# All TARGET_ABI_OSF targets.
2461
alpha*-*-linux* | alpha*-*-*bsd*)
2462
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for explicit relocation support" >&5
2463
@@ -27281,8 +27312,48 @@
2465
$as_echo "#define HAVE_cloog 1" >>confdefs.h
2468
+ # Check whether isl_schedule_constraints_compute_schedule is available;
2469
+ # it's new in ISL-0.13.
2470
+ saved_CFLAGS="$CFLAGS"
2471
+ CFLAGS="$CFLAGS $ISLINC"
2472
+ saved_LIBS="$LIBS"
2473
+ LIBS="$LIBS $CLOOGLIBS $ISLLIBS $GMPLIBS"
2475
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for isl_schedule_constraints_compute_schedule" >&5
2476
+$as_echo_n "checking Checking for isl_schedule_constraints_compute_schedule... " >&6; }
2477
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2478
+/* end confdefs.h. */
2479
+#include <isl/schedule.h>
2483
+isl_schedule_constraints_compute_schedule (NULL);
2488
+if ac_fn_c_try_link "$LINENO"; then :
2489
+ ac_has_isl_schedule_constraints_compute_schedule=yes
2491
+ ac_has_isl_schedule_constraints_compute_schedule=no
2493
+rm -f core conftest.err conftest.$ac_objext \
2494
+ conftest$ac_exeext conftest.$ac_ext
2495
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_schedule_constraints_compute_schedule" >&5
2496
+$as_echo "$ac_has_isl_schedule_constraints_compute_schedule" >&6; }
2498
+ LIBS="$saved_LIBS"
2499
+ CFLAGS="$saved_CFLAGS"
2501
+ if test x"$ac_has_isl_schedule_constraints_compute_schedule" = x"yes"; then
2503
+$as_echo "#define HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE 1" >>confdefs.h
2509
# Check for plugin support
2510
# Check whether --enable-plugin was given.
2511
if test "${enable_plugin+set}" = set; then :
2512
Index: gcc/fold-const.c
2513
===================================================================
2514
--- a/src/gcc/fold-const.c (.../tags/gcc_4_8_3_release)
2515
+++ b/src/gcc/fold-const.c (.../branches/gcc-4_8-branch)
2516
@@ -8929,7 +8929,8 @@
2517
/* If the constant operation overflowed this can be
2518
simplified as a comparison against INT_MAX/INT_MIN. */
2519
if (TREE_CODE (lhs) == INTEGER_CST
2520
- && TREE_OVERFLOW (lhs))
2521
+ && TREE_OVERFLOW (lhs)
2522
+ && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg0)))
2524
int const1_sgn = tree_int_cst_sgn (const1);
2525
enum tree_code code2 = code;
2526
@@ -9213,7 +9214,7 @@
2527
/* Transform comparisons of the form X +- C1 CMP Y +- C2 to
2528
X CMP Y +- C2 +- C1 for signed X, Y. This is valid if
2529
the resulting offset is smaller in absolute value than the
2531
+ original one and has the same sign. */
2532
if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (arg0))
2533
&& (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
2534
&& (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
2535
@@ -9232,19 +9233,20 @@
2538
/* Put the constant on the side where it doesn't overflow and is
2539
- of lower absolute value than before. */
2540
+ of lower absolute value and of same sign than before. */
2541
cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
2542
? MINUS_EXPR : PLUS_EXPR,
2544
if (!TREE_OVERFLOW (cst)
2545
- && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2))
2546
+ && tree_int_cst_compare (const2, cst) == tree_int_cst_sgn (const2)
2547
+ && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const2))
2549
fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
2550
return fold_build2_loc (loc, code, type,
2552
- fold_build2_loc (loc,
2553
- TREE_CODE (arg1), TREE_TYPE (arg1),
2556
+ fold_build2_loc (loc, TREE_CODE (arg1),
2561
cst = int_const_binop (TREE_CODE (arg0) == TREE_CODE (arg1)
2562
@@ -9251,13 +9253,15 @@
2563
? MINUS_EXPR : PLUS_EXPR,
2565
if (!TREE_OVERFLOW (cst)
2566
- && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1))
2567
+ && tree_int_cst_compare (const1, cst) == tree_int_cst_sgn (const1)
2568
+ && tree_int_cst_sgn (cst) == tree_int_cst_sgn (const1))
2570
fold_overflow_warning (warnmsg, WARN_STRICT_OVERFLOW_COMPARISON);
2571
return fold_build2_loc (loc, code, type,
2572
- fold_build2_loc (loc, TREE_CODE (arg0), TREE_TYPE (arg0),
2575
+ fold_build2_loc (loc, TREE_CODE (arg0),
2582
@@ -11218,7 +11222,6 @@
2584
double_int c1, c2, c3, msk;
2585
int width = TYPE_PRECISION (type), w;
2586
- bool try_simplify = true;
2588
c1 = tree_to_double_int (TREE_OPERAND (arg0, 1));
2589
c2 = tree_to_double_int (arg1);
2590
@@ -11255,20 +11258,7 @@
2594
- /* If X is a tree of the form (Y * K1) & K2, this might conflict
2595
- with that optimization from the BIT_AND_EXPR optimizations.
2596
- This could end up in an infinite recursion. */
2597
- if (TREE_CODE (TREE_OPERAND (arg0, 0)) == MULT_EXPR
2598
- && TREE_CODE (TREE_OPERAND (TREE_OPERAND (arg0, 0), 1))
2601
- tree t = TREE_OPERAND (TREE_OPERAND (arg0, 0), 1);
2602
- double_int masked = mask_with_tz (type, c3, tree_to_double_int (t));
2604
- try_simplify = (masked != c1);
2607
- if (try_simplify && c3 != c1)
2609
return fold_build2_loc (loc, BIT_IOR_EXPR, type,
2610
fold_build2_loc (loc, BIT_AND_EXPR, type,
2611
TREE_OPERAND (arg0, 0),
2612
@@ -11658,16 +11648,25 @@
2613
&& TREE_CODE (arg0) == MULT_EXPR
2614
&& TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
2616
+ double_int darg1 = tree_to_double_int (arg1);
2618
- = mask_with_tz (type, tree_to_double_int (arg1),
2619
+ = mask_with_tz (type, darg1,
2620
tree_to_double_int (TREE_OPERAND (arg0, 1)));
2622
if (masked.is_zero ())
2623
return omit_two_operands_loc (loc, type, build_zero_cst (type),
2625
- else if (masked != tree_to_double_int (arg1))
2626
- return fold_build2_loc (loc, code, type, op0,
2627
- double_int_to_tree (type, masked));
2628
+ else if (masked != darg1)
2630
+ /* Avoid the transform if arg1 is a mask of some
2631
+ mode which allows further optimizations. */
2632
+ int pop = darg1.popcount ();
2633
+ if (!(pop >= BITS_PER_UNIT
2634
+ && exact_log2 (pop) != -1
2635
+ && double_int::mask (pop) == darg1))
2636
+ return fold_build2_loc (loc, code, type, op0,
2637
+ double_int_to_tree (type, masked));
2641
/* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
2642
@@ -13083,6 +13082,8 @@
2643
tree arg01 = TREE_OPERAND (arg0, 1);
2644
tree itype = TREE_TYPE (arg00);
2645
if (TREE_INT_CST_HIGH (arg01) == 0
2646
+ && !(TREE_CODE (itype) == COMPLEX_TYPE
2647
+ || TREE_CODE (itype) == VECTOR_TYPE)
2648
&& TREE_INT_CST_LOW (arg01)
2649
== (unsigned HOST_WIDE_INT) (TYPE_PRECISION (itype) - 1))
2651
Index: gcc/omp-low.c
2652
===================================================================
2653
--- a/src/gcc/omp-low.c (.../tags/gcc_4_8_3_release)
2654
+++ b/src/gcc/omp-low.c (.../branches/gcc-4_8-branch)
2656
static int taskreg_nesting_level;
2657
struct omp_region *root_omp_region;
2658
static bitmap task_shared_vars;
2659
+static vec<omp_context *> taskreg_contexts;
2661
static void scan_omp (gimple_seq *, omp_context *);
2662
static tree scan_omp_1_op (tree *, int *, void *);
2663
@@ -1586,7 +1587,6 @@
2664
TREE_STATIC (decl) = 1;
2665
TREE_USED (decl) = 1;
2666
DECL_ARTIFICIAL (decl) = 1;
2667
- DECL_NAMELESS (decl) = 1;
2668
DECL_IGNORED_P (decl) = 0;
2669
TREE_PUBLIC (decl) = 0;
2670
DECL_UNINLINABLE (decl) = 1;
2671
@@ -1656,6 +1656,7 @@
2674
ctx = new_omp_context (stmt, outer_ctx);
2675
+ taskreg_contexts.safe_push (ctx);
2676
if (taskreg_nesting_level > 1)
2677
ctx->is_nested = true;
2678
ctx->field_map = splay_tree_new (splay_tree_compare_pointers, 0, 0);
2679
@@ -1675,11 +1676,6 @@
2681
if (TYPE_FIELDS (ctx->record_type) == NULL)
2682
ctx->record_type = ctx->receiver_decl = NULL;
2685
- layout_type (ctx->record_type);
2686
- fixup_child_record_type (ctx);
2690
/* Scan an OpenMP task directive. */
2691
@@ -1690,7 +1686,6 @@
2694
gimple stmt = gsi_stmt (*gsi);
2695
- location_t loc = gimple_location (stmt);
2697
/* Ignore task directives with empty bodies. */
2699
@@ -1701,6 +1696,7 @@
2702
ctx = new_omp_context (stmt, outer_ctx);
2703
+ taskreg_contexts.safe_push (ctx);
2704
if (taskreg_nesting_level > 1)
2705
ctx->is_nested = true;
2706
ctx->field_map = splay_tree_new (splay_tree_compare_pointers, 0, 0);
2707
@@ -1738,8 +1734,71 @@
2708
t = build_int_cst (long_integer_type_node, 1);
2709
gimple_omp_task_set_arg_align (stmt, t);
2714
+/* If any decls have been made addressable during scan_omp,
2715
+ adjust their fields if needed, and layout record types
2716
+ of parallel/task constructs. */
2719
+finish_taskreg_scan (omp_context *ctx)
2721
+ if (ctx->record_type == NULL_TREE)
2724
+ /* If any task_shared_vars were needed, verify all
2725
+ OMP_CLAUSE_SHARED clauses on GIMPLE_OMP_{PARALLEL,TASK}
2726
+ statements if use_pointer_for_field hasn't changed
2727
+ because of that. If it did, update field types now. */
2728
+ if (task_shared_vars)
2732
+ for (c = gimple_omp_taskreg_clauses (ctx->stmt);
2733
+ c; c = OMP_CLAUSE_CHAIN (c))
2734
+ if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_SHARED)
2736
+ tree decl = OMP_CLAUSE_DECL (c);
2738
+ /* Global variables don't need to be copied,
2739
+ the receiver side will use them directly. */
2740
+ if (is_global_var (maybe_lookup_decl_in_outer_ctx (decl, ctx)))
2742
+ if (!bitmap_bit_p (task_shared_vars, DECL_UID (decl))
2743
+ || !use_pointer_for_field (decl, ctx))
2745
+ tree field = lookup_field (decl, ctx);
2746
+ if (TREE_CODE (TREE_TYPE (field)) == POINTER_TYPE
2747
+ && TREE_TYPE (TREE_TYPE (field)) == TREE_TYPE (decl))
2749
+ TREE_TYPE (field) = build_pointer_type (TREE_TYPE (decl));
2750
+ TREE_THIS_VOLATILE (field) = 0;
2751
+ DECL_USER_ALIGN (field) = 0;
2752
+ DECL_ALIGN (field) = TYPE_ALIGN (TREE_TYPE (field));
2753
+ if (TYPE_ALIGN (ctx->record_type) < DECL_ALIGN (field))
2754
+ TYPE_ALIGN (ctx->record_type) = DECL_ALIGN (field);
2755
+ if (ctx->srecord_type)
2757
+ tree sfield = lookup_sfield (decl, ctx);
2758
+ TREE_TYPE (sfield) = TREE_TYPE (field);
2759
+ TREE_THIS_VOLATILE (sfield) = 0;
2760
+ DECL_USER_ALIGN (sfield) = 0;
2761
+ DECL_ALIGN (sfield) = DECL_ALIGN (field);
2762
+ if (TYPE_ALIGN (ctx->srecord_type) < DECL_ALIGN (sfield))
2763
+ TYPE_ALIGN (ctx->srecord_type) = DECL_ALIGN (sfield);
2768
+ if (gimple_code (ctx->stmt) == GIMPLE_OMP_PARALLEL)
2770
+ layout_type (ctx->record_type);
2771
+ fixup_child_record_type (ctx);
2775
+ location_t loc = gimple_location (ctx->stmt);
2776
tree *p, vla_fields = NULL_TREE, *q = &vla_fields;
2777
/* Move VLA fields to the end. */
2778
p = &TYPE_FIELDS (ctx->record_type);
2779
@@ -1759,12 +1818,12 @@
2780
fixup_child_record_type (ctx);
2781
if (ctx->srecord_type)
2782
layout_type (ctx->srecord_type);
2783
- t = fold_convert_loc (loc, long_integer_type_node,
2784
- TYPE_SIZE_UNIT (ctx->record_type));
2785
- gimple_omp_task_set_arg_size (stmt, t);
2786
+ tree t = fold_convert_loc (loc, long_integer_type_node,
2787
+ TYPE_SIZE_UNIT (ctx->record_type));
2788
+ gimple_omp_task_set_arg_size (ctx->stmt, t);
2789
t = build_int_cst (long_integer_type_node,
2790
TYPE_ALIGN_UNIT (ctx->record_type));
2791
- gimple_omp_task_set_arg_align (stmt, t);
2792
+ gimple_omp_task_set_arg_align (ctx->stmt, t);
2796
@@ -7113,6 +7172,8 @@
2797
execute_lower_omp (void)
2803
/* This pass always runs, to provide PROP_gimple_lomp.
2804
But there is nothing to do unless -fopenmp is given. */
2805
@@ -7125,6 +7186,9 @@
2806
body = gimple_body (current_function_decl);
2807
scan_omp (&body, NULL);
2808
gcc_assert (taskreg_nesting_level == 0);
2809
+ FOR_EACH_VEC_ELT (taskreg_contexts, i, ctx)
2810
+ finish_taskreg_scan (ctx);
2811
+ taskreg_contexts.release ();
2813
if (all_contexts->root)
2816
===================================================================
2817
--- a/src/gcc/toplev.c (.../tags/gcc_4_8_3_release)
2818
+++ b/src/gcc/toplev.c (.../branches/gcc-4_8-branch)
2819
@@ -1036,16 +1036,19 @@
2821
if (warn_stack_usage >= 0)
2823
+ const location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
2825
if (stack_usage_kind == DYNAMIC)
2826
- warning (OPT_Wstack_usage_, "stack usage might be unbounded");
2827
+ warning_at (loc, OPT_Wstack_usage_, "stack usage might be unbounded");
2828
else if (stack_usage > warn_stack_usage)
2830
if (stack_usage_kind == DYNAMIC_BOUNDED)
2831
- warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
2834
+ OPT_Wstack_usage_, "stack usage might be %wd bytes",
2837
- warning (OPT_Wstack_usage_, "stack usage is %wd bytes",
2839
+ warning_at (loc, OPT_Wstack_usage_, "stack usage is %wd bytes",
2844
Index: gcc/tree-ssa-sccvn.c
2845
===================================================================
2846
--- a/src/gcc/tree-ssa-sccvn.c (.../tags/gcc_4_8_3_release)
2847
+++ b/src/gcc/tree-ssa-sccvn.c (.../branches/gcc-4_8-branch)
2848
@@ -3015,33 +3015,12 @@
2849
/* If all value numbered to the same value, the phi node has that
2853
- if (is_gimple_min_invariant (sameval))
2855
- VN_INFO (PHI_RESULT (phi))->has_constants = true;
2856
- VN_INFO (PHI_RESULT (phi))->expr = sameval;
2860
- VN_INFO (PHI_RESULT (phi))->has_constants = false;
2861
- VN_INFO (PHI_RESULT (phi))->expr = sameval;
2863
+ return set_ssa_val_to (PHI_RESULT (phi), sameval);
2865
- if (TREE_CODE (sameval) == SSA_NAME)
2866
- return visit_copy (PHI_RESULT (phi), sameval);
2868
- return set_ssa_val_to (PHI_RESULT (phi), sameval);
2871
/* Otherwise, see if it is equivalent to a phi node in this block. */
2872
result = vn_phi_lookup (phi);
2875
- if (TREE_CODE (result) == SSA_NAME)
2876
- changed = visit_copy (PHI_RESULT (phi), result);
2878
- changed = set_ssa_val_to (PHI_RESULT (phi), result);
2880
+ changed = set_ssa_val_to (PHI_RESULT (phi), result);
2883
vn_phi_insert (phi, PHI_RESULT (phi));
2884
@@ -3142,24 +3121,18 @@
2885
catch those with constants. The goal here is to simultaneously
2886
combine constants between expressions, but avoid infinite
2887
expansion of expressions during simplification. */
2888
- if (TREE_CODE (op0) == SSA_NAME)
2890
- if (VN_INFO (op0)->has_constants
2891
+ op0 = vn_valueize (op0);
2892
+ if (TREE_CODE (op0) == SSA_NAME
2893
+ && (VN_INFO (op0)->has_constants
2894
|| TREE_CODE_CLASS (code) == tcc_comparison
2895
- || code == COMPLEX_EXPR)
2896
- op0 = valueize_expr (vn_get_expr_for (op0));
2898
- op0 = vn_valueize (op0);
2900
+ || code == COMPLEX_EXPR))
2901
+ op0 = valueize_expr (vn_get_expr_for (op0));
2903
- if (TREE_CODE (op1) == SSA_NAME)
2905
- if (VN_INFO (op1)->has_constants
2906
- || code == COMPLEX_EXPR)
2907
- op1 = valueize_expr (vn_get_expr_for (op1));
2909
- op1 = vn_valueize (op1);
2911
+ op1 = vn_valueize (op1);
2912
+ if (TREE_CODE (op1) == SSA_NAME
2913
+ && (VN_INFO (op1)->has_constants
2914
+ || code == COMPLEX_EXPR))
2915
+ op1 = valueize_expr (vn_get_expr_for (op1));
2917
/* Pointer plus constant can be represented as invariant address.
2918
Do so to allow further propatation, see also tree forwprop. */
2919
@@ -3217,27 +3190,31 @@
2923
- if (VN_INFO (op0)->has_constants)
2924
- op0 = valueize_expr (vn_get_expr_for (op0));
2925
- else if (CONVERT_EXPR_CODE_P (code)
2926
- || code == REALPART_EXPR
2927
- || code == IMAGPART_EXPR
2928
- || code == VIEW_CONVERT_EXPR
2929
- || code == BIT_FIELD_REF)
2930
+ op0 = vn_valueize (op0);
2931
+ if (TREE_CODE (op0) == SSA_NAME)
2933
- /* We want to do tree-combining on conversion-like expressions.
2934
- Make sure we feed only SSA_NAMEs or constants to fold though. */
2935
- tree tem = valueize_expr (vn_get_expr_for (op0));
2936
- if (UNARY_CLASS_P (tem)
2937
- || BINARY_CLASS_P (tem)
2938
- || TREE_CODE (tem) == VIEW_CONVERT_EXPR
2939
- || TREE_CODE (tem) == SSA_NAME
2940
- || TREE_CODE (tem) == CONSTRUCTOR
2941
- || is_gimple_min_invariant (tem))
2943
+ if (VN_INFO (op0)->has_constants)
2944
+ op0 = valueize_expr (vn_get_expr_for (op0));
2945
+ else if (CONVERT_EXPR_CODE_P (code)
2946
+ || code == REALPART_EXPR
2947
+ || code == IMAGPART_EXPR
2948
+ || code == VIEW_CONVERT_EXPR
2949
+ || code == BIT_FIELD_REF)
2951
+ /* We want to do tree-combining on conversion-like expressions.
2952
+ Make sure we feed only SSA_NAMEs or constants to fold though. */
2953
+ tree tem = valueize_expr (vn_get_expr_for (op0));
2954
+ if (UNARY_CLASS_P (tem)
2955
+ || BINARY_CLASS_P (tem)
2956
+ || TREE_CODE (tem) == VIEW_CONVERT_EXPR
2957
+ || TREE_CODE (tem) == SSA_NAME
2958
+ || TREE_CODE (tem) == CONSTRUCTOR
2959
+ || is_gimple_min_invariant (tem))
2964
- /* Avoid folding if nothing changed, but remember the expression. */
2965
+ /* Avoid folding if nothing changed. */
2966
if (op0 == orig_op0)
2969
Index: gcc/cgraphunit.c
2970
===================================================================
2971
--- a/src/gcc/cgraphunit.c (.../tags/gcc_4_8_3_release)
2972
+++ b/src/gcc/cgraphunit.c (.../branches/gcc-4_8-branch)
2973
@@ -1097,7 +1097,7 @@
2974
/* We use local aliases for C++ thunks to force the tailcall
2975
to bind locally. This is a hack - to keep it working do
2976
the following (which is not strictly correct). */
2977
- && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
2978
+ && (TREE_CODE (target_node->symbol.decl) != FUNCTION_DECL
2979
|| ! DECL_VIRTUAL_P (target_node->symbol.decl))
2980
&& ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
2982
Index: gcc/ChangeLog
2983
===================================================================
2984
--- a/src/gcc/ChangeLog (.../tags/gcc_4_8_3_release)
2985
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_8-branch)
2987
+2014-12-08 Richard Biener <rguenther@suse.de>
2989
+ Backport from 4.9 branch
2991
+ (ac_has_isl_schedule_constraints_compute_schedule):
2993
+ * graphite-clast-to-gimple.c: For ISL 0.14, include deprecate headers.
2994
+ * graphite-interchange.c: Ditto.
2995
+ * graphite-poly.c: Ditto.
2996
+ * graphite-sese-to-poly.c: Ditto.
2997
+ * graphite-optimize-isl.c (getScheduleForBandList): Ditto.
2998
+ Conditionally use ISL 0.13+ functions.
2999
+ * config.in: Regenerate.
3000
+ * configure: Regenerate.
3002
+2014-12-07 Oleg Endo <olegendo@gcc.gnu.org>
3004
+ Backport from mainline
3005
+ 2014-12-07 Oleg Endo <olegendo@gcc.gnu.org>
3008
+ * config/sh/sh.md (extendqihi2): Allow only for TARGET_SH1.
3010
+2014-12-05 H.J. Lu <hongjiu.lu@intel.com>
3012
+ Backport from mainline
3013
+ 2014-11-28 H.J. Lu <hongjiu.lu@intel.com>
3015
+ PR rtl-optimization/64037
3016
+ * combine.c (setup_incoming_promotions): Pass the argument
3017
+ before any promotions happen to promote_function_mode.
3019
+2014-12-04 Shanyao Chen <chenshanyao@huawei.com>
3021
+ Backport from mainline
3022
+ 2014-11-20 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3025
+ * config/arm/arm.md (*movhi_insn): Use right formatting
3028
+ 2014-11-19 Felix Yang <felix.yang@huawei.com>
3029
+ Shanyao Chen <chenshanyao@huawei.com>
3032
+ * config/arm/arm.md (define_attr "arch"): Add v6t2.
3033
+ (define_attr "arch_enabled"): Add test for the above.
3034
+ (*movhi_insn_arch4): Add new alternative.
3036
+2014-12-04 Jakub Jelinek <jakub@redhat.com>
3039
+ * convert.c (convert_to_real, convert_to_expr, convert_to_complex):
3040
+ Handle COMPOUND_EXPR.
3042
+2014-12-02 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3045
+ * config/rs6000/rs6000.c (rs6000_delegitimize_address): Remove
3046
+ invalid UNSPEC_TOCREL sanity check under ENABLE_CHECKING.
3048
+2014-12-01 Richard Biener <rguenther@suse.de>
3050
+ PR middle-end/64111
3051
+ * tree.c (int_cst_hash_hash): Use TYPE_UID instead of
3052
+ htab_hash_pointer to not break PCH.
3054
+2014-11-28 Jakub Jelinek <jakub@redhat.com>
3056
+ Backported from mainline
3057
+ 2014-11-27 Jakub Jelinek <jakub@redhat.com>
3059
+ PR middle-end/64067
3060
+ * expr.c (expand_expr_addr_expr_1) <case COMPOUND_LITERAL_EXPR>:
3061
+ Handle it by returning address of COMPOUND_LITERAL_EXPR_DECL
3062
+ not only if modifier is EXPAND_INITIALIZER, but whenever
3063
+ COMPOUND_LITERAL_EXPR_DECL is non-NULL and TREE_STATIC.
3065
+ 2014-10-31 Jakub Jelinek <jakub@redhat.com>
3067
+ PR rtl-optimization/63659
3068
+ * ree.c (update_reg_equal_equiv_notes): New function.
3069
+ (combine_set_extension, transform_ifelse): Use it.
3071
+ 2014-10-03 Jakub Jelinek <jakub@redhat.com>
3074
+ * omp-low.c (taskreg_contexts): New variable.
3075
+ (scan_omp_parallel): Push newly created context into taskreg_contexts
3076
+ vector and move record layout code to finish_taskreg_scan.
3077
+ (scan_omp_task): Likewise.
3078
+ (finish_taskreg_scan): New function.
3079
+ (execute_lower_omp): Call finish_taskreg_scan on all taskreg_contexts
3080
+ vector elements and release it.
3082
+2014-11-26 Richard Biener <rguenther@suse.de>
3084
+ Backport from mainline
3085
+ 2014-10-08 Richard Biener <rguenther@suse.de>
3087
+ PR tree-optimization/61969
3088
+ * tree-nrv.c (pass_nrv::execute): Properly test for automatic
3091
+ 2014-08-15 Richard Biener <rguenther@suse.de>
3093
+ PR tree-optimization/62031
3094
+ * tree-data-ref.c (dr_analyze_indices): Do not set
3095
+ DR_UNCONSTRAINED_BASE.
3096
+ (dr_may_alias_p): All indirect accesses have to go the
3097
+ formerly DR_UNCONSTRAINED_BASE path.
3098
+ * tree-data-ref.h (struct indices): Remove
3099
+ unconstrained_base member.
3100
+ (DR_UNCONSTRAINED_BASE): Remove.
3102
+ 2014-10-10 Richard Biener <rguenther@suse.de>
3104
+ PR tree-optimization/63379
3105
+ * tree-vect-slp.c (vect_get_constant_vectors): Do not compute
3106
+ a neutral operand for min/max when it is not a reduction chain.
3108
+ 2014-11-07 Richard Biener <rguenther@suse.de>
3110
+ PR tree-optimization/63605
3111
+ * fold-const.c (fold_binary_loc): Properly use element_precision
3112
+ for types that may not be scalar.
3114
+ 2014-10-28 Richard Biener <rguenther@suse.de>
3116
+ PR middle-end/63665
3117
+ * fold-const.c (fold_comparison): Properly guard simplifying
3118
+ against INT_MAX/INT_MIN with !TYPE_OVERFLOW_WRAPS.
3120
+2014-11-22 Oleg Endo <olegendo@gcc.gnu.org>
3122
+ Backport from mainline
3123
+ 2014-11-20 Segher Boessenkool <segher@kernel.crashing.org>
3126
+ * config/sh/sh.c: Use signed char for signed field.
3128
+2014-11-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3131
+ * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Allow
3132
+ the base pointer of vec_vsx_ld and vec_vsx_st to take a pointer to
3135
+2014-11-19 Uros Bizjak <ubizjak@gmail.com>
3138
+ * config/i386/i386.c (put_condition_code) <case LTU, case GEU>:
3139
+ Output "b" and "nb" suffix for FP mode.
3141
+2014-11-19 Tom de Vries <tom@codesourcery.com>
3143
+ Backport from mainline
3144
+ PR tree-optimization/62167
3145
+ * tree-ssa-tail-merge.c (stmt_local_def): Handle statements with vuse
3147
+ (gimple_equal_p): Don't use vn_valueize to compare for lhs equality of
3150
+2014-11-18 Teresa Johnson <tejohnson@google.com>
3152
+ Backport from mainline and gcc-4_9 branch.
3153
+ 2014-11-13 Teresa Johnson <tejohnson@google.com>
3155
+ PR tree-optimization/63841
3156
+ * tree-ssa-strlen.c (strlen_optimize_stmt): Ignore clobbers.
3158
+2014-11-16 Eric Botcazou <ebotcazou@adacore.com>
3160
+ * doc/tm.texi.in (TARGET_FLAGS_REGNUM): Move around.
3161
+ * doc/tm.texi: Regenerate.
3163
+ Backport from mainline
3164
+ 2013-09-16 Andreas Schwab <schwab@linux-m68k.org>
3166
+ * doc/tm.texi.in (Cond Exec Macros): Remove node.
3167
+ (Condition Code): Don't reference it.
3168
+ * doc/tm.texi: Regenerate.
3170
+2014-11-13 Christophe Lyon <christophe.lyon@linaro.org>
3172
+ Backport from mainline
3173
+ 2014-11-02 Michael Collison <michael.collison@linaro.org>
3175
+ * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update
3176
+ to support vector modes.
3177
+ (CTZ_DEFINED_VALUE_AT_ZERO): Ditto.
3179
+2014-11-13 Eric Botcazou <ebotcazou@adacore.com>
3181
+ * doc/tm.texi.in (SELECT_CC_MODE): Update example.
3182
+ (REVERSIBLE_CC_MODE): Fix example.
3183
+ (REVERSE_CONDITION): Fix typo.
3184
+ * doc/tm.texi: Regenerate.
3186
+2014-11-12 Jakub Jelinek <jakub@redhat.com>
3189
+ * ipa-pure-const.c (propagate_nothrow): Walk w->indirect_calls
3190
+ chain instead of node->indirect_calls.
3192
+2014-11-10 Daniel Hellstrom <daniel@gaisler.com>
3194
+ Backport from mainline
3195
+ * config.gcc (sparc-*-rtems*): Clean away unused t-elf.
3196
+ * config/sparc/t-rtems: Add leon3v7 and muser-mode multilibs.
3198
+2014-11-07 Daniel Hellstrom <daniel@gaisler.com>
3200
+ * config.gcc (sparc*-*-*): Accept mcpu=leon3v7 processor.
3201
+ * doc/invoke.texi (SPARC options): Add mcpu=leon3v7 comment.
3202
+ * config/sparc/leon.md (leon3_load, leon_store, leon_fp_*): Handle
3204
+ * config/sparc/sparc-opts.h (enum processor_type): Add LEON3V7.
3205
+ * config/sparc/sparc.c (sparc_option_override): Add leon3v7 support.
3206
+ * config/sparc/sparc.h (TARGET_CPU_leon3v7): New define.
3207
+ * config/sparc/sparc.md (cpu): Add leon3v7.
3208
+ * config/sparc/sparc.opt (enum processor_type): Add leon3v7.
3210
+2014-11-06 John David Anglin <danglin@gcc.gnu.org>
3212
+ * config/pa/pa.md (trap): New insn. Add "trap" to attribute type.
3213
+ Don't allow trap insn in in_branch_delay, in_nullified_branch_delay
3216
+2014-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3218
+ * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define.
3219
+ (LINK_SPEC): Include CA53_ERR_835769_SPEC.
3220
+ * config/aarch64/aarch64-linux.h
3221
+ (CA53_ERR_835769_SPEC): Define.
3222
+ (LINK_SPEC): Include CA53_ERR_835769_SPEC.
3224
+2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3226
+ * config/aarch64/aarch64.c (aarch64_madd_needs_nop): Restore
3227
+ recog state after aarch64_prev_real_insn call.
3229
+2014-10-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3231
+ * config.gcc (aarch64*-*-*): Define TARGET_FIX_ERR_A53_835769_DEFAULT
3233
+ * configure.ac: Add --enable-fix-cortex-a53-835769 option.
3234
+ * configure: Regenerate.
3235
+ * config/aarch64/aarch64.c (aarch64_override_options): Handle
3236
+ TARGET_FIX_ERR_A53_835769_DEFAULT.
3237
+ * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init value
3239
+ * doc/install.texi: Document --enable-fix-cortex-a53-835769 option.
3241
+2014-10-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3243
+ * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): New option.
3244
+ * config/aarch64/aarch64.h (ADJUST_INSN_LENGTH): Define.
3245
+ (FINAL_PRESCAN_INSN): Likewise.
3246
+ * config/aarch64/aarch64.h (is_mem_p): New function.
3247
+ (has_memory_op): Likewise.
3248
+ (aarch64_prev_real_insn): Likewise.
3249
+ (is_madd_op): Likewise.
3250
+ (dep_between_memop_and_curr): Likewise.
3251
+ (aarch64_madd_needs_nop): Likewise.
3252
+ (aarch64_final_prescan_insn): Likewise.
3253
+ * doc/invoke.texi (Document new option).
3255
+2014-10-15 Eric Botcazou <ebotcazou@adacore.com>
3257
+ * stor-layout.c (self_referential_size): Do not promote arguments.
3259
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3261
+ Backport from mainline r215880
3262
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3264
+ * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3265
+ Issue a warning message when vec_lvsl or vec_lvsr is used with a
3266
+ little endian target.
3268
+ Backport from mainline r215882
3269
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3271
+ * altivec.md (altivec_lvsl): New define_expand.
3272
+ (altivec_lvsl_direct): Rename define_insn from altivec_lvsl.
3273
+ (altivec_lvsr): New define_expand.
3274
+ (altivec_lvsr_direct): Rename define_insn from altivec_lvsr.
3275
+ * rs6000.c (rs6000_expand_builtin): Change to use
3276
+ altivec_lvs[lr]_direct; remove commented-out code.
3278
+2014-10-09 Uros Bizjak <ubizjak@gmail.com>
3280
+ Backport from mainline
3281
+ 2014-10-09 Uros Bizjak <ubizjak@gmail.com>
3283
+ PR rtl-optimization/57003
3284
+ * regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg,
3285
+ also check CALL_INSN_FUNCTION_USAGE for clobbers again after
3286
+ killing regs_invalidated_by_call.
3288
+2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
3290
+ Backport from mainline
3291
+ 2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
3294
+ * config/sh/sync.md (atomic_exchangesi_hard, atomic_exchange<mode>_hard,
3295
+ atomic_fetch_<fetchop_name>si_hard,
3296
+ atomic_fetch_<fetchop_name><mode>_hard, atomic_fetch_nandsi_hard,
3297
+ atomic_fetch_nand<mode>_hard, atomic_<fetchop_name>_fetchsi_hard,
3298
+ atomic_<fetchop_name>_fetch<mode>_hard, atomic_nand_fetchsi_hard,
3299
+ atomic_nand_fetch<mode>_hard): Add missing set of T_REG.
3301
+2014-10-02 Martin Jambor <mjambor@suse.cz>
3303
+ PR tree-optimization/63375
3304
+ * tree-sra.c (build_access_from_expr_1): Disqualify volatile
3307
+2014-10-01 Jakub Jelinek <jakub@redhat.com>
3310
+ * dwarf2out.c (loc_list_from_tree): Handle TARGET_MEM_REF and
3314
+ * config/i386/i386.c (expand_vec_perm_pshufb): Fix up rperm[0]
3315
+ argument to avx2_permv2ti.
3317
+2014-10-01 Uros Bizjak <ubizjak@gmail.com>
3319
+ Backport from mainline
3320
+ 2014-09-30 Uros Bizjak <ubizjak@gmail.com>
3322
+ * config/i386/i386.md (fmodxf3): Enable for flag_finite_math_only only.
3323
+ (fmod<mode>3): Ditto.
3324
+ (fpremxf4_i387): Ditto.
3325
+ (reminderxf3): Ditto.
3326
+ (reminder<mode>3): Ditto.
3327
+ (fprem1xf4_i387): Ditto.
3329
+2014-09-30 Jakub Jelinek <jakub@redhat.com>
3331
+ PR inline-asm/63282
3332
+ * ifcvt.c (dead_or_predicable): Don't call redirect_jump_1
3333
+ or invert_jump_1 if jump isn't any_condjump_p.
3335
+2014-09-29 Charles Baylis <charles.baylis@linaro.org>
3337
+ Backport from mainline r212303
3339
+ * config/arm/arm-protos.h (arm_legitimate_address_p,
3340
+ arm_is_constant_pool_ref): Add prototypes.
3341
+ * config/arm/arm.c (arm_legitimate_address_p): Remove static.
3342
+ (arm_is_constant_pool_ref) New function.
3343
+ * config/arm/arm.md (unaligned_loadhis, arm_zero_extendhisi2_v6,
3344
+ arm_zero_extendqisi2_v6): Use Uh constraint for memory operand.
3345
+ (arm_extendhisi2, arm_extendhisi2_v6): Use Uh constraint for memory
3346
+ operand and remove pool_range and neg_pool_range attributes.
3347
+ (arm_extendqihi_insn, arm_extendqisi, arm_extendqisi_v6): Remove
3348
+ pool_range and neg_pool_range attributes.
3349
+ * config/arm/constraints.md (Uh): New constraint. (Uq): Don't allow
3350
+ constant pool references.
3352
+2014-09-28 John David Anglin <danglin@gcc.gnu.org>
3354
+ * config/pa/pa.c (pa_output_function_epilogue): Only update
3355
+ last_address when a nonnote insn is found.
3357
+2014-09-25 Oleg Endo <olegendo@gcc.gnu.org>
3359
+ Backport from mainline
3360
+ 2014-09-25 Nick Clifton <nickc@redhat.com>
3361
+ 2014-09-25 Oleg Endo <olegendo@gcc.gnu.org>
3364
+ * config/sh/sync.md (atomic_fetch_nand<mode>_soft_imask,
3365
+ atomic_test_and_set_soft_imask): Fix typo in instruction sequence.
3367
+2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3369
+ Backport from mainline r215559
3370
+ 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3373
+ * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin):
3374
+ Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling.
3376
+2014-09-25 Jakub Jelinek <jakub@redhat.com>
3378
+ PR tree-optimization/63341
3379
+ * tree-vectorizer.h (vect_create_data_ref_ptr,
3380
+ vect_create_addr_base_for_vector_ref): Add another tree argument
3381
+ defaulting to NULL_TREE.
3382
+ * tree-vect-data-refs.c (vect_create_data_ref_ptr): Add byte_offset
3383
+ argument, pass it down to vect_create_addr_base_for_vector_ref.
3384
+ (vect_create_addr_base_for_vector_ref): Add byte_offset argument,
3385
+ add that to base_offset too if non-NULL.
3386
+ * tree-vect-stmts.c (vectorizable_load): Add byte_offset variable,
3387
+ for dr_explicit_realign_optimized set it to vector byte size
3388
+ - 1 instead of setting offset, pass byte_offset down to
3389
+ vect_create_data_ref_ptr.
3391
+2014-09-23 Michael Meissner <meissner@linux.vnet.ibm.com>
3393
+ Back port from trunk:
3394
+ 2014-09-23 Michael Meissner <meissner@linux.vnet.ibm.com>
3396
+ * config/rs6000/rs6000.md (f32_vsx): New mode attributes to
3397
+ refine the constraints used on 32/64-bit floating point moves.
3398
+ (f32_av): Likewise.
3399
+ (f64_vsx): Likewise.
3400
+ (f64_dm): Likewise.
3401
+ (f64_av): Likewise.
3402
+ (BOOL_REGS_OUTPUT): Use wt constraint for TImode instead of wa.
3403
+ (BOOL_REGS_OP1): Likewise.
3404
+ (BOOL_REGS_OP2): Likewise.
3405
+ (BOOL_REGS_UNARY): Likewise.
3406
+ (mov<mode>_hardfloat, SFmode/SDmode): Tighten down constraints for
3407
+ 32/64-bit floating point moves. Do not use wa, instead use ww/ws
3408
+ for moves involving VSX registers. Do not use constraints that
3409
+ target VSX registers for decimal types.
3410
+ (mov<mode>_hardfloat32, DFmode/DDmode): Likewise.
3411
+ (mov<mode>_hardfloat64, DFmode/DDmode): Likewise.
3413
+2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
3415
+ Back port from trunk:
3416
+ 2014-09-19 Michael Meissner <meissner@linux.vnet.ibm.com>
3418
+ * config/rs6000/predicates.md (fusion_gpr_mem_load): Move testing
3419
+ for base_reg_operand to be common between LO_SUM and PLUS.
3420
+ (fusion_gpr_mem_combo): New predicate to match a fused address
3421
+ that combines the addis and memory offset address.
3423
+ * config/rs6000/rs6000-protos.h (fusion_gpr_load_p): Change
3424
+ calling signature.
3425
+ (emit_fusion_gpr_load): Likewise.
3427
+ * config/rs6000/rs6000.c (fusion_gpr_load_p): Change calling
3428
+ signature to pass each argument separately, rather than
3429
+ using an operands array. Rewrite the insns found by peephole2 to
3430
+ be a single insn, rather than hoping the insns will still be
3431
+ together when the peephole pass is done. Drop being called via a
3433
+ (emit_fusion_gpr_load): Change calling signature to be called from
3434
+ the fusion_gpr_load_<mode> insns with a combined memory address
3435
+ instead of the peephole pass passing the addis and offset
3438
+ * config/rs6000/rs6000.md (UNSPEC_FUSION_GPR): New unspec for GPR
3440
+ (power8 fusion peephole): Drop support for doing power8 via a
3441
+ normal peephole that was created by the peephole2 pass.
3442
+ (power8 fusion peephole2): Create a new insn with the fused
3443
+ address, so that the fused operation is kept together after
3444
+ register allocation is done.
3445
+ (fusion_gpr_load_<mode>): Likewise.
3447
+2014-09-17 Jakub Jelinek <jakub@redhat.com>
3450
+ * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
3451
+ if there are only debug stmts after the noreturn call, instead
3452
+ remove the debug stmts.
3454
+2014-09-10 Michael Meissner <meissner@linux.vnet.ibm.com>
3456
+ * config/rs6000/vsx.md (vsx_fmav4sf4): Use correct constraints for
3457
+ V2DF, V4SF, DF, and DI modes.
3458
+ (vsx_fmav2df2): Likewise.
3459
+ (vsx_float_fix_<mode>2): Likewise.
3460
+ (vsx_reduc_<VEC_reduc_name>_v2df_scalar): Likewise.
3462
+2014-09-10 Alan Modra <amodra@gmail.com>
3465
+ * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
3468
+2014-09-09 Richard Biener <rguenther@suse.de>
3470
+ Backport from mainline
3471
+ 2014-06-11 Richard Biener <rguenther@suse.de>
3473
+ PR tree-optimization/61452
3474
+ * tree-ssa-sccvn.c (visit_phi): Remove pointless setting of
3475
+ expr and has_constants in case we found a leader.
3476
+ (simplify_binary_expression): Always valueize operands first.
3477
+ (simplify_unary_expression): Likewise.
3479
+2014-09-09 Richard Biener <rguenther@suse.de>
3481
+ Backport from mainline
3482
+ 2014-05-05 Richard Biener <rguenther@suse.de>
3484
+ PR middle-end/61010
3485
+ * fold-const.c (fold_binary_loc): Consistently avoid
3486
+ canonicalizing X & CST away from a CST that is the mask
3489
+ 2014-05-28 Richard Biener <rguenther@suse.de>
3491
+ PR middle-end/61045
3492
+ * fold-const.c (fold_comparison): When folding
3493
+ X +- C1 CMP Y +- C2 to X CMP Y +- C2 +- C1 also ensure
3494
+ the sign of the remaining constant operand stays the same.
3496
+ 2014-08-11 Richard Biener <rguenther@suse.de>
3498
+ PR tree-optimization/62075
3499
+ * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
3500
+ handle uses in patterns.
3502
+2014-09-09 James Greenhalgh <james.greenhalgh@arm.com>
3504
+ Backport from mainline.
3505
+ 2014-09-09 James Greenhalgh <james.greenhalgh@arm.com>
3507
+ * doc/invoke.texi (-march): Use GNU/Linux rather than Linux.
3508
+ (-mtune): Likewise.
3509
+ (-mcpu): Likewise.
3511
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
3513
+ PR tree-optimization/60196
3514
+ PR tree-optimization/63189
3515
+ Backported from mainline
3516
+ 2013-09-17 Cong Hou <congh@google.com>
3518
+ * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
3519
+ when checking the dot production pattern. The type of rhs operand
3520
+ of multiply is now checked correctly.
3522
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
3524
+ Backported from mainline
3525
+ 2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
3528
+ * haifa-sched.c (advance_one_cycle): Fix dump.
3529
+ (schedule_block): Don't advance cycle if we are already at the
3530
+ beginning of the cycle.
3532
+2014-09-03 Martin Jambor <mjambor@suse.cz>
3535
+ * ipa-cp.c (intersect_aggregates_with_edge): Handle impermissible
3536
+ pass-trough jump functions correctly.
3538
+2014-09-03 Martin Jambor <mjambor@suse.cz>
3541
+ * ipa-cp.c (find_aggregate_values_for_callers_subset): Chain
3542
+ created replacements in ascending order of offsets.
3543
+ (known_aggs_to_agg_replacement_list): Likewise.
3545
+2014-09-01 Marek Polacek <polacek@redhat.com>
3547
+ Backport from mainline
3548
+ 2014-08-21 Marek Polacek <polacek@redhat.com>
3551
+ * expr.c (is_aligning_offset): Remove logical not.
3553
+2014-09-01 Marek Polacek <polacek@redhat.com>
3555
+ Backport from mainline
3556
+ 2014-08-19 Marek Polacek <polacek@redhat.com>
3559
+ * cgraphunit.c (handle_alias_pairs): Fix condition.
3561
+2014-08-30 John David Anglin <danglin@gcc.gnu.org>
3563
+ * config/pa/pa.c (pa_assemble_integer): Don't add PLABEL relocation
3564
+ prefix to function labels when generating fast indirect calls.
3566
+2014-08-26 Joel Sherrill <joel.sherrill@oarcorp.com>
3568
+ * doc/invoke.texi: -fno-cxa-atexit should be -fno-use-cxa-atexit.
3570
+2014-08-26 Marek Polacek <polacek@redhat.com>
3572
+ Backport from mainline
3573
+ 2014-08-26 Marek Polacek <polacek@redhat.com>
3576
+ * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT,
3577
+ LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Wrap in parens.
3579
+2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
3581
+ Backport from mainline
3582
+ 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
3585
+ * config/sh/sh.opt (musermode): Allow negative form.
3586
+ * config/sh/sh.c (sh_option_override): Disable TARGET_USERMODE for
3587
+ targets that don't support it.
3588
+ * doc/invoke.texi (SH Options): Rename sh-*-linux* to sh*-*-linux*.
3589
+ Document -mno-usermode option.
3591
+2014-08-23 John David Anglin <danglin@gcc.gnu.org>
3594
+ * config/pa/pa.c (pa_output_function_epilogue): Don't set
3595
+ last_address when the current function is a thunk.
3596
+ (pa_asm_output_mi_thunk): When we don't have named sections or they
3597
+ are not being used, check that thunk can reach the stub table with a
3600
+2014-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
3602
+ Backport fro mainline
3603
+ 2014-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
3606
+ * doc/md.texi (Machine Constraints): Update PowerPC wi constraint
3607
+ documentation to state it is only for VSX operations.
3609
+ * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Make wi
3610
+ constraint only active if VSX.
3612
+ * config/rs6000/rs6000.md (lfiwax): Use wj constraint instead of
3613
+ wi cosntraint for ISA 2.07 lxsiwax/lxsiwzx instructions.
3614
+ (lfiwzx): Likewise.
3616
+2014-08-15 Tom de Vries <tom@codesourcery.com>
3618
+ Backport from mainline:
3619
+ 2014-08-14 Tom de Vries <tom@codesourcery.com>
3621
+ PR rtl-optimization/62004
3622
+ PR rtl-optimization/62030
3623
+ * ifcvt.c (rtx_interchangeable_p): New function.
3624
+ (noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.
3626
+ 2014-08-05 Richard Biener <rguenther@suse.de>
3628
+ * emit-rtl.h (mem_attrs_eq_p): Declare.
3629
+ * emit-rtl.c (mem_attrs_eq_p): Export.
3631
+2014-08-16 John David Anglin <danglin@gcc.gnu.org>
3633
+ Backport from trunk:
3634
+ 2014-04-06 John David Anglin <danglin@gcc.gnu.org>
3637
+ * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
3638
+ size accounting for thunks.
3639
+ (pa_asm_output_mi_thunk): Use final_start_function() and
3640
+ final_end_function() to output function start and end directives.
3642
+2014-08-15 Oleg Endo <olegendo@gcc.gnu.org>
3644
+ Backport from mainline:
3645
+ 2014-08-15 Oleg Endo <olegendo@gcc.gnu.org>
3647
+ * doc/invoke.texi (SH options): Document missing processor variant
3648
+ options. Remove references to Hitachi. Undocument deprecated mspace
3651
+2014-08-13 Felix Yang <fei.yang0953@gmail.com>
3653
+ PR tree-optimization/62073
3654
+ * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has
3657
+2014-08-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3659
+ Backport from mainline
3660
+ 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
3662
+ PR middle-end/62103
3663
+ * gimple-fold.c (fold_ctor_reference): Don't fold in presence of
3664
+ bitfields, that is when size doesn't match the size of type or the
3665
+ size of the constructor.
3667
+2014-08-12 Michael Meissner <meissner@linux.vnet.ibm.com>
3669
+ Backport patch from mainline
3670
+ 2014-08-11 Michael Meissner <meissner@linux.vnet.ibm.com>
3672
+ * config/rs6000/constraints.md (wh constraint): New constraint,
3673
+ for FP registers if direct move is available.
3674
+ (wi constraint): New constraint, for VSX/FP registers that can
3675
+ handle 64-bit integers.
3676
+ (wj constraint): New constraint for VSX/FP registers that can
3677
+ handle 64-bit integers for direct moves.
3678
+ (wk constraint): New constraint for VSX/FP registers that can
3679
+ handle 64-bit doubles for direct moves.
3680
+ (wy constraint): Make documentation match implementation.
3682
+ * config/rs6000/rs6000.c (struct rs6000_reg_addr): Add
3683
+ scalar_in_vmx_p field to simplify tests of whether SFmode or
3684
+ DFmode can go in the Altivec registers.
3685
+ (rs6000_hard_regno_mode_ok): Use scalar_in_vmx_p field.
3686
+ (rs6000_setup_reg_addr_masks): Likewise.
3687
+ (rs6000_debug_print_mode): Add debug support for scalar_in_vmx_p
3688
+ field, and wh/wi/wj/wk constraints.
3689
+ (rs6000_init_hard_regno_mode_ok): Setup scalar_in_vmx_p field, and
3690
+ the wh/wi/wj/wk constraints.
3691
+ (rs6000_preferred_reload_class): If SFmode/DFmode can go in the
3692
+ upper registers, prefer VSX registers unless the operation is a
3693
+ memory operation with REG+OFFSET addressing.
3695
+ * config/rs6000/vsx.md (VSr mode attribute): Add support for
3696
+ DImode. Change SFmode to use ww constraint instead of d to allow
3697
+ SF registers in the upper registers.
3700
+ (VSr5): Fix thinko in comment.
3701
+ (VSa): New mode attribute that is an alternative to wa, that
3702
+ returns the VSX register class that a mode can go in, but may not
3703
+ be the preferred register class.
3704
+ (VS_64dm): New mode attribute for appropriate register classes for
3705
+ referencing 64-bit elements of vectors for direct moves and normal
3707
+ (VS_64reg): Likewise.
3708
+ (vsx_mov<mode>): Change wa constraint to <VSa> to limit the
3709
+ register allocator to only registers the data type can handle.
3710
+ (vsx_le_perm_load_<mode>): Likewise.
3711
+ (vsx_le_perm_store_<mode>): Likewise.
3712
+ (vsx_xxpermdi2_le_<mode>): Likewise.
3713
+ (vsx_xxpermdi4_le_<mode>): Likewise.
3714
+ (vsx_lxvd2x2_le_<mode>): Likewise.
3715
+ (vsx_lxvd2x4_le_<mode>): Likewise.
3716
+ (vsx_stxvd2x2_le_<mode>): Likewise.
3717
+ (vsx_add<mode>3): Likewise.
3718
+ (vsx_sub<mode>3): Likewise.
3719
+ (vsx_mul<mode>3): Likewise.
3720
+ (vsx_div<mode>3): Likewise.
3721
+ (vsx_tdiv<mode>3_internal): Likewise.
3722
+ (vsx_fre<mode>2): Likewise.
3723
+ (vsx_neg<mode>2): Likewise.
3724
+ (vsx_abs<mode>2): Likewise.
3725
+ (vsx_nabs<mode>2): Likewise.
3726
+ (vsx_smax<mode>3): Likewise.
3727
+ (vsx_smin<mode>3): Likewise.
3728
+ (vsx_sqrt<mode>2): Likewise.
3729
+ (vsx_rsqrte<mode>2): Likewise.
3730
+ (vsx_tsqrt<mode>2_internal): Likewise.
3731
+ (vsx_fms<mode>4): Likewise.
3732
+ (vsx_nfma<mode>4): Likewise.
3733
+ (vsx_eq<mode>): Likewise.
3734
+ (vsx_gt<mode>): Likewise.
3735
+ (vsx_ge<mode>): Likewise.
3736
+ (vsx_eq<mode>_p): Likewise.
3737
+ (vsx_gt<mode>_p): Likewise.
3738
+ (vsx_ge<mode>_p): Likewise.
3739
+ (vsx_xxsel<mode>): Likewise.
3740
+ (vsx_xxsel<mode>_uns): Likewise.
3741
+ (vsx_copysign<mode>3): Likewise.
3742
+ (vsx_float<VSi><mode>2): Likewise.
3743
+ (vsx_floatuns<VSi><mode>2): Likewise.
3744
+ (vsx_fix_trunc<mode><VSi>2): Likewise.
3745
+ (vsx_fixuns_trunc<mode><VSi>2): Likewise.
3746
+ (vsx_x<VSv>r<VSs>i): Likewise.
3747
+ (vsx_x<VSv>r<VSs>ic): Likewise.
3748
+ (vsx_btrunc<mode>2): Likewise.
3749
+ (vsx_b2trunc<mode>2): Likewise.
3750
+ (vsx_floor<mode>2): Likewise.
3751
+ (vsx_ceil<mode>2): Likewise.
3752
+ (vsx_<VS_spdp_insn>): Likewise.
3753
+ (vsx_xscvspdp): Likewise.
3754
+ (vsx_xvcvspuxds): Likewise.
3755
+ (vsx_float_fix_<mode>2): Likewise.
3756
+ (vsx_set_<mode>): Likewise.
3757
+ (vsx_extract_<mode>_internal1): Likewise.
3758
+ (vsx_extract_<mode>_internal2): Likewise.
3759
+ (vsx_extract_<mode>_load): Likewise.
3760
+ (vsx_extract_<mode>_store): Likewise.
3761
+ (vsx_splat_<mode>): Likewise.
3762
+ (vsx_xxspltw_<mode>): Likewise.
3763
+ (vsx_xxspltw_<mode>_direct): Likewise.
3764
+ (vsx_xxmrghw_<mode>): Likewise.
3765
+ (vsx_xxmrglw_<mode>): Likewise.
3766
+ (vsx_xxsldwi_<mode>): Likewise.
3767
+ (vsx_xscvdpspn): Tighten constraints to only use register classes
3769
+ (vsx_xscvspdpn): Likewise.
3770
+ (vsx_xscvdpspn_scalar): Likewise.
3772
+ * config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wh, wi,
3773
+ wj, and wk constraints.
3774
+ (GPR_REG_CLASS_P): New helper macro for register classes targeting
3775
+ general purpose registers.
3777
+ * config/rs6000/rs6000.md (f32_dm): Use wh constraint for SDmode
3779
+ (zero_extendsidi2_lfiwz): Use wj constraint for direct move of
3780
+ DImode instead of wm. Use wk constraint for direct move of DFmode
3782
+ (extendsidi2_lfiwax): Likewise.
3783
+ (lfiwax): Likewise.
3784
+ (lfiwzx): Likewise.
3785
+ (movdi_internal64): Likewise.
3787
+ * doc/md.texi (PowerPC and IBM RS6000): Document wh, wi, wj, and
3788
+ wk constraints. Make the wy constraint documentation match them
3791
+2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
3793
+ Backport from mainline
3794
+ 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3796
+ PR tree-optimization/61375
3797
+ * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
3798
+ symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
3799
+ (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.
3801
+2014-08-01 Richard Biener <rguenther@suse.de>
3803
+ PR tree-optimization/61964
3804
+ * tree-ssa-tail-merge.c (gimple_operand_equal_value_p): New
3805
+ function merged from trunk.
3806
+ (gimple_equal_p): Handle non-SSA LHS solely by structural
3809
+2014-07-25 Uros Bizjak <ubizjak@gmail.com>
3811
+ * config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
3813
+2014-07-24 Kyle McMartin <kyle@redhat.com>
3815
+ * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
3817
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3819
+ * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
3821
+ * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
3822
+ function. Issue -Wpsabi warning if future GCC releases will use
3823
+ different field alignment rules for this type.
3824
+ * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
3825
+ * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
3826
+ * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
3828
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3830
+ * config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
3831
+ -Wpsabi note when encountering a type where future GCC releases
3832
+ will apply different alignment requirements.
3834
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3836
+ * config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
3837
+ does not fit fully into floating-point registers, and there is still
3838
+ space in the register parameter area, issue -Wpsabi note that the ABI
3839
+ will change in a future GCC release.
3841
+2014-07-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
3843
+ * config/arm/t-rtems-eabi: Add
3844
+ mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard,
3845
+ mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard,
3846
+ mbig-endian/mthumb/march=armv7-r, and
3847
+ mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
3850
+2014-07-21 Peter Bergner <bergner@vnet.ibm.com>
3852
+ * config/rs6000/sysv4.h (LIBASAN_EARLY_SPEC): Define.
3853
+ (LIBTSAN_EARLY_SPEC): Likewise.
3854
+ (STATIC_LIBASAN_LIBS): Likewise.
3855
+ (STATIC_LIBTSAN_LIBS): Likewise.
3857
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
3859
+ * toplev.c (output_stack_usage): Adjust the location of the warning.
3861
+2014-07-19 Daniel Cederman <cederman@gaisler.com>
3863
+ * config/sparc/sync.md (*membar_storeload_leon3): New insn.
3864
+ (*membar_storeload): Disable for LEON3.
3866
+2014-07-17 Richard Biener <rguenther@suse.de>
3868
+ PR rtl-optimization/61801
3869
+ * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
3870
+ ASM_INPUT don't set reg_pending_barrier if it appears in a
3873
+2014-07-16 Jakub Jelinek <jakub@redhat.com>
3875
+ * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
3876
+ on the FUNCTION_DECL.
3878
+2014-07-10 Tom G. Christensen <tgc@jupiterrise.com>
3880
+ * doc/install.texi: Remove links to defunct package providers for
3883
+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
3885
+ PR middle-end/53590
3886
+ * function.c (allocate_struct_function): Revert r188667 change.
3888
+2014-07-04 Jakub Jelinek <jakub@redhat.com>
3890
+ PR tree-optimization/61684
3891
+ * tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
3892
+ rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
3894
+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
3896
+ Backport from Mainline
3897
+ 2014-06-20 Jakub Jelinek <jakub@redhat.com>
3898
+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
3900
+ PR tree-optimization/61306
3901
+ * tree-ssa-math-opts.c (struct symbolic_number): Store type of
3902
+ expression instead of its size.
3903
+ (do_shift_rotate): Adapt to change in struct symbolic_number. Return
3904
+ false to prevent optimization when the result is unpredictable due to
3905
+ arithmetic right shift of signed type with highest byte is set.
3906
+ (verify_symbolic_number_p): Adapt to change in struct symbolic_number.
3907
+ (find_bswap_1): Likewise. Return NULL to prevent optimization when the
3908
+ result is unpredictable due to sign extension.
3909
+ (find_bswap): Adapt to change in struct symbolic_number.
3911
+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
3913
+ Backport from mainline
3914
+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
3917
+ * config/alpha/alpha.c (alpha_handle_trap_shadows): Handle BARRIER RTX.
3919
+2014-06-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3922
+ * config/rs6000/vsx.md (vsx_extract_v4sf): Fix bug with element
3923
+ extraction other than index 3.
3925
+2014-06-24 Jakub Jelinek <jakub@redhat.com>
3928
+ * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
3929
+ model family 6 CPU with has_longmode never use a CPU without
3932
+2014-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3934
+ Backport from mainline
3936
+ 2014-06-20 Julian Brown <julian@codesourcery.com>
3937
+ Chung-Lin Tang <cltang@codesourcery.com>
3939
+ * config/arm/arm.c (arm_output_mi_thunk): Fix offset for
3940
+ TARGET_THUMB1_ONLY. Add comments.
3942
+2014-06-18 Uros Bizjak <ubizjak@gmail.com>
3944
+ Backport from mainline
3945
+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
3948
+ * config/i386/i386.md (*floatunssi<mode>2_i387_with_xmm): New
3949
+ define_insn_and_split pattern, merged from *floatunssi<mode>2_1
3950
+ and corresponding splitters. Zero extend general register
3951
+ or memory input operand to XMM temporary. Enable for
3952
+ TARGET_SSE2 and TARGET_INTER_UNIT_MOVES_TO_VEC only.
3953
+ (floatunssi<mode>2): Update expander predicate.
3955
+2014-06-18 Richard Henderson <rth@redhat.com>
3958
+ * config/aarch64/aarch64.md (tlsdesc_small): Clobber CC_REGNUM.
3960
+2014-06-17 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
3962
+ Revert on gcc-4_8-branch.
3963
+ * config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
3964
+ * config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
3966
+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
3968
+ Backport from mainline
3971
+ * config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
3972
+ variable 'size'; calculate 'size' right in the front; use
3973
+ 'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
3974
+ pcum->aapcs_stack_words.
3976
+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
3978
+ Backport from mainline
3980
+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
3982
+ * config/rs6000/rs6000-builtin.def (BU_MISC_1): Delete.
3983
+ (BU_MISC_2): Rename to ...
3984
+ (BU_LDBL128_2): ... this.
3985
+ * config/rs6000/rs6000.h (RS6000_BTM_LDBL128): New define.
3986
+ (RS6000_BTM_COMMON): Add RS6000_BTM_LDBL128.
3987
+ * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Handle
3988
+ RS6000_BTM_LDBL128.
3989
+ (rs6000_invalid_builtin): Add long double 128-bit builtin support.
3990
+ (rs6000_builtin_mask_names): Add RS6000_BTM_LDBL128.
3991
+ * config/rs6000/rs6000.md (unpacktf_0): Remove define)expand.
3992
+ (unpacktf_1): Likewise.
3993
+ * doc/extend.texi (__builtin_longdouble_dw0): Remove documentation.
3994
+ (__builtin_longdouble_dw1): Likewise.
3995
+ * doc/sourcebuild.texi (longdouble128): Document.
3997
+2014-06-13 Jason Merrill <jason@redhat.com>
4000
+ * common.opt (-fno-gnu-unique): Add.
4001
+ * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
4003
+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
4005
+ Backport from 2014-05-09 trunk r210272
4007
+ * config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
4008
+ unsigned int initializers for regno_in, regno_out.
4010
+ Backport from 2014-05-14 trunk r210418
4011
+ * config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
4012
+ shifted values to avoid build warning.
4014
+ Backport from 2014-06-12 trunk r211491
4017
+ * config/avr/avr.md (push<mode>1): Avoid (subreg(mem)) when
4018
+ loading from address spaces.
4020
+2014-06-12 Alan Modra <amodra@gmail.com>
4023
+ * doc/tm.texi.in (INCOMING_REG_PARM_STACK_SPACE): Document.
4024
+ * doc/tm.texi: Regenerate.
4025
+ * function.c (INCOMING_REG_PARM_STACK_SPACE): Provide default.
4026
+ Use throughout in place of REG_PARM_STACK_SPACE.
4027
+ * config/rs6000/rs6000.c (rs6000_reg_parm_stack_space): Add
4028
+ "incoming" param. Pass to rs6000_function_parms_need_stack.
4029
+ (rs6000_function_parms_need_stack): Add "incoming" param, ignore
4030
+ prototype_p when incoming. Use function decl when incoming
4031
+ to handle K&R style functions.
4032
+ * config/rs6000/rs6000.h (REG_PARM_STACK_SPACE): Adjust.
4033
+ (INCOMING_REG_PARM_STACK_SPACE): Define.
4035
+2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
4037
+ Back port from trunk
4038
+ 2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
4041
+ * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
4042
+ iterators, VSX_D that handles 64-bit types, and VSX_LE that
4043
+ handles swapping the two 64-bit double words on little endian
4044
+ systems. Include V1TImode and optionally TImode in VSX_LE so that
4045
+ these types are properly swapped. Change all of the insns and
4046
+ splits that do the 64-bit swaps to use VSX_LE.
4047
+ (vsx_le_perm_load_<mode>): Likewise.
4048
+ (vsx_le_perm_store_<mode>): Likewise.
4049
+ (splitters for little endian memory operations): Likewise.
4050
+ (vsx_xxpermdi2_le_<mode>): Likewise.
4051
+ (vsx_lxvd2x2_le_<mode>): Likewise.
4052
+ (vsx_stxvd2x2_le_<mode>): Likewise.
4054
+2014-06-05 Martin Jambor <mjambor@suse.cz>
4057
+ * ipa-cp.c (determine_versionability): Pretend that tm_clones are
4060
+2014-06-04 Richard Biener <rguenther@suse.de>
4062
+ PR tree-optimization/61383
4063
+ * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure
4066
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
4068
+ Backport from mainline
4069
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
4071
+ PR rtl-optimization/60866
4072
+ * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
4073
+ Default it to -1. Pass it down to init_simplejump_data.
4074
+ (init_simplejump_data): New parameter old_seqno. Pass it down
4075
+ to get_seqno_for_a_jump.
4076
+ (get_seqno_for_a_jump): New parameter old_seqno. Use it for
4077
+ initializing new jump seqno as a last resort. Add comment.
4078
+ (sel_redirect_edge_and_branch): Save old seqno of the conditional
4079
+ jump and pass it down to sel_init_new_insn.
4080
+ (sel_redirect_edge_and_branch_force): Likewise.
4082
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
4084
+ Backport from mainline
4085
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
4087
+ PR rtl-optimization/60901
4088
+ * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
4089
+ bb predecessor belongs to the same scheduling region. Adjust comment.
4091
+2014-06-03 Uros Bizjak <ubizjak@gmail.com>
4093
+ Backport from mainline
4094
+ 2014-06-02 Uros Bizjak <ubizjak@gmail.com>
4097
+ * config/i386/i386.c (ix86_expand_vec_perm) [case V32QImode]: Use
4098
+ GEN_INT (-128) instead of GEN_INT (128) to set MSB of QImode constant.
4100
+2014-05-28 Guozhi Wei <carrot@google.com>
4103
+ * config/aarch64/arm_neon.h (vqdmulh_n_s16): Change the last operand's
4105
+ (vqdmulhq_n_s16): Likewise.
4107
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
4109
+ Backport from mainline
4110
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
4112
+ * double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
4113
+ predicate to detect a negative quotient.
4115
+2014-05-28 Georg-Johann Lay <avr@gjlay.de>
4118
+ * doc/extend.texi (Local Labels): Note that label differences are
4119
+ not supported for AVR.
4121
+2014-05-26 Michael Tautschnig <mt@debian.org>
4124
+ * doc/extend.texi (X86 Built-in Functions): Fix parameter lists of
4125
+ __builtin_ia32_vfrczs[sd] and __builtin_ia32_mpsadbw256.
4127
+2014-05-23 Alan Modra <amodra@gmail.com>
4130
+ * config/rs6000/rs6000.c (mem_operand_gpr): Handle SImode.
4131
+ * config/rs6000/rs6000.md (extendsidi2_lfiwax, extendsidi2_nocell):
4132
+ Use "Y" constraint rather than "m".
4134
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
4136
+ Backport from mainline
4137
+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
4139
+ * config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
4141
+2014-05-22 Richard Earnshaw <rearnsha@arm.com>
4144
+ * arm.md (arm_cmpdi_unsigned): Fix length calculation for Thumb2.
4146
2014-05-22 Release Manager
4148
* GCC 4.8.3 released.
4149
Index: gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
4150
===================================================================
4151
--- a/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c (.../tags/gcc_4_8_3_release)
4152
+++ b/src/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c (.../branches/gcc-4_8-branch)
4154
+/* Test for deprecation messages on use of lvsl and lvsr for little endian. */
4156
+/* { dg-do compile { target { powerpc64le-*-* } } } */
4157
+/* { dg-options "-O0 -Wdeprecated" } */
4159
+#include <altivec.h>
4165
+ vector unsigned char a = vec_lvsl (4, f); /* { dg-warning "vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores" } */
4166
+ vector unsigned char b = vec_lvsr (8, f); /* { dg-warning "vec_lvsr is deprecated for little endian; use assignment for unaligned loads and stores" } */
4168
Index: gcc/testsuite/gcc.target/powerpc/pr63335.c
4169
===================================================================
4170
--- a/src/gcc/testsuite/gcc.target/powerpc/pr63335.c (.../tags/gcc_4_8_3_release)
4171
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr63335.c (.../branches/gcc-4_8-branch)
4173
+/* { dg-do run { target { powerpc64*-*-* } } } */
4174
+/* { dg-require-effective-target powerpc_vsx_ok } */
4175
+/* { dg-options "-mvsx" } */
4177
+#include <altivec.h>
4181
+vector double vec = (vector double) {99.0, 99.0};
4185
+ int actual = vec_all_nge(vec, vec);
4189
+ actual = vec_all_nle(vec, vec);
4193
+ actual = vec_any_nge(vec, vec);
4197
+ actual = vec_any_nle(vec, vec);
4203
Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
4204
===================================================================
4205
--- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c (.../tags/gcc_4_8_3_release)
4206
+++ b/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c (.../branches/gcc-4_8-branch)
4208
/* { dg-do compile { target { powerpc*-*-* } } } */
4209
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
4210
/* { dg-require-effective-target powerpc_vsx_ok } */
4211
-/* { dg-options "-O3 -mcpu=power7" } */
4212
+/* { dg-options "-O3 -mcpu=power7 -Wno-deprecated" } */
4214
/* Test the various load/store varients. */
4216
Index: gcc/testsuite/gcc.target/powerpc/tfmode_off.c
4217
===================================================================
4218
--- a/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../tags/gcc_4_8_3_release)
4219
+++ b/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../branches/gcc-4_8-branch)
4221
/* { dg-do assemble } */
4222
/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
4223
/* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */
4224
+/* { dg-require-effective-target longdouble128 } */
4225
/* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
4227
typedef float TFmode __attribute__ ((mode (TF)));
4228
Index: gcc/testsuite/gcc.target/powerpc/pack02.c
4229
===================================================================
4230
--- a/src/gcc/testsuite/gcc.target/powerpc/pack02.c (.../tags/gcc_4_8_3_release)
4231
+++ b/src/gcc/testsuite/gcc.target/powerpc/pack02.c (.../branches/gcc-4_8-branch)
4233
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
4234
/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
4235
/* { dg-require-effective-target powerpc_fprs } */
4236
+/* { dg-require-effective-target longdouble128 } */
4237
/* { dg-options "-O2 -mhard-float" } */
4240
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c
4241
===================================================================
4242
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c (.../tags/gcc_4_8_3_release)
4243
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c (.../branches/gcc-4_8-branch)
4245
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
4246
+/* { dg-options "-mabi=elfv2" } */
4253
+void test (struct f8 a, struct f8 b) /* { dg-message "note: the ABI of passing homogeneous float aggregates will change" } */
4257
Index: gcc/testsuite/gcc.target/powerpc/htm-ttest.c
4258
===================================================================
4259
--- a/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../tags/gcc_4_8_3_release)
4260
+++ b/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../branches/gcc-4_8-branch)
4262
+/* { dg-do compile { target { powerpc*-*-* } } } */
4263
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
4264
+/* { dg-require-effective-target powerpc_htm_ok } */
4265
+/* { dg-options "-O2 -mhtm" } */
4267
+/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
4268
+/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
4270
+#include <htmintrin.h>
4274
+ return _HTM_STATE(__builtin_ttest());
4276
Index: gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
4277
===================================================================
4278
--- a/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c (.../tags/gcc_4_8_3_release)
4279
+++ b/src/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c (.../branches/gcc-4_8-branch)
4281
+/* Test expected code generation for lvsl and lvsr on little endian.
4282
+ Note that lvsl and lvsr are each produced once, but the filename
4283
+ causes them to appear twice in the file. */
4285
+/* { dg-do compile { target { powerpc64le-*-* } } } */
4286
+/* { dg-options "-O0 -Wno-deprecated" } */
4287
+/* { dg-final { scan-assembler-times "lvsl" 2 } } */
4288
+/* { dg-final { scan-assembler-times "lvsr" 2 } } */
4289
+/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
4290
+/* { dg-final { scan-assembler-times "vperm" 2 } } */
4293
+#include <altivec.h>
4299
+ vector unsigned char a = vec_lvsl (4, f);
4300
+ vector unsigned char b = vec_lvsr (8, f);
4302
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
4303
===================================================================
4304
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c (.../tags/gcc_4_8_3_release)
4305
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c (.../branches/gcc-4_8-branch)
4307
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
4308
+/* { dg-options "-mno-compat-align-parm" } */
4312
+ long a __attribute__((aligned (16)));
4315
+void test (struct test a) /* { dg-message "note: the ABI of passing aggregates with 16-byte alignment will change" } */
4319
Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
4320
===================================================================
4321
--- a/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../tags/gcc_4_8_3_release)
4322
+++ b/src/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c (.../branches/gcc-4_8-branch)
4324
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
4325
+/* { dg-require-effective-target powerpc_altivec_ok } */
4326
+/* { dg-options "-maltivec" } */
4330
+ int a __attribute__((vector_size (8)));
4331
+ }; /* { dg-message "note: the layout of aggregates containing vectors with 8-byte alignment will change" } */
4333
Index: gcc/testsuite/gcc.target/powerpc/altivec-6.c
4334
===================================================================
4335
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c (.../tags/gcc_4_8_3_release)
4336
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-6.c (.../branches/gcc-4_8-branch)
4338
/* { dg-do compile { target powerpc*-*-* } } */
4339
/* { dg-require-effective-target powerpc_altivec_ok } */
4340
-/* { dg-options "-maltivec -O0 -Wall" } */
4341
+/* { dg-options "-maltivec -O0 -Wall -Wno-deprecated" } */
4343
#include <altivec.h>
4345
Index: gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
4346
===================================================================
4347
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c (.../tags/gcc_4_8_3_release)
4348
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c (.../branches/gcc-4_8-branch)
4350
/* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
4351
/* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
4352
/* { dg-require-effective-target powerpc_altivec_ok } */
4353
-/* { dg-options "-maltivec -O2" } */
4354
+/* { dg-options "-maltivec -O2 -Wno-deprecated" } */
4356
#include <altivec.h>
4358
Index: gcc/testsuite/gcc.target/powerpc/altivec-20.c
4359
===================================================================
4360
--- a/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../tags/gcc_4_8_3_release)
4361
+++ b/src/gcc/testsuite/gcc.target/powerpc/altivec-20.c (.../branches/gcc-4_8-branch)
4363
/* { dg-do compile { target powerpc_altivec_ok } } */
4364
-/* { dg-options "-maltivec -mcpu=G5 -O2" } */
4365
+/* { dg-options "-maltivec -mcpu=G5 -O2 -Wno-deprecated" } */
4367
#include <altivec.h>
4369
Index: gcc/testsuite/gcc.target/alpha/pr61586.c
4370
===================================================================
4371
--- a/src/gcc/testsuite/gcc.target/alpha/pr61586.c (.../tags/gcc_4_8_3_release)
4372
+++ b/src/gcc/testsuite/gcc.target/alpha/pr61586.c (.../branches/gcc-4_8-branch)
4374
+/* { dg-do compile } */
4375
+/* { dg-options "-O2 -mieee" } */
4377
+void foo (int *dimensions, double **params, int hh)
4381
+ else if (dimensions[hh] > 0)
4382
+ params[hh][0] = 1.0f;
4384
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
4385
===================================================================
4386
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../tags/gcc_4_8_3_release)
4387
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../branches/gcc-4_8-branch)
4389
+/* Test AAPCS64 layout and __builtin_va_start.
4391
+ Pass named HFA/HVA argument on stack. */
4393
+/* { dg-do run { target aarch64*-*-* } } */
4395
+#ifndef IN_FRAMEWORK
4396
+#define AAPCS64_TEST_STDARG
4397
+#define TESTFILE "va_arg-14.c"
4398
+#include "type-def.h"
4400
+struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f};
4401
+struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f};
4402
+vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f};
4403
+vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f};
4405
+#include "abitest.h"
4407
+ ARG (float, 1.0f, S0, 0)
4408
+ ARG (float, 2.0f, S1, 1)
4409
+ ARG (float, 3.0f, S2, 2)
4410
+ ARG (float, 4.0f, S3, 3)
4411
+ ARG (float, 5.0f, S4, 4)
4412
+ ARG (float, 6.0f, S5, 5)
4413
+ ARG (float, 7.0f, S6, 6)
4414
+ ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7)
4415
+ /* Previous argument size has been rounded up to the nearest multiple of
4417
+ ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8)
4418
+ /* NSAA is rounded up to the nearest natural alignment of float32x4. */
4419
+ ARG (vf4_t, float32x4, STACK + 32, 9)
4420
+ ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID)
4422
+ LAST_ANON (double, 123456789.987, STACK + 64, 11)
4424
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
4425
===================================================================
4426
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../tags/gcc_4_8_3_release)
4427
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../branches/gcc-4_8-branch)
4442
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
4443
===================================================================
4444
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../tags/gcc_4_8_3_release)
4445
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../branches/gcc-4_8-branch)
4447
+/* Test AAPCS64 layout and __builtin_va_start.
4449
+ Pass named HFA/HVA argument on stack. */
4451
+/* { dg-do run { target aarch64*-*-* } } */
4453
+#ifndef IN_FRAMEWORK
4454
+#define AAPCS64_TEST_STDARG
4455
+#define TESTFILE "va_arg-13.c"
4457
+struct float_float_t
4469
+#define HAS_DATA_INIT_FUNC
4473
+ float_float.a = 1.2f;
4474
+ float_float.b = 2.2f;
4476
+ float_int.b8 = 4983.80f;
4479
+#include "abitest.h"
4481
+ ARG (float, 1.0f, S0, 0)
4482
+ ARG (float, 2.0f, S1, 1)
4483
+ ARG (float, 3.0f, S2, 2)
4484
+ ARG (float, 4.0f, S3, 3)
4485
+ ARG (float, 5.0f, S4, 4)
4486
+ ARG (float, 6.0f, S5, 5)
4487
+ ARG (float, 7.0f, S6, 6)
4488
+ ARG (struct float_float_t, float_float, STACK, 7)
4489
+ ARG (int, 9, W0, 8)
4490
+ ARG (int, 10, W1, 9)
4491
+ ARG (int, 11, W2, 10)
4492
+ ARG (int, 12, W3, 11)
4493
+ ARG (int, 13, W4, 12)
4494
+ ARG (int, 14, W5, 13)
4495
+ ARG (int, 15, W6, LAST_NAMED_ARG_ID)
4497
+ /* Note on the reason of using 'X7' instead of 'W7' here:
4498
+ Using 'X7' makes sure the test works in the big-endian mode.
4499
+ According to PCS rules B.4 and C.10, the size of float_int is rounded
4500
+ to 8 bytes and prepared in the register X7 as if loaded via LDR from
4501
+ the memory, with the content of the other 4 bytes unspecified. The
4502
+ test framework will only compare the 4 relavent bytes. */
4503
+ ANON (union float_int_t, float_int, X7, 15)
4504
+ LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
4506
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
4507
===================================================================
4508
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../tags/gcc_4_8_3_release)
4509
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../branches/gcc-4_8-branch)
4511
+/* Test AAPCS64 layout and __builtin_va_start.
4513
+ Pass named __128int argument on stack. */
4515
+/* { dg-do run { target aarch64*-*-* } } */
4517
+#ifndef IN_FRAMEWORK
4518
+#define AAPCS64_TEST_STDARG
4519
+#define TESTFILE "va_arg-15.c"
4520
+#include "type-def.h"
4522
+union int128_t qword;
4524
+#define HAS_DATA_INIT_FUNC
4528
+ /* Init signed quad-word integer. */
4529
+ qword.l64 = 0xfdb9753102468aceLL;
4530
+ qword.h64 = 0xeca8642013579bdfLL;
4533
+#include "abitest.h"
4535
+ ARG (int, 1, W0, 0)
4536
+ ARG (int, 2, W1, 1)
4537
+ ARG (int, 3, W2, 2)
4538
+ ARG (int, 4, W3, 3)
4539
+ ARG (int, 5, W4, 4)
4540
+ ARG (int, 6, W5, 5)
4541
+ ARG (int, 7, W6, 6)
4542
+ ARG (__int128, qword.i, STACK, LAST_NAMED_ARG_ID)
4544
+#ifndef __AAPCS64_BIG_ENDIAN__
4545
+ LAST_ANON (int, 8, STACK + 16, 8)
4547
+ LAST_ANON (int, 8, STACK + 20, 8)
4550
Index: gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
4551
===================================================================
4552
--- a/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c (.../tags/gcc_4_8_3_release)
4553
+++ b/src/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c (.../branches/gcc-4_8-branch)
4555
+/* { dg-do assemble } */
4556
+/* { dg-options "-O2 -mfix-cortex-a53-835769" } */
4559
+test (int a, double b, int c, int d, int e)
4562
+ __asm__ __volatile ("// %0, %1"
4565
+ : /* No clobbers */
4569
Index: gcc/testsuite/gcc.target/avr/torture/pr61443.c
4570
===================================================================
4571
--- a/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../tags/gcc_4_8_3_release)
4572
+++ b/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../branches/gcc-4_8-branch)
4574
+/* { dg-do run } */
4575
+/* { dg-options "-std=gnu99" } */
4577
+#include <stdlib.h>
4578
+#include <stdarg.h>
4580
+#define NC __attribute__((noinline,noclone))
4582
+void NC vfun (char n, ...)
4593
+ if (11 != va_arg (ap, int))
4597
+ if (2222 != va_arg (ap, int))
4601
+ if (333333 != va_arg (ap, __int24))
4605
+ if (44444444 != va_arg (ap, long))
4609
+ if (8888888888888888 != va_arg (ap, long long))
4618
+void NC boo_qi (const __flash char *p)
4623
+void NC boox_qi (const __memx char *p)
4628
+void NC boo_hi (const __flash int *p)
4633
+void NC boox_hi (const __memx int *p)
4638
+void NC boo_psi (const __flash __int24 *p)
4643
+void NC boox_psi (const __memx __int24 *p)
4648
+void NC boo_si (const __flash long *p)
4653
+void NC boox_si (const __memx long *p)
4658
+void NC boo_di (const __flash long long *p)
4663
+void NC boox_di (const __memx long long *p)
4668
+const __flash char f_qi = 11;
4669
+const __flash int f_hi = 2222;
4670
+const __flash __int24 f_psi = 333333;
4671
+const __flash long f_si = 44444444;
4672
+const __flash long long f_di = 8888888888888888;
4674
+const __memx char x_qi = 11;
4675
+const __memx int x_hi = 2222;
4676
+const __memx __int24 x_psi = 333333;
4677
+const __memx long x_si = 44444444;
4678
+const __memx long long x_di = 8888888888888888;
4682
+__int24 r_psi = 333333;
4683
+long r_si = 44444444;
4684
+long long r_di = 8888888888888888;
4696
+ boox_psi (&x_psi);
4702
+ boox_psi (&r_psi);
4708
Index: gcc/testsuite/gcc.target/i386/pr61923.c
4709
===================================================================
4710
--- a/src/gcc/testsuite/gcc.target/i386/pr61923.c (.../tags/gcc_4_8_3_release)
4711
+++ b/src/gcc/testsuite/gcc.target/i386/pr61923.c (.../branches/gcc-4_8-branch)
4713
+/* PR debug/61923 */
4714
+/* { dg-do compile } */
4715
+/* { dg-options "-O2 -fcompare-debug" } */
4727
+struct ext4_map_blocks
4733
+int ext4_da_map_blocks_ei_0;
4734
+void fn1 (int p1, struct ext4_map_blocks *p2)
4739
+ ext4_da_map_blocks_ei_0++;
4740
+ arch_spinlock_t *lock;
4741
+ switch (sizeof *&lock->tickets.head)
4743
+ asm("" : "+m"(*&lock->tickets.head) : ""(0));
4747
+ fn2 (p2->m_lblk, p2->m_len);
4749
Index: gcc/testsuite/gcc.target/i386/pr61423.c
4750
===================================================================
4751
--- a/src/gcc/testsuite/gcc.target/i386/pr61423.c (.../tags/gcc_4_8_3_release)
4752
+++ b/src/gcc/testsuite/gcc.target/i386/pr61423.c (.../branches/gcc-4_8-branch)
4754
+/* PR target/61423 */
4755
+/* { dg-do run { target ia32 } } */
4756
+/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
4759
+static unsigned int A[N];
4762
+__attribute__((noinline))
4765
+ unsigned int sum = 0;
4769
+ for (i = 0; i < N; i++)
4782
+ for(i = 0; i < N; i++)
4788
+ __builtin_abort ();
4792
Index: gcc/testsuite/gcc.target/i386/pr60901.c
4793
===================================================================
4794
--- a/src/gcc/testsuite/gcc.target/i386/pr60901.c (.../tags/gcc_4_8_3_release)
4795
+++ b/src/gcc/testsuite/gcc.target/i386/pr60901.c (.../branches/gcc-4_8-branch)
4797
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts" } */
4800
+extern void bar (void);
4801
+extern int baz (int);
4807
+ for (j = 0; j < n; j++)
4809
+ for (i = 1; i < j; i++)
4814
Index: gcc/testsuite/gcc.target/i386/pr61801.c
4815
===================================================================
4816
--- a/src/gcc/testsuite/gcc.target/i386/pr61801.c (.../tags/gcc_4_8_3_release)
4817
+++ b/src/gcc/testsuite/gcc.target/i386/pr61801.c (.../branches/gcc-4_8-branch)
4819
+/* PR rtl-optimization/61801 */
4820
+/* { dg-do compile } */
4821
+/* { dg-options "-Os -fcompare-debug" } */
4835
+ asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
4840
Index: gcc/testsuite/gcc.target/i386/pr61446.c
4841
===================================================================
4842
--- a/src/gcc/testsuite/gcc.target/i386/pr61446.c (.../tags/gcc_4_8_3_release)
4843
+++ b/src/gcc/testsuite/gcc.target/i386/pr61446.c (.../branches/gcc-4_8-branch)
4845
+/* PR rtl-optimization/61446 */
4847
+/* { dg-do compile { target { ia32 } } } */
4848
+/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
4853
+ const double dfa = a;
4854
+ const unsigned int hi = dfa / 0x1p32f;
4855
+ const unsigned int lo = dfa - (double) hi * 0x1p32f;
4857
+ return ((unsigned long long) hi << (4 * (8))) | lo;
4859
Index: gcc/testsuite/gcc.target/i386/pr63947.c
4860
===================================================================
4861
--- a/src/gcc/testsuite/gcc.target/i386/pr63947.c (.../tags/gcc_4_8_3_release)
4862
+++ b/src/gcc/testsuite/gcc.target/i386/pr63947.c (.../branches/gcc-4_8-branch)
4864
+/* PR target/63947 */
4865
+/* { dg-do assemble } */
4866
+/* { dg-options "-Os" } */
4867
+/* { dg-additional-options "-march=i686" { target ia32 } } */
4869
+long double foo (unsigned a, unsigned b)
4873
Index: gcc/testsuite/gcc.target/mips/pr62030-octeon.c
4874
===================================================================
4875
--- a/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c (.../tags/gcc_4_8_3_release)
4876
+++ b/src/gcc/testsuite/gcc.target/mips/pr62030-octeon.c (.../branches/gcc-4_8-branch)
4878
+/* { dg-do run } */
4879
+/* { dg-options "-march=octeon" } */
4881
+extern void abort (void);
4885
+ struct node *next;
4886
+ struct node *prev;
4893
+ struct node *first;
4896
+struct head heads[5];
4900
+struct head *head = &heads[2];
4902
+static int __attribute__((noinline))
4905
+ node.prev = (void *)head;
4906
+ head->first = &node;
4908
+ struct node *n = head->first;
4909
+ struct head *h = &heads[k];
4910
+ struct node *next = n->next;
4912
+ if (n->prev == (void *)h)
4915
+ n->prev->next = next;
4917
+ n->next = h->first;
4918
+ return n->next == &node;
4928
Index: gcc/testsuite/gcc.target/sh/pr61996.c
4929
===================================================================
4930
--- a/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../tags/gcc_4_8_3_release)
4931
+++ b/src/gcc/testsuite/gcc.target/sh/pr61996.c (.../branches/gcc-4_8-branch)
4933
+/* Check that the option -musermode has no effect on targets that do not
4934
+ support user/privileged mode and that it does not interfere with option
4935
+ -matomic-model=soft-imask. */
4936
+/* { dg-do compile } */
4937
+/* { dg-options "-matomic-model=soft-imask" } */
4938
+/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1*" "-m2*" } } */
4945
Index: gcc/testsuite/lib/target-supports.exp
4946
===================================================================
4947
--- a/src/gcc/testsuite/lib/target-supports.exp (.../tags/gcc_4_8_3_release)
4948
+++ b/src/gcc/testsuite/lib/target-supports.exp (.../branches/gcc-4_8-branch)
4949
@@ -1790,6 +1790,15 @@
4953
+# Return 1 if the target supports long double of 128 bits,
4956
+proc check_effective_target_longdouble128 { } {
4957
+ return [check_no_compiler_messages longdouble128 object {
4958
+ int dummy[sizeof(long double) == 16 ? 1 : -1];
4962
# Return 1 if the target supports double of 64 bits,
4965
@@ -5329,3 +5338,40 @@
4970
+# Return 1 if <fenv.h> is available with all the standard IEEE
4971
+# exceptions and floating-point exceptions are raised by arithmetic
4972
+# operations. (If the target requires special options for "inexact"
4973
+# exceptions, those need to be specified in the testcases.)
4975
+proc check_effective_target_fenv_exceptions {} {
4976
+ return [check_runtime fenv_exceptions {
4978
+ #include <stdlib.h>
4979
+ #ifndef FE_DIVBYZERO
4980
+ # error Missing FE_DIVBYZERO
4982
+ #ifndef FE_INEXACT
4983
+ # error Missing FE_INEXACT
4985
+ #ifndef FE_INVALID
4986
+ # error Missing FE_INVALID
4988
+ #ifndef FE_OVERFLOW
4989
+ # error Missing FE_OVERFLOW
4991
+ #ifndef FE_UNDERFLOW
4992
+ # error Missing FE_UNDERFLOW
4994
+ volatile float a = 0.0f, r;
4999
+ if (fetestexcept (FE_INVALID))
5006
Index: gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
5007
===================================================================
5008
--- a/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../tags/gcc_4_8_3_release)
5009
+++ b/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../branches/gcc-4_8-branch)
5011
! { dg-require-effective-target fortran_large_real }
5012
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
5013
-! Test XFAILed on these platforms because the system's printf() lacks
5014
+! { dg-do run { xfail powerpc*-apple-darwin* } }
5015
+! Test XFAILed on this platform because the system's printf() lacks
5016
! proper support for denormalized long doubles. See PR24685
5018
! This tests that the default formats for formatted I/O of reals are
5019
Index: gcc/testsuite/gfortran.dg/dot_product_3.f90
5020
===================================================================
5021
--- a/src/gcc/testsuite/gfortran.dg/dot_product_3.f90 (.../tags/gcc_4_8_3_release)
5022
+++ b/src/gcc/testsuite/gfortran.dg/dot_product_3.f90 (.../branches/gcc-4_8-branch)
5024
+! { dg-do compile }
5025
+! { dg-options "-fdump-tree-original" }
5026
+! PR 61999 - this used to ICE.
5027
+! Original test case by A. Kasahara
5029
+ use, intrinsic:: iso_fortran_env, only: output_unit
5033
+ write(output_unit, *) dot_product([1, 2], [2.0, 3.0])
5037
+! { dg-final { scan-tree-dump-times "8\\.0e\\+0" 1 "original" } }
5038
+! { dg-final { cleanup-tree-dump "original" } }
5039
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90
5040
===================================================================
5041
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 (.../tags/gcc_4_8_3_release)
5042
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 (.../branches/gcc-4_8-branch)
5045
+! { dg-do compile }
5046
+! { dg-options "-fopenmp" }
5049
+ integer, parameter :: p(2) = (/ 11, 12 /)
5052
+ !$omp parallel do default(none)
5057
Index: gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90
5058
===================================================================
5059
--- a/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 (.../tags/gcc_4_8_3_release)
5060
+++ b/src/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 (.../branches/gcc-4_8-branch)
5063
+! { dg-do compile }
5064
+! { dg-options "-fopenmp" }
5068
+ integer :: s1, s2, s3
5071
+ type(t), parameter :: u = t(1, 2, 3)
5073
+ !$omp parallel do default(none)
5078
Index: gcc/testsuite/gfortran.dg/cray_pointers_10.f90
5079
===================================================================
5080
--- a/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../tags/gcc_4_8_3_release)
5081
+++ b/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../branches/gcc-4_8-branch)
5084
+! { dg-options "-fcray-pointer" }
5099
+ if (z /= 42) call abort
5101
Index: gcc/testsuite/gfortran.dg/dependency_44.f90
5102
===================================================================
5103
--- a/src/gcc/testsuite/gfortran.dg/dependency_44.f90 (.../tags/gcc_4_8_3_release)
5104
+++ b/src/gcc/testsuite/gfortran.dg/dependency_44.f90 (.../branches/gcc-4_8-branch)
5107
+! Tests fix for PR61780 in which the loop reversal mechanism was
5108
+! not accounting for the first index being an element so that no
5109
+! loop in this dimension is created.
5111
+! Contributed by Manfred Tietze on clf.
5115
+ integer, parameter :: n = 10, k = 3
5117
+ integer, dimension(n,n) :: y
5118
+ integer :: res1(n), res2(n)
5131
+ y(k,4:n) = y(k,3:n-1)
5135
+ y(k,n:4:-1) = y(k,n-1:3:-1)
5140
+ if (any(res1 /= res2)) call abort ()
5142
Index: gcc/testsuite/gfortran.dg/oldstyle_5.f
5143
===================================================================
5144
--- a/src/gcc/testsuite/gfortran.dg/oldstyle_5.f (.../tags/gcc_4_8_3_release)
5145
+++ b/src/gcc/testsuite/gfortran.dg/oldstyle_5.f (.../branches/gcc-4_8-branch)
5147
+C { dg-do compile }
5149
+ INTEGER A(2)/1,2/ ! { dg-error "Invalid old style initialization for derived type component" }
5152
+ INTEGER B/1/ ! { dg-error "Invalid old style initialization for derived type component" }
5155
Index: gcc/testsuite/gfortran.dg/nint_2.f90
5156
===================================================================
5157
--- a/src/gcc/testsuite/gfortran.dg/nint_2.f90 (.../tags/gcc_4_8_3_release)
5158
+++ b/src/gcc/testsuite/gfortran.dg/nint_2.f90 (.../branches/gcc-4_8-branch)
5160
! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
5163
-! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc*-*-linux* *-*-mingw* } { "-O0" } { "" } }
5164
+! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc-*-linux* powerpc64-*-linux* *-*-mingw* } { "-O0" } { "" } }
5165
+! Note that this doesn't fail on powerpc64le-*-linux*.
5167
integer(kind=8) :: i1, i2
5169
Index: gcc/testsuite/gfortran.dg/pointer_intent_7.f90
5170
===================================================================
5171
--- a/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90 (.../tags/gcc_4_8_3_release)
5172
+++ b/src/gcc/testsuite/gfortran.dg/pointer_intent_7.f90 (.../branches/gcc-4_8-branch)
5176
call bar2p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
5177
- call bar3p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
5178
+ call bar3p (b) ! { dg-error "Actual argument to .n. at \\(1\\) must be polymorphic" }
5179
call bar2p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
5180
call bar3p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
5182
Index: gcc/testsuite/gfortran.dg/array_assignment_5.f90
5183
===================================================================
5184
--- a/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90 (.../tags/gcc_4_8_3_release)
5185
+++ b/src/gcc/testsuite/gfortran.dg/array_assignment_5.f90 (.../branches/gcc-4_8-branch)
5188
+! { dg-options "-ffrontend-optimize" }
5189
+! PR 62214 - this used to give the wrong result.
5190
+! Original test case by Oliver Fuhrer
5193
+ CHARACTER(LEN=20) :: fullNames(2)
5194
+ CHARACTER(LEN=255) :: pathName
5195
+ CHARACTER(LEN=5) :: fileNames(2)
5197
+ pathName = "/dir1/dir2/"
5198
+ fileNames = (/ "file1", "file2" /)
5199
+ fullNames = SPREAD(TRIM(pathName),1,2) // fileNames
5200
+ if (fullNames(1) /= '/dir1/dir2/file1' .or. &
5201
+ & fullnames(2) /= '/dir1/dir2/file2') call abort
5203
Index: gcc/testsuite/gfortran.dg/pr45636.f90
5204
===================================================================
5205
--- a/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../tags/gcc_4_8_3_release)
5206
+++ b/src/gcc/testsuite/gfortran.dg/pr45636.f90 (.../branches/gcc-4_8-branch)
5211
-! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { mips*-*-* && { ! nomips16 } } } } }
5212
+! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { { hppa*-*-* && { ! lp64 } } || { mips*-*-* && { ! nomips16 } } } } } }
5213
! { dg-final { cleanup-tree-dump "forwprop2" } }
5214
Index: gcc/testsuite/gfortran.dg/allocatable_function_8.f90
5215
===================================================================
5216
--- a/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../tags/gcc_4_8_3_release)
5217
+++ b/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../branches/gcc-4_8-branch)
5220
+! Test the fix for PR61459.
5222
+! Contributed by John Wingate <johnww@tds.net>
5228
+ public :: f_segfault, f_segfault_plus, f_workaround
5229
+ integer, dimension(2,2) :: b = reshape([1,-1,1,1],[2,2])
5233
+ function f_segfault(x)
5234
+ real, dimension(:), allocatable :: f_segfault
5235
+ real, dimension(:), intent(in) :: x
5236
+ allocate(f_segfault(2))
5237
+ f_segfault = matmul(b,x)
5238
+ end function f_segfault
5240
+! Sefaulted without the ALLOCATE as well.
5241
+ function f_segfault_plus(x)
5242
+ real, dimension(:), allocatable :: f_segfault_plus
5243
+ real, dimension(:), intent(in) :: x
5244
+ f_segfault_plus = matmul(b,x)
5245
+ end function f_segfault_plus
5247
+ function f_workaround(x)
5248
+ real, dimension(:), allocatable :: f_workaround
5249
+ real, dimension(:), intent(in) :: x
5250
+ real, dimension(:), allocatable :: tmp
5251
+ allocate(f_workaround(2),tmp(2))
5253
+ f_workaround = tmp
5254
+ end function f_workaround
5261
+ real, dimension(2) :: x = 1.0, y
5262
+ y = f_workaround (x)
5263
+ if (any (f_segfault (x) .ne. y)) call abort
5264
+ if (any (f_segfault_plus (x) .ne. y)) call abort
5266
Index: gcc/testsuite/gfortran.dg/bessel_7.f90
5267
===================================================================
5268
--- a/src/gcc/testsuite/gfortran.dg/bessel_7.f90 (.../tags/gcc_4_8_3_release)
5269
+++ b/src/gcc/testsuite/gfortran.dg/bessel_7.f90 (.../branches/gcc-4_8-branch)
5272
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]
5273
real,parameter :: myeps(size(values)) = epsilon(0.0) &
5274
- * [2, 3, 4, 5, 8, 2, 12, 6, 7, 6, 36, 168 ]
5275
+ * [2, 3, 4, 5, 8, 2, 13, 6, 7, 6, 36, 168 ]
5276
! The following is sufficient for me - the values above are a bit
5278
! * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]
5279
Index: gcc/testsuite/gcc.c-torture/execute/pr63659.c
5280
===================================================================
5281
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr63659.c (.../tags/gcc_4_8_3_release)
5282
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr63659.c (.../branches/gcc-4_8-branch)
5284
+/* PR rtl-optimization/63659 */
5286
+int a, b, c, *d = &b, g, h, i;
5295
+ for (a = 0; a; a++)
5302
+ char j = c, k = -1, l;
5304
+ f = l == 0 ? k : k % l;
5309
+ __builtin_abort ();
5313
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
5314
===================================================================
5315
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../tags/gcc_4_8_3_release)
5316
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../branches/gcc-4_8-branch)
5318
+#ifdef __INT32_TYPE__
5319
+typedef __INT32_TYPE__ int32_t;
5321
+typedef int int32_t;
5324
+#ifdef __UINT32_TYPE__
5325
+typedef __UINT32_TYPE__ uint32_t;
5327
+typedef unsigned uint32_t;
5330
+#define __fake_const_swab32(x) ((uint32_t)( \
5331
+ (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
5332
+ (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
5333
+ (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
5334
+ (( (int32_t)(x) & (int32_t)0xff000000UL) >> 24)))
5336
+/* Previous version of bswap optimization failed to consider sign extension
5337
+ and as a result would replace an expression *not* doing a bswap by a
5340
+__attribute__ ((noinline, noclone)) uint32_t
5341
+fake_bswap32 (uint32_t in)
5343
+ return __fake_const_swab32 (in);
5349
+ if (sizeof (int32_t) * __CHAR_BIT__ != 32)
5351
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
5353
+ if (fake_bswap32 (0x87654321) != 0xffffff87)
5354
+ __builtin_abort ();
5357
Index: gcc/testsuite/gcc.c-torture/execute/pr23135.x
5358
===================================================================
5359
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../tags/gcc_4_8_3_release)
5360
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr23135.x (.../branches/gcc-4_8-branch)
5362
+set additional_flags "-Wno-psabi"
5364
Index: gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
5365
===================================================================
5366
--- a/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c (.../tags/gcc_4_8_3_release)
5367
+++ b/src/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c (.../branches/gcc-4_8-branch)
5375
+static union U u = { 0x12345678 };
5377
+/* Constant folding used to fail to account for endianness when folding a
5383
+#ifdef __BYTE_ORDER__
5384
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
5385
+ return u.b - 0x45678;
5387
+ return u.b - 0x12345;
5392
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
5393
===================================================================
5394
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../tags/gcc_4_8_3_release)
5395
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../branches/gcc-4_8-branch)
5407
+ __builtin_abort ();
5410
Index: gcc/testsuite/gcc.c-torture/execute/20050604-1.x
5411
===================================================================
5412
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x (.../tags/gcc_4_8_3_release)
5413
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050604-1.x (.../branches/gcc-4_8-branch)
5415
set additional_flags "-mno-mmx"
5418
+set additional_flags "-Wno-psabi"
5420
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
5421
===================================================================
5422
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../tags/gcc_4_8_3_release)
5423
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../branches/gcc-4_8-branch)
5425
+#ifdef __INT16_TYPE__
5426
+typedef __INT16_TYPE__ int16_t;
5428
+typedef short int16_t;
5431
+#ifdef __UINT32_TYPE__
5432
+typedef __UINT32_TYPE__ uint32_t;
5434
+typedef unsigned uint32_t;
5437
+#define __fake_const_swab32(x) ((uint32_t)( \
5438
+ (((uint32_t) (x) & (uint32_t)0x000000ffUL) << 24) | \
5439
+ (((uint32_t)(int16_t)(x) & (uint32_t)0x00ffff00UL) << 8) | \
5440
+ (((uint32_t) (x) & (uint32_t)0x00ff0000UL) >> 8) | \
5441
+ (((uint32_t) (x) & (uint32_t)0xff000000UL) >> 24)))
5444
+/* Previous version of bswap optimization failed to consider sign extension
5445
+ and as a result would replace an expression *not* doing a bswap by a
5448
+__attribute__ ((noinline, noclone)) uint32_t
5449
+fake_bswap32 (uint32_t in)
5451
+ return __fake_const_swab32 (in);
5457
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
5459
+ if (sizeof (int16_t) * __CHAR_BIT__ != 16)
5461
+ if (fake_bswap32 (0x81828384) != 0xff838281)
5462
+ __builtin_abort ();
5465
Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c
5466
===================================================================
5467
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../tags/gcc_4_8_3_release)
5468
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61375.c (.../branches/gcc-4_8-branch)
5470
+#ifdef __UINT64_TYPE__
5471
+typedef __UINT64_TYPE__ uint64_t;
5473
+typedef unsigned long long uint64_t;
5476
+#ifndef __SIZEOF_INT128__
5477
+#define __int128 long long
5480
+/* Some version of bswap optimization would ICE when analyzing a mask constant
5481
+ too big for an HOST_WIDE_INT (PR61375). */
5483
+__attribute__ ((noinline, noclone)) uint64_t
5484
+uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2)
5486
+ __int128 mask = (__int128)0xffff << 56;
5487
+ return ((in1 & mask) >> 56) | in2;
5494
+#ifdef __SIZEOF_INT128__
5497
+ if (sizeof (uint64_t) * __CHAR_BIT__ != 64)
5499
+ if (sizeof (unsigned __int128) * __CHAR_BIT__ != 128)
5501
+ if (uint128_central_bitsi_ior (in, 2) != 0x102)
5502
+ __builtin_abort ();
5505
Index: gcc/testsuite/gcc.c-torture/execute/20050316-1.x
5506
===================================================================
5507
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x (.../tags/gcc_4_8_3_release)
5508
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-1.x (.../branches/gcc-4_8-branch)
5513
+set additional_flags "-Wno-psabi"
5515
Index: gcc/testsuite/gcc.c-torture/execute/20050316-3.x
5516
===================================================================
5517
--- a/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x (.../tags/gcc_4_8_3_release)
5518
+++ b/src/gcc/testsuite/gcc.c-torture/execute/20050316-3.x (.../branches/gcc-4_8-branch)
5520
+set additional_flags "-Wno-psabi"
5522
Index: gcc/testsuite/gcc.c-torture/compile/pr61684.c
5523
===================================================================
5524
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../tags/gcc_4_8_3_release)
5525
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../branches/gcc-4_8-branch)
5527
+/* PR tree-optimization/61684 */
5532
+static short **e = 0;
5537
+ for (; c < 1; c++)
5540
+ a = d && (c && 1) & *b;
5542
Index: gcc/testsuite/gcc.c-torture/compile/pr64067.c
5543
===================================================================
5544
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr64067.c (.../tags/gcc_4_8_3_release)
5545
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr64067.c (.../branches/gcc-4_8-branch)
5547
+/* PR middle-end/64067 */
5549
+struct S { int s; };
5550
+int *const v[1] = { &((struct S) { .s = 42 }).s };
5557
Index: gcc/testsuite/gcc.c-torture/compile/pr63282.c
5558
===================================================================
5559
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../tags/gcc_4_8_3_release)
5560
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr63282.c (.../branches/gcc-4_8-branch)
5562
+/* PR inline-asm/63282 */
5569
+ asm volatile goto ("" : : : : a, b);
5575
Index: gcc/testsuite/gnat.dg/opt41_pkg.adb
5576
===================================================================
5577
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.adb (.../tags/gcc_4_8_3_release)
5578
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.adb (.../branches/gcc-4_8-branch)
5580
+with Ada.Streams; use Ada.Streams;
5582
+package body Opt41_Pkg is
5584
+ type Wstream is new Root_Stream_Type with record
5585
+ S : Unbounded_String;
5588
+ procedure Read (Stream : in out Wstream;
5589
+ Item : out Stream_Element_Array;
5590
+ Last : out Stream_Element_Offset) is null;
5592
+ procedure Write (Stream : in out Wstream; Item : Stream_Element_Array) is
5594
+ for J in Item'Range loop
5595
+ Append (Stream.S, Character'Val (Item (J)));
5599
+ function Rec_Write (R : Rec) return Unbounded_String is
5600
+ S : aliased Wstream;
5602
+ Rec'Output (S'Access, R);
5606
+ type Rstream is new Root_Stream_Type with record
5607
+ S : String_Access;
5608
+ Idx : Integer := 1;
5611
+ procedure Write (Stream : in out Rstream; Item : Stream_Element_Array) is null;
5613
+ procedure Read (Stream : in out Rstream;
5614
+ Item : out Stream_Element_Array;
5615
+ Last : out Stream_Element_Offset) is
5617
+ Last := Stream_Element_Offset'Min
5618
+ (Item'Last, Item'First + Stream_Element_Offset (Stream.S'Last - Stream.Idx));
5619
+ for I in Item'First .. Last loop
5620
+ Item (I) := Stream_Element (Character'Pos (Stream.S (Stream.Idx)));
5621
+ Stream.Idx := Stream.Idx + 1;
5625
+ function Rec_Read (Str : String_Access) return Rec is
5626
+ S : aliased Rstream;
5629
+ return Rec'Input (S'Access);
5633
Index: gcc/testsuite/gnat.dg/opt41_pkg.ads
5634
===================================================================
5635
--- a/src/gcc/testsuite/gnat.dg/opt41_pkg.ads (.../tags/gcc_4_8_3_release)
5636
+++ b/src/gcc/testsuite/gnat.dg/opt41_pkg.ads (.../branches/gcc-4_8-branch)
5638
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
5640
+package Opt41_Pkg is
5642
+ type Enum is (One, Two, Three, Four, Five, Six);
5644
+ type Rec (D : Enum) is record
5648
+ when Two | Five | Six =>
5649
+ S : Unbounded_String;
5651
+ when Two => B : Boolean;
5652
+ when others => null;
5659
+ type Rec_Ptr is access all Rec;
5661
+ function Rec_Write (R : Rec) return Unbounded_String;
5663
+ function Rec_Read (Str : String_Access) return Rec;
5666
Index: gcc/testsuite/gnat.dg/opt39.adb
5667
===================================================================
5668
--- a/src/gcc/testsuite/gnat.dg/opt39.adb (.../tags/gcc_4_8_3_release)
5669
+++ b/src/gcc/testsuite/gnat.dg/opt39.adb (.../branches/gcc-4_8-branch)
5671
+-- { dg-do compile }
5672
+-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
5674
+procedure Opt39 (I : Integer) is
5676
+ type Rec is record
5684
+ procedure Set (A : access Rec; I : Integer) is
5685
+ Tmp : Rec := A.all;
5694
+ Set (R'Access, I);
5696
+ raise Program_Error;
5700
+-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }
5701
+-- { dg-final { cleanup-tree-dump "optimized" } }
5702
Index: gcc/testsuite/gnat.dg/opt41.adb
5703
===================================================================
5704
--- a/src/gcc/testsuite/gnat.dg/opt41.adb (.../tags/gcc_4_8_3_release)
5705
+++ b/src/gcc/testsuite/gnat.dg/opt41.adb (.../branches/gcc-4_8-branch)
5708
+-- { dg-options "-Os" }
5710
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
5711
+with Opt41_Pkg; use Opt41_Pkg;
5714
+ R : Rec := (Five, To_Unbounded_String ("CONFIG"));
5715
+ SP : String_Access := new String'(To_String (Rec_Write (R)));
5716
+ RP : Rec_Ptr := new Rec'(Rec_Read (SP));
5718
+ if RP.D /= R.D then
5719
+ raise Program_Error;
5722
Index: gcc/testsuite/gnat.dg/overflow_fixed.adb
5723
===================================================================
5724
--- a/src/gcc/testsuite/gnat.dg/overflow_fixed.adb (.../tags/gcc_4_8_3_release)
5725
+++ b/src/gcc/testsuite/gnat.dg/overflow_fixed.adb (.../branches/gcc-4_8-branch)
5728
+-- { dg-options "-gnato -O" }
5730
+procedure Overflow_Fixed is
5732
+ type Unsigned_8_Bit is mod 2**8;
5734
+ procedure Fixed_To_Eight (Value : Duration) is
5735
+ Item : Unsigned_8_Bit;
5737
+ Item := Unsigned_8_Bit(Value);
5738
+ raise Program_Error;
5740
+ when Constraint_Error => null; -- expected case
5744
+ Fixed_To_Eight (-0.5);
5746
Index: gcc/testsuite/gnat.dg/aliasing1.adb
5747
===================================================================
5748
--- a/src/gcc/testsuite/gnat.dg/aliasing1.adb (.../tags/gcc_4_8_3_release)
5749
+++ b/src/gcc/testsuite/gnat.dg/aliasing1.adb (.../branches/gcc-4_8-branch)
5754
--- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
5755
+-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
5756
-- { dg-final { cleanup-tree-dump "optimized" } }
5757
Index: gcc/testsuite/gcc.dg/pr60866.c
5758
===================================================================
5759
--- a/src/gcc/testsuite/gcc.dg/pr60866.c (.../tags/gcc_4_8_3_release)
5760
+++ b/src/gcc/testsuite/gcc.dg/pr60866.c (.../branches/gcc-4_8-branch)
5762
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
5763
+/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns" } */
5768
+foo (int w, int **dnroot, int **dn)
5771
+ int *xchild = xchild;
5772
+ for (; w < n; w++)
5776
+ for (child = *dn; child; child = xchild)
5780
Index: gcc/testsuite/gcc.dg/pr51879-12.c
5781
===================================================================
5782
--- a/src/gcc/testsuite/gcc.dg/pr51879-12.c (.../tags/gcc_4_8_3_release)
5783
+++ b/src/gcc/testsuite/gcc.dg/pr51879-12.c (.../branches/gcc-4_8-branch)
5788
-/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre"} } */
5789
-/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre"} } */
5790
+/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre" { xfail *-*-* } } } */
5791
+/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre" { xfail *-*-* } } } */
5792
/* { dg-final { cleanup-tree-dump "pre" } } */
5793
Index: gcc/testsuite/gcc.dg/vmx/3c-01a.c
5794
===================================================================
5795
--- a/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c (.../tags/gcc_4_8_3_release)
5796
+++ b/src/gcc/testsuite/gcc.dg/vmx/3c-01a.c (.../branches/gcc-4_8-branch)
5798
/* { dg-do compile } */
5799
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
5800
#include <altivec.h>
5801
typedef const volatile unsigned int _1;
5802
typedef const unsigned int _2;
5803
Index: gcc/testsuite/gcc.dg/vmx/ops.c
5804
===================================================================
5805
--- a/src/gcc/testsuite/gcc.dg/vmx/ops.c (.../tags/gcc_4_8_3_release)
5806
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops.c (.../branches/gcc-4_8-branch)
5808
/* { dg-do compile } */
5809
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
5810
#include <altivec.h>
5812
extern char * *var_char_ptr;
5813
Index: gcc/testsuite/gcc.dg/vmx/ops-long-1.c
5814
===================================================================
5815
--- a/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../tags/gcc_4_8_3_release)
5816
+++ b/src/gcc/testsuite/gcc.dg/vmx/ops-long-1.c (.../branches/gcc-4_8-branch)
5818
/* { dg-do compile } */
5819
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
5821
/* Checks from the original ops.c that pass pointers to long or
5822
unsigned long for operations that support that in released versions
5823
Index: gcc/testsuite/gcc.dg/pr63665.c
5824
===================================================================
5825
--- a/src/gcc/testsuite/gcc.dg/pr63665.c (.../tags/gcc_4_8_3_release)
5826
+++ b/src/gcc/testsuite/gcc.dg/pr63665.c (.../branches/gcc-4_8-branch)
5828
+/* { dg-do run } */
5829
+/* { dg-require-effective-target int32plus } */
5830
+/* { dg-options "-O -fno-tree-ccp -fno-tree-fre -fno-tree-copy-prop -fwrapv" } */
5835
+ int y = 0x80000000;
5842
+ if (test5 (0x80000000) != 0)
5843
+ __builtin_abort ();
5846
Index: gcc/testsuite/gcc.dg/pr63342.c
5847
===================================================================
5848
--- a/src/gcc/testsuite/gcc.dg/pr63342.c (.../tags/gcc_4_8_3_release)
5849
+++ b/src/gcc/testsuite/gcc.dg/pr63342.c (.../branches/gcc-4_8-branch)
5851
+/* PR debug/63342 */
5852
+/* { dg-do compile } */
5853
+/* { dg-options "-g -O2" } */
5854
+/* { dg-additional-options "-fpic" { target fpic } } */
5856
+static __thread double u[9], v[9];
5859
+foo (double **p, double **q)
5870
+ for (i = 0; i < 9; i++)
5872
+ double a = x + v[i];
5873
+ s += u[i] * a * a;
5877
Index: gcc/testsuite/gcc.dg/pr63284.c
5878
===================================================================
5879
--- a/src/gcc/testsuite/gcc.dg/pr63284.c (.../tags/gcc_4_8_3_release)
5880
+++ b/src/gcc/testsuite/gcc.dg/pr63284.c (.../branches/gcc-4_8-branch)
5882
+/* PR debug/63284 */
5883
+/* { dg-do compile } */
5884
+/* { dg-options "-O2 -fcompare-debug" } */
5886
+int a[10], *b, *d, c, f;
5924
Index: gcc/testsuite/gcc.dg/pr61045.c
5925
===================================================================
5926
--- a/src/gcc/testsuite/gcc.dg/pr61045.c (.../tags/gcc_4_8_3_release)
5927
+++ b/src/gcc/testsuite/gcc.dg/pr61045.c (.../branches/gcc-4_8-branch)
5929
+/* { dg-do run } */
5930
+/* { dg-options "-fstrict-overflow" } */
5935
+ int b = __INT_MAX__;
5936
+ int t = (a - 2) > (b - 1);
5938
+ __builtin_abort();
5941
Index: gcc/testsuite/gcc.dg/pr62167-run.c
5942
===================================================================
5943
--- a/src/gcc/testsuite/gcc.dg/pr62167-run.c (.../tags/gcc_4_8_3_release)
5944
+++ b/src/gcc/testsuite/gcc.dg/pr62167-run.c (.../branches/gcc-4_8-branch)
5946
+/* { dg-do run } */
5947
+/* { dg-options "-O2 -ftree-tail-merge" } */
5951
+ struct node *next;
5952
+ struct node *prev;
5959
+ struct node *first;
5962
+struct head heads[5];
5966
+struct head *head = &heads[2];
5973
+ node.next = (void*)0;
5975
+ node.prev = (void *)head;
5977
+ head->first = &node;
5979
+ struct node *n = head->first;
5981
+ struct head *h = &heads[k];
5983
+ heads[2].first = n->next;
5985
+ if ((void*)n->prev == (void *)h)
5988
+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
5989
+ p = n->prev->next;
5991
+ return !(p == (void*)0);
5993
Index: gcc/testsuite/gcc.dg/pr52769.c
5994
===================================================================
5995
--- a/src/gcc/testsuite/gcc.dg/pr52769.c (.../tags/gcc_4_8_3_release)
5996
+++ b/src/gcc/testsuite/gcc.dg/pr52769.c (.../branches/gcc-4_8-branch)
5999
+/* { dg-do run } */
6000
+/* { dg-options "-O3" } */
6004
+ int should_be_zero;
6012
+ volatile foo_t foo = {
6017
+ if (foo.should_be_zero != 0)
6018
+ __builtin_abort ();
6022
Index: gcc/testsuite/gcc.dg/pr62167.c
6023
===================================================================
6024
--- a/src/gcc/testsuite/gcc.dg/pr62167.c (.../tags/gcc_4_8_3_release)
6025
+++ b/src/gcc/testsuite/gcc.dg/pr62167.c (.../branches/gcc-4_8-branch)
6027
+/* { dg-do compile } */
6028
+/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */
6032
+ struct node *next;
6033
+ struct node *prev;
6040
+ struct node *first;
6043
+struct head heads[5];
6047
+struct head *head = &heads[2];
6054
+ node.next = (void*)0;
6056
+ node.prev = (void *)head;
6058
+ head->first = &node;
6060
+ struct node *n = head->first;
6062
+ struct head *h = &heads[k];
6064
+ heads[2].first = n->next;
6066
+ if ((void*)n->prev == (void *)h)
6069
+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
6070
+ p = n->prev->next;
6072
+ return !(p == (void*)0);
6075
+/* { dg-final { scan-tree-dump-not "Removing basic block" "pre"} } */
6076
+/* { dg-final { cleanup-tree-dump "pre" } } */
6077
Index: gcc/testsuite/gcc.dg/pr62004.c
6078
===================================================================
6079
--- a/src/gcc/testsuite/gcc.dg/pr62004.c (.../tags/gcc_4_8_3_release)
6080
+++ b/src/gcc/testsuite/gcc.dg/pr62004.c (.../branches/gcc-4_8-branch)
6082
+/* { dg-do run } */
6083
+/* { dg-options "-O2 -fno-tree-tail-merge" } */
6087
+ struct node *next;
6088
+ struct node *prev;
6095
+ struct node *first;
6098
+struct head heads[5];
6102
+struct head *head = &heads[2];
6109
+ node.next = (void*)0;
6111
+ node.prev = (void *)head;
6113
+ head->first = &node;
6115
+ struct node *n = head->first;
6117
+ struct head *h = &heads[k];
6119
+ heads[2].first = n->next;
6121
+ if ((void*)n->prev == (void *)h)
6124
+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
6125
+ p = n->prev->next;
6127
+ return !(p == (void*)0);
6129
Index: gcc/testsuite/gcc.dg/pr51879-18.c
6130
===================================================================
6131
--- a/src/gcc/testsuite/gcc.dg/pr51879-18.c (.../tags/gcc_4_8_3_release)
6132
+++ b/src/gcc/testsuite/gcc.dg/pr51879-18.c (.../branches/gcc-4_8-branch)
6137
-/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */
6138
+/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre" { xfail *-*-* } } } */
6139
/* { dg-final { cleanup-tree-dump "pre" } } */
6140
Index: gcc/testsuite/gcc.dg/torture/pr61964.c
6141
===================================================================
6142
--- a/src/gcc/testsuite/gcc.dg/torture/pr61964.c (.../tags/gcc_4_8_3_release)
6143
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61964.c (.../branches/gcc-4_8-branch)
6145
+/* { dg-do run } */
6147
+extern void abort (void);
6149
+struct node { struct node *next, *prev; } node;
6150
+struct head { struct node *first; } heads[5];
6152
+struct head *head = &heads[2];
6154
+static int __attribute__((noinline))
6157
+ node.prev = (void *)head;
6158
+ head->first = &node;
6160
+ struct node *n = head->first;
6161
+ struct head *h = &heads[k];
6163
+ if (n->prev == (void *)h)
6164
+ h->first = n->next;
6166
+ n->prev->next = n->next;
6168
+ n->next = h->first;
6169
+ return n->next == &node;
6178
Index: gcc/testsuite/gcc.dg/torture/pr61010.c
6179
===================================================================
6180
--- a/src/gcc/testsuite/gcc.dg/torture/pr61010.c (.../tags/gcc_4_8_3_release)
6181
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61010.c (.../branches/gcc-4_8-branch)
6183
+/* { dg-do compile } */
6188
+ unsigned b = (a * 64 & 192) | 63U;
6191
Index: gcc/testsuite/gcc.dg/torture/pr61452.c
6192
===================================================================
6193
--- a/src/gcc/testsuite/gcc.dg/torture/pr61452.c (.../tags/gcc_4_8_3_release)
6194
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61452.c (.../branches/gcc-4_8-branch)
6196
+/* { dg-do run } */
6203
+fn1 (int p1, char p2)
6205
+ return p1 || p2 ? 0 : p2;
6216
+ b = fn1 (g = d = e, g);
6227
Index: gcc/testsuite/gcc.dg/torture/pr61383-1.c
6228
===================================================================
6229
--- a/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../tags/gcc_4_8_3_release)
6230
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../branches/gcc-4_8-branch)
6232
+/* { dg-do run } */
6234
+int a, b = 1, c, d, e, f, g;
6243
+ g = g ? 0 : 1 % g;
6245
+ for (; d < 1; d = e)
6267
Index: gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
6268
===================================================================
6269
--- a/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c (.../tags/gcc_4_8_3_release)
6270
+++ b/src/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c (.../branches/gcc-4_8-branch)
6272
+/* Test that exact underflow in __float128 signals the underflow
6273
+ exception if trapping is enabled, but does not raise the flag
6276
+/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* } } */
6277
+/* { dg-options "-D_GNU_SOURCE" } */
6278
+/* { dg-require-effective-target fenv_exceptions } */
6281
+#include <setjmp.h>
6282
+#include <signal.h>
6283
+#include <stdlib.h>
6285
+volatile sig_atomic_t caught_sigfpe;
6289
+handle_sigfpe (int sig)
6291
+ caught_sigfpe = 1;
6292
+ siglongjmp (buf, 1);
6298
+ volatile __float128 a = 0x1p-16382q, b = 0x1p-2q;
6299
+ volatile __float128 r;
6301
+ if (fetestexcept (FE_UNDERFLOW))
6303
+ if (r != 0x1p-16384q)
6305
+ feenableexcept (FE_UNDERFLOW);
6306
+ signal (SIGFPE, handle_sigfpe);
6307
+ if (sigsetjmp (buf, 1) == 0)
6309
+ if (!caught_sigfpe)
6313
Index: gcc/testsuite/gcc.dg/torture/pr62031.c
6314
===================================================================
6315
--- a/src/gcc/testsuite/gcc.dg/torture/pr62031.c (.../tags/gcc_4_8_3_release)
6316
+++ b/src/gcc/testsuite/gcc.dg/torture/pr62031.c (.../branches/gcc-4_8-branch)
6318
+/* { dg-do run } */
6320
+#include <stdlib.h>
6322
+#define NUM_OF_STATES 4
6323
+typedef unsigned int entry_t[2];
6324
+typedef struct entries_item { entry_t metricEntries_[0]; } entries_item_t;
6326
+void __attribute__((noinline,noclone))
6327
+test_00(size_t numOfStates, entries_item_t* p_bm,
6328
+ const unsigned int* polyArray,
6329
+ size_t polyArraySize)
6332
+ unsigned int hlp0, hlp1;
6333
+ for (idx = 0; idx < numOfStates; ++idx)
6337
+ hlp0 = (idx << 1) | 0x00;
6338
+ hlp1 = (idx << 1) | 0x01;
6339
+ p_bm->metricEntries_[idx][0] = 0;
6340
+ p_bm->metricEntries_[idx][1] = 0;
6341
+ for (idy = 0; idy < polyArraySize; ++idy)
6343
+ p_bm->metricEntries_[idx][0]
6344
+ |= __builtin_parity(hlp0 & polyArray[idy]) << idy;
6345
+ p_bm->metricEntries_[idx][1]
6346
+ |= __builtin_parity(hlp1 & polyArray[idy]) << idy;
6353
+ unsigned int polyArray[] = { 0x07, 0x05 };
6354
+ entries_item_t* pBranchMetrics;
6355
+ pBranchMetrics = malloc(sizeof(entry_t) * NUM_OF_STATES);
6356
+ test_00(NUM_OF_STATES, pBranchMetrics, polyArray,
6357
+ sizeof(polyArray) / sizeof(polyArray[0]));
6358
+ if (pBranchMetrics->metricEntries_[0][0] != 0
6359
+ || pBranchMetrics->metricEntries_[0][1] != 3
6360
+ || pBranchMetrics->metricEntries_[1][0] != 1
6361
+ || pBranchMetrics->metricEntries_[1][1] != 2
6362
+ || pBranchMetrics->metricEntries_[2][0] != 3
6363
+ || pBranchMetrics->metricEntries_[2][1] != 0
6364
+ || pBranchMetrics->metricEntries_[3][0] != 2
6365
+ || pBranchMetrics->metricEntries_[3][1] != 1)
6367
+ free(pBranchMetrics);
6370
Index: gcc/testsuite/gcc.dg/torture/vshuf-4.inc
6371
===================================================================
6372
--- a/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc (.../tags/gcc_4_8_3_release)
6373
+++ b/src/gcc/testsuite/gcc.dg/torture/vshuf-4.inc (.../branches/gcc-4_8-branch)
6375
T (20, 0, 4, 1, 5) \
6376
T (21, 2, 6, 3, 7) \
6377
T (22, 1, 2, 3, 0) \
6379
+T (23, 2, 1, 0, 3) \
6382
T (116, 1, 2, 4, 3) \
6383
T (117, 7, 3, 3, 0) \
6385
T (119, 0, 3, 5, 6) \
6386
T (120, 0, 0, 1, 5) \
6387
T (121, 4, 6, 2, 1) \
6388
-T (122, 2, 5, 6, 3) \
6389
T (123, 4, 6, 3, 2) \
6390
T (124, 4, 7, 5, 6) \
6391
T (125, 0, 4, 2, 4) \
6392
Index: gcc/testsuite/gcc.dg/stack-usage-2.c
6393
===================================================================
6394
--- a/src/gcc/testsuite/gcc.dg/stack-usage-2.c (.../tags/gcc_4_8_3_release)
6395
+++ b/src/gcc/testsuite/gcc.dg/stack-usage-2.c (.../branches/gcc-4_8-branch)
6397
/* { dg-do compile } */
6398
/* { dg-options "-Wstack-usage=512" } */
6401
+int foo1 (void) /* { dg-bogus "stack usage" } */
6406
-} /* { dg-bogus "stack usage" } */
6410
+int foo2 (void) /* { dg-warning "stack usage is \[0-9\]* bytes" } */
6415
-} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
6419
+int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
6421
char arr[1024] __attribute__((aligned (512)));
6424
/* Force dynamic realignment of argument pointer. */
6425
__builtin_apply ((void (*)()) foo2, 0, 0);
6429
-} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
6432
+int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
6437
-} /* { dg-warning "stack usage might be unbounded" } */
6439
Index: gcc/testsuite/gcc.dg/ipa/pr61986.c
6440
===================================================================
6441
--- a/src/gcc/testsuite/gcc.dg/ipa/pr61986.c (.../tags/gcc_4_8_3_release)
6442
+++ b/src/gcc/testsuite/gcc.dg/ipa/pr61986.c (.../branches/gcc-4_8-branch)
6444
+/* { dg-do compile } */
6445
+/* { dg-options "-O3" } */
6455
+static int fn2 (struct S);
6456
+void fn3 (struct S);
6461
+ struct S h = { 0, 0 };
6469
+ struct S j = { 0, 0 };
6488
+ struct S f = { 0, 0 };
6492
Index: gcc/testsuite/gcc.dg/pr62030.c
6493
===================================================================
6494
--- a/src/gcc/testsuite/gcc.dg/pr62030.c (.../tags/gcc_4_8_3_release)
6495
+++ b/src/gcc/testsuite/gcc.dg/pr62030.c (.../branches/gcc-4_8-branch)
6497
+/* { dg-do run } */
6498
+/* { dg-options "-O2" } */
6500
+extern void abort (void);
6504
+ struct node *next;
6505
+ struct node *prev;
6512
+ struct node *first;
6515
+struct head heads[5];
6519
+struct head *head = &heads[2];
6521
+static int __attribute__((noinline))
6524
+ node.prev = (void *)head;
6525
+ head->first = &node;
6527
+ struct node *n = head->first;
6528
+ struct head *h = &heads[k];
6529
+ struct node *next = n->next;
6531
+ if (n->prev == (void *)h)
6534
+ n->prev->next = next;
6536
+ n->next = h->first;
6537
+ return n->next == &node;
6547
Index: gcc/testsuite/gcc.dg/vect/pr63341-2.c
6548
===================================================================
6549
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../tags/gcc_4_8_3_release)
6550
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-2.c (.../branches/gcc-4_8-branch)
6552
+/* PR tree-optimization/63341 */
6553
+/* { dg-do run } */
6555
+#include "tree-vect.h"
6557
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
6558
+struct S { char e __attribute__((aligned (64))); U s[32]; };
6559
+struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
6560
+ {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
6561
+ {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
6562
+ {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
6563
+unsigned short d[32] = { 1 };
6565
+__attribute__((noinline, noclone)) void
6569
+ for (i = 0; i < 32; i++)
6570
+ d[i] = t.s[i].s + 4;
6571
+ for (i = 0; i < 32; i++)
6572
+ if (d[i] != t.s[i].s + 4)
6575
+ asm volatile ("" : : : "memory");
6586
+/* { dg-final { cleanup-tree-dump "vect" } } */
6587
Index: gcc/testsuite/gcc.dg/vect/pr63189.c
6588
===================================================================
6589
--- a/src/gcc/testsuite/gcc.dg/vect/pr63189.c (.../tags/gcc_4_8_3_release)
6590
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63189.c (.../branches/gcc-4_8-branch)
6592
+/* PR tree-optimization/63189 */
6593
+/* { dg-do run } */
6595
+#include "tree-vect.h"
6597
+short int d[16] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
6599
+__attribute__((noinline, noclone)) void
6603
+ for (j = 0; j < 8; j++)
6617
+/* { dg-final { cleanup-tree-dump "vect" } } */
6618
Index: gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c
6619
===================================================================
6620
--- a/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c (.../tags/gcc_4_8_3_release)
6621
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c (.../branches/gcc-4_8-branch)
6623
+/* { dg-require-effective-target vect_int } */
6625
+#include <stdarg.h>
6626
+#include "tree-vect.h"
6631
+signed short X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
6632
+signed int Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
6634
+/* (short, int)->int->int dot product.
6635
+ Not detected as a dot-product pattern. */
6637
+__attribute__ ((noinline)) int
6643
+ for (i = 0; i < len; i++)
6645
+ result += (X[i] * Y[i]);
6651
+/* (int, short)->int->int dot product.
6652
+ Not detected as a dot-product pattern. */
6654
+__attribute__ ((noinline)) int
6660
+ for (i = 0; i < len; i++)
6662
+ result += (Y[i] * X[i]);
6675
+ for (i = 0; i < N; i++)
6679
+ __asm__ volatile ("");
6693
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
6694
+/* { dg-final { cleanup-tree-dump "vect" } } */
6696
Index: gcc/testsuite/gcc.dg/vect/pr63379.c
6697
===================================================================
6698
--- a/src/gcc/testsuite/gcc.dg/vect/pr63379.c (.../tags/gcc_4_8_3_release)
6699
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63379.c (.../branches/gcc-4_8-branch)
6701
+/* PR tree-optimization/63379 */
6702
+/* { dg-do run } */
6704
+#include "tree-vect.h"
6706
+extern void abort (void);
6713
+Point pt_array[25];
6715
+void __attribute__((noinline,noclone))
6716
+generate_array(void)
6719
+ for (i = 0; i<25; i++)
6721
+ pt_array[i].x = i;
6722
+ pt_array[i].y = 1000+i;
6729
+ generate_array ();
6730
+ Point min_pt = pt_array[0];
6731
+ Point *ptr, *ptr_end;
6732
+ for (ptr = pt_array+1, ptr_end = pt_array+25; ptr != ptr_end; ++ptr)
6734
+ min_pt.x = (min_pt.x < ptr->x) ? min_pt.x : ptr->x;
6735
+ min_pt.y = (min_pt.y < ptr->y) ? min_pt.y : ptr->y;
6738
+ if (min_pt.x != 0 || min_pt.y != 1000)
6743
+/* { dg-final { cleanup-tree-dump "vect" } } */
6744
Index: gcc/testsuite/gcc.dg/vect/pr62073.c
6745
===================================================================
6746
--- a/src/gcc/testsuite/gcc.dg/vect/pr62073.c (.../tags/gcc_4_8_3_release)
6747
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62073.c (.../branches/gcc-4_8-branch)
6749
+/* { dg-do compile } */
6750
+/* { dg-additional-options "-O1" } */
6760
+int foo (long long p_56, int * p_57)
6767
+ int **l_78 = &l_77;
6772
+ for (g_76 = 1; g_76 >= 0; g_76--)
6775
+ for (l_101 = 4; l_101 >= 0; l_101--)
6780
+ int **l_113 = &l_77;
6788
+/* { dg-final { cleanup-tree-dump "vect" } } */
6789
Index: gcc/testsuite/gcc.dg/vect/pr60196-1.c
6790
===================================================================
6791
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../tags/gcc_4_8_3_release)
6792
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-1.c (.../branches/gcc-4_8-branch)
6794
+/* PR tree-optimization/63189 */
6795
+/* { dg-additional-options "-fwrapv" } */
6796
+/* { dg-do run } */
6798
+#include "tree-vect.h"
6800
+__attribute__((noinline, noclone)) static int
6801
+bar (const short *a, int len)
6806
+ for (x = 0; x < len; x++)
6811
+__attribute__((noinline, noclone)) void
6814
+ short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
6815
+ if (bar (stuff, 9) != 36)
6827
+/* { dg-final { cleanup-tree-dump "vect" } } */
6828
Index: gcc/testsuite/gcc.dg/vect/pr62075.c
6829
===================================================================
6830
--- a/src/gcc/testsuite/gcc.dg/vect/pr62075.c (.../tags/gcc_4_8_3_release)
6831
+++ b/src/gcc/testsuite/gcc.dg/vect/pr62075.c (.../branches/gcc-4_8-branch)
6833
+/* { dg-do compile } */
6846
+ for (i = 0; i < 16; ++i)
6848
+ x->b[i][0] = a[i][0];
6849
+ x->c[i][0] = 0 != a[i][0];
6850
+ x->b[i][1] = a[i][1];
6854
+/* { dg-final { cleanup-tree-dump "vect" } } */
6855
Index: gcc/testsuite/gcc.dg/vect/pr60196-2.c
6856
===================================================================
6857
--- a/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../tags/gcc_4_8_3_release)
6858
+++ b/src/gcc/testsuite/gcc.dg/vect/pr60196-2.c (.../branches/gcc-4_8-branch)
6860
+/* PR tree-optimization/63189 */
6861
+/* { dg-do run } */
6863
+#include "tree-vect.h"
6865
+static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 };
6866
+static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 };
6868
+__attribute__((noinline, noclone)) static int
6872
+ for (i = 0; i < 8; ++i)
6873
+ sum += a[i] * b[i];
6877
+__attribute__((noinline, noclone)) void
6892
+/* { dg-final { cleanup-tree-dump "vect" } } */
6893
Index: gcc/testsuite/gcc.dg/vect/pr63605.c
6894
===================================================================
6895
--- a/src/gcc/testsuite/gcc.dg/vect/pr63605.c (.../tags/gcc_4_8_3_release)
6896
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63605.c (.../branches/gcc-4_8-branch)
6898
+/* { dg-do run } */
6900
+#include "tree-vect.h"
6902
+extern void abort (void);
6904
+int a, b[8] = { 2, 0, 0, 0, 0, 0, 0, 0 }, c[8];
6911
+ for (; a < 8; a++)
6920
Index: gcc/testsuite/gcc.dg/vect/pr63341-1.c
6921
===================================================================
6922
--- a/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../tags/gcc_4_8_3_release)
6923
+++ b/src/gcc/testsuite/gcc.dg/vect/pr63341-1.c (.../branches/gcc-4_8-branch)
6925
+/* PR tree-optimization/63341 */
6926
+/* { dg-do run } */
6928
+#include "tree-vect.h"
6930
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
6931
+struct S { char e __attribute__((aligned (64))); U s[32]; };
6932
+struct S t = {0, {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8},
6933
+ {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
6934
+ {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24},
6935
+ {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}}};
6936
+unsigned short d[32] = { 1 };
6938
+__attribute__((noinline, noclone)) void
6942
+ for (i = 0; i < 32; i++)
6944
+ if (__builtin_memcmp (d, t.s, sizeof d))
6956
+/* { dg-final { cleanup-tree-dump "vect" } } */
6957
Index: gcc/testsuite/ChangeLog
6958
===================================================================
6959
--- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_4_8_3_release)
6960
+++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-4_8-branch)
6962
+2014-12-05 H.J. Lu <hongjiu.lu@intel.com>
6964
+ Backport from mainline
6965
+ 2014-11-28 H.J. Lu <hongjiu.lu@intel.com>
6967
+ PR rtl-optimization/64037
6968
+ * g++.dg/pr64037.C: New test.
6970
+2014-12-04 Jakub Jelinek <jakub@redhat.com>
6973
+ * c-c++-common/pr56493.c: New test.
6975
+2014-11-28 Jakub Jelinek <jakub@redhat.com>
6977
+ Backported from mainline
6978
+ 2014-11-27 Jakub Jelinek <jakub@redhat.com>
6980
+ PR middle-end/64067
6981
+ * gcc.c-torture/compile/pr64067.c: New test.
6983
+ 2014-10-31 Jakub Jelinek <jakub@redhat.com>
6985
+ PR rtl-optimization/63659
6986
+ * gcc.c-torture/execute/pr63659.c: New test.
6988
+ 2014-10-03 Jakub Jelinek <jakub@redhat.com>
6991
+ * c-c++-common/gomp/pr61200.c: New test.
6993
+2014-11-26 Richard Biener <rguenther@suse.de>
6995
+ Backport from mainline
6996
+ 2014-08-15 Richard Biener <rguenther@suse.de>
6998
+ PR tree-optimization/62031
6999
+ * gcc.dg/torture/pr62031.c: New testcase.
7001
+ 2014-10-10 Richard Biener <rguenther@suse.de>
7003
+ PR tree-optimization/63379
7004
+ * gcc.dg/vect/pr63379.c: New testcase.
7006
+ 2014-11-07 Richard Biener <rguenther@suse.de>
7008
+ PR tree-optimization/63605
7009
+ * gcc.dg/vect/pr63605.c: New testcase.
7011
+ 2014-10-28 Richard Biener <rguenther@suse.de>
7013
+ PR middle-end/63665
7014
+ * gcc.dg/pr63665.c: New testcase.
7016
+2014-11-19 Uros Bizjak <ubizjak@gmail.com>
7019
+ * gcc.target/i386/pr63947.c: New test.
7021
+2014-11-19 Tom de Vries <tom@codesourcery.com>
7023
+ Backport from mainline
7024
+ PR tree-optimization/62167
7025
+ * gcc.dg/pr51879-12.c: Add xfails.
7026
+ * gcc.dg/pr62167-run.c: New test.
7027
+ * gcc.dg/pr62167.c: New test.
7029
+2014-11-18 Teresa Johnson <tejohnson@google.com>
7031
+ Backport from mainline and gcc-4_9 branch.
7032
+ 2014-11-13 Teresa Johnson <tejohnson@google.com>
7034
+ PR tree-optimization/63841
7035
+ * g++.dg/tree-ssa/pr63841.C: New test.
7037
+2014-11-12 Jakub Jelinek <jakub@redhat.com>
7040
+ * g++.dg/ipa/pr63838.C: New test.
7042
+2014-11-03 Marek Polacek <polacek@redhat.com>
7045
+ * gcc.dg/pr52769.c: New test.
7047
+2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7049
+ * gcc.target/aarch64/madd_after_asm_1.c: New test.
7051
+2014-10-15 Eric Botcazou <ebotcazou@adacore.com>
7053
+ * gnat.dg/opt41.adb: New test.
7054
+ * gnat.dg/opt41_pkg.ad[sb]: New helper.
7056
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7058
+ Backport from mainline r215880
7059
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7061
+ * g++.dg/ext/altivec-2.C: Compile with -Wno-deprecated to avoid
7062
+ failing with the new warning message.
7063
+ * gcc.dg/vmx/3c-01a.c: Likewise.
7064
+ * gcc.dg/vmx/ops-long-1.c: Likewise.
7065
+ * gcc.dg/vmx/ops.c: Likewise.
7066
+ * gcc.target/powerpc/altivec-20.c: Likewise.
7067
+ * gcc.target/powerpc/altivec-6.c: Likewise.
7068
+ * gcc.target/powerpc/altivec-vec-merge.c: Likewise.
7069
+ * gcc.target/powerpc/vsx-builtin-8.c: Likewise.
7070
+ * gcc.target/powerpc/warn-lvsl-lvsr.c: New test.
7072
+ Backport from mainline r215882
7073
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7075
+ * gcc.target/powerpc/lvsl-lvsr.c: New test.
7077
+ Backport from mainline r216017
7078
+ 2014-10-08 Pat Haugen <pthaugen@us.ibm.com>
7080
+ * gcc.dg/vmx/3c-01a.c: Add default options from vmx.exp.
7081
+ * gcc.dg/vmx/ops.c: Likewise.
7082
+ * gcc.dg/vmx/ops-long-1.c: Likewise.
7084
+2014-10-10 Jakub Jelinek <jakub@redhat.com>
7087
+ * gfortran.dg/gomp/pr59488-1.f90: New test.
7088
+ * gfortran.dg/gomp/pr59488-2.f90: New test.
7090
+2014-10-01 Jakub Jelinek <jakub@redhat.com>
7093
+ * gcc.dg/pr63342.c: New test.
7096
+ * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS
7097
+ to test 24 in TESTS.
7099
+2014-10-01 Uros Bizjak <ubizjak@gmail.com>
7101
+ Backport from mainline
7102
+ 2013-11-07 Joseph Myers <joseph@codesourcery.com>
7104
+ * lib/target-supports.exp
7105
+ (check_effective_target_fenv_exceptions): New function.
7107
+2014-09-30 Jakub Jelinek <jakub@redhat.com>
7109
+ PR inline-asm/63282
7110
+ * gcc.c-torture/compile/pr63282.c: New test.
7112
+2014-09-26 Jakub Jelinek <jakub@redhat.com>
7114
+ * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
7115
+ to default options.
7117
+2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7119
+ Backport from mainline r215559
7120
+ 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7123
+ * gcc.target/powerpc/pr63335.c: New test.
7125
+2014-09-25 Jakub Jelinek <jakub@redhat.com>
7127
+ PR tree-optimization/63341
7128
+ * gcc.dg/vect/pr63341-1.c: New test.
7129
+ * gcc.dg/vect/pr63341-2.c: New test.
7131
+2014-09-18 Joseph Myers <joseph@codesourcery.com>
7133
+ * gcc.dg/torture/float128-exact-underflow.c: New test.
7135
+2014-09-17 Jakub Jelinek <jakub@redhat.com>
7138
+ * gcc.dg/pr63284.c: New test.
7140
+2014-09-09 Richard Biener <rguenther@suse.de>
7142
+ Backport from mainline
7143
+ 2014-06-11 Richard Biener <rguenther@suse.de>
7145
+ PR tree-optimization/61452
7146
+ * gcc.dg/torture/pr61452.c: New testcase.
7148
+2014-09-09 Richard Biener <rguenther@suse.de>
7150
+ Backport from mainline
7151
+ 2014-05-05 Richard Biener <rguenther@suse.de>
7153
+ PR middle-end/61010
7154
+ * gcc.dg/torture/pr61010.c: New testcase.
7156
+ 2014-05-28 Richard Biener <rguenther@suse.de>
7158
+ PR middle-end/61045
7159
+ * gcc.dg/pr61045.c: New testcase.
7161
+ 2014-08-11 Richard Biener <rguenther@suse.de>
7163
+ PR tree-optimization/62075
7164
+ * gcc.dg/vect/pr62075.c: New testcase.
7166
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
7168
+ PR tree-optimization/60196
7169
+ PR tree-optimization/63189
7170
+ * gcc.dg/vect/pr63189.c: New test.
7171
+ * gcc.dg/vect/pr60196-1.c: New test.
7172
+ * gcc.dg/vect/pr60196-2.c: New test.
7174
+ Backported from mainline
7175
+ 2013-09-17 Cong Hou <congh@google.com>
7177
+ * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product
7178
+ on two arrays with short and int types. This should not be recognized
7179
+ as a dot product pattern.
7181
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
7183
+ Backported from mainline
7184
+ 2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
7187
+ * gcc.target/i386/pr61923.c: New test.
7189
+2014-09-06 John David Anglin <danglin@gcc.gnu.org>
7191
+ PR testsuite/56194
7192
+ * g++.dg/init/const9.C: Skip scan-assembler-not "rodata" on hppa*-*-*.
7194
+2014-09-03 Marek Polacek <polacek@redhat.com>
7196
+ Backport from mainline
7197
+ 2014-09-02 Marek Polacek <polacek@redhat.com>
7200
+ * gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
7202
+2014-09-03 Martin Jambor <mjambor@suse.cz>
7205
+ * g++.dg/ipa/pr62015.C: New test.
7207
+2014-09-03 Martin Jambor <mjambor@suse.cz>
7210
+ * gcc.dg/ipa/pr61986.c: New test.
7212
+2014-08-26 Dominik Vogt <vogt@linux.vnet.ibm.com>
7214
+ * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
7215
+ failure on s390*-*-linux-gnu.
7217
+2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
7219
+ Backport from mainline
7220
+ 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
7223
+ * gcc.target/sh/pr61996.c: New.
7225
+2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
7227
+ Backport from trunk
7229
+ * gfortran.dg/array_assignment_5.f90: New test.
7231
+2014-08-15 Tom de Vries <tom@codesourcery.com>
7233
+ Backport from mainline:
7234
+ 2014-08-14 Tom de Vries <tom@codesourcery.com>
7236
+ PR rtl-optimization/62004
7237
+ PR rtl-optimization/62030
7238
+ * gcc.dg/pr62004.c: New test.
7239
+ * gcc.dg/pr62030.c: Same.
7240
+ * gcc.target/mips/pr62030-octeon.c: Same.
7242
+2014-08-13 Felix Yang <fei.yang0953@gmail.com>
7244
+ PR tree-optimization/62073
7245
+ * gcc.dg/vect/pr62073.c: New test.
7247
+2014-08-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
7249
+ Backport from mainline
7250
+ 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
7252
+ PR middle-end/62103
7253
+ * gcc.c-torture/execute/bitfld-6.c: New test.
7255
+2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
7257
+ Backport from trunk
7259
+ * gfortran.dg/dot_product_3.f90: New test case.
7261
+2014-08-07 John David Anglin <danglin@gcc.gnu.org>
7263
+ PR tree-optimization/60707
7264
+ * gfortran.dg/pr45636.f90: xfail on 32-bit hppa*-*-*.
7266
+2014-08-06 Jakub Jelinek <jakub@redhat.com>
7268
+ PR rtl-optimization/61801
7269
+ * gcc.target/i386/pr61801.c: Rewritten.
7271
+2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
7273
+ Backport from mainline
7274
+ 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
7276
+ PR tree-optimization/61375
7277
+ * gcc.c-torture/execute/pr61375-1.c: New test.
7279
+2014-08-01 Richard Biener <rguenther@suse.de>
7281
+ PR tree-optimization/61964
7282
+ * gcc.dg/torture/pr61964.c: New testcase.
7283
+ * gcc.dg/pr51879-18.c: XFAIL.
7285
+2014-07-28 Richard Biener <rguenther@suse.de>
7287
+ PR rtl-optimization/61801
7288
+ * gcc.target/i386/pr61801.c: Fix testcase.
7290
+2014-07-28 Richard Biener <rguenther@suse.de>
7292
+ PR rtl-optimization/61801
7293
+ * gcc.target/i386/pr61801.c: New testcase.
7295
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7297
+ Backport from mainline:
7298
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7300
+ * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
7302
+ * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
7303
+ * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
7304
+ * gcc.c-torture/execute/20050316-3.x: New file. Add -Wno-psabi.
7305
+ * gcc.c-torture/execute/pr23135.x: Likewise.
7307
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7309
+ Backport from mainline:
7310
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7312
+ * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
7314
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7316
+ Backport from mainline:
7317
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7319
+ * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
7321
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7323
+ Backport from mainline:
7324
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7326
+ * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
7328
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
7330
+ * gcc.dg/stack-usage-2.c: Adjust.
7332
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
7334
+ Backport from trunk.
7336
+ * gfortran.dg/dependency_44.f90 : New test
7338
+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
7340
+ * gnat.dg/opt39.adb: New test.
7342
+2014-07-08 Paul Thomas <pault@gcc.gnu.org>
7346
+ * gfortran.dg/allocatable_function_8.f90 : New test
7348
+2014-07-04 Jakub Jelinek <jakub@redhat.com>
7350
+ PR tree-optimization/61684
7351
+ * gcc.c-torture/compile/pr61684.c: New test.
7353
+2014-07-02 Jakub Jelinek <jakub@redhat.com>
7354
+ Fritz Reese <Reese-Fritz@zai.com>
7356
+ * gfortran.dg/oldstyle_5.f: New test.
7358
+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
7360
+ Backport from mainline
7361
+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
7363
+ PR tree-optimization/61306
7364
+ * gcc.c-torture/execute/pr61306-1.c: New test.
7365
+ * gcc.c-torture/execute/pr61306-2.c: Likewise.
7366
+ * gcc.c-torture/execute/pr61306-3.c: Likewise.
7368
+2014-06-27 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7370
+ * gfortran.dg/nint_2.f90: Don't XFAIL for powerpc64le-*-linux*.
7372
+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
7374
+ Backport from mainline
7375
+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
7378
+ * gcc.target/alpha/pr61586.c: New test.
7380
+2014-06-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7382
+ * gfortran.dg/default_format_denormal_2.f90: Remove xfail for
7383
+ powerpc*-*-linux*.
7385
+2014-06-18 Uros Bizjak <ubizjak@gmail.com>
7387
+ Backport from mainline
7388
+ 2014-06-13 Ilya Enkovich <ilya.enkovich@intel.com>
7390
+ PR rtl-optimization/61094
7391
+ PR rtl-optimization/61446
7392
+ * gcc.target/i386/pr61446.c : New.
7394
+ Backport from mainline
7395
+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
7398
+ * gcc.target/i386/pr61423.c: New test.
7400
+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
7402
+ Backport from mainline
7405
+ * gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
7406
+ * gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
7407
+ * gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
7408
+ * gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.
7410
+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7412
+ Backport from trunk.
7414
+ * gfortran.dg/cray_pointers_10.f90: New file.
7416
+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
7418
+ Backport from mainline
7420
+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
7422
+ * lib/target-supports.exp (check_effective_target_longdouble128): New.
7423
+ * gcc.target/powerpc/pack02.c: Use it.
7424
+ * gcc.target/powerpc/tfmode_off.c: Likewise.
7426
+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
7428
+ Backport from 2014-06-12 trunk r211491
7431
+ * gcc.target/avr/torture/pr61443.c: New test.
7433
+2014-06-04 Richard Biener <rguenther@suse.de>
7435
+ PR tree-optimization/61383
7436
+ * gcc.dg/torture/pr61383-1.c: New testcase.
7438
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
7440
+ Backport from mainline
7441
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
7443
+ PR rtl-optimization/60866
7444
+ * gcc.dg/pr60866.c: New test.
7446
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
7448
+ Backport from mainline
7449
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
7451
+ PR rtl-optimization/60901
7452
+ * gcc.target/i386/pr60901.c: New test.
7454
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
7456
+ Backport from mainline
7457
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
7459
+ * gnat.dg/overflow_fixed.adb: New test.
7461
+2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
7463
+ * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
7465
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
7467
+ Backport from mainline
7468
+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
7470
+ * gcc.target/powerpc/htm-ttest.c: New test.
7472
2014-05-22 Release Manager
7474
* GCC 4.8.3 released.
7475
Index: gcc/testsuite/g++.dg/rtti/dyncast7.C
7476
===================================================================
7477
--- a/src/gcc/testsuite/g++.dg/rtti/dyncast7.C (.../tags/gcc_4_8_3_release)
7478
+++ b/src/gcc/testsuite/g++.dg/rtti/dyncast7.C (.../branches/gcc-4_8-branch)
7480
+// I think this dynamic_cast has undefined behavior when destroying E::o
7481
+// because we're the F period of destruction has started and ap doesn't
7482
+// point to the object currently being destroyed--but the reasonable
7483
+// options are success or failure, not SEGV.
7487
+extern "C" void abort();
7489
+struct A { virtual ~A(); };
7490
+struct B { virtual ~B() { } };
7491
+struct C : B, A { };
7492
+struct E : virtual B { A o; };
7493
+struct F : virtual C, virtual E { };
7499
+ C* cp2 = dynamic_cast<C*>(ap);
7500
+ if (cp2 != cp && cp2 != 0)
7508
Index: gcc/testsuite/g++.dg/ext/altivec-2.C
7509
===================================================================
7510
--- a/src/gcc/testsuite/g++.dg/ext/altivec-2.C (.../tags/gcc_4_8_3_release)
7511
+++ b/src/gcc/testsuite/g++.dg/ext/altivec-2.C (.../branches/gcc-4_8-branch)
7513
/* { dg-do compile { target powerpc*-*-* } } */
7514
/* { dg-require-effective-target powerpc_altivec_ok } */
7515
-/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable" } */
7516
+/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable -Wno-deprecated" } */
7518
/* This test checks if AltiVec builtins accept const-qualified
7520
Index: gcc/testsuite/g++.dg/ext/stmtexpr16.C
7521
===================================================================
7522
--- a/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../tags/gcc_4_8_3_release)
7523
+++ b/src/gcc/testsuite/g++.dg/ext/stmtexpr16.C (.../branches/gcc-4_8-branch)
7526
+// { dg-options "-std=gnu++11" }
7532
+ // without '+0', gcc 4.6 gives a different error (no ICE though)
7533
+ decltype(({ int y = x; y; })+0) v1 = 0;
7535
Index: gcc/testsuite/g++.dg/expr/cond12.C
7536
===================================================================
7537
--- a/src/gcc/testsuite/g++.dg/expr/cond12.C (.../tags/gcc_4_8_3_release)
7538
+++ b/src/gcc/testsuite/g++.dg/expr/cond12.C (.../branches/gcc-4_8-branch)
7544
+ X& operator=(const X&){}
7545
+ X& operator=(X&){__builtin_abort();}
7548
+int main(int argv,char**) {
7550
+ ((argv > 2) ? a : b) = X();
7552
Index: gcc/testsuite/g++.dg/init/const9.C
7553
===================================================================
7554
--- a/src/gcc/testsuite/g++.dg/init/const9.C (.../tags/gcc_4_8_3_release)
7555
+++ b/src/gcc/testsuite/g++.dg/init/const9.C (.../branches/gcc-4_8-branch)
7558
-// { dg-final { scan-assembler-not "rodata" } }
7559
+// { dg-final { scan-assembler-not "rodata" { target { ! hppa*-*-* } } } }
7563
Index: gcc/testsuite/g++.dg/pr64037.C
7564
===================================================================
7565
--- a/src/gcc/testsuite/g++.dg/pr64037.C (.../tags/gcc_4_8_3_release)
7566
+++ b/src/gcc/testsuite/g++.dg/pr64037.C (.../branches/gcc-4_8-branch)
7568
+// { dg-do run { target i?86-*-* x86_64-*-* } }
7569
+// { dg-options "-std=c++11 -Os" }
7571
+enum class X : unsigned char {
7576
+__attribute__((noinline,noclone))
7577
+foo(unsigned &out, unsigned a, X b)
7579
+ out = static_cast<unsigned>(b);
7584
+ unsigned deadbeef = 0xDEADBEEF;
7585
+ asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef));
7588
+ foo(out, 2, X::V);
7591
+ __builtin_abort ();
7595
Index: gcc/testsuite/g++.dg/tree-ssa/pr63841.C
7596
===================================================================
7597
--- a/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C (.../tags/gcc_4_8_3_release)
7598
+++ b/src/gcc/testsuite/g++.dg/tree-ssa/pr63841.C (.../branches/gcc-4_8-branch)
7600
+/* { dg-do run } */
7601
+/* { dg-options "-O2" } */
7605
+std::string __attribute__ ((noinline)) comp_test_write() {
7608
+ for (int i = 0; i < 2; ++i) {
7609
+ char b = 1 >> (i * 8);
7610
+ data.append(&b, 1);
7616
+std::string __attribute__ ((noinline)) comp_test_write_good() {
7620
+ for (int i = 0; i < 2; ++i) {
7622
+ data.append(&b, 1);
7629
+ std::string good = comp_test_write_good();
7630
+ std::string bad = comp_test_write();
7633
+ __builtin_abort ();
7635
Index: gcc/testsuite/g++.dg/tls/thread_local10.C
7636
===================================================================
7637
--- a/src/gcc/testsuite/g++.dg/tls/thread_local10.C (.../tags/gcc_4_8_3_release)
7638
+++ b/src/gcc/testsuite/g++.dg/tls/thread_local10.C (.../branches/gcc-4_8-branch)
7642
+// { dg-do run { target c++11 } }
7643
+// { dg-add-options tls }
7644
+// { dg-require-effective-target tls_runtime }
7648
+template <typename> struct A
7650
+ static thread_local int s;
7655
+int f() { return 42; }
7656
+template <typename T> thread_local int A<T>::s = f();
7661
+ __builtin_abort();
7663
Index: gcc/testsuite/g++.dg/parse/typename7.C
7664
===================================================================
7665
--- a/src/gcc/testsuite/g++.dg/parse/typename7.C (.../tags/gcc_4_8_3_release)
7666
+++ b/src/gcc/testsuite/g++.dg/parse/typename7.C (.../branches/gcc-4_8-branch)
7671
- template<typename> void foo(int); // { dg-message "note" }
7672
- template<typename T> void bar(T t) { // { dg-message "note" }
7673
+ template<typename> void foo(int);
7674
+ template<typename T> void bar(T t) {
7675
this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
7676
- // { dg-message "candidate" "candidate note" { target *-*-* } 12 }
7677
template<typename T> void bad(T t) {
7678
foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
7683
A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" }
7684
- // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
7686
B<typename T>::bar(t); } // { dg-error "invalid|not a template" }
7688
Index: gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
7689
===================================================================
7690
--- a/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C (.../tags/gcc_4_8_3_release)
7691
+++ b/src/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C (.../branches/gcc-4_8-branch)
7693
-void f (int i, int p[i]); // { dg-error "use of parameter .i. outside function body" }
7694
+void f (int i, int p[i]); // { dg-error "use of parameter.*outside function body" }
7695
// { dg-prune-output "array bound" }
7696
Index: gcc/testsuite/g++.dg/parse/ambig7.C
7697
===================================================================
7698
--- a/src/gcc/testsuite/g++.dg/parse/ambig7.C (.../tags/gcc_4_8_3_release)
7699
+++ b/src/gcc/testsuite/g++.dg/parse/ambig7.C (.../branches/gcc-4_8-branch)
7705
+ Helper(int a, void (*pfunc)());
7708
+template <int I> void function();
7713
+Helper testOk(A, function<A>);
7714
+Helper testOk2(int(A), function<B>);
7715
+Helper testOk3((int(A)), function<A>);
7716
+Helper testFail(int(A), function<A>);
7717
Index: gcc/testsuite/g++.dg/compat/struct-layout-1.exp
7718
===================================================================
7719
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp (.../tags/gcc_4_8_3_release)
7720
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp (.../branches/gcc-4_8-branch)
7722
# This must be done after the compat-use-*-compiler definitions.
7725
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
7726
+load_lib g++-dg.exp
7730
# Save variables for the C++ compiler under test, which each test will
7731
Index: gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
7732
===================================================================
7733
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (.../tags/gcc_4_8_3_release)
7734
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (.../branches/gcc-4_8-branch)
7736
/* Structure layout test generator.
7737
- Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
7738
+ Copyright (C) 2004-2014
7739
Free Software Foundation, Inc.
7740
Contributed by Jakub Jelinek <jakub@redhat.com>.
7745
const char *dg_options[] = {
7746
-"/* { dg-options \"%s-I%s\" } */\n",
7747
+"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
7748
"/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
7749
"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
7750
"/* { 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",
7751
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
7752
===================================================================
7753
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../tags/gcc_4_8_3_release)
7754
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C (.../branches/gcc-4_8-branch)
7757
+// { dg-do compile { target c++11 } }
7759
+template <class Coord> struct BasePoint
7762
+ constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
7764
+template <class T> struct BaseCoord
7767
+ constexpr BaseCoord (T) : value (1) {}
7769
+template <class units> struct IntCoordTyped : BaseCoord<int>, units
7771
+ typedef BaseCoord Super;
7772
+ constexpr IntCoordTyped (int) : Super (0) {}
7774
+template <class units>
7775
+struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
7777
+ typedef BasePoint<IntCoordTyped<units> > Super;
7778
+ constexpr IntPointTyped (int, int) : Super (0, 0) {}
7783
+IntPointTyped<A> a (0, 0);
7784
Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
7785
===================================================================
7786
--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C (.../tags/gcc_4_8_3_release)
7787
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C (.../branches/gcc-4_8-branch)
7790
+// { dg-options "-std=c++11 -Wall" }
7795
+ return [&]() -> int {int __t; __t = t; return __t; }();
7796
+ return [&t]() -> int {int __t; __t = t; return __t; }();
7798
Index: gcc/testsuite/g++.dg/cpp0x/variadic158.C
7799
===================================================================
7800
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../tags/gcc_4_8_3_release)
7801
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../branches/gcc-4_8-branch)
7804
+// { dg-do compile { target c++11 } }
7808
+template <typename>
7810
+ typedef const char* name;
7813
+template <typename VT, typename... Fields>
7814
+void New(const char* name,
7815
+ typename Fixed<Fields>::name... field_names);
7817
+template <typename VT, typename... Fields>
7818
+void CreateMetric(const char* name,
7819
+ typename Fixed<Fields>::name... field_names,
7825
+ CreateMetric<int, const char*>("abcd", "def", Base());
7827
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C
7828
===================================================================
7829
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C (.../tags/gcc_4_8_3_release)
7830
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C (.../branches/gcc-4_8-branch)
7833
+// { dg-do compile { target c++11 } }
7835
+template <typename T>
7837
+ static constexpr int value = int(T{});
7839
Index: gcc/testsuite/g++.dg/cpp0x/variadic160.C
7840
===================================================================
7841
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../tags/gcc_4_8_3_release)
7842
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../branches/gcc-4_8-branch)
7845
+// { dg-do compile { target c++11 } }
7847
+template <typename _CharT> class A;
7848
+template <typename> class B;
7849
+template <class charT> class C;
7850
+template <> class C<char>
7852
+ virtual void xparse (int &, const B<A<char> > &) const;
7854
+template <class T, class charT = char> class G : C<charT>
7858
+ void default_value (const T &);
7859
+ void xparse (int &, const B<A<charT> > &) const;
7861
+template <class T, class charT>
7862
+void validate (int &, const B<A<charT> > &, T *, int);
7863
+template <class T, class charT>
7864
+void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
7866
+ validate (p1, p2, (T *)0, 0);
7868
+template <class T> G<T> *value (T *) { return new G<T>(0); }
7871
+template <typename T> struct D;
7872
+template <typename, int, int, int = 0, int = 0, int = 0 > class F;
7873
+template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
7875
+struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
7877
+ typedef _Scalar Scalar;
7879
+template <typename, int, int, int, int, int _MaxCols> class F
7882
+ typedef typename Eigen::D<F>::Scalar Scalar;
7883
+ F (const Scalar &, const Scalar &, const Scalar &);
7885
+template <class... T>
7886
+void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
7888
+int main (int, char *[])
7890
+ Eigen::F<double, 3, 1> a (0, 0, 0);
7891
+ value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
7893
Index: gcc/testsuite/g++.dg/cpp0x/rv-cond1.C
7894
===================================================================
7895
--- a/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../tags/gcc_4_8_3_release)
7896
+++ b/src/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C (.../branches/gcc-4_8-branch)
7899
+// { dg-do compile { target c++11 } }
7902
+ X& operator=(const X&) = delete;
7903
+ X& operator=(X&& ) = default;
7908
+ *(t ? &a : &b) = X();
7909
+ (t ? a : b) = X();
7911
Index: gcc/testsuite/g++.dg/cpp0x/overload3.C
7912
===================================================================
7913
--- a/src/gcc/testsuite/g++.dg/cpp0x/overload3.C (.../tags/gcc_4_8_3_release)
7914
+++ b/src/gcc/testsuite/g++.dg/cpp0x/overload3.C (.../branches/gcc-4_8-branch)
7917
+// { dg-options "-std=c++11" }
7921
+void f(X&&); // { dg-message "void f" }
7925
+ operator const X&() const;
7931
+ f(w); // { dg-error "lvalue" }
7933
Index: gcc/testsuite/g++.dg/ipa/pr63838.C
7934
===================================================================
7935
--- a/src/gcc/testsuite/g++.dg/ipa/pr63838.C (.../tags/gcc_4_8_3_release)
7936
+++ b/src/gcc/testsuite/g++.dg/ipa/pr63838.C (.../branches/gcc-4_8-branch)
7940
+// { dg-options "-O2 -fdump-ipa-pure-const" }
7941
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void foo" "pure-const" } }
7942
+// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void bar" "pure-const" } }
7943
+// { dg-final { cleanup-ipa-dump "pure-const" } }
7945
+__attribute__((noinline, noclone)) static void bar (int);
7948
+struct S { S () { v++; } ~S () { v++; } };
7950
+__attribute__((noinline, noclone)) static void
7958
+__attribute__((noinline, noclone)) static void
7968
+__attribute__((noinline, noclone)) int
7985
+ asm volatile ("" : : : "memory");
7994
Index: gcc/testsuite/g++.dg/ipa/pr62015.C
7995
===================================================================
7996
--- a/src/gcc/testsuite/g++.dg/ipa/pr62015.C (.../tags/gcc_4_8_3_release)
7997
+++ b/src/gcc/testsuite/g++.dg/ipa/pr62015.C (.../branches/gcc-4_8-branch)
7999
+/* { dg-do run } */
8000
+/* { dg-options "-O3 -std=c++11" } */
8003
+extern "C" int printf(const char *fmt, ...);
8004
+extern "C" void abort(void);
8007
+ enum _Value { Left, Right, Invalid };
8009
+ constexpr Side() : _value(Invalid) {}
8010
+ constexpr Side(_Value value) : _value(value) {}
8011
+ operator _Value() const { return (_Value)_value; }
8019
+ void adjust(Side side, bool final);
8020
+ void move(Side side);
8025
+ adjust(Side::Invalid, false);
8028
+static void __attribute__((noinline))
8029
+check (int v, int final)
8036
+__attribute__((noinline))
8037
+void A::adjust(Side side, bool final)
8039
+ check ((int)side, final);
8042
+void A::move(Side side)
8044
+ adjust(side, false);
8045
+ adjust(side, true);
8051
+ t.move(Side::Left);
8054
Index: gcc/testsuite/g++.dg/template/local-fn1.C
8055
===================================================================
8056
--- a/src/gcc/testsuite/g++.dg/template/local-fn1.C (.../tags/gcc_4_8_3_release)
8057
+++ b/src/gcc/testsuite/g++.dg/template/local-fn1.C (.../branches/gcc-4_8-branch)
8061
+template <typename T = int>
8067
Index: gcc/testsuite/g++.dg/template/conv14.C
8068
===================================================================
8069
--- a/src/gcc/testsuite/g++.dg/template/conv14.C (.../tags/gcc_4_8_3_release)
8070
+++ b/src/gcc/testsuite/g++.dg/template/conv14.C (.../branches/gcc-4_8-branch)
8076
+template<typename Container, typename Key>
8079
+template<typename Container, typename Key, typename KeyStore = Key>
8085
+ Variant(Container st, const Key& i) : index(i), state(st) {}
8087
+ template<typename T>
8088
+ operator T() const {
8089
+ return Accessor<Container, KeyStore>::template get<T>(state, index);
8093
+class AutoCleanVariant : public Variant<XX*, int> {
8095
+ AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
8097
+ template<typename T>
8098
+ operator T() const {
8099
+ return Variant<XX*, int>::operator T();
8102
Index: gcc/testsuite/g++.dg/template/friend55.C
8103
===================================================================
8104
--- a/src/gcc/testsuite/g++.dg/template/friend55.C (.../tags/gcc_4_8_3_release)
8105
+++ b/src/gcc/testsuite/g++.dg/template/friend55.C (.../branches/gcc-4_8-branch)
8109
+template <int I> struct A;
8110
+template <int I> class B {
8112
+ template <int A_S> friend void A<A_S>::impl();
8116
+template<int I>struct A { void impl(); };
8119
+template<int I> void A<I>::impl() { ++b1.i; ++b2.i; }
8125
Index: gcc/testsuite/g++.dg/template/memclass5.C
8126
===================================================================
8127
--- a/src/gcc/testsuite/g++.dg/template/memclass5.C (.../tags/gcc_4_8_3_release)
8128
+++ b/src/gcc/testsuite/g++.dg/template/memclass5.C (.../branches/gcc-4_8-branch)
8132
+template <typename T>
8135
+ template <typename U>
8138
+ typedef T result2;
8141
+ typedef y<int> zy;
8148
+ typedef double result2;
8153
+ x<int>::zy::result2 xxx;
8154
+ x<int>::y<int>::result2 xxx2;
8156
Index: gcc/testsuite/g++.dg/template/ptrmem27.C
8157
===================================================================
8158
--- a/src/gcc/testsuite/g++.dg/template/ptrmem27.C (.../tags/gcc_4_8_3_release)
8159
+++ b/src/gcc/testsuite/g++.dg/template/ptrmem27.C (.../branches/gcc-4_8-branch)
8167
+ int foo(int X::* ptr);
8169
+ template <int X::* ptr>
8173
+int X::foo(int X::* ptr) {
8174
+ int* p = &(this->*ptr); // OK.
8178
+template <int X::* ptr>
8180
+ int* p = &(this->*ptr); // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
8183
Index: gcc/testsuite/c-c++-common/pr56493.c
8184
===================================================================
8185
--- a/src/gcc/testsuite/c-c++-common/pr56493.c (.../tags/gcc_4_8_3_release)
8186
+++ b/src/gcc/testsuite/c-c++-common/pr56493.c (.../branches/gcc-4_8-branch)
8189
+/* { dg-do compile } */
8190
+/* { dg-options "-O2 -fdump-tree-gimple" } */
8192
+unsigned long long bar (void);
8201
+/* Verify we narrow the addition from unsigned long long to unsigned int type. */
8202
+/* { 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 } } } } */
8203
+/* { dg-final { cleanup-tree-dump "gimple" } } */
8204
Index: gcc/testsuite/c-c++-common/gomp/pr61200.c
8205
===================================================================
8206
--- a/src/gcc/testsuite/c-c++-common/gomp/pr61200.c (.../tags/gcc_4_8_3_release)
8207
+++ b/src/gcc/testsuite/c-c++-common/gomp/pr61200.c (.../branches/gcc-4_8-branch)
8209
+/* PR libgomp/61200 */
8215
+ #pragma omp parallel
8217
+ __builtin_abort ();
8218
+ #pragma omp task shared(var)
8222
Index: gcc/cp/tree.c
8223
===================================================================
8224
--- a/src/gcc/cp/tree.c (.../tags/gcc_4_8_3_release)
8225
+++ b/src/gcc/cp/tree.c (.../branches/gcc-4_8-branch)
8228
return lvalue_kind (TREE_OPERAND (ref, 0));
8231
+ case DOTSTAR_EXPR:
8232
+ if (TREE_CODE (ref) == MEMBER_REF)
8233
+ op1_lvalue_kind = clk_ordinary;
8235
+ op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
8236
+ if (TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (ref, 1))))
8237
+ op1_lvalue_kind = clk_none;
8238
+ return op1_lvalue_kind;
8241
op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
8242
/* Look at the member designator. */
8243
@@ -3738,6 +3748,10 @@
8245
init_expr = get_target_expr (exp);
8246
exp = TARGET_EXPR_SLOT (init_expr);
8247
+ if (CLASS_TYPE_P (TREE_TYPE (exp)))
8250
+ exp = rvalue (exp);
8254
Index: gcc/cp/ChangeLog
8255
===================================================================
8256
--- a/src/gcc/cp/ChangeLog (.../tags/gcc_4_8_3_release)
8257
+++ b/src/gcc/cp/ChangeLog (.../branches/gcc-4_8-branch)
8259
+2014-10-15 Jason Merrill <jason@redhat.com>
8263
+ * parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
8264
+ committed to this tentative parse.
8267
+ * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
8268
+ (iterative_hash_template_arg): Likewise.
8271
+ * semantics.c (finish_member_declaration): Don't push closure
8275
+ * pt.c (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
8276
+ * semantics.c (finish_id_expression): Don't call TLS wrapper in a
8279
+2014-08-07 Jason Merrill <jason@redhat.com>
8282
+ * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
8285
+ * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
8287
+2014-01-27 Jason Merrill <jason@redhat.com>
8291
+ * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
8292
+ list-initialization. A conversion to rvalue ref that involves
8293
+ an lvalue-rvalue conversion is bad.
8294
+ (convert_like_real): Give helpful error message.
8296
+2014-01-29 Jason Merrill <jason@redhat.com>
8299
+ * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
8300
+ have a friend template in a class template.
8301
+ * pt.c (tsubst_friend_function): Look through it.
8302
+ (push_template_decl_real): A friend member template is
8305
+2014-02-21 Jason Merrill <jason@redhat.com>
8308
+ * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
8309
+ of the partial instantiation, not the most general template.
8310
+ (maybe_process_partial_specialization): Reassign everything on
8313
+2014-03-05 Jason Merrill <jason@redhat.com>
8316
+ * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
8317
+ if re-parsing might succeed.
8318
+ * semantics.c (finish_id_expression): Use of a parameter outside
8319
+ the function body is a parse error.
8321
+2014-06-30 Jason Merrill <jason@redhat.com>
8324
+ * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
8327
+ * pt.c (unify_one_argument): Type/expression mismatch just causes
8328
+ deduction failure.
8331
+ * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
8333
+2014-06-17 Jason Merrill <jason@redhat.com>
8336
+ * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
8338
+2014-06-02 Jason Merrill <jason@redhat.com>
8341
+ * pt.c (pack_deducible_p): Handle canonicalization.
8343
2014-05-22 Release Manager
8345
* GCC 4.8.3 released.
8347
===================================================================
8348
--- a/src/gcc/cp/pt.c (.../tags/gcc_4_8_3_release)
8349
+++ b/src/gcc/cp/pt.c (.../branches/gcc-4_8-branch)
8350
@@ -907,11 +907,13 @@
8351
t; t = TREE_CHAIN (t))
8353
tree inst = TREE_VALUE (t);
8354
- if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst))
8355
+ if (CLASSTYPE_TEMPLATE_SPECIALIZATION (inst)
8356
+ || !COMPLETE_OR_OPEN_TYPE_P (inst))
8358
/* We already have a full specialization of this partial
8359
- instantiation. Reassign it to the new member
8360
- specialization template. */
8361
+ instantiation, or a full specialization has been
8362
+ looked up but not instantiated. Reassign it to the
8363
+ new member specialization template. */
8371
- else if (COMPLETE_OR_OPEN_TYPE_P (inst))
8373
/* But if we've had an implicit instantiation, that's a
8374
problem ([temp.expl.spec]/6). */
8375
error ("specialization %qT after instantiation %qT",
8376
@@ -1569,6 +1571,7 @@
8380
+ iterative_hash_template_arg (TREE_TYPE (arg), val);
8381
FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (arg), i, field, value)
8383
val = iterative_hash_template_arg (field, val);
8384
@@ -4308,7 +4311,8 @@
8385
in the template-parameter-list of the definition of a member of a
8388
- if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL)
8389
+ if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
8390
+ || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
8391
/* You can't have a function template declaration in a local
8392
scope, nor you can you define a member of a class template in a
8394
@@ -4572,7 +4576,8 @@
8395
DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
8397
/* See if this is a primary template. */
8398
- if (is_friend && ctx)
8399
+ if (is_friend && ctx
8400
+ && uses_template_parms_level (ctx, processing_template_decl))
8401
/* A friend template that specifies a class context, i.e.
8402
template <typename T> friend void A<T>::f();
8404
@@ -7454,7 +7459,7 @@
8407
/* Let's consider the explicit specialization of a member
8408
- of a class template specialization that is implicitely instantiated,
8409
+ of a class template specialization that is implicitly instantiated,
8413
@@ -7552,9 +7557,9 @@
8415
/* Note this use of the partial instantiation so we can check it
8416
later in maybe_process_partial_specialization. */
8417
- DECL_TEMPLATE_INSTANTIATIONS (templ)
8418
+ DECL_TEMPLATE_INSTANTIATIONS (found)
8419
= tree_cons (arglist, t,
8420
- DECL_TEMPLATE_INSTANTIATIONS (templ));
8421
+ DECL_TEMPLATE_INSTANTIATIONS (found));
8423
if (TREE_CODE (template_type) == ENUMERAL_TYPE && !is_dependent_type)
8424
/* Now that the type has been registered on the instantiations
8425
@@ -8289,10 +8294,17 @@
8427
if (COMPLETE_TYPE_P (context))
8429
+ tree fn = new_friend;
8430
+ /* do_friend adds the TEMPLATE_DECL for any member friend
8431
+ template even if it isn't a member template, i.e.
8432
+ template <class T> friend A<T>::f();
8433
+ Look through it in that case. */
8434
+ if (TREE_CODE (fn) == TEMPLATE_DECL
8435
+ && !PRIMARY_TEMPLATE_P (fn))
8436
+ fn = DECL_TEMPLATE_RESULT (fn);
8437
/* Check to see that the declaration is really present, and,
8438
possibly obtain an improved declaration. */
8439
- tree fn = check_classfn (context,
8440
- new_friend, NULL_TREE);
8441
+ fn = check_classfn (context, fn, NULL_TREE);
8445
@@ -14488,6 +14500,16 @@
8448
tree r = tsubst_copy (t, args, complain, in_decl);
8449
+ if (TREE_CODE (r) == VAR_DECL
8450
+ && !processing_template_decl
8451
+ && !cp_unevaluated_operand
8452
+ && DECL_THREAD_LOCAL_P (r))
8454
+ if (tree wrap = get_tls_wrapper_fn (r))
8455
+ /* Replace an evaluated use of the thread_local variable with
8456
+ a call to its wrapper. */
8457
+ r = build_cxx_call (wrap, 0, NULL, tf_warning_or_error);
8460
if (TREE_CODE (TREE_TYPE (t)) != REFERENCE_TYPE)
8461
/* If the original type was a reference, we'll be wrapped in
8462
@@ -14934,7 +14956,7 @@
8464
for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
8465
packs; packs = TREE_CHAIN (packs))
8466
- if (TREE_VALUE (packs) == parm)
8467
+ if (template_args_equal (TREE_VALUE (packs), parm))
8469
/* The template parameter pack is used in a function parameter
8470
pack. If this is the end of the parameter list, the
8471
@@ -15502,8 +15524,9 @@
8472
maybe_adjust_types_for_deduction (strict, &parm, &arg, arg_expr);
8475
- gcc_assert ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
8476
- == (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL));
8477
+ if ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
8478
+ != (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL))
8479
+ return unify_template_argument_mismatch (explain_p, parm, arg);
8481
/* For deduction from an init-list we need the actual list. */
8482
if (arg_expr && BRACE_ENCLOSED_INITIALIZER_P (arg_expr))
8483
@@ -19804,6 +19827,8 @@
8487
+ if (dependent_type_p (TREE_TYPE (expression)))
8489
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (expression), ix, val)
8490
if (value_dependent_expression_p (val))
8492
@@ -20009,7 +20034,12 @@
8495
if (BASELINK_P (expression))
8496
- expression = BASELINK_FUNCTIONS (expression);
8498
+ if (BASELINK_OPTYPE (expression)
8499
+ && dependent_type_p (BASELINK_OPTYPE (expression)))
8501
+ expression = BASELINK_FUNCTIONS (expression);
8504
if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
8506
Index: gcc/cp/semantics.c
8507
===================================================================
8508
--- a/src/gcc/cp/semantics.c (.../tags/gcc_4_8_3_release)
8509
+++ b/src/gcc/cp/semantics.c (.../branches/gcc-4_8-branch)
8510
@@ -2735,8 +2735,10 @@
8514
- /* Enter the DECL into the scope of the class. */
8515
- else if (pushdecl_class_level (decl))
8516
+ /* Enter the DECL into the scope of the class, if the class
8517
+ isn't a closure (whose fields are supposed to be unnamed). */
8518
+ else if (CLASSTYPE_LAMBDA_EXPR (current_class_type)
8519
+ || pushdecl_class_level (decl))
8521
if (TREE_CODE (decl) == USING_DECL)
8523
@@ -3108,7 +3110,7 @@
8524
&& DECL_CONTEXT (decl) == NULL_TREE
8525
&& !cp_unevaluated_operand)
8527
- error ("use of parameter %qD outside function body", decl);
8528
+ *error_msg = "use of parameter outside function body";
8529
return error_mark_node;
8532
@@ -3343,6 +3345,7 @@
8534
if (TREE_CODE (decl) == VAR_DECL
8535
&& !cp_unevaluated_operand
8536
+ && !processing_template_decl
8537
&& DECL_THREAD_LOCAL_P (decl)
8538
&& (wrap = get_tls_wrapper_fn (decl)))
8540
@@ -7296,7 +7299,9 @@
8541
constructor_elt *inner = base_field_constructor_elt (n, ce->index);
8544
- else if (ce->index && TREE_CODE (ce->index) == NOP_EXPR)
8545
+ else if (ce->index
8546
+ && (TREE_CODE (ce->index) == NOP_EXPR
8547
+ || TREE_CODE (ce->index) == POINTER_PLUS_EXPR))
8549
/* This is an initializer for an empty base; now that we've
8550
checked that it's constant, we can ignore it. */
8551
Index: gcc/cp/parser.c
8552
===================================================================
8553
--- a/src/gcc/cp/parser.c (.../tags/gcc_4_8_3_release)
8554
+++ b/src/gcc/cp/parser.c (.../branches/gcc-4_8-branch)
8555
@@ -12831,7 +12831,12 @@
8556
the effort required to do the parse, nor will we issue duplicate
8557
error messages about problems during instantiation of the
8561
+ /* Don't do this if we had a parse error in a declarator; re-parsing
8562
+ might succeed if a name changes meaning (60361). */
8563
+ && !(cp_parser_error_occurred (parser)
8564
+ && cp_parser_parsing_tentatively (parser)
8565
+ && parser->in_declarator_p))
8567
cp_token *token = cp_lexer_token_at (parser->lexer, start_of_id);
8569
@@ -23774,8 +23779,6 @@
8571
cp_parser_abort_tentative_parse (cp_parser* parser)
8573
- gcc_assert (parser->context->status != CP_PARSER_STATUS_KIND_COMMITTED
8574
- || errorcount > 0);
8575
cp_parser_simulate_error (parser);
8576
/* Now, pretend that we want to see if the construct was
8577
successfully parsed. */
8578
Index: gcc/cp/call.c
8579
===================================================================
8580
--- a/src/gcc/cp/call.c (.../tags/gcc_4_8_3_release)
8581
+++ b/src/gcc/cp/call.c (.../branches/gcc-4_8-branch)
8582
@@ -1464,7 +1464,7 @@
8584
maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
8585
conv = implicit_conversion (to, from, expr, c_cast_p,
8587
+ flags|LOOKUP_NO_TEMP_BIND, complain);
8588
if (!CLASS_TYPE_P (to)
8589
&& CONSTRUCTOR_NELTS (expr) == 1)
8591
@@ -1624,9 +1624,9 @@
8595
- Otherwise, the reference shall be to a non-volatile const type.
8597
- Under C++0x, [8.5.3/5 dcl.init.ref] it may also be an rvalue reference */
8598
+ Otherwise, the reference shall be an lvalue reference to a
8599
+ non-volatile const type, or the reference shall be an rvalue
8601
if (!CP_TYPE_CONST_NON_VOLATILE_P (to) && !TYPE_REF_IS_RVALUE (rto))
8604
@@ -1664,7 +1664,16 @@
8605
/* This reference binding, unlike those above, requires the
8606
creation of a temporary. */
8607
conv->need_temporary_p = true;
8608
- conv->rvaluedness_matches_p = TYPE_REF_IS_RVALUE (rto);
8609
+ if (TYPE_REF_IS_RVALUE (rto))
8611
+ conv->rvaluedness_matches_p = 1;
8612
+ /* In the second case, if the reference is an rvalue reference and
8613
+ the second standard conversion sequence of the user-defined
8614
+ conversion sequence includes an lvalue-to-rvalue conversion, the
8615
+ program is ill-formed. */
8616
+ if (conv->user_conv_p && next_conversion (conv)->kind == ck_rvalue)
8622
@@ -5811,7 +5820,7 @@
8623
&& convs->kind != ck_list
8624
&& convs->kind != ck_ambig
8625
&& (convs->kind != ck_ref_bind
8626
- || convs->user_conv_p)
8627
+ || (convs->user_conv_p && next_conversion (convs)->bad_p))
8628
&& (convs->kind != ck_rvalue
8629
|| SCALAR_TYPE_P (totype))
8630
&& convs->kind != ck_base)
8631
@@ -6110,7 +6119,8 @@
8632
if (convs->bad_p && !next_conversion (convs)->bad_p)
8634
gcc_assert (TYPE_REF_IS_RVALUE (ref_type)
8635
- && real_lvalue_p (expr));
8636
+ && (real_lvalue_p (expr)
8637
+ || next_conversion(convs)->kind == ck_rvalue));
8639
error_at (loc, "cannot bind %qT lvalue to %qT",
8640
TREE_TYPE (expr), totype);
8641
Index: gcc/cp/friend.c
8642
===================================================================
8643
--- a/src/gcc/cp/friend.c (.../tags/gcc_4_8_3_release)
8644
+++ b/src/gcc/cp/friend.c (.../branches/gcc-4_8-branch)
8645
@@ -502,7 +502,13 @@
8646
? current_template_parms
8649
- if (template_member_p && decl && TREE_CODE (decl) == FUNCTION_DECL)
8650
+ if ((template_member_p
8651
+ /* Always pull out the TEMPLATE_DECL if we have a friend
8652
+ template in a class template so that it gets tsubsted
8653
+ properly later on (59956). tsubst_friend_function knows
8654
+ how to tell this apart from a member template. */
8655
+ || (class_template_depth && friend_depth))
8656
+ && decl && TREE_CODE (decl) == FUNCTION_DECL)
8657
decl = DECL_TI_TEMPLATE (decl);
8660
Index: gcc/haifa-sched.c
8661
===================================================================
8662
--- a/src/gcc/haifa-sched.c (.../tags/gcc_4_8_3_release)
8663
+++ b/src/gcc/haifa-sched.c (.../branches/gcc-4_8-branch)
8664
@@ -2931,7 +2931,7 @@
8666
advance_state (curr_state);
8667
if (sched_verbose >= 6)
8668
- fprintf (sched_dump, ";;\tAdvanced a state.\n");
8669
+ fprintf (sched_dump, ";;\tAdvance the current state.\n");
8672
/* Update register pressure after scheduling INSN. */
8673
@@ -5964,6 +5964,7 @@
8674
modulo_insns_scheduled = 0;
8676
ls.modulo_epilogue = false;
8677
+ ls.first_cycle_insn_p = true;
8679
/* Loop until all the insns in BB are scheduled. */
8680
while ((*current_sched_info->schedule_more_p) ())
8681
@@ -6034,7 +6035,6 @@
8685
- ls.first_cycle_insn_p = true;
8686
ls.shadows_only_p = false;
8687
cycle_issued_insns = 0;
8688
ls.can_issue_more = issue_rate;
8689
@@ -6321,11 +6321,13 @@
8693
+ ls.first_cycle_insn_p = true;
8695
if (ls.modulo_epilogue)
8698
- advance_one_cycle ();
8699
+ if (!ls.first_cycle_insn_p)
8700
+ advance_one_cycle ();
8701
perform_replacements_new_cycle ();
8704
Index: gcc/double-int.c
8705
===================================================================
8706
--- a/src/gcc/double-int.c (.../tags/gcc_4_8_3_release)
8707
+++ b/src/gcc/double-int.c (.../branches/gcc-4_8-branch)
8709
== (unsigned HOST_WIDE_INT) htwice)
8710
&& (labs_den <= ltwice)))
8714
/* quo = quo - 1; */
8715
add_double (*lquo, *hquo,
8716
(HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
8717
Index: gcc/ipa-pure-const.c
8718
===================================================================
8719
--- a/src/gcc/ipa-pure-const.c (.../tags/gcc_4_8_3_release)
8720
+++ b/src/gcc/ipa-pure-const.c (.../branches/gcc-4_8-branch)
8721
@@ -1429,7 +1429,7 @@
8722
else if (e->can_throw_external && !TREE_NOTHROW (y->symbol.decl))
8725
- for (ie = node->indirect_calls; ie; ie = ie->next_callee)
8726
+ for (ie = w->indirect_calls; ie; ie = ie->next_callee)
8727
if (ie->can_throw_external)
8729
w_info = (struct ipa_dfs_info *) w->symbol.aux;
8730
Index: gcc/tree-ssa-math-opts.c
8731
===================================================================
8732
--- a/src/gcc/tree-ssa-math-opts.c (.../tags/gcc_4_8_3_release)
8733
+++ b/src/gcc/tree-ssa-math-opts.c (.../branches/gcc-4_8-branch)
8734
@@ -1537,7 +1537,7 @@
8736
struct symbolic_number {
8737
unsigned HOST_WIDEST_INT n;
8742
/* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
8743
@@ -1549,13 +1549,15 @@
8744
struct symbolic_number *n,
8747
+ int bitsize = TYPE_PRECISION (n->type);
8752
/* Zero out the extra bits of N in order to avoid them being shifted
8753
into the significant bits. */
8754
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
8755
- n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
8756
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
8757
+ n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
8761
@@ -1563,20 +1565,24 @@
8765
+ /* Arithmetic shift of signed type: result is dependent on the value. */
8766
+ if (!TYPE_UNSIGNED (n->type)
8767
+ && (n->n & ((unsigned HOST_WIDEST_INT) 0xff << (bitsize - 8))))
8772
- n->n = (n->n << count) | (n->n >> ((n->size * BITS_PER_UNIT) - count));
8773
+ n->n = (n->n << count) | (n->n >> (bitsize - count));
8776
- n->n = (n->n >> count) | (n->n << ((n->size * BITS_PER_UNIT) - count));
8777
+ n->n = (n->n >> count) | (n->n << (bitsize - count));
8782
/* Zero unused bits for size. */
8783
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
8784
- n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
8785
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
8786
+ n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
8790
@@ -1593,7 +1599,7 @@
8791
if (TREE_CODE (lhs_type) != INTEGER_TYPE)
8794
- if (TYPE_PRECISION (lhs_type) != n->size * BITS_PER_UNIT)
8795
+ if (TYPE_PRECISION (lhs_type) != TYPE_PRECISION (n->type))
8799
@@ -1650,20 +1656,25 @@
8800
to initialize the symbolic number. */
8805
/* Set up the symbolic number N by setting each byte to a
8806
value between 1 and the byte size of rhs1. The highest
8807
order byte is set to n->size and the lowest order
8809
- n->size = TYPE_PRECISION (TREE_TYPE (rhs1));
8810
- if (n->size % BITS_PER_UNIT != 0)
8811
+ n->type = TREE_TYPE (rhs1);
8812
+ size = TYPE_PRECISION (n->type);
8813
+ if (size % BITS_PER_UNIT != 0)
8815
- n->size /= BITS_PER_UNIT;
8816
+ if (size > HOST_BITS_PER_WIDEST_INT)
8818
+ size /= BITS_PER_UNIT;
8819
n->n = (sizeof (HOST_WIDEST_INT) < 8 ? 0 :
8820
(unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201);
8822
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
8823
+ if (size < (int)sizeof (HOST_WIDEST_INT))
8824
n->n &= ((unsigned HOST_WIDEST_INT)1 <<
8825
- (n->size * BITS_PER_UNIT)) - 1;
8826
+ (size * BITS_PER_UNIT)) - 1;
8828
source_expr1 = rhs1;
8830
@@ -1672,12 +1683,12 @@
8835
+ int i, size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
8836
unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
8837
unsigned HOST_WIDEST_INT tmp = val;
8839
/* Only constants masking full bytes are allowed. */
8840
- for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
8841
+ for (i = 0; i < size; i++, tmp >>= BITS_PER_UNIT)
8842
if ((tmp & 0xff) != 0 && (tmp & 0xff) != 0xff)
8845
@@ -1693,12 +1704,24 @@
8850
+ int type_size, old_type_size;
8853
- type_size = TYPE_PRECISION (gimple_expr_type (stmt));
8854
+ type = gimple_expr_type (stmt);
8855
+ type_size = TYPE_PRECISION (type);
8856
if (type_size % BITS_PER_UNIT != 0)
8858
+ if (type_size > (int) HOST_BITS_PER_WIDEST_INT)
8861
+ /* Sign extension: result is dependent on the value. */
8862
+ old_type_size = TYPE_PRECISION (n->type);
8863
+ if (!TYPE_UNSIGNED (n->type)
8864
+ && type_size > old_type_size
8866
+ ((unsigned HOST_WIDEST_INT) 0xff << (old_type_size - 8)))
8869
if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
8871
/* If STMT casts to a smaller type mask out the bits not
8872
@@ -1705,7 +1728,7 @@
8873
belonging to the target type. */
8874
n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
8876
- n->size = type_size / BITS_PER_UNIT;
8881
@@ -1718,7 +1741,7 @@
8883
if (rhs_class == GIMPLE_BINARY_RHS)
8887
struct symbolic_number n1, n2;
8888
unsigned HOST_WIDEST_INT mask;
8890
@@ -1742,11 +1765,12 @@
8891
source_expr2 = find_bswap_1 (rhs2_stmt, &n2, limit - 1);
8893
if (source_expr1 != source_expr2
8894
- || n1.size != n2.size)
8895
+ || TYPE_PRECISION (n1.type) != TYPE_PRECISION (n2.type))
8898
- n->size = n1.size;
8899
- for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
8900
+ n->type = n1.type;
8901
+ size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
8902
+ for (i = 0, mask = 0xff; i < size; i++, mask <<= BITS_PER_UNIT)
8904
unsigned HOST_WIDEST_INT masked1, masked2;
8906
@@ -1785,7 +1809,7 @@
8908
struct symbolic_number n;
8911
+ int limit, bitsize;
8913
/* The last parameter determines the depth search limit. It usually
8914
correlates directly to the number of bytes to be touched. We
8915
@@ -1800,13 +1824,14 @@
8918
/* Zero out the extra bits of N and CMP. */
8919
- if (n.size < (int)sizeof (HOST_WIDEST_INT))
8920
+ bitsize = TYPE_PRECISION (n.type);
8921
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
8923
unsigned HOST_WIDEST_INT mask =
8924
- ((unsigned HOST_WIDEST_INT)1 << (n.size * BITS_PER_UNIT)) - 1;
8925
+ ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
8928
- cmp >>= (sizeof (HOST_WIDEST_INT) - n.size) * BITS_PER_UNIT;
8929
+ cmp >>= sizeof (HOST_WIDEST_INT) * BITS_PER_UNIT - bitsize;
8932
/* A complete byte swap should make the symbolic number to start
8933
@@ -1828,7 +1853,7 @@
8934
bool changed = false;
8935
tree bswap16_type = NULL_TREE, bswap32_type = NULL_TREE, bswap64_type = NULL_TREE;
8937
- if (BITS_PER_UNIT != 8)
8938
+ if (BITS_PER_UNIT != 8 || CHAR_BIT != 8)
8941
if (sizeof (HOST_WIDEST_INT) < 8)
8942
Index: gcc/tree-nrv.c
8943
===================================================================
8944
--- a/src/gcc/tree-nrv.c (.../tags/gcc_4_8_3_release)
8945
+++ b/src/gcc/tree-nrv.c (.../branches/gcc-4_8-branch)
8947
same type and alignment as the function's result. */
8948
if (TREE_CODE (found) != VAR_DECL
8949
|| TREE_THIS_VOLATILE (found)
8950
- || DECL_CONTEXT (found) != current_function_decl
8951
- || TREE_STATIC (found)
8952
+ || !auto_var_in_fn_p (found, current_function_decl)
8953
|| TREE_ADDRESSABLE (found)
8954
|| DECL_ALIGN (found) > DECL_ALIGN (result)
8955
|| !useless_type_conversion_p (result_type,
8956
Index: gcc/config.in
8957
===================================================================
8958
--- a/src/gcc/config.in (.../tags/gcc_4_8_3_release)
8959
+++ b/src/gcc/config.in (.../branches/gcc-4_8-branch)
8960
@@ -1175,6 +1175,12 @@
8964
+/* Define if isl_schedule_constraints_compute_schedule exists. */
8965
+#ifndef USED_FOR_TARGET
8966
+#undef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
8970
/* Define to 1 if you have the `kill' function. */
8971
#ifndef USED_FOR_TARGET
8974
===================================================================
8975
--- a/src/gcc/ifcvt.c (.../tags/gcc_4_8_3_release)
8976
+++ b/src/gcc/ifcvt.c (.../branches/gcc-4_8-branch)
8977
@@ -294,6 +294,28 @@
8979
return (e) ? e->dest : NULL_BLOCK;
8982
+/* Return true if RTXs A and B can be safely interchanged. */
8985
+rtx_interchangeable_p (const_rtx a, const_rtx b)
8987
+ if (!rtx_equal_p (a, b))
8990
+ if (GET_CODE (a) != MEM)
8993
+ /* A dead type-unsafe memory reference is legal, but a live type-unsafe memory
8994
+ reference is not. Interchanging a dead type-unsafe memory reference with
8995
+ a live type-safe one creates a live type-unsafe memory reference, in other
8996
+ words, it makes the program illegal.
8997
+ We check here conservatively whether the two memory references have equal
8998
+ memory attributes. */
9000
+ return mem_attrs_eq_p (get_mem_attrs (a), get_mem_attrs (b));
9004
/* Go through a bunch of insns, converting them to conditional
9005
execution format if possible. Return TRUE if all of the non-note
9006
@@ -1014,6 +1036,9 @@
9007
|| (rtx_equal_p (if_info->a, XEXP (cond, 1))
9008
&& rtx_equal_p (if_info->b, XEXP (cond, 0))))
9010
+ if (!rtx_interchangeable_p (if_info->a, if_info->b))
9013
y = (code == EQ) ? if_info->a : if_info->b;
9015
/* Avoid generating the move if the source is the destination. */
9016
@@ -2483,7 +2508,7 @@
9018
|| insn_b != last_active_insn (else_bb, FALSE)
9019
|| (set_b = single_set (insn_b)) == NULL_RTX
9020
- || ! rtx_equal_p (x, SET_DEST (set_b)))
9021
+ || ! rtx_interchangeable_p (x, SET_DEST (set_b)))
9025
@@ -2496,7 +2521,7 @@
9026
|| BLOCK_FOR_INSN (insn_b) != BLOCK_FOR_INSN (if_info->cond_earliest)
9027
|| !NONJUMP_INSN_P (insn_b)
9028
|| (set_b = single_set (insn_b)) == NULL_RTX
9029
- || ! rtx_equal_p (x, SET_DEST (set_b))
9030
+ || ! rtx_interchangeable_p (x, SET_DEST (set_b))
9031
|| ! noce_operand_ok (SET_SRC (set_b))
9032
|| reg_overlap_mentioned_p (x, SET_SRC (set_b))
9033
|| modified_between_p (SET_SRC (set_b), insn_b, jump)
9034
@@ -2562,7 +2587,7 @@
9036
/* Look and see if A and B are really the same. Avoid creating silly
9037
cmove constructs that no one will fix up later. */
9038
- if (rtx_equal_p (a, b))
9039
+ if (rtx_interchangeable_p (a, b))
9041
/* If we have an INSN_B, we don't have to create any new rtl. Just
9042
move the instruction that we already have. If we don't have an
9043
@@ -4246,6 +4271,9 @@
9044
old_dest = JUMP_LABEL (jump);
9045
if (other_bb != new_dest)
9047
+ if (!any_condjump_p (jump))
9050
if (JUMP_P (BB_END (dest_edge->src)))
9051
new_dest_label = JUMP_LABEL (BB_END (dest_edge->src));
9052
else if (new_dest == EXIT_BLOCK_PTR)
9053
Index: gcc/dwarf2out.c
9054
===================================================================
9055
--- a/src/gcc/dwarf2out.c (.../tags/gcc_4_8_3_release)
9056
+++ b/src/gcc/dwarf2out.c (.../branches/gcc-4_8-branch)
9057
@@ -12234,7 +12234,7 @@
9058
op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode,
9059
VAR_INIT_STATUS_INITIALIZED);
9063
add_loc_descr (&mem_loc_result, op1);
9064
add_loc_descr (&mem_loc_result,
9065
new_loc_descr (DW_OP_plus, 0, 0));
9066
@@ -13882,6 +13882,10 @@
9070
+ case TARGET_MEM_REF:
9075
return loc_list_from_tree (TREE_OPERAND (loc, 1), want_address);
9078
===================================================================
9079
--- a/src/gcc/expr.c (.../tags/gcc_4_8_3_release)
9080
+++ b/src/gcc/expr.c (.../branches/gcc-4_8-branch)
9081
@@ -7590,11 +7590,13 @@
9084
case COMPOUND_LITERAL_EXPR:
9085
- /* Allow COMPOUND_LITERAL_EXPR in initializers, if e.g.
9086
- rtl_for_decl_init is called on DECL_INITIAL with
9087
- COMPOUNT_LITERAL_EXPRs in it, they aren't gimplified. */
9088
- if (modifier == EXPAND_INITIALIZER
9089
- && COMPOUND_LITERAL_EXPR_DECL (exp))
9090
+ /* Allow COMPOUND_LITERAL_EXPR in initializers or coming from
9091
+ initializers, if e.g. rtl_for_decl_init is called on DECL_INITIAL
9092
+ with COMPOUND_LITERAL_EXPRs in it, or ARRAY_REF on a const static
9093
+ array with address of COMPOUND_LITERAL_EXPR in DECL_INITIAL;
9094
+ the initializers aren't gimplified. */
9095
+ if (COMPOUND_LITERAL_EXPR_DECL (exp)
9096
+ && TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (exp)))
9097
return expand_expr_addr_expr_1 (COMPOUND_LITERAL_EXPR_DECL (exp),
9098
target, tmode, modifier, as);
9100
@@ -10603,7 +10605,7 @@
9101
|| !host_integerp (TREE_OPERAND (offset, 1), 1)
9102
|| compare_tree_int (TREE_OPERAND (offset, 1),
9103
BIGGEST_ALIGNMENT / BITS_PER_UNIT) <= 0
9104
- || !exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
9105
+ || exact_log2 (tree_low_cst (TREE_OPERAND (offset, 1), 1) + 1) < 0)
9108
/* Look at the first operand of BIT_AND_EXPR and strip any conversion.
9109
Index: gcc/ada/socket.c
9110
===================================================================
9111
--- a/src/gcc/ada/socket.c (.../tags/gcc_4_8_3_release)
9112
+++ b/src/gcc/ada/socket.c (.../branches/gcc-4_8-branch)
9117
-#if defined(__linux__) || defined(__GLIBC__)
9118
+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
9119
(void) gethostbyname_r (name, ret, buf, buflen, &rh, h_errnop);
9121
rh = gethostbyname_r (name, ret, buf, buflen, h_errnop);
9122
Index: gcc/ada/uintp.adb
9123
===================================================================
9124
--- a/src/gcc/ada/uintp.adb (.../tags/gcc_4_8_3_release)
9125
+++ b/src/gcc/ada/uintp.adb (.../branches/gcc-4_8-branch)
9126
@@ -171,22 +171,6 @@
9127
-- If Discard_Quotient is True, Quotient is set to No_Uint
9128
-- If Discard_Remainder is True, Remainder is set to No_Uint
9130
- function Vector_To_Uint
9131
- (In_Vec : UI_Vector;
9132
- Negative : Boolean) return Uint;
9133
- -- Functions that calculate values in UI_Vectors, call this function to
9134
- -- create and return the Uint value. In_Vec contains the multiple precision
9135
- -- (Base) representation of a non-negative value. Leading zeroes are
9136
- -- permitted. Negative is set if the desired result is the negative of the
9137
- -- given value. The result will be either the appropriate directly
9138
- -- represented value, or a table entry in the proper canonical format is
9139
- -- created and returned.
9141
- -- Note that Init_Operand puts a signed value in the result vector, but
9142
- -- Vector_To_Uint is always presented with a non-negative value. The
9143
- -- processing of signs is something that is done by the caller before
9144
- -- calling Vector_To_Uint.
9149
Index: gcc/ada/uintp.ads
9150
===================================================================
9151
--- a/src/gcc/ada/uintp.ads (.../tags/gcc_4_8_3_release)
9152
+++ b/src/gcc/ada/uintp.ads (.../branches/gcc-4_8-branch)
9154
Uint_Minus_80 : constant Uint;
9155
Uint_Minus_128 : constant Uint;
9157
+ type UI_Vector is array (Pos range <>) of Int;
9158
+ -- Vector containing the integer values of a Uint value
9160
+ -- Note: An earlier version of this package used pointers of arrays of Ints
9161
+ -- (dynamically allocated) for the Uint type. The change leads to a few
9162
+ -- less natural idioms used throughout this code, but eliminates all uses
9163
+ -- of the heap except for the table package itself. For example, Uint
9164
+ -- parameters are often converted to UI_Vectors for internal manipulation.
9165
+ -- This is done by creating the local UI_Vector using the function N_Digits
9166
+ -- on the Uint to find the size needed for the vector, and then calling
9167
+ -- Init_Operand to copy the values out of the table into the vector.
9172
@@ -252,6 +264,22 @@
9173
-- function is used for capacity checks, and it can be one bit off
9174
-- without affecting its usage.
9176
+ function Vector_To_Uint
9177
+ (In_Vec : UI_Vector;
9178
+ Negative : Boolean) return Uint;
9179
+ -- Functions that calculate values in UI_Vectors, call this function to
9180
+ -- create and return the Uint value. In_Vec contains the multiple precision
9181
+ -- (Base) representation of a non-negative value. Leading zeroes are
9182
+ -- permitted. Negative is set if the desired result is the negative of the
9183
+ -- given value. The result will be either the appropriate directly
9184
+ -- represented value, or a table entry in the proper canonical format is
9185
+ -- created and returned.
9187
+ -- Note that Init_Operand puts a signed value in the result vector, but
9188
+ -- Vector_To_Uint is always presented with a non-negative value. The
9189
+ -- processing of signs is something that is done by the caller before
9190
+ -- calling Vector_To_Uint.
9192
---------------------
9193
-- Output Routines --
9194
---------------------
9195
@@ -494,18 +522,6 @@
9196
-- UI_Vector is defined for this purpose and some internal subprograms
9197
-- used for converting from one to the other are defined.
9199
- type UI_Vector is array (Pos range <>) of Int;
9200
- -- Vector containing the integer values of a Uint value
9202
- -- Note: An earlier version of this package used pointers of arrays of Ints
9203
- -- (dynamically allocated) for the Uint type. The change leads to a few
9204
- -- less natural idioms used throughout this code, but eliminates all uses
9205
- -- of the heap except for the table package itself. For example, Uint
9206
- -- parameters are often converted to UI_Vectors for internal manipulation.
9207
- -- This is done by creating the local UI_Vector using the function N_Digits
9208
- -- on the Uint to find the size needed for the vector, and then calling
9209
- -- Init_Operand to copy the values out of the table into the vector.
9211
type Uint_Entry is record
9213
-- Length of entry in Udigits table in digits (i.e. in words)
9214
Index: gcc/ada/ChangeLog
9215
===================================================================
9216
--- a/src/gcc/ada/ChangeLog (.../tags/gcc_4_8_3_release)
9217
+++ b/src/gcc/ada/ChangeLog (.../branches/gcc-4_8-branch)
9219
+2014-11-22 Eric Botcazou <ebotcazou@adacore.com>
9221
+ Backport from mainline
9222
+ 2014-11-20 Vincent Celier <celier@adacore.com>
9225
+ * back_end.adb (Scan_Back_End_Switches): Skip switch -G and
9228
+2014-10-13 Eric Botcazou <ebotcazou@adacore.com>
9229
+ Alan Modra <amodra@gmail.com>
9232
+ * uintp.adb (Vector_To_Uint): Move from here to...
9233
+ * uintp.ads (UI_Vector): Make public.
9234
+ (Vector_To_Uint): ...here.
9236
+2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
9238
+ * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
9239
+ * gsocket.h Add include of <unistd.h> on RTEMS.
9241
+2014-08-11 Joel Sherrill <joel.sherrill@oarcorp.com>
9243
+ * s-osinte-rtems.adb: Correct formatting of line in license block.
9245
2014-05-22 Release Manager
9247
* GCC 4.8.3 released.
9248
Index: gcc/ada/s-osinte-rtems.adb
9249
===================================================================
9250
--- a/src/gcc/ada/s-osinte-rtems.adb (.../tags/gcc_4_8_3_release)
9251
+++ b/src/gcc/ada/s-osinte-rtems.adb (.../branches/gcc-4_8-branch)
9253
-- You should have received a copy of the GNU General Public License and --
9254
-- a copy of the GCC Runtime Library Exception along with this program; --
9255
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
9256
--- <http://www.gnu.org/licenses/>.
9257
+-- <http://www.gnu.org/licenses/>. --
9259
-- GNARL was developed by the GNARL team at Florida State University. It is --
9260
-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
9261
Index: gcc/ada/gsocket.h
9262
===================================================================
9263
--- a/src/gcc/ada/gsocket.h (.../tags/gcc_4_8_3_release)
9264
+++ b/src/gcc/ada/gsocket.h (.../branches/gcc-4_8-branch)
9265
@@ -183,6 +183,11 @@
9266
#include <sys/time.h>
9269
+#if defined(__rtems__)
9270
+#include <unistd.h>
9271
+/* Required, for read(), write(), and close() */
9275
* RTEMS has these .h files but not until you have built and installed RTEMS.
9276
* When building a C/C++ toolset, you also build the newlib C library, so the
9277
Index: gcc/ada/back_end.adb
9278
===================================================================
9279
--- a/src/gcc/ada/back_end.adb (.../tags/gcc_4_8_3_release)
9280
+++ b/src/gcc/ada/back_end.adb (.../branches/gcc-4_8-branch)
9281
@@ -209,9 +209,10 @@
9282
Last : constant Natural := Switch_Last (Switch_Chars);
9285
- -- Skip -o or internal GCC switches together with their argument
9286
+ -- Skip -o, -G or internal GCC switches together with their argument.
9288
if Switch_Chars (First .. Last) = "o"
9289
+ or else Switch_Chars (First .. Last) = "G"
9290
or else Is_Internal_GCC_Switch (Switch_Chars)
9292
Next_Arg := Next_Arg + 1;
9293
Index: gcc/tree-ssa-ifcombine.c
9294
===================================================================
9295
--- a/src/gcc/tree-ssa-ifcombine.c (.../tags/gcc_4_8_3_release)
9296
+++ b/src/gcc/tree-ssa-ifcombine.c (.../branches/gcc-4_8-branch)
9297
@@ -105,7 +105,11 @@
9299
gimple stmt = gsi_stmt (gsi);
9301
+ if (is_gimple_debug (stmt))
9304
if (gimple_has_side_effects (stmt)
9305
+ || gimple_could_trap_p (stmt)
9306
|| gimple_vuse (stmt))
9310
while (is_gimple_assign (stmt)
9311
&& ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
9312
&& (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
9313
- <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
9314
+ <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt))))
9315
+ && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
9316
|| gimple_assign_ssa_name_copy_p (stmt)))
9317
stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
9319
Index: gcc/sel-sched-ir.c
9320
===================================================================
9321
--- a/src/gcc/sel-sched-ir.c (.../tags/gcc_4_8_3_release)
9322
+++ b/src/gcc/sel-sched-ir.c (.../branches/gcc-4_8-branch)
9324
static void free_av_set (basic_block);
9325
static void invalidate_av_set (basic_block);
9326
static void extend_insn_data (void);
9327
-static void sel_init_new_insn (insn_t, int);
9328
+static void sel_init_new_insn (insn_t, int, int = -1);
9329
static void finish_insns (void);
9331
/* Various list functions. */
9332
@@ -4011,9 +4011,10 @@
9336
-/* Compute seqno for INSN by its preds or succs. */
9337
+/* Compute seqno for INSN by its preds or succs. Use OLD_SEQNO to compute
9338
+ seqno in corner cases. */
9340
-get_seqno_for_a_jump (insn_t insn)
9341
+get_seqno_for_a_jump (insn_t insn, int old_seqno)
9345
@@ -4069,8 +4070,16 @@
9347
seqno = get_seqno_by_succs (insn);
9351
+ /* The only case where this could be here legally is that the only
9352
+ unscheduled insn was a conditional jump that got removed and turned
9353
+ into this unconditional one. Initialize from the old seqno
9354
+ of that jump passed down to here. */
9355
+ seqno = old_seqno;
9358
gcc_assert (seqno >= 0);
9363
@@ -4250,22 +4259,24 @@
9366
/* This is used to initialize spurious jumps generated by
9367
- sel_redirect_edge (). */
9368
+ sel_redirect_edge (). OLD_SEQNO is used for initializing seqnos
9369
+ in corner cases within get_seqno_for_a_jump. */
9371
-init_simplejump_data (insn_t insn)
9372
+init_simplejump_data (insn_t insn, int old_seqno)
9374
init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
9375
REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
9376
vNULL, true, false, false,
9378
- INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
9379
+ INSN_SEQNO (insn) = get_seqno_for_a_jump (insn, old_seqno);
9380
init_first_time_insn_data (insn);
9383
/* Perform deferred initialization of insns. This is used to process
9384
- a new jump that may be created by redirect_edge. */
9386
-sel_init_new_insn (insn_t insn, int flags)
9387
+ a new jump that may be created by redirect_edge. OLD_SEQNO is used
9388
+ for initializing simplejumps in init_simplejump_data. */
9390
+sel_init_new_insn (insn_t insn, int flags, int old_seqno)
9392
/* We create data structures for bb when the first insn is emitted in it. */
9394
@@ -4292,7 +4303,7 @@
9395
if (flags & INSN_INIT_TODO_SIMPLEJUMP)
9397
extend_insn_data ();
9398
- init_simplejump_data (insn);
9399
+ init_simplejump_data (insn, old_seqno);
9402
gcc_assert (CONTAINING_RGN (BLOCK_NUM (insn))
9403
@@ -5578,8 +5589,7 @@
9406
/* A wrapper for redirect_edge_and_branch_force, which also initializes
9407
- data structures for possibly created bb and insns. Returns the newly
9408
- added bb or NULL, when a bb was not needed. */
9409
+ data structures for possibly created bb and insns. */
9411
sel_redirect_edge_and_branch_force (edge e, basic_block to)
9413
@@ -5586,6 +5596,7 @@
9414
basic_block jump_bb, src, orig_dest = e->dest;
9417
+ int old_seqno = -1;
9419
/* This function is now used only for bookkeeping code creation, where
9420
we'll never get the single pred of orig_dest block and thus will not
9421
@@ -5594,8 +5605,13 @@
9422
&& !single_pred_p (orig_dest));
9424
prev_max_uid = get_max_uid ();
9425
+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
9426
+ when the conditional jump being redirected may become unconditional. */
9427
+ if (any_condjump_p (BB_END (src))
9428
+ && INSN_SEQNO (BB_END (src)) >= 0)
9429
+ old_seqno = INSN_SEQNO (BB_END (src));
9431
jump_bb = redirect_edge_and_branch_force (e, to);
9433
if (jump_bb != NULL)
9434
sel_add_bb (jump_bb);
9436
@@ -5607,7 +5623,8 @@
9438
jump = find_new_jump (src, jump_bb, prev_max_uid);
9440
- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
9441
+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP,
9443
set_immediate_dominator (CDI_DOMINATORS, to,
9444
recompute_dominator (CDI_DOMINATORS, to));
9445
set_immediate_dominator (CDI_DOMINATORS, orig_dest,
9446
@@ -5626,6 +5643,7 @@
9448
bool recompute_toporder_p = false;
9449
bool maybe_unreachable = single_pred_p (orig_dest);
9450
+ int old_seqno = -1;
9452
latch_edge_p = (pipelining_p
9453
&& current_loop_nest
9454
@@ -5634,6 +5652,12 @@
9456
prev_max_uid = get_max_uid ();
9458
+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
9459
+ when the conditional jump being redirected may become unconditional. */
9460
+ if (any_condjump_p (BB_END (src))
9461
+ && INSN_SEQNO (BB_END (src)) >= 0)
9462
+ old_seqno = INSN_SEQNO (BB_END (src));
9464
redirected = redirect_edge_and_branch (e, to);
9466
gcc_assert (redirected && !last_added_blocks.exists ());
9467
@@ -5654,7 +5678,7 @@
9469
jump = find_new_jump (src, NULL, prev_max_uid);
9471
- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
9472
+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP, old_seqno);
9474
/* Only update dominator info when we don't have unreachable blocks.
9475
Otherwise we'll update in maybe_tidy_empty_bb. */
9476
Index: gcc/fortran/interface.c
9477
===================================================================
9478
--- a/src/gcc/fortran/interface.c (.../tags/gcc_4_8_3_release)
9479
+++ b/src/gcc/fortran/interface.c (.../branches/gcc-4_8-branch)
9480
@@ -1923,7 +1923,7 @@
9481
/* F2008, 12.5.2.5; IR F08/0073. */
9482
if (formal->ts.type == BT_CLASS && actual->expr_type != EXPR_NULL
9483
&& ((CLASS_DATA (formal)->attr.class_pointer
9484
- && !formal->attr.intent == INTENT_IN)
9485
+ && formal->attr.intent != INTENT_IN)
9486
|| CLASS_DATA (formal)->attr.allocatable))
9488
if (actual->ts.type != BT_CLASS)
9489
Index: gcc/fortran/trans-expr.c
9490
===================================================================
9491
--- a/src/gcc/fortran/trans-expr.c (.../tags/gcc_4_8_3_release)
9492
+++ b/src/gcc/fortran/trans-expr.c (.../branches/gcc-4_8-branch)
9493
@@ -7096,7 +7096,7 @@
9495
res_desc = gfc_evaluate_now (desc, &se->pre);
9496
gfc_conv_descriptor_data_set (&se->pre, res_desc, null_pointer_node);
9497
- se->expr = gfc_build_addr_expr (TREE_TYPE (se->expr), res_desc);
9498
+ se->expr = gfc_build_addr_expr (NULL_TREE, res_desc);
9500
/* Free the lhs after the function call and copy the result data to
9501
the lhs descriptor. */
9502
Index: gcc/fortran/decl.c
9503
===================================================================
9504
--- a/src/gcc/fortran/decl.c (.../tags/gcc_4_8_3_release)
9505
+++ b/src/gcc/fortran/decl.c (.../branches/gcc-4_8-branch)
9506
@@ -1996,6 +1996,13 @@
9507
if (gfc_notify_std (GFC_STD_GNU, "Old-style "
9508
"initialization at %C") == FAILURE)
9510
+ else if (gfc_current_state () == COMP_DERIVED)
9512
+ gfc_error ("Invalid old style initialization for derived type "
9513
+ "component at %C");
9518
return match_old_style_init (name);
9520
Index: gcc/fortran/trans-openmp.c
9521
===================================================================
9522
--- a/src/gcc/fortran/trans-openmp.c (.../tags/gcc_4_8_3_release)
9523
+++ b/src/gcc/fortran/trans-openmp.c (.../branches/gcc-4_8-branch)
9524
@@ -115,6 +115,16 @@
9525
if (GFC_DECL_RESULT (decl) && ! DECL_HAS_VALUE_EXPR_P (decl))
9526
return OMP_CLAUSE_DEFAULT_SHARED;
9528
+ /* These are either array or derived parameters, or vtables.
9529
+ In the former cases, the OpenMP standard doesn't consider them to be
9530
+ variables at all (they can't be redefined), but they can nevertheless appear
9531
+ in parallel/task regions and for default(none) purposes treat them as shared.
9532
+ For vtables likely the same handling is desirable. */
9533
+ if (TREE_CODE (decl) == VAR_DECL
9534
+ && TREE_READONLY (decl)
9535
+ && TREE_STATIC (decl))
9536
+ return OMP_CLAUSE_DEFAULT_SHARED;
9538
return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
9541
@@ -1217,6 +1227,18 @@
9544
lhsaddr = save_expr (lhsaddr);
9545
+ if (TREE_CODE (lhsaddr) != SAVE_EXPR
9546
+ && (TREE_CODE (lhsaddr) != ADDR_EXPR
9547
+ || TREE_CODE (TREE_OPERAND (lhsaddr, 0)) != VAR_DECL))
9549
+ /* Make sure LHS is simple enough so that goa_lhs_expr_p can recognize
9550
+ it even after unsharing function body. */
9551
+ tree var = create_tmp_var_raw (TREE_TYPE (lhsaddr), NULL);
9552
+ DECL_CONTEXT (var) = current_function_decl;
9553
+ lhsaddr = build4 (TARGET_EXPR, TREE_TYPE (lhsaddr), var, lhsaddr,
9554
+ NULL_TREE, NULL_TREE);
9557
rhs = gfc_evaluate_now (rse.expr, &block);
9559
if (atomic_code->ext.omp_atomic == GFC_OMP_ATOMIC_WRITE)
9560
Index: gcc/fortran/ChangeLog
9561
===================================================================
9562
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_8_3_release)
9563
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch)
9565
+2014-11-28 Jakub Jelinek <jakub@redhat.com>
9567
+ Backported from mainline
9568
+ 2014-11-24 Jakub Jelinek <jakub@redhat.com>
9571
+ * trans-openmp.c (gfc_trans_omp_atomic): Make sure lhsaddr is
9572
+ simple enough for goa_lhs_expr_p.
9574
+2014-10-10 Jakub Jelinek <jakub@redhat.com>
9577
+ * trans-openmp.c (gfc_omp_predetermined_sharing): Return
9578
+ OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables.
9580
+2014-09-03 Marek Polacek <polacek@redhat.com>
9582
+ Backport from trunk
9584
+ * interface.c (compare_parameter): Fix condition.
9586
+2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
9588
+ Backport from trunk
9590
+ * gfortran.dg/array_assignment_5.f90: New test.
9592
+2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
9594
+ Backport from trunk
9596
+ * simplify.c (gfc_simplify_dot_product): Convert types of
9597
+ vectors before calculating the result.
9599
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
9601
+ Backport from trunk.
9603
+ * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
9604
+ that elements are skipped. This then correctly aligns 'reverse'
9605
+ with the scalarizer loops.
9607
+2014-07-08 Paul Thomas <pault@gcc.gnu.org>
9611
+ * trans-expr.c (fcncall_realloc_result): Use the natural type
9612
+ for the address expression of 'res_desc'.
9614
+2014-07-02 Jakub Jelinek <jakub@redhat.com>
9615
+ Fritz Reese <Reese-Fritz@zai.com>
9617
+ * decl.c (variable_decl): Reject old style initialization
9618
+ for derived type components.
9620
+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9622
+ Backport from trunk.
9624
+ * trans-decl.c (gfc_create_module_variable): Don't create
9625
+ Cray-pointee decls twice.
9627
+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
9629
+ Backport from mainline
9630
+ PR libfortran/61310
9631
+ * intrinsics.texi (CTIME): Remove mention of locale-dependent
9634
2014-05-22 Release Manager
9636
* GCC 4.8.3 released.
9637
Index: gcc/fortran/frontend-passes.c
9638
===================================================================
9639
--- a/src/gcc/fortran/frontend-passes.c (.../tags/gcc_4_8_3_release)
9640
+++ b/src/gcc/fortran/frontend-passes.c (.../branches/gcc-4_8-branch)
9641
@@ -874,6 +874,10 @@
9645
+ case INTRINSIC_CONCAT:
9646
+ /* Do not do string concatenations. */
9650
/* Binary operators. */
9651
if (optimize_binop_array_assignment (c, &e->value.op.op1, true))
9652
Index: gcc/fortran/trans-decl.c
9653
===================================================================
9654
--- a/src/gcc/fortran/trans-decl.c (.../tags/gcc_4_8_3_release)
9655
+++ b/src/gcc/fortran/trans-decl.c (.../branches/gcc-4_8-branch)
9656
@@ -4084,8 +4084,8 @@
9659
/* Don't generate variables from other modules. Variables from
9660
- COMMONs will already have been generated. */
9661
- if (sym->attr.use_assoc || sym->attr.in_common)
9662
+ COMMONs and Cray pointees will already have been generated. */
9663
+ if (sym->attr.use_assoc || sym->attr.in_common || sym->attr.cray_pointee)
9666
/* Equivalenced variables arrive here after creation. */
9667
Index: gcc/fortran/dependency.c
9668
===================================================================
9669
--- a/src/gcc/fortran/dependency.c (.../tags/gcc_4_8_3_release)
9670
+++ b/src/gcc/fortran/dependency.c (.../branches/gcc-4_8-branch)
9671
@@ -1779,6 +1779,7 @@
9672
gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
9676
gfc_dependency fin_dep;
9677
gfc_dependency this_dep;
9679
@@ -1828,6 +1829,8 @@
9683
+ /* Index for the reverse array. */
9685
for (n=0; n < lref->u.ar.dimen; n++)
9687
/* Assume dependency when either of array reference is vector
9688
@@ -1862,31 +1865,37 @@
9689
The ability to reverse or not is set by previous conditions
9690
in this dimension. If reversal is not activated, the
9691
value GFC_DEP_BACKWARD is reset to GFC_DEP_OVERLAP. */
9693
+ /* Get the indexing right for the scalarizing loop. If this
9694
+ is an element, there is no corresponding loop. */
9695
+ if (lref->u.ar.dimen_type[n] != DIMEN_ELEMENT)
9698
if (rref->u.ar.dimen_type[n] == DIMEN_RANGE
9699
&& lref->u.ar.dimen_type[n] == DIMEN_RANGE)
9701
/* Set reverse if backward dependence and not inhibited. */
9702
- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
9703
- reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
9704
- GFC_REVERSE_SET : reverse[n];
9705
+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
9706
+ reverse[m] = (this_dep == GFC_DEP_BACKWARD) ?
9707
+ GFC_REVERSE_SET : reverse[m];
9709
/* Set forward if forward dependence and not inhibited. */
9710
- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
9711
- reverse[n] = (this_dep == GFC_DEP_FORWARD) ?
9712
- GFC_FORWARD_SET : reverse[n];
9713
+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
9714
+ reverse[m] = (this_dep == GFC_DEP_FORWARD) ?
9715
+ GFC_FORWARD_SET : reverse[m];
9717
/* Flag up overlap if dependence not compatible with
9718
the overall state of the expression. */
9719
- if (reverse && reverse[n] == GFC_REVERSE_SET
9720
+ if (reverse && reverse[m] == GFC_REVERSE_SET
9721
&& this_dep == GFC_DEP_FORWARD)
9723
- reverse[n] = GFC_INHIBIT_REVERSE;
9724
+ reverse[m] = GFC_INHIBIT_REVERSE;
9725
this_dep = GFC_DEP_OVERLAP;
9727
- else if (reverse && reverse[n] == GFC_FORWARD_SET
9728
+ else if (reverse && reverse[m] == GFC_FORWARD_SET
9729
&& this_dep == GFC_DEP_BACKWARD)
9731
- reverse[n] = GFC_INHIBIT_REVERSE;
9732
+ reverse[m] = GFC_INHIBIT_REVERSE;
9733
this_dep = GFC_DEP_OVERLAP;
9736
@@ -1893,7 +1902,7 @@
9737
/* If no intention of reversing or reversing is explicitly
9738
inhibited, convert backward dependence to overlap. */
9739
if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
9740
- || (reverse != NULL && reverse[n] == GFC_INHIBIT_REVERSE))
9741
+ || (reverse != NULL && reverse[m] == GFC_INHIBIT_REVERSE))
9742
this_dep = GFC_DEP_OVERLAP;
9745
Index: gcc/fortran/simplify.c
9746
===================================================================
9747
--- a/src/gcc/fortran/simplify.c (.../tags/gcc_4_8_3_release)
9748
+++ b/src/gcc/fortran/simplify.c (.../branches/gcc-4_8-branch)
9749
@@ -1877,6 +1877,9 @@
9751
gfc_simplify_dot_product (gfc_expr *vector_a, gfc_expr *vector_b)
9756
if (!is_constant_array_expr (vector_a)
9757
|| !is_constant_array_expr (vector_b))
9759
@@ -1883,8 +1886,14 @@
9761
gcc_assert (vector_a->rank == 1);
9762
gcc_assert (vector_b->rank == 1);
9763
- gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts));
9765
+ temp.expr_type = EXPR_OP;
9766
+ gfc_clear_ts (&temp.ts);
9767
+ temp.value.op.op = INTRINSIC_NONE;
9768
+ temp.value.op.op1 = vector_a;
9769
+ temp.value.op.op2 = vector_b;
9770
+ gfc_type_convert_binary (&temp, 1);
9772
return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true);
9775
Index: gcc/configure.ac
9776
===================================================================
9777
--- a/src/gcc/configure.ac (.../tags/gcc_4_8_3_release)
9778
+++ b/src/gcc/configure.ac (.../branches/gcc-4_8-branch)
9779
@@ -3443,6 +3443,32 @@
9780
AC_MSG_RESULT($gcc_cv_lto_plugin)
9785
+ # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
9786
+ AC_ARG_ENABLE(fix-cortex-a53-835769,
9788
+AS_HELP_STRING([--enable-fix-cortex-a53-835769],
9789
+ [enable workaround for AArch64 Cortex-A53 erratum 835769 by default])
9790
+AS_HELP_STRING([--disable-fix-cortex-a53-835769],
9791
+ [disable workaround for AArch64 Cortex-A53 erratum 835769 by default])
9794
+ case $enableval in
9796
+ tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
9801
+ AC_MSG_ERROR(['$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
9802
+ Valid choices are 'yes' and 'no'.])
9809
# All TARGET_ABI_OSF targets.
9810
alpha*-*-linux* | alpha*-*-*bsd*)
9811
gcc_GAS_CHECK_FEATURE([explicit relocation support],
9812
@@ -5185,8 +5211,31 @@
9813
AC_ARG_VAR(CLOOGINC,[How to find CLOOG include files])
9814
if test "x${CLOOGLIBS}" != "x" ; then
9815
AC_DEFINE(HAVE_cloog, 1, [Define if cloog is in use.])
9817
+ # Check whether isl_schedule_constraints_compute_schedule is available;
9818
+ # it's new in ISL-0.13.
9819
+ saved_CFLAGS="$CFLAGS"
9820
+ CFLAGS="$CFLAGS $ISLINC"
9821
+ saved_LIBS="$LIBS"
9822
+ LIBS="$LIBS $CLOOGLIBS $ISLLIBS $GMPLIBS"
9824
+ AC_MSG_CHECKING([Checking for isl_schedule_constraints_compute_schedule])
9825
+ AC_TRY_LINK([#include <isl/schedule.h>],
9826
+ [isl_schedule_constraints_compute_schedule (NULL);],
9827
+ [ac_has_isl_schedule_constraints_compute_schedule=yes],
9828
+ [ac_has_isl_schedule_constraints_compute_schedule=no])
9829
+ AC_MSG_RESULT($ac_has_isl_schedule_constraints_compute_schedule)
9831
+ LIBS="$saved_LIBS"
9832
+ CFLAGS="$saved_CFLAGS"
9834
+ if test x"$ac_has_isl_schedule_constraints_compute_schedule" = x"yes"; then
9835
+ AC_DEFINE(HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE, 1,
9836
+ [Define if isl_schedule_constraints_compute_schedule exists.])
9841
# Check for plugin support
9842
AC_ARG_ENABLE(plugin,
9843
[AS_HELP_STRING([--enable-plugin], [enable plugin support])],
9844
Index: gcc/function.c
9845
===================================================================
9846
--- a/src/gcc/function.c (.../tags/gcc_4_8_3_release)
9847
+++ b/src/gcc/function.c (.../branches/gcc-4_8-branch)
9848
@@ -1354,9 +1354,13 @@
9849
#define STACK_POINTER_OFFSET 0
9852
+#if defined (REG_PARM_STACK_SPACE) && !defined (INCOMING_REG_PARM_STACK_SPACE)
9853
+#define INCOMING_REG_PARM_STACK_SPACE REG_PARM_STACK_SPACE
9856
/* If not defined, pick an appropriate default for the offset of dynamically
9857
allocated memory depending on the value of ACCUMULATE_OUTGOING_ARGS,
9858
- REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
9859
+ INCOMING_REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
9861
#ifndef STACK_DYNAMIC_OFFSET
9863
@@ -1368,12 +1372,12 @@
9864
`crtl->outgoing_args_size'. Nevertheless, we must allow
9865
for it when allocating stack dynamic objects. */
9867
-#if defined(REG_PARM_STACK_SPACE)
9868
+#ifdef INCOMING_REG_PARM_STACK_SPACE
9869
#define STACK_DYNAMIC_OFFSET(FNDECL) \
9870
((ACCUMULATE_OUTGOING_ARGS \
9871
? (crtl->outgoing_args_size \
9872
+ (OUTGOING_REG_PARM_STACK_SPACE ((!(FNDECL) ? NULL_TREE : TREE_TYPE (FNDECL))) ? 0 \
9873
- : REG_PARM_STACK_SPACE (FNDECL))) \
9874
+ : INCOMING_REG_PARM_STACK_SPACE (FNDECL))) \
9875
: 0) + (STACK_POINTER_OFFSET))
9877
#define STACK_DYNAMIC_OFFSET(FNDECL) \
9878
@@ -2211,8 +2215,9 @@
9880
all->args_so_far = pack_cumulative_args (&all->args_so_far_v);
9882
-#ifdef REG_PARM_STACK_SPACE
9883
- all->reg_parm_stack_space = REG_PARM_STACK_SPACE (current_function_decl);
9884
+#ifdef INCOMING_REG_PARM_STACK_SPACE
9885
+ all->reg_parm_stack_space
9886
+ = INCOMING_REG_PARM_STACK_SPACE (current_function_decl);
9890
@@ -4518,6 +4523,7 @@
9891
/* ??? This could be set on a per-function basis by the front-end
9892
but is this worth the hassle? */
9893
cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
9894
+ cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions;
9898
Index: gcc/tree-vectorizer.h
9899
===================================================================
9900
--- a/src/gcc/tree-vectorizer.h (.../tags/gcc_4_8_3_release)
9901
+++ b/src/gcc/tree-vectorizer.h (.../branches/gcc-4_8-branch)
9903
#define LOOP_VINFO_OPERANDS_SWAPPED(L) (L)->operands_swapped
9905
#define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
9906
-(L)->may_misalign_stmts.length () > 0
9907
+((L)->may_misalign_stmts.length () > 0)
9908
#define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L) \
9909
-(L)->may_alias_ddrs.length () > 0
9910
+((L)->may_alias_ddrs.length () > 0)
9912
#define NITERS_KNOWN_P(n) \
9913
(host_integerp ((n),0) \
9915
extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *);
9916
extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree,
9917
tree *, gimple_stmt_iterator *,
9918
- gimple *, bool, bool *);
9919
+ gimple *, bool, bool *,
9920
+ tree = NULL_TREE);
9921
extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
9922
extern tree vect_create_destination_var (tree, tree);
9923
extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT);
9925
extern int vect_get_place_in_interleaving_chain (gimple, gimple);
9926
extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
9927
extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
9928
- tree, struct loop *);
9929
+ tree, struct loop *,
9930
+ tree = NULL_TREE);
9932
/* In tree-vect-loop.c. */
9933
/* FORNOW: Used in tree-parloops.c. */
9934
Index: gcc/stor-layout.c
9935
===================================================================
9936
--- a/src/gcc/stor-layout.c (.../tags/gcc_4_8_3_release)
9937
+++ b/src/gcc/stor-layout.c (.../branches/gcc-4_8-branch)
9938
@@ -234,12 +234,7 @@
9939
param_type = TREE_TYPE (ref);
9941
= build_decl (input_location, PARM_DECL, param_name, param_type);
9942
- if (targetm.calls.promote_prototypes (NULL_TREE)
9943
- && INTEGRAL_TYPE_P (param_type)
9944
- && TYPE_PRECISION (param_type) < TYPE_PRECISION (integer_type_node))
9945
- DECL_ARG_TYPE (param_decl) = integer_type_node;
9947
- DECL_ARG_TYPE (param_decl) = param_type;
9948
+ DECL_ARG_TYPE (param_decl) = param_type;
9949
DECL_ARTIFICIAL (param_decl) = 1;
9950
TREE_READONLY (param_decl) = 1;
9952
Index: gcc/tree-vect-loop.c
9953
===================================================================
9954
--- a/src/gcc/tree-vect-loop.c (.../tags/gcc_4_8_3_release)
9955
+++ b/src/gcc/tree-vect-loop.c (.../branches/gcc-4_8-branch)
9956
@@ -2205,7 +2205,8 @@
9959
def1 = SSA_NAME_DEF_STMT (op1);
9960
- if (flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
9961
+ if (gimple_bb (def1)
9962
+ && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
9964
&& flow_bb_inside_loop_p (loop->inner, gimple_bb (def1))
9965
&& is_gimple_assign (def1))
9966
Index: gcc/tree-data-ref.c
9967
===================================================================
9968
--- a/src/gcc/tree-data-ref.c (.../tags/gcc_4_8_3_release)
9969
+++ b/src/gcc/tree-data-ref.c (.../branches/gcc-4_8-branch)
9971
ref = fold_build2_loc (EXPR_LOCATION (ref),
9972
MEM_REF, TREE_TYPE (ref),
9974
- DR_UNCONSTRAINED_BASE (dr) = true;
9975
access_fns.safe_push (access_fn);
9978
@@ -1326,14 +1325,20 @@
9982
- /* If we had an evolution in a MEM_REF BASE_OBJECT we do not know
9983
- the size of the base-object. So we cannot do any offset/overlap
9984
- based analysis but have to rely on points-to information only. */
9985
+ /* If we had an evolution in a pointer-based MEM_REF BASE_OBJECT we
9986
+ do not know the size of the base-object. So we cannot do any
9987
+ offset/overlap based analysis but have to rely on points-to
9988
+ information only. */
9989
if (TREE_CODE (addr_a) == MEM_REF
9990
- && DR_UNCONSTRAINED_BASE (a))
9991
+ && TREE_CODE (TREE_OPERAND (addr_a, 0)) == SSA_NAME)
9993
- if (TREE_CODE (addr_b) == MEM_REF
9994
- && DR_UNCONSTRAINED_BASE (b))
9995
+ /* For true dependences we can apply TBAA. */
9996
+ if (flag_strict_aliasing
9997
+ && DR_IS_WRITE (a) && DR_IS_READ (b)
9998
+ && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
9999
+ get_alias_set (DR_REF (b))))
10001
+ if (TREE_CODE (addr_b) == MEM_REF)
10002
return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
10003
TREE_OPERAND (addr_b, 0));
10005
@@ -1341,9 +1346,21 @@
10006
build_fold_addr_expr (addr_b));
10008
else if (TREE_CODE (addr_b) == MEM_REF
10009
- && DR_UNCONSTRAINED_BASE (b))
10010
- return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
10011
- TREE_OPERAND (addr_b, 0));
10012
+ && TREE_CODE (TREE_OPERAND (addr_b, 0)) == SSA_NAME)
10014
+ /* For true dependences we can apply TBAA. */
10015
+ if (flag_strict_aliasing
10016
+ && DR_IS_WRITE (a) && DR_IS_READ (b)
10017
+ && !alias_sets_conflict_p (get_alias_set (DR_REF (a)),
10018
+ get_alias_set (DR_REF (b))))
10020
+ if (TREE_CODE (addr_a) == MEM_REF)
10021
+ return ptr_derefs_may_alias_p (TREE_OPERAND (addr_a, 0),
10022
+ TREE_OPERAND (addr_b, 0));
10024
+ return ptr_derefs_may_alias_p (build_fold_addr_expr (addr_a),
10025
+ TREE_OPERAND (addr_b, 0));
10028
/* Otherwise DR_BASE_OBJECT is an access that covers the whole object
10029
that is being subsetted in the loop nest. */
10030
Index: gcc/tree-data-ref.h
10031
===================================================================
10032
--- a/src/gcc/tree-data-ref.h (.../tags/gcc_4_8_3_release)
10033
+++ b/src/gcc/tree-data-ref.h (.../branches/gcc-4_8-branch)
10036
/* A list of chrecs. Access functions of the indices. */
10037
vec<tree> access_fns;
10039
- /* Whether BASE_OBJECT is an access representing the whole object
10040
- or whether the access could not be constrained. */
10041
- bool unconstrained_base;
10045
@@ -195,7 +191,6 @@
10046
#define DR_STMT(DR) (DR)->stmt
10047
#define DR_REF(DR) (DR)->ref
10048
#define DR_BASE_OBJECT(DR) (DR)->indices.base_object
10049
-#define DR_UNCONSTRAINED_BASE(DR) (DR)->indices.unconstrained_base
10050
#define DR_ACCESS_FNS(DR) (DR)->indices.access_fns
10051
#define DR_ACCESS_FN(DR, I) DR_ACCESS_FNS (DR)[I]
10052
#define DR_NUM_DIMENSIONS(DR) DR_ACCESS_FNS (DR).length ()
10053
Index: gcc/tree-vect-data-refs.c
10054
===================================================================
10055
--- a/src/gcc/tree-vect-data-refs.c (.../tags/gcc_4_8_3_release)
10056
+++ b/src/gcc/tree-vect-data-refs.c (.../branches/gcc-4_8-branch)
10057
@@ -3553,6 +3553,9 @@
10059
if LOOP=i_loop: &in (relative to i_loop)
10060
if LOOP=j_loop: &in+i*2B (relative to j_loop)
10061
+ BYTE_OFFSET: Optional, defaulted to NULL. If supplied, it is added to the
10062
+ initial address. Unlike OFFSET, which is number of elements to
10063
+ be added, BYTE_OFFSET is measured in bytes.
10066
1. Return an SSA_NAME whose value is the address of the memory location of
10067
@@ -3566,7 +3569,8 @@
10068
vect_create_addr_base_for_vector_ref (gimple stmt,
10069
gimple_seq *new_stmt_list,
10071
- struct loop *loop)
10072
+ struct loop *loop,
10073
+ tree byte_offset)
10075
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
10076
struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
10077
@@ -3628,7 +3632,17 @@
10078
base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
10079
gimple_seq_add_seq (new_stmt_list, seq);
10083
+ tree tmp = create_tmp_var (sizetype, "offset");
10085
+ byte_offset = fold_convert (sizetype, byte_offset);
10086
+ base_offset = fold_build2 (PLUS_EXPR, sizetype,
10087
+ base_offset, byte_offset);
10088
+ base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
10089
+ gimple_seq_add_seq (new_stmt_list, seq);
10092
/* base + base_offset */
10094
addr_base = fold_build_pointer_plus (data_ref_base, base_offset);
10095
@@ -3692,6 +3706,10 @@
10096
5. BSI: location where the new stmts are to be placed if there is no loop
10097
6. ONLY_INIT: indicate if ap is to be updated in the loop, or remain
10098
pointing to the initial address.
10099
+ 7. BYTE_OFFSET (optional, defaults to NULL): a byte offset to be added
10100
+ to the initial address accessed by the data-ref in STMT. This is
10101
+ similar to OFFSET, but OFFSET is counted in elements, while BYTE_OFFSET
10105
1. Declare a new ptr to vector_type, and have it point to the base of the
10106
@@ -3705,6 +3723,8 @@
10107
initial_address = &a[init];
10108
if OFFSET is supplied:
10109
initial_address = &a[init + OFFSET];
10110
+ if BYTE_OFFSET is supplied:
10111
+ initial_address = &a[init] + BYTE_OFFSET;
10113
Return the initial_address in INITIAL_ADDRESS.
10115
@@ -3722,7 +3742,7 @@
10116
vect_create_data_ref_ptr (gimple stmt, tree aggr_type, struct loop *at_loop,
10117
tree offset, tree *initial_address,
10118
gimple_stmt_iterator *gsi, gimple *ptr_incr,
10119
- bool only_init, bool *inv_p)
10120
+ bool only_init, bool *inv_p, tree byte_offset)
10122
const char *base_name;
10123
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
10124
@@ -3881,10 +3901,10 @@
10125
/* (2) Calculate the initial address of the aggregate-pointer, and set
10126
the aggregate-pointer to point to it before the loop. */
10128
- /* Create: (&(base[init_val+offset]) in the loop preheader. */
10129
+ /* Create: (&(base[init_val+offset]+byte_offset) in the loop preheader. */
10131
new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
10133
+ offset, loop, byte_offset);
10137
Index: gcc/emit-rtl.c
10138
===================================================================
10139
--- a/src/gcc/emit-rtl.c (.../tags/gcc_4_8_3_release)
10140
+++ b/src/gcc/emit-rtl.c (.../branches/gcc-4_8-branch)
10141
@@ -263,7 +263,7 @@
10143
/* Return true if the given memory attributes are equal. */
10147
mem_attrs_eq_p (const struct mem_attrs *p, const struct mem_attrs *q)
10149
return (p->alias == q->alias
10150
Index: gcc/gimple-fold.c
10151
===================================================================
10152
--- a/src/gcc/gimple-fold.c (.../tags/gcc_4_8_3_release)
10153
+++ b/src/gcc/gimple-fold.c (.../branches/gcc-4_8-branch)
10154
@@ -2955,8 +2955,8 @@
10156
if (!AGGREGATE_TYPE_P (TREE_TYPE (ctor)) && !offset
10157
/* VIEW_CONVERT_EXPR is defined only for matching sizes. */
10158
- && operand_equal_p (TYPE_SIZE (type),
10159
- TYPE_SIZE (TREE_TYPE (ctor)), 0))
10160
+ && !compare_tree_int (TYPE_SIZE (type), size)
10161
+ && !compare_tree_int (TYPE_SIZE (TREE_TYPE (ctor)), size))
10163
ret = canonicalize_constructor_val (unshare_expr (ctor), from_decl);
10164
ret = fold_unary (VIEW_CONVERT_EXPR, type, ret);
10165
Index: gcc/emit-rtl.h
10166
===================================================================
10167
--- a/src/gcc/emit-rtl.h (.../tags/gcc_4_8_3_release)
10168
+++ b/src/gcc/emit-rtl.h (.../branches/gcc-4_8-branch)
10170
#ifndef GCC_EMIT_RTL_H
10171
#define GCC_EMIT_RTL_H
10173
+/* Return whether two MEM_ATTRs are equal. */
10174
+bool mem_attrs_eq_p (const struct mem_attrs *, const struct mem_attrs *);
10176
/* Set the alias set of MEM to SET. */
10177
extern void set_mem_alias_set (rtx, alias_set_type);
10179
Index: gcc/tree-cfgcleanup.c
10180
===================================================================
10181
--- a/src/gcc/tree-cfgcleanup.c (.../tags/gcc_4_8_3_release)
10182
+++ b/src/gcc/tree-cfgcleanup.c (.../branches/gcc-4_8-branch)
10183
@@ -498,7 +498,20 @@
10185
/* First split basic block if stmt is not last. */
10186
if (stmt != gsi_stmt (gsi_last_bb (bb)))
10187
- split_block (bb, stmt);
10189
+ if (stmt == gsi_stmt (gsi_last_nondebug_bb (bb)))
10191
+ /* Don't split if there are only debug stmts
10192
+ after stmt, that can result in -fcompare-debug
10193
+ failures. Remove the debug stmts instead,
10194
+ they should be all unreachable anyway. */
10195
+ gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
10196
+ for (gsi_next (&gsi); !gsi_end_p (gsi); )
10197
+ gsi_remove (&gsi, true);
10200
+ split_block (bb, stmt);
10203
changed |= remove_fallthru_edge (bb->succs);
10205
Index: gcc/tree-sra.c
10206
===================================================================
10207
--- a/src/gcc/tree-sra.c (.../tags/gcc_4_8_3_release)
10208
+++ b/src/gcc/tree-sra.c (.../branches/gcc-4_8-branch)
10209
@@ -1030,6 +1030,11 @@
10213
+ if (TREE_THIS_VOLATILE (expr))
10215
+ disqualify_base_of_expr (expr, "part of a volatile reference.");
10219
switch (TREE_CODE (expr))
10221
Index: gcc/graphite-clast-to-gimple.c
10222
===================================================================
10223
--- a/src/gcc/graphite-clast-to-gimple.c (.../tags/gcc_4_8_3_release)
10224
+++ b/src/gcc/graphite-clast-to-gimple.c (.../branches/gcc-4_8-branch)
10226
#include <isl/aff.h>
10227
#include <cloog/cloog.h>
10228
#include <cloog/isl/domain.h>
10229
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10230
+#include <isl/deprecated/int.h>
10231
+#include <isl/lp.h>
10232
+#include <isl/deprecated/ilp_int.h>
10236
#include "system.h"
10237
#include "coretypes.h"
10238
Index: gcc/common.opt
10239
===================================================================
10240
--- a/src/gcc/common.opt (.../tags/gcc_4_8_3_release)
10241
+++ b/src/gcc/common.opt (.../branches/gcc-4_8-branch)
10242
@@ -1226,6 +1226,10 @@
10243
Common Report Var(flag_tm)
10244
Enable support for GNU transactional memory
10247
+Common Report Var(flag_gnu_unique) Init(1)
10248
+Use STB_GNU_UNIQUE if supported by the assembler
10252
Does nothing. Preserved for backward compatibility.
10253
Index: gcc/graphite-optimize-isl.c
10254
===================================================================
10255
--- a/src/gcc/graphite-optimize-isl.c (.../tags/gcc_4_8_3_release)
10256
+++ b/src/gcc/graphite-optimize-isl.c (.../branches/gcc-4_8-branch)
10258
#include <isl/band.h>
10259
#include <isl/aff.h>
10260
#include <isl/options.h>
10261
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10262
+#include <isl/deprecated/int.h>
10263
+#include <isl/deprecated/aff_int.h>
10267
#include "system.h"
10268
#include "coretypes.h"
10269
@@ -365,7 +369,11 @@
10271
for (i = ScheduleDimensions - 1 ; i >= 0 ; i--)
10273
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10274
+ if (isl_band_member_is_coincident (Band, i))
10276
if (isl_band_member_is_zero_distance(Band, i))
10280
isl_union_map *TileUMap;
10281
Index: gcc/tree-vect-patterns.c
10282
===================================================================
10283
--- a/src/gcc/tree-vect-patterns.c (.../tags/gcc_4_8_3_release)
10284
+++ b/src/gcc/tree-vect-patterns.c (.../branches/gcc-4_8-branch)
10285
@@ -395,7 +395,7 @@
10288
oprnd00 = gimple_assign_rhs1 (def_stmt);
10289
- if (!type_conversion_p (oprnd0, stmt, true, &half_type1, &def_stmt,
10290
+ if (!type_conversion_p (oprnd1, stmt, true, &half_type1, &def_stmt,
10294
Index: gcc/sched-deps.c
10295
===================================================================
10296
--- a/src/gcc/sched-deps.c (.../tags/gcc_4_8_3_release)
10297
+++ b/src/gcc/sched-deps.c (.../branches/gcc-4_8-branch)
10298
@@ -2744,7 +2744,8 @@
10299
Consider for instance a volatile asm that changes the fpu rounding
10300
mode. An insn should not be moved across this even if it only uses
10301
pseudo-regs because it might give an incorrectly rounded result. */
10302
- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
10303
+ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
10304
+ && !DEBUG_INSN_P (insn))
10305
reg_pending_barrier = TRUE_BARRIER;
10307
/* For all ASM_OPERANDS, we must traverse the vector of input operands.
10308
Index: gcc/graphite-poly.c
10309
===================================================================
10310
--- a/src/gcc/graphite-poly.c (.../tags/gcc_4_8_3_release)
10311
+++ b/src/gcc/graphite-poly.c (.../branches/gcc-4_8-branch)
10313
#include <isl/aff.h>
10314
#include <cloog/cloog.h>
10315
#include <cloog/isl/domain.h>
10316
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10317
+#include <isl/deprecated/int.h>
10318
+#include <isl/deprecated/ilp_int.h>
10322
#include "system.h"
10323
#include "coretypes.h"
10324
Index: gcc/tree-vect-stmts.c
10325
===================================================================
10326
--- a/src/gcc/tree-vect-stmts.c (.../tags/gcc_4_8_3_release)
10327
+++ b/src/gcc/tree-vect-stmts.c (.../branches/gcc-4_8-branch)
10328
@@ -4319,6 +4319,7 @@
10329
int i, j, group_size;
10330
tree msq = NULL_TREE, lsq;
10331
tree offset = NULL_TREE;
10332
+ tree byte_offset = NULL_TREE;
10333
tree realignment_token = NULL_TREE;
10335
vec<tree> dr_chain = vNULL;
10336
@@ -4934,7 +4935,8 @@
10337
if (alignment_support_scheme == dr_explicit_realign_optimized)
10339
phi = SSA_NAME_DEF_STMT (msq);
10340
- offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
10341
+ byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype),
10346
@@ -4955,7 +4957,8 @@
10348
dataref_ptr = vect_create_data_ref_ptr (first_stmt, aggr_type, at_loop,
10349
offset, &dummy, gsi,
10350
- &ptr_incr, false, &inv_p);
10351
+ &ptr_incr, false, &inv_p,
10354
dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
10355
TYPE_SIZE_UNIT (aggr_type));
10356
Index: gcc/graphite-sese-to-poly.c
10357
===================================================================
10358
--- a/src/gcc/graphite-sese-to-poly.c (.../tags/gcc_4_8_3_release)
10359
+++ b/src/gcc/graphite-sese-to-poly.c (.../branches/gcc-4_8-branch)
10361
#include <cloog/cloog.h>
10362
#include <cloog/cloog.h>
10363
#include <cloog/isl/domain.h>
10364
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
10365
+#include <isl/deprecated/int.h>
10366
+#include <isl/deprecated/aff_int.h>
10367
+#include <isl/deprecated/constraint_int.h>
10371
#include "system.h"
10372
#include "coretypes.h"
10373
Index: gcc/combine.c
10374
===================================================================
10375
--- a/src/gcc/combine.c (.../tags/gcc_4_8_3_release)
10376
+++ b/src/gcc/combine.c (.../branches/gcc-4_8-branch)
10377
@@ -1527,8 +1527,8 @@
10378
uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg));
10380
/* The mode and signedness of the argument as it is actually passed,
10381
- after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */
10382
- mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3,
10383
+ see assign_parm_setup_reg in function.c. */
10384
+ mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns1,
10385
TREE_TYPE (cfun->decl), 0);
10387
/* The mode of the register in which the argument is being passed. */
10388
Index: gcc/config.gcc
10389
===================================================================
10390
--- a/src/gcc/config.gcc (.../tags/gcc_4_8_3_release)
10391
+++ b/src/gcc/config.gcc (.../branches/gcc-4_8-branch)
10392
@@ -2466,7 +2466,7 @@
10395
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
10396
- tmake_file="sparc/t-sparc sparc/t-elf sparc/t-rtems t-rtems"
10397
+ tmake_file="sparc/t-sparc sparc/t-rtems t-rtems"
10400
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
10401
@@ -2992,6 +2992,9 @@
10409
with_cpu="`echo ${target} | sed 's/-.*$//'`"
10411
@@ -3630,7 +3633,7 @@
10413
"" | sparc | sparcv9 | sparc64 \
10415
- | v8 | supersparc | hypersparc | leon | leon3 \
10416
+ | v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \
10417
| sparclite | f930 | f934 | sparclite86x \
10418
| sparclet | tsc701 \
10419
| v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
10421
===================================================================
10422
--- a/src/gcc/ree.c (.../tags/gcc_4_8_3_release)
10423
+++ b/src/gcc/ree.c (.../branches/gcc-4_8-branch)
10424
@@ -261,6 +261,50 @@
10426
static int max_insn_uid;
10428
+/* Update or remove REG_EQUAL or REG_EQUIV notes for INSN. */
10431
+update_reg_equal_equiv_notes (rtx insn, enum machine_mode new_mode,
10432
+ enum machine_mode old_mode, enum rtx_code code)
10434
+ rtx *loc = ®_NOTES (insn);
10437
+ enum reg_note kind = REG_NOTE_KIND (*loc);
10438
+ if (kind == REG_EQUAL || kind == REG_EQUIV)
10440
+ rtx orig_src = XEXP (*loc, 0);
10441
+ /* Update equivalency constants. Recall that RTL constants are
10442
+ sign-extended. */
10443
+ if (GET_CODE (orig_src) == CONST_INT
10444
+ && HOST_BITS_PER_WIDE_INT >= GET_MODE_BITSIZE (new_mode))
10446
+ if (INTVAL (orig_src) >= 0 || code == SIGN_EXTEND)
10447
+ /* Nothing needed. */;
10450
+ /* Zero-extend the negative constant by masking out the
10451
+ bits outside the source mode. */
10452
+ rtx new_const_int
10453
+ = gen_int_mode (INTVAL (orig_src)
10454
+ & GET_MODE_MASK (old_mode),
10456
+ if (!validate_change (insn, &XEXP (*loc, 0),
10457
+ new_const_int, true))
10460
+ loc = &XEXP (*loc, 1);
10462
+ /* Drop all other notes, they assume a wrong mode. */
10463
+ else if (!validate_change (insn, loc, XEXP (*loc, 1), true))
10467
+ loc = &XEXP (*loc, 1);
10472
/* Given a insn (CURR_INSN), an extension candidate for removal (CAND)
10473
and a pointer to the SET rtx (ORIG_SET) that needs to be modified,
10474
this code modifies the SET rtx to a new SET rtx that extends the
10475
@@ -282,6 +326,7 @@
10476
combine_set_extension (ext_cand *cand, rtx curr_insn, rtx *orig_set)
10478
rtx orig_src = SET_SRC (*orig_set);
10479
+ enum machine_mode orig_mode = GET_MODE (SET_DEST (*orig_set));
10480
rtx new_reg = gen_rtx_REG (cand->mode, REGNO (SET_DEST (*orig_set)));
10483
@@ -296,9 +341,8 @@
10485
/* Zero-extend the negative constant by masking out the bits outside
10486
the source mode. */
10487
- enum machine_mode src_mode = GET_MODE (SET_DEST (*orig_set));
10489
- = GEN_INT (INTVAL (orig_src) & GET_MODE_MASK (src_mode));
10490
+ = GEN_INT (INTVAL (orig_src) & GET_MODE_MASK (orig_mode));
10491
new_set = gen_rtx_SET (VOIDmode, new_reg, new_const_int);
10494
@@ -336,7 +380,9 @@
10496
/* This change is a part of a group of changes. Hence,
10497
validate_change will not try to commit the change. */
10498
- if (validate_change (curr_insn, orig_set, new_set, true))
10499
+ if (validate_change (curr_insn, orig_set, new_set, true)
10500
+ && update_reg_equal_equiv_notes (curr_insn, cand->mode, orig_mode,
10505
@@ -385,7 +431,9 @@
10506
ifexpr = gen_rtx_IF_THEN_ELSE (cand->mode, cond, map_srcreg, map_srcreg2);
10507
new_set = gen_rtx_SET (VOIDmode, map_dstreg, ifexpr);
10509
- if (validate_change (def_insn, &PATTERN (def_insn), new_set, true))
10510
+ if (validate_change (def_insn, &PATTERN (def_insn), new_set, true)
10511
+ && update_reg_equal_equiv_notes (def_insn, cand->mode, GET_MODE (dstreg),
10516
Index: gcc/config/alpha/elf.h
10517
===================================================================
10518
--- a/src/gcc/config/alpha/elf.h (.../tags/gcc_4_8_3_release)
10519
+++ b/src/gcc/config/alpha/elf.h (.../branches/gcc-4_8-branch)
10520
@@ -126,6 +126,10 @@
10521
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
10522
%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
10524
+/* This variable should be set to 'true' if the target ABI requires
10525
+ unwinding tables even when exceptions are not used. */
10526
+#define TARGET_UNWIND_TABLES_DEFAULT true
10528
/* Select a format to encode pointers in exception handling data. CODE
10529
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
10530
true if the symbol may be affected by dynamic relocations.
10531
Index: gcc/config/alpha/alpha.c
10532
===================================================================
10533
--- a/src/gcc/config/alpha/alpha.c (.../tags/gcc_4_8_3_release)
10534
+++ b/src/gcc/config/alpha/alpha.c (.../branches/gcc-4_8-branch)
10535
@@ -8658,6 +8658,11 @@
10540
+ /* __builtin_unreachable can expand to no code at all,
10541
+ leaving (barrier) RTXes in the instruction stream. */
10542
+ goto close_shadow_notrapb;
10547
@@ -8673,6 +8678,7 @@
10548
n = emit_insn_before (gen_trapb (), i);
10549
PUT_MODE (n, TImode);
10550
PUT_MODE (i, TImode);
10551
+ close_shadow_notrapb:
10554
shadow.used.fp = 0;
10555
Index: gcc/config/elfos.h
10556
===================================================================
10557
--- a/src/gcc/config/elfos.h (.../tags/gcc_4_8_3_release)
10558
+++ b/src/gcc/config/elfos.h (.../branches/gcc-4_8-branch)
10559
@@ -287,7 +287,7 @@
10560
/* Write the extra assembler code needed to declare an object properly. */
10562
#ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
10563
-#define USE_GNU_UNIQUE_OBJECT 1
10564
+#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
10566
#define USE_GNU_UNIQUE_OBJECT 0
10568
Index: gcc/config/sparc/t-rtems
10569
===================================================================
10570
--- a/src/gcc/config/sparc/t-rtems (.../tags/gcc_4_8_3_release)
10571
+++ b/src/gcc/config/sparc/t-rtems (.../branches/gcc-4_8-branch)
10573
# <http://www.gnu.org/licenses/>.
10576
-MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3
10577
-MULTILIB_DIRNAMES = soft v8 leon3
10578
+MULTILIB_OPTIONS = msoft-float mcpu=v8/mcpu=leon3/mcpu=leon3v7 muser-mode
10579
+MULTILIB_DIRNAMES = soft v8 leon3 leon3v7 user-mode
10580
MULTILIB_MATCHES = msoft-float=mno-fpu
10582
+MULTILIB_EXCEPTIONS = muser-mode
10583
+MULTILIB_EXCEPTIONS += mcpu=leon3
10584
+MULTILIB_EXCEPTIONS += mcpu=leon3v7
10585
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3
10586
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=leon3v7
10587
+MULTILIB_EXCEPTIONS += msoft-float/muser-mode
10588
+MULTILIB_EXCEPTIONS += msoft-float/mcpu=v8/muser-mode
10589
+MULTILIB_EXCEPTIONS += mcpu=v8/muser-mode
10590
Index: gcc/config/sparc/sparc.md
10591
===================================================================
10592
--- a/src/gcc/config/sparc/sparc.md (.../tags/gcc_4_8_3_release)
10593
+++ b/src/gcc/config/sparc/sparc.md (.../branches/gcc-4_8-branch)
10594
@@ -215,6 +215,7 @@
10602
Index: gcc/config/sparc/sparc.opt
10603
===================================================================
10604
--- a/src/gcc/config/sparc/sparc.opt (.../tags/gcc_4_8_3_release)
10605
+++ b/src/gcc/config/sparc/sparc.opt (.../branches/gcc-4_8-branch)
10606
@@ -153,6 +153,9 @@
10607
Enum(sparc_processor_type) String(leon3) Value(PROCESSOR_LEON3)
10610
+Enum(sparc_processor_type) String(leon3v7) Value(PROCESSOR_LEON3V7)
10613
Enum(sparc_processor_type) String(sparclite) Value(PROCESSOR_SPARCLITE)
10616
Index: gcc/config/sparc/sync.md
10617
===================================================================
10618
--- a/src/gcc/config/sparc/sync.md (.../tags/gcc_4_8_3_release)
10619
+++ b/src/gcc/config/sparc/sync.md (.../branches/gcc-4_8-branch)
10620
@@ -64,11 +64,19 @@
10622
[(set_attr "type" "multi")])
10624
+;; For LEON3, STB has the effect of membar #StoreLoad.
10625
+(define_insn "*membar_storeload_leon3"
10626
+ [(set (match_operand:BLK 0 "" "")
10627
+ (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
10629
+ "stb\t%%g0, [%%sp-1]"
10630
+ [(set_attr "type" "store")])
10632
;; For V8, LDSTUB has the effect of membar #StoreLoad.
10633
(define_insn "*membar_storeload"
10634
[(set (match_operand:BLK 0 "" "")
10635
(unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
10637
+ "TARGET_V8 && !TARGET_LEON3"
10638
"ldstub\t[%%sp-1], %%g0"
10639
[(set_attr "type" "multi")])
10641
Index: gcc/config/sparc/sparc-opts.h
10642
===================================================================
10643
--- a/src/gcc/config/sparc/sparc-opts.h (.../tags/gcc_4_8_3_release)
10644
+++ b/src/gcc/config/sparc/sparc-opts.h (.../branches/gcc-4_8-branch)
10646
PROCESSOR_HYPERSPARC,
10649
+ PROCESSOR_LEON3V7,
10650
PROCESSOR_SPARCLITE,
10653
Index: gcc/config/sparc/sparc.c
10654
===================================================================
10655
--- a/src/gcc/config/sparc/sparc.c (.../tags/gcc_4_8_3_release)
10656
+++ b/src/gcc/config/sparc/sparc.c (.../branches/gcc-4_8-branch)
10657
@@ -1210,6 +1210,7 @@
10658
{ TARGET_CPU_hypersparc, PROCESSOR_HYPERSPARC },
10659
{ TARGET_CPU_leon, PROCESSOR_LEON },
10660
{ TARGET_CPU_leon3, PROCESSOR_LEON3 },
10661
+ { TARGET_CPU_leon3v7, PROCESSOR_LEON3V7 },
10662
{ TARGET_CPU_sparclite, PROCESSOR_F930 },
10663
{ TARGET_CPU_sparclite86x, PROCESSOR_SPARCLITE86X },
10664
{ TARGET_CPU_sparclet, PROCESSOR_TSC701 },
10665
@@ -1238,6 +1239,7 @@
10666
{ "hypersparc", MASK_ISA, MASK_V8|MASK_FPU },
10667
{ "leon", MASK_ISA, MASK_V8|MASK_LEON|MASK_FPU },
10668
{ "leon3", MASK_ISA, MASK_V8|MASK_LEON3|MASK_FPU },
10669
+ { "leon3v7", MASK_ISA, MASK_LEON3|MASK_FPU },
10670
{ "sparclite", MASK_ISA, MASK_SPARCLITE },
10671
/* The Fujitsu MB86930 is the original sparclite chip, with no FPU. */
10672
{ "f930", MASK_ISA|MASK_FPU, MASK_SPARCLITE },
10673
@@ -1490,6 +1492,7 @@
10674
sparc_costs = &leon_costs;
10676
case PROCESSOR_LEON3:
10677
+ case PROCESSOR_LEON3V7:
10678
sparc_costs = &leon3_costs;
10680
case PROCESSOR_SPARCLET:
10681
Index: gcc/config/sparc/leon.md
10682
===================================================================
10683
--- a/src/gcc/config/sparc/leon.md (.../tags/gcc_4_8_3_release)
10684
+++ b/src/gcc/config/sparc/leon.md (.../branches/gcc-4_8-branch)
10685
@@ -29,11 +29,11 @@
10687
;; Use a double reservation to work around the load pipeline hazard on UT699.
10688
(define_insn_reservation "leon3_load" 1
10689
- (and (eq_attr "cpu" "leon3") (eq_attr "type" "load,sload"))
10690
+ (and (eq_attr "cpu" "leon3,leon3v7") (eq_attr "type" "load,sload"))
10693
(define_insn_reservation "leon_store" 2
10694
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "store"))
10695
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "store"))
10698
;; This describes Gaisler Research's FPU
10699
@@ -44,21 +44,21 @@
10700
(define_cpu_unit "grfpu_ds" "grfpu")
10702
(define_insn_reservation "leon_fp_alu" 4
10703
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fp,fpcmp,fpmul"))
10704
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fp,fpcmp,fpmul"))
10705
"grfpu_alu, nothing*3")
10707
(define_insn_reservation "leon_fp_divs" 16
10708
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivs"))
10709
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivs"))
10710
"grfpu_ds*14, nothing*2")
10712
(define_insn_reservation "leon_fp_divd" 17
10713
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpdivd"))
10714
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpdivd"))
10715
"grfpu_ds*15, nothing*2")
10717
(define_insn_reservation "leon_fp_sqrts" 24
10718
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrts"))
10719
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrts"))
10720
"grfpu_ds*22, nothing*2")
10722
(define_insn_reservation "leon_fp_sqrtd" 25
10723
- (and (eq_attr "cpu" "leon,leon3") (eq_attr "type" "fpsqrtd"))
10724
+ (and (eq_attr "cpu" "leon,leon3,leon3v7") (eq_attr "type" "fpsqrtd"))
10725
"grfpu_ds*23, nothing*2")
10726
Index: gcc/config/sparc/sparc.h
10727
===================================================================
10728
--- a/src/gcc/config/sparc/sparc.h (.../tags/gcc_4_8_3_release)
10729
+++ b/src/gcc/config/sparc/sparc.h (.../branches/gcc-4_8-branch)
10730
@@ -137,21 +137,22 @@
10731
#define TARGET_CPU_hypersparc 3
10732
#define TARGET_CPU_leon 4
10733
#define TARGET_CPU_leon3 5
10734
-#define TARGET_CPU_sparclite 6
10735
-#define TARGET_CPU_f930 6 /* alias */
10736
-#define TARGET_CPU_f934 6 /* alias */
10737
-#define TARGET_CPU_sparclite86x 7
10738
-#define TARGET_CPU_sparclet 8
10739
-#define TARGET_CPU_tsc701 8 /* alias */
10740
-#define TARGET_CPU_v9 9 /* generic v9 implementation */
10741
-#define TARGET_CPU_sparcv9 9 /* alias */
10742
-#define TARGET_CPU_sparc64 9 /* alias */
10743
-#define TARGET_CPU_ultrasparc 10
10744
-#define TARGET_CPU_ultrasparc3 11
10745
-#define TARGET_CPU_niagara 12
10746
-#define TARGET_CPU_niagara2 13
10747
-#define TARGET_CPU_niagara3 14
10748
-#define TARGET_CPU_niagara4 15
10749
+#define TARGET_CPU_leon3v7 6
10750
+#define TARGET_CPU_sparclite 7
10751
+#define TARGET_CPU_f930 7 /* alias */
10752
+#define TARGET_CPU_f934 7 /* alias */
10753
+#define TARGET_CPU_sparclite86x 8
10754
+#define TARGET_CPU_sparclet 9
10755
+#define TARGET_CPU_tsc701 9 /* alias */
10756
+#define TARGET_CPU_v9 10 /* generic v9 implementation */
10757
+#define TARGET_CPU_sparcv9 10 /* alias */
10758
+#define TARGET_CPU_sparc64 10 /* alias */
10759
+#define TARGET_CPU_ultrasparc 11
10760
+#define TARGET_CPU_ultrasparc3 12
10761
+#define TARGET_CPU_niagara 13
10762
+#define TARGET_CPU_niagara2 14
10763
+#define TARGET_CPU_niagara3 15
10764
+#define TARGET_CPU_niagara4 16
10766
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
10767
|| TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
10768
@@ -239,8 +240,13 @@
10769
#define ASM_CPU32_DEFAULT_SPEC AS_LEON_FLAG
10772
+#if TARGET_CPU_DEFAULT == TARGET_CPU_leon3v7
10773
+#define CPP_CPU32_DEFAULT_SPEC "-D__leon__"
10774
+#define ASM_CPU32_DEFAULT_SPEC AS_LEONV7_FLAG
10779
#if !defined(CPP_CPU32_DEFAULT_SPEC) || !defined(CPP_CPU64_DEFAULT_SPEC)
10780
#error Unrecognized value in TARGET_CPU_DEFAULT.
10782
@@ -285,6 +291,7 @@
10783
%{mcpu=hypersparc:-D__hypersparc__ -D__sparc_v8__} \
10784
%{mcpu=leon:-D__leon__ -D__sparc_v8__} \
10785
%{mcpu=leon3:-D__leon__ -D__sparc_v8__} \
10786
+%{mcpu=leon3v7:-D__leon__} \
10787
%{mcpu=v9:-D__sparc_v9__} \
10788
%{mcpu=ultrasparc:-D__sparc_v9__} \
10789
%{mcpu=ultrasparc3:-D__sparc_v9__} \
10790
@@ -334,6 +341,7 @@
10791
%{mcpu=hypersparc:-Av8} \
10792
%{mcpu=leon:" AS_LEON_FLAG "} \
10793
%{mcpu=leon3:" AS_LEON_FLAG "} \
10794
+%{mcpu=leon3v7:" AS_LEONV7_FLAG "} \
10795
%{mv8plus:-Av8plus} \
10797
%{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \
10798
@@ -1760,8 +1768,10 @@
10800
#ifdef HAVE_AS_LEON
10801
#define AS_LEON_FLAG "-Aleon"
10802
+#define AS_LEONV7_FLAG "-Aleon"
10804
#define AS_LEON_FLAG "-Av8"
10805
+#define AS_LEONV7_FLAG "-Av7"
10808
/* We use gcc _mcount for profiling. */
10809
Index: gcc/config/i386/i386.md
10810
===================================================================
10811
--- a/src/gcc/config/i386/i386.md (.../tags/gcc_4_8_3_release)
10812
+++ b/src/gcc/config/i386/i386.md (.../branches/gcc-4_8-branch)
10813
@@ -5339,66 +5339,37 @@
10815
;; Avoid store forwarding (partial memory) stall penalty by extending
10816
;; SImode value to DImode through XMM register instead of pushing two
10817
-;; SImode values to stack. Note that even !TARGET_INTER_UNIT_MOVES
10818
-;; targets benefit from this optimization. Also note that fild
10819
-;; loads from memory only.
10820
+;; SImode values to stack. Also note that fild loads from memory only.
10822
-(define_insn "*floatunssi<mode>2_1"
10823
- [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
10824
+(define_insn_and_split "*floatunssi<mode>2_i387_with_xmm"
10825
+ [(set (match_operand:X87MODEF 0 "register_operand" "=f")
10826
(unsigned_float:X87MODEF
10827
- (match_operand:SI 1 "nonimmediate_operand" "x,m")))
10828
- (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
10829
- (clobber (match_scratch:SI 3 "=X,x"))]
10830
+ (match_operand:SI 1 "nonimmediate_operand" "rm")))
10831
+ (clobber (match_scratch:DI 3 "=x"))
10832
+ (clobber (match_operand:DI 2 "memory_operand" "=m"))]
10834
&& TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
10836
+ && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES"
10838
+ "&& reload_completed"
10839
+ [(set (match_dup 3) (zero_extend:DI (match_dup 1)))
10840
+ (set (match_dup 2) (match_dup 3))
10841
+ (set (match_dup 0)
10842
+ (float:X87MODEF (match_dup 2)))]
10844
[(set_attr "type" "multi")
10845
(set_attr "mode" "<MODE>")])
10848
- [(set (match_operand:X87MODEF 0 "register_operand")
10849
- (unsigned_float:X87MODEF
10850
- (match_operand:SI 1 "register_operand")))
10851
- (clobber (match_operand:DI 2 "memory_operand"))
10852
- (clobber (match_scratch:SI 3))]
10854
- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
10856
- && reload_completed"
10857
- [(set (match_dup 2) (match_dup 1))
10858
- (set (match_dup 0)
10859
- (float:X87MODEF (match_dup 2)))]
10860
- "operands[1] = simplify_gen_subreg (DImode, operands[1], SImode, 0);")
10863
- [(set (match_operand:X87MODEF 0 "register_operand")
10864
- (unsigned_float:X87MODEF
10865
- (match_operand:SI 1 "memory_operand")))
10866
- (clobber (match_operand:DI 2 "memory_operand"))
10867
- (clobber (match_scratch:SI 3))]
10869
- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
10871
- && reload_completed"
10872
- [(set (match_dup 2) (match_dup 3))
10873
- (set (match_dup 0)
10874
- (float:X87MODEF (match_dup 2)))]
10876
- emit_move_insn (operands[3], operands[1]);
10877
- operands[3] = simplify_gen_subreg (DImode, operands[3], SImode, 0);
10880
(define_expand "floatunssi<mode>2"
10882
[(set (match_operand:X87MODEF 0 "register_operand")
10883
(unsigned_float:X87MODEF
10884
(match_operand:SI 1 "nonimmediate_operand")))
10885
- (clobber (match_dup 2))
10886
- (clobber (match_scratch:SI 3))])]
10887
+ (clobber (match_scratch:DI 3))
10888
+ (clobber (match_dup 2))])]
10890
&& ((TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
10892
+ && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES)
10893
|| (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))"
10895
if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
10896
@@ -13545,7 +13516,8 @@
10897
(set (reg:CCFP FPSR_REG)
10898
(unspec:CCFP [(match_dup 2) (match_dup 3)]
10900
- "TARGET_USE_FANCY_MATH_387"
10901
+ "TARGET_USE_FANCY_MATH_387
10902
+ && flag_finite_math_only"
10904
[(set_attr "type" "fpspc")
10905
(set_attr "mode" "XF")])
10906
@@ -13554,7 +13526,8 @@
10907
[(use (match_operand:XF 0 "register_operand"))
10908
(use (match_operand:XF 1 "general_operand"))
10909
(use (match_operand:XF 2 "general_operand"))]
10910
- "TARGET_USE_FANCY_MATH_387"
10911
+ "TARGET_USE_FANCY_MATH_387
10912
+ && flag_finite_math_only"
10914
rtx label = gen_label_rtx ();
10916
@@ -13577,7 +13550,8 @@
10917
[(use (match_operand:MODEF 0 "register_operand"))
10918
(use (match_operand:MODEF 1 "general_operand"))
10919
(use (match_operand:MODEF 2 "general_operand"))]
10920
- "TARGET_USE_FANCY_MATH_387"
10921
+ "TARGET_USE_FANCY_MATH_387
10922
+ && flag_finite_math_only"
10924
rtx (*gen_truncxf) (rtx, rtx);
10926
@@ -13616,7 +13590,8 @@
10927
(set (reg:CCFP FPSR_REG)
10928
(unspec:CCFP [(match_dup 2) (match_dup 3)]
10930
- "TARGET_USE_FANCY_MATH_387"
10931
+ "TARGET_USE_FANCY_MATH_387
10932
+ && flag_finite_math_only"
10934
[(set_attr "type" "fpspc")
10935
(set_attr "mode" "XF")])
10936
@@ -13625,7 +13600,8 @@
10937
[(use (match_operand:XF 0 "register_operand"))
10938
(use (match_operand:XF 1 "general_operand"))
10939
(use (match_operand:XF 2 "general_operand"))]
10940
- "TARGET_USE_FANCY_MATH_387"
10941
+ "TARGET_USE_FANCY_MATH_387
10942
+ && flag_finite_math_only"
10944
rtx label = gen_label_rtx ();
10946
@@ -13648,7 +13624,8 @@
10947
[(use (match_operand:MODEF 0 "register_operand"))
10948
(use (match_operand:MODEF 1 "general_operand"))
10949
(use (match_operand:MODEF 2 "general_operand"))]
10950
- "TARGET_USE_FANCY_MATH_387"
10951
+ "TARGET_USE_FANCY_MATH_387
10952
+ && flag_finite_math_only"
10954
rtx (*gen_truncxf) (rtx, rtx);
10956
Index: gcc/config/i386/driver-i386.c
10957
===================================================================
10958
--- a/src/gcc/config/i386/driver-i386.c (.../tags/gcc_4_8_3_release)
10959
+++ b/src/gcc/config/i386/driver-i386.c (.../branches/gcc-4_8-branch)
10960
@@ -713,6 +713,11 @@
10961
/* Assume Core 2. */
10964
+ else if (has_longmode)
10965
+ /* Perhaps some emulator? Assume x86-64, otherwise gcc
10966
+ -march=native would be unusable for 64-bit compilations,
10967
+ as all the CPUs below are 32-bit only. */
10970
/* It is Core Duo. */
10972
Index: gcc/config/i386/i386.c
10973
===================================================================
10974
--- a/src/gcc/config/i386/i386.c (.../tags/gcc_4_8_3_release)
10975
+++ b/src/gcc/config/i386/i386.c (.../branches/gcc-4_8-branch)
10976
@@ -13800,7 +13800,7 @@
10977
if (mode == CCmode)
10979
else if (mode == CCCmode)
10981
+ suffix = fp ? "b" : "c";
10983
gcc_unreachable ();
10985
@@ -13823,9 +13823,9 @@
10988
if (mode == CCmode)
10989
- suffix = fp ? "nb" : "ae";
10991
else if (mode == CCCmode)
10993
+ suffix = fp ? "nb" : "nc";
10995
gcc_unreachable ();
10997
@@ -20505,7 +20505,7 @@
10998
t1 = gen_reg_rtx (V32QImode);
10999
t2 = gen_reg_rtx (V32QImode);
11000
t3 = gen_reg_rtx (V32QImode);
11001
- vt2 = GEN_INT (128);
11002
+ vt2 = GEN_INT (-128);
11003
for (i = 0; i < 32; i++)
11005
vt = gen_rtx_CONST_VECTOR (V32QImode, gen_rtvec_v (32, vec));
11006
@@ -24640,13 +24640,17 @@
11010
- /* Assume that region is SCC, i.e. all immediate predecessors
11011
- of non-head block are in the same region. */
11013
+ /* Regions are SCCs with the exception of selective
11014
+ scheduling with pipelining of outer blocks enabled.
11015
+ So also check that immediate predecessors of a non-head
11016
+ block are in the same region. */
11017
FOR_EACH_EDGE (e, ei, bb->preds)
11019
/* Avoid creating of loop-carried dependencies through
11020
- using topological odering in region. */
11021
- if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
11022
+ using topological ordering in the region. */
11023
+ if (rgn == CONTAINING_RGN (e->src->index)
11024
+ && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
11025
add_dependee_for_func_arg (first_arg, e->src);
11028
@@ -38807,8 +38811,8 @@
11029
op0 = gen_lowpart (V4DImode, d->op0);
11030
op1 = gen_lowpart (V4DImode, d->op1);
11032
- = GEN_INT (((d->perm[0] & (nelt / 2)) ? 1 : 0)
11033
- || ((d->perm[nelt / 2] & (nelt / 2)) ? 2 : 0));
11034
+ = GEN_INT ((d->perm[0] / (nelt / 2))
11035
+ | ((d->perm[nelt / 2] / (nelt / 2)) * 16));
11036
emit_insn (gen_avx2_permv2ti (target, op0, op1, rperm[0]));
11039
Index: gcc/config/sh/sh.c
11040
===================================================================
11041
--- a/src/gcc/config/sh/sh.c (.../tags/gcc_4_8_3_release)
11042
+++ b/src/gcc/config/sh/sh.c (.../branches/gcc-4_8-branch)
11043
@@ -808,6 +808,12 @@
11044
targetm.asm_out.aligned_op.di = NULL;
11045
targetm.asm_out.unaligned_op.di = NULL;
11048
+ /* User/priviledged mode is supported only on SH3*, SH4* and SH5*.
11049
+ Disable it for everything else. */
11050
+ if (! (TARGET_SH3 || TARGET_SH5) && TARGET_USERMODE)
11051
+ TARGET_USERMODE = false;
11055
if (! strcmp (sh_div_str, "call-div1"))
11056
@@ -3036,7 +3042,7 @@
11057
struct ashl_lshr_sequence
11061
+ signed char amount[6];
11065
Index: gcc/config/sh/sync.md
11066
===================================================================
11067
--- a/src/gcc/config/sh/sync.md (.../tags/gcc_4_8_3_release)
11068
+++ b/src/gcc/config/sh/sync.md (.../branches/gcc-4_8-branch)
11069
@@ -466,6 +466,7 @@
11070
(set (mem:SI (match_dup 1))
11072
[(match_operand:SI 2 "arith_operand" "rI08")] UNSPEC_ATOMIC))
11073
+ (set (reg:SI T_REG) (const_int 1))
11074
(clobber (reg:SI R0_REG))]
11075
"TARGET_ATOMIC_HARD_LLCS
11076
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11077
@@ -484,6 +485,7 @@
11078
(set (mem:QIHI (match_dup 1))
11080
[(match_operand:QIHI 2 "register_operand" "r")] UNSPEC_ATOMIC))
11081
+ (set (reg:SI T_REG) (const_int 1))
11082
(clobber (reg:SI R0_REG))
11083
(clobber (match_scratch:SI 3 "=&r"))
11084
(clobber (match_scratch:SI 4 "=1"))]
11085
@@ -617,6 +619,7 @@
11086
[(FETCHOP:SI (mem:SI (match_dup 1))
11087
(match_operand:SI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
11089
+ (set (reg:SI T_REG) (const_int 1))
11090
(clobber (reg:SI R0_REG))]
11091
"TARGET_ATOMIC_HARD_LLCS
11092
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11093
@@ -637,6 +640,7 @@
11094
[(FETCHOP:QIHI (mem:QIHI (match_dup 1))
11095
(match_operand:QIHI 2 "<fetchop_predicate>" "<fetchop_constraint>"))]
11097
+ (set (reg:SI T_REG) (const_int 1))
11098
(clobber (reg:SI R0_REG))
11099
(clobber (match_scratch:SI 3 "=&r"))
11100
(clobber (match_scratch:SI 4 "=1"))]
11101
@@ -784,6 +788,7 @@
11102
[(not:SI (and:SI (mem:SI (match_dup 1))
11103
(match_operand:SI 2 "logical_operand" "rK08")))]
11105
+ (set (reg:SI T_REG) (const_int 1))
11106
(clobber (reg:SI R0_REG))]
11107
"TARGET_ATOMIC_HARD_LLCS
11108
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11109
@@ -805,6 +810,7 @@
11110
[(not:QIHI (and:QIHI (mem:QIHI (match_dup 1))
11111
(match_operand:QIHI 2 "logical_operand" "rK08")))]
11113
+ (set (reg:SI T_REG) (const_int 1))
11114
(clobber (reg:SI R0_REG))
11115
(clobber (match_scratch:SI 3 "=&r"))
11116
(clobber (match_scratch:SI 4 "=1"))]
11117
@@ -903,7 +909,7 @@
11120
" mov.<bwl> %3,@%1" "\n"
11124
[(set_attr "length" "20")])
11126
@@ -960,7 +966,8 @@
11127
(set (mem:SI (match_dup 1))
11129
[(FETCHOP:SI (mem:SI (match_dup 1)) (match_dup 2))]
11132
+ (set (reg:SI T_REG) (const_int 1))]
11133
"TARGET_ATOMIC_HARD_LLCS
11134
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11136
@@ -980,6 +987,7 @@
11138
[(FETCHOP:QIHI (mem:QIHI (match_dup 1)) (match_dup 2))]
11140
+ (set (reg:SI T_REG) (const_int 1))
11141
(clobber (reg:SI R0_REG))
11142
(clobber (match_scratch:SI 3 "=&r"))
11143
(clobber (match_scratch:SI 4 "=1"))]
11144
@@ -1124,7 +1132,8 @@
11145
(set (mem:SI (match_dup 1))
11147
[(not:SI (and:SI (mem:SI (match_dup 1)) (match_dup 2)))]
11150
+ (set (reg:SI T_REG) (const_int 1))]
11151
"TARGET_ATOMIC_HARD_LLCS
11152
|| (TARGET_SH4A_ARCH && TARGET_ATOMIC_ANY && !TARGET_ATOMIC_STRICT)"
11154
@@ -1145,6 +1154,7 @@
11156
[(not:QIHI (and:QIHI (mem:QIHI (match_dup 1)) (match_dup 2)))]
11158
+ (set (reg:SI T_REG) (const_int 1))
11159
(clobber (reg:SI R0_REG))
11160
(clobber (match_scratch:SI 3 "=&r"))
11161
(clobber (match_scratch:SI 4 "=1"))]
11162
@@ -1353,7 +1363,7 @@
11164
" mov.b @%0,r0" "\n"
11165
" mov.b %1,@%0" "\n"
11166
- " stc %2,sr" "\n"
11167
+ " ldc %2,sr" "\n"
11170
[(set_attr "length" "16")])
11171
Index: gcc/config/sh/sh.md
11172
===================================================================
11173
--- a/src/gcc/config/sh/sh.md (.../tags/gcc_4_8_3_release)
11174
+++ b/src/gcc/config/sh/sh.md (.../branches/gcc-4_8-branch)
11175
@@ -6133,10 +6133,9 @@
11178
(define_expand "extendqihi2"
11179
- [(set (match_operand:HI 0 "arith_reg_dest" "")
11180
- (sign_extend:HI (match_operand:QI 1 "arith_reg_operand" "")))]
11183
+ [(set (match_operand:HI 0 "arith_reg_dest")
11184
+ (sign_extend:HI (match_operand:QI 1 "arith_reg_operand")))]
11187
(define_insn "*extendqihi2_compact_reg"
11188
[(set (match_operand:HI 0 "arith_reg_dest" "=r")
11189
Index: gcc/config/sh/sh.opt
11190
===================================================================
11191
--- a/src/gcc/config/sh/sh.opt (.../tags/gcc_4_8_3_release)
11192
+++ b/src/gcc/config/sh/sh.opt (.../branches/gcc-4_8-branch)
11193
@@ -343,7 +343,7 @@
11194
Cost to assume for a multiply insn
11197
-Target Report RejectNegative Var(TARGET_USERMODE)
11198
+Target Var(TARGET_USERMODE)
11199
Don't generate privileged-mode only code; implies -mno-inline-ic_invalidate if the inline code would not work in user mode.
11201
;; We might want to enable this by default for TARGET_HARD_SH4, because
11202
Index: gcc/config/microblaze/predicates.md
11203
===================================================================
11204
--- a/src/gcc/config/microblaze/predicates.md (.../tags/gcc_4_8_3_release)
11205
+++ b/src/gcc/config/microblaze/predicates.md (.../branches/gcc-4_8-branch)
11207
(ior (match_operand 0 "const_0_operand")
11208
(match_operand 0 "register_operand")))
11210
-(define_predicate "reg_or_mem_operand"
11211
- (ior (match_operand 0 "memory_operand")
11212
- (match_operand 0 "register_operand")))
11214
;; Return if the operand is either the PC or a label_ref.
11215
(define_special_predicate "pc_or_label_operand"
11216
(ior (match_code "pc,label_ref")
11217
Index: gcc/config/microblaze/microblaze.md
11218
===================================================================
11219
--- a/src/gcc/config/microblaze/microblaze.md (.../tags/gcc_4_8_3_release)
11220
+++ b/src/gcc/config/microblaze/microblaze.md (.../branches/gcc-4_8-branch)
11221
@@ -1119,18 +1119,6 @@
11225
-;;Load and store reverse
11226
-(define_insn "movsi4_rev"
11227
- [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q")
11228
- (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))]
11233
- [(set_attr "type" "load,store")
11234
- (set_attr "mode" "SI")
11235
- (set_attr "length" "4,4")])
11237
;; 32-bit floating point moves
11239
(define_expand "movsf"
11240
Index: gcc/config/avr/avr-fixed.md
11241
===================================================================
11242
--- a/src/gcc/config/avr/avr-fixed.md (.../tags/gcc_4_8_3_release)
11243
+++ b/src/gcc/config/avr/avr-fixed.md (.../branches/gcc-4_8-branch)
11244
@@ -430,8 +430,8 @@
11247
// Input and output of the libgcc function
11248
- const unsigned int regno_in[] = { -1, 22, 22, -1, 18 };
11249
- const unsigned int regno_out[] = { -1, 24, 24, -1, 22 };
11250
+ const unsigned int regno_in[] = { -1U, 22, 22, -1U, 18 };
11251
+ const unsigned int regno_out[] = { -1U, 24, 24, -1U, 22 };
11253
operands[3] = gen_rtx_REG (<MODE>mode, regno_out[(size_t) GET_MODE_SIZE (<MODE>mode)]);
11254
operands[4] = gen_rtx_REG (<MODE>mode, regno_in[(size_t) GET_MODE_SIZE (<MODE>mode)]);
11255
Index: gcc/config/avr/avr.md
11256
===================================================================
11257
--- a/src/gcc/config/avr/avr.md (.../tags/gcc_4_8_3_release)
11258
+++ b/src/gcc/config/avr/avr.md (.../branches/gcc-4_8-branch)
11259
@@ -367,6 +367,15 @@
11264
+ // Avoid (subreg (mem)) for non-generic address spaces below. Because
11265
+ // of the poor addressing capabilities of these spaces it's better to
11266
+ // load them in one chunk. And it avoids PR61443.
11268
+ if (MEM_P (operands[0])
11269
+ && !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[0])))
11270
+ operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
11272
for (i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
11274
rtx part = simplify_gen_subreg (QImode, operands[0], <MODE>mode, i);
11275
Index: gcc/config/avr/avr.h
11276
===================================================================
11277
--- a/src/gcc/config/avr/avr.h (.../tags/gcc_4_8_3_release)
11278
+++ b/src/gcc/config/avr/avr.h (.../branches/gcc-4_8-branch)
11279
@@ -250,18 +250,18 @@
11280
#define REG_CLASS_CONTENTS { \
11281
{0x00000000,0x00000000}, /* NO_REGS */ \
11282
{0x00000001,0x00000000}, /* R0_REG */ \
11283
- {3 << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
11284
- {3 << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
11285
- {3 << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
11286
+ {3u << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
11287
+ {3u << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
11288
+ {3u << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
11289
{0x00000000,0x00000003}, /* STACK_REG, STACK */ \
11290
- {(3 << REG_Y) | (3 << REG_Z), \
11291
+ {(3u << REG_Y) | (3u << REG_Z), \
11292
0x00000000}, /* BASE_POINTER_REGS, r28 - r31 */ \
11293
- {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z), \
11294
+ {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z), \
11295
0x00000000}, /* POINTER_REGS, r26 - r31 */ \
11296
- {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W), \
11297
+ {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z) | (3u << REG_W), \
11298
0x00000000}, /* ADDW_REGS, r24 - r31 */ \
11299
{0x00ff0000,0x00000000}, /* SIMPLE_LD_REGS r16 - r23 */ \
11300
- {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16), \
11301
+ {(3u << REG_X)|(3u << REG_Y)|(3u << REG_Z)|(3u << REG_W)|(0xffu << 16),\
11302
0x00000000}, /* LD_REGS, r16 - r31 */ \
11303
{0x0000ffff,0x00000000}, /* NO_LD_REGS r0 - r15 */ \
11304
{0xffffffff,0x00000000}, /* GENERAL_REGS, r0 - r31 */ \
11305
Index: gcc/config/aarch64/arm_neon.h
11306
===================================================================
11307
--- a/src/gcc/config/aarch64/arm_neon.h (.../tags/gcc_4_8_3_release)
11308
+++ b/src/gcc/config/aarch64/arm_neon.h (.../branches/gcc-4_8-branch)
11309
@@ -13815,7 +13815,7 @@
11311
__asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
11315
: /* No clobbers */);
11318
@@ -13837,7 +13837,7 @@
11320
__asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
11324
: /* No clobbers */);
11327
Index: gcc/config/aarch64/aarch64.md
11328
===================================================================
11329
--- a/src/gcc/config/aarch64/aarch64.md (.../tags/gcc_4_8_3_release)
11330
+++ b/src/gcc/config/aarch64/aarch64.md (.../branches/gcc-4_8-branch)
11331
@@ -3292,6 +3292,7 @@
11332
(unspec:DI [(match_operand:DI 0 "aarch64_valid_symref" "S")]
11334
(clobber (reg:DI LR_REGNUM))
11335
+ (clobber (reg:CC CC_REGNUM))
11336
(clobber (match_scratch:DI 1 "=r"))]
11338
"adrp\\tx0, %A0\;ldr\\t%1, [x0, #%L0]\;add\\tx0, x0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
11339
Index: gcc/config/aarch64/aarch64.opt
11340
===================================================================
11341
--- a/src/gcc/config/aarch64/aarch64.opt (.../tags/gcc_4_8_3_release)
11342
+++ b/src/gcc/config/aarch64/aarch64.opt (.../branches/gcc-4_8-branch)
11344
Target Report RejectNegative Mask(GENERAL_REGS_ONLY)
11345
Generate code which uses only the general registers
11347
+mfix-cortex-a53-835769
11348
+Target Report Var(aarch64_fix_a53_err835769) Init(2)
11349
+Workaround for ARM Cortex-A53 Erratum number 835769
11352
Target Report RejectNegative InverseMask(BIG_END)
11353
Assume target CPU is configured as little endian
11354
Index: gcc/config/aarch64/aarch64-protos.h
11355
===================================================================
11356
--- a/src/gcc/config/aarch64/aarch64-protos.h (.../tags/gcc_4_8_3_release)
11357
+++ b/src/gcc/config/aarch64/aarch64-protos.h (.../branches/gcc-4_8-branch)
11358
@@ -247,6 +247,8 @@
11360
extern void aarch64_split_combinev16qi (rtx operands[3]);
11361
extern void aarch64_expand_vec_perm (rtx target, rtx op0, rtx op1, rtx sel);
11362
+extern bool aarch64_madd_needs_nop (rtx);
11363
+extern void aarch64_final_prescan_insn (rtx);
11365
aarch64_expand_vec_perm_const (rtx target, rtx op0, rtx op1, rtx sel);
11367
Index: gcc/config/aarch64/aarch64.c
11368
===================================================================
11369
--- a/src/gcc/config/aarch64/aarch64.c (.../tags/gcc_4_8_3_release)
11370
+++ b/src/gcc/config/aarch64/aarch64.c (.../branches/gcc-4_8-branch)
11371
@@ -1201,6 +1201,7 @@
11372
CUMULATIVE_ARGS *pcum = get_cumulative_args (pcum_v);
11373
int ncrn, nvrn, nregs;
11374
bool allocate_ncrn, allocate_nvrn;
11375
+ HOST_WIDE_INT size;
11377
/* We need to do this once per argument. */
11378
if (pcum->aapcs_arg_processed)
11379
@@ -1208,6 +1209,11 @@
11381
pcum->aapcs_arg_processed = true;
11383
+ /* Size in bytes, rounded to the nearest multiple of 8 bytes. */
11385
+ = AARCH64_ROUND_UP (type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode),
11388
allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
11389
allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v,
11391
@@ -1258,10 +1264,8 @@
11394
ncrn = pcum->aapcs_ncrn;
11395
- nregs = ((type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode))
11396
- + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
11397
+ nregs = size / UNITS_PER_WORD;
11400
/* C6 - C9. though the sign and zero extension semantics are
11401
handled elsewhere. This is the case where the argument fits
11402
entirely general registers. */
11403
@@ -1309,13 +1313,12 @@
11404
pcum->aapcs_nextncrn = NUM_ARG_REGS;
11406
/* The argument is passed on stack; record the needed number of words for
11407
- this argument (we can re-use NREGS) and align the total size if
11409
+ this argument and align the total size if necessary. */
11411
- pcum->aapcs_stack_words = nregs;
11412
+ pcum->aapcs_stack_words = size / UNITS_PER_WORD;
11413
if (aarch64_function_arg_alignment (mode, type) == 16 * BITS_PER_UNIT)
11414
pcum->aapcs_stack_size = AARCH64_ROUND_UP (pcum->aapcs_stack_size,
11415
- 16 / UNITS_PER_WORD) + 1;
11416
+ 16 / UNITS_PER_WORD);
11420
@@ -4845,6 +4848,15 @@
11421
aarch64_tune = selected_tune->core;
11422
aarch64_tune_params = selected_tune->tune;
11424
+ if (aarch64_fix_a53_err835769 == 2)
11426
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
11427
+ aarch64_fix_a53_err835769 = 1;
11429
+ aarch64_fix_a53_err835769 = 0;
11433
aarch64_override_options_after_change ();
11436
@@ -6037,6 +6049,135 @@
11441
+/* Return true iff X is a MEM rtx. */
11444
+is_mem_p (rtx *x, void *data ATTRIBUTE_UNUSED)
11446
+ return MEM_P (*x);
11450
+/* Return true if mem_insn contains a MEM RTX somewhere in it. */
11453
+has_memory_op (rtx mem_insn)
11455
+ rtx pattern = PATTERN (mem_insn);
11456
+ return for_each_rtx (&pattern, is_mem_p, NULL);
11460
+/* Find the first rtx before insn that will generate an assembly
11464
+aarch64_prev_real_insn (rtx insn)
11471
+ insn = prev_real_insn (insn);
11473
+ while (insn && recog_memoized (insn) < 0);
11478
+/* Return true iff t1 is the v8type of a multiply-accumulate instruction. */
11481
+is_madd_op (enum attr_v8type t1)
11483
+ return t1 == V8TYPE_MADD
11484
+ || t1 == V8TYPE_MADDL;
11488
+/* Check if there is a register dependency between a load and the insn
11489
+ for which we hold recog_data. */
11492
+dep_between_memop_and_curr (rtx memop)
11497
+ gcc_assert (GET_CODE (memop) == SET);
11499
+ if (!REG_P (SET_DEST (memop)))
11502
+ load_reg = SET_DEST (memop);
11503
+ for (opno = 1; opno < recog_data.n_operands; opno++)
11505
+ rtx operand = recog_data.operand[opno];
11506
+ if (REG_P (operand)
11507
+ && reg_overlap_mentioned_p (load_reg, operand))
11516
+/* When working around the Cortex-A53 erratum 835769,
11517
+ given rtx_insn INSN, return true if it is a 64-bit multiply-accumulate
11518
+ instruction and has a preceding memory instruction such that a NOP
11519
+ should be inserted between them. */
11522
+aarch64_madd_needs_nop (rtx insn)
11524
+ enum attr_v8type attr_type;
11528
+ if (!aarch64_fix_a53_err835769)
11531
+ if (recog_memoized (insn) < 0)
11534
+ attr_type = get_attr_v8type (insn);
11535
+ if (!is_madd_op (attr_type))
11538
+ prev = aarch64_prev_real_insn (insn);
11539
+ /* aarch64_prev_real_insn can call recog_memoized on insns other than INSN.
11540
+ Restore recog state to INSN to avoid state corruption. */
11541
+ extract_constrain_insn_cached (insn);
11543
+ if (!prev || !has_memory_op (prev))
11546
+ body = single_set (prev);
11548
+ /* If the previous insn is a memory op and there is no dependency between
11549
+ it and the madd, emit a nop between them. If we know it's a memop but
11550
+ body is NULL, return true to be safe. */
11551
+ if (GET_MODE (recog_data.operand[0]) == DImode
11552
+ && (!body || !dep_between_memop_and_curr (body)))
11559
+/* Implement FINAL_PRESCAN_INSN. */
11562
+aarch64_final_prescan_insn (rtx insn)
11564
+ if (aarch64_madd_needs_nop (insn))
11565
+ fprintf (asm_out_file, "\tnop // between mem op and mult-accumulate\n");
11569
/* Return the equivalent letter for size. */
11570
static unsigned char
11571
sizetochar (int size)
11572
Index: gcc/config/aarch64/aarch64-elf-raw.h
11573
===================================================================
11574
--- a/src/gcc/config/aarch64/aarch64-elf-raw.h (.../tags/gcc_4_8_3_release)
11575
+++ b/src/gcc/config/aarch64/aarch64-elf-raw.h (.../branches/gcc-4_8-branch)
11577
#define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
11578
#define ENDFILE_SPEC " crtend%O%s crtn%O%s"
11580
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
11581
+#define CA53_ERR_835769_SPEC \
11582
+ " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
11584
+#define CA53_ERR_835769_SPEC \
11585
+ " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
11589
-#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
11590
+#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X" \
11591
+ CA53_ERR_835769_SPEC
11594
#endif /* GCC_AARCH64_ELF_RAW_H */
11595
Index: gcc/config/aarch64/aarch64-linux.h
11596
===================================================================
11597
--- a/src/gcc/config/aarch64/aarch64-linux.h (.../tags/gcc_4_8_3_release)
11598
+++ b/src/gcc/config/aarch64/aarch64-linux.h (.../branches/gcc-4_8-branch)
11601
%{mbig-endian:-EB} %{mlittle-endian:-EL}"
11603
-#define LINK_SPEC LINUX_TARGET_LINK_SPEC
11604
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
11605
+#define CA53_ERR_835769_SPEC \
11606
+ " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
11608
+#define CA53_ERR_835769_SPEC \
11609
+ " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
11612
+#define LINK_SPEC LINUX_TARGET_LINK_SPEC \
11613
+ CA53_ERR_835769_SPEC
11615
#define TARGET_OS_CPP_BUILTINS() \
11622
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
11624
#endif /* GCC_AARCH64_LINUX_H */
11625
Index: gcc/config/aarch64/aarch64.h
11626
===================================================================
11627
--- a/src/gcc/config/aarch64/aarch64.h (.../tags/gcc_4_8_3_release)
11628
+++ b/src/gcc/config/aarch64/aarch64.h (.../branches/gcc-4_8-branch)
11629
@@ -465,6 +465,18 @@
11630
(TARGET_CPU_generic | (AARCH64_CPU_DEFAULT_FLAGS << 6))
11633
+/* If inserting NOP before a mult-accumulate insn remember to adjust the
11634
+ length so that conditional branching code is updated appropriately. */
11635
+#define ADJUST_INSN_LENGTH(insn, length) \
11638
+ if (aarch64_madd_needs_nop (insn)) \
11642
+#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
11643
+ aarch64_final_prescan_insn (INSN); \
11645
/* The processor for which instructions should be scheduled. */
11646
extern enum aarch64_processor aarch64_tune;
11648
Index: gcc/config/rs6000/constraints.md
11649
===================================================================
11650
--- a/src/gcc/config/rs6000/constraints.md (.../tags/gcc_4_8_3_release)
11651
+++ b/src/gcc/config/rs6000/constraints.md (.../branches/gcc-4_8-branch)
11653
(define_register_constraint "wg" "rs6000_constraints[RS6000_CONSTRAINT_wg]"
11654
"If -mmfpgpr was used, a floating point register or NO_REGS.")
11656
+(define_register_constraint "wh" "rs6000_constraints[RS6000_CONSTRAINT_wh]"
11657
+ "Floating point register if direct moves are available, or NO_REGS.")
11659
+;; At present, DImode is not allowed in the Altivec registers. If in the
11660
+;; future it is allowed, wi/wj can be set to VSX_REGS instead of FLOAT_REGS.
11661
+(define_register_constraint "wi" "rs6000_constraints[RS6000_CONSTRAINT_wi]"
11662
+ "FP or VSX register to hold 64-bit integers for VSX insns or NO_REGS.")
11664
+(define_register_constraint "wj" "rs6000_constraints[RS6000_CONSTRAINT_wj]"
11665
+ "FP or VSX register to hold 64-bit integers for direct moves or NO_REGS.")
11667
+(define_register_constraint "wk" "rs6000_constraints[RS6000_CONSTRAINT_wk]"
11668
+ "FP or VSX register to hold 64-bit doubles for direct moves or NO_REGS.")
11670
(define_register_constraint "wl" "rs6000_constraints[RS6000_CONSTRAINT_wl]"
11671
"Floating point register if the LFIWAX instruction is enabled or NO_REGS.")
11674
"Floating point register if the STFIWX instruction is enabled or NO_REGS.")
11676
(define_register_constraint "wy" "rs6000_constraints[RS6000_CONSTRAINT_wy]"
11677
- "VSX vector register to hold scalar float values or NO_REGS.")
11678
+ "FP or VSX register to perform ISA 2.07 float ops or NO_REGS.")
11680
(define_register_constraint "wz" "rs6000_constraints[RS6000_CONSTRAINT_wz]"
11681
"Floating point register if the LFIWZX instruction is enabled or NO_REGS.")
11682
Index: gcc/config/rs6000/predicates.md
11683
===================================================================
11684
--- a/src/gcc/config/rs6000/predicates.md (.../tags/gcc_4_8_3_release)
11685
+++ b/src/gcc/config/rs6000/predicates.md (.../branches/gcc-4_8-branch)
11686
@@ -1795,7 +1795,7 @@
11687
(define_predicate "fusion_gpr_mem_load"
11688
(match_code "mem,sign_extend,zero_extend")
11691
+ rtx addr, base, offset;
11693
/* Handle sign/zero extend. */
11694
if (GET_CODE (op) == ZERO_EXTEND
11695
@@ -1825,24 +1825,79 @@
11698
addr = XEXP (op, 0);
11699
+ if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
11702
+ base = XEXP (addr, 0);
11703
+ if (!base_reg_operand (base, GET_MODE (base)))
11706
+ offset = XEXP (addr, 1);
11708
if (GET_CODE (addr) == PLUS)
11709
+ return satisfies_constraint_I (offset);
11711
+ else if (GET_CODE (addr) == LO_SUM)
11713
- rtx base = XEXP (addr, 0);
11714
- rtx offset = XEXP (addr, 1);
11715
+ if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
11716
+ return small_toc_ref (offset, GET_MODE (offset));
11718
- return (base_reg_operand (base, GET_MODE (base))
11719
- && satisfies_constraint_I (offset));
11720
+ else if (TARGET_ELF && !TARGET_POWERPC64)
11721
+ return CONSTANT_P (offset);
11724
- else if (GET_CODE (addr) == LO_SUM)
11728
+;; Match a GPR load (lbz, lhz, lwz, ld) that uses a combined address in the
11729
+;; memory field with both the addis and the memory offset. Sign extension
11730
+;; is not handled here, since lha and lwa are not fused.
11731
+(define_predicate "fusion_gpr_mem_combo"
11732
+ (match_code "mem,zero_extend")
11734
+ rtx addr, base, offset;
11736
+ /* Handle zero extend. */
11737
+ if (GET_CODE (op) == ZERO_EXTEND)
11739
- rtx base = XEXP (addr, 0);
11740
- rtx offset = XEXP (addr, 1);
11741
+ op = XEXP (op, 0);
11742
+ mode = GET_MODE (op);
11745
- if (!base_reg_operand (base, GET_MODE (base)))
11757
+ if (!TARGET_POWERPC64)
11761
- else if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
11766
+ addr = XEXP (op, 0);
11767
+ if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
11770
+ base = XEXP (addr, 0);
11771
+ if (!fusion_gpr_addis (base, GET_MODE (base)))
11774
+ offset = XEXP (addr, 1);
11775
+ if (GET_CODE (addr) == PLUS)
11776
+ return satisfies_constraint_I (offset);
11778
+ else if (GET_CODE (addr) == LO_SUM)
11780
+ if (TARGET_XCOFF || (TARGET_ELF && TARGET_POWERPC64))
11781
return small_toc_ref (offset, GET_MODE (offset));
11783
else if (TARGET_ELF && !TARGET_POWERPC64)
11784
Index: gcc/config/rs6000/htm.md
11785
===================================================================
11786
--- a/src/gcc/config/rs6000/htm.md (.../tags/gcc_4_8_3_release)
11787
+++ b/src/gcc/config/rs6000/htm.md (.../branches/gcc-4_8-branch)
11788
@@ -179,7 +179,7 @@
11790
UNSPECV_HTM_TABORTWCI))
11791
(set (subreg:CC (match_dup 2) 0) (match_dup 1))
11792
- (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 24)))
11793
+ (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
11794
(parallel [(set (match_operand:SI 0 "int_reg_operand" "")
11795
(and:SI (match_dup 3) (const_int 15)))
11796
(clobber (scratch:CC))])]
11797
Index: gcc/config/rs6000/freebsd64.h
11798
===================================================================
11799
--- a/src/gcc/config/rs6000/freebsd64.h (.../tags/gcc_4_8_3_release)
11800
+++ b/src/gcc/config/rs6000/freebsd64.h (.../branches/gcc-4_8-branch)
11801
@@ -367,7 +367,7 @@
11802
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
11803
#undef ADJUST_FIELD_ALIGN
11804
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
11805
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
11806
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
11809
&& TARGET_ALIGN_NATURAL == 0 \
11810
Index: gcc/config/rs6000/rs6000-protos.h
11811
===================================================================
11812
--- a/src/gcc/config/rs6000/rs6000-protos.h (.../tags/gcc_4_8_3_release)
11813
+++ b/src/gcc/config/rs6000/rs6000-protos.h (.../branches/gcc-4_8-branch)
11815
extern bool gpr_or_gpr_p (rtx, rtx);
11816
extern bool direct_move_p (rtx, rtx);
11817
extern bool quad_load_store_p (rtx, rtx);
11818
-extern bool fusion_gpr_load_p (rtx *, bool);
11819
+extern bool fusion_gpr_load_p (rtx, rtx, rtx, rtx);
11820
extern void expand_fusion_gpr_load (rtx *);
11821
-extern const char *emit_fusion_gpr_load (rtx *);
11822
+extern const char *emit_fusion_gpr_load (rtx, rtx);
11823
extern enum reg_class (*rs6000_preferred_reload_class_ptr) (rtx,
11825
extern enum reg_class (*rs6000_secondary_reload_class_ptr) (enum reg_class,
11826
@@ -153,6 +153,7 @@
11829
extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
11830
+extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
11831
extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
11833
extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
11834
@@ -161,7 +162,7 @@
11835
extern rtx rs6000_libcall_value (enum machine_mode);
11836
extern rtx rs6000_va_arg (tree, tree);
11837
extern int function_ok_for_sibcall (tree);
11838
-extern int rs6000_reg_parm_stack_space (tree);
11839
+extern int rs6000_reg_parm_stack_space (tree, bool);
11840
extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
11841
extern bool rs6000_elf_in_small_data_p (const_tree);
11842
#ifdef ARGS_SIZE_RTX
11843
Index: gcc/config/rs6000/rs6000-builtin.def
11844
===================================================================
11845
--- a/src/gcc/config/rs6000/rs6000-builtin.def (.../tags/gcc_4_8_3_release)
11846
+++ b/src/gcc/config/rs6000/rs6000-builtin.def (.../branches/gcc-4_8-branch)
11847
@@ -622,20 +622,13 @@
11848
| RS6000_BTC_TERNARY), \
11849
CODE_FOR_ ## ICODE) /* ICODE */
11851
-/* Miscellaneous builtins. */
11852
-#define BU_MISC_1(ENUM, NAME, ATTR, ICODE) \
11853
+/* 128-bit long double floating point builtins. */
11854
+#define BU_LDBL128_2(ENUM, NAME, ATTR, ICODE) \
11855
RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
11856
"__builtin_" NAME, /* NAME */ \
11857
- RS6000_BTM_HARD_FLOAT, /* MASK */ \
11858
+ (RS6000_BTM_HARD_FLOAT /* MASK */ \
11859
+ | RS6000_BTM_LDBL128), \
11860
(RS6000_BTC_ ## ATTR /* ATTR */ \
11861
- | RS6000_BTC_UNARY), \
11862
- CODE_FOR_ ## ICODE) /* ICODE */
11864
-#define BU_MISC_2(ENUM, NAME, ATTR, ICODE) \
11865
- RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
11866
- "__builtin_" NAME, /* NAME */ \
11867
- RS6000_BTM_HARD_FLOAT, /* MASK */ \
11868
- (RS6000_BTC_ ## ATTR /* ATTR */ \
11869
| RS6000_BTC_BINARY), \
11870
CODE_FOR_ ## ICODE) /* ICODE */
11872
@@ -1593,10 +1586,8 @@
11873
BU_DFP_MISC_2 (PACK_TD, "pack_dec128", CONST, packtd)
11874
BU_DFP_MISC_2 (UNPACK_TD, "unpack_dec128", CONST, unpacktd)
11876
-BU_MISC_2 (PACK_TF, "pack_longdouble", CONST, packtf)
11877
-BU_MISC_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
11878
-BU_MISC_1 (UNPACK_TF_0, "longdouble_dw0", CONST, unpacktf_0)
11879
-BU_MISC_1 (UNPACK_TF_1, "longdouble_dw1", CONST, unpacktf_1)
11880
+BU_LDBL128_2 (PACK_TF, "pack_longdouble", CONST, packtf)
11881
+BU_LDBL128_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
11883
BU_P7_MISC_2 (PACK_V1TI, "pack_vector_int128", CONST, packv1ti)
11884
BU_P7_MISC_2 (UNPACK_V1TI, "unpack_vector_int128", CONST, unpackv1ti)
11885
Index: gcc/config/rs6000/rs6000-c.c
11886
===================================================================
11887
--- a/src/gcc/config/rs6000/rs6000-c.c (.../tags/gcc_4_8_3_release)
11888
+++ b/src/gcc/config/rs6000/rs6000-c.c (.../branches/gcc-4_8-branch)
11889
@@ -3265,6 +3265,8 @@
11891
{ VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
11892
RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF, 0 },
11893
+ { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
11894
+ RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double, 0 },
11895
{ VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
11896
RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI, 0 },
11897
{ VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
11898
@@ -3319,6 +3321,8 @@
11900
{ VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
11901
RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF },
11902
+ { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
11903
+ RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double },
11904
{ VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
11905
RS6000_BTI_void, RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI },
11906
{ VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
11907
@@ -4126,7 +4130,8 @@
11908
argument) is reversed. Patch the arguments here before building
11909
the resolved CALL_EXPR. */
11910
if (desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
11911
- && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P)
11912
+ && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P
11913
+ && desc->overloaded_code != VSX_BUILTIN_XVCMPGEDP_P)
11916
t = args[2], args[2] = args[1], args[1] = t;
11917
@@ -4184,6 +4189,14 @@
11918
if (TARGET_DEBUG_BUILTIN)
11919
fprintf (stderr, "altivec_resolve_overloaded_builtin, code = %4d, %s\n",
11920
(int)fcode, IDENTIFIER_POINTER (DECL_NAME (fndecl)));
11922
+ /* vec_lvsl and vec_lvsr are deprecated for use with LE element order. */
11923
+ if (fcode == ALTIVEC_BUILTIN_VEC_LVSL && !VECTOR_ELT_ORDER_BIG)
11924
+ warning (OPT_Wdeprecated, "vec_lvsl is deprecated for little endian; use \
11925
+assignment for unaligned loads and stores");
11926
+ else if (fcode == ALTIVEC_BUILTIN_VEC_LVSR && !VECTOR_ELT_ORDER_BIG)
11927
+ warning (OPT_Wdeprecated, "vec_lvsr is deprecated for little endian; use \
11928
+assignment for unaligned loads and stores");
11930
/* For now treat vec_splats and vec_promote as the same. */
11931
if (fcode == ALTIVEC_BUILTIN_VEC_SPLATS
11932
Index: gcc/config/rs6000/linux64.h
11933
===================================================================
11934
--- a/src/gcc/config/rs6000/linux64.h (.../tags/gcc_4_8_3_release)
11935
+++ b/src/gcc/config/rs6000/linux64.h (.../branches/gcc-4_8-branch)
11936
@@ -246,7 +246,7 @@
11937
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
11938
#undef ADJUST_FIELD_ALIGN
11939
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
11940
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
11941
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
11944
&& TARGET_ALIGN_NATURAL == 0 \
11945
Index: gcc/config/rs6000/rs6000.c
11946
===================================================================
11947
--- a/src/gcc/config/rs6000/rs6000.c (.../tags/gcc_4_8_3_release)
11948
+++ b/src/gcc/config/rs6000/rs6000.c (.../branches/gcc-4_8-branch)
11949
@@ -369,6 +369,7 @@
11950
enum insn_code reload_gpr_vsx; /* INSN to move from GPR to VSX. */
11951
enum insn_code reload_vsx_gpr; /* INSN to move from VSX to GPR. */
11952
addr_mask_type addr_mask[(int)N_RELOAD_REG]; /* Valid address masks. */
11953
+ bool scalar_in_vmx_p; /* Scalar value can go in VMX. */
11956
static struct rs6000_reg_addr reg_addr[NUM_MACHINE_MODES];
11957
@@ -1704,8 +1705,7 @@
11959
if (TARGET_VSX && VSX_REGNO_P (regno)
11960
&& (VECTOR_MEM_VSX_P (mode)
11961
- || (TARGET_VSX_SCALAR_FLOAT && mode == SFmode)
11962
- || (TARGET_VSX_SCALAR_DOUBLE && (mode == DFmode || mode == DImode))
11963
+ || reg_addr[mode].scalar_in_vmx_p
11964
|| (TARGET_VSX_TIMODE && mode == TImode)
11965
|| (TARGET_VADDUQM && mode == V1TImode)))
11967
@@ -1714,12 +1714,9 @@
11969
if (ALTIVEC_REGNO_P (regno))
11971
- if (mode == SFmode && !TARGET_UPPER_REGS_SF)
11972
+ if (GET_MODE_SIZE (mode) != 16 && !reg_addr[mode].scalar_in_vmx_p)
11975
- if ((mode == DFmode || mode == DImode) && !TARGET_UPPER_REGS_DF)
11978
return ALTIVEC_REGNO_P (last_regno);
11981
@@ -1897,14 +1894,16 @@
11982
if (rs6000_vector_unit[m] != VECTOR_NONE
11983
|| rs6000_vector_mem[m] != VECTOR_NONE
11984
|| (reg_addr[m].reload_store != CODE_FOR_nothing)
11985
- || (reg_addr[m].reload_load != CODE_FOR_nothing))
11986
+ || (reg_addr[m].reload_load != CODE_FOR_nothing)
11987
+ || reg_addr[m].scalar_in_vmx_p)
11990
- " Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c",
11991
+ " Vector-arith=%-10s Vector-mem=%-10s Reload=%c%c Upper=%c",
11992
rs6000_debug_vector_unit (rs6000_vector_unit[m]),
11993
rs6000_debug_vector_unit (rs6000_vector_mem[m]),
11994
(reg_addr[m].reload_store != CODE_FOR_nothing) ? 's' : '*',
11995
- (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*');
11996
+ (reg_addr[m].reload_load != CODE_FOR_nothing) ? 'l' : '*',
11997
+ (reg_addr[m].scalar_in_vmx_p) ? 'y' : 'n');
12000
fputs ("\n", stderr);
12001
@@ -2021,6 +2020,10 @@
12002
"wd reg_class = %s\n"
12003
"wf reg_class = %s\n"
12004
"wg reg_class = %s\n"
12005
+ "wh reg_class = %s\n"
12006
+ "wi reg_class = %s\n"
12007
+ "wj reg_class = %s\n"
12008
+ "wk reg_class = %s\n"
12009
"wl reg_class = %s\n"
12010
"wm reg_class = %s\n"
12011
"wr reg_class = %s\n"
12012
@@ -2040,6 +2043,10 @@
12013
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wd]],
12014
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wf]],
12015
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wg]],
12016
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wh]],
12017
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wi]],
12018
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wj]],
12019
+ reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wk]],
12020
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wl]],
12021
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wm]],
12022
reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wr]],
12023
@@ -2324,6 +2331,8 @@
12025
for (m = 0; m < NUM_MACHINE_MODES; ++m)
12027
+ enum machine_mode m2 = (enum machine_mode)m;
12029
/* SDmode is special in that we want to access it only via REG+REG
12030
addressing on power7 and above, since we want to use the LFIWZX and
12031
STFIWZX instructions to load it. */
12032
@@ -2358,13 +2367,12 @@
12035
&& (rc == RELOAD_REG_GPR || rc == RELOAD_REG_FPR)
12036
- && GET_MODE_SIZE (m) <= 8
12037
- && !VECTOR_MODE_P (m)
12038
- && !COMPLEX_MODE_P (m)
12039
+ && GET_MODE_SIZE (m2) <= 8
12040
+ && !VECTOR_MODE_P (m2)
12041
+ && !COMPLEX_MODE_P (m2)
12043
- && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m) == 8)
12044
- && !(m == DFmode && TARGET_UPPER_REGS_DF)
12045
- && !(m == SFmode && TARGET_UPPER_REGS_SF))
12046
+ && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m2) == 8)
12047
+ && !reg_addr[m2].scalar_in_vmx_p)
12049
addr_mask |= RELOAD_REG_PRE_INCDEC;
12051
@@ -2595,16 +2603,22 @@
12052
f - Register class to use with traditional SFmode instructions.
12053
v - Altivec register.
12054
wa - Any VSX register.
12055
+ wc - Reserved to represent individual CR bits (used in LLVM).
12056
wd - Preferred register class for V2DFmode.
12057
wf - Preferred register class for V4SFmode.
12058
wg - Float register for power6x move insns.
12059
+ wh - FP register for direct move instructions.
12060
+ wi - FP or VSX register to hold 64-bit integers for VSX insns.
12061
+ wj - FP or VSX register to hold 64-bit integers for direct moves.
12062
+ wk - FP or VSX register to hold 64-bit doubles for direct moves.
12063
wl - Float register if we can do 32-bit signed int loads.
12064
wm - VSX register for ISA 2.07 direct move operations.
12065
+ wn - always NO_REGS.
12066
wr - GPR if 64-bit mode is permitted.
12067
ws - Register class to do ISA 2.06 DF operations.
12068
+ wt - VSX register for TImode in VSX registers.
12069
wu - Altivec register for ISA 2.07 VSX SF/SI load/stores.
12070
wv - Altivec register for ISA 2.06 VSX DF/DI load/stores.
12071
- wt - VSX register for TImode in VSX registers.
12072
ww - Register class to do SF conversions in with VSX operations.
12073
wx - Float register if we can do 32-bit int stores.
12074
wy - Register class to do ISA 2.07 SF operations.
12075
@@ -2611,21 +2625,22 @@
12076
wz - Float register if we can do 32-bit unsigned int loads. */
12078
if (TARGET_HARD_FLOAT && TARGET_FPRS)
12079
- rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS;
12080
+ rs6000_constraints[RS6000_CONSTRAINT_f] = FLOAT_REGS; /* SFmode */
12082
if (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT)
12083
- rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS;
12084
+ rs6000_constraints[RS6000_CONSTRAINT_d] = FLOAT_REGS; /* DFmode */
12088
rs6000_constraints[RS6000_CONSTRAINT_wa] = VSX_REGS;
12089
- rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS;
12090
- rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS;
12091
+ rs6000_constraints[RS6000_CONSTRAINT_wd] = VSX_REGS; /* V2DFmode */
12092
+ rs6000_constraints[RS6000_CONSTRAINT_wf] = VSX_REGS; /* V4SFmode */
12093
+ rs6000_constraints[RS6000_CONSTRAINT_wi] = FLOAT_REGS; /* DImode */
12095
if (TARGET_VSX_TIMODE)
12096
- rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS;
12097
+ rs6000_constraints[RS6000_CONSTRAINT_wt] = VSX_REGS; /* TImode */
12099
- if (TARGET_UPPER_REGS_DF)
12100
+ if (TARGET_UPPER_REGS_DF) /* DFmode */
12102
rs6000_constraints[RS6000_CONSTRAINT_ws] = VSX_REGS;
12103
rs6000_constraints[RS6000_CONSTRAINT_wv] = ALTIVEC_REGS;
12104
@@ -2639,19 +2654,26 @@
12105
if (TARGET_ALTIVEC)
12106
rs6000_constraints[RS6000_CONSTRAINT_v] = ALTIVEC_REGS;
12108
- if (TARGET_MFPGPR)
12109
+ if (TARGET_MFPGPR) /* DFmode */
12110
rs6000_constraints[RS6000_CONSTRAINT_wg] = FLOAT_REGS;
12113
- rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS;
12114
+ rs6000_constraints[RS6000_CONSTRAINT_wl] = FLOAT_REGS; /* DImode */
12116
if (TARGET_DIRECT_MOVE)
12117
- rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
12119
+ rs6000_constraints[RS6000_CONSTRAINT_wh] = FLOAT_REGS;
12120
+ rs6000_constraints[RS6000_CONSTRAINT_wj] /* DImode */
12121
+ = rs6000_constraints[RS6000_CONSTRAINT_wi];
12122
+ rs6000_constraints[RS6000_CONSTRAINT_wk] /* DFmode */
12123
+ = rs6000_constraints[RS6000_CONSTRAINT_ws];
12124
+ rs6000_constraints[RS6000_CONSTRAINT_wm] = VSX_REGS;
12127
if (TARGET_POWERPC64)
12128
rs6000_constraints[RS6000_CONSTRAINT_wr] = GENERAL_REGS;
12130
- if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)
12131
+ if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF) /* SFmode */
12133
rs6000_constraints[RS6000_CONSTRAINT_wu] = ALTIVEC_REGS;
12134
rs6000_constraints[RS6000_CONSTRAINT_wy] = VSX_REGS;
12135
@@ -2666,10 +2688,10 @@
12136
rs6000_constraints[RS6000_CONSTRAINT_ww] = FLOAT_REGS;
12139
- rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS;
12140
+ rs6000_constraints[RS6000_CONSTRAINT_wx] = FLOAT_REGS; /* DImode */
12143
- rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS;
12144
+ rs6000_constraints[RS6000_CONSTRAINT_wz] = FLOAT_REGS; /* DImode */
12146
/* Set up the reload helper and direct move functions. */
12147
if (TARGET_VSX || TARGET_ALTIVEC)
12148
@@ -2692,10 +2714,11 @@
12149
reg_addr[V2DFmode].reload_load = CODE_FOR_reload_v2df_di_load;
12150
if (TARGET_VSX && TARGET_UPPER_REGS_DF)
12152
- reg_addr[DFmode].reload_store = CODE_FOR_reload_df_di_store;
12153
- reg_addr[DFmode].reload_load = CODE_FOR_reload_df_di_load;
12154
- reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_di_store;
12155
- reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_di_load;
12156
+ reg_addr[DFmode].reload_store = CODE_FOR_reload_df_di_store;
12157
+ reg_addr[DFmode].reload_load = CODE_FOR_reload_df_di_load;
12158
+ reg_addr[DFmode].scalar_in_vmx_p = true;
12159
+ reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_di_store;
12160
+ reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_di_load;
12162
if (TARGET_P8_VECTOR)
12164
@@ -2703,6 +2726,8 @@
12165
reg_addr[SFmode].reload_load = CODE_FOR_reload_sf_di_load;
12166
reg_addr[SDmode].reload_store = CODE_FOR_reload_sd_di_store;
12167
reg_addr[SDmode].reload_load = CODE_FOR_reload_sd_di_load;
12168
+ if (TARGET_UPPER_REGS_SF)
12169
+ reg_addr[SFmode].scalar_in_vmx_p = true;
12171
if (TARGET_VSX_TIMODE)
12173
@@ -2759,10 +2784,11 @@
12174
reg_addr[V2DFmode].reload_load = CODE_FOR_reload_v2df_si_load;
12175
if (TARGET_VSX && TARGET_UPPER_REGS_DF)
12177
- reg_addr[DFmode].reload_store = CODE_FOR_reload_df_si_store;
12178
- reg_addr[DFmode].reload_load = CODE_FOR_reload_df_si_load;
12179
- reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_si_store;
12180
- reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_si_load;
12181
+ reg_addr[DFmode].reload_store = CODE_FOR_reload_df_si_store;
12182
+ reg_addr[DFmode].reload_load = CODE_FOR_reload_df_si_load;
12183
+ reg_addr[DFmode].scalar_in_vmx_p = true;
12184
+ reg_addr[DDmode].reload_store = CODE_FOR_reload_dd_si_store;
12185
+ reg_addr[DDmode].reload_load = CODE_FOR_reload_dd_si_load;
12187
if (TARGET_P8_VECTOR)
12189
@@ -2770,6 +2796,8 @@
12190
reg_addr[SFmode].reload_load = CODE_FOR_reload_sf_si_load;
12191
reg_addr[SDmode].reload_store = CODE_FOR_reload_sd_si_store;
12192
reg_addr[SDmode].reload_load = CODE_FOR_reload_sd_si_load;
12193
+ if (TARGET_UPPER_REGS_SF)
12194
+ reg_addr[SFmode].scalar_in_vmx_p = true;
12196
if (TARGET_VSX_TIMODE)
12198
@@ -2810,6 +2838,7 @@
12200
for (m = 0; m < NUM_MACHINE_MODES; ++m)
12202
+ enum machine_mode m2 = (enum machine_mode)m;
12203
int reg_size2 = reg_size;
12205
/* TFmode/TDmode always takes 2 registers, even in VSX. */
12206
@@ -2818,7 +2847,7 @@
12207
reg_size2 = UNITS_PER_FP_WORD;
12209
rs6000_class_max_nregs[m][c]
12210
- = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2;
12211
+ = (GET_MODE_SIZE (m2) + reg_size2 - 1) / reg_size2;
12215
@@ -3014,7 +3043,8 @@
12216
| ((TARGET_CRYPTO) ? RS6000_BTM_CRYPTO : 0)
12217
| ((TARGET_HTM) ? RS6000_BTM_HTM : 0)
12218
| ((TARGET_DFP) ? RS6000_BTM_DFP : 0)
12219
- | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0));
12220
+ | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0)
12221
+ | ((TARGET_LONG_DOUBLE_128) ? RS6000_BTM_LDBL128 : 0));
12224
/* Override command line options. Mostly we process the processor type and
12225
@@ -5861,6 +5891,34 @@
12229
+/* Previous GCC releases forced all vector types to have 16-byte alignment. */
12232
+rs6000_special_adjust_field_align_p (tree field, unsigned int computed)
12234
+ if (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (field)) == VECTOR_TYPE)
12236
+ if (computed != 128)
12238
+ static bool warned;
12239
+ if (!warned && warn_psabi)
12242
+ inform (input_location,
12243
+ "the layout of aggregates containing vectors with"
12244
+ " %d-byte alignment will change in a future GCC release",
12245
+ computed / BITS_PER_UNIT);
12248
+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
12249
+ keep the special treatment of vector types, but warn if there will
12250
+ be differences in future GCC releases. */
12257
/* AIX increases natural record alignment to doubleword if the first
12258
field is an FP double while the FP fields remain word aligned. */
12260
@@ -6109,7 +6167,8 @@
12263
extra = GET_MODE_SIZE (mode) - UNITS_PER_WORD;
12264
- gcc_assert (extra >= 0);
12268
if (GET_CODE (addr) == LO_SUM)
12269
/* For lo_sum addresses, we must allow any offset except one that
12270
@@ -6818,24 +6877,6 @@
12271
if (GET_CODE (y) == UNSPEC
12272
&& XINT (y, 1) == UNSPEC_TOCREL)
12274
-#ifdef ENABLE_CHECKING
12275
- if (REG_P (XVECEXP (y, 0, 1))
12276
- && REGNO (XVECEXP (y, 0, 1)) == TOC_REGISTER)
12280
- else if (GET_CODE (XVECEXP (y, 0, 1)) == DEBUG_EXPR)
12282
- /* Weirdness alert. df_note_compute can replace r2 with a
12283
- debug_expr when this unspec is in a debug_insn.
12284
- Seen in gcc.dg/pr51957-1.c */
12288
- debug_rtx (orig_x);
12292
y = XVECEXP (y, 0, 0);
12295
@@ -9198,14 +9239,51 @@
12296
|| (type && TREE_CODE (type) == VECTOR_TYPE
12297
&& int_size_in_bytes (type) >= 16))
12299
- else if (((TARGET_MACHO && rs6000_darwin64_abi)
12300
- || DEFAULT_ABI == ABI_ELFv2
12301
- || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
12302
- && mode == BLKmode
12303
- && type && TYPE_ALIGN (type) > 64)
12305
+ /* Aggregate types that need > 8 byte alignment are quadword-aligned
12306
+ in the parameter area in the ELFv2 ABI, and in the AIX ABI unless
12307
+ -mcompat-align-parm is used. */
12308
+ if (((DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm)
12309
+ || DEFAULT_ABI == ABI_ELFv2)
12310
+ && type && TYPE_ALIGN (type) > 64)
12312
+ /* "Aggregate" means any AGGREGATE_TYPE except for single-element
12313
+ or homogeneous float/vector aggregates here. We already handled
12314
+ vector aggregates above, but still need to check for float here. */
12315
+ bool aggregate_p = (AGGREGATE_TYPE_P (type)
12316
+ && !SCALAR_FLOAT_MODE_P (elt_mode));
12318
+ /* We used to check for BLKmode instead of the above aggregate type
12319
+ check. Warn when this results in any difference to the ABI. */
12320
+ if (aggregate_p != (mode == BLKmode))
12322
+ static bool warned;
12323
+ if (!warned && warn_psabi)
12326
+ inform (input_location,
12327
+ "the ABI of passing aggregates with %d-byte alignment"
12328
+ " will change in a future GCC release",
12329
+ (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
12333
+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
12334
+ keep using the BLKmode check, but warn if there will be differences
12335
+ in future GCC releases. */
12336
+ if (mode == BLKmode)
12340
+ /* Similar for the Darwin64 ABI. Note that for historical reasons we
12341
+ implement the "aggregate type" check as a BLKmode check here; this
12342
+ means certain aggregate types are in fact not aligned. */
12343
+ if (TARGET_MACHO && rs6000_darwin64_abi
12344
+ && mode == BLKmode
12345
+ && type && TYPE_ALIGN (type) > 64)
12348
- return PARM_BOUNDARY;
12350
+ return PARM_BOUNDARY;
12353
/* The offset in words to the start of the parameter save area. */
12354
@@ -10243,6 +10321,7 @@
12357
unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
12360
/* Do we also need to pass this argument in the parameter
12362
@@ -10271,6 +10350,37 @@
12363
rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
12366
+ /* If there were not enough FPRs to hold the argument, the rest
12367
+ usually goes into memory. However, if the current position
12368
+ is still within the register parameter area, a portion may
12369
+ actually have to go into GPRs.
12371
+ Note that it may happen that the portion of the argument
12372
+ passed in the first "half" of the first GPR was already
12373
+ passed in the last FPR as well.
12375
+ For unnamed arguments, we already set up GPRs to cover the
12376
+ whole argument in rs6000_psave_function_arg, so there is
12377
+ nothing further to do at this point.
12379
+ GCC 4.8/4.9 Note: This was implemented incorrectly in earlier
12380
+ GCC releases. To avoid any ABI change on the release branch,
12381
+ we retain that original implementation here, but warn if we
12382
+ encounter a case where the ABI will change in the future. */
12383
+ fpr_words = (i * GET_MODE_SIZE (elt_mode)) / (TARGET_32BIT ? 4 : 8);
12384
+ if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
12385
+ && cum->nargs_prototype > 0)
12387
+ static bool warned;
12388
+ if (!warned && warn_psabi)
12391
+ inform (input_location,
12392
+ "the ABI of passing homogeneous float aggregates"
12393
+ " will change in a future GCC release");
12397
return rs6000_finish_function_arg (mode, rvec, k);
12399
else if (align_words < GP_ARG_NUM_REG)
12400
@@ -10497,10 +10607,9 @@
12401
list, or passes any parameter in memory. */
12404
-rs6000_function_parms_need_stack (tree fun)
12405
+rs6000_function_parms_need_stack (tree fun, bool incoming)
12407
- function_args_iterator args_iter;
12409
+ tree fntype, result;
12410
CUMULATIVE_ARGS args_so_far_v;
12411
cumulative_args_t args_so_far;
12413
@@ -10507,26 +10616,57 @@
12415
/* Must be a libcall, all of which only use reg parms. */
12420
- fun = TREE_TYPE (fun);
12421
+ fntype = TREE_TYPE (fun);
12423
/* Varargs functions need the parameter save area. */
12424
- if (!prototype_p (fun) || stdarg_p (fun))
12425
+ if ((!incoming && !prototype_p (fntype)) || stdarg_p (fntype))
12428
- INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fun, NULL_RTX);
12429
+ INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fntype, NULL_RTX);
12430
args_so_far = pack_cumulative_args (&args_so_far_v);
12432
- if (aggregate_value_p (TREE_TYPE (fun), fun))
12433
+ /* When incoming, we will have been passed the function decl.
12434
+ It is necessary to use the decl to handle K&R style functions,
12435
+ where TYPE_ARG_TYPES may not be available. */
12438
- tree type = build_pointer_type (TREE_TYPE (fun));
12439
- rs6000_parm_needs_stack (args_so_far, type);
12440
+ gcc_assert (DECL_P (fun));
12441
+ result = DECL_RESULT (fun);
12444
+ result = TREE_TYPE (fntype);
12446
- FOREACH_FUNCTION_ARGS (fun, arg_type, args_iter)
12447
- if (rs6000_parm_needs_stack (args_so_far, arg_type))
12449
+ if (result && aggregate_value_p (result, fntype))
12451
+ if (!TYPE_P (result))
12452
+ result = TREE_TYPE (result);
12453
+ result = build_pointer_type (result);
12454
+ rs6000_parm_needs_stack (args_so_far, result);
12461
+ for (parm = DECL_ARGUMENTS (fun);
12462
+ parm && parm != void_list_node;
12463
+ parm = TREE_CHAIN (parm))
12464
+ if (rs6000_parm_needs_stack (args_so_far, TREE_TYPE (parm)))
12469
+ function_args_iterator args_iter;
12472
+ FOREACH_FUNCTION_ARGS (fntype, arg_type, args_iter)
12473
+ if (rs6000_parm_needs_stack (args_so_far, arg_type))
12480
@@ -10537,7 +10677,7 @@
12481
all parameters in registers. */
12484
-rs6000_reg_parm_stack_space (tree fun)
12485
+rs6000_reg_parm_stack_space (tree fun, bool incoming)
12487
int reg_parm_stack_space;
12489
@@ -10555,7 +10695,7 @@
12491
/* ??? Recomputing this every time is a bit expensive. Is there
12492
a place to cache this information? */
12493
- if (rs6000_function_parms_need_stack (fun))
12494
+ if (rs6000_function_parms_need_stack (fun, incoming))
12495
reg_parm_stack_space = TARGET_64BIT ? 64 : 32;
12497
reg_parm_stack_space = 0;
12498
@@ -13544,11 +13684,15 @@
12499
else if ((fnmask & (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
12500
== (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
12501
error ("Builtin function %s requires the -mhard-dfp and"
12502
- "-mpower8-vector options", name);
12503
+ " -mpower8-vector options", name);
12504
else if ((fnmask & RS6000_BTM_DFP) != 0)
12505
error ("Builtin function %s requires the -mhard-dfp option", name);
12506
else if ((fnmask & RS6000_BTM_P8_VECTOR) != 0)
12507
error ("Builtin function %s requires the -mpower8-vector option", name);
12508
+ else if ((fnmask & (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
12509
+ == (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
12510
+ error ("Builtin function %s requires the -mhard-float and"
12511
+ " -mlong-double-128 options", name);
12512
else if ((fnmask & RS6000_BTM_HARD_FLOAT) != 0)
12513
error ("Builtin function %s requires the -mhard-float option", name);
12515
@@ -13649,8 +13793,8 @@
12516
case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
12517
case ALTIVEC_BUILTIN_MASK_FOR_STORE:
12519
- int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr
12520
- : (int) CODE_FOR_altivec_lvsl);
12521
+ int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr_direct
12522
+ : (int) CODE_FOR_altivec_lvsl_direct);
12523
enum machine_mode tmode = insn_data[icode].operand[0].mode;
12524
enum machine_mode mode = insn_data[icode].operand[1].mode;
12526
@@ -13678,7 +13822,6 @@
12527
|| ! (*insn_data[icode].operand[0].predicate) (target, tmode))
12528
target = gen_reg_rtx (tmode);
12530
- /*pat = gen_altivec_lvsr (target, op);*/
12531
pat = GEN_FCN (icode) (target, op);
12534
@@ -17099,7 +17242,14 @@
12535
prefer Altivec loads.. */
12536
if (rclass == VSX_REGS)
12538
- if (GET_MODE_SIZE (mode) <= 8)
12539
+ if (MEM_P (x) && reg_addr[mode].scalar_in_vmx_p)
12541
+ rtx addr = XEXP (x, 0);
12542
+ if (rs6000_legitimate_offset_address_p (mode, addr, false, true)
12543
+ || legitimate_lo_sum_address_p (mode, addr, false))
12544
+ return FLOAT_REGS;
12546
+ else if (GET_MODE_SIZE (mode) <= 8 && !reg_addr[mode].scalar_in_vmx_p)
12549
if (VECTOR_UNIT_ALTIVEC_P (mode) || VECTOR_MEM_ALTIVEC_P (mode)
12550
@@ -31413,6 +31563,7 @@
12551
{ "htm", RS6000_BTM_HTM, false, false },
12552
{ "hard-dfp", RS6000_BTM_DFP, false, false },
12553
{ "hard-float", RS6000_BTM_HARD_FLOAT, false, false },
12554
+ { "long-double-128", RS6000_BTM_LDBL128, false, false },
12557
/* Option variables that we want to support inside attribute((target)) and
12558
@@ -32663,25 +32814,14 @@
12560
/* Return true if the peephole2 can combine a load involving a combination of
12561
an addis instruction and a load with an offset that can be fused together on
12565
- The operands are:
12566
- operands[0] register set with addis
12567
- operands[1] value set via addis
12568
- operands[2] target register being loaded
12569
- operands[3] D-form memory reference using operands[0].
12571
- In addition, we are passed a boolean that is true if this is a peephole2,
12572
- and we can use see if the addis_reg is dead after the insn and can be
12573
- replaced by the target register. */
12576
-fusion_gpr_load_p (rtx *operands, bool peep2_p)
12577
+fusion_gpr_load_p (rtx addis_reg, /* register set via addis. */
12578
+ rtx addis_value, /* addis value. */
12579
+ rtx target, /* target register that is loaded. */
12580
+ rtx mem) /* bottom part of the memory addr. */
12582
- rtx addis_reg = operands[0];
12583
- rtx addis_value = operands[1];
12584
- rtx target = operands[2];
12585
- rtx mem = operands[3];
12589
@@ -32695,9 +32835,6 @@
12590
if (!fusion_gpr_addis (addis_value, GET_MODE (addis_value)))
12593
- if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
12596
/* Allow sign/zero extension. */
12597
if (GET_CODE (mem) == ZERO_EXTEND
12598
|| (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN))
12599
@@ -32706,22 +32843,22 @@
12603
+ if (!fusion_gpr_mem_load (mem, GET_MODE (mem)))
12606
addr = XEXP (mem, 0); /* either PLUS or LO_SUM. */
12607
if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
12610
/* Validate that the register used to load the high value is either the
12611
- register being loaded, or we can safely replace its use in a peephole2.
12612
+ register being loaded, or we can safely replace its use.
12614
- If this is a peephole2, we assume that there are 2 instructions in the
12615
- peephole (addis and load), so we want to check if the target register was
12616
- not used in the memory address and the register to hold the addis result
12617
- is dead after the peephole. */
12618
+ This function is only called from the peephole2 pass and we assume that
12619
+ there are 2 instructions in the peephole (addis and load), so we want to
12620
+ check if the target register was not used in the memory address and the
12621
+ register to hold the addis result is dead after the peephole. */
12622
if (REGNO (addis_reg) != REGNO (target))
12627
if (reg_mentioned_p (target, mem))
12630
@@ -32762,9 +32899,6 @@
12631
enum machine_mode extend_mode = target_mode;
12632
enum machine_mode ptr_mode = Pmode;
12633
enum rtx_code extend = UNKNOWN;
12634
- rtx addis_reg = ((ptr_mode == target_mode)
12636
- : simplify_subreg (ptr_mode, target, target_mode, 0));
12638
if (GET_CODE (orig_mem) == ZERO_EXTEND
12639
|| (TARGET_P8_FUSION_SIGN && GET_CODE (orig_mem) == SIGN_EXTEND))
12640
@@ -32781,13 +32915,14 @@
12641
gcc_assert (plus_or_lo_sum == PLUS || plus_or_lo_sum == LO_SUM);
12643
offset = XEXP (orig_addr, 1);
12644
- new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_reg, offset);
12645
- new_mem = change_address (orig_mem, target_mode, new_addr);
12646
+ new_addr = gen_rtx_fmt_ee (plus_or_lo_sum, ptr_mode, addis_value, offset);
12647
+ new_mem = replace_equiv_address_nv (orig_mem, new_addr);
12649
if (extend != UNKNOWN)
12650
new_mem = gen_rtx_fmt_e (ZERO_EXTEND, extend_mode, new_mem);
12652
- emit_insn (gen_rtx_SET (VOIDmode, addis_reg, addis_value));
12653
+ new_mem = gen_rtx_UNSPEC (extend_mode, gen_rtvec (1, new_mem),
12654
+ UNSPEC_FUSION_GPR);
12655
emit_insn (gen_rtx_SET (VOIDmode, target, new_mem));
12657
if (extend == SIGN_EXTEND)
12658
@@ -32806,55 +32941,40 @@
12661
/* Return a string to fuse an addis instruction with a gpr load to the same
12662
- register that we loaded up the addis instruction. The code is complicated,
12663
- so we call output_asm_insn directly, and just return "".
12664
+ register that we loaded up the addis instruction. The address that is used
12665
+ is the logical address that was formed during peephole2:
12666
+ (lo_sum (high) (low-part))
12668
- The operands are:
12669
- operands[0] register set with addis (must be same reg as target).
12670
- operands[1] value set via addis
12671
- operands[2] target register being loaded
12672
- operands[3] D-form memory reference using operands[0]. */
12673
+ The code is complicated, so we call output_asm_insn directly, and just
12677
-emit_fusion_gpr_load (rtx *operands)
12678
+emit_fusion_gpr_load (rtx target, rtx mem)
12680
- rtx addis_reg = operands[0];
12681
- rtx addis_value = operands[1];
12682
- rtx target = operands[2];
12683
- rtx mem = operands[3];
12688
const char *addis_str = NULL;
12689
const char *load_str = NULL;
12690
- const char *extend_insn = NULL;
12691
const char *mode_name = NULL;
12692
char insn_template[80];
12693
enum machine_mode mode;
12694
const char *comment_str = ASM_COMMENT_START;
12695
- bool sign_p = false;
12697
- gcc_assert (REG_P (addis_reg) && REG_P (target));
12698
- gcc_assert (REGNO (addis_reg) == REGNO (target));
12699
+ if (GET_CODE (mem) == ZERO_EXTEND)
12700
+ mem = XEXP (mem, 0);
12702
+ gcc_assert (REG_P (target) && MEM_P (mem));
12704
if (*comment_str == ' ')
12707
- /* Allow sign/zero extension. */
12708
- if (GET_CODE (mem) == ZERO_EXTEND)
12709
- mem = XEXP (mem, 0);
12711
- else if (GET_CODE (mem) == SIGN_EXTEND && TARGET_P8_FUSION_SIGN)
12714
- mem = XEXP (mem, 0);
12717
- gcc_assert (MEM_P (mem));
12718
addr = XEXP (mem, 0);
12719
if (GET_CODE (addr) != PLUS && GET_CODE (addr) != LO_SUM)
12720
gcc_unreachable ();
12722
+ addis_value = XEXP (addr, 0);
12723
load_offset = XEXP (addr, 1);
12725
/* Now emit the load instruction to the same register. */
12726
@@ -32864,29 +32984,22 @@
12728
mode_name = "char";
12730
- extend_insn = "extsb %0,%0";
12734
mode_name = "short";
12736
- extend_insn = "extsh %0,%0";
12742
- extend_insn = "extsw %0,%0";
12746
- if (TARGET_POWERPC64)
12748
- mode_name = "long";
12752
- gcc_unreachable ();
12753
+ gcc_assert (TARGET_POWERPC64);
12754
+ mode_name = "long";
12759
@@ -33030,14 +33143,6 @@
12761
fatal_insn ("Unable to generate load offset for fusion", load_offset);
12763
- /* Handle sign extension. The peephole2 pass generates this as a separate
12764
- insn, but we handle it just in case it got reattached. */
12767
- gcc_assert (extend_insn != NULL);
12768
- output_asm_insn (extend_insn, fuse_ops);
12774
Index: gcc/config/rs6000/vsx.md
12775
===================================================================
12776
--- a/src/gcc/config/rs6000/vsx.md (.../tags/gcc_4_8_3_release)
12777
+++ b/src/gcc/config/rs6000/vsx.md (.../branches/gcc-4_8-branch)
12779
;; Iterator for the 2 64-bit vector types
12780
(define_mode_iterator VSX_D [V2DF V2DI])
12782
+;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
12783
+;; lxvd2x to properly handle swapping words on little endian
12784
+(define_mode_iterator VSX_LE [V2DF
12787
+ (TI "VECTOR_MEM_VSX_P (TImode)")])
12789
;; Iterator for the 2 32-bit vector types
12790
(define_mode_iterator VSX_W [V4SF V4SI])
12792
@@ -79,19 +86,26 @@
12803
-;; Map the register class used for float<->int conversions
12804
+;; Map the register class used for float<->int conversions (floating point side)
12805
+;; VSr2 is the preferred register class, VSr3 is any register class that will
12807
(define_mode_attr VSr2 [(V2DF "wd")
12814
(define_mode_attr VSr3 [(V2DF "wa")
12821
;; Map the register class for sp<->dp float conversions, destination
12822
(define_mode_attr VSr4 [(SF "ws")
12823
@@ -99,12 +113,27 @@
12827
-;; Map the register class for sp<->dp float conversions, destination
12828
+;; Map the register class for sp<->dp float conversions, source
12829
(define_mode_attr VSr5 [(SF "ws")
12834
+;; The VSX register class that a type can occupy, even if it is not the
12835
+;; preferred register class (VSr is the preferred register class that will get
12836
+;; allocated first).
12837
+(define_mode_attr VSa [(V16QI "wa")
12849
;; Same size integer type for floating point data
12850
(define_mode_attr VSi [(V4SF "v4si")
12852
@@ -200,6 +229,16 @@
12856
+;; Map register class for 64-bit element in 128-bit vector for direct moves
12858
+(define_mode_attr VS_64dm [(V2DF "wk")
12861
+;; Map register class for 64-bit element in 128-bit vector for normal register
12862
+;; to register moves
12863
+(define_mode_attr VS_64reg [(V2DF "ws")
12866
;; Constants for creating unspecs
12867
(define_c_enum "unspec"
12869
@@ -228,8 +267,8 @@
12870
;; The patterns for LE permuted loads and stores come before the general
12871
;; VSX moves so they match first.
12872
(define_insn_and_split "*vsx_le_perm_load_<mode>"
12873
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
12874
- (match_operand:VSX_D 1 "memory_operand" "Z"))]
12875
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
12876
+ (match_operand:VSX_LE 1 "memory_operand" "Z"))]
12877
"!BYTES_BIG_ENDIAN && TARGET_VSX"
12879
"!BYTES_BIG_ENDIAN && TARGET_VSX"
12880
@@ -251,7 +290,7 @@
12881
(set_attr "length" "8")])
12883
(define_insn_and_split "*vsx_le_perm_load_<mode>"
12884
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
12885
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
12886
(match_operand:VSX_W 1 "memory_operand" "Z"))]
12887
"!BYTES_BIG_ENDIAN && TARGET_VSX"
12889
@@ -342,8 +381,8 @@
12890
(set_attr "length" "8")])
12892
(define_insn "*vsx_le_perm_store_<mode>"
12893
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
12894
- (match_operand:VSX_D 1 "vsx_register_operand" "+wa"))]
12895
+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
12896
+ (match_operand:VSX_LE 1 "vsx_register_operand" "+<VSa>"))]
12897
"!BYTES_BIG_ENDIAN && TARGET_VSX"
12899
[(set_attr "type" "vecstore")
12900
@@ -350,8 +389,8 @@
12901
(set_attr "length" "12")])
12904
- [(set (match_operand:VSX_D 0 "memory_operand" "")
12905
- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
12906
+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
12907
+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
12908
"!BYTES_BIG_ENDIAN && TARGET_VSX && !reload_completed"
12909
[(set (match_dup 2)
12911
@@ -369,8 +408,8 @@
12912
;; The post-reload split requires that we re-permute the source
12913
;; register in case it is still live.
12915
- [(set (match_operand:VSX_D 0 "memory_operand" "")
12916
- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
12917
+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
12918
+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
12919
"!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed"
12920
[(set (match_dup 1)
12922
@@ -388,7 +427,7 @@
12924
(define_insn "*vsx_le_perm_store_<mode>"
12925
[(set (match_operand:VSX_W 0 "memory_operand" "=Z")
12926
- (match_operand:VSX_W 1 "vsx_register_operand" "+wa"))]
12927
+ (match_operand:VSX_W 1 "vsx_register_operand" "+<VSa>"))]
12928
"!BYTES_BIG_ENDIAN && TARGET_VSX"
12930
[(set_attr "type" "vecstore")
12931
@@ -578,8 +617,8 @@
12934
(define_insn "*vsx_mov<mode>"
12935
- [(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")
12936
- (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,wa,Z,wa,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
12937
+ [(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")
12938
+ (match_operand:VSX_M 1 "input_operand" "<VSr>,Z,<VSr>,<VSa>,Z,<VSa>,r,wQ,r,Y,r,j,j,j,W,v,wZ"))]
12939
"VECTOR_MEM_VSX_P (<MODE>mode)
12940
&& (register_operand (operands[0], <MODE>mode)
12941
|| register_operand (operands[1], <MODE>mode))"
12942
@@ -681,9 +720,9 @@
12943
;; instructions are now combined with the insn for the traditional floating
12945
(define_insn "*vsx_add<mode>3"
12946
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12947
- (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
12948
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
12949
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12950
+ (plus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
12951
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
12952
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12953
"xvadd<VSs> %x0,%x1,%x2"
12954
[(set_attr "type" "<VStype_simple>")
12955
@@ -690,9 +729,9 @@
12956
(set_attr "fp_type" "<VSfptype_simple>")])
12958
(define_insn "*vsx_sub<mode>3"
12959
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12960
- (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
12961
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
12962
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12963
+ (minus:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
12964
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
12965
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12966
"xvsub<VSs> %x0,%x1,%x2"
12967
[(set_attr "type" "<VStype_simple>")
12968
@@ -699,9 +738,9 @@
12969
(set_attr "fp_type" "<VSfptype_simple>")])
12971
(define_insn "*vsx_mul<mode>3"
12972
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12973
- (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
12974
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
12975
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12976
+ (mult:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
12977
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
12978
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12979
"xvmul<VSs> %x0,%x1,%x2"
12980
[(set_attr "type" "<VStype_simple>")
12981
@@ -708,9 +747,9 @@
12982
(set_attr "fp_type" "<VSfptype_mul>")])
12984
(define_insn "*vsx_div<mode>3"
12985
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
12986
- (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
12987
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
12988
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
12989
+ (div:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
12990
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
12991
"VECTOR_UNIT_VSX_P (<MODE>mode)"
12992
"xvdiv<VSs> %x0,%x1,%x2"
12993
[(set_attr "type" "<VStype_div>")
12994
@@ -746,8 +785,8 @@
12996
(define_insn "*vsx_tdiv<mode>3_internal"
12997
[(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
12998
- (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")
12999
- (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,wa")]
13000
+ (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")
13001
+ (match_operand:VSX_B 2 "vsx_register_operand" "<VSr>,<VSa>")]
13003
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13004
"x<VSv>tdiv<VSs> %0,%x1,%x2"
13005
@@ -755,8 +794,8 @@
13006
(set_attr "fp_type" "<VSfptype_simple>")])
13008
(define_insn "vsx_fre<mode>2"
13009
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13010
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
13011
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13012
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
13014
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13015
"xvre<VSs> %x0,%x1"
13016
@@ -764,8 +803,8 @@
13017
(set_attr "fp_type" "<VSfptype_simple>")])
13019
(define_insn "*vsx_neg<mode>2"
13020
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13021
- (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
13022
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13023
+ (neg:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
13024
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13025
"xvneg<VSs> %x0,%x1"
13026
[(set_attr "type" "<VStype_simple>")
13027
@@ -772,8 +811,8 @@
13028
(set_attr "fp_type" "<VSfptype_simple>")])
13030
(define_insn "*vsx_abs<mode>2"
13031
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13032
- (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
13033
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13034
+ (abs:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
13035
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13036
"xvabs<VSs> %x0,%x1"
13037
[(set_attr "type" "<VStype_simple>")
13038
@@ -780,10 +819,10 @@
13039
(set_attr "fp_type" "<VSfptype_simple>")])
13041
(define_insn "vsx_nabs<mode>2"
13042
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13043
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13046
- (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa"))))]
13047
+ (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>"))))]
13048
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13049
"xvnabs<VSs> %x0,%x1"
13050
[(set_attr "type" "<VStype_simple>")
13051
@@ -790,9 +829,9 @@
13052
(set_attr "fp_type" "<VSfptype_simple>")])
13054
(define_insn "vsx_smax<mode>3"
13055
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13056
- (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
13057
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
13058
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13059
+ (smax:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
13060
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
13061
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13062
"xvmax<VSs> %x0,%x1,%x2"
13063
[(set_attr "type" "<VStype_simple>")
13064
@@ -799,9 +838,9 @@
13065
(set_attr "fp_type" "<VSfptype_simple>")])
13067
(define_insn "*vsx_smin<mode>3"
13068
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13069
- (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
13070
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
13071
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13072
+ (smin:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
13073
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
13074
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13075
"xvmin<VSs> %x0,%x1,%x2"
13076
[(set_attr "type" "<VStype_simple>")
13077
@@ -808,8 +847,8 @@
13078
(set_attr "fp_type" "<VSfptype_simple>")])
13080
(define_insn "*vsx_sqrt<mode>2"
13081
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13082
- (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
13083
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13084
+ (sqrt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
13085
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13086
"xvsqrt<VSs> %x0,%x1"
13087
[(set_attr "type" "<VStype_sqrt>")
13088
@@ -816,8 +855,8 @@
13089
(set_attr "fp_type" "<VSfptype_sqrt>")])
13091
(define_insn "*vsx_rsqrte<mode>2"
13092
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13093
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
13094
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13095
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
13097
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13098
"xvrsqrte<VSs> %x0,%x1"
13099
@@ -852,7 +891,7 @@
13101
(define_insn "*vsx_tsqrt<mode>2_internal"
13102
[(set (match_operand:CCFP 0 "cc_reg_operand" "=x,x")
13103
- (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
13104
+ (unspec:CCFP [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
13105
UNSPEC_VSX_TSQRT))]
13106
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13107
"x<VSv>tsqrt<VSs> %0,%x1"
13108
@@ -865,11 +904,11 @@
13111
(define_insn "*vsx_fmav4sf4"
13112
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,ws,?wa,?wa,v")
13113
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,wf,?wa,?wa,v")
13115
- (match_operand:V4SF 1 "vsx_register_operand" "%ws,ws,wa,wa,v")
13116
- (match_operand:V4SF 2 "vsx_register_operand" "ws,0,wa,0,v")
13117
- (match_operand:V4SF 3 "vsx_register_operand" "0,ws,0,wa,v")))]
13118
+ (match_operand:V4SF 1 "vsx_register_operand" "%wf,wf,wa,wa,v")
13119
+ (match_operand:V4SF 2 "vsx_register_operand" "wf,0,wa,0,v")
13120
+ (match_operand:V4SF 3 "vsx_register_operand" "0,wf,0,wa,v")))]
13121
"VECTOR_UNIT_VSX_P (V4SFmode)"
13123
xvmaddasp %x0,%x1,%x2
13124
@@ -880,11 +919,11 @@
13125
[(set_attr "type" "vecfloat")])
13127
(define_insn "*vsx_fmav2df4"
13128
- [(set (match_operand:V2DF 0 "vsx_register_operand" "=ws,ws,?wa,?wa")
13129
+ [(set (match_operand:V2DF 0 "vsx_register_operand" "=wd,wd,?wa,?wa")
13131
- (match_operand:V2DF 1 "vsx_register_operand" "%ws,ws,wa,wa")
13132
- (match_operand:V2DF 2 "vsx_register_operand" "ws,0,wa,0")
13133
- (match_operand:V2DF 3 "vsx_register_operand" "0,ws,0,wa")))]
13134
+ (match_operand:V2DF 1 "vsx_register_operand" "%wd,wd,wa,wa")
13135
+ (match_operand:V2DF 2 "vsx_register_operand" "wd,0,wa,0")
13136
+ (match_operand:V2DF 3 "vsx_register_operand" "0,wd,0,wa")))]
13137
"VECTOR_UNIT_VSX_P (V2DFmode)"
13139
xvmaddadp %x0,%x1,%x2
13140
@@ -894,12 +933,12 @@
13141
[(set_attr "type" "vecdouble")])
13143
(define_insn "*vsx_fms<mode>4"
13144
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
13145
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
13147
- (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,wa,wa")
13148
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
13149
+ (match_operand:VSX_F 1 "vsx_register_operand" "%<VSr>,<VSr>,<VSa>,<VSa>")
13150
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
13152
- (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
13153
+ (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
13154
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13156
xvmsuba<VSs> %x0,%x1,%x2
13157
@@ -909,12 +948,12 @@
13158
[(set_attr "type" "<VStype_mul>")])
13160
(define_insn "*vsx_nfma<mode>4"
13161
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?wa,?wa")
13162
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,<VSr>,?<VSa>,?<VSa>")
13165
- (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,wa,wa")
13166
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,wa,0")
13167
- (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,wa"))))]
13168
+ (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSr>,<VSa>,<VSa>")
13169
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,0,<VSa>,0")
13170
+ (match_operand:VSX_F 3 "vsx_register_operand" "0,<VSr>,0,<VSa>"))))]
13171
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13173
xvnmadda<VSs> %x0,%x1,%x2
13174
@@ -959,9 +998,9 @@
13176
;; Vector conditional expressions (no scalar version for these instructions)
13177
(define_insn "vsx_eq<mode>"
13178
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13179
- (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
13180
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
13181
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13182
+ (eq:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
13183
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
13184
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13185
"xvcmpeq<VSs> %x0,%x1,%x2"
13186
[(set_attr "type" "<VStype_simple>")
13187
@@ -968,9 +1007,9 @@
13188
(set_attr "fp_type" "<VSfptype_simple>")])
13190
(define_insn "vsx_gt<mode>"
13191
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13192
- (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
13193
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
13194
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13195
+ (gt:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
13196
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
13197
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13198
"xvcmpgt<VSs> %x0,%x1,%x2"
13199
[(set_attr "type" "<VStype_simple>")
13200
@@ -977,9 +1016,9 @@
13201
(set_attr "fp_type" "<VSfptype_simple>")])
13203
(define_insn "*vsx_ge<mode>"
13204
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13205
- (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
13206
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")))]
13207
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13208
+ (ge:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
13209
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")))]
13210
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13211
"xvcmpge<VSs> %x0,%x1,%x2"
13212
[(set_attr "type" "<VStype_simple>")
13213
@@ -990,10 +1029,10 @@
13214
(define_insn "*vsx_eq_<mode>_p"
13217
- [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
13218
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
13219
+ [(eq:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
13220
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
13222
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13223
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13224
(eq:VSX_F (match_dup 1)
13226
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13227
@@ -1003,10 +1042,10 @@
13228
(define_insn "*vsx_gt_<mode>_p"
13231
- [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
13232
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
13233
+ [(gt:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
13234
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
13236
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13237
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13238
(gt:VSX_F (match_dup 1)
13240
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13241
@@ -1016,10 +1055,10 @@
13242
(define_insn "*vsx_ge_<mode>_p"
13245
- [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?wa")
13246
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?wa"))]
13247
+ [(ge:CC (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,?<VSa>")
13248
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,?<VSa>"))]
13250
- (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13251
+ (set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13252
(ge:VSX_F (match_dup 1)
13254
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13255
@@ -1028,23 +1067,23 @@
13258
(define_insn "*vsx_xxsel<mode>"
13259
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
13260
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13261
(if_then_else:VSX_L
13262
- (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
13263
+ (ne:CC (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
13264
(match_operand:VSX_L 4 "zero_constant" ""))
13265
- (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
13266
- (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
13267
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
13268
+ (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
13269
"VECTOR_MEM_VSX_P (<MODE>mode)"
13270
"xxsel %x0,%x3,%x2,%x1"
13271
[(set_attr "type" "vecperm")])
13273
(define_insn "*vsx_xxsel<mode>_uns"
13274
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?wa")
13275
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13276
(if_then_else:VSX_L
13277
- (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,wa")
13278
+ (ne:CCUNS (match_operand:VSX_L 1 "vsx_register_operand" "<VSr>,<VSa>")
13279
(match_operand:VSX_L 4 "zero_constant" ""))
13280
- (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,wa")
13281
- (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,wa")))]
13282
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSr>,<VSa>")
13283
+ (match_operand:VSX_L 3 "vsx_register_operand" "<VSr>,<VSa>")))]
13284
"VECTOR_MEM_VSX_P (<MODE>mode)"
13285
"xxsel %x0,%x3,%x2,%x1"
13286
[(set_attr "type" "vecperm")])
13287
@@ -1051,10 +1090,10 @@
13290
(define_insn "vsx_copysign<mode>3"
13291
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13292
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13294
- [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")
13295
- (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,wa")]
13296
+ [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")
13297
+ (match_operand:VSX_F 2 "vsx_register_operand" "<VSr>,<VSa>")]
13299
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13300
"xvcpsgn<VSs> %x0,%x2,%x1"
13301
@@ -1067,7 +1106,7 @@
13302
;; in rs6000.md so don't test VECTOR_UNIT_VSX_P, just test against VSX.
13303
;; Don't use vsx_register_operand here, use gpc_reg_operand to match rs6000.md.
13304
(define_insn "vsx_float<VSi><mode>2"
13305
- [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
13306
+ [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
13307
(float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
13308
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13309
"x<VSv>cvsx<VSc><VSs> %x0,%x1"
13310
@@ -1075,7 +1114,7 @@
13311
(set_attr "fp_type" "<VSfptype_simple>")])
13313
(define_insn "vsx_floatuns<VSi><mode>2"
13314
- [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa")
13315
+ [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?<VSa>")
13316
(unsigned_float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))]
13317
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13318
"x<VSv>cvux<VSc><VSs> %x0,%x1"
13319
@@ -1084,7 +1123,7 @@
13321
(define_insn "vsx_fix_trunc<mode><VSi>2"
13322
[(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
13323
- (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
13324
+ (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
13325
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13326
"x<VSv>cv<VSs>sx<VSc>s %x0,%x1"
13327
[(set_attr "type" "<VStype_simple>")
13328
@@ -1092,7 +1131,7 @@
13330
(define_insn "vsx_fixuns_trunc<mode><VSi>2"
13331
[(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>")
13332
- (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))]
13333
+ (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,<VSa>")))]
13334
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13335
"x<VSv>cv<VSs>ux<VSc>s %x0,%x1"
13336
[(set_attr "type" "<VStype_simple>")
13337
@@ -1100,8 +1139,8 @@
13339
;; Math rounding functions
13340
(define_insn "vsx_x<VSv>r<VSs>i"
13341
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
13342
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
13343
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13344
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
13345
UNSPEC_VSX_ROUND_I))]
13346
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13347
"x<VSv>r<VSs>i %x0,%x1"
13348
@@ -1109,8 +1148,8 @@
13349
(set_attr "fp_type" "<VSfptype_simple>")])
13351
(define_insn "vsx_x<VSv>r<VSs>ic"
13352
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
13353
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
13354
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13355
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
13356
UNSPEC_VSX_ROUND_IC))]
13357
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13358
"x<VSv>r<VSs>ic %x0,%x1"
13359
@@ -1118,8 +1157,8 @@
13360
(set_attr "fp_type" "<VSfptype_simple>")])
13362
(define_insn "vsx_btrunc<mode>2"
13363
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13364
- (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")))]
13365
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13366
+ (fix:VSX_F (match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")))]
13367
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13368
"xvr<VSs>iz %x0,%x1"
13369
[(set_attr "type" "<VStype_simple>")
13370
@@ -1126,8 +1165,8 @@
13371
(set_attr "fp_type" "<VSfptype_simple>")])
13373
(define_insn "*vsx_b2trunc<mode>2"
13374
- [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa")
13375
- (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")]
13376
+ [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13377
+ (unspec:VSX_B [(match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,<VSa>")]
13379
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13380
"x<VSv>r<VSs>iz %x0,%x1"
13381
@@ -1135,8 +1174,8 @@
13382
(set_attr "fp_type" "<VSfptype_simple>")])
13384
(define_insn "vsx_floor<mode>2"
13385
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13386
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
13387
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13388
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
13390
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13391
"xvr<VSs>im %x0,%x1"
13392
@@ -1144,8 +1183,8 @@
13393
(set_attr "fp_type" "<VSfptype_simple>")])
13395
(define_insn "vsx_ceil<mode>2"
13396
- [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?wa")
13397
- (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,wa")]
13398
+ [(set (match_operand:VSX_F 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13399
+ (unspec:VSX_F [(match_operand:VSX_F 1 "vsx_register_operand" "<VSr>,<VSa>")]
13401
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13402
"xvr<VSs>ip %x0,%x1"
13403
@@ -1160,8 +1199,8 @@
13404
;; scalar single precision instructions internally use the double format.
13405
;; Prefer the altivec registers, since we likely will need to do a vperm
13406
(define_insn "vsx_<VS_spdp_insn>"
13407
- [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?wa")
13408
- (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,wa")]
13409
+ [(set (match_operand:<VS_spdp_res> 0 "vsx_register_operand" "=<VSr4>,?<VSa>")
13410
+ (unspec:<VS_spdp_res> [(match_operand:VSX_SPDP 1 "vsx_register_operand" "<VSr5>,<VSa>")]
13411
UNSPEC_VSX_CVSPDP))]
13412
"VECTOR_UNIT_VSX_P (<MODE>mode)"
13413
"<VS_spdp_insn> %x0,%x1"
13414
@@ -1169,8 +1208,8 @@
13416
;; xscvspdp, represent the scalar SF type as V4SF
13417
(define_insn "vsx_xscvspdp"
13418
- [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
13419
- (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
13420
+ [(set (match_operand:DF 0 "vsx_register_operand" "=ws")
13421
+ (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa")]
13422
UNSPEC_VSX_CVSPDP))]
13423
"VECTOR_UNIT_VSX_P (V4SFmode)"
13425
@@ -1197,7 +1236,7 @@
13427
;; ISA 2.07 xscvdpspn/xscvspdpn that does not raise an error on signalling NaNs
13428
(define_insn "vsx_xscvdpspn"
13429
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=ws,?wa")
13430
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=ww,?ww")
13431
(unspec:V4SF [(match_operand:DF 1 "vsx_register_operand" "wd,wa")]
13432
UNSPEC_VSX_CVDPSPN))]
13434
@@ -1205,8 +1244,8 @@
13435
[(set_attr "type" "fp")])
13437
(define_insn "vsx_xscvspdpn"
13438
- [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?wa")
13439
- (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wa,wa")]
13440
+ [(set (match_operand:DF 0 "vsx_register_operand" "=ws,?ws")
13441
+ (unspec:DF [(match_operand:V4SF 1 "vsx_register_operand" "wf,wa")]
13442
UNSPEC_VSX_CVSPDPN))]
13444
"xscvspdpn %x0,%x1"
13445
@@ -1213,8 +1252,8 @@
13446
[(set_attr "type" "fp")])
13448
(define_insn "vsx_xscvdpspn_scalar"
13449
- [(set (match_operand:V4SF 0 "vsx_register_operand" "=wa")
13450
- (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "f")]
13451
+ [(set (match_operand:V4SF 0 "vsx_register_operand" "=wf,?wa")
13452
+ (unspec:V4SF [(match_operand:SF 1 "vsx_register_operand" "ww,ww")]
13453
UNSPEC_VSX_CVDPSPN))]
13455
"xscvdpspn %x0,%x1"
13456
@@ -1302,10 +1341,10 @@
13457
;; since the xsrdpiz instruction does not truncate the value if the floating
13458
;; point value is < LONG_MIN or > LONG_MAX.
13459
(define_insn "*vsx_float_fix_<mode>2"
13460
- [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?wa")
13461
+ [(set (match_operand:VSX_DF 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13464
- (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?wa"))))]
13465
+ (match_operand:VSX_DF 1 "vsx_register_operand" "<VSr>,?<VSa>"))))]
13466
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
13467
&& VECTOR_UNIT_VSX_P (<MODE>mode) && flag_unsafe_math_optimizations
13468
&& !flag_trapping_math && TARGET_FRIZ"
13469
@@ -1318,10 +1357,10 @@
13471
;; Build a V2DF/V2DI vector from two scalars
13472
(define_insn "vsx_concat_<mode>"
13473
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?wa")
13474
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=<VSr>,?<VSa>")
13476
- (match_operand:<VS_scalar> 1 "vsx_register_operand" "ws,wa")
13477
- (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")))]
13478
+ (match_operand:<VS_scalar> 1 "vsx_register_operand" "<VS_64reg>,<VSa>")
13479
+ (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")))]
13480
"VECTOR_MEM_VSX_P (<MODE>mode)"
13482
if (BYTES_BIG_ENDIAN)
13483
@@ -1352,9 +1391,9 @@
13484
;; xxpermdi for little endian loads and stores. We need several of
13485
;; these since the form of the PARALLEL differs by mode.
13486
(define_insn "*vsx_xxpermdi2_le_<mode>"
13487
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
13488
- (vec_select:VSX_D
13489
- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
13490
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
13491
+ (vec_select:VSX_LE
13492
+ (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
13493
(parallel [(const_int 1) (const_int 0)])))]
13494
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
13495
"xxpermdi %x0,%x1,%x1,2"
13496
@@ -1361,9 +1400,9 @@
13497
[(set_attr "type" "vecperm")])
13499
(define_insn "*vsx_xxpermdi4_le_<mode>"
13500
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
13501
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
13503
- (match_operand:VSX_W 1 "vsx_register_operand" "wa")
13504
+ (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
13505
(parallel [(const_int 2) (const_int 3)
13506
(const_int 0) (const_int 1)])))]
13507
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
13508
@@ -1401,9 +1440,9 @@
13509
;; lxvd2x for little endian loads. We need several of
13510
;; these since the form of the PARALLEL differs by mode.
13511
(define_insn "*vsx_lxvd2x2_le_<mode>"
13512
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
13513
- (vec_select:VSX_D
13514
- (match_operand:VSX_D 1 "memory_operand" "Z")
13515
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=<VSa>")
13516
+ (vec_select:VSX_LE
13517
+ (match_operand:VSX_LE 1 "memory_operand" "Z")
13518
(parallel [(const_int 1) (const_int 0)])))]
13519
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
13521
@@ -1410,7 +1449,7 @@
13522
[(set_attr "type" "vecload")])
13524
(define_insn "*vsx_lxvd2x4_le_<mode>"
13525
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wa")
13526
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=<VSa>")
13528
(match_operand:VSX_W 1 "memory_operand" "Z")
13529
(parallel [(const_int 2) (const_int 3)
13530
@@ -1450,9 +1489,9 @@
13531
;; stxvd2x for little endian stores. We need several of
13532
;; these since the form of the PARALLEL differs by mode.
13533
(define_insn "*vsx_stxvd2x2_le_<mode>"
13534
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
13535
- (vec_select:VSX_D
13536
- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
13537
+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
13538
+ (vec_select:VSX_LE
13539
+ (match_operand:VSX_LE 1 "vsx_register_operand" "<VSa>")
13540
(parallel [(const_int 1) (const_int 0)])))]
13541
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
13543
@@ -1461,7 +1500,7 @@
13544
(define_insn "*vsx_stxvd2x4_le_<mode>"
13545
[(set (match_operand:VSX_W 0 "memory_operand" "=Z")
13547
- (match_operand:VSX_W 1 "vsx_register_operand" "wa")
13548
+ (match_operand:VSX_W 1 "vsx_register_operand" "<VSa>")
13549
(parallel [(const_int 2) (const_int 3)
13550
(const_int 0) (const_int 1)])))]
13551
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
13552
@@ -1513,11 +1552,12 @@
13554
;; Set the element of a V2DI/VD2F mode
13555
(define_insn "vsx_set_<mode>"
13556
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?wa")
13557
- (unspec:VSX_D [(match_operand:VSX_D 1 "vsx_register_operand" "wd,wa")
13558
- (match_operand:<VS_scalar> 2 "vsx_register_operand" "ws,wa")
13559
- (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
13560
- UNSPEC_VSX_SET))]
13561
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,?<VSa>")
13563
+ [(match_operand:VSX_D 1 "vsx_register_operand" "wd,<VSa>")
13564
+ (match_operand:<VS_scalar> 2 "vsx_register_operand" "<VS_64reg>,<VSa>")
13565
+ (match_operand:QI 3 "u5bit_cint_operand" "i,i")]
13566
+ UNSPEC_VSX_SET))]
13567
"VECTOR_MEM_VSX_P (<MODE>mode)"
13569
int idx_first = BYTES_BIG_ENDIAN ? 0 : 1;
13570
@@ -1582,7 +1622,7 @@
13571
(define_insn_and_split "vsx_extract_v4sf"
13572
[(set (match_operand:SF 0 "vsx_register_operand" "=f,f")
13574
- (match_operand:V4SF 1 "vsx_register_operand" "wa,wa")
13575
+ (match_operand:V4SF 1 "vsx_register_operand" "<VSa>,<VSa>")
13576
(parallel [(match_operand:QI 2 "u5bit_cint_operand" "O,i")])))
13577
(clobber (match_scratch:V4SF 3 "=X,0"))]
13578
"VECTOR_UNIT_VSX_P (V4SFmode)"
13579
@@ -1606,7 +1646,7 @@
13581
if (GET_CODE (op3) == SCRATCH)
13582
op3 = gen_reg_rtx (V4SFmode);
13583
- emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, op2));
13584
+ emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, GEN_INT (ele)));
13587
emit_insn (gen_vsx_xscvspdp_scalar2 (op0, tmp));
13588
@@ -1765,9 +1805,9 @@
13591
(define_insn "vsx_splat_<mode>"
13592
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?wa,?wa,?wa")
13593
+ [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?<VSa>,?<VSa>,?<VSa>")
13594
(vec_duplicate:VSX_D
13595
- (match_operand:<VS_scalar> 1 "splat_input_operand" "ws,f,Z,wa,wa,Z")))]
13596
+ (match_operand:<VS_scalar> 1 "splat_input_operand" "<VS_64reg>,f,Z,<VSa>,<VSa>,Z")))]
13597
"VECTOR_MEM_VSX_P (<MODE>mode)"
13599
xxpermdi %x0,%x1,%x1,0
13600
@@ -1780,10 +1820,10 @@
13603
(define_insn "vsx_xxspltw_<mode>"
13604
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
13605
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
13606
(vec_duplicate:VSX_W
13607
(vec_select:<VS_scalar>
13608
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
13609
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
13611
[(match_operand:QI 2 "u5bit_cint_operand" "i,i")]))))]
13612
"VECTOR_MEM_VSX_P (<MODE>mode)"
13613
@@ -1796,8 +1836,8 @@
13614
[(set_attr "type" "vecperm")])
13616
(define_insn "vsx_xxspltw_<mode>_direct"
13617
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
13618
- (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
13619
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
13620
+ (unspec:VSX_W [(match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
13621
(match_operand:QI 2 "u5bit_cint_operand" "i,i")]
13622
UNSPEC_VSX_XXSPLTW))]
13623
"VECTOR_MEM_VSX_P (<MODE>mode)"
13624
@@ -1806,11 +1846,11 @@
13626
;; V4SF/V4SI interleave
13627
(define_insn "vsx_xxmrghw_<mode>"
13628
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
13629
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
13631
(vec_concat:<VS_double>
13632
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
13633
- (match_operand:VSX_W 2 "vsx_register_operand" "wf,wa"))
13634
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
13635
+ (match_operand:VSX_W 2 "vsx_register_operand" "wf,<VSa>"))
13636
(parallel [(const_int 0) (const_int 4)
13637
(const_int 1) (const_int 5)])))]
13638
"VECTOR_MEM_VSX_P (<MODE>mode)"
13639
@@ -1823,11 +1863,11 @@
13640
[(set_attr "type" "vecperm")])
13642
(define_insn "vsx_xxmrglw_<mode>"
13643
- [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?wa")
13644
+ [(set (match_operand:VSX_W 0 "vsx_register_operand" "=wf,?<VSa>")
13646
(vec_concat:<VS_double>
13647
- (match_operand:VSX_W 1 "vsx_register_operand" "wf,wa")
13648
- (match_operand:VSX_W 2 "vsx_register_operand" "wf,?wa"))
13649
+ (match_operand:VSX_W 1 "vsx_register_operand" "wf,<VSa>")
13650
+ (match_operand:VSX_W 2 "vsx_register_operand" "wf,?<VSa>"))
13651
(parallel [(const_int 2) (const_int 6)
13652
(const_int 3) (const_int 7)])))]
13653
"VECTOR_MEM_VSX_P (<MODE>mode)"
13654
@@ -1841,9 +1881,9 @@
13656
;; Shift left double by word immediate
13657
(define_insn "vsx_xxsldwi_<mode>"
13658
- [(set (match_operand:VSX_L 0 "vsx_register_operand" "=wa")
13659
- (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "wa")
13660
- (match_operand:VSX_L 2 "vsx_register_operand" "wa")
13661
+ [(set (match_operand:VSX_L 0 "vsx_register_operand" "=<VSa>")
13662
+ (unspec:VSX_L [(match_operand:VSX_L 1 "vsx_register_operand" "<VSa>")
13663
+ (match_operand:VSX_L 2 "vsx_register_operand" "<VSa>")
13664
(match_operand:QI 3 "u5bit_cint_operand" "i")]
13665
UNSPEC_VSX_SLDWI))]
13666
"VECTOR_MEM_VSX_P (<MODE>mode)"
13667
@@ -1924,7 +1964,7 @@
13668
;; to the top element of the V2DF array without doing an extract.
13670
(define_insn_and_split "*vsx_reduc_<VEC_reduc_name>_v2df_scalar"
13671
- [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?wa,ws,?wa")
13672
+ [(set (match_operand:DF 0 "vfloat_operand" "=&ws,&?ws,ws,?ws")
13676
Index: gcc/config/rs6000/rs6000.h
13677
===================================================================
13678
--- a/src/gcc/config/rs6000/rs6000.h (.../tags/gcc_4_8_3_release)
13679
+++ b/src/gcc/config/rs6000/rs6000.h (.../branches/gcc-4_8-branch)
13680
@@ -1438,6 +1438,10 @@
13681
RS6000_CONSTRAINT_wd, /* VSX register for V2DF */
13682
RS6000_CONSTRAINT_wf, /* VSX register for V4SF */
13683
RS6000_CONSTRAINT_wg, /* FPR register for -mmfpgpr */
13684
+ RS6000_CONSTRAINT_wh, /* FPR register for direct moves. */
13685
+ RS6000_CONSTRAINT_wi, /* FPR/VSX register to hold DImode */
13686
+ RS6000_CONSTRAINT_wj, /* FPR/VSX register for DImode direct moves. */
13687
+ RS6000_CONSTRAINT_wk, /* FPR/VSX register for DFmode direct moves. */
13688
RS6000_CONSTRAINT_wl, /* FPR register for LFIWAX */
13689
RS6000_CONSTRAINT_wm, /* VSX register for direct move */
13690
RS6000_CONSTRAINT_wr, /* GPR register if 64-bit */
13691
@@ -1462,6 +1466,9 @@
13692
#define VSX_REG_CLASS_P(CLASS) \
13693
((CLASS) == VSX_REGS || (CLASS) == FLOAT_REGS || (CLASS) == ALTIVEC_REGS)
13695
+/* Return whether a given register class targets general purpose registers. */
13696
+#define GPR_REG_CLASS_P(CLASS) ((CLASS) == GENERAL_REGS || (CLASS) == BASE_REGS)
13698
/* Given an rtx X being reloaded into a reg required to be
13699
in class CLASS, return the class of reg to actually use.
13700
In general this is just CLASS; but on some machines
13701
@@ -1593,8 +1600,15 @@
13702
/* Define this if stack space is still allocated for a parameter passed
13703
in a register. The value is the number of bytes allocated to this
13705
-#define REG_PARM_STACK_SPACE(FNDECL) rs6000_reg_parm_stack_space((FNDECL))
13706
+#define REG_PARM_STACK_SPACE(FNDECL) \
13707
+ rs6000_reg_parm_stack_space ((FNDECL), false)
13709
+/* Define this macro if space guaranteed when compiling a function body
13710
+ is different to space required when making a call, a situation that
13711
+ can arise with K&R style function definitions. */
13712
+#define INCOMING_REG_PARM_STACK_SPACE(FNDECL) \
13713
+ rs6000_reg_parm_stack_space ((FNDECL), true)
13715
/* Define this if the above stack space is to be considered part of the
13716
space allocated by the caller. */
13717
#define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
13718
@@ -2483,8 +2497,8 @@
13719
#define RS6000_BTC_SAT RS6000_BTC_MISC /* saturate sets VSCR. */
13721
/* Builtin targets. For now, we reuse the masks for those options that are in
13722
- target flags, and pick two random bits for SPE and paired which aren't in
13724
+ target flags, and pick three random bits for SPE, paired and ldbl128 which
13725
+ aren't in target_flags. */
13726
#define RS6000_BTM_ALWAYS 0 /* Always enabled. */
13727
#define RS6000_BTM_ALTIVEC MASK_ALTIVEC /* VMX/altivec vectors. */
13728
#define RS6000_BTM_VSX MASK_VSX /* VSX (vector/scalar). */
13729
@@ -2501,6 +2515,7 @@
13730
#define RS6000_BTM_CELL MASK_FPRND /* Target is cell powerpc. */
13731
#define RS6000_BTM_DFP MASK_DFP /* Decimal floating point. */
13732
#define RS6000_BTM_HARD_FLOAT MASK_SOFT_FLOAT /* Hardware floating point. */
13733
+#define RS6000_BTM_LDBL128 MASK_MULTIPLE /* 128-bit long double. */
13735
#define RS6000_BTM_COMMON (RS6000_BTM_ALTIVEC \
13737
@@ -2514,7 +2529,8 @@
13738
| RS6000_BTM_POPCNTD \
13739
| RS6000_BTM_CELL \
13741
- | RS6000_BTM_HARD_FLOAT)
13742
+ | RS6000_BTM_HARD_FLOAT \
13743
+ | RS6000_BTM_LDBL128)
13745
/* Define builtin enum index. */
13747
Index: gcc/config/rs6000/altivec.md
13748
===================================================================
13749
--- a/src/gcc/config/rs6000/altivec.md (.../tags/gcc_4_8_3_release)
13750
+++ b/src/gcc/config/rs6000/altivec.md (.../branches/gcc-4_8-branch)
13751
@@ -2297,7 +2297,31 @@
13753
[(set_attr "type" "vecsimple")])
13755
-(define_insn "altivec_lvsl"
13756
+(define_expand "altivec_lvsl"
13757
+ [(use (match_operand:V16QI 0 "register_operand" ""))
13758
+ (use (match_operand:V16QI 1 "memory_operand" ""))]
13761
+ if (VECTOR_ELT_ORDER_BIG)
13762
+ emit_insn (gen_altivec_lvsl_direct (operands[0], operands[1]));
13766
+ rtx mask, perm[16], constv, vperm;
13767
+ mask = gen_reg_rtx (V16QImode);
13768
+ emit_insn (gen_altivec_lvsl_direct (mask, operands[1]));
13769
+ for (i = 0; i < 16; ++i)
13770
+ perm[i] = GEN_INT (i);
13771
+ constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
13772
+ constv = force_reg (V16QImode, constv);
13773
+ vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
13775
+ emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
13780
+(define_insn "altivec_lvsl_direct"
13781
[(set (match_operand:V16QI 0 "register_operand" "=v")
13782
(unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
13784
@@ -2305,7 +2329,31 @@
13786
[(set_attr "type" "vecload")])
13788
-(define_insn "altivec_lvsr"
13789
+(define_expand "altivec_lvsr"
13790
+ [(use (match_operand:V16QI 0 "register_operand" ""))
13791
+ (use (match_operand:V16QI 1 "memory_operand" ""))]
13794
+ if (VECTOR_ELT_ORDER_BIG)
13795
+ emit_insn (gen_altivec_lvsr_direct (operands[0], operands[1]));
13799
+ rtx mask, perm[16], constv, vperm;
13800
+ mask = gen_reg_rtx (V16QImode);
13801
+ emit_insn (gen_altivec_lvsr_direct (mask, operands[1]));
13802
+ for (i = 0; i < 16; ++i)
13803
+ perm[i] = GEN_INT (i);
13804
+ constv = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm));
13805
+ constv = force_reg (V16QImode, constv);
13806
+ vperm = gen_rtx_UNSPEC (V16QImode, gen_rtvec (3, mask, mask, constv),
13808
+ emit_insn (gen_rtx_SET (VOIDmode, operands[0], vperm));
13813
+(define_insn "altivec_lvsr_direct"
13814
[(set (match_operand:V16QI 0 "register_operand" "=v")
13815
(unspec:V16QI [(match_operand:V16QI 1 "memory_operand" "Z")]
13817
Index: gcc/config/rs6000/rs6000.md
13818
===================================================================
13819
--- a/src/gcc/config/rs6000/rs6000.md (.../tags/gcc_4_8_3_release)
13820
+++ b/src/gcc/config/rs6000/rs6000.md (.../branches/gcc-4_8-branch)
13821
@@ -134,6 +134,7 @@
13822
UNSPEC_UNPACK_128BIT
13825
+ UNSPEC_FUSION_GPR
13829
@@ -317,8 +318,25 @@
13830
(define_mode_attr f32_sv [(SF "stxsspx %x1,%y0") (SD "stxsiwzx %x1,%y0")])
13832
; Definitions for 32-bit fpr direct move
13833
-(define_mode_attr f32_dm [(SF "wn") (SD "wm")])
13834
+; At present, the decimal modes are not allowed in the traditional altivec
13835
+; registers, so restrict the constraints to just the traditional FPRs.
13836
+(define_mode_attr f32_dm [(SF "wn") (SD "wh")])
13838
+; Definitions for 32-bit VSX
13839
+(define_mode_attr f32_vsx [(SF "ww") (SD "wn")])
13841
+; Definitions for 32-bit use of altivec registers
13842
+(define_mode_attr f32_av [(SF "wu") (SD "wn")])
13844
+; Definitions for 64-bit VSX
13845
+(define_mode_attr f64_vsx [(DF "ws") (DD "wn")])
13847
+; Definitions for 64-bit direct move
13848
+(define_mode_attr f64_dm [(DF "wk") (DD "wh")])
13850
+; Definitions for 64-bit use of altivec registers
13851
+(define_mode_attr f64_av [(DF "wv") (DD "wn")])
13853
; These modes do not fit in integer registers in 32-bit mode.
13854
; but on e500v2, the gpr are 64 bit registers
13855
(define_mode_iterator DIFD [DI (DF "!TARGET_E500_DOUBLE") DD])
13856
@@ -424,7 +442,7 @@
13859
;; Mode attribute for boolean operation register constraints for output
13860
-(define_mode_attr BOOL_REGS_OUTPUT [(TI "&r,r,r,wa,v")
13861
+(define_mode_attr BOOL_REGS_OUTPUT [(TI "&r,r,r,wt,v")
13863
(V16QI "wa,v,&?r,?r,?r")
13864
(V8HI "wa,v,&?r,?r,?r")
13865
@@ -435,7 +453,7 @@
13866
(V1TI "wa,v,&?r,?r,?r")])
13868
;; Mode attribute for boolean operation register constraints for operand1
13869
-(define_mode_attr BOOL_REGS_OP1 [(TI "r,0,r,wa,v")
13870
+(define_mode_attr BOOL_REGS_OP1 [(TI "r,0,r,wt,v")
13872
(V16QI "wa,v,r,0,r")
13873
(V8HI "wa,v,r,0,r")
13874
@@ -446,7 +464,7 @@
13875
(V1TI "wa,v,r,0,r")])
13877
;; Mode attribute for boolean operation register constraints for operand2
13878
-(define_mode_attr BOOL_REGS_OP2 [(TI "r,r,0,wa,v")
13879
+(define_mode_attr BOOL_REGS_OP2 [(TI "r,r,0,wt,v")
13881
(V16QI "wa,v,r,r,0")
13882
(V8HI "wa,v,r,r,0")
13883
@@ -459,7 +477,7 @@
13884
;; Mode attribute for boolean operation register constraints for operand1
13885
;; for one_cmpl. To simplify things, we repeat the constraint where 0
13886
;; is used for operand1 or operand2
13887
-(define_mode_attr BOOL_REGS_UNARY [(TI "r,0,0,wa,v")
13888
+(define_mode_attr BOOL_REGS_UNARY [(TI "r,0,0,wt,v")
13890
(V16QI "wa,v,r,0,0")
13891
(V8HI "wa,v,r,0,0")
13892
@@ -566,7 +584,7 @@
13895
(define_insn "*zero_extendsidi2_lfiwzx"
13896
- [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wz,!wu")
13897
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wz,!wu")
13898
(zero_extend:DI (match_operand:SI 1 "reg_or_mem_operand" "m,r,r,Z,Z")))]
13899
"TARGET_POWERPC64 && TARGET_LFIWZX"
13901
@@ -736,8 +754,8 @@
13904
(define_insn "*extendsidi2_lfiwax"
13905
- [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wl,!wu")
13906
- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r,r,Z,Z")))]
13907
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wj,!wl,!wu")
13908
+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r,r,Z,Z")))]
13909
"TARGET_POWERPC64 && TARGET_LFIWAX"
13912
@@ -760,7 +778,7 @@
13914
(define_insn "*extendsidi2_nocell"
13915
[(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
13916
- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
13917
+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r")))]
13918
"TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
13921
@@ -5614,7 +5632,7 @@
13922
; We don't define lfiwax/lfiwzx with the normal definition, because we
13923
; don't want to support putting SImode in FPR registers.
13924
(define_insn "lfiwax"
13925
- [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
13926
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
13927
(unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
13929
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWAX"
13930
@@ -5694,7 +5712,7 @@
13931
(set_attr "type" "fpload")])
13933
(define_insn "lfiwzx"
13934
- [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wm,!wm")
13935
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wj,!wj")
13936
(unspec:DI [(match_operand:SI 1 "reg_or_indexed_operand" "Z,Z,r")]
13938
"TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LFIWZX"
13939
@@ -9210,8 +9228,8 @@
13942
(define_insn "mov<mode>_hardfloat"
13943
- [(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")
13944
- (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"))]
13945
+ [(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")
13946
+ (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"))]
13947
"(gpc_reg_operand (operands[0], <MODE>mode)
13948
|| gpc_reg_operand (operands[1], <MODE>mode))
13949
&& (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT)"
13950
@@ -9422,8 +9440,8 @@
13953
(define_insn "*mov<mode>_hardfloat32"
13954
- [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,wv,Z,wa,wa,Y,r,!r,!r,!r,!r")
13955
- (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,wv,wa,j,r,Y,r,G,H,F"))]
13956
+ [(set (match_operand:FMOVE64 0 "nonimmediate_operand" "=m,d,d,<f64_av>,Z,<f64_vsx>,<f64_vsx>,Y,r,!r,!r,!r,!r")
13957
+ (match_operand:FMOVE64 1 "input_operand" "d,m,d,Z,<f64_av>,<f64_vsx>,j,r,Y,r,G,H,F"))]
13958
"! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
13959
&& (gpc_reg_operand (operands[0], <MODE>mode)
13960
|| gpc_reg_operand (operands[1], <MODE>mode))"
13961
@@ -9491,8 +9509,8 @@
13962
; ld/std require word-aligned displacements -> 'Y' constraint.
13963
; List Y->r and r->Y before r->r for reload.
13964
(define_insn "*mov<mode>_hardfloat64"
13965
- [(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")
13966
- (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"))]
13967
+ [(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>")
13968
+ (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"))]
13969
"TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
13970
&& (gpc_reg_operand (operands[0], <MODE>mode)
13971
|| gpc_reg_operand (operands[1], <MODE>mode))"
13972
@@ -10272,8 +10290,8 @@
13973
{ rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
13975
(define_insn "*movdi_internal64"
13976
- [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wm")
13977
- (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wm,r"))]
13978
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=Y,r,r,r,r,r,?m,?*d,?*d,r,*h,*h,r,?*wg,r,?*wj,?*wi")
13979
+ (match_operand:DI 1 "input_operand" "r,Y,r,I,L,nF,d,m,d,*h,r,0,*wg,r,*wj,r,O"))]
13981
&& (gpc_reg_operand (operands[0], DImode)
13982
|| gpc_reg_operand (operands[1], DImode))"
13983
@@ -10293,7 +10311,8 @@
13989
+ xxlxor %x0,%x0,%x0"
13990
[(set_attr_alternative "type"
13992
(match_test "update_indexed_address_mem (operands[0], VOIDmode)")
13993
@@ -10334,8 +10353,9 @@
13994
(const_string "mftgpr")
13995
(const_string "mffgpr")
13996
(const_string "mftgpr")
13997
- (const_string "mffgpr")])
13998
- (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4")])
13999
+ (const_string "mffgpr")
14000
+ (const_string "vecsimple")])
14001
+ (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4,4,4")])
14003
;; immediate value valid for a single instruction hiding in a const_double
14005
@@ -15751,23 +15771,10 @@
14006
;; a GPR. The addis instruction must be adjacent to the load, and use the same
14007
;; register that is being loaded. The fused ops must be physically adjacent.
14009
-;; We use define_peephole for the actual addis/load, and the register used to
14010
-;; hold the addis value must be the same as the register being loaded. We use
14011
-;; define_peephole2 to change the register used for addis to be the register
14012
-;; being loaded, since we can look at whether it is dead after the load insn.
14013
+;; Find cases where the addis that feeds into a load instruction is either used
14014
+;; once or is the same as the target register, and replace it with the fusion
14018
- [(set (match_operand:P 0 "base_reg_operand" "")
14019
- (match_operand:P 1 "fusion_gpr_addis" ""))
14020
- (set (match_operand:INT1 2 "base_reg_operand" "")
14021
- (match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
14022
- "TARGET_P8_FUSION && fusion_gpr_load_p (operands, false)"
14024
- return emit_fusion_gpr_load (operands);
14026
- [(set_attr "type" "load")
14027
- (set_attr "length" "8")])
14030
[(set (match_operand:P 0 "base_reg_operand" "")
14031
(match_operand:P 1 "fusion_gpr_addis" ""))
14032
@@ -15774,9 +15781,8 @@
14033
(set (match_operand:INT1 2 "base_reg_operand" "")
14034
(match_operand:INT1 3 "fusion_gpr_mem_load" ""))]
14036
- && (REGNO (operands[0]) != REGNO (operands[2])
14037
- || GET_CODE (operands[3]) == SIGN_EXTEND)
14038
- && fusion_gpr_load_p (operands, true)"
14039
+ && fusion_gpr_load_p (operands[0], operands[1], operands[2],
14043
expand_fusion_gpr_load (operands);
14044
@@ -15783,6 +15789,20 @@
14048
+;; Fusion insn, created by the define_peephole2 above (and eventually by
14051
+(define_insn "fusion_gpr_load_<mode>"
14052
+ [(set (match_operand:INT1 0 "base_reg_operand" "=&b")
14053
+ (unspec:INT1 [(match_operand:INT1 1 "fusion_gpr_mem_combo" "")]
14054
+ UNSPEC_FUSION_GPR))]
14055
+ "TARGET_P8_FUSION"
14057
+ return emit_fusion_gpr_load (operands[0], operands[1]);
14059
+ [(set_attr "type" "load")
14060
+ (set_attr "length" "8")])
14063
;; Miscellaneous ISA 2.06 (power7) instructions
14064
(define_insn "addg6s"
14065
@@ -15847,26 +15867,6 @@
14069
-;; The Advance Toolchain 7.0-3 added private builtins: __builtin_longdouble_dw0
14070
-;; and __builtin_longdouble_dw1 to optimize glibc. Add support for these
14073
-(define_expand "unpacktf_0"
14074
- [(set (match_operand:DF 0 "nonimmediate_operand" "")
14075
- (unspec:DF [(match_operand:TF 1 "register_operand" "")
14077
- UNSPEC_UNPACK_128BIT))]
14081
-(define_expand "unpacktf_1"
14082
- [(set (match_operand:DF 0 "nonimmediate_operand" "")
14083
- (unspec:DF [(match_operand:TF 1 "register_operand" "")
14085
- UNSPEC_UNPACK_128BIT))]
14089
(define_insn_and_split "unpack<mode>_dm"
14090
[(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m,d,r,m")
14092
Index: gcc/config/rs6000/sysv4.h
14093
===================================================================
14094
--- a/src/gcc/config/rs6000/sysv4.h (.../tags/gcc_4_8_3_release)
14095
+++ b/src/gcc/config/rs6000/sysv4.h (.../branches/gcc-4_8-branch)
14096
@@ -292,7 +292,7 @@
14097
/* An expression for the alignment of a structure field FIELD if the
14098
alignment computed in the usual way is COMPUTED. */
14099
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
14100
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
14101
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
14104
#undef BIGGEST_FIELD_ALIGNMENT
14105
@@ -949,3 +949,27 @@
14106
#define TARGET_USES_SYSV4_OPT 1
14108
#undef DBX_REGISTER_NUMBER
14110
+/* Link -lasan early on the command line. For -static-libasan, don't link
14111
+ it for -shared link, the executable should be compiled with -static-libasan
14112
+ in that case, and for executable link link with --{,no-}whole-archive around
14113
+ it to force everything into the executable. And similarly for -ltsan. */
14114
+#if defined(HAVE_LD_STATIC_DYNAMIC)
14115
+#undef LIBASAN_EARLY_SPEC
14116
+#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
14117
+ "%{static-libasan:%{!shared:" \
14118
+ LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
14119
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
14120
+#undef LIBTSAN_EARLY_SPEC
14121
+#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
14122
+ LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
14123
+ LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
14126
+/* Additional libraries needed by -static-libasan. */
14127
+#undef STATIC_LIBASAN_LIBS
14128
+#define STATIC_LIBASAN_LIBS "-ldl -lpthread"
14130
+/* Additional libraries needed by -static-libtsan. */
14131
+#undef STATIC_LIBTSAN_LIBS
14132
+#define STATIC_LIBTSAN_LIBS "-ldl -lpthread"
14133
Index: gcc/config/arm/arm.c
14134
===================================================================
14135
--- a/src/gcc/config/arm/arm.c (.../tags/gcc_4_8_3_release)
14136
+++ b/src/gcc/config/arm/arm.c (.../branches/gcc-4_8-branch)
14138
static reg_class_t arm_preferred_reload_class (rtx, reg_class_t);
14139
static rtx thumb_legitimize_address (rtx, rtx, enum machine_mode);
14140
inline static int thumb1_index_register_rtx_p (rtx, int);
14141
-static bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
14142
static int thumb_far_jump_used_p (void);
14143
static bool thumb_force_lr_save (void);
14144
static unsigned arm_size_return_regs (void);
14145
@@ -24476,9 +24475,13 @@
14146
fputs (":\n", file);
14149
- /* Output ".word .LTHUNKn-7-.LTHUNKPCn". */
14150
+ /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn". */
14151
rtx tem = XEXP (DECL_RTL (function), 0);
14152
- tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
14153
+ /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
14154
+ pipeline offset is four rather than eight. Adjust the offset
14156
+ tem = plus_constant (GET_MODE (tem), tem,
14157
+ TARGET_THUMB1_ONLY ? -3 : -7);
14158
tem = gen_rtx_MINUS (GET_MODE (tem),
14160
gen_rtx_SYMBOL_REF (Pmode,
14161
@@ -27462,4 +27465,13 @@
14165
+/* return TRUE if x is a reference to a value in a constant pool */
14167
+arm_is_constant_pool_ref (rtx x)
14169
+ return (MEM_P (x)
14170
+ && GET_CODE (XEXP (x, 0)) == SYMBOL_REF
14171
+ && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)));
14174
#include "gt-arm.h"
14175
Index: gcc/config/arm/arm.h
14176
===================================================================
14177
--- a/src/gcc/config/arm/arm.h (.../tags/gcc_4_8_3_release)
14178
+++ b/src/gcc/config/arm/arm.h (.../branches/gcc-4_8-branch)
14179
@@ -2082,9 +2082,10 @@
14180
? reverse_condition_maybe_unordered (code) \
14181
: reverse_condition (code))
14183
-/* The arm5 clz instruction returns 32. */
14184
-#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1)
14185
-#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1)
14186
+#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
14187
+ ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
14188
+#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
14189
+ ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE))
14191
#define CC_STATUS_INIT \
14192
do { cfun->machine->thumb1_cc_insn = NULL_RTX; } while (0)
14193
Index: gcc/config/arm/arm-protos.h
14194
===================================================================
14195
--- a/src/gcc/config/arm/arm-protos.h (.../tags/gcc_4_8_3_release)
14196
+++ b/src/gcc/config/arm/arm-protos.h (.../branches/gcc-4_8-branch)
14198
extern int legitimate_pic_operand_p (rtx);
14199
extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
14200
extern rtx legitimize_tls_address (rtx, rtx);
14201
+extern bool arm_legitimate_address_p (enum machine_mode, rtx, bool);
14202
extern int arm_legitimate_address_outer_p (enum machine_mode, rtx, RTX_CODE, int);
14203
extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
14204
extern bool arm_legitimize_reload_address (rtx *, enum machine_mode, int, int,
14205
@@ -286,4 +287,6 @@
14207
extern void arm_emit_eabi_attribute (const char *, int, int);
14209
+extern bool arm_is_constant_pool_ref (rtx);
14211
#endif /* ! GCC_ARM_PROTOS_H */
14212
Index: gcc/config/arm/constraints.md
14213
===================================================================
14214
--- a/src/gcc/config/arm/constraints.md (.../tags/gcc_4_8_3_release)
14215
+++ b/src/gcc/config/arm/constraints.md (.../branches/gcc-4_8-branch)
14217
;; in Thumb-2 state: Pj, PJ, Ps, Pt, Pu, Pv, Pw, Px, Py
14219
;; The following memory constraints have been used:
14220
-;; in ARM/Thumb-2 state: Q, Ut, Uv, Uy, Un, Um, Us
14221
+;; in ARM/Thumb-2 state: Q, Uh, Ut, Uv, Uy, Un, Um, Us
14222
;; in ARM state: Uq
14223
;; in Thumb state: Uu, Uw
14225
@@ -310,6 +310,12 @@
14226
An address valid for loading/storing register exclusive"
14227
(match_operand 0 "mem_noofs_operand"))
14229
+(define_memory_constraint "Uh"
14231
+ An address suitable for byte and half-word loads which does not point inside a constant pool"
14232
+ (and (match_code "mem")
14233
+ (match_test "arm_legitimate_address_p (GET_MODE (op), XEXP (op, 0), false) && !arm_is_constant_pool_ref (op)")))
14235
(define_memory_constraint "Ut"
14237
In ARM/Thumb-2 state an address valid for loading/storing opaque structure
14238
@@ -356,7 +362,8 @@
14239
(and (match_code "mem")
14240
(match_test "TARGET_ARM
14241
&& arm_legitimate_address_outer_p (GET_MODE (op), XEXP (op, 0),
14242
- SIGN_EXTEND, 0)")))
14244
+ && !arm_is_constant_pool_ref (op)")))
14246
(define_memory_constraint "Q"
14248
Index: gcc/config/arm/arm.md
14249
===================================================================
14250
--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_8_3_release)
14251
+++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_8-branch)
14253
; This can be "a" for ARM, "t" for either of the Thumbs, "32" for
14254
; TARGET_32BIT, "t1" or "t2" to specify a specific Thumb mode. "v6"
14255
; for ARM or Thumb-2 with arm_arch6, and nov6 for ARM without
14256
-; arm_arch6. This attribute is used to compute attribute "enabled",
14257
-; use type "any" to enable an alternative in all cases.
14258
-(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,onlya8,neon_onlya8,nota8,neon_nota8,iwmmxt,iwmmxt2"
14259
+; arm_arch6. "v6t2" for Thumb-2 with arm_arch6. This attribute is
14260
+; used to compute attribute "enabled", use type "any" to enable an
14261
+; alternative in all cases.
14263
+(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,v6t2,onlya8,neon_onlya8,nota8,neon_nota8,iwmmxt,iwmmxt2"
14264
(const_string "any"))
14266
(define_attr "arch_enabled" "no,yes"
14267
@@ -129,6 +131,10 @@
14268
(match_test "TARGET_32BIT && !arm_arch6"))
14269
(const_string "yes")
14271
+ (and (eq_attr "arch" "v6t2")
14272
+ (match_test "TARGET_32BIT && arm_arch6 && arm_arch_thumb2"))
14273
+ (const_string "yes")
14275
(and (eq_attr "arch" "onlya8")
14276
(eq_attr "tune" "cortexa8"))
14277
(const_string "yes")
14278
@@ -4047,7 +4053,7 @@
14279
(define_insn "unaligned_loadhis"
14280
[(set (match_operand:SI 0 "s_register_operand" "=l,r")
14282
- (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")]
14283
+ (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,Uh")]
14284
UNSPEC_UNALIGNED_LOAD)))]
14285
"unaligned_access && TARGET_32BIT"
14286
"ldr%(sh%)\t%0, %1\t@ unaligned"
14287
@@ -4655,7 +4661,7 @@
14289
(define_insn "*arm_zero_extendhisi2_v6"
14290
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
14291
- (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
14292
+ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
14293
"TARGET_ARM && arm_arch6"
14296
@@ -4748,7 +4754,7 @@
14298
(define_insn "*arm_zero_extendqisi2_v6"
14299
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
14300
- (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
14301
+ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uh")))]
14302
"TARGET_ARM && arm_arch6"
14305
@@ -4980,7 +4986,7 @@
14307
(define_insn "*arm_extendhisi2"
14308
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
14309
- (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
14310
+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
14311
"TARGET_ARM && arm_arch4 && !arm_arch6"
14314
@@ -4987,23 +4993,19 @@
14315
ldr%(sh%)\\t%0, %1"
14316
[(set_attr "length" "8,4")
14317
(set_attr "type" "alu_shift,load_byte")
14318
- (set_attr "predicable" "yes")
14319
- (set_attr "pool_range" "*,256")
14320
- (set_attr "neg_pool_range" "*,244")]
14321
+ (set_attr "predicable" "yes")]
14324
;; ??? Check Thumb-2 pool range
14325
(define_insn "*arm_extendhisi2_v6"
14326
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
14327
- (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
14328
+ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,Uh")))]
14329
"TARGET_32BIT && arm_arch6"
14332
ldr%(sh%)\\t%0, %1"
14333
[(set_attr "type" "simple_alu_shift,load_byte")
14334
- (set_attr "predicable" "yes")
14335
- (set_attr "pool_range" "*,256")
14336
- (set_attr "neg_pool_range" "*,244")]
14337
+ (set_attr "predicable" "yes")]
14340
(define_insn "*arm_extendhisi2addsi"
14341
@@ -5045,9 +5047,7 @@
14342
"TARGET_ARM && arm_arch4"
14343
"ldr%(sb%)\\t%0, %1"
14344
[(set_attr "type" "load_byte")
14345
- (set_attr "predicable" "yes")
14346
- (set_attr "pool_range" "256")
14347
- (set_attr "neg_pool_range" "244")]
14348
+ (set_attr "predicable" "yes")]
14351
(define_expand "extendqisi2"
14352
@@ -5087,9 +5087,7 @@
14353
ldr%(sb%)\\t%0, %1"
14354
[(set_attr "length" "8,4")
14355
(set_attr "type" "alu_shift,load_byte")
14356
- (set_attr "predicable" "yes")
14357
- (set_attr "pool_range" "*,256")
14358
- (set_attr "neg_pool_range" "*,244")]
14359
+ (set_attr "predicable" "yes")]
14362
(define_insn "*arm_extendqisi_v6"
14363
@@ -5101,9 +5099,7 @@
14365
ldr%(sb%)\\t%0, %1"
14366
[(set_attr "type" "simple_alu_shift,load_byte")
14367
- (set_attr "predicable" "yes")
14368
- (set_attr "pool_range" "*,256")
14369
- (set_attr "neg_pool_range" "*,244")]
14370
+ (set_attr "predicable" "yes")]
14373
(define_insn "*arm_extendqisi2addsi"
14374
@@ -6292,8 +6288,8 @@
14376
;; Pattern to recognize insn generated default case above
14377
(define_insn "*movhi_insn_arch4"
14378
- [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,m,r")
14379
- (match_operand:HI 1 "general_operand" "rI,K,r,mi"))]
14380
+ [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,m,r")
14381
+ (match_operand:HI 1 "general_operand" "rI,K,n,r,mi"))]
14384
&& (register_operand (operands[0], HImode)
14385
@@ -6301,17 +6297,20 @@
14387
mov%?\\t%0, %1\\t%@ movhi
14388
mvn%?\\t%0, #%B1\\t%@ movhi
14389
+ movw%?\\t%0, %L1\\t%@ movhi
14390
str%(h%)\\t%1, %0\\t%@ movhi
14391
ldr%(h%)\\t%0, %1\\t%@ movhi"
14392
[(set_attr "predicable" "yes")
14393
- (set_attr "insn" "mov,mvn,*,*")
14394
- (set_attr "pool_range" "*,*,*,256")
14395
- (set_attr "neg_pool_range" "*,*,*,244")
14396
+ (set_attr "insn" "mov,mvn,mov,*,*")
14397
+ (set_attr "pool_range" "*,*,*,*,256")
14398
+ (set_attr "neg_pool_range" "*,*,*,*,244")
14399
+ (set_attr "arch" "*,*,v6t2,*,*")
14400
(set_attr_alternative "type"
14401
[(if_then_else (match_operand 1 "const_int_operand" "")
14402
(const_string "simple_alu_imm" )
14403
(const_string "*"))
14404
(const_string "simple_alu_imm")
14405
+ (const_string "simple_alu_imm")
14406
(const_string "store1")
14407
(const_string "load1")])]
14409
@@ -7630,12 +7629,13 @@
14411
(define_insn "*arm_cmpdi_unsigned"
14412
[(set (reg:CC_CZ CC_REGNUM)
14413
- (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r")
14414
- (match_operand:DI 1 "arm_di_operand" "rDi")))]
14415
+ (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r,r")
14416
+ (match_operand:DI 1 "arm_di_operand" "rDi,rDi")))]
14418
"cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
14419
[(set_attr "conds" "set")
14420
- (set_attr "length" "8")]
14421
+ (set_attr "arch" "a,t2")
14422
+ (set_attr "length" "8,10")]
14425
(define_insn "*arm_cmpdi_zero"
14426
Index: gcc/config/arm/t-rtems-eabi
14427
===================================================================
14428
--- a/src/gcc/config/arm/t-rtems-eabi (.../tags/gcc_4_8_3_release)
14429
+++ b/src/gcc/config/arm/t-rtems-eabi (.../branches/gcc-4_8-branch)
14431
# Custom RTEMS EABI multilibs
14433
-MULTILIB_OPTIONS = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
14434
-MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
14435
+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
14436
+MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m neon vfpv3-d16 fpv4-sp-d16 hard
14438
# Enumeration of multilibs
14440
MULTILIB_EXCEPTIONS =
14441
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
14442
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon
14443
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
14444
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16
14445
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
14446
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16
14447
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfloat-abi=hard
14448
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m
14449
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
14450
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon
14451
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
14452
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16
14453
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
14454
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16
14455
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfloat-abi=hard
14456
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a
14457
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
14458
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon
14459
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
14460
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16
14461
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
14462
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16
14463
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfloat-abi=hard
14464
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r
14465
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
14466
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon
14467
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
14468
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16
14469
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
14470
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16
14471
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfloat-abi=hard
14472
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m
14473
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon/mfloat-abi=hard
14474
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon
14475
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
14476
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16
14477
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
14478
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16
14479
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfloat-abi=hard
14480
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb
14481
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon/mfloat-abi=hard
14482
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon
14483
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
14484
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16
14485
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
14486
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16
14487
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfloat-abi=hard
14488
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m
14489
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon/mfloat-abi=hard
14490
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon
14491
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
14492
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16
14493
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
14494
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16
14495
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfloat-abi=hard
14496
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a
14497
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon/mfloat-abi=hard
14498
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon
14499
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
14500
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16
14501
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
14502
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16
14503
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfloat-abi=hard
14504
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r
14505
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon/mfloat-abi=hard
14506
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon
14507
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
14508
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16
14509
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
14510
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16
14511
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfloat-abi=hard
14512
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m
14513
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon/mfloat-abi=hard
14514
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon
14515
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16/mfloat-abi=hard
14516
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16
14517
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16/mfloat-abi=hard
14518
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16
14519
+MULTILIB_EXCEPTIONS += mbig-endian/mfloat-abi=hard
14520
+MULTILIB_EXCEPTIONS += mbig-endian
14521
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
14522
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
14523
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
14524
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16
14525
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
14526
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16
14527
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
14528
# MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
14529
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
14530
MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
14531
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
14532
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16
14533
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
14534
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16
14535
MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
14536
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
14537
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
14538
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
14539
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
14540
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16
14541
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
14542
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16
14543
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
14544
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
14545
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
14546
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
14547
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
14548
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16
14549
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
14550
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16
14551
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
14552
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
14553
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
14554
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
14555
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
14556
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16
14557
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
14558
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16
14559
MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
14560
# MULTILIB_EXCEPTIONS += mthumb
14561
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
14562
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
14563
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
14564
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16
14565
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
14566
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16
14567
MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
14568
MULTILIB_EXCEPTIONS += march=armv6-m
14569
MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
14570
MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
14571
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
14572
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16
14573
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
14574
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16
14575
MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
14576
MULTILIB_EXCEPTIONS += march=armv7-a
14577
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
14578
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
14579
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
14580
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16
14581
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
14582
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16
14583
MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
14584
MULTILIB_EXCEPTIONS += march=armv7-r
14585
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
14586
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
14587
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
14588
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16
14589
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
14590
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16
14591
MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
14592
MULTILIB_EXCEPTIONS += march=armv7-m
14593
MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
14594
MULTILIB_EXCEPTIONS += mfpu=neon
14595
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16/mfloat-abi=hard
14596
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16
14597
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16/mfloat-abi=hard
14598
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16
14599
MULTILIB_EXCEPTIONS += mfloat-abi=hard
14600
Index: gcc/config/pa/pa.md
14601
===================================================================
14602
--- a/src/gcc/config/pa/pa.md (.../tags/gcc_4_8_3_release)
14603
+++ b/src/gcc/config/pa/pa.md (.../branches/gcc-4_8-branch)
14604
@@ -123,7 +123,7 @@
14605
;; type "binary" insns have two input operands (1,2) and one output (0)
14607
(define_attr "type"
14608
- "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"
14609
+ "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"
14610
(const_string "binary"))
14612
(define_attr "pa_combine_type"
14613
@@ -166,7 +166,7 @@
14614
;; For conditional branches. Frame related instructions are not allowed
14615
;; because they confuse the unwind support.
14616
(define_attr "in_branch_delay" "false,true"
14617
- (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
14618
+ (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")
14619
(eq_attr "length" "4")
14620
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
14621
(const_string "true")
14622
@@ -175,7 +175,7 @@
14623
;; Disallow instructions which use the FPU since they will tie up the FPU
14624
;; even if the instruction is nullified.
14625
(define_attr "in_nullified_branch_delay" "false,true"
14626
- (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")
14627
+ (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")
14628
(eq_attr "length" "4")
14629
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
14630
(const_string "true")
14631
@@ -184,7 +184,7 @@
14632
;; For calls and millicode calls. Allow unconditional branches in the
14634
(define_attr "in_call_delay" "false,true"
14635
- (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch")
14636
+ (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,sibcall,dyncall,multi,milli,sh_func_adrs,parallel_branch,trap")
14637
(eq_attr "length" "4")
14638
(not (match_test "RTX_FRAME_RELATED_P (insn)")))
14639
(const_string "true")
14640
@@ -5331,6 +5331,15 @@
14641
[(set_attr "type" "binary,binary")
14642
(set_attr "length" "4,4")])
14644
+;; Trap instructions.
14646
+(define_insn "trap"
14647
+ [(trap_if (const_int 1) (const_int 0))]
14649
+ "{addit|addi,tc},<> 1,%%r0,%%r0"
14650
+ [(set_attr "type" "trap")
14651
+ (set_attr "length" "4")])
14653
;; Clobbering a "register_operand" instead of a match_scratch
14654
;; in operand3 of millicode calls avoids spilling %r1 and
14655
;; produces better code.
14656
Index: gcc/config/pa/pa.c
14657
===================================================================
14658
--- a/src/gcc/config/pa/pa.c (.../tags/gcc_4_8_3_release)
14659
+++ b/src/gcc/config/pa/pa.c (.../branches/gcc-4_8-branch)
14660
@@ -3237,7 +3237,12 @@
14662
&& function_label_operand (x, VOIDmode))
14664
- fputs (size == 8? "\t.dword\tP%" : "\t.word\tP%", asm_out_file);
14665
+ fputs (size == 8? "\t.dword\t" : "\t.word\t", asm_out_file);
14667
+ /* We don't want an OPD when generating fast indirect calls. */
14668
+ if (!TARGET_FAST_INDIRECT_CALLS)
14669
+ fputs ("P%", asm_out_file);
14671
output_addr_const (asm_out_file, x);
14672
fputc ('\n', asm_out_file);
14674
@@ -4160,9 +4165,8 @@
14675
pa_output_function_epilogue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
14677
rtx insn = get_last_insn ();
14680
- last_address = 0;
14682
/* pa_expand_epilogue does the dirty work now. We just need
14683
to output the assembler directives which denote the end
14685
@@ -4185,14 +4189,16 @@
14686
if (insn && GET_CODE (insn) == CALL_INSN)
14688
fputs ("\tnop\n", file);
14689
- last_address += 4;
14690
+ extra_nop = true;
14693
+ extra_nop = false;
14695
fputs ("\t.EXIT\n\t.PROCEND\n", file);
14697
if (TARGET_SOM && TARGET_GAS)
14699
- /* We done with this subspace except possibly for some additional
14700
+ /* We are done with this subspace except possibly for some additional
14701
debug information. Forget that we are in this subspace to ensure
14702
that the next function is output in its own subspace. */
14704
@@ -4199,12 +4205,20 @@
14705
cfun->machine->in_nsubspa = 2;
14708
+ /* Thunks do their own insn accounting. */
14709
+ if (cfun->is_thunk)
14712
if (INSN_ADDRESSES_SET_P ())
14714
+ last_address = extra_nop ? 4 : 0;
14715
insn = get_last_nonnote_insn ();
14716
- last_address += INSN_ADDRESSES (INSN_UID (insn));
14717
- if (INSN_P (insn))
14718
- last_address += insn_default_length (insn);
14721
+ last_address += INSN_ADDRESSES (INSN_UID (insn));
14722
+ if (INSN_P (insn))
14723
+ last_address += insn_default_length (insn);
14725
last_address = ((last_address + FUNCTION_BOUNDARY / BITS_PER_UNIT - 1)
14726
& ~(FUNCTION_BOUNDARY / BITS_PER_UNIT - 1));
14728
@@ -8270,8 +8284,7 @@
14729
xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
14730
xoperands[2] = GEN_INT (delta);
14732
- ASM_OUTPUT_LABEL (file, XSTR (xoperands[1], 0));
14733
- fprintf (file, "\t.PROC\n\t.CALLINFO FRAME=0,NO_CALLS\n\t.ENTRY\n");
14734
+ final_start_function (emit_barrier (), file, 1);
14736
/* Output the thunk. We know that the function is in the same
14737
translation unit (i.e., the same space) as the thunk, and that
14738
@@ -8301,12 +8314,16 @@
14739
|| ((DECL_SECTION_NAME (thunk_fndecl)
14740
== DECL_SECTION_NAME (function))
14741
&& last_address < 262132)))
14742
+ /* In this case, we need to be able to reach the start of
14743
+ the stub table even though the function is likely closer
14744
+ and can be jumped to directly. */
14745
|| (targetm_common.have_named_sections
14746
&& DECL_SECTION_NAME (thunk_fndecl) == NULL
14747
&& DECL_SECTION_NAME (function) == NULL
14748
- && last_address < 262132)
14749
+ && total_code_bytes < MAX_PCREL17F_OFFSET)
14751
|| (!targetm_common.have_named_sections
14752
- && last_address < 262132))))
14753
+ && total_code_bytes < MAX_PCREL17F_OFFSET))))
14756
output_asm_insn ("addil L'%2,%%r26", xoperands);
14757
@@ -8477,17 +8494,8 @@
14761
- fprintf (file, "\t.EXIT\n\t.PROCEND\n");
14762
+ final_end_function ();
14764
- if (TARGET_SOM && TARGET_GAS)
14766
- /* We done with this subspace except possibly for some additional
14767
- debug information. Forget that we are in this subspace to ensure
14768
- that the next function is output in its own subspace. */
14769
- in_section = NULL;
14770
- cfun->machine->in_nsubspa = 2;
14773
if (TARGET_SOM && flag_pic && TREE_PUBLIC (function))
14775
switch_to_section (data_section);
14776
Index: gcc/tree-vect-slp.c
14777
===================================================================
14778
--- a/src/gcc/tree-vect-slp.c (.../tags/gcc_4_8_3_release)
14779
+++ b/src/gcc/tree-vect-slp.c (.../branches/gcc-4_8-branch)
14780
@@ -1837,7 +1837,10 @@
14781
&& (stmt_vinfo = vinfo_for_stmt (use_stmt))
14782
&& !STMT_SLP_TYPE (stmt_vinfo)
14783
&& (STMT_VINFO_RELEVANT (stmt_vinfo)
14784
- || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo)))
14785
+ || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo))
14786
+ || (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)
14787
+ && STMT_VINFO_RELATED_STMT (stmt_vinfo)
14788
+ && !STMT_SLP_TYPE (vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_vinfo)))))
14789
&& !(gimple_code (use_stmt) == GIMPLE_PHI
14790
&& STMT_VINFO_DEF_TYPE (stmt_vinfo)
14791
== vect_reduction_def))
14792
@@ -2377,13 +2380,21 @@
14793
neutral_op = build_int_cst (TREE_TYPE (op), -1);
14798
- def_stmt = SSA_NAME_DEF_STMT (op);
14799
- loop = (gimple_bb (stmt))->loop_father;
14800
- neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
14801
- loop_preheader_edge (loop));
14803
+ /* For MIN/MAX we don't have an easy neutral operand but
14804
+ the initial values can be used fine here. Only for
14805
+ a reduction chain we have to force a neutral element. */
14808
+ if (!GROUP_FIRST_ELEMENT (stmt_vinfo))
14809
+ neutral_op = NULL;
14812
+ def_stmt = SSA_NAME_DEF_STMT (op);
14813
+ loop = (gimple_bb (stmt))->loop_father;
14814
+ neutral_op = PHI_ARG_DEF_FROM_EDGE (def_stmt,
14815
+ loop_preheader_edge (loop));
14821
Index: gcc/convert.c
14822
===================================================================
14823
--- a/src/gcc/convert.c (.../tags/gcc_4_8_3_release)
14824
+++ b/src/gcc/convert.c (.../branches/gcc-4_8-branch)
14826
enum built_in_function fcode = builtin_mathfn_code (expr);
14827
tree itype = TREE_TYPE (expr);
14829
+ if (TREE_CODE (expr) == COMPOUND_EXPR)
14831
+ tree t = convert_to_real (type, TREE_OPERAND (expr, 1));
14832
+ if (t == TREE_OPERAND (expr, 1))
14834
+ return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
14835
+ TREE_OPERAND (expr, 0), t);
14838
/* Disable until we figure out how to decide whether the functions are
14839
present in runtime. */
14840
/* Convert (float)sqrt((double)x) where x is float into sqrtf(x) */
14841
@@ -366,6 +375,15 @@
14842
return error_mark_node;
14845
+ if (ex_form == COMPOUND_EXPR)
14847
+ tree t = convert_to_integer (type, TREE_OPERAND (expr, 1));
14848
+ if (t == TREE_OPERAND (expr, 1))
14850
+ return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
14851
+ TREE_OPERAND (expr, 0), t);
14854
/* Convert e.g. (long)round(d) -> lround(d). */
14855
/* If we're converting to char, we may encounter differing behavior
14856
between converting from double->char vs double->long->char.
14857
@@ -854,6 +872,14 @@
14859
if (TYPE_MAIN_VARIANT (elt_type) == TYPE_MAIN_VARIANT (subtype))
14861
+ else if (TREE_CODE (expr) == COMPOUND_EXPR)
14863
+ tree t = convert_to_complex (type, TREE_OPERAND (expr, 1));
14864
+ if (t == TREE_OPERAND (expr, 1))
14866
+ return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR,
14867
+ TREE_TYPE (t), TREE_OPERAND (expr, 0), t);
14869
else if (TREE_CODE (expr) == COMPLEX_EXPR)
14870
return fold_build2 (COMPLEX_EXPR, type,
14871
convert (subtype, TREE_OPERAND (expr, 0)),
14872
Index: gcc/regcprop.c
14873
===================================================================
14874
--- a/src/gcc/regcprop.c (.../tags/gcc_4_8_3_release)
14875
+++ b/src/gcc/regcprop.c (.../branches/gcc-4_8-branch)
14876
@@ -1039,7 +1039,17 @@
14877
but instead among CLOBBERs on the CALL_INSN, we could wrongly
14878
assume the value in it is still live. */
14879
if (ksvd.ignore_set_reg)
14880
- note_stores (PATTERN (insn), kill_clobbered_value, vd);
14882
+ note_stores (PATTERN (insn), kill_clobbered_value, vd);
14883
+ for (exp = CALL_INSN_FUNCTION_USAGE (insn);
14885
+ exp = XEXP (exp, 1))
14887
+ rtx x = XEXP (exp, 0);
14888
+ if (GET_CODE (x) == CLOBBER)
14889
+ kill_value (SET_DEST (x), vd);
14894
/* Notice stores. */
14895
Index: gcc/graphite-interchange.c
14896
===================================================================
14897
--- a/src/gcc/graphite-interchange.c (.../tags/gcc_4_8_3_release)
14898
+++ b/src/gcc/graphite-interchange.c (.../branches/gcc-4_8-branch)
14900
#include <isl/ilp.h>
14901
#include <cloog/cloog.h>
14902
#include <cloog/isl/domain.h>
14903
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
14904
+#include <isl/deprecated/int.h>
14905
+#include <isl/deprecated/aff_int.h>
14906
+#include <isl/deprecated/ilp_int.h>
14907
+#include <isl/deprecated/constraint_int.h>
14911
#include "system.h"
14912
#include "coretypes.h"
14913
Index: libobjc/encoding.c
14914
===================================================================
14915
--- a/src/libobjc/encoding.c (.../tags/gcc_4_8_3_release)
14916
+++ b/src/libobjc/encoding.c (.../branches/gcc-4_8-branch)
14917
@@ -192,6 +192,8 @@
14918
? MAX (MAX (COMPUTED, SPECIFIED), 64) \
14919
: MAX (COMPUTED, SPECIFIED));})
14921
+#define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) \
14922
+ (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)
14924
/* Skip a variable name, enclosed in quotes ("). */
14926
Index: libobjc/ChangeLog
14927
===================================================================
14928
--- a/src/libobjc/ChangeLog (.../tags/gcc_4_8_3_release)
14929
+++ b/src/libobjc/ChangeLog (.../branches/gcc-4_8-branch)
14931
+2014-07-27 Ulrich Weigand <uweigand@de.ibm.com>
14934
+ * encoding.c (rs6000_special_adjust_field_align_p): Use definition
14935
+ that matches the 4.8 branch ABI.
14937
+2014-07-27 Alan Modra <amodra@gmail.com>
14938
+ Matthias Klose <doko@ubuntu.com>
14942
+ * encoding.c: Define rs6000_special_adjust_field_align_p.
14944
2014-05-22 Release Manager
14946
* GCC 4.8.3 released.
14947
Index: libgfortran/m4/in_pack.m4
14948
===================================================================
14949
--- a/src/libgfortran/m4/in_pack.m4 (.../tags/gcc_4_8_3_release)
14950
+++ b/src/libgfortran/m4/in_pack.m4 (.../branches/gcc-4_8-branch)
14952
return source->base_addr;
14954
/* Allocate storage for the destination. */
14955
- destptr = ('rtype_name` *)xmalloc (ssize * sizeof ('rtype_name`));
14956
+ destptr = xmallocarray (ssize, sizeof ('rtype_name`));
14958
src = source->base_addr;
14959
stride0 = stride[0];
14960
Index: libgfortran/m4/pack.m4
14961
===================================================================
14962
--- a/src/libgfortran/m4/pack.m4 (.../tags/gcc_4_8_3_release)
14963
+++ b/src/libgfortran/m4/pack.m4 (.../branches/gcc-4_8-branch)
14964
@@ -168,8 +168,8 @@
14968
- /* xmalloc allocates a single byte for zero size. */
14969
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * total);
14970
+ /* xmallocarray allocates a single byte for zero size. */
14971
+ ret->base_addr = xmallocarray (total, sizeof ('rtype_name`));
14975
Index: libgfortran/m4/spread.m4
14976
===================================================================
14977
--- a/src/libgfortran/m4/spread.m4 (.../tags/gcc_4_8_3_release)
14978
+++ b/src/libgfortran/m4/spread.m4 (.../branches/gcc-4_8-branch)
14979
@@ -102,8 +102,8 @@
14983
- /* xmalloc allocates a single byte for zero size. */
14984
- ret->base_addr = xmalloc (rs * sizeof('rtype_name`));
14985
+ /* xmallocarray allocates a single byte for zero size. */
14986
+ ret->base_addr = xmallocarray (rs, sizeof('rtype_name`));
14990
@@ -245,7 +245,7 @@
14992
if (ret->base_addr == NULL)
14994
- ret->base_addr = xmalloc (ncopies * sizeof ('rtype_name`));
14995
+ ret->base_addr = xmallocarray (ncopies, sizeof ('rtype_name`));
14997
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
14999
Index: libgfortran/m4/transpose.m4
15000
===================================================================
15001
--- a/src/libgfortran/m4/transpose.m4 (.../tags/gcc_4_8_3_release)
15002
+++ b/src/libgfortran/m4/transpose.m4 (.../branches/gcc-4_8-branch)
15004
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
15005
GFC_DESCRIPTOR_EXTENT(source, 1));
15007
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) ret));
15008
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
15009
+ sizeof ('rtype_name`));
15011
} else if (unlikely (compile_options.bounds_check))
15013
Index: libgfortran/m4/iforeach.m4
15014
===================================================================
15015
--- a/src/libgfortran/m4/iforeach.m4 (.../tags/gcc_4_8_3_release)
15016
+++ b/src/libgfortran/m4/iforeach.m4 (.../branches/gcc-4_8-branch)
15018
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15019
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15020
retarray->offset = 0;
15021
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
15022
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
15026
@@ -133,7 +133,7 @@
15027
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
15028
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15029
retarray->offset = 0;
15030
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
15031
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
15035
@@ -264,7 +264,7 @@
15036
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
15037
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
15038
retarray->offset = 0;
15039
- retarray->base_addr = xmalloc (sizeof (rtype_name) * rank);
15040
+ retarray->base_addr = xmallocarray (rank, sizeof (rtype_name));
15042
else if (unlikely (compile_options.bounds_check))
15044
Index: libgfortran/m4/eoshift1.m4
15045
===================================================================
15046
--- a/src/libgfortran/m4/eoshift1.m4 (.../tags/gcc_4_8_3_release)
15047
+++ b/src/libgfortran/m4/eoshift1.m4 (.../branches/gcc-4_8-branch)
15048
@@ -106,8 +106,8 @@
15049
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
15052
- /* xmalloc allocates a single byte for zero size. */
15053
- ret->base_addr = xmalloc (size * arraysize);
15054
+ /* xmallocarray allocates a single byte for zero size. */
15055
+ ret->base_addr = xmallocarray (arraysize, size);
15058
else if (unlikely (compile_options.bounds_check))
15059
Index: libgfortran/m4/eoshift3.m4
15060
===================================================================
15061
--- a/src/libgfortran/m4/eoshift3.m4 (.../tags/gcc_4_8_3_release)
15062
+++ b/src/libgfortran/m4/eoshift3.m4 (.../branches/gcc-4_8-branch)
15067
- ret->base_addr = xmalloc (size * arraysize);
15068
+ ret->base_addr = xmallocarray (arraysize, size);
15070
ret->dtype = array->dtype;
15071
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
15072
@@ -108,8 +108,8 @@
15073
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
15076
- /* xmalloc allocates a single byte for zero size. */
15077
- ret->base_addr = xmalloc (size * arraysize);
15078
+ /* xmallocarray allocates a single byte for zero size. */
15079
+ ret->base_addr = xmallocarray (arraysize, size);
15082
else if (unlikely (compile_options.bounds_check))
15083
Index: libgfortran/m4/shape.m4
15084
===================================================================
15085
--- a/src/libgfortran/m4/shape.m4 (.../tags/gcc_4_8_3_release)
15086
+++ b/src/libgfortran/m4/shape.m4 (.../branches/gcc-4_8-branch)
15089
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
15091
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * rank);
15092
+ ret->base_addr = xmallocarray (rank, sizeof ('rtype_name`));
15095
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
15096
Index: libgfortran/m4/cshift1.m4
15097
===================================================================
15098
--- a/src/libgfortran/m4/cshift1.m4 (.../tags/gcc_4_8_3_release)
15099
+++ b/src/libgfortran/m4/cshift1.m4 (.../branches/gcc-4_8-branch)
15104
- ret->base_addr = xmalloc (size * arraysize);
15105
+ ret->base_addr = xmallocarray (arraysize, size);
15107
ret->dtype = array->dtype;
15108
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
15109
Index: libgfortran/m4/matmull.m4
15110
===================================================================
15111
--- a/src/libgfortran/m4/matmull.m4 (.../tags/gcc_4_8_3_release)
15112
+++ b/src/libgfortran/m4/matmull.m4 (.../branches/gcc-4_8-branch)
15116
retarray->base_addr
15117
- = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
15118
+ = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
15119
retarray->offset = 0;
15121
else if (unlikely (compile_options.bounds_check))
15122
Index: libgfortran/m4/bessel.m4
15123
===================================================================
15124
--- a/src/libgfortran/m4/bessel.m4 (.../tags/gcc_4_8_3_release)
15125
+++ b/src/libgfortran/m4/bessel.m4 (.../branches/gcc-4_8-branch)
15128
size_t size = n2 < n1 ? 0 : n2-n1+1;
15129
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
15130
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
15131
+ ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
15135
@@ -123,7 +123,7 @@
15137
size_t size = n2 < n1 ? 0 : n2-n1+1;
15138
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
15139
- ret->base_addr = xmalloc (sizeof ('rtype_name`) * size);
15140
+ ret->base_addr = xmallocarray (size, sizeof ('rtype_name`));
15144
@@ -163,7 +163,7 @@
15146
x2rev = GFC_REAL_'rtype_kind`_LITERAL(2.)/x;
15148
- for (i = 2; i <= n1+n2; i++)
15149
+ for (i = 2; i <= n2 - n1; i++)
15151
#if defined('rtype_name`_INFINITY)
15152
if (unlikely (last2 == -'rtype_name`_INFINITY))
15153
Index: libgfortran/m4/unpack.m4
15154
===================================================================
15155
--- a/src/libgfortran/m4/unpack.m4 (.../tags/gcc_4_8_3_release)
15156
+++ b/src/libgfortran/m4/unpack.m4 (.../branches/gcc-4_8-branch)
15157
@@ -100,7 +100,7 @@
15161
- ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
15162
+ ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
15166
@@ -245,7 +245,7 @@
15170
- ret->base_addr = xmalloc (rs * sizeof ('rtype_name`));
15171
+ ret->base_addr = xmallocarray (rs, sizeof ('rtype_name`));
15175
Index: libgfortran/m4/reshape.m4
15176
===================================================================
15177
--- a/src/libgfortran/m4/reshape.m4 (.../tags/gcc_4_8_3_release)
15178
+++ b/src/libgfortran/m4/reshape.m4 (.../branches/gcc-4_8-branch)
15179
@@ -115,11 +115,11 @@
15182
if (unlikely (rs < 1))
15186
- alloc_size = rs * sizeof ('rtype_name`);
15189
- ret->base_addr = xmalloc (alloc_size);
15190
+ ret->base_addr = xmallocarray (alloc_size, sizeof ('rtype_name`));
15191
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
15194
Index: libgfortran/m4/ifunction_logical.m4
15195
===================================================================
15196
--- a/src/libgfortran/m4/ifunction_logical.m4 (.../tags/gcc_4_8_3_release)
15197
+++ b/src/libgfortran/m4/ifunction_logical.m4 (.../branches/gcc-4_8-branch)
15199
retarray->offset = 0;
15200
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15202
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15203
- * extent[rank-1];
15204
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15206
if (alloc_size == 0)
15212
- retarray->base_addr = xmalloc (alloc_size);
15213
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
15217
Index: libgfortran/m4/ifunction.m4
15218
===================================================================
15219
--- a/src/libgfortran/m4/ifunction.m4 (.../tags/gcc_4_8_3_release)
15220
+++ b/src/libgfortran/m4/ifunction.m4 (.../branches/gcc-4_8-branch)
15222
retarray->offset = 0;
15223
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15225
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15226
- * extent[rank-1];
15227
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15229
- retarray->base_addr = xmalloc (alloc_size);
15230
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
15231
if (alloc_size == 0)
15233
/* Make sure we have a zero-sized array. */
15234
@@ -260,8 +259,7 @@
15238
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15239
- * extent[rank-1];
15240
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15242
retarray->offset = 0;
15243
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15244
@@ -273,7 +271,7 @@
15248
- retarray->base_addr = xmalloc (alloc_size);
15249
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
15253
@@ -417,8 +415,7 @@
15254
retarray->offset = 0;
15255
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15257
- alloc_size = sizeof (rtype_name) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15258
- * extent[rank-1];
15259
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15261
if (alloc_size == 0)
15263
@@ -427,7 +424,7 @@
15267
- retarray->base_addr = xmalloc (alloc_size);
15268
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
15272
Index: libgfortran/m4/matmul.m4
15273
===================================================================
15274
--- a/src/libgfortran/m4/matmul.m4 (.../tags/gcc_4_8_3_release)
15275
+++ b/src/libgfortran/m4/matmul.m4 (.../branches/gcc-4_8-branch)
15276
@@ -125,7 +125,7 @@
15279
retarray->base_addr
15280
- = xmalloc (sizeof ('rtype_name`) * size0 ((array_t *) retarray));
15281
+ = xmallocarray (size0 ((array_t *) retarray), sizeof ('rtype_name`));
15282
retarray->offset = 0;
15284
else if (unlikely (compile_options.bounds_check))
15285
Index: libgfortran/configure
15286
===================================================================
15287
--- a/src/libgfortran/configure (.../tags/gcc_4_8_3_release)
15288
+++ b/src/libgfortran/configure (.../branches/gcc-4_8-branch)
15289
@@ -2595,6 +2595,7 @@
15290
as_fn_append ac_func_list " getegid"
15291
as_fn_append ac_func_list " secure_getenv"
15292
as_fn_append ac_func_list " __secure_getenv"
15293
+as_fn_append ac_func_list " strtok_r"
15294
as_fn_append ac_header_list " math.h"
15295
# Check that the precious variables saved in the cache have kept the same
15297
@@ -12339,7 +12340,7 @@
15298
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15299
lt_status=$lt_dlunknown
15300
cat > conftest.$ac_ext <<_LT_EOF
15301
-#line 12342 "configure"
15302
+#line 12343 "configure"
15303
#include "confdefs.h"
15306
@@ -12445,7 +12446,7 @@
15307
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
15308
lt_status=$lt_dlunknown
15309
cat > conftest.$ac_ext <<_LT_EOF
15310
-#line 12448 "configure"
15311
+#line 12449 "configure"
15312
#include "confdefs.h"
15315
@@ -16506,6 +16507,8 @@
15324
Index: libgfortran/runtime/in_pack_generic.c
15325
===================================================================
15326
--- a/src/libgfortran/runtime/in_pack_generic.c (.../tags/gcc_4_8_3_release)
15327
+++ b/src/libgfortran/runtime/in_pack_generic.c (.../branches/gcc-4_8-branch)
15328
@@ -180,7 +180,7 @@
15329
return source->base_addr;
15331
/* Allocate storage for the destination. */
15332
- destptr = xmalloc (ssize * size);
15333
+ destptr = xmallocarray (ssize, size);
15334
dest = (char *)destptr;
15335
src = source->base_addr;
15336
stride0 = stride[0] * size;
15337
Index: libgfortran/runtime/memory.c
15338
===================================================================
15339
--- a/src/libgfortran/runtime/memory.c (.../tags/gcc_4_8_3_release)
15340
+++ b/src/libgfortran/runtime/memory.c (.../branches/gcc-4_8-branch)
15343
#include "libgfortran.h"
15344
#include <stdlib.h>
15345
+#include <errno.h>
15348
+#define SIZE_MAX ((size_t)-1)
15355
@@ -44,12 +49,34 @@
15360
+xmallocarray (size_t nmemb, size_t size)
15364
+ if (!nmemb || !size)
15365
+ size = nmemb = 1;
15366
+ else if (nmemb > SIZE_MAX / size)
15369
+ os_error ("Integer overflow in xmallocarray");
15372
+ p = malloc (nmemb * size);
15375
+ os_error ("Memory allocation failed in xmallocarray");
15381
/* calloc wrapper that aborts on error. */
15384
xcalloc (size_t nmemb, size_t size)
15386
- if (nmemb * size == 0)
15387
+ if (!nmemb || !size)
15390
void *p = calloc (nmemb, size);
15391
Index: libgfortran/runtime/convert_char.c
15392
===================================================================
15393
--- a/src/libgfortran/runtime/convert_char.c (.../tags/gcc_4_8_3_release)
15394
+++ b/src/libgfortran/runtime/convert_char.c (.../branches/gcc-4_8-branch)
15396
gfc_charlen_type i, l;
15398
l = len > 0 ? len : 0;
15399
- *dst = xmalloc ((l + 1) * sizeof (gfc_char4_t));
15400
+ *dst = xmallocarray ((l + 1), sizeof (gfc_char4_t));
15402
for (i = 0; i < l; i++)
15403
(*dst)[i] = src[i];
15405
gfc_charlen_type i, l;
15407
l = len > 0 ? len : 0;
15408
- *dst = xmalloc ((l + 1) * sizeof (unsigned char));
15409
+ *dst = xmalloc (l + 1);
15411
for (i = 0; i < l; i++)
15412
(*dst)[i] = src[i];
15413
Index: libgfortran/runtime/environ.c
15414
===================================================================
15415
--- a/src/libgfortran/runtime/environ.c (.../tags/gcc_4_8_3_release)
15416
+++ b/src/libgfortran/runtime/environ.c (.../branches/gcc-4_8-branch)
15417
@@ -833,7 +833,7 @@
15421
- elist = xmalloc (unit_count * sizeof (exception_t));
15422
+ elist = xmallocarray (unit_count, sizeof (exception_t));
15426
Index: libgfortran/runtime/main.c
15427
===================================================================
15428
--- a/src/libgfortran/runtime/main.c (.../tags/gcc_4_8_3_release)
15429
+++ b/src/libgfortran/runtime/main.c (.../branches/gcc-4_8-branch)
15430
@@ -153,6 +153,16 @@
15434
+#ifndef HAVE_STRTOK_R
15436
+gfstrtok_r (char *str, const char *delim,
15437
+ char **saveptr __attribute__ ((unused)))
15439
+ return strtok (str, delim);
15441
+#define strtok_r gfstrtok_r
15444
char *addr2line_path;
15446
/* Find addr2line and store the path. */
15447
@@ -161,30 +171,32 @@
15448
find_addr2line (void)
15451
-#define A2L_LEN 10
15452
+#define A2L_LEN 11
15453
char *path = secure_getenv ("PATH");
15456
+ char *tp = strdup (path);
15459
size_t n = strlen (path);
15460
- char ap[n + 1 + A2L_LEN];
15462
- for (size_t i = 0; i < n; i++)
15463
+ char *ap = xmalloc (n + A2L_LEN);
15465
+ for (char *str = tp;; str = NULL)
15467
- if (path[i] != ':')
15468
- ap[ai++] = path[i];
15470
+ char *token = strtok_r (str, ":", &saveptr);
15473
+ size_t toklen = strlen (token);
15474
+ memcpy (ap, token, toklen);
15475
+ memcpy (ap + toklen, "/addr2line", A2L_LEN);
15476
+ if (access (ap, R_OK|X_OK) == 0)
15479
- memcpy (ap + ai, "addr2line", A2L_LEN);
15480
- if (access (ap, R_OK|X_OK) == 0)
15482
- addr2line_path = strdup (ap);
15487
+ addr2line_path = strdup (ap);
15496
Index: libgfortran/intrinsics/string_intrinsics_inc.c
15497
===================================================================
15498
--- a/src/libgfortran/intrinsics/string_intrinsics_inc.c (.../tags/gcc_4_8_3_release)
15499
+++ b/src/libgfortran/intrinsics/string_intrinsics_inc.c (.../branches/gcc-4_8-branch)
15500
@@ -164,7 +164,7 @@
15503
/* Allocate space for result string. */
15504
- *dest = xmalloc (*len * sizeof (CHARTYPE));
15505
+ *dest = xmallocarray (*len, sizeof (CHARTYPE));
15507
/* Copy string if necessary. */
15508
memcpy (*dest, src, *len * sizeof (CHARTYPE));
15509
@@ -442,7 +442,7 @@
15510
*dest = &zero_length_string;
15513
- CHARTYPE *tmp = xmalloc (*rlen * sizeof (CHARTYPE));
15514
+ CHARTYPE *tmp = xmallocarray (*rlen, sizeof (CHARTYPE));
15515
memcpy (tmp, res, reslen * sizeof (CHARTYPE));
15516
MEMSET (&tmp[reslen], ' ', *rlen - reslen);
15518
Index: libgfortran/intrinsics/pack_generic.c
15519
===================================================================
15520
--- a/src/libgfortran/intrinsics/pack_generic.c (.../tags/gcc_4_8_3_release)
15521
+++ b/src/libgfortran/intrinsics/pack_generic.c (.../branches/gcc-4_8-branch)
15522
@@ -152,8 +152,8 @@
15523
GFC_DIMENSION_SET(ret->dim[0], 0, total-1, 1);
15526
- /* xmalloc allocates a single byte for zero size. */
15527
- ret->base_addr = xmalloc (size * total);
15528
+ /* xmallocarray allocates a single byte for zero size. */
15529
+ ret->base_addr = xmallocarray (total, size);
15532
return; /* In this case, nothing remains to be done. */
15533
@@ -519,7 +519,7 @@
15537
- ret->base_addr = xmalloc (size * total);
15538
+ ret->base_addr = xmallocarray (total, size);
15542
Index: libgfortran/intrinsics/transpose_generic.c
15543
===================================================================
15544
--- a/src/libgfortran/intrinsics/transpose_generic.c (.../tags/gcc_4_8_3_release)
15545
+++ b/src/libgfortran/intrinsics/transpose_generic.c (.../branches/gcc-4_8-branch)
15547
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
15548
GFC_DESCRIPTOR_EXTENT(source, 1));
15550
- ret->base_addr = xmalloc (size * size0 ((array_t*)ret));
15551
+ ret->base_addr = xmallocarray (size0 ((array_t*)ret), size);
15554
else if (unlikely (compile_options.bounds_check))
15555
Index: libgfortran/intrinsics/cshift0.c
15556
===================================================================
15557
--- a/src/libgfortran/intrinsics/cshift0.c (.../tags/gcc_4_8_3_release)
15558
+++ b/src/libgfortran/intrinsics/cshift0.c (.../branches/gcc-4_8-branch)
15560
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
15563
- /* xmalloc allocates a single byte for zero size. */
15564
- ret->base_addr = xmalloc (size * arraysize);
15565
+ /* xmallocarray allocates a single byte for zero size. */
15566
+ ret->base_addr = xmallocarray (arraysize, size);
15568
else if (unlikely (compile_options.bounds_check))
15570
Index: libgfortran/intrinsics/ctime.c
15571
===================================================================
15572
--- a/src/libgfortran/intrinsics/ctime.c (.../tags/gcc_4_8_3_release)
15573
+++ b/src/libgfortran/intrinsics/ctime.c (.../branches/gcc-4_8-branch)
15574
@@ -31,31 +31,53 @@
15575
#include <string.h>
15578
-/* strftime-like function that fills a C string with %c format which
15579
- is identical to ctime in the default locale. As ctime and ctime_r
15580
- are poorly specified and their usage not recommended, the
15581
- implementation instead uses strftime. */
15582
+/* Maximum space a ctime-like string might need. A "normal" ctime
15583
+ string is 26 bytes, and in our case 24 bytes as we don't include
15584
+ the trailing newline and null. However, the longest possible year
15585
+ number is -2,147,481,748 (1900 - 2,147,483,648, since tm_year is a
15586
+ 32-bit signed integer) so an extra 7 bytes are needed. */
15587
+#define CTIME_BUFSZ 31
15590
-strctime (char *s, size_t max, const time_t *timep)
15592
+/* Thread-safe ctime-like function that fills a Fortran
15593
+ string. ctime_r is a portability headache and marked as obsolescent
15594
+ in POSIX 2008, which recommends strftime in its place. However,
15595
+ strftime(..., "%c",...) doesn't produce ctime-like output on
15596
+ MinGW, so do it manually with snprintf. */
15599
+gf_ctime (char *s, size_t max, const time_t timev)
15603
+ char buf[CTIME_BUFSZ + 1];
15604
/* Some targets provide a localtime_r based on a draft of the POSIX
15605
standard where the return type is int rather than the
15606
standardized struct tm*. */
15607
- __builtin_choose_expr (__builtin_classify_type (localtime_r (timep, <m))
15608
+ __builtin_choose_expr (__builtin_classify_type (localtime_r (&timev, <m))
15610
- failed = localtime_r (timep, <m) == NULL,
15611
- failed = localtime_r (timep, <m) != 0);
15612
+ failed = localtime_r (&timev, <m) == NULL,
15613
+ failed = localtime_r (&timev, <m) != 0);
15616
- return strftime (s, max, "%c", <m);
15618
+ int n = snprintf (buf, sizeof (buf),
15619
+ "%3.3s %3.3s%3d %.2d:%.2d:%.2d %d",
15620
+ "SunMonTueWedThuFriSat" + ltm.tm_wday * 3,
15621
+ "JanFebMarAprMayJunJulAugSepOctNovDec" + ltm.tm_mon * 3,
15622
+ ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec,
15623
+ 1900 + ltm.tm_year);
15626
+ if ((size_t) n <= max)
15628
+ cf_strcpy (s, max, buf);
15632
+ memset (s, ' ', max);
15636
-/* In the default locale, the date and time representation fits in 26
15637
- bytes. However, other locales might need more space. */
15640
extern void fdate (char **, gfc_charlen_type *);
15641
export_proto(fdate);
15643
fdate (char ** date, gfc_charlen_type * date_len)
15645
time_t now = time(NULL);
15646
- *date = xmalloc (CSZ);
15647
- *date_len = strctime (*date, CSZ, &now);
15648
+ *date = xmalloc (CTIME_BUFSZ);
15649
+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
15654
fdate_sub (char * date, gfc_charlen_type date_len)
15656
time_t now = time(NULL);
15657
- char *s = xmalloc (date_len + 1);
15658
- size_t n = strctime (s, date_len + 1, &now);
15659
- fstrcpy (date, date_len, s, n);
15661
+ gf_ctime (date, date_len, now);
15666
PREFIX(ctime) (char ** date, gfc_charlen_type * date_len, GFC_INTEGER_8 t)
15669
- *date = xmalloc (CSZ);
15670
- *date_len = strctime (*date, CSZ, &now);
15671
+ *date = xmalloc (CTIME_BUFSZ);
15672
+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
15676
@@ -103,8 +122,5 @@
15677
ctime_sub (GFC_INTEGER_8 * t, char * date, gfc_charlen_type date_len)
15680
- char *s = xmalloc (date_len + 1);
15681
- size_t n = strctime (s, date_len + 1, &now);
15682
- fstrcpy (date, date_len, s, n);
15684
+ gf_ctime (date, date_len, now);
15686
Index: libgfortran/intrinsics/spread_generic.c
15687
===================================================================
15688
--- a/src/libgfortran/intrinsics/spread_generic.c (.../tags/gcc_4_8_3_release)
15689
+++ b/src/libgfortran/intrinsics/spread_generic.c (.../branches/gcc-4_8-branch)
15690
@@ -100,7 +100,7 @@
15691
GFC_DIMENSION_SET(ret->dim[n], 0, ub, stride);
15694
- ret->base_addr = xmalloc (rs * size);
15695
+ ret->base_addr = xmallocarray (rs, size);
15699
@@ -245,7 +245,7 @@
15701
if (ret->base_addr == NULL)
15703
- ret->base_addr = xmalloc (ncopies * size);
15704
+ ret->base_addr = xmallocarray (ncopies, size);
15706
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
15708
Index: libgfortran/intrinsics/unpack_generic.c
15709
===================================================================
15710
--- a/src/libgfortran/intrinsics/unpack_generic.c (.../tags/gcc_4_8_3_release)
15711
+++ b/src/libgfortran/intrinsics/unpack_generic.c (.../branches/gcc-4_8-branch)
15712
@@ -125,7 +125,7 @@
15716
- ret->base_addr = xmalloc (rs * size);
15717
+ ret->base_addr = xmallocarray (rs, size);
15721
Index: libgfortran/intrinsics/eoshift0.c
15722
===================================================================
15723
--- a/src/libgfortran/intrinsics/eoshift0.c (.../tags/gcc_4_8_3_release)
15724
+++ b/src/libgfortran/intrinsics/eoshift0.c (.../branches/gcc-4_8-branch)
15729
- /* xmalloc allocates a single byte for zero size. */
15730
- ret->base_addr = xmalloc (size * arraysize);
15731
+ /* xmallocarray allocates a single byte for zero size. */
15732
+ ret->base_addr = xmallocarray (arraysize, size);
15734
else if (unlikely (compile_options.bounds_check))
15736
Index: libgfortran/intrinsics/eoshift2.c
15737
===================================================================
15738
--- a/src/libgfortran/intrinsics/eoshift2.c (.../tags/gcc_4_8_3_release)
15739
+++ b/src/libgfortran/intrinsics/eoshift2.c (.../branches/gcc-4_8-branch)
15742
ret->dtype = array->dtype;
15744
- /* xmalloc allocates a single byte for zero size. */
15745
- ret->base_addr = xmalloc (size * arraysize);
15746
+ /* xmallocarray allocates a single byte for zero size. */
15747
+ ret->base_addr = xmallocarray (arraysize, size);
15749
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
15751
Index: libgfortran/intrinsics/reshape_generic.c
15752
===================================================================
15753
--- a/src/libgfortran/intrinsics/reshape_generic.c (.../tags/gcc_4_8_3_release)
15754
+++ b/src/libgfortran/intrinsics/reshape_generic.c (.../branches/gcc-4_8-branch)
15755
@@ -99,11 +99,11 @@
15758
if (unlikely (rs < 1))
15760
+ alloc_size = 0; /* xmalloc will allocate 1 byte. */
15762
- alloc_size = rs * size;
15765
- ret->base_addr = xmalloc (alloc_size);
15766
+ ret->base_addr = xmallocarray (alloc_size, size);
15768
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
15770
Index: libgfortran/configure.ac
15771
===================================================================
15772
--- a/src/libgfortran/configure.ac (.../tags/gcc_4_8_3_release)
15773
+++ b/src/libgfortran/configure.ac (.../branches/gcc-4_8-branch)
15774
@@ -267,7 +267,7 @@
15775
strcasestr getrlimit gettimeofday stat fstat lstat getpwuid vsnprintf dup \
15776
getcwd localtime_r gmtime_r getpwuid_r ttyname_r clock_gettime \
15777
readlink getgid getpid getppid getuid geteuid umask getegid \
15778
-secure_getenv __secure_getenv)
15779
+secure_getenv __secure_getenv strtok_r)
15781
# Check strerror_r, cannot be above as versions with two and three arguments exist
15782
LIBGFOR_CHECK_STRERROR_R
15783
Index: libgfortran/ChangeLog
15784
===================================================================
15785
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_8_3_release)
15786
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_8-branch)
15788
+2014-10-20 Janne Blomqvist <jb@gcc.gnu.org>
15790
+ PR libfortran/63589
15791
+ * configure.ac: Check for strtok_r.
15792
+ * runtime/main.c (gfstrtok_r): Fallback implementation of
15794
+ (find_addr2line): Use strtok_r to split PATH.
15795
+ * config.h.in: Regenerated.
15796
+ * configure: Regenerated.
15798
+2014-08-20 Steven G. Kargl <kargl@gcc.gnu.org>
15800
+ PR libgfortran/62188
15801
+ * m4/bessel.m4: Avoid indexing off the end of an array.
15802
+ * generated/bessel_r10.c: Regenerated.
15803
+ * generated/bessel_r16.c: Ditto.
15804
+ * generated/bessel_r4.c: Ditto.
15805
+ * generated/bessel_r8.c: Ditto.
15807
+2014-07-31 Janne Blomqvist <jb@gcc.gnu.org>
15809
+ Backport from mainline
15811
+ * libgfortran.h (xmallocarray): New prototype.
15812
+ * runtime/memory.c (xmallocarray): New function.
15813
+ (xcalloc): Check for nonzero separately instead of multiplying.
15814
+ * generated/*.c: Regenerated.
15815
+ * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
15817
+ * intrinsics/eoshift0.c (eoshift0): Likewise.
15818
+ * intrinsics/eoshift2.c (eoshift2): Likewise.
15819
+ * intrinsics/pack_generic.c (pack_internal): Likewise.
15820
+ (pack_s_internal): Likewise.
15821
+ * intrinsics/reshape_generic.c (reshape_internal): Likewise.
15822
+ * intrinsics/spread_generic.c (spread_internal): Likewise.
15823
+ (spread_internal_scalar): Likewise.
15824
+ * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
15825
+ (string_minmax): Likewise.
15826
+ * intrinsics/transpose_generic.c (transpose_internal): Likewise.
15827
+ * intrinsics/unpack_generic.c (unpack_internal): Likewise.
15828
+ * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
15829
+ * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
15831
+ * io/unit.c (get_internal_unit): Likewise.
15832
+ (filename_from_unit): Don't cast xmalloc return value.
15833
+ * io/write.c (nml_write_obj): Likewise, formatting.
15834
+ * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
15835
+ instead of xmalloc.
15836
+ (besse_yn_r'rtype_kind`): Likewise.
15837
+ * m4/cshift1.m4 (cshift1): Likewise.
15838
+ * m4/eoshift1.m4 (eoshift1): Likewise.
15839
+ * m4/eoshift3.m4 (eoshift3): Likewise.
15840
+ * m4/iforeach.m4: Likewise.
15841
+ * m4/ifunction.m4: Likewise.
15842
+ * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
15844
+ * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
15845
+ * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
15846
+ * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
15847
+ * m4/pack.m4 (pack_'rtype_code`): Likewise.
15848
+ * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
15849
+ * m4/shape.m4 (shape_'rtype_kind`): Likewise.
15850
+ * m4/spread.m4 (spread_'rtype_code`): Likewise.
15851
+ (spread_scalar_'rtype_code`): Likewise.
15852
+ * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
15853
+ * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
15854
+ (unpack1_'rtype_code`): Likewise.
15855
+ * runtime/convert_char.c (convert_char1_to_char4): Likewise.
15856
+ (convert_char4_to_char1): Simplify.
15857
+ * runtime/environ.c (init_unformatted): Call xmallocarray instead
15859
+ * runtime/in_pack_generic.c (internal_pack): Likewise.
15861
+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
15863
+ Backport from mainline
15864
+ PR libfortran/61310
15865
+ * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
15866
+ instead of strftime.
15867
+ (fdate): Use gf_ctime.
15868
+ (fdate_sub): Likewise.
15869
+ (ctime): Likewise.
15870
+ (ctime_sub): Likewise.
15872
+2014-05-25 Janne Blomqvist <jb@gcc.gnu.org>
15874
+ Backport from trunk.
15875
+ PR libfortran/61187
15876
+ * io/unix.c (raw_close): Check if s->fd is -1.
15877
+ (fd_to_stream): Check return value of fstat(), handle error.
15879
2014-05-22 Release Manager
15881
* GCC 4.8.3 released.
15882
Index: libgfortran/generated/spread_r10.c
15883
===================================================================
15884
--- a/src/libgfortran/generated/spread_r10.c (.../tags/gcc_4_8_3_release)
15885
+++ b/src/libgfortran/generated/spread_r10.c (.../branches/gcc-4_8-branch)
15886
@@ -101,8 +101,8 @@
15890
- /* xmalloc allocates a single byte for zero size. */
15891
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_10));
15892
+ /* xmallocarray allocates a single byte for zero size. */
15893
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_10));
15897
@@ -244,7 +244,7 @@
15899
if (ret->base_addr == NULL)
15901
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_10));
15902
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_10));
15904
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
15906
Index: libgfortran/generated/maxloc1_4_r8.c
15907
===================================================================
15908
--- a/src/libgfortran/generated/maxloc1_4_r8.c (.../tags/gcc_4_8_3_release)
15909
+++ b/src/libgfortran/generated/maxloc1_4_r8.c (.../branches/gcc-4_8-branch)
15911
retarray->offset = 0;
15912
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15914
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15915
- * extent[rank-1];
15916
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15918
- retarray->base_addr = xmalloc (alloc_size);
15919
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15920
if (alloc_size == 0)
15922
/* Make sure we have a zero-sized array. */
15923
@@ -294,8 +293,7 @@
15927
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15928
- * extent[rank-1];
15929
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15931
retarray->offset = 0;
15932
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15933
@@ -307,7 +305,7 @@
15937
- retarray->base_addr = xmalloc (alloc_size);
15938
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15942
@@ -485,8 +483,7 @@
15943
retarray->offset = 0;
15944
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15946
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15947
- * extent[rank-1];
15948
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15950
if (alloc_size == 0)
15952
@@ -495,7 +492,7 @@
15956
- retarray->base_addr = xmalloc (alloc_size);
15957
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
15961
Index: libgfortran/generated/norm2_r4.c
15962
===================================================================
15963
--- a/src/libgfortran/generated/norm2_r4.c (.../tags/gcc_4_8_3_release)
15964
+++ b/src/libgfortran/generated/norm2_r4.c (.../branches/gcc-4_8-branch)
15965
@@ -101,10 +101,9 @@
15966
retarray->offset = 0;
15967
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15969
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15970
- * extent[rank-1];
15971
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15973
- retarray->base_addr = xmalloc (alloc_size);
15974
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
15975
if (alloc_size == 0)
15977
/* Make sure we have a zero-sized array. */
15978
Index: libgfortran/generated/parity_l2.c
15979
===================================================================
15980
--- a/src/libgfortran/generated/parity_l2.c (.../tags/gcc_4_8_3_release)
15981
+++ b/src/libgfortran/generated/parity_l2.c (.../branches/gcc-4_8-branch)
15983
retarray->offset = 0;
15984
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
15986
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
15987
- * extent[rank-1];
15988
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
15990
- retarray->base_addr = xmalloc (alloc_size);
15991
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
15992
if (alloc_size == 0)
15994
/* Make sure we have a zero-sized array. */
15995
Index: libgfortran/generated/eoshift3_4.c
15996
===================================================================
15997
--- a/src/libgfortran/generated/eoshift3_4.c (.../tags/gcc_4_8_3_release)
15998
+++ b/src/libgfortran/generated/eoshift3_4.c (.../branches/gcc-4_8-branch)
16003
- ret->base_addr = xmalloc (size * arraysize);
16004
+ ret->base_addr = xmallocarray (arraysize, size);
16006
ret->dtype = array->dtype;
16007
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
16008
@@ -107,8 +107,8 @@
16009
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
16012
- /* xmalloc allocates a single byte for zero size. */
16013
- ret->base_addr = xmalloc (size * arraysize);
16014
+ /* xmallocarray allocates a single byte for zero size. */
16015
+ ret->base_addr = xmallocarray (arraysize, size);
16018
else if (unlikely (compile_options.bounds_check))
16019
Index: libgfortran/generated/transpose_c8.c
16020
===================================================================
16021
--- a/src/libgfortran/generated/transpose_c8.c (.../tags/gcc_4_8_3_release)
16022
+++ b/src/libgfortran/generated/transpose_c8.c (.../branches/gcc-4_8-branch)
16024
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
16025
GFC_DESCRIPTOR_EXTENT(source, 1));
16027
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) ret));
16028
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
16029
+ sizeof (GFC_COMPLEX_8));
16031
} else if (unlikely (compile_options.bounds_check))
16033
Index: libgfortran/generated/eoshift1_8.c
16034
===================================================================
16035
--- a/src/libgfortran/generated/eoshift1_8.c (.../tags/gcc_4_8_3_release)
16036
+++ b/src/libgfortran/generated/eoshift1_8.c (.../branches/gcc-4_8-branch)
16037
@@ -105,8 +105,8 @@
16038
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
16041
- /* xmalloc allocates a single byte for zero size. */
16042
- ret->base_addr = xmalloc (size * arraysize);
16043
+ /* xmallocarray allocates a single byte for zero size. */
16044
+ ret->base_addr = xmallocarray (arraysize, size);
16047
else if (unlikely (compile_options.bounds_check))
16048
Index: libgfortran/generated/reshape_r16.c
16049
===================================================================
16050
--- a/src/libgfortran/generated/reshape_r16.c (.../tags/gcc_4_8_3_release)
16051
+++ b/src/libgfortran/generated/reshape_r16.c (.../branches/gcc-4_8-branch)
16052
@@ -111,11 +111,11 @@
16055
if (unlikely (rs < 1))
16059
- alloc_size = rs * sizeof (GFC_REAL_16);
16062
- ret->base_addr = xmalloc (alloc_size);
16063
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
16064
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
16067
Index: libgfortran/generated/bessel_r4.c
16068
===================================================================
16069
--- a/src/libgfortran/generated/bessel_r4.c (.../tags/gcc_4_8_3_release)
16070
+++ b/src/libgfortran/generated/bessel_r4.c (.../branches/gcc-4_8-branch)
16073
size_t size = n2 < n1 ? 0 : n2-n1+1;
16074
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
16075
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
16076
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
16080
@@ -122,7 +122,7 @@
16082
size_t size = n2 < n1 ? 0 : n2-n1+1;
16083
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
16084
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
16085
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
16089
@@ -162,7 +162,7 @@
16091
x2rev = GFC_REAL_4_LITERAL(2.)/x;
16093
- for (i = 2; i <= n1+n2; i++)
16094
+ for (i = 2; i <= n2 - n1; i++)
16096
#if defined(GFC_REAL_4_INFINITY)
16097
if (unlikely (last2 == -GFC_REAL_4_INFINITY))
16098
Index: libgfortran/generated/any_l2.c
16099
===================================================================
16100
--- a/src/libgfortran/generated/any_l2.c (.../tags/gcc_4_8_3_release)
16101
+++ b/src/libgfortran/generated/any_l2.c (.../branches/gcc-4_8-branch)
16102
@@ -101,8 +101,7 @@
16103
retarray->offset = 0;
16104
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16106
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16107
- * extent[rank-1];
16108
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16110
if (alloc_size == 0)
16112
@@ -111,7 +110,7 @@
16116
- retarray->base_addr = xmalloc (alloc_size);
16117
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
16121
Index: libgfortran/generated/product_r4.c
16122
===================================================================
16123
--- a/src/libgfortran/generated/product_r4.c (.../tags/gcc_4_8_3_release)
16124
+++ b/src/libgfortran/generated/product_r4.c (.../branches/gcc-4_8-branch)
16126
retarray->offset = 0;
16127
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16129
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16130
- * extent[rank-1];
16131
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16133
- retarray->base_addr = xmalloc (alloc_size);
16134
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
16135
if (alloc_size == 0)
16137
/* Make sure we have a zero-sized array. */
16138
@@ -272,8 +271,7 @@
16142
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16143
- * extent[rank-1];
16144
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16146
retarray->offset = 0;
16147
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16148
@@ -285,7 +283,7 @@
16152
- retarray->base_addr = xmalloc (alloc_size);
16153
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
16157
@@ -430,8 +428,7 @@
16158
retarray->offset = 0;
16159
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16161
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16162
- * extent[rank-1];
16163
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16165
if (alloc_size == 0)
16167
@@ -440,7 +437,7 @@
16171
- retarray->base_addr = xmalloc (alloc_size);
16172
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
16176
Index: libgfortran/generated/iany_i1.c
16177
===================================================================
16178
--- a/src/libgfortran/generated/iany_i1.c (.../tags/gcc_4_8_3_release)
16179
+++ b/src/libgfortran/generated/iany_i1.c (.../branches/gcc-4_8-branch)
16181
retarray->offset = 0;
16182
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16184
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16185
- * extent[rank-1];
16186
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16188
- retarray->base_addr = xmalloc (alloc_size);
16189
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
16190
if (alloc_size == 0)
16192
/* Make sure we have a zero-sized array. */
16193
@@ -272,8 +271,7 @@
16197
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16198
- * extent[rank-1];
16199
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16201
retarray->offset = 0;
16202
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16203
@@ -285,7 +283,7 @@
16207
- retarray->base_addr = xmalloc (alloc_size);
16208
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
16212
@@ -430,8 +428,7 @@
16213
retarray->offset = 0;
16214
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16216
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16217
- * extent[rank-1];
16218
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16220
if (alloc_size == 0)
16222
@@ -440,7 +437,7 @@
16226
- retarray->base_addr = xmalloc (alloc_size);
16227
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
16231
Index: libgfortran/generated/parity_l16.c
16232
===================================================================
16233
--- a/src/libgfortran/generated/parity_l16.c (.../tags/gcc_4_8_3_release)
16234
+++ b/src/libgfortran/generated/parity_l16.c (.../branches/gcc-4_8-branch)
16236
retarray->offset = 0;
16237
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16239
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16240
- * extent[rank-1];
16241
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16243
- retarray->base_addr = xmalloc (alloc_size);
16244
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
16245
if (alloc_size == 0)
16247
/* Make sure we have a zero-sized array. */
16248
Index: libgfortran/generated/in_pack_r4.c
16249
===================================================================
16250
--- a/src/libgfortran/generated/in_pack_r4.c (.../tags/gcc_4_8_3_release)
16251
+++ b/src/libgfortran/generated/in_pack_r4.c (.../branches/gcc-4_8-branch)
16253
return source->base_addr;
16255
/* Allocate storage for the destination. */
16256
- destptr = (GFC_REAL_4 *)xmalloc (ssize * sizeof (GFC_REAL_4));
16257
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_4));
16259
src = source->base_addr;
16260
stride0 = stride[0];
16261
Index: libgfortran/generated/product_i2.c
16262
===================================================================
16263
--- a/src/libgfortran/generated/product_i2.c (.../tags/gcc_4_8_3_release)
16264
+++ b/src/libgfortran/generated/product_i2.c (.../branches/gcc-4_8-branch)
16266
retarray->offset = 0;
16267
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16269
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16270
- * extent[rank-1];
16271
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16273
- retarray->base_addr = xmalloc (alloc_size);
16274
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
16275
if (alloc_size == 0)
16277
/* Make sure we have a zero-sized array. */
16278
@@ -272,8 +271,7 @@
16282
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16283
- * extent[rank-1];
16284
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16286
retarray->offset = 0;
16287
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16288
@@ -285,7 +283,7 @@
16292
- retarray->base_addr = xmalloc (alloc_size);
16293
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
16297
@@ -430,8 +428,7 @@
16298
retarray->offset = 0;
16299
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16301
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16302
- * extent[rank-1];
16303
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16305
if (alloc_size == 0)
16307
@@ -440,7 +437,7 @@
16311
- retarray->base_addr = xmalloc (alloc_size);
16312
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
16316
Index: libgfortran/generated/iparity_i4.c
16317
===================================================================
16318
--- a/src/libgfortran/generated/iparity_i4.c (.../tags/gcc_4_8_3_release)
16319
+++ b/src/libgfortran/generated/iparity_i4.c (.../branches/gcc-4_8-branch)
16321
retarray->offset = 0;
16322
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16324
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16325
- * extent[rank-1];
16326
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16328
- retarray->base_addr = xmalloc (alloc_size);
16329
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16330
if (alloc_size == 0)
16332
/* Make sure we have a zero-sized array. */
16333
@@ -272,8 +271,7 @@
16337
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16338
- * extent[rank-1];
16339
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16341
retarray->offset = 0;
16342
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16343
@@ -285,7 +283,7 @@
16347
- retarray->base_addr = xmalloc (alloc_size);
16348
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16352
@@ -430,8 +428,7 @@
16353
retarray->offset = 0;
16354
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16356
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16357
- * extent[rank-1];
16358
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16360
if (alloc_size == 0)
16362
@@ -440,7 +437,7 @@
16366
- retarray->base_addr = xmalloc (alloc_size);
16367
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
16371
Index: libgfortran/generated/minloc0_4_i1.c
16372
===================================================================
16373
--- a/src/libgfortran/generated/minloc0_4_i1.c (.../tags/gcc_4_8_3_release)
16374
+++ b/src/libgfortran/generated/minloc0_4_i1.c (.../branches/gcc-4_8-branch)
16376
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16377
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16378
retarray->offset = 0;
16379
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16380
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16384
@@ -199,7 +199,7 @@
16385
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16386
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16387
retarray->offset = 0;
16388
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16389
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16393
@@ -367,7 +367,7 @@
16394
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16395
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16396
retarray->offset = 0;
16397
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16398
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16400
else if (unlikely (compile_options.bounds_check))
16402
Index: libgfortran/generated/reshape_c4.c
16403
===================================================================
16404
--- a/src/libgfortran/generated/reshape_c4.c (.../tags/gcc_4_8_3_release)
16405
+++ b/src/libgfortran/generated/reshape_c4.c (.../branches/gcc-4_8-branch)
16406
@@ -111,11 +111,11 @@
16409
if (unlikely (rs < 1))
16413
- alloc_size = rs * sizeof (GFC_COMPLEX_4);
16416
- ret->base_addr = xmalloc (alloc_size);
16417
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
16418
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
16421
Index: libgfortran/generated/maxloc0_4_r16.c
16422
===================================================================
16423
--- a/src/libgfortran/generated/maxloc0_4_r16.c (.../tags/gcc_4_8_3_release)
16424
+++ b/src/libgfortran/generated/maxloc0_4_r16.c (.../branches/gcc-4_8-branch)
16426
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16427
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16428
retarray->offset = 0;
16429
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16430
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16434
@@ -199,7 +199,7 @@
16435
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16436
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16437
retarray->offset = 0;
16438
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16439
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16443
@@ -367,7 +367,7 @@
16444
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16445
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16446
retarray->offset = 0;
16447
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
16448
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
16450
else if (unlikely (compile_options.bounds_check))
16452
Index: libgfortran/generated/iall_i8.c
16453
===================================================================
16454
--- a/src/libgfortran/generated/iall_i8.c (.../tags/gcc_4_8_3_release)
16455
+++ b/src/libgfortran/generated/iall_i8.c (.../branches/gcc-4_8-branch)
16457
retarray->offset = 0;
16458
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16460
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16461
- * extent[rank-1];
16462
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16464
- retarray->base_addr = xmalloc (alloc_size);
16465
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16466
if (alloc_size == 0)
16468
/* Make sure we have a zero-sized array. */
16469
@@ -272,8 +271,7 @@
16473
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16474
- * extent[rank-1];
16475
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16477
retarray->offset = 0;
16478
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16479
@@ -285,7 +283,7 @@
16483
- retarray->base_addr = xmalloc (alloc_size);
16484
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16488
@@ -430,8 +428,7 @@
16489
retarray->offset = 0;
16490
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16492
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16493
- * extent[rank-1];
16494
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16496
if (alloc_size == 0)
16498
@@ -440,7 +437,7 @@
16502
- retarray->base_addr = xmalloc (alloc_size);
16503
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16507
Index: libgfortran/generated/maxloc1_8_r16.c
16508
===================================================================
16509
--- a/src/libgfortran/generated/maxloc1_8_r16.c (.../tags/gcc_4_8_3_release)
16510
+++ b/src/libgfortran/generated/maxloc1_8_r16.c (.../branches/gcc-4_8-branch)
16512
retarray->offset = 0;
16513
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16515
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16516
- * extent[rank-1];
16517
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16519
- retarray->base_addr = xmalloc (alloc_size);
16520
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16521
if (alloc_size == 0)
16523
/* Make sure we have a zero-sized array. */
16524
@@ -294,8 +293,7 @@
16528
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16529
- * extent[rank-1];
16530
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16532
retarray->offset = 0;
16533
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16534
@@ -307,7 +305,7 @@
16538
- retarray->base_addr = xmalloc (alloc_size);
16539
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16543
@@ -485,8 +483,7 @@
16544
retarray->offset = 0;
16545
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16547
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16548
- * extent[rank-1];
16549
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16551
if (alloc_size == 0)
16553
@@ -495,7 +492,7 @@
16557
- retarray->base_addr = xmalloc (alloc_size);
16558
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16562
Index: libgfortran/generated/sum_r16.c
16563
===================================================================
16564
--- a/src/libgfortran/generated/sum_r16.c (.../tags/gcc_4_8_3_release)
16565
+++ b/src/libgfortran/generated/sum_r16.c (.../branches/gcc-4_8-branch)
16567
retarray->offset = 0;
16568
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16570
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16571
- * extent[rank-1];
16572
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16574
- retarray->base_addr = xmalloc (alloc_size);
16575
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
16576
if (alloc_size == 0)
16578
/* Make sure we have a zero-sized array. */
16579
@@ -272,8 +271,7 @@
16583
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16584
- * extent[rank-1];
16585
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16587
retarray->offset = 0;
16588
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16589
@@ -285,7 +283,7 @@
16593
- retarray->base_addr = xmalloc (alloc_size);
16594
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
16598
@@ -430,8 +428,7 @@
16599
retarray->offset = 0;
16600
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16602
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16603
- * extent[rank-1];
16604
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16606
if (alloc_size == 0)
16608
@@ -440,7 +437,7 @@
16612
- retarray->base_addr = xmalloc (alloc_size);
16613
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
16617
Index: libgfortran/generated/sum_i1.c
16618
===================================================================
16619
--- a/src/libgfortran/generated/sum_i1.c (.../tags/gcc_4_8_3_release)
16620
+++ b/src/libgfortran/generated/sum_i1.c (.../branches/gcc-4_8-branch)
16622
retarray->offset = 0;
16623
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16625
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16626
- * extent[rank-1];
16627
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16629
- retarray->base_addr = xmalloc (alloc_size);
16630
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
16631
if (alloc_size == 0)
16633
/* Make sure we have a zero-sized array. */
16634
@@ -272,8 +271,7 @@
16638
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16639
- * extent[rank-1];
16640
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16642
retarray->offset = 0;
16643
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16644
@@ -285,7 +283,7 @@
16648
- retarray->base_addr = xmalloc (alloc_size);
16649
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
16653
@@ -430,8 +428,7 @@
16654
retarray->offset = 0;
16655
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16657
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16658
- * extent[rank-1];
16659
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16661
if (alloc_size == 0)
16663
@@ -440,7 +437,7 @@
16667
- retarray->base_addr = xmalloc (alloc_size);
16668
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
16672
Index: libgfortran/generated/in_pack_i2.c
16673
===================================================================
16674
--- a/src/libgfortran/generated/in_pack_i2.c (.../tags/gcc_4_8_3_release)
16675
+++ b/src/libgfortran/generated/in_pack_i2.c (.../branches/gcc-4_8-branch)
16677
return source->base_addr;
16679
/* Allocate storage for the destination. */
16680
- destptr = (GFC_INTEGER_2 *)xmalloc (ssize * sizeof (GFC_INTEGER_2));
16681
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_2));
16683
src = source->base_addr;
16684
stride0 = stride[0];
16685
Index: libgfortran/generated/transpose_r10.c
16686
===================================================================
16687
--- a/src/libgfortran/generated/transpose_r10.c (.../tags/gcc_4_8_3_release)
16688
+++ b/src/libgfortran/generated/transpose_r10.c (.../branches/gcc-4_8-branch)
16690
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
16691
GFC_DESCRIPTOR_EXTENT(source, 1));
16693
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) ret));
16694
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
16695
+ sizeof (GFC_REAL_10));
16697
} else if (unlikely (compile_options.bounds_check))
16699
Index: libgfortran/generated/maxloc1_16_r16.c
16700
===================================================================
16701
--- a/src/libgfortran/generated/maxloc1_16_r16.c (.../tags/gcc_4_8_3_release)
16702
+++ b/src/libgfortran/generated/maxloc1_16_r16.c (.../branches/gcc-4_8-branch)
16704
retarray->offset = 0;
16705
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16707
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16708
- * extent[rank-1];
16709
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16711
- retarray->base_addr = xmalloc (alloc_size);
16712
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16713
if (alloc_size == 0)
16715
/* Make sure we have a zero-sized array. */
16716
@@ -294,8 +293,7 @@
16720
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16721
- * extent[rank-1];
16722
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16724
retarray->offset = 0;
16725
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16726
@@ -307,7 +305,7 @@
16730
- retarray->base_addr = xmalloc (alloc_size);
16731
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16735
@@ -485,8 +483,7 @@
16736
retarray->offset = 0;
16737
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16739
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16740
- * extent[rank-1];
16741
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16743
if (alloc_size == 0)
16745
@@ -495,7 +492,7 @@
16749
- retarray->base_addr = xmalloc (alloc_size);
16750
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16754
Index: libgfortran/generated/maxloc1_16_i4.c
16755
===================================================================
16756
--- a/src/libgfortran/generated/maxloc1_16_i4.c (.../tags/gcc_4_8_3_release)
16757
+++ b/src/libgfortran/generated/maxloc1_16_i4.c (.../branches/gcc-4_8-branch)
16759
retarray->offset = 0;
16760
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16762
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16763
- * extent[rank-1];
16764
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16766
- retarray->base_addr = xmalloc (alloc_size);
16767
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16768
if (alloc_size == 0)
16770
/* Make sure we have a zero-sized array. */
16771
@@ -294,8 +293,7 @@
16775
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16776
- * extent[rank-1];
16777
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16779
retarray->offset = 0;
16780
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16781
@@ -307,7 +305,7 @@
16785
- retarray->base_addr = xmalloc (alloc_size);
16786
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16790
@@ -485,8 +483,7 @@
16791
retarray->offset = 0;
16792
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16794
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16795
- * extent[rank-1];
16796
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16798
if (alloc_size == 0)
16800
@@ -495,7 +492,7 @@
16804
- retarray->base_addr = xmalloc (alloc_size);
16805
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
16809
Index: libgfortran/generated/spread_i1.c
16810
===================================================================
16811
--- a/src/libgfortran/generated/spread_i1.c (.../tags/gcc_4_8_3_release)
16812
+++ b/src/libgfortran/generated/spread_i1.c (.../branches/gcc-4_8-branch)
16813
@@ -101,8 +101,8 @@
16817
- /* xmalloc allocates a single byte for zero size. */
16818
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_1));
16819
+ /* xmallocarray allocates a single byte for zero size. */
16820
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_1));
16824
@@ -244,7 +244,7 @@
16826
if (ret->base_addr == NULL)
16828
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_1));
16829
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_1));
16831
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
16833
Index: libgfortran/generated/maxloc0_16_i8.c
16834
===================================================================
16835
--- a/src/libgfortran/generated/maxloc0_16_i8.c (.../tags/gcc_4_8_3_release)
16836
+++ b/src/libgfortran/generated/maxloc0_16_i8.c (.../branches/gcc-4_8-branch)
16838
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16839
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16840
retarray->offset = 0;
16841
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16842
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16846
@@ -199,7 +199,7 @@
16847
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
16848
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16849
retarray->offset = 0;
16850
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16851
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16855
@@ -367,7 +367,7 @@
16856
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
16857
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
16858
retarray->offset = 0;
16859
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
16860
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
16862
else if (unlikely (compile_options.bounds_check))
16864
Index: libgfortran/generated/maxval_r16.c
16865
===================================================================
16866
--- a/src/libgfortran/generated/maxval_r16.c (.../tags/gcc_4_8_3_release)
16867
+++ b/src/libgfortran/generated/maxval_r16.c (.../branches/gcc-4_8-branch)
16869
retarray->offset = 0;
16870
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16872
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16873
- * extent[rank-1];
16874
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16876
- retarray->base_addr = xmalloc (alloc_size);
16877
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
16878
if (alloc_size == 0)
16880
/* Make sure we have a zero-sized array. */
16881
@@ -286,8 +285,7 @@
16885
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16886
- * extent[rank-1];
16887
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16889
retarray->offset = 0;
16890
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16891
@@ -299,7 +297,7 @@
16895
- retarray->base_addr = xmalloc (alloc_size);
16896
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
16900
@@ -472,8 +470,7 @@
16901
retarray->offset = 0;
16902
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16904
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16905
- * extent[rank-1];
16906
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16908
if (alloc_size == 0)
16910
@@ -482,7 +479,7 @@
16914
- retarray->base_addr = xmalloc (alloc_size);
16915
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
16919
Index: libgfortran/generated/product_c10.c
16920
===================================================================
16921
--- a/src/libgfortran/generated/product_c10.c (.../tags/gcc_4_8_3_release)
16922
+++ b/src/libgfortran/generated/product_c10.c (.../branches/gcc-4_8-branch)
16924
retarray->offset = 0;
16925
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16927
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16928
- * extent[rank-1];
16929
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16931
- retarray->base_addr = xmalloc (alloc_size);
16932
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
16933
if (alloc_size == 0)
16935
/* Make sure we have a zero-sized array. */
16936
@@ -272,8 +271,7 @@
16940
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16941
- * extent[rank-1];
16942
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16944
retarray->offset = 0;
16945
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16946
@@ -285,7 +283,7 @@
16950
- retarray->base_addr = xmalloc (alloc_size);
16951
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
16955
@@ -430,8 +428,7 @@
16956
retarray->offset = 0;
16957
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16959
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16960
- * extent[rank-1];
16961
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16963
if (alloc_size == 0)
16965
@@ -440,7 +437,7 @@
16969
- retarray->base_addr = xmalloc (alloc_size);
16970
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
16974
Index: libgfortran/generated/minloc1_8_i4.c
16975
===================================================================
16976
--- a/src/libgfortran/generated/minloc1_8_i4.c (.../tags/gcc_4_8_3_release)
16977
+++ b/src/libgfortran/generated/minloc1_8_i4.c (.../branches/gcc-4_8-branch)
16979
retarray->offset = 0;
16980
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
16982
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16983
- * extent[rank-1];
16984
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16986
- retarray->base_addr = xmalloc (alloc_size);
16987
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
16988
if (alloc_size == 0)
16990
/* Make sure we have a zero-sized array. */
16991
@@ -294,8 +293,7 @@
16995
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
16996
- * extent[rank-1];
16997
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
16999
retarray->offset = 0;
17000
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17001
@@ -307,7 +305,7 @@
17005
- retarray->base_addr = xmalloc (alloc_size);
17006
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17010
@@ -485,8 +483,7 @@
17011
retarray->offset = 0;
17012
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17014
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17015
- * extent[rank-1];
17016
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17018
if (alloc_size == 0)
17020
@@ -495,7 +492,7 @@
17024
- retarray->base_addr = xmalloc (alloc_size);
17025
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17029
Index: libgfortran/generated/minloc0_16_i16.c
17030
===================================================================
17031
--- a/src/libgfortran/generated/minloc0_16_i16.c (.../tags/gcc_4_8_3_release)
17032
+++ b/src/libgfortran/generated/minloc0_16_i16.c (.../branches/gcc-4_8-branch)
17034
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17035
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17036
retarray->offset = 0;
17037
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17038
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17042
@@ -199,7 +199,7 @@
17043
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17044
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17045
retarray->offset = 0;
17046
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17047
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17051
@@ -367,7 +367,7 @@
17052
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17053
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17054
retarray->offset = 0;
17055
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17056
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17058
else if (unlikely (compile_options.bounds_check))
17060
Index: libgfortran/generated/matmul_r16.c
17061
===================================================================
17062
--- a/src/libgfortran/generated/matmul_r16.c (.../tags/gcc_4_8_3_release)
17063
+++ b/src/libgfortran/generated/matmul_r16.c (.../branches/gcc-4_8-branch)
17064
@@ -124,7 +124,7 @@
17067
retarray->base_addr
17068
- = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) retarray));
17069
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_16));
17070
retarray->offset = 0;
17072
else if (unlikely (compile_options.bounds_check))
17073
Index: libgfortran/generated/minloc0_4_r4.c
17074
===================================================================
17075
--- a/src/libgfortran/generated/minloc0_4_r4.c (.../tags/gcc_4_8_3_release)
17076
+++ b/src/libgfortran/generated/minloc0_4_r4.c (.../branches/gcc-4_8-branch)
17078
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17079
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17080
retarray->offset = 0;
17081
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17082
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17086
@@ -199,7 +199,7 @@
17087
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17088
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17089
retarray->offset = 0;
17090
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17091
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17095
@@ -367,7 +367,7 @@
17096
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17097
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17098
retarray->offset = 0;
17099
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17100
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17102
else if (unlikely (compile_options.bounds_check))
17104
Index: libgfortran/generated/iany_i2.c
17105
===================================================================
17106
--- a/src/libgfortran/generated/iany_i2.c (.../tags/gcc_4_8_3_release)
17107
+++ b/src/libgfortran/generated/iany_i2.c (.../branches/gcc-4_8-branch)
17109
retarray->offset = 0;
17110
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17112
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17113
- * extent[rank-1];
17114
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17116
- retarray->base_addr = xmalloc (alloc_size);
17117
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17118
if (alloc_size == 0)
17120
/* Make sure we have a zero-sized array. */
17121
@@ -272,8 +271,7 @@
17125
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17126
- * extent[rank-1];
17127
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17129
retarray->offset = 0;
17130
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17131
@@ -285,7 +283,7 @@
17135
- retarray->base_addr = xmalloc (alloc_size);
17136
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17140
@@ -430,8 +428,7 @@
17141
retarray->offset = 0;
17142
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17144
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17145
- * extent[rank-1];
17146
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17148
if (alloc_size == 0)
17150
@@ -440,7 +437,7 @@
17154
- retarray->base_addr = xmalloc (alloc_size);
17155
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17159
Index: libgfortran/generated/sum_r4.c
17160
===================================================================
17161
--- a/src/libgfortran/generated/sum_r4.c (.../tags/gcc_4_8_3_release)
17162
+++ b/src/libgfortran/generated/sum_r4.c (.../branches/gcc-4_8-branch)
17164
retarray->offset = 0;
17165
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17167
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17168
- * extent[rank-1];
17169
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17171
- retarray->base_addr = xmalloc (alloc_size);
17172
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17173
if (alloc_size == 0)
17175
/* Make sure we have a zero-sized array. */
17176
@@ -272,8 +271,7 @@
17180
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17181
- * extent[rank-1];
17182
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17184
retarray->offset = 0;
17185
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17186
@@ -285,7 +283,7 @@
17190
- retarray->base_addr = xmalloc (alloc_size);
17191
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17195
@@ -430,8 +428,7 @@
17196
retarray->offset = 0;
17197
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17199
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17200
- * extent[rank-1];
17201
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17203
if (alloc_size == 0)
17205
@@ -440,7 +437,7 @@
17209
- retarray->base_addr = xmalloc (alloc_size);
17210
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
17214
Index: libgfortran/generated/unpack_c8.c
17215
===================================================================
17216
--- a/src/libgfortran/generated/unpack_c8.c (.../tags/gcc_4_8_3_release)
17217
+++ b/src/libgfortran/generated/unpack_c8.c (.../branches/gcc-4_8-branch)
17222
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
17223
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
17227
@@ -244,7 +244,7 @@
17231
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_8));
17232
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_8));
17236
Index: libgfortran/generated/in_pack_c16.c
17237
===================================================================
17238
--- a/src/libgfortran/generated/in_pack_c16.c (.../tags/gcc_4_8_3_release)
17239
+++ b/src/libgfortran/generated/in_pack_c16.c (.../branches/gcc-4_8-branch)
17241
return source->base_addr;
17243
/* Allocate storage for the destination. */
17244
- destptr = (GFC_COMPLEX_16 *)xmalloc (ssize * sizeof (GFC_COMPLEX_16));
17245
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_16));
17247
src = source->base_addr;
17248
stride0 = stride[0];
17249
Index: libgfortran/generated/minloc0_4_i2.c
17250
===================================================================
17251
--- a/src/libgfortran/generated/minloc0_4_i2.c (.../tags/gcc_4_8_3_release)
17252
+++ b/src/libgfortran/generated/minloc0_4_i2.c (.../branches/gcc-4_8-branch)
17254
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17255
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17256
retarray->offset = 0;
17257
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17258
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17262
@@ -199,7 +199,7 @@
17263
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17264
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17265
retarray->offset = 0;
17266
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17267
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17271
@@ -367,7 +367,7 @@
17272
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17273
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17274
retarray->offset = 0;
17275
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17276
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17278
else if (unlikely (compile_options.bounds_check))
17280
Index: libgfortran/generated/spread_c10.c
17281
===================================================================
17282
--- a/src/libgfortran/generated/spread_c10.c (.../tags/gcc_4_8_3_release)
17283
+++ b/src/libgfortran/generated/spread_c10.c (.../branches/gcc-4_8-branch)
17284
@@ -101,8 +101,8 @@
17288
- /* xmalloc allocates a single byte for zero size. */
17289
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_10));
17290
+ /* xmallocarray allocates a single byte for zero size. */
17291
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_10));
17295
@@ -244,7 +244,7 @@
17297
if (ret->base_addr == NULL)
17299
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_10));
17300
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_10));
17302
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17304
Index: libgfortran/generated/maxloc0_8_i1.c
17305
===================================================================
17306
--- a/src/libgfortran/generated/maxloc0_8_i1.c (.../tags/gcc_4_8_3_release)
17307
+++ b/src/libgfortran/generated/maxloc0_8_i1.c (.../branches/gcc-4_8-branch)
17309
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17310
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17311
retarray->offset = 0;
17312
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17313
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17317
@@ -199,7 +199,7 @@
17318
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17319
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17320
retarray->offset = 0;
17321
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17322
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17326
@@ -367,7 +367,7 @@
17327
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17328
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17329
retarray->offset = 0;
17330
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17331
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17333
else if (unlikely (compile_options.bounds_check))
17335
Index: libgfortran/generated/spread_r4.c
17336
===================================================================
17337
--- a/src/libgfortran/generated/spread_r4.c (.../tags/gcc_4_8_3_release)
17338
+++ b/src/libgfortran/generated/spread_r4.c (.../branches/gcc-4_8-branch)
17339
@@ -101,8 +101,8 @@
17343
- /* xmalloc allocates a single byte for zero size. */
17344
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_4));
17345
+ /* xmallocarray allocates a single byte for zero size. */
17346
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_4));
17350
@@ -244,7 +244,7 @@
17352
if (ret->base_addr == NULL)
17354
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_4));
17355
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_4));
17357
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17359
Index: libgfortran/generated/minloc0_8_i8.c
17360
===================================================================
17361
--- a/src/libgfortran/generated/minloc0_8_i8.c (.../tags/gcc_4_8_3_release)
17362
+++ b/src/libgfortran/generated/minloc0_8_i8.c (.../branches/gcc-4_8-branch)
17364
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17365
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17366
retarray->offset = 0;
17367
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17368
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17372
@@ -199,7 +199,7 @@
17373
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17374
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17375
retarray->offset = 0;
17376
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17377
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17381
@@ -367,7 +367,7 @@
17382
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17383
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17384
retarray->offset = 0;
17385
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17386
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17388
else if (unlikely (compile_options.bounds_check))
17390
Index: libgfortran/generated/matmul_c8.c
17391
===================================================================
17392
--- a/src/libgfortran/generated/matmul_c8.c (.../tags/gcc_4_8_3_release)
17393
+++ b/src/libgfortran/generated/matmul_c8.c (.../branches/gcc-4_8-branch)
17394
@@ -124,7 +124,7 @@
17397
retarray->base_addr
17398
- = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) retarray));
17399
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_8));
17400
retarray->offset = 0;
17402
else if (unlikely (compile_options.bounds_check))
17403
Index: libgfortran/generated/minloc1_16_r10.c
17404
===================================================================
17405
--- a/src/libgfortran/generated/minloc1_16_r10.c (.../tags/gcc_4_8_3_release)
17406
+++ b/src/libgfortran/generated/minloc1_16_r10.c (.../branches/gcc-4_8-branch)
17408
retarray->offset = 0;
17409
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17411
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17412
- * extent[rank-1];
17413
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17415
- retarray->base_addr = xmalloc (alloc_size);
17416
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17417
if (alloc_size == 0)
17419
/* Make sure we have a zero-sized array. */
17420
@@ -294,8 +293,7 @@
17424
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17425
- * extent[rank-1];
17426
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17428
retarray->offset = 0;
17429
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17430
@@ -307,7 +305,7 @@
17434
- retarray->base_addr = xmalloc (alloc_size);
17435
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17439
@@ -485,8 +483,7 @@
17440
retarray->offset = 0;
17441
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17443
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17444
- * extent[rank-1];
17445
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17447
if (alloc_size == 0)
17449
@@ -495,7 +492,7 @@
17453
- retarray->base_addr = xmalloc (alloc_size);
17454
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17458
Index: libgfortran/generated/sum_i2.c
17459
===================================================================
17460
--- a/src/libgfortran/generated/sum_i2.c (.../tags/gcc_4_8_3_release)
17461
+++ b/src/libgfortran/generated/sum_i2.c (.../branches/gcc-4_8-branch)
17463
retarray->offset = 0;
17464
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17466
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17467
- * extent[rank-1];
17468
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17470
- retarray->base_addr = xmalloc (alloc_size);
17471
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17472
if (alloc_size == 0)
17474
/* Make sure we have a zero-sized array. */
17475
@@ -272,8 +271,7 @@
17479
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17480
- * extent[rank-1];
17481
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17483
retarray->offset = 0;
17484
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17485
@@ -285,7 +283,7 @@
17489
- retarray->base_addr = xmalloc (alloc_size);
17490
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17494
@@ -430,8 +428,7 @@
17495
retarray->offset = 0;
17496
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17498
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17499
- * extent[rank-1];
17500
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17502
if (alloc_size == 0)
17504
@@ -440,7 +437,7 @@
17508
- retarray->base_addr = xmalloc (alloc_size);
17509
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
17513
Index: libgfortran/generated/iparity_i16.c
17514
===================================================================
17515
--- a/src/libgfortran/generated/iparity_i16.c (.../tags/gcc_4_8_3_release)
17516
+++ b/src/libgfortran/generated/iparity_i16.c (.../branches/gcc-4_8-branch)
17518
retarray->offset = 0;
17519
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17521
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17522
- * extent[rank-1];
17523
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17525
- retarray->base_addr = xmalloc (alloc_size);
17526
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17527
if (alloc_size == 0)
17529
/* Make sure we have a zero-sized array. */
17530
@@ -272,8 +271,7 @@
17534
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17535
- * extent[rank-1];
17536
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17538
retarray->offset = 0;
17539
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17540
@@ -285,7 +283,7 @@
17544
- retarray->base_addr = xmalloc (alloc_size);
17545
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17549
@@ -430,8 +428,7 @@
17550
retarray->offset = 0;
17551
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17553
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17554
- * extent[rank-1];
17555
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17557
if (alloc_size == 0)
17559
@@ -440,7 +437,7 @@
17563
- retarray->base_addr = xmalloc (alloc_size);
17564
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
17568
Index: libgfortran/generated/minloc0_16_i1.c
17569
===================================================================
17570
--- a/src/libgfortran/generated/minloc0_16_i1.c (.../tags/gcc_4_8_3_release)
17571
+++ b/src/libgfortran/generated/minloc0_16_i1.c (.../branches/gcc-4_8-branch)
17573
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17574
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17575
retarray->offset = 0;
17576
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17577
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17581
@@ -199,7 +199,7 @@
17582
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17583
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17584
retarray->offset = 0;
17585
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17586
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17590
@@ -367,7 +367,7 @@
17591
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17592
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17593
retarray->offset = 0;
17594
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17595
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17597
else if (unlikely (compile_options.bounds_check))
17599
Index: libgfortran/generated/reshape_c16.c
17600
===================================================================
17601
--- a/src/libgfortran/generated/reshape_c16.c (.../tags/gcc_4_8_3_release)
17602
+++ b/src/libgfortran/generated/reshape_c16.c (.../branches/gcc-4_8-branch)
17603
@@ -111,11 +111,11 @@
17606
if (unlikely (rs < 1))
17610
- alloc_size = rs * sizeof (GFC_COMPLEX_16);
17613
- ret->base_addr = xmalloc (alloc_size);
17614
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
17615
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
17618
Index: libgfortran/generated/pack_c4.c
17619
===================================================================
17620
--- a/src/libgfortran/generated/pack_c4.c (.../tags/gcc_4_8_3_release)
17621
+++ b/src/libgfortran/generated/pack_c4.c (.../branches/gcc-4_8-branch)
17622
@@ -167,8 +167,8 @@
17626
- /* xmalloc allocates a single byte for zero size. */
17627
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * total);
17628
+ /* xmallocarray allocates a single byte for zero size. */
17629
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_4));
17633
Index: libgfortran/generated/parity_l4.c
17634
===================================================================
17635
--- a/src/libgfortran/generated/parity_l4.c (.../tags/gcc_4_8_3_release)
17636
+++ b/src/libgfortran/generated/parity_l4.c (.../branches/gcc-4_8-branch)
17638
retarray->offset = 0;
17639
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17641
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17642
- * extent[rank-1];
17643
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17645
- retarray->base_addr = xmalloc (alloc_size);
17646
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
17647
if (alloc_size == 0)
17649
/* Make sure we have a zero-sized array. */
17650
Index: libgfortran/generated/spread_i2.c
17651
===================================================================
17652
--- a/src/libgfortran/generated/spread_i2.c (.../tags/gcc_4_8_3_release)
17653
+++ b/src/libgfortran/generated/spread_i2.c (.../branches/gcc-4_8-branch)
17654
@@ -101,8 +101,8 @@
17658
- /* xmalloc allocates a single byte for zero size. */
17659
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_2));
17660
+ /* xmallocarray allocates a single byte for zero size. */
17661
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_2));
17665
@@ -244,7 +244,7 @@
17667
if (ret->base_addr == NULL)
17669
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_2));
17670
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_2));
17672
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
17674
Index: libgfortran/generated/any_l4.c
17675
===================================================================
17676
--- a/src/libgfortran/generated/any_l4.c (.../tags/gcc_4_8_3_release)
17677
+++ b/src/libgfortran/generated/any_l4.c (.../branches/gcc-4_8-branch)
17678
@@ -101,8 +101,7 @@
17679
retarray->offset = 0;
17680
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17682
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17683
- * extent[rank-1];
17684
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17686
if (alloc_size == 0)
17688
@@ -111,7 +110,7 @@
17692
- retarray->base_addr = xmalloc (alloc_size);
17693
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
17697
Index: libgfortran/generated/maxloc1_4_i8.c
17698
===================================================================
17699
--- a/src/libgfortran/generated/maxloc1_4_i8.c (.../tags/gcc_4_8_3_release)
17700
+++ b/src/libgfortran/generated/maxloc1_4_i8.c (.../branches/gcc-4_8-branch)
17702
retarray->offset = 0;
17703
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17705
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17706
- * extent[rank-1];
17707
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17709
- retarray->base_addr = xmalloc (alloc_size);
17710
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17711
if (alloc_size == 0)
17713
/* Make sure we have a zero-sized array. */
17714
@@ -294,8 +293,7 @@
17718
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17719
- * extent[rank-1];
17720
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17722
retarray->offset = 0;
17723
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17724
@@ -307,7 +305,7 @@
17728
- retarray->base_addr = xmalloc (alloc_size);
17729
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17733
@@ -485,8 +483,7 @@
17734
retarray->offset = 0;
17735
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17737
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17738
- * extent[rank-1];
17739
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17741
if (alloc_size == 0)
17743
@@ -495,7 +492,7 @@
17747
- retarray->base_addr = xmalloc (alloc_size);
17748
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17752
Index: libgfortran/generated/maxloc0_8_r4.c
17753
===================================================================
17754
--- a/src/libgfortran/generated/maxloc0_8_r4.c (.../tags/gcc_4_8_3_release)
17755
+++ b/src/libgfortran/generated/maxloc0_8_r4.c (.../branches/gcc-4_8-branch)
17757
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17758
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17759
retarray->offset = 0;
17760
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17761
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17765
@@ -199,7 +199,7 @@
17766
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17767
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17768
retarray->offset = 0;
17769
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17770
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17774
@@ -367,7 +367,7 @@
17775
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17776
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17777
retarray->offset = 0;
17778
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17779
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17781
else if (unlikely (compile_options.bounds_check))
17783
Index: libgfortran/generated/maxloc1_4_i16.c
17784
===================================================================
17785
--- a/src/libgfortran/generated/maxloc1_4_i16.c (.../tags/gcc_4_8_3_release)
17786
+++ b/src/libgfortran/generated/maxloc1_4_i16.c (.../branches/gcc-4_8-branch)
17788
retarray->offset = 0;
17789
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17791
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17792
- * extent[rank-1];
17793
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17795
- retarray->base_addr = xmalloc (alloc_size);
17796
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17797
if (alloc_size == 0)
17799
/* Make sure we have a zero-sized array. */
17800
@@ -294,8 +293,7 @@
17804
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17805
- * extent[rank-1];
17806
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17808
retarray->offset = 0;
17809
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17810
@@ -307,7 +305,7 @@
17814
- retarray->base_addr = xmalloc (alloc_size);
17815
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17819
@@ -485,8 +483,7 @@
17820
retarray->offset = 0;
17821
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17823
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17824
- * extent[rank-1];
17825
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17827
if (alloc_size == 0)
17829
@@ -495,7 +492,7 @@
17833
- retarray->base_addr = xmalloc (alloc_size);
17834
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
17838
Index: libgfortran/generated/minloc0_4_r10.c
17839
===================================================================
17840
--- a/src/libgfortran/generated/minloc0_4_r10.c (.../tags/gcc_4_8_3_release)
17841
+++ b/src/libgfortran/generated/minloc0_4_r10.c (.../branches/gcc-4_8-branch)
17843
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17844
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17845
retarray->offset = 0;
17846
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17847
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17851
@@ -199,7 +199,7 @@
17852
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17853
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17854
retarray->offset = 0;
17855
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17856
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17860
@@ -367,7 +367,7 @@
17861
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17862
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17863
retarray->offset = 0;
17864
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
17865
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
17867
else if (unlikely (compile_options.bounds_check))
17869
Index: libgfortran/generated/minloc0_8_i16.c
17870
===================================================================
17871
--- a/src/libgfortran/generated/minloc0_8_i16.c (.../tags/gcc_4_8_3_release)
17872
+++ b/src/libgfortran/generated/minloc0_8_i16.c (.../branches/gcc-4_8-branch)
17874
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17875
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17876
retarray->offset = 0;
17877
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17878
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17882
@@ -199,7 +199,7 @@
17883
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17884
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17885
retarray->offset = 0;
17886
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17887
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17891
@@ -367,7 +367,7 @@
17892
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17893
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17894
retarray->offset = 0;
17895
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
17896
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
17898
else if (unlikely (compile_options.bounds_check))
17900
Index: libgfortran/generated/minloc1_8_r10.c
17901
===================================================================
17902
--- a/src/libgfortran/generated/minloc1_8_r10.c (.../tags/gcc_4_8_3_release)
17903
+++ b/src/libgfortran/generated/minloc1_8_r10.c (.../branches/gcc-4_8-branch)
17905
retarray->offset = 0;
17906
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17908
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17909
- * extent[rank-1];
17910
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17912
- retarray->base_addr = xmalloc (alloc_size);
17913
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17914
if (alloc_size == 0)
17916
/* Make sure we have a zero-sized array. */
17917
@@ -294,8 +293,7 @@
17921
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17922
- * extent[rank-1];
17923
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17925
retarray->offset = 0;
17926
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17927
@@ -307,7 +305,7 @@
17931
- retarray->base_addr = xmalloc (alloc_size);
17932
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17936
@@ -485,8 +483,7 @@
17937
retarray->offset = 0;
17938
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17940
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17941
- * extent[rank-1];
17942
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17944
if (alloc_size == 0)
17946
@@ -495,7 +492,7 @@
17950
- retarray->base_addr = xmalloc (alloc_size);
17951
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
17955
Index: libgfortran/generated/minloc0_16_r4.c
17956
===================================================================
17957
--- a/src/libgfortran/generated/minloc0_16_r4.c (.../tags/gcc_4_8_3_release)
17958
+++ b/src/libgfortran/generated/minloc0_16_r4.c (.../branches/gcc-4_8-branch)
17960
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17961
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17962
retarray->offset = 0;
17963
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17964
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17968
@@ -199,7 +199,7 @@
17969
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
17970
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17971
retarray->offset = 0;
17972
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17973
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17977
@@ -367,7 +367,7 @@
17978
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
17979
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
17980
retarray->offset = 0;
17981
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
17982
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
17984
else if (unlikely (compile_options.bounds_check))
17986
Index: libgfortran/generated/product_i4.c
17987
===================================================================
17988
--- a/src/libgfortran/generated/product_i4.c (.../tags/gcc_4_8_3_release)
17989
+++ b/src/libgfortran/generated/product_i4.c (.../branches/gcc-4_8-branch)
17991
retarray->offset = 0;
17992
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
17994
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
17995
- * extent[rank-1];
17996
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
17998
- retarray->base_addr = xmalloc (alloc_size);
17999
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18000
if (alloc_size == 0)
18002
/* Make sure we have a zero-sized array. */
18003
@@ -272,8 +271,7 @@
18007
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18008
- * extent[rank-1];
18009
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18011
retarray->offset = 0;
18012
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18013
@@ -285,7 +283,7 @@
18017
- retarray->base_addr = xmalloc (alloc_size);
18018
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18022
@@ -430,8 +428,7 @@
18023
retarray->offset = 0;
18024
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18026
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18027
- * extent[rank-1];
18028
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18030
if (alloc_size == 0)
18032
@@ -440,7 +437,7 @@
18036
- retarray->base_addr = xmalloc (alloc_size);
18037
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18041
Index: libgfortran/generated/sum_c16.c
18042
===================================================================
18043
--- a/src/libgfortran/generated/sum_c16.c (.../tags/gcc_4_8_3_release)
18044
+++ b/src/libgfortran/generated/sum_c16.c (.../branches/gcc-4_8-branch)
18046
retarray->offset = 0;
18047
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18049
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18050
- * extent[rank-1];
18051
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18053
- retarray->base_addr = xmalloc (alloc_size);
18054
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
18055
if (alloc_size == 0)
18057
/* Make sure we have a zero-sized array. */
18058
@@ -272,8 +271,7 @@
18062
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18063
- * extent[rank-1];
18064
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18066
retarray->offset = 0;
18067
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18068
@@ -285,7 +283,7 @@
18072
- retarray->base_addr = xmalloc (alloc_size);
18073
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
18077
@@ -430,8 +428,7 @@
18078
retarray->offset = 0;
18079
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18081
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18082
- * extent[rank-1];
18083
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18085
if (alloc_size == 0)
18087
@@ -440,7 +437,7 @@
18091
- retarray->base_addr = xmalloc (alloc_size);
18092
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
18096
Index: libgfortran/generated/transpose_c10.c
18097
===================================================================
18098
--- a/src/libgfortran/generated/transpose_c10.c (.../tags/gcc_4_8_3_release)
18099
+++ b/src/libgfortran/generated/transpose_c10.c (.../branches/gcc-4_8-branch)
18101
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
18102
GFC_DESCRIPTOR_EXTENT(source, 1));
18104
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) ret));
18105
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
18106
+ sizeof (GFC_COMPLEX_10));
18108
} else if (unlikely (compile_options.bounds_check))
18110
Index: libgfortran/generated/maxloc1_16_r8.c
18111
===================================================================
18112
--- a/src/libgfortran/generated/maxloc1_16_r8.c (.../tags/gcc_4_8_3_release)
18113
+++ b/src/libgfortran/generated/maxloc1_16_r8.c (.../branches/gcc-4_8-branch)
18115
retarray->offset = 0;
18116
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18118
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18119
- * extent[rank-1];
18120
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18122
- retarray->base_addr = xmalloc (alloc_size);
18123
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18124
if (alloc_size == 0)
18126
/* Make sure we have a zero-sized array. */
18127
@@ -294,8 +293,7 @@
18131
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18132
- * extent[rank-1];
18133
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18135
retarray->offset = 0;
18136
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18137
@@ -307,7 +305,7 @@
18141
- retarray->base_addr = xmalloc (alloc_size);
18142
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18146
@@ -485,8 +483,7 @@
18147
retarray->offset = 0;
18148
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18150
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18151
- * extent[rank-1];
18152
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18154
if (alloc_size == 0)
18156
@@ -495,7 +492,7 @@
18160
- retarray->base_addr = xmalloc (alloc_size);
18161
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18165
Index: libgfortran/generated/transpose_r4.c
18166
===================================================================
18167
--- a/src/libgfortran/generated/transpose_r4.c (.../tags/gcc_4_8_3_release)
18168
+++ b/src/libgfortran/generated/transpose_r4.c (.../branches/gcc-4_8-branch)
18170
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
18171
GFC_DESCRIPTOR_EXTENT(source, 1));
18173
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) ret));
18174
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
18175
+ sizeof (GFC_REAL_4));
18177
} else if (unlikely (compile_options.bounds_check))
18179
Index: libgfortran/generated/cshift1_4.c
18180
===================================================================
18181
--- a/src/libgfortran/generated/cshift1_4.c (.../tags/gcc_4_8_3_release)
18182
+++ b/src/libgfortran/generated/cshift1_4.c (.../branches/gcc-4_8-branch)
18187
- ret->base_addr = xmalloc (size * arraysize);
18188
+ ret->base_addr = xmallocarray (arraysize, size);
18190
ret->dtype = array->dtype;
18191
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
18192
Index: libgfortran/generated/maxloc0_8_i2.c
18193
===================================================================
18194
--- a/src/libgfortran/generated/maxloc0_8_i2.c (.../tags/gcc_4_8_3_release)
18195
+++ b/src/libgfortran/generated/maxloc0_8_i2.c (.../branches/gcc-4_8-branch)
18197
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18198
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18199
retarray->offset = 0;
18200
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18201
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18205
@@ -199,7 +199,7 @@
18206
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18207
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18208
retarray->offset = 0;
18209
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
18210
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18214
@@ -367,7 +367,7 @@
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_8) * rank);
18219
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
18221
else if (unlikely (compile_options.bounds_check))
18223
Index: libgfortran/generated/count_8_l.c
18224
===================================================================
18225
--- a/src/libgfortran/generated/count_8_l.c (.../tags/gcc_4_8_3_release)
18226
+++ b/src/libgfortran/generated/count_8_l.c (.../branches/gcc-4_8-branch)
18227
@@ -101,8 +101,7 @@
18228
retarray->offset = 0;
18229
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18231
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18232
- * extent[rank-1];
18233
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18235
if (alloc_size == 0)
18237
@@ -111,7 +110,7 @@
18241
- retarray->base_addr = xmalloc (alloc_size);
18242
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18246
Index: libgfortran/generated/in_pack_i4.c
18247
===================================================================
18248
--- a/src/libgfortran/generated/in_pack_i4.c (.../tags/gcc_4_8_3_release)
18249
+++ b/src/libgfortran/generated/in_pack_i4.c (.../branches/gcc-4_8-branch)
18251
return source->base_addr;
18253
/* Allocate storage for the destination. */
18254
- destptr = (GFC_INTEGER_4 *)xmalloc (ssize * sizeof (GFC_INTEGER_4));
18255
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_4));
18257
src = source->base_addr;
18258
stride0 = stride[0];
18259
Index: libgfortran/generated/minloc0_16_i2.c
18260
===================================================================
18261
--- a/src/libgfortran/generated/minloc0_16_i2.c (.../tags/gcc_4_8_3_release)
18262
+++ b/src/libgfortran/generated/minloc0_16_i2.c (.../branches/gcc-4_8-branch)
18264
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18265
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18266
retarray->offset = 0;
18267
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18268
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18272
@@ -199,7 +199,7 @@
18273
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18274
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18275
retarray->offset = 0;
18276
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18277
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18281
@@ -367,7 +367,7 @@
18282
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18283
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18284
retarray->offset = 0;
18285
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18286
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18288
else if (unlikely (compile_options.bounds_check))
18290
Index: libgfortran/generated/minloc1_8_r8.c
18291
===================================================================
18292
--- a/src/libgfortran/generated/minloc1_8_r8.c (.../tags/gcc_4_8_3_release)
18293
+++ b/src/libgfortran/generated/minloc1_8_r8.c (.../branches/gcc-4_8-branch)
18295
retarray->offset = 0;
18296
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18298
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18299
- * extent[rank-1];
18300
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18302
- retarray->base_addr = xmalloc (alloc_size);
18303
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18304
if (alloc_size == 0)
18306
/* Make sure we have a zero-sized array. */
18307
@@ -294,8 +293,7 @@
18311
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18312
- * extent[rank-1];
18313
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18315
retarray->offset = 0;
18316
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18317
@@ -307,7 +305,7 @@
18321
- retarray->base_addr = xmalloc (alloc_size);
18322
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18326
@@ -485,8 +483,7 @@
18327
retarray->offset = 0;
18328
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18330
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18331
- * extent[rank-1];
18332
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18334
if (alloc_size == 0)
18336
@@ -495,7 +492,7 @@
18340
- retarray->base_addr = xmalloc (alloc_size);
18341
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
18345
Index: libgfortran/generated/matmul_c16.c
18346
===================================================================
18347
--- a/src/libgfortran/generated/matmul_c16.c (.../tags/gcc_4_8_3_release)
18348
+++ b/src/libgfortran/generated/matmul_c16.c (.../branches/gcc-4_8-branch)
18349
@@ -124,7 +124,7 @@
18352
retarray->base_addr
18353
- = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) retarray));
18354
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_16));
18355
retarray->offset = 0;
18357
else if (unlikely (compile_options.bounds_check))
18358
Index: libgfortran/generated/minval_i1.c
18359
===================================================================
18360
--- a/src/libgfortran/generated/minval_i1.c (.../tags/gcc_4_8_3_release)
18361
+++ b/src/libgfortran/generated/minval_i1.c (.../branches/gcc-4_8-branch)
18363
retarray->offset = 0;
18364
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18366
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18367
- * extent[rank-1];
18368
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18370
- retarray->base_addr = xmalloc (alloc_size);
18371
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
18372
if (alloc_size == 0)
18374
/* Make sure we have a zero-sized array. */
18375
@@ -286,8 +285,7 @@
18379
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18380
- * extent[rank-1];
18381
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18383
retarray->offset = 0;
18384
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18385
@@ -299,7 +297,7 @@
18389
- retarray->base_addr = xmalloc (alloc_size);
18390
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
18394
@@ -472,8 +470,7 @@
18395
retarray->offset = 0;
18396
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18398
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18399
- * extent[rank-1];
18400
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18402
if (alloc_size == 0)
18404
@@ -482,7 +479,7 @@
18408
- retarray->base_addr = xmalloc (alloc_size);
18409
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
18413
Index: libgfortran/generated/shape_i16.c
18414
===================================================================
18415
--- a/src/libgfortran/generated/shape_i16.c (.../tags/gcc_4_8_3_release)
18416
+++ b/src/libgfortran/generated/shape_i16.c (.../branches/gcc-4_8-branch)
18419
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
18421
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18422
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18425
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
18426
Index: libgfortran/generated/iany_i4.c
18427
===================================================================
18428
--- a/src/libgfortran/generated/iany_i4.c (.../tags/gcc_4_8_3_release)
18429
+++ b/src/libgfortran/generated/iany_i4.c (.../branches/gcc-4_8-branch)
18431
retarray->offset = 0;
18432
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18434
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18435
- * extent[rank-1];
18436
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18438
- retarray->base_addr = xmalloc (alloc_size);
18439
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18440
if (alloc_size == 0)
18442
/* Make sure we have a zero-sized array. */
18443
@@ -272,8 +271,7 @@
18447
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18448
- * extent[rank-1];
18449
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18451
retarray->offset = 0;
18452
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18453
@@ -285,7 +283,7 @@
18457
- retarray->base_addr = xmalloc (alloc_size);
18458
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18462
@@ -430,8 +428,7 @@
18463
retarray->offset = 0;
18464
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18466
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18467
- * extent[rank-1];
18468
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18470
if (alloc_size == 0)
18472
@@ -440,7 +437,7 @@
18476
- retarray->base_addr = xmalloc (alloc_size);
18477
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18481
Index: libgfortran/generated/minloc0_16_r16.c
18482
===================================================================
18483
--- a/src/libgfortran/generated/minloc0_16_r16.c (.../tags/gcc_4_8_3_release)
18484
+++ b/src/libgfortran/generated/minloc0_16_r16.c (.../branches/gcc-4_8-branch)
18486
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18487
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18488
retarray->offset = 0;
18489
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18490
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18494
@@ -199,7 +199,7 @@
18495
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18496
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18497
retarray->offset = 0;
18498
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18499
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18503
@@ -367,7 +367,7 @@
18504
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18505
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18506
retarray->offset = 0;
18507
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
18508
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
18510
else if (unlikely (compile_options.bounds_check))
18512
Index: libgfortran/generated/product_i16.c
18513
===================================================================
18514
--- a/src/libgfortran/generated/product_i16.c (.../tags/gcc_4_8_3_release)
18515
+++ b/src/libgfortran/generated/product_i16.c (.../branches/gcc-4_8-branch)
18517
retarray->offset = 0;
18518
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18520
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18521
- * extent[rank-1];
18522
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18524
- retarray->base_addr = xmalloc (alloc_size);
18525
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18526
if (alloc_size == 0)
18528
/* Make sure we have a zero-sized array. */
18529
@@ -272,8 +271,7 @@
18533
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18534
- * extent[rank-1];
18535
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18537
retarray->offset = 0;
18538
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18539
@@ -285,7 +283,7 @@
18543
- retarray->base_addr = xmalloc (alloc_size);
18544
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18548
@@ -430,8 +428,7 @@
18549
retarray->offset = 0;
18550
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18552
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18553
- * extent[rank-1];
18554
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18556
if (alloc_size == 0)
18558
@@ -440,7 +437,7 @@
18562
- retarray->base_addr = xmalloc (alloc_size);
18563
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
18567
Index: libgfortran/generated/unpack_i1.c
18568
===================================================================
18569
--- a/src/libgfortran/generated/unpack_i1.c (.../tags/gcc_4_8_3_release)
18570
+++ b/src/libgfortran/generated/unpack_i1.c (.../branches/gcc-4_8-branch)
18575
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
18576
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
18580
@@ -244,7 +244,7 @@
18584
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_1));
18585
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_1));
18589
Index: libgfortran/generated/minloc0_4_i4.c
18590
===================================================================
18591
--- a/src/libgfortran/generated/minloc0_4_i4.c (.../tags/gcc_4_8_3_release)
18592
+++ b/src/libgfortran/generated/minloc0_4_i4.c (.../branches/gcc-4_8-branch)
18594
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18595
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18596
retarray->offset = 0;
18597
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18598
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18602
@@ -199,7 +199,7 @@
18603
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
18604
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18605
retarray->offset = 0;
18606
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18607
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18611
@@ -367,7 +367,7 @@
18612
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
18613
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
18614
retarray->offset = 0;
18615
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
18616
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
18618
else if (unlikely (compile_options.bounds_check))
18620
Index: libgfortran/generated/matmul_i1.c
18621
===================================================================
18622
--- a/src/libgfortran/generated/matmul_i1.c (.../tags/gcc_4_8_3_release)
18623
+++ b/src/libgfortran/generated/matmul_i1.c (.../branches/gcc-4_8-branch)
18624
@@ -124,7 +124,7 @@
18627
retarray->base_addr
18628
- = xmalloc (sizeof (GFC_INTEGER_1) * size0 ((array_t *) retarray));
18629
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_1));
18630
retarray->offset = 0;
18632
else if (unlikely (compile_options.bounds_check))
18633
Index: libgfortran/generated/minval_r4.c
18634
===================================================================
18635
--- a/src/libgfortran/generated/minval_r4.c (.../tags/gcc_4_8_3_release)
18636
+++ b/src/libgfortran/generated/minval_r4.c (.../branches/gcc-4_8-branch)
18638
retarray->offset = 0;
18639
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18641
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18642
- * extent[rank-1];
18643
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18645
- retarray->base_addr = xmalloc (alloc_size);
18646
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
18647
if (alloc_size == 0)
18649
/* Make sure we have a zero-sized array. */
18650
@@ -286,8 +285,7 @@
18654
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18655
- * extent[rank-1];
18656
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18658
retarray->offset = 0;
18659
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18660
@@ -299,7 +297,7 @@
18664
- retarray->base_addr = xmalloc (alloc_size);
18665
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
18669
@@ -472,8 +470,7 @@
18670
retarray->offset = 0;
18671
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18673
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18674
- * extent[rank-1];
18675
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18677
if (alloc_size == 0)
18679
@@ -482,7 +479,7 @@
18683
- retarray->base_addr = xmalloc (alloc_size);
18684
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
18688
Index: libgfortran/generated/spread_i16.c
18689
===================================================================
18690
--- a/src/libgfortran/generated/spread_i16.c (.../tags/gcc_4_8_3_release)
18691
+++ b/src/libgfortran/generated/spread_i16.c (.../branches/gcc-4_8-branch)
18692
@@ -101,8 +101,8 @@
18696
- /* xmalloc allocates a single byte for zero size. */
18697
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_16));
18698
+ /* xmallocarray allocates a single byte for zero size. */
18699
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_16));
18703
@@ -244,7 +244,7 @@
18705
if (ret->base_addr == NULL)
18707
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_16));
18708
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_16));
18710
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
18712
Index: libgfortran/generated/sum_i4.c
18713
===================================================================
18714
--- a/src/libgfortran/generated/sum_i4.c (.../tags/gcc_4_8_3_release)
18715
+++ b/src/libgfortran/generated/sum_i4.c (.../branches/gcc-4_8-branch)
18717
retarray->offset = 0;
18718
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18720
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18721
- * extent[rank-1];
18722
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18724
- retarray->base_addr = xmalloc (alloc_size);
18725
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18726
if (alloc_size == 0)
18728
/* Make sure we have a zero-sized array. */
18729
@@ -272,8 +271,7 @@
18733
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18734
- * extent[rank-1];
18735
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18737
retarray->offset = 0;
18738
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18739
@@ -285,7 +283,7 @@
18743
- retarray->base_addr = xmalloc (alloc_size);
18744
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18748
@@ -430,8 +428,7 @@
18749
retarray->offset = 0;
18750
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18752
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18753
- * extent[rank-1];
18754
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18756
if (alloc_size == 0)
18758
@@ -440,7 +437,7 @@
18762
- retarray->base_addr = xmalloc (alloc_size);
18763
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18767
Index: libgfortran/generated/unpack_r10.c
18768
===================================================================
18769
--- a/src/libgfortran/generated/unpack_r10.c (.../tags/gcc_4_8_3_release)
18770
+++ b/src/libgfortran/generated/unpack_r10.c (.../branches/gcc-4_8-branch)
18775
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
18776
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
18780
@@ -244,7 +244,7 @@
18784
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_10));
18785
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_10));
18789
Index: libgfortran/generated/bessel_r16.c
18790
===================================================================
18791
--- a/src/libgfortran/generated/bessel_r16.c (.../tags/gcc_4_8_3_release)
18792
+++ b/src/libgfortran/generated/bessel_r16.c (.../branches/gcc-4_8-branch)
18795
size_t size = n2 < n1 ? 0 : n2-n1+1;
18796
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
18797
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
18798
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
18802
@@ -126,7 +126,7 @@
18804
size_t size = n2 < n1 ? 0 : n2-n1+1;
18805
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
18806
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
18807
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
18811
@@ -166,7 +166,7 @@
18813
x2rev = GFC_REAL_16_LITERAL(2.)/x;
18815
- for (i = 2; i <= n1+n2; i++)
18816
+ for (i = 2; i <= n2 - n1; i++)
18818
#if defined(GFC_REAL_16_INFINITY)
18819
if (unlikely (last2 == -GFC_REAL_16_INFINITY))
18820
Index: libgfortran/generated/norm2_r8.c
18821
===================================================================
18822
--- a/src/libgfortran/generated/norm2_r8.c (.../tags/gcc_4_8_3_release)
18823
+++ b/src/libgfortran/generated/norm2_r8.c (.../branches/gcc-4_8-branch)
18824
@@ -101,10 +101,9 @@
18825
retarray->offset = 0;
18826
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18828
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18829
- * extent[rank-1];
18830
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18832
- retarray->base_addr = xmalloc (alloc_size);
18833
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
18834
if (alloc_size == 0)
18836
/* Make sure we have a zero-sized array. */
18837
Index: libgfortran/generated/spread_i4.c
18838
===================================================================
18839
--- a/src/libgfortran/generated/spread_i4.c (.../tags/gcc_4_8_3_release)
18840
+++ b/src/libgfortran/generated/spread_i4.c (.../branches/gcc-4_8-branch)
18841
@@ -101,8 +101,8 @@
18845
- /* xmalloc allocates a single byte for zero size. */
18846
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_4));
18847
+ /* xmallocarray allocates a single byte for zero size. */
18848
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_4));
18852
@@ -244,7 +244,7 @@
18854
if (ret->base_addr == NULL)
18856
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_4));
18857
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_4));
18859
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
18861
Index: libgfortran/generated/eoshift3_8.c
18862
===================================================================
18863
--- a/src/libgfortran/generated/eoshift3_8.c (.../tags/gcc_4_8_3_release)
18864
+++ b/src/libgfortran/generated/eoshift3_8.c (.../branches/gcc-4_8-branch)
18869
- ret->base_addr = xmalloc (size * arraysize);
18870
+ ret->base_addr = xmallocarray (arraysize, size);
18872
ret->dtype = array->dtype;
18873
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
18874
@@ -107,8 +107,8 @@
18875
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
18878
- /* xmalloc allocates a single byte for zero size. */
18879
- ret->base_addr = xmalloc (size * arraysize);
18880
+ /* xmallocarray allocates a single byte for zero size. */
18881
+ ret->base_addr = xmallocarray (arraysize, size);
18884
else if (unlikely (compile_options.bounds_check))
18885
Index: libgfortran/generated/minloc1_4_i1.c
18886
===================================================================
18887
--- a/src/libgfortran/generated/minloc1_4_i1.c (.../tags/gcc_4_8_3_release)
18888
+++ b/src/libgfortran/generated/minloc1_4_i1.c (.../branches/gcc-4_8-branch)
18890
retarray->offset = 0;
18891
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18893
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18894
- * extent[rank-1];
18895
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18897
- retarray->base_addr = xmalloc (alloc_size);
18898
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18899
if (alloc_size == 0)
18901
/* Make sure we have a zero-sized array. */
18902
@@ -294,8 +293,7 @@
18906
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18907
- * extent[rank-1];
18908
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18910
retarray->offset = 0;
18911
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18912
@@ -307,7 +305,7 @@
18916
- retarray->base_addr = xmalloc (alloc_size);
18917
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18921
@@ -485,8 +483,7 @@
18922
retarray->offset = 0;
18923
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18925
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18926
- * extent[rank-1];
18927
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18929
if (alloc_size == 0)
18931
@@ -495,7 +492,7 @@
18935
- retarray->base_addr = xmalloc (alloc_size);
18936
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
18940
Index: libgfortran/generated/minval_i2.c
18941
===================================================================
18942
--- a/src/libgfortran/generated/minval_i2.c (.../tags/gcc_4_8_3_release)
18943
+++ b/src/libgfortran/generated/minval_i2.c (.../branches/gcc-4_8-branch)
18945
retarray->offset = 0;
18946
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18948
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18949
- * extent[rank-1];
18950
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18952
- retarray->base_addr = xmalloc (alloc_size);
18953
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18954
if (alloc_size == 0)
18956
/* Make sure we have a zero-sized array. */
18957
@@ -286,8 +285,7 @@
18961
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18962
- * extent[rank-1];
18963
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18965
retarray->offset = 0;
18966
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18967
@@ -299,7 +297,7 @@
18971
- retarray->base_addr = xmalloc (alloc_size);
18972
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18976
@@ -472,8 +470,7 @@
18977
retarray->offset = 0;
18978
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
18980
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
18981
- * extent[rank-1];
18982
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
18984
if (alloc_size == 0)
18986
@@ -482,7 +479,7 @@
18990
- retarray->base_addr = xmalloc (alloc_size);
18991
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
18995
Index: libgfortran/generated/bessel_r8.c
18996
===================================================================
18997
--- a/src/libgfortran/generated/bessel_r8.c (.../tags/gcc_4_8_3_release)
18998
+++ b/src/libgfortran/generated/bessel_r8.c (.../branches/gcc-4_8-branch)
19001
size_t size = n2 < n1 ? 0 : n2-n1+1;
19002
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
19003
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
19004
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
19008
@@ -122,7 +122,7 @@
19010
size_t size = n2 < n1 ? 0 : n2-n1+1;
19011
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
19012
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
19013
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
19017
@@ -162,7 +162,7 @@
19019
x2rev = GFC_REAL_8_LITERAL(2.)/x;
19021
- for (i = 2; i <= n1+n2; i++)
19022
+ for (i = 2; i <= n2 - n1; i++)
19024
#if defined(GFC_REAL_8_INFINITY)
19025
if (unlikely (last2 == -GFC_REAL_8_INFINITY))
19026
Index: libgfortran/generated/unpack_r4.c
19027
===================================================================
19028
--- a/src/libgfortran/generated/unpack_r4.c (.../tags/gcc_4_8_3_release)
19029
+++ b/src/libgfortran/generated/unpack_r4.c (.../branches/gcc-4_8-branch)
19034
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
19035
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
19039
@@ -244,7 +244,7 @@
19043
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_4));
19044
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_4));
19048
Index: libgfortran/generated/product_r8.c
19049
===================================================================
19050
--- a/src/libgfortran/generated/product_r8.c (.../tags/gcc_4_8_3_release)
19051
+++ b/src/libgfortran/generated/product_r8.c (.../branches/gcc-4_8-branch)
19053
retarray->offset = 0;
19054
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19056
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19057
- * extent[rank-1];
19058
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19060
- retarray->base_addr = xmalloc (alloc_size);
19061
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19062
if (alloc_size == 0)
19064
/* Make sure we have a zero-sized array. */
19065
@@ -272,8 +271,7 @@
19069
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19070
- * extent[rank-1];
19071
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19073
retarray->offset = 0;
19074
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19075
@@ -285,7 +283,7 @@
19079
- retarray->base_addr = xmalloc (alloc_size);
19080
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19084
@@ -430,8 +428,7 @@
19085
retarray->offset = 0;
19086
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19088
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19089
- * extent[rank-1];
19090
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19092
if (alloc_size == 0)
19094
@@ -440,7 +437,7 @@
19098
- retarray->base_addr = xmalloc (alloc_size);
19099
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19103
Index: libgfortran/generated/matmul_r4.c
19104
===================================================================
19105
--- a/src/libgfortran/generated/matmul_r4.c (.../tags/gcc_4_8_3_release)
19106
+++ b/src/libgfortran/generated/matmul_r4.c (.../branches/gcc-4_8-branch)
19107
@@ -124,7 +124,7 @@
19110
retarray->base_addr
19111
- = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) retarray));
19112
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_4));
19113
retarray->offset = 0;
19115
else if (unlikely (compile_options.bounds_check))
19116
Index: libgfortran/generated/unpack_i2.c
19117
===================================================================
19118
--- a/src/libgfortran/generated/unpack_i2.c (.../tags/gcc_4_8_3_release)
19119
+++ b/src/libgfortran/generated/unpack_i2.c (.../branches/gcc-4_8-branch)
19124
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
19125
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
19129
@@ -244,7 +244,7 @@
19133
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_2));
19134
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_2));
19138
Index: libgfortran/generated/in_pack_r8.c
19139
===================================================================
19140
--- a/src/libgfortran/generated/in_pack_r8.c (.../tags/gcc_4_8_3_release)
19141
+++ b/src/libgfortran/generated/in_pack_r8.c (.../branches/gcc-4_8-branch)
19143
return source->base_addr;
19145
/* Allocate storage for the destination. */
19146
- destptr = (GFC_REAL_8 *)xmalloc (ssize * sizeof (GFC_REAL_8));
19147
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_8));
19149
src = source->base_addr;
19150
stride0 = stride[0];
19151
Index: libgfortran/generated/maxloc1_4_r16.c
19152
===================================================================
19153
--- a/src/libgfortran/generated/maxloc1_4_r16.c (.../tags/gcc_4_8_3_release)
19154
+++ b/src/libgfortran/generated/maxloc1_4_r16.c (.../branches/gcc-4_8-branch)
19156
retarray->offset = 0;
19157
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19159
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19160
- * extent[rank-1];
19161
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19163
- retarray->base_addr = xmalloc (alloc_size);
19164
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19165
if (alloc_size == 0)
19167
/* Make sure we have a zero-sized array. */
19168
@@ -294,8 +293,7 @@
19172
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19173
- * extent[rank-1];
19174
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19176
retarray->offset = 0;
19177
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19178
@@ -307,7 +305,7 @@
19182
- retarray->base_addr = xmalloc (alloc_size);
19183
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19187
@@ -485,8 +483,7 @@
19188
retarray->offset = 0;
19189
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19191
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19192
- * extent[rank-1];
19193
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19195
if (alloc_size == 0)
19197
@@ -495,7 +492,7 @@
19201
- retarray->base_addr = xmalloc (alloc_size);
19202
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19206
Index: libgfortran/generated/minloc0_8_r16.c
19207
===================================================================
19208
--- a/src/libgfortran/generated/minloc0_8_r16.c (.../tags/gcc_4_8_3_release)
19209
+++ b/src/libgfortran/generated/minloc0_8_r16.c (.../branches/gcc-4_8-branch)
19211
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19212
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19213
retarray->offset = 0;
19214
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19215
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19219
@@ -199,7 +199,7 @@
19220
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19221
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19222
retarray->offset = 0;
19223
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19224
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19228
@@ -367,7 +367,7 @@
19229
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19230
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19231
retarray->offset = 0;
19232
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19233
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19235
else if (unlikely (compile_options.bounds_check))
19237
Index: libgfortran/generated/reshape_c8.c
19238
===================================================================
19239
--- a/src/libgfortran/generated/reshape_c8.c (.../tags/gcc_4_8_3_release)
19240
+++ b/src/libgfortran/generated/reshape_c8.c (.../branches/gcc-4_8-branch)
19241
@@ -111,11 +111,11 @@
19244
if (unlikely (rs < 1))
19248
- alloc_size = rs * sizeof (GFC_COMPLEX_8);
19251
- ret->base_addr = xmalloc (alloc_size);
19252
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
19253
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
19256
Index: libgfortran/generated/iparity_i8.c
19257
===================================================================
19258
--- a/src/libgfortran/generated/iparity_i8.c (.../tags/gcc_4_8_3_release)
19259
+++ b/src/libgfortran/generated/iparity_i8.c (.../branches/gcc-4_8-branch)
19261
retarray->offset = 0;
19262
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19264
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19265
- * extent[rank-1];
19266
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19268
- retarray->base_addr = xmalloc (alloc_size);
19269
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19270
if (alloc_size == 0)
19272
/* Make sure we have a zero-sized array. */
19273
@@ -272,8 +271,7 @@
19277
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19278
- * extent[rank-1];
19279
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19281
retarray->offset = 0;
19282
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19283
@@ -285,7 +283,7 @@
19287
- retarray->base_addr = xmalloc (alloc_size);
19288
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19292
@@ -430,8 +428,7 @@
19293
retarray->offset = 0;
19294
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19296
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19297
- * extent[rank-1];
19298
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19300
if (alloc_size == 0)
19302
@@ -440,7 +437,7 @@
19306
- retarray->base_addr = xmalloc (alloc_size);
19307
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19311
Index: libgfortran/generated/count_1_l.c
19312
===================================================================
19313
--- a/src/libgfortran/generated/count_1_l.c (.../tags/gcc_4_8_3_release)
19314
+++ b/src/libgfortran/generated/count_1_l.c (.../branches/gcc-4_8-branch)
19315
@@ -101,8 +101,7 @@
19316
retarray->offset = 0;
19317
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19319
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19320
- * extent[rank-1];
19321
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19323
if (alloc_size == 0)
19325
@@ -111,7 +110,7 @@
19329
- retarray->base_addr = xmalloc (alloc_size);
19330
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
19334
Index: libgfortran/generated/maxloc0_8_i4.c
19335
===================================================================
19336
--- a/src/libgfortran/generated/maxloc0_8_i4.c (.../tags/gcc_4_8_3_release)
19337
+++ b/src/libgfortran/generated/maxloc0_8_i4.c (.../branches/gcc-4_8-branch)
19339
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19340
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19341
retarray->offset = 0;
19342
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19343
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19347
@@ -199,7 +199,7 @@
19348
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19349
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19350
retarray->offset = 0;
19351
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19352
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19356
@@ -367,7 +367,7 @@
19357
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19358
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19359
retarray->offset = 0;
19360
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
19361
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
19363
else if (unlikely (compile_options.bounds_check))
19365
Index: libgfortran/generated/matmul_i2.c
19366
===================================================================
19367
--- a/src/libgfortran/generated/matmul_i2.c (.../tags/gcc_4_8_3_release)
19368
+++ b/src/libgfortran/generated/matmul_i2.c (.../branches/gcc-4_8-branch)
19369
@@ -124,7 +124,7 @@
19372
retarray->base_addr
19373
- = xmalloc (sizeof (GFC_INTEGER_2) * size0 ((array_t *) retarray));
19374
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_2));
19375
retarray->offset = 0;
19377
else if (unlikely (compile_options.bounds_check))
19378
Index: libgfortran/generated/minloc1_4_r4.c
19379
===================================================================
19380
--- a/src/libgfortran/generated/minloc1_4_r4.c (.../tags/gcc_4_8_3_release)
19381
+++ b/src/libgfortran/generated/minloc1_4_r4.c (.../branches/gcc-4_8-branch)
19383
retarray->offset = 0;
19384
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19386
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19387
- * extent[rank-1];
19388
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19390
- retarray->base_addr = xmalloc (alloc_size);
19391
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19392
if (alloc_size == 0)
19394
/* Make sure we have a zero-sized array. */
19395
@@ -294,8 +293,7 @@
19399
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19400
- * extent[rank-1];
19401
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19403
retarray->offset = 0;
19404
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19405
@@ -307,7 +305,7 @@
19409
- retarray->base_addr = xmalloc (alloc_size);
19410
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19414
@@ -485,8 +483,7 @@
19415
retarray->offset = 0;
19416
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19418
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19419
- * extent[rank-1];
19420
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19422
if (alloc_size == 0)
19424
@@ -495,7 +492,7 @@
19428
- retarray->base_addr = xmalloc (alloc_size);
19429
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19433
Index: libgfortran/generated/transpose_i16.c
19434
===================================================================
19435
--- a/src/libgfortran/generated/transpose_i16.c (.../tags/gcc_4_8_3_release)
19436
+++ b/src/libgfortran/generated/transpose_i16.c (.../branches/gcc-4_8-branch)
19438
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
19439
GFC_DESCRIPTOR_EXTENT(source, 1));
19441
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) ret));
19442
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
19443
+ sizeof (GFC_INTEGER_16));
19445
} else if (unlikely (compile_options.bounds_check))
19447
Index: libgfortran/generated/minloc0_16_i4.c
19448
===================================================================
19449
--- a/src/libgfortran/generated/minloc0_16_i4.c (.../tags/gcc_4_8_3_release)
19450
+++ b/src/libgfortran/generated/minloc0_16_i4.c (.../branches/gcc-4_8-branch)
19452
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19453
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19454
retarray->offset = 0;
19455
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19456
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19460
@@ -199,7 +199,7 @@
19461
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19462
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19463
retarray->offset = 0;
19464
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19465
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19469
@@ -367,7 +367,7 @@
19470
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19471
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19472
retarray->offset = 0;
19473
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
19474
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
19476
else if (unlikely (compile_options.bounds_check))
19478
Index: libgfortran/generated/transpose_i4.c
19479
===================================================================
19480
--- a/src/libgfortran/generated/transpose_i4.c (.../tags/gcc_4_8_3_release)
19481
+++ b/src/libgfortran/generated/transpose_i4.c (.../branches/gcc-4_8-branch)
19483
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
19484
GFC_DESCRIPTOR_EXTENT(source, 1));
19486
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) ret));
19487
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
19488
+ sizeof (GFC_INTEGER_4));
19490
} else if (unlikely (compile_options.bounds_check))
19492
Index: libgfortran/generated/maxloc1_16_i8.c
19493
===================================================================
19494
--- a/src/libgfortran/generated/maxloc1_16_i8.c (.../tags/gcc_4_8_3_release)
19495
+++ b/src/libgfortran/generated/maxloc1_16_i8.c (.../branches/gcc-4_8-branch)
19497
retarray->offset = 0;
19498
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19500
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19501
- * extent[rank-1];
19502
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19504
- retarray->base_addr = xmalloc (alloc_size);
19505
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19506
if (alloc_size == 0)
19508
/* Make sure we have a zero-sized array. */
19509
@@ -294,8 +293,7 @@
19513
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19514
- * extent[rank-1];
19515
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19517
retarray->offset = 0;
19518
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19519
@@ -307,7 +305,7 @@
19523
- retarray->base_addr = xmalloc (alloc_size);
19524
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19528
@@ -485,8 +483,7 @@
19529
retarray->offset = 0;
19530
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19532
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19533
- * extent[rank-1];
19534
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19536
if (alloc_size == 0)
19538
@@ -495,7 +492,7 @@
19542
- retarray->base_addr = xmalloc (alloc_size);
19543
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19547
Index: libgfortran/generated/minloc1_4_i2.c
19548
===================================================================
19549
--- a/src/libgfortran/generated/minloc1_4_i2.c (.../tags/gcc_4_8_3_release)
19550
+++ b/src/libgfortran/generated/minloc1_4_i2.c (.../branches/gcc-4_8-branch)
19552
retarray->offset = 0;
19553
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19555
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19556
- * extent[rank-1];
19557
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19559
- retarray->base_addr = xmalloc (alloc_size);
19560
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19561
if (alloc_size == 0)
19563
/* Make sure we have a zero-sized array. */
19564
@@ -294,8 +293,7 @@
19568
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19569
- * extent[rank-1];
19570
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19572
retarray->offset = 0;
19573
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19574
@@ -307,7 +305,7 @@
19578
- retarray->base_addr = xmalloc (alloc_size);
19579
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19583
@@ -485,8 +483,7 @@
19584
retarray->offset = 0;
19585
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19587
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19588
- * extent[rank-1];
19589
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19591
if (alloc_size == 0)
19593
@@ -495,7 +492,7 @@
19597
- retarray->base_addr = xmalloc (alloc_size);
19598
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
19602
Index: libgfortran/generated/matmul_l16.c
19603
===================================================================
19604
--- a/src/libgfortran/generated/matmul_l16.c (.../tags/gcc_4_8_3_release)
19605
+++ b/src/libgfortran/generated/matmul_l16.c (.../branches/gcc-4_8-branch)
19609
retarray->base_addr
19610
- = xmalloc (sizeof (GFC_LOGICAL_16) * size0 ((array_t *) retarray));
19611
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_16));
19612
retarray->offset = 0;
19614
else if (unlikely (compile_options.bounds_check))
19615
Index: libgfortran/generated/maxloc1_8_i1.c
19616
===================================================================
19617
--- a/src/libgfortran/generated/maxloc1_8_i1.c (.../tags/gcc_4_8_3_release)
19618
+++ b/src/libgfortran/generated/maxloc1_8_i1.c (.../branches/gcc-4_8-branch)
19620
retarray->offset = 0;
19621
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19623
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19624
- * extent[rank-1];
19625
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19627
- retarray->base_addr = xmalloc (alloc_size);
19628
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19629
if (alloc_size == 0)
19631
/* Make sure we have a zero-sized array. */
19632
@@ -294,8 +293,7 @@
19636
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19637
- * extent[rank-1];
19638
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19640
retarray->offset = 0;
19641
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19642
@@ -307,7 +305,7 @@
19646
- retarray->base_addr = xmalloc (alloc_size);
19647
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19651
@@ -485,8 +483,7 @@
19652
retarray->offset = 0;
19653
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19655
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19656
- * extent[rank-1];
19657
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19659
if (alloc_size == 0)
19661
@@ -495,7 +492,7 @@
19665
- retarray->base_addr = xmalloc (alloc_size);
19666
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19670
Index: libgfortran/generated/minloc1_8_i8.c
19671
===================================================================
19672
--- a/src/libgfortran/generated/minloc1_8_i8.c (.../tags/gcc_4_8_3_release)
19673
+++ b/src/libgfortran/generated/minloc1_8_i8.c (.../branches/gcc-4_8-branch)
19675
retarray->offset = 0;
19676
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19678
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19679
- * extent[rank-1];
19680
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19682
- retarray->base_addr = xmalloc (alloc_size);
19683
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19684
if (alloc_size == 0)
19686
/* Make sure we have a zero-sized array. */
19687
@@ -294,8 +293,7 @@
19691
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19692
- * extent[rank-1];
19693
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19695
retarray->offset = 0;
19696
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19697
@@ -307,7 +305,7 @@
19701
- retarray->base_addr = xmalloc (alloc_size);
19702
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19706
@@ -485,8 +483,7 @@
19707
retarray->offset = 0;
19708
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19710
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19711
- * extent[rank-1];
19712
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19714
if (alloc_size == 0)
19716
@@ -495,7 +492,7 @@
19720
- retarray->base_addr = xmalloc (alloc_size);
19721
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19725
Index: libgfortran/generated/minloc0_4_r8.c
19726
===================================================================
19727
--- a/src/libgfortran/generated/minloc0_4_r8.c (.../tags/gcc_4_8_3_release)
19728
+++ b/src/libgfortran/generated/minloc0_4_r8.c (.../branches/gcc-4_8-branch)
19730
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19731
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19732
retarray->offset = 0;
19733
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19734
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19738
@@ -199,7 +199,7 @@
19739
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
19740
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19741
retarray->offset = 0;
19742
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19743
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19747
@@ -367,7 +367,7 @@
19748
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
19749
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
19750
retarray->offset = 0;
19751
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
19752
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
19754
else if (unlikely (compile_options.bounds_check))
19756
Index: libgfortran/generated/product_r16.c
19757
===================================================================
19758
--- a/src/libgfortran/generated/product_r16.c (.../tags/gcc_4_8_3_release)
19759
+++ b/src/libgfortran/generated/product_r16.c (.../branches/gcc-4_8-branch)
19761
retarray->offset = 0;
19762
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19764
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19765
- * extent[rank-1];
19766
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19768
- retarray->base_addr = xmalloc (alloc_size);
19769
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
19770
if (alloc_size == 0)
19772
/* Make sure we have a zero-sized array. */
19773
@@ -272,8 +271,7 @@
19777
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19778
- * extent[rank-1];
19779
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19781
retarray->offset = 0;
19782
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19783
@@ -285,7 +283,7 @@
19787
- retarray->base_addr = xmalloc (alloc_size);
19788
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
19792
@@ -430,8 +428,7 @@
19793
retarray->offset = 0;
19794
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19796
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19797
- * extent[rank-1];
19798
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19800
if (alloc_size == 0)
19802
@@ -440,7 +437,7 @@
19806
- retarray->base_addr = xmalloc (alloc_size);
19807
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
19811
Index: libgfortran/generated/sum_r8.c
19812
===================================================================
19813
--- a/src/libgfortran/generated/sum_r8.c (.../tags/gcc_4_8_3_release)
19814
+++ b/src/libgfortran/generated/sum_r8.c (.../branches/gcc-4_8-branch)
19816
retarray->offset = 0;
19817
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19819
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19820
- * extent[rank-1];
19821
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19823
- retarray->base_addr = xmalloc (alloc_size);
19824
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19825
if (alloc_size == 0)
19827
/* Make sure we have a zero-sized array. */
19828
@@ -272,8 +271,7 @@
19832
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19833
- * extent[rank-1];
19834
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19836
retarray->offset = 0;
19837
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19838
@@ -285,7 +283,7 @@
19842
- retarray->base_addr = xmalloc (alloc_size);
19843
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19847
@@ -430,8 +428,7 @@
19848
retarray->offset = 0;
19849
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19851
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19852
- * extent[rank-1];
19853
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19855
if (alloc_size == 0)
19857
@@ -440,7 +437,7 @@
19861
- retarray->base_addr = xmalloc (alloc_size);
19862
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
19866
Index: libgfortran/generated/norm2_r10.c
19867
===================================================================
19868
--- a/src/libgfortran/generated/norm2_r10.c (.../tags/gcc_4_8_3_release)
19869
+++ b/src/libgfortran/generated/norm2_r10.c (.../branches/gcc-4_8-branch)
19870
@@ -101,10 +101,9 @@
19871
retarray->offset = 0;
19872
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19874
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19875
- * extent[rank-1];
19876
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19878
- retarray->base_addr = xmalloc (alloc_size);
19879
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
19880
if (alloc_size == 0)
19882
/* Make sure we have a zero-sized array. */
19883
Index: libgfortran/generated/unpack_c10.c
19884
===================================================================
19885
--- a/src/libgfortran/generated/unpack_c10.c (.../tags/gcc_4_8_3_release)
19886
+++ b/src/libgfortran/generated/unpack_c10.c (.../branches/gcc-4_8-branch)
19891
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
19892
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
19896
@@ -244,7 +244,7 @@
19900
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_10));
19901
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_10));
19905
Index: libgfortran/generated/spread_r8.c
19906
===================================================================
19907
--- a/src/libgfortran/generated/spread_r8.c (.../tags/gcc_4_8_3_release)
19908
+++ b/src/libgfortran/generated/spread_r8.c (.../branches/gcc-4_8-branch)
19909
@@ -101,8 +101,8 @@
19913
- /* xmalloc allocates a single byte for zero size. */
19914
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_8));
19915
+ /* xmallocarray allocates a single byte for zero size. */
19916
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_8));
19920
@@ -244,7 +244,7 @@
19922
if (ret->base_addr == NULL)
19924
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_8));
19925
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_8));
19927
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
19929
Index: libgfortran/generated/minloc1_16_i16.c
19930
===================================================================
19931
--- a/src/libgfortran/generated/minloc1_16_i16.c (.../tags/gcc_4_8_3_release)
19932
+++ b/src/libgfortran/generated/minloc1_16_i16.c (.../branches/gcc-4_8-branch)
19934
retarray->offset = 0;
19935
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19937
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19938
- * extent[rank-1];
19939
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19941
- retarray->base_addr = xmalloc (alloc_size);
19942
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19943
if (alloc_size == 0)
19945
/* Make sure we have a zero-sized array. */
19946
@@ -294,8 +293,7 @@
19950
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19951
- * extent[rank-1];
19952
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19954
retarray->offset = 0;
19955
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19956
@@ -307,7 +305,7 @@
19960
- retarray->base_addr = xmalloc (alloc_size);
19961
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19965
@@ -485,8 +483,7 @@
19966
retarray->offset = 0;
19967
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19969
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19970
- * extent[rank-1];
19971
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19973
if (alloc_size == 0)
19975
@@ -495,7 +492,7 @@
19979
- retarray->base_addr = xmalloc (alloc_size);
19980
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
19984
Index: libgfortran/generated/maxloc1_8_r4.c
19985
===================================================================
19986
--- a/src/libgfortran/generated/maxloc1_8_r4.c (.../tags/gcc_4_8_3_release)
19987
+++ b/src/libgfortran/generated/maxloc1_8_r4.c (.../branches/gcc-4_8-branch)
19989
retarray->offset = 0;
19990
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
19992
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
19993
- * extent[rank-1];
19994
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
19996
- retarray->base_addr = xmalloc (alloc_size);
19997
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
19998
if (alloc_size == 0)
20000
/* Make sure we have a zero-sized array. */
20001
@@ -294,8 +293,7 @@
20005
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20006
- * extent[rank-1];
20007
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20009
retarray->offset = 0;
20010
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20011
@@ -307,7 +305,7 @@
20015
- retarray->base_addr = xmalloc (alloc_size);
20016
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20020
@@ -485,8 +483,7 @@
20021
retarray->offset = 0;
20022
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20024
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20025
- * extent[rank-1];
20026
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20028
if (alloc_size == 0)
20030
@@ -495,7 +492,7 @@
20034
- retarray->base_addr = xmalloc (alloc_size);
20035
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20039
Index: libgfortran/generated/minloc1_16_i1.c
20040
===================================================================
20041
--- a/src/libgfortran/generated/minloc1_16_i1.c (.../tags/gcc_4_8_3_release)
20042
+++ b/src/libgfortran/generated/minloc1_16_i1.c (.../branches/gcc-4_8-branch)
20044
retarray->offset = 0;
20045
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20047
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20048
- * extent[rank-1];
20049
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20051
- retarray->base_addr = xmalloc (alloc_size);
20052
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20053
if (alloc_size == 0)
20055
/* Make sure we have a zero-sized array. */
20056
@@ -294,8 +293,7 @@
20060
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20061
- * extent[rank-1];
20062
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20064
retarray->offset = 0;
20065
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20066
@@ -307,7 +305,7 @@
20070
- retarray->base_addr = xmalloc (alloc_size);
20071
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20075
@@ -485,8 +483,7 @@
20076
retarray->offset = 0;
20077
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20079
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20080
- * extent[rank-1];
20081
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20083
if (alloc_size == 0)
20085
@@ -495,7 +492,7 @@
20089
- retarray->base_addr = xmalloc (alloc_size);
20090
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20094
Index: libgfortran/generated/spread_r16.c
20095
===================================================================
20096
--- a/src/libgfortran/generated/spread_r16.c (.../tags/gcc_4_8_3_release)
20097
+++ b/src/libgfortran/generated/spread_r16.c (.../branches/gcc-4_8-branch)
20098
@@ -101,8 +101,8 @@
20102
- /* xmalloc allocates a single byte for zero size. */
20103
- ret->base_addr = xmalloc (rs * sizeof(GFC_REAL_16));
20104
+ /* xmallocarray allocates a single byte for zero size. */
20105
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_REAL_16));
20109
@@ -244,7 +244,7 @@
20111
if (ret->base_addr == NULL)
20113
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_REAL_16));
20114
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_REAL_16));
20116
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
20118
Index: libgfortran/generated/pack_c8.c
20119
===================================================================
20120
--- a/src/libgfortran/generated/pack_c8.c (.../tags/gcc_4_8_3_release)
20121
+++ b/src/libgfortran/generated/pack_c8.c (.../branches/gcc-4_8-branch)
20122
@@ -167,8 +167,8 @@
20126
- /* xmalloc allocates a single byte for zero size. */
20127
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * total);
20128
+ /* xmallocarray allocates a single byte for zero size. */
20129
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_8));
20133
Index: libgfortran/generated/minval_r10.c
20134
===================================================================
20135
--- a/src/libgfortran/generated/minval_r10.c (.../tags/gcc_4_8_3_release)
20136
+++ b/src/libgfortran/generated/minval_r10.c (.../branches/gcc-4_8-branch)
20138
retarray->offset = 0;
20139
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20141
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20142
- * extent[rank-1];
20143
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20145
- retarray->base_addr = xmalloc (alloc_size);
20146
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
20147
if (alloc_size == 0)
20149
/* Make sure we have a zero-sized array. */
20150
@@ -286,8 +285,7 @@
20154
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20155
- * extent[rank-1];
20156
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20158
retarray->offset = 0;
20159
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20160
@@ -299,7 +297,7 @@
20164
- retarray->base_addr = xmalloc (alloc_size);
20165
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
20169
@@ -472,8 +470,7 @@
20170
retarray->offset = 0;
20171
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20173
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20174
- * extent[rank-1];
20175
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20177
if (alloc_size == 0)
20179
@@ -482,7 +479,7 @@
20183
- retarray->base_addr = xmalloc (alloc_size);
20184
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
20188
Index: libgfortran/generated/parity_l8.c
20189
===================================================================
20190
--- a/src/libgfortran/generated/parity_l8.c (.../tags/gcc_4_8_3_release)
20191
+++ b/src/libgfortran/generated/parity_l8.c (.../branches/gcc-4_8-branch)
20193
retarray->offset = 0;
20194
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20196
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20197
- * extent[rank-1];
20198
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20200
- retarray->base_addr = xmalloc (alloc_size);
20201
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
20202
if (alloc_size == 0)
20204
/* Make sure we have a zero-sized array. */
20205
Index: libgfortran/generated/minval_i4.c
20206
===================================================================
20207
--- a/src/libgfortran/generated/minval_i4.c (.../tags/gcc_4_8_3_release)
20208
+++ b/src/libgfortran/generated/minval_i4.c (.../branches/gcc-4_8-branch)
20210
retarray->offset = 0;
20211
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20213
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20214
- * extent[rank-1];
20215
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20217
- retarray->base_addr = xmalloc (alloc_size);
20218
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20219
if (alloc_size == 0)
20221
/* Make sure we have a zero-sized array. */
20222
@@ -286,8 +285,7 @@
20226
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20227
- * extent[rank-1];
20228
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20230
retarray->offset = 0;
20231
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20232
@@ -299,7 +297,7 @@
20236
- retarray->base_addr = xmalloc (alloc_size);
20237
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20241
@@ -472,8 +470,7 @@
20242
retarray->offset = 0;
20243
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20245
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20246
- * extent[rank-1];
20247
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20249
if (alloc_size == 0)
20251
@@ -482,7 +479,7 @@
20255
- retarray->base_addr = xmalloc (alloc_size);
20256
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20260
Index: libgfortran/generated/maxloc1_8_i2.c
20261
===================================================================
20262
--- a/src/libgfortran/generated/maxloc1_8_i2.c (.../tags/gcc_4_8_3_release)
20263
+++ b/src/libgfortran/generated/maxloc1_8_i2.c (.../branches/gcc-4_8-branch)
20265
retarray->offset = 0;
20266
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20268
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20269
- * extent[rank-1];
20270
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20272
- retarray->base_addr = xmalloc (alloc_size);
20273
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20274
if (alloc_size == 0)
20276
/* Make sure we have a zero-sized array. */
20277
@@ -294,8 +293,7 @@
20281
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20282
- * extent[rank-1];
20283
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20285
retarray->offset = 0;
20286
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20287
@@ -307,7 +305,7 @@
20291
- retarray->base_addr = xmalloc (alloc_size);
20292
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20296
@@ -485,8 +483,7 @@
20297
retarray->offset = 0;
20298
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20300
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20301
- * extent[rank-1];
20302
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20304
if (alloc_size == 0)
20306
@@ -495,7 +492,7 @@
20310
- retarray->base_addr = xmalloc (alloc_size);
20311
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20315
Index: libgfortran/generated/any_l8.c
20316
===================================================================
20317
--- a/src/libgfortran/generated/any_l8.c (.../tags/gcc_4_8_3_release)
20318
+++ b/src/libgfortran/generated/any_l8.c (.../branches/gcc-4_8-branch)
20319
@@ -101,8 +101,7 @@
20320
retarray->offset = 0;
20321
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20323
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20324
- * extent[rank-1];
20325
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20327
if (alloc_size == 0)
20329
@@ -111,7 +110,7 @@
20333
- retarray->base_addr = xmalloc (alloc_size);
20334
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
20338
Index: libgfortran/generated/maxloc0_16_r10.c
20339
===================================================================
20340
--- a/src/libgfortran/generated/maxloc0_16_r10.c (.../tags/gcc_4_8_3_release)
20341
+++ b/src/libgfortran/generated/maxloc0_16_r10.c (.../branches/gcc-4_8-branch)
20343
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20344
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20345
retarray->offset = 0;
20346
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20347
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20351
@@ -199,7 +199,7 @@
20352
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20353
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20354
retarray->offset = 0;
20355
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20356
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20360
@@ -367,7 +367,7 @@
20361
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20362
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20363
retarray->offset = 0;
20364
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20365
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20367
else if (unlikely (compile_options.bounds_check))
20369
Index: libgfortran/generated/minloc0_4_i16.c
20370
===================================================================
20371
--- a/src/libgfortran/generated/minloc0_4_i16.c (.../tags/gcc_4_8_3_release)
20372
+++ b/src/libgfortran/generated/minloc0_4_i16.c (.../branches/gcc-4_8-branch)
20374
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20375
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20376
retarray->offset = 0;
20377
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20378
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20382
@@ -199,7 +199,7 @@
20383
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20384
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20385
retarray->offset = 0;
20386
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20387
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20391
@@ -367,7 +367,7 @@
20392
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20393
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20394
retarray->offset = 0;
20395
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
20396
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
20398
else if (unlikely (compile_options.bounds_check))
20400
Index: libgfortran/generated/maxloc0_8_r8.c
20401
===================================================================
20402
--- a/src/libgfortran/generated/maxloc0_8_r8.c (.../tags/gcc_4_8_3_release)
20403
+++ b/src/libgfortran/generated/maxloc0_8_r8.c (.../branches/gcc-4_8-branch)
20405
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20406
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20407
retarray->offset = 0;
20408
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20409
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20413
@@ -199,7 +199,7 @@
20414
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20415
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20416
retarray->offset = 0;
20417
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20418
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20422
@@ -367,7 +367,7 @@
20423
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20424
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20425
retarray->offset = 0;
20426
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20427
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20429
else if (unlikely (compile_options.bounds_check))
20431
Index: libgfortran/generated/minloc1_4_r10.c
20432
===================================================================
20433
--- a/src/libgfortran/generated/minloc1_4_r10.c (.../tags/gcc_4_8_3_release)
20434
+++ b/src/libgfortran/generated/minloc1_4_r10.c (.../branches/gcc-4_8-branch)
20436
retarray->offset = 0;
20437
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20439
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20440
- * extent[rank-1];
20441
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20443
- retarray->base_addr = xmalloc (alloc_size);
20444
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20445
if (alloc_size == 0)
20447
/* Make sure we have a zero-sized array. */
20448
@@ -294,8 +293,7 @@
20452
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20453
- * extent[rank-1];
20454
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20456
retarray->offset = 0;
20457
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20458
@@ -307,7 +305,7 @@
20462
- retarray->base_addr = xmalloc (alloc_size);
20463
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20467
@@ -485,8 +483,7 @@
20468
retarray->offset = 0;
20469
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20471
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20472
- * extent[rank-1];
20473
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20475
if (alloc_size == 0)
20477
@@ -495,7 +492,7 @@
20481
- retarray->base_addr = xmalloc (alloc_size);
20482
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20486
Index: libgfortran/generated/minloc1_8_i16.c
20487
===================================================================
20488
--- a/src/libgfortran/generated/minloc1_8_i16.c (.../tags/gcc_4_8_3_release)
20489
+++ b/src/libgfortran/generated/minloc1_8_i16.c (.../branches/gcc-4_8-branch)
20491
retarray->offset = 0;
20492
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20494
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20495
- * extent[rank-1];
20496
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20498
- retarray->base_addr = xmalloc (alloc_size);
20499
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20500
if (alloc_size == 0)
20502
/* Make sure we have a zero-sized array. */
20503
@@ -294,8 +293,7 @@
20507
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20508
- * extent[rank-1];
20509
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20511
retarray->offset = 0;
20512
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20513
@@ -307,7 +305,7 @@
20517
- retarray->base_addr = xmalloc (alloc_size);
20518
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20522
@@ -485,8 +483,7 @@
20523
retarray->offset = 0;
20524
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20526
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20527
- * extent[rank-1];
20528
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20530
if (alloc_size == 0)
20532
@@ -495,7 +492,7 @@
20536
- retarray->base_addr = xmalloc (alloc_size);
20537
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20541
Index: libgfortran/generated/maxloc0_8_r10.c
20542
===================================================================
20543
--- a/src/libgfortran/generated/maxloc0_8_r10.c (.../tags/gcc_4_8_3_release)
20544
+++ b/src/libgfortran/generated/maxloc0_8_r10.c (.../branches/gcc-4_8-branch)
20546
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20547
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20548
retarray->offset = 0;
20549
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20550
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20554
@@ -199,7 +199,7 @@
20555
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20556
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20557
retarray->offset = 0;
20558
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20559
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20563
@@ -367,7 +367,7 @@
20564
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20565
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20566
retarray->offset = 0;
20567
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
20568
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
20570
else if (unlikely (compile_options.bounds_check))
20572
Index: libgfortran/generated/unpack_i4.c
20573
===================================================================
20574
--- a/src/libgfortran/generated/unpack_i4.c (.../tags/gcc_4_8_3_release)
20575
+++ b/src/libgfortran/generated/unpack_i4.c (.../branches/gcc-4_8-branch)
20580
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
20581
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
20585
@@ -244,7 +244,7 @@
20589
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_4));
20590
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_4));
20594
Index: libgfortran/generated/minloc1_16_r4.c
20595
===================================================================
20596
--- a/src/libgfortran/generated/minloc1_16_r4.c (.../tags/gcc_4_8_3_release)
20597
+++ b/src/libgfortran/generated/minloc1_16_r4.c (.../branches/gcc-4_8-branch)
20599
retarray->offset = 0;
20600
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20602
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20603
- * extent[rank-1];
20604
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20606
- retarray->base_addr = xmalloc (alloc_size);
20607
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20608
if (alloc_size == 0)
20610
/* Make sure we have a zero-sized array. */
20611
@@ -294,8 +293,7 @@
20615
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20616
- * extent[rank-1];
20617
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20619
retarray->offset = 0;
20620
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20621
@@ -307,7 +305,7 @@
20625
- retarray->base_addr = xmalloc (alloc_size);
20626
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20630
@@ -485,8 +483,7 @@
20631
retarray->offset = 0;
20632
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20634
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20635
- * extent[rank-1];
20636
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20638
if (alloc_size == 0)
20640
@@ -495,7 +492,7 @@
20644
- retarray->base_addr = xmalloc (alloc_size);
20645
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20649
Index: libgfortran/generated/product_i8.c
20650
===================================================================
20651
--- a/src/libgfortran/generated/product_i8.c (.../tags/gcc_4_8_3_release)
20652
+++ b/src/libgfortran/generated/product_i8.c (.../branches/gcc-4_8-branch)
20654
retarray->offset = 0;
20655
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20657
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20658
- * extent[rank-1];
20659
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20661
- retarray->base_addr = xmalloc (alloc_size);
20662
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20663
if (alloc_size == 0)
20665
/* Make sure we have a zero-sized array. */
20666
@@ -272,8 +271,7 @@
20670
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20671
- * extent[rank-1];
20672
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20674
retarray->offset = 0;
20675
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20676
@@ -285,7 +283,7 @@
20680
- retarray->base_addr = xmalloc (alloc_size);
20681
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20685
@@ -430,8 +428,7 @@
20686
retarray->offset = 0;
20687
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20689
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20690
- * extent[rank-1];
20691
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20693
if (alloc_size == 0)
20695
@@ -440,7 +437,7 @@
20699
- retarray->base_addr = xmalloc (alloc_size);
20700
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
20704
Index: libgfortran/generated/minloc0_16_r8.c
20705
===================================================================
20706
--- a/src/libgfortran/generated/minloc0_16_r8.c (.../tags/gcc_4_8_3_release)
20707
+++ b/src/libgfortran/generated/minloc0_16_r8.c (.../branches/gcc-4_8-branch)
20709
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20710
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20711
retarray->offset = 0;
20712
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20713
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20717
@@ -199,7 +199,7 @@
20718
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
20719
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20720
retarray->offset = 0;
20721
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20722
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20726
@@ -367,7 +367,7 @@
20727
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
20728
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
20729
retarray->offset = 0;
20730
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
20731
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
20733
else if (unlikely (compile_options.bounds_check))
20735
Index: libgfortran/generated/count_2_l.c
20736
===================================================================
20737
--- a/src/libgfortran/generated/count_2_l.c (.../tags/gcc_4_8_3_release)
20738
+++ b/src/libgfortran/generated/count_2_l.c (.../branches/gcc-4_8-branch)
20739
@@ -101,8 +101,7 @@
20740
retarray->offset = 0;
20741
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20743
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20744
- * extent[rank-1];
20745
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20747
if (alloc_size == 0)
20749
@@ -111,7 +110,7 @@
20753
- retarray->base_addr = xmalloc (alloc_size);
20754
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
20758
Index: libgfortran/generated/transpose_r8.c
20759
===================================================================
20760
--- a/src/libgfortran/generated/transpose_r8.c (.../tags/gcc_4_8_3_release)
20761
+++ b/src/libgfortran/generated/transpose_r8.c (.../branches/gcc-4_8-branch)
20763
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
20764
GFC_DESCRIPTOR_EXTENT(source, 1));
20766
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) ret));
20767
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
20768
+ sizeof (GFC_REAL_8));
20770
} else if (unlikely (compile_options.bounds_check))
20772
Index: libgfortran/generated/cshift1_8.c
20773
===================================================================
20774
--- a/src/libgfortran/generated/cshift1_8.c (.../tags/gcc_4_8_3_release)
20775
+++ b/src/libgfortran/generated/cshift1_8.c (.../branches/gcc-4_8-branch)
20780
- ret->base_addr = xmalloc (size * arraysize);
20781
+ ret->base_addr = xmallocarray (arraysize, size);
20783
ret->dtype = array->dtype;
20784
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
20785
Index: libgfortran/generated/matmul_i4.c
20786
===================================================================
20787
--- a/src/libgfortran/generated/matmul_i4.c (.../tags/gcc_4_8_3_release)
20788
+++ b/src/libgfortran/generated/matmul_i4.c (.../branches/gcc-4_8-branch)
20789
@@ -124,7 +124,7 @@
20792
retarray->base_addr
20793
- = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) retarray));
20794
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_4));
20795
retarray->offset = 0;
20797
else if (unlikely (compile_options.bounds_check))
20798
Index: libgfortran/generated/pack_r10.c
20799
===================================================================
20800
--- a/src/libgfortran/generated/pack_r10.c (.../tags/gcc_4_8_3_release)
20801
+++ b/src/libgfortran/generated/pack_r10.c (.../branches/gcc-4_8-branch)
20802
@@ -167,8 +167,8 @@
20806
- /* xmalloc allocates a single byte for zero size. */
20807
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * total);
20808
+ /* xmallocarray allocates a single byte for zero size. */
20809
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_10));
20813
Index: libgfortran/generated/minloc1_16_i2.c
20814
===================================================================
20815
--- a/src/libgfortran/generated/minloc1_16_i2.c (.../tags/gcc_4_8_3_release)
20816
+++ b/src/libgfortran/generated/minloc1_16_i2.c (.../branches/gcc-4_8-branch)
20818
retarray->offset = 0;
20819
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20821
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20822
- * extent[rank-1];
20823
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20825
- retarray->base_addr = xmalloc (alloc_size);
20826
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20827
if (alloc_size == 0)
20829
/* Make sure we have a zero-sized array. */
20830
@@ -294,8 +293,7 @@
20834
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20835
- * extent[rank-1];
20836
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20838
retarray->offset = 0;
20839
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20840
@@ -307,7 +305,7 @@
20844
- retarray->base_addr = xmalloc (alloc_size);
20845
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20849
@@ -485,8 +483,7 @@
20850
retarray->offset = 0;
20851
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20853
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20854
- * extent[rank-1];
20855
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20857
if (alloc_size == 0)
20859
@@ -495,7 +492,7 @@
20863
- retarray->base_addr = xmalloc (alloc_size);
20864
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
20868
Index: libgfortran/generated/in_pack_i8.c
20869
===================================================================
20870
--- a/src/libgfortran/generated/in_pack_i8.c (.../tags/gcc_4_8_3_release)
20871
+++ b/src/libgfortran/generated/in_pack_i8.c (.../branches/gcc-4_8-branch)
20873
return source->base_addr;
20875
/* Allocate storage for the destination. */
20876
- destptr = (GFC_INTEGER_8 *)xmalloc (ssize * sizeof (GFC_INTEGER_8));
20877
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_8));
20879
src = source->base_addr;
20880
stride0 = stride[0];
20881
Index: libgfortran/generated/transpose_r16.c
20882
===================================================================
20883
--- a/src/libgfortran/generated/transpose_r16.c (.../tags/gcc_4_8_3_release)
20884
+++ b/src/libgfortran/generated/transpose_r16.c (.../branches/gcc-4_8-branch)
20886
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
20887
GFC_DESCRIPTOR_EXTENT(source, 1));
20889
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) ret));
20890
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
20891
+ sizeof (GFC_REAL_16));
20893
} else if (unlikely (compile_options.bounds_check))
20895
Index: libgfortran/generated/minloc1_4_i4.c
20896
===================================================================
20897
--- a/src/libgfortran/generated/minloc1_4_i4.c (.../tags/gcc_4_8_3_release)
20898
+++ b/src/libgfortran/generated/minloc1_4_i4.c (.../branches/gcc-4_8-branch)
20900
retarray->offset = 0;
20901
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20903
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20904
- * extent[rank-1];
20905
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20907
- retarray->base_addr = xmalloc (alloc_size);
20908
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20909
if (alloc_size == 0)
20911
/* Make sure we have a zero-sized array. */
20912
@@ -294,8 +293,7 @@
20916
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20917
- * extent[rank-1];
20918
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20920
retarray->offset = 0;
20921
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20922
@@ -307,7 +305,7 @@
20926
- retarray->base_addr = xmalloc (alloc_size);
20927
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20931
@@ -485,8 +483,7 @@
20932
retarray->offset = 0;
20933
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20935
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20936
- * extent[rank-1];
20937
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20939
if (alloc_size == 0)
20941
@@ -495,7 +492,7 @@
20945
- retarray->base_addr = xmalloc (alloc_size);
20946
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
20950
Index: libgfortran/generated/maxval_i1.c
20951
===================================================================
20952
--- a/src/libgfortran/generated/maxval_i1.c (.../tags/gcc_4_8_3_release)
20953
+++ b/src/libgfortran/generated/maxval_i1.c (.../branches/gcc-4_8-branch)
20955
retarray->offset = 0;
20956
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20958
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20959
- * extent[rank-1];
20960
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20962
- retarray->base_addr = xmalloc (alloc_size);
20963
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
20964
if (alloc_size == 0)
20966
/* Make sure we have a zero-sized array. */
20967
@@ -286,8 +285,7 @@
20971
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20972
- * extent[rank-1];
20973
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20975
retarray->offset = 0;
20976
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20977
@@ -299,7 +297,7 @@
20981
- retarray->base_addr = xmalloc (alloc_size);
20982
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
20986
@@ -472,8 +470,7 @@
20987
retarray->offset = 0;
20988
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
20990
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
20991
- * extent[rank-1];
20992
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
20994
if (alloc_size == 0)
20996
@@ -482,7 +479,7 @@
21000
- retarray->base_addr = xmalloc (alloc_size);
21001
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
21005
Index: libgfortran/generated/product_c16.c
21006
===================================================================
21007
--- a/src/libgfortran/generated/product_c16.c (.../tags/gcc_4_8_3_release)
21008
+++ b/src/libgfortran/generated/product_c16.c (.../branches/gcc-4_8-branch)
21010
retarray->offset = 0;
21011
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21013
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21014
- * extent[rank-1];
21015
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21017
- retarray->base_addr = xmalloc (alloc_size);
21018
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
21019
if (alloc_size == 0)
21021
/* Make sure we have a zero-sized array. */
21022
@@ -272,8 +271,7 @@
21026
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21027
- * extent[rank-1];
21028
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21030
retarray->offset = 0;
21031
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21032
@@ -285,7 +283,7 @@
21036
- retarray->base_addr = xmalloc (alloc_size);
21037
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
21041
@@ -430,8 +428,7 @@
21042
retarray->offset = 0;
21043
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21045
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21046
- * extent[rank-1];
21047
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21049
if (alloc_size == 0)
21051
@@ -440,7 +437,7 @@
21055
- retarray->base_addr = xmalloc (alloc_size);
21056
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
21060
Index: libgfortran/generated/reshape_r4.c
21061
===================================================================
21062
--- a/src/libgfortran/generated/reshape_r4.c (.../tags/gcc_4_8_3_release)
21063
+++ b/src/libgfortran/generated/reshape_r4.c (.../branches/gcc-4_8-branch)
21064
@@ -111,11 +111,11 @@
21067
if (unlikely (rs < 1))
21071
- alloc_size = rs * sizeof (GFC_REAL_4);
21074
- ret->base_addr = xmalloc (alloc_size);
21075
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
21076
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
21079
Index: libgfortran/generated/iany_i8.c
21080
===================================================================
21081
--- a/src/libgfortran/generated/iany_i8.c (.../tags/gcc_4_8_3_release)
21082
+++ b/src/libgfortran/generated/iany_i8.c (.../branches/gcc-4_8-branch)
21084
retarray->offset = 0;
21085
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21087
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21088
- * extent[rank-1];
21089
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21091
- retarray->base_addr = xmalloc (alloc_size);
21092
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21093
if (alloc_size == 0)
21095
/* Make sure we have a zero-sized array. */
21096
@@ -272,8 +271,7 @@
21100
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21101
- * extent[rank-1];
21102
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21104
retarray->offset = 0;
21105
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21106
@@ -285,7 +283,7 @@
21110
- retarray->base_addr = xmalloc (alloc_size);
21111
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21115
@@ -430,8 +428,7 @@
21116
retarray->offset = 0;
21117
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21119
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21120
- * extent[rank-1];
21121
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21123
if (alloc_size == 0)
21125
@@ -440,7 +437,7 @@
21129
- retarray->base_addr = xmalloc (alloc_size);
21130
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21134
Index: libgfortran/generated/cshift1_16.c
21135
===================================================================
21136
--- a/src/libgfortran/generated/cshift1_16.c (.../tags/gcc_4_8_3_release)
21137
+++ b/src/libgfortran/generated/cshift1_16.c (.../branches/gcc-4_8-branch)
21142
- ret->base_addr = xmalloc (size * arraysize);
21143
+ ret->base_addr = xmallocarray (arraysize, size);
21145
ret->dtype = array->dtype;
21146
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
21147
Index: libgfortran/generated/maxloc0_4_i1.c
21148
===================================================================
21149
--- a/src/libgfortran/generated/maxloc0_4_i1.c (.../tags/gcc_4_8_3_release)
21150
+++ b/src/libgfortran/generated/maxloc0_4_i1.c (.../branches/gcc-4_8-branch)
21152
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21153
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21154
retarray->offset = 0;
21155
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21156
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21160
@@ -199,7 +199,7 @@
21161
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21162
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21163
retarray->offset = 0;
21164
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21165
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21169
@@ -367,7 +367,7 @@
21170
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21171
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21172
retarray->offset = 0;
21173
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21174
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21176
else if (unlikely (compile_options.bounds_check))
21178
Index: libgfortran/generated/minloc0_4_i8.c
21179
===================================================================
21180
--- a/src/libgfortran/generated/minloc0_4_i8.c (.../tags/gcc_4_8_3_release)
21181
+++ b/src/libgfortran/generated/minloc0_4_i8.c (.../branches/gcc-4_8-branch)
21183
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21184
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21185
retarray->offset = 0;
21186
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21187
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21191
@@ -199,7 +199,7 @@
21192
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21193
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21194
retarray->offset = 0;
21195
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21196
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21200
@@ -367,7 +367,7 @@
21201
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21202
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21203
retarray->offset = 0;
21204
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21205
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21207
else if (unlikely (compile_options.bounds_check))
21209
Index: libgfortran/generated/spread_c16.c
21210
===================================================================
21211
--- a/src/libgfortran/generated/spread_c16.c (.../tags/gcc_4_8_3_release)
21212
+++ b/src/libgfortran/generated/spread_c16.c (.../branches/gcc-4_8-branch)
21213
@@ -101,8 +101,8 @@
21217
- /* xmalloc allocates a single byte for zero size. */
21218
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_16));
21219
+ /* xmallocarray allocates a single byte for zero size. */
21220
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_16));
21224
@@ -244,7 +244,7 @@
21226
if (ret->base_addr == NULL)
21228
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_16));
21229
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_16));
21231
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
21233
Index: libgfortran/generated/maxval_r4.c
21234
===================================================================
21235
--- a/src/libgfortran/generated/maxval_r4.c (.../tags/gcc_4_8_3_release)
21236
+++ b/src/libgfortran/generated/maxval_r4.c (.../branches/gcc-4_8-branch)
21238
retarray->offset = 0;
21239
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21241
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21242
- * extent[rank-1];
21243
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21245
- retarray->base_addr = xmalloc (alloc_size);
21246
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
21247
if (alloc_size == 0)
21249
/* Make sure we have a zero-sized array. */
21250
@@ -286,8 +285,7 @@
21254
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21255
- * extent[rank-1];
21256
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21258
retarray->offset = 0;
21259
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21260
@@ -299,7 +297,7 @@
21264
- retarray->base_addr = xmalloc (alloc_size);
21265
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
21269
@@ -472,8 +470,7 @@
21270
retarray->offset = 0;
21271
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21273
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21274
- * extent[rank-1];
21275
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21277
if (alloc_size == 0)
21279
@@ -482,7 +479,7 @@
21283
- retarray->base_addr = xmalloc (alloc_size);
21284
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
21288
Index: libgfortran/generated/minval_r8.c
21289
===================================================================
21290
--- a/src/libgfortran/generated/minval_r8.c (.../tags/gcc_4_8_3_release)
21291
+++ b/src/libgfortran/generated/minval_r8.c (.../branches/gcc-4_8-branch)
21293
retarray->offset = 0;
21294
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21296
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21297
- * extent[rank-1];
21298
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21300
- retarray->base_addr = xmalloc (alloc_size);
21301
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
21302
if (alloc_size == 0)
21304
/* Make sure we have a zero-sized array. */
21305
@@ -286,8 +285,7 @@
21309
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21310
- * extent[rank-1];
21311
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21313
retarray->offset = 0;
21314
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21315
@@ -299,7 +297,7 @@
21319
- retarray->base_addr = xmalloc (alloc_size);
21320
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
21324
@@ -472,8 +470,7 @@
21325
retarray->offset = 0;
21326
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21328
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21329
- * extent[rank-1];
21330
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21332
if (alloc_size == 0)
21334
@@ -482,7 +479,7 @@
21338
- retarray->base_addr = xmalloc (alloc_size);
21339
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
21343
Index: libgfortran/generated/minloc1_16_r16.c
21344
===================================================================
21345
--- a/src/libgfortran/generated/minloc1_16_r16.c (.../tags/gcc_4_8_3_release)
21346
+++ b/src/libgfortran/generated/minloc1_16_r16.c (.../branches/gcc-4_8-branch)
21348
retarray->offset = 0;
21349
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21351
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21352
- * extent[rank-1];
21353
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21355
- retarray->base_addr = xmalloc (alloc_size);
21356
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21357
if (alloc_size == 0)
21359
/* Make sure we have a zero-sized array. */
21360
@@ -294,8 +293,7 @@
21364
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21365
- * extent[rank-1];
21366
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21368
retarray->offset = 0;
21369
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21370
@@ -307,7 +305,7 @@
21374
- retarray->base_addr = xmalloc (alloc_size);
21375
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21379
@@ -485,8 +483,7 @@
21380
retarray->offset = 0;
21381
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21383
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21384
- * extent[rank-1];
21385
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21387
if (alloc_size == 0)
21389
@@ -495,7 +492,7 @@
21393
- retarray->base_addr = xmalloc (alloc_size);
21394
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21398
Index: libgfortran/generated/unpack_i16.c
21399
===================================================================
21400
--- a/src/libgfortran/generated/unpack_i16.c (.../tags/gcc_4_8_3_release)
21401
+++ b/src/libgfortran/generated/unpack_i16.c (.../branches/gcc-4_8-branch)
21406
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
21407
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
21411
@@ -244,7 +244,7 @@
21415
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_16));
21416
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_16));
21420
Index: libgfortran/generated/sum_i8.c
21421
===================================================================
21422
--- a/src/libgfortran/generated/sum_i8.c (.../tags/gcc_4_8_3_release)
21423
+++ b/src/libgfortran/generated/sum_i8.c (.../branches/gcc-4_8-branch)
21425
retarray->offset = 0;
21426
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21428
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21429
- * extent[rank-1];
21430
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21432
- retarray->base_addr = xmalloc (alloc_size);
21433
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21434
if (alloc_size == 0)
21436
/* Make sure we have a zero-sized array. */
21437
@@ -272,8 +271,7 @@
21441
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21442
- * extent[rank-1];
21443
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21445
retarray->offset = 0;
21446
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21447
@@ -285,7 +283,7 @@
21451
- retarray->base_addr = xmalloc (alloc_size);
21452
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21456
@@ -430,8 +428,7 @@
21457
retarray->offset = 0;
21458
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21460
- alloc_size = sizeof (GFC_INTEGER_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
@@ -440,7 +437,7 @@
21470
- retarray->base_addr = xmalloc (alloc_size);
21471
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21475
Index: libgfortran/generated/pack_i1.c
21476
===================================================================
21477
--- a/src/libgfortran/generated/pack_i1.c (.../tags/gcc_4_8_3_release)
21478
+++ b/src/libgfortran/generated/pack_i1.c (.../branches/gcc-4_8-branch)
21479
@@ -167,8 +167,8 @@
21483
- /* xmalloc allocates a single byte for zero size. */
21484
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_1) * total);
21485
+ /* xmallocarray allocates a single byte for zero size. */
21486
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_1));
21490
Index: libgfortran/generated/any_l16.c
21491
===================================================================
21492
--- a/src/libgfortran/generated/any_l16.c (.../tags/gcc_4_8_3_release)
21493
+++ b/src/libgfortran/generated/any_l16.c (.../branches/gcc-4_8-branch)
21494
@@ -101,8 +101,7 @@
21495
retarray->offset = 0;
21496
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21498
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21499
- * extent[rank-1];
21500
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21502
if (alloc_size == 0)
21504
@@ -111,7 +110,7 @@
21508
- retarray->base_addr = xmalloc (alloc_size);
21509
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
21513
Index: libgfortran/generated/spread_i8.c
21514
===================================================================
21515
--- a/src/libgfortran/generated/spread_i8.c (.../tags/gcc_4_8_3_release)
21516
+++ b/src/libgfortran/generated/spread_i8.c (.../branches/gcc-4_8-branch)
21517
@@ -101,8 +101,8 @@
21521
- /* xmalloc allocates a single byte for zero size. */
21522
- ret->base_addr = xmalloc (rs * sizeof(GFC_INTEGER_8));
21523
+ /* xmallocarray allocates a single byte for zero size. */
21524
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_INTEGER_8));
21528
@@ -244,7 +244,7 @@
21530
if (ret->base_addr == NULL)
21532
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_INTEGER_8));
21533
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_INTEGER_8));
21535
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
21537
Index: libgfortran/generated/maxval_i2.c
21538
===================================================================
21539
--- a/src/libgfortran/generated/maxval_i2.c (.../tags/gcc_4_8_3_release)
21540
+++ b/src/libgfortran/generated/maxval_i2.c (.../branches/gcc-4_8-branch)
21542
retarray->offset = 0;
21543
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21545
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21546
- * extent[rank-1];
21547
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21549
- retarray->base_addr = xmalloc (alloc_size);
21550
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
21551
if (alloc_size == 0)
21553
/* Make sure we have a zero-sized array. */
21554
@@ -286,8 +285,7 @@
21558
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21559
- * extent[rank-1];
21560
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21562
retarray->offset = 0;
21563
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21564
@@ -299,7 +297,7 @@
21568
- retarray->base_addr = xmalloc (alloc_size);
21569
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
21573
@@ -472,8 +470,7 @@
21574
retarray->offset = 0;
21575
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21577
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21578
- * extent[rank-1];
21579
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21581
if (alloc_size == 0)
21583
@@ -482,7 +479,7 @@
21587
- retarray->base_addr = xmalloc (alloc_size);
21588
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
21592
Index: libgfortran/generated/maxloc1_8_i4.c
21593
===================================================================
21594
--- a/src/libgfortran/generated/maxloc1_8_i4.c (.../tags/gcc_4_8_3_release)
21595
+++ b/src/libgfortran/generated/maxloc1_8_i4.c (.../branches/gcc-4_8-branch)
21597
retarray->offset = 0;
21598
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21600
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21601
- * extent[rank-1];
21602
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21604
- retarray->base_addr = xmalloc (alloc_size);
21605
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21606
if (alloc_size == 0)
21608
/* Make sure we have a zero-sized array. */
21609
@@ -294,8 +293,7 @@
21613
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21614
- * extent[rank-1];
21615
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21617
retarray->offset = 0;
21618
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21619
@@ -307,7 +305,7 @@
21623
- retarray->base_addr = xmalloc (alloc_size);
21624
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21628
@@ -485,8 +483,7 @@
21629
retarray->offset = 0;
21630
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21632
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21633
- * extent[rank-1];
21634
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21636
if (alloc_size == 0)
21638
@@ -495,7 +492,7 @@
21642
- retarray->base_addr = xmalloc (alloc_size);
21643
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21647
Index: libgfortran/generated/unpack_r8.c
21648
===================================================================
21649
--- a/src/libgfortran/generated/unpack_r8.c (.../tags/gcc_4_8_3_release)
21650
+++ b/src/libgfortran/generated/unpack_r8.c (.../branches/gcc-4_8-branch)
21655
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
21656
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
21660
@@ -244,7 +244,7 @@
21664
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_8));
21665
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_8));
21669
Index: libgfortran/generated/maxloc0_4_r4.c
21670
===================================================================
21671
--- a/src/libgfortran/generated/maxloc0_4_r4.c (.../tags/gcc_4_8_3_release)
21672
+++ b/src/libgfortran/generated/maxloc0_4_r4.c (.../branches/gcc-4_8-branch)
21674
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21675
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21676
retarray->offset = 0;
21677
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21678
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21682
@@ -199,7 +199,7 @@
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_4) * rank);
21687
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21691
@@ -367,7 +367,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_4) * rank);
21696
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21698
else if (unlikely (compile_options.bounds_check))
21700
Index: libgfortran/generated/all_l1.c
21701
===================================================================
21702
--- a/src/libgfortran/generated/all_l1.c (.../tags/gcc_4_8_3_release)
21703
+++ b/src/libgfortran/generated/all_l1.c (.../branches/gcc-4_8-branch)
21704
@@ -101,8 +101,7 @@
21705
retarray->offset = 0;
21706
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21708
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21709
- * extent[rank-1];
21710
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21712
if (alloc_size == 0)
21714
@@ -111,7 +110,7 @@
21718
- retarray->base_addr = xmalloc (alloc_size);
21719
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
21723
Index: libgfortran/generated/matmul_r8.c
21724
===================================================================
21725
--- a/src/libgfortran/generated/matmul_r8.c (.../tags/gcc_4_8_3_release)
21726
+++ b/src/libgfortran/generated/matmul_r8.c (.../branches/gcc-4_8-branch)
21727
@@ -124,7 +124,7 @@
21730
retarray->base_addr
21731
- = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) retarray));
21732
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_8));
21733
retarray->offset = 0;
21735
else if (unlikely (compile_options.bounds_check))
21736
Index: libgfortran/generated/minloc0_4_r16.c
21737
===================================================================
21738
--- a/src/libgfortran/generated/minloc0_4_r16.c (.../tags/gcc_4_8_3_release)
21739
+++ b/src/libgfortran/generated/minloc0_4_r16.c (.../branches/gcc-4_8-branch)
21741
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21742
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21743
retarray->offset = 0;
21744
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21745
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21749
@@ -199,7 +199,7 @@
21750
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21751
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21752
retarray->offset = 0;
21753
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21754
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21758
@@ -367,7 +367,7 @@
21759
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21760
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21761
retarray->offset = 0;
21762
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21763
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21765
else if (unlikely (compile_options.bounds_check))
21767
Index: libgfortran/generated/maxloc0_4_i2.c
21768
===================================================================
21769
--- a/src/libgfortran/generated/maxloc0_4_i2.c (.../tags/gcc_4_8_3_release)
21770
+++ b/src/libgfortran/generated/maxloc0_4_i2.c (.../branches/gcc-4_8-branch)
21772
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21773
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21774
retarray->offset = 0;
21775
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21776
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21780
@@ -199,7 +199,7 @@
21781
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21782
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21783
retarray->offset = 0;
21784
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21785
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21789
@@ -367,7 +367,7 @@
21790
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21791
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21792
retarray->offset = 0;
21793
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
21794
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
21796
else if (unlikely (compile_options.bounds_check))
21798
Index: libgfortran/generated/minloc1_8_r16.c
21799
===================================================================
21800
--- a/src/libgfortran/generated/minloc1_8_r16.c (.../tags/gcc_4_8_3_release)
21801
+++ b/src/libgfortran/generated/minloc1_8_r16.c (.../branches/gcc-4_8-branch)
21803
retarray->offset = 0;
21804
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21806
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21807
- * extent[rank-1];
21808
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21810
- retarray->base_addr = xmalloc (alloc_size);
21811
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21812
if (alloc_size == 0)
21814
/* Make sure we have a zero-sized array. */
21815
@@ -294,8 +293,7 @@
21819
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21820
- * extent[rank-1];
21821
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21823
retarray->offset = 0;
21824
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21825
@@ -307,7 +305,7 @@
21829
- retarray->base_addr = xmalloc (alloc_size);
21830
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21834
@@ -485,8 +483,7 @@
21835
retarray->offset = 0;
21836
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21838
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21839
- * extent[rank-1];
21840
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21842
if (alloc_size == 0)
21844
@@ -495,7 +492,7 @@
21848
- retarray->base_addr = xmalloc (alloc_size);
21849
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
21853
Index: libgfortran/generated/pack_c10.c
21854
===================================================================
21855
--- a/src/libgfortran/generated/pack_c10.c (.../tags/gcc_4_8_3_release)
21856
+++ b/src/libgfortran/generated/pack_c10.c (.../branches/gcc-4_8-branch)
21857
@@ -167,8 +167,8 @@
21861
- /* xmalloc allocates a single byte for zero size. */
21862
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * total);
21863
+ /* xmallocarray allocates a single byte for zero size. */
21864
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_10));
21868
Index: libgfortran/generated/pack_r4.c
21869
===================================================================
21870
--- a/src/libgfortran/generated/pack_r4.c (.../tags/gcc_4_8_3_release)
21871
+++ b/src/libgfortran/generated/pack_r4.c (.../branches/gcc-4_8-branch)
21872
@@ -167,8 +167,8 @@
21876
- /* xmalloc allocates a single byte for zero size. */
21877
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * total);
21878
+ /* xmallocarray allocates a single byte for zero size. */
21879
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_4));
21883
Index: libgfortran/generated/transpose_c16.c
21884
===================================================================
21885
--- a/src/libgfortran/generated/transpose_c16.c (.../tags/gcc_4_8_3_release)
21886
+++ b/src/libgfortran/generated/transpose_c16.c (.../branches/gcc-4_8-branch)
21888
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
21889
GFC_DESCRIPTOR_EXTENT(source, 1));
21891
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) ret));
21892
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
21893
+ sizeof (GFC_COMPLEX_16));
21895
} else if (unlikely (compile_options.bounds_check))
21897
Index: libgfortran/generated/maxloc0_8_i8.c
21898
===================================================================
21899
--- a/src/libgfortran/generated/maxloc0_8_i8.c (.../tags/gcc_4_8_3_release)
21900
+++ b/src/libgfortran/generated/maxloc0_8_i8.c (.../branches/gcc-4_8-branch)
21902
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21903
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21904
retarray->offset = 0;
21905
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21906
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21910
@@ -199,7 +199,7 @@
21911
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
21912
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21913
retarray->offset = 0;
21914
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21915
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21919
@@ -367,7 +367,7 @@
21920
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
21921
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
21922
retarray->offset = 0;
21923
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
21924
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
21926
else if (unlikely (compile_options.bounds_check))
21928
Index: libgfortran/generated/minloc1_4_r8.c
21929
===================================================================
21930
--- a/src/libgfortran/generated/minloc1_4_r8.c (.../tags/gcc_4_8_3_release)
21931
+++ b/src/libgfortran/generated/minloc1_4_r8.c (.../branches/gcc-4_8-branch)
21933
retarray->offset = 0;
21934
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21936
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21937
- * extent[rank-1];
21938
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21940
- retarray->base_addr = xmalloc (alloc_size);
21941
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21942
if (alloc_size == 0)
21944
/* Make sure we have a zero-sized array. */
21945
@@ -294,8 +293,7 @@
21949
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21950
- * extent[rank-1];
21951
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21953
retarray->offset = 0;
21954
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21955
@@ -307,7 +305,7 @@
21959
- retarray->base_addr = xmalloc (alloc_size);
21960
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21964
@@ -485,8 +483,7 @@
21965
retarray->offset = 0;
21966
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21968
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21969
- * extent[rank-1];
21970
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21972
if (alloc_size == 0)
21974
@@ -495,7 +492,7 @@
21978
- retarray->base_addr = xmalloc (alloc_size);
21979
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
21983
Index: libgfortran/generated/minloc1_16_i4.c
21984
===================================================================
21985
--- a/src/libgfortran/generated/minloc1_16_i4.c (.../tags/gcc_4_8_3_release)
21986
+++ b/src/libgfortran/generated/minloc1_16_i4.c (.../branches/gcc-4_8-branch)
21988
retarray->offset = 0;
21989
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
21991
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
21992
- * extent[rank-1];
21993
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
21995
- retarray->base_addr = xmalloc (alloc_size);
21996
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
21997
if (alloc_size == 0)
21999
/* Make sure we have a zero-sized array. */
22000
@@ -294,8 +293,7 @@
22004
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22005
- * extent[rank-1];
22006
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22008
retarray->offset = 0;
22009
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22010
@@ -307,7 +305,7 @@
22014
- retarray->base_addr = xmalloc (alloc_size);
22015
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22019
@@ -485,8 +483,7 @@
22020
retarray->offset = 0;
22021
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22023
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22024
- * extent[rank-1];
22025
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22027
if (alloc_size == 0)
22029
@@ -495,7 +492,7 @@
22033
- retarray->base_addr = xmalloc (alloc_size);
22034
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22038
Index: libgfortran/generated/minloc0_16_i8.c
22039
===================================================================
22040
--- a/src/libgfortran/generated/minloc0_16_i8.c (.../tags/gcc_4_8_3_release)
22041
+++ b/src/libgfortran/generated/minloc0_16_i8.c (.../branches/gcc-4_8-branch)
22043
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22044
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22045
retarray->offset = 0;
22046
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22047
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22051
@@ -199,7 +199,7 @@
22052
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22053
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22054
retarray->offset = 0;
22055
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22056
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22060
@@ -367,7 +367,7 @@
22061
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22062
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22063
retarray->offset = 0;
22064
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22065
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22067
else if (unlikely (compile_options.bounds_check))
22069
Index: libgfortran/generated/pack_i2.c
22070
===================================================================
22071
--- a/src/libgfortran/generated/pack_i2.c (.../tags/gcc_4_8_3_release)
22072
+++ b/src/libgfortran/generated/pack_i2.c (.../branches/gcc-4_8-branch)
22073
@@ -167,8 +167,8 @@
22077
- /* xmalloc allocates a single byte for zero size. */
22078
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_2) * total);
22079
+ /* xmallocarray allocates a single byte for zero size. */
22080
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_2));
22084
Index: libgfortran/generated/transpose_i8.c
22085
===================================================================
22086
--- a/src/libgfortran/generated/transpose_i8.c (.../tags/gcc_4_8_3_release)
22087
+++ b/src/libgfortran/generated/transpose_i8.c (.../branches/gcc-4_8-branch)
22089
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
22090
GFC_DESCRIPTOR_EXTENT(source, 1));
22092
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) ret));
22093
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
22094
+ sizeof (GFC_INTEGER_8));
22096
} else if (unlikely (compile_options.bounds_check))
22098
Index: libgfortran/generated/eoshift1_16.c
22099
===================================================================
22100
--- a/src/libgfortran/generated/eoshift1_16.c (.../tags/gcc_4_8_3_release)
22101
+++ b/src/libgfortran/generated/eoshift1_16.c (.../branches/gcc-4_8-branch)
22102
@@ -105,8 +105,8 @@
22103
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
22106
- /* xmalloc allocates a single byte for zero size. */
22107
- ret->base_addr = xmalloc (size * arraysize);
22108
+ /* xmallocarray allocates a single byte for zero size. */
22109
+ ret->base_addr = xmallocarray (arraysize, size);
22112
else if (unlikely (compile_options.bounds_check))
22113
Index: libgfortran/generated/all_l2.c
22114
===================================================================
22115
--- a/src/libgfortran/generated/all_l2.c (.../tags/gcc_4_8_3_release)
22116
+++ b/src/libgfortran/generated/all_l2.c (.../branches/gcc-4_8-branch)
22117
@@ -101,8 +101,7 @@
22118
retarray->offset = 0;
22119
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22121
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22122
- * extent[rank-1];
22123
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22125
if (alloc_size == 0)
22127
@@ -111,7 +110,7 @@
22131
- retarray->base_addr = xmalloc (alloc_size);
22132
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
22136
Index: libgfortran/generated/product_c4.c
22137
===================================================================
22138
--- a/src/libgfortran/generated/product_c4.c (.../tags/gcc_4_8_3_release)
22139
+++ b/src/libgfortran/generated/product_c4.c (.../branches/gcc-4_8-branch)
22141
retarray->offset = 0;
22142
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22144
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22145
- * extent[rank-1];
22146
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22148
- retarray->base_addr = xmalloc (alloc_size);
22149
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
22150
if (alloc_size == 0)
22152
/* Make sure we have a zero-sized array. */
22153
@@ -272,8 +271,7 @@
22157
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22158
- * extent[rank-1];
22159
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22161
retarray->offset = 0;
22162
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22163
@@ -285,7 +283,7 @@
22167
- retarray->base_addr = xmalloc (alloc_size);
22168
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
22172
@@ -430,8 +428,7 @@
22173
retarray->offset = 0;
22174
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22176
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22177
- * extent[rank-1];
22178
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22180
if (alloc_size == 0)
22182
@@ -440,7 +437,7 @@
22186
- retarray->base_addr = xmalloc (alloc_size);
22187
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
22191
Index: libgfortran/generated/iall_i1.c
22192
===================================================================
22193
--- a/src/libgfortran/generated/iall_i1.c (.../tags/gcc_4_8_3_release)
22194
+++ b/src/libgfortran/generated/iall_i1.c (.../branches/gcc-4_8-branch)
22196
retarray->offset = 0;
22197
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22199
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22200
- * extent[rank-1];
22201
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22203
- retarray->base_addr = xmalloc (alloc_size);
22204
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22205
if (alloc_size == 0)
22207
/* Make sure we have a zero-sized array. */
22208
@@ -272,8 +271,7 @@
22212
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22213
- * extent[rank-1];
22214
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22216
retarray->offset = 0;
22217
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22218
@@ -285,7 +283,7 @@
22222
- retarray->base_addr = xmalloc (alloc_size);
22223
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22227
@@ -430,8 +428,7 @@
22228
retarray->offset = 0;
22229
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22231
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22232
- * extent[rank-1];
22233
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22235
if (alloc_size == 0)
22237
@@ -440,7 +437,7 @@
22241
- retarray->base_addr = xmalloc (alloc_size);
22242
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
22246
Index: libgfortran/generated/reshape_i4.c
22247
===================================================================
22248
--- a/src/libgfortran/generated/reshape_i4.c (.../tags/gcc_4_8_3_release)
22249
+++ b/src/libgfortran/generated/reshape_i4.c (.../branches/gcc-4_8-branch)
22250
@@ -111,11 +111,11 @@
22253
if (unlikely (rs < 1))
22257
- alloc_size = rs * sizeof (GFC_INTEGER_4);
22260
- ret->base_addr = xmalloc (alloc_size);
22261
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22262
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
22265
Index: libgfortran/generated/in_pack_r10.c
22266
===================================================================
22267
--- a/src/libgfortran/generated/in_pack_r10.c (.../tags/gcc_4_8_3_release)
22268
+++ b/src/libgfortran/generated/in_pack_r10.c (.../branches/gcc-4_8-branch)
22270
return source->base_addr;
22272
/* Allocate storage for the destination. */
22273
- destptr = (GFC_REAL_10 *)xmalloc (ssize * sizeof (GFC_REAL_10));
22274
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_10));
22276
src = source->base_addr;
22277
stride0 = stride[0];
22278
Index: libgfortran/generated/in_pack_c4.c
22279
===================================================================
22280
--- a/src/libgfortran/generated/in_pack_c4.c (.../tags/gcc_4_8_3_release)
22281
+++ b/src/libgfortran/generated/in_pack_c4.c (.../branches/gcc-4_8-branch)
22283
return source->base_addr;
22285
/* Allocate storage for the destination. */
22286
- destptr = (GFC_COMPLEX_4 *)xmalloc (ssize * sizeof (GFC_COMPLEX_4));
22287
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_4));
22289
src = source->base_addr;
22290
stride0 = stride[0];
22291
Index: libgfortran/generated/all_l16.c
22292
===================================================================
22293
--- a/src/libgfortran/generated/all_l16.c (.../tags/gcc_4_8_3_release)
22294
+++ b/src/libgfortran/generated/all_l16.c (.../branches/gcc-4_8-branch)
22295
@@ -101,8 +101,7 @@
22296
retarray->offset = 0;
22297
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22299
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22300
- * extent[rank-1];
22301
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22303
if (alloc_size == 0)
22305
@@ -111,7 +110,7 @@
22309
- retarray->base_addr = xmalloc (alloc_size);
22310
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
22314
Index: libgfortran/generated/maxloc0_16_i1.c
22315
===================================================================
22316
--- a/src/libgfortran/generated/maxloc0_16_i1.c (.../tags/gcc_4_8_3_release)
22317
+++ b/src/libgfortran/generated/maxloc0_16_i1.c (.../branches/gcc-4_8-branch)
22319
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22320
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22321
retarray->offset = 0;
22322
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22323
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22327
@@ -199,7 +199,7 @@
22328
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22329
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22330
retarray->offset = 0;
22331
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22332
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22336
@@ -367,7 +367,7 @@
22337
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22338
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22339
retarray->offset = 0;
22340
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22341
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22343
else if (unlikely (compile_options.bounds_check))
22345
Index: libgfortran/generated/maxloc1_8_r8.c
22346
===================================================================
22347
--- a/src/libgfortran/generated/maxloc1_8_r8.c (.../tags/gcc_4_8_3_release)
22348
+++ b/src/libgfortran/generated/maxloc1_8_r8.c (.../branches/gcc-4_8-branch)
22350
retarray->offset = 0;
22351
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22353
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22354
- * extent[rank-1];
22355
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22357
- retarray->base_addr = xmalloc (alloc_size);
22358
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22359
if (alloc_size == 0)
22361
/* Make sure we have a zero-sized array. */
22362
@@ -294,8 +293,7 @@
22366
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22367
- * extent[rank-1];
22368
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22370
retarray->offset = 0;
22371
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22372
@@ -307,7 +305,7 @@
22376
- retarray->base_addr = xmalloc (alloc_size);
22377
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22381
@@ -485,8 +483,7 @@
22382
retarray->offset = 0;
22383
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22385
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22386
- * extent[rank-1];
22387
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22389
if (alloc_size == 0)
22391
@@ -495,7 +492,7 @@
22395
- retarray->base_addr = xmalloc (alloc_size);
22396
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22400
Index: libgfortran/generated/minval_i16.c
22401
===================================================================
22402
--- a/src/libgfortran/generated/minval_i16.c (.../tags/gcc_4_8_3_release)
22403
+++ b/src/libgfortran/generated/minval_i16.c (.../branches/gcc-4_8-branch)
22405
retarray->offset = 0;
22406
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22408
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22409
- * extent[rank-1];
22410
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22412
- retarray->base_addr = xmalloc (alloc_size);
22413
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22414
if (alloc_size == 0)
22416
/* Make sure we have a zero-sized array. */
22417
@@ -286,8 +285,7 @@
22421
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22422
- * extent[rank-1];
22423
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22425
retarray->offset = 0;
22426
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22427
@@ -299,7 +297,7 @@
22431
- retarray->base_addr = xmalloc (alloc_size);
22432
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22436
@@ -472,8 +470,7 @@
22437
retarray->offset = 0;
22438
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22440
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22441
- * extent[rank-1];
22442
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22444
if (alloc_size == 0)
22446
@@ -482,7 +479,7 @@
22450
- retarray->base_addr = xmalloc (alloc_size);
22451
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22455
Index: libgfortran/generated/reshape_r10.c
22456
===================================================================
22457
--- a/src/libgfortran/generated/reshape_r10.c (.../tags/gcc_4_8_3_release)
22458
+++ b/src/libgfortran/generated/reshape_r10.c (.../branches/gcc-4_8-branch)
22459
@@ -111,11 +111,11 @@
22462
if (unlikely (rs < 1))
22466
- alloc_size = rs * sizeof (GFC_REAL_10);
22469
- ret->base_addr = xmalloc (alloc_size);
22470
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
22471
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
22474
Index: libgfortran/generated/unpack_r16.c
22475
===================================================================
22476
--- a/src/libgfortran/generated/unpack_r16.c (.../tags/gcc_4_8_3_release)
22477
+++ b/src/libgfortran/generated/unpack_r16.c (.../branches/gcc-4_8-branch)
22482
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
22483
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
22487
@@ -244,7 +244,7 @@
22491
- ret->base_addr = xmalloc (rs * sizeof (GFC_REAL_16));
22492
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_REAL_16));
22496
Index: libgfortran/generated/maxval_i4.c
22497
===================================================================
22498
--- a/src/libgfortran/generated/maxval_i4.c (.../tags/gcc_4_8_3_release)
22499
+++ b/src/libgfortran/generated/maxval_i4.c (.../branches/gcc-4_8-branch)
22501
retarray->offset = 0;
22502
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22504
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22505
- * extent[rank-1];
22506
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22508
- retarray->base_addr = xmalloc (alloc_size);
22509
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22510
if (alloc_size == 0)
22512
/* Make sure we have a zero-sized array. */
22513
@@ -286,8 +285,7 @@
22517
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22518
- * extent[rank-1];
22519
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22521
retarray->offset = 0;
22522
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22523
@@ -299,7 +297,7 @@
22527
- retarray->base_addr = xmalloc (alloc_size);
22528
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22532
@@ -472,8 +470,7 @@
22533
retarray->offset = 0;
22534
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22536
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22537
- * extent[rank-1];
22538
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22540
if (alloc_size == 0)
22542
@@ -482,7 +479,7 @@
22546
- retarray->base_addr = xmalloc (alloc_size);
22547
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22551
Index: libgfortran/generated/minval_i8.c
22552
===================================================================
22553
--- a/src/libgfortran/generated/minval_i8.c (.../tags/gcc_4_8_3_release)
22554
+++ b/src/libgfortran/generated/minval_i8.c (.../branches/gcc-4_8-branch)
22556
retarray->offset = 0;
22557
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22559
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22560
- * extent[rank-1];
22561
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22563
- retarray->base_addr = xmalloc (alloc_size);
22564
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22565
if (alloc_size == 0)
22567
/* Make sure we have a zero-sized array. */
22568
@@ -286,8 +285,7 @@
22572
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22573
- * extent[rank-1];
22574
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22576
retarray->offset = 0;
22577
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22578
@@ -299,7 +297,7 @@
22582
- retarray->base_addr = xmalloc (alloc_size);
22583
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22587
@@ -472,8 +470,7 @@
22588
retarray->offset = 0;
22589
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22591
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22592
- * extent[rank-1];
22593
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22595
if (alloc_size == 0)
22597
@@ -482,7 +479,7 @@
22601
- retarray->base_addr = xmalloc (alloc_size);
22602
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22606
Index: libgfortran/generated/maxloc0_16_i16.c
22607
===================================================================
22608
--- a/src/libgfortran/generated/maxloc0_16_i16.c (.../tags/gcc_4_8_3_release)
22609
+++ b/src/libgfortran/generated/maxloc0_16_i16.c (.../branches/gcc-4_8-branch)
22611
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22612
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22613
retarray->offset = 0;
22614
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22615
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22619
@@ -199,7 +199,7 @@
22620
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22621
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22622
retarray->offset = 0;
22623
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22624
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22628
@@ -367,7 +367,7 @@
22629
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22630
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22631
retarray->offset = 0;
22632
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22633
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22635
else if (unlikely (compile_options.bounds_check))
22637
Index: libgfortran/generated/shape_i4.c
22638
===================================================================
22639
--- a/src/libgfortran/generated/shape_i4.c (.../tags/gcc_4_8_3_release)
22640
+++ b/src/libgfortran/generated/shape_i4.c (.../branches/gcc-4_8-branch)
22643
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
22645
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22646
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22649
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
22650
Index: libgfortran/generated/minloc1_4_i16.c
22651
===================================================================
22652
--- a/src/libgfortran/generated/minloc1_4_i16.c (.../tags/gcc_4_8_3_release)
22653
+++ b/src/libgfortran/generated/minloc1_4_i16.c (.../branches/gcc-4_8-branch)
22655
retarray->offset = 0;
22656
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22658
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22659
- * extent[rank-1];
22660
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22662
- retarray->base_addr = xmalloc (alloc_size);
22663
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22664
if (alloc_size == 0)
22666
/* Make sure we have a zero-sized array. */
22667
@@ -294,8 +293,7 @@
22671
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22672
- * extent[rank-1];
22673
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22675
retarray->offset = 0;
22676
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22677
@@ -307,7 +305,7 @@
22681
- retarray->base_addr = xmalloc (alloc_size);
22682
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22686
@@ -485,8 +483,7 @@
22687
retarray->offset = 0;
22688
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22690
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22691
- * extent[rank-1];
22692
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22694
if (alloc_size == 0)
22696
@@ -495,7 +492,7 @@
22700
- retarray->base_addr = xmalloc (alloc_size);
22701
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
22705
Index: libgfortran/generated/maxloc0_4_r10.c
22706
===================================================================
22707
--- a/src/libgfortran/generated/maxloc0_4_r10.c (.../tags/gcc_4_8_3_release)
22708
+++ b/src/libgfortran/generated/maxloc0_4_r10.c (.../branches/gcc-4_8-branch)
22710
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22711
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22712
retarray->offset = 0;
22713
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22714
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22718
@@ -199,7 +199,7 @@
22719
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22720
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22721
retarray->offset = 0;
22722
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22723
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22727
@@ -367,7 +367,7 @@
22728
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22729
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22730
retarray->offset = 0;
22731
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
22732
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
22734
else if (unlikely (compile_options.bounds_check))
22736
Index: libgfortran/generated/maxloc0_8_i16.c
22737
===================================================================
22738
--- a/src/libgfortran/generated/maxloc0_8_i16.c (.../tags/gcc_4_8_3_release)
22739
+++ b/src/libgfortran/generated/maxloc0_8_i16.c (.../branches/gcc-4_8-branch)
22741
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22742
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22743
retarray->offset = 0;
22744
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22745
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22749
@@ -199,7 +199,7 @@
22750
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22751
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22752
retarray->offset = 0;
22753
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22754
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22758
@@ -367,7 +367,7 @@
22759
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22760
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22761
retarray->offset = 0;
22762
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22763
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22765
else if (unlikely (compile_options.bounds_check))
22767
Index: libgfortran/generated/iall_i2.c
22768
===================================================================
22769
--- a/src/libgfortran/generated/iall_i2.c (.../tags/gcc_4_8_3_release)
22770
+++ b/src/libgfortran/generated/iall_i2.c (.../branches/gcc-4_8-branch)
22772
retarray->offset = 0;
22773
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22775
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22776
- * extent[rank-1];
22777
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22779
- retarray->base_addr = xmalloc (alloc_size);
22780
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
22781
if (alloc_size == 0)
22783
/* Make sure we have a zero-sized array. */
22784
@@ -272,8 +271,7 @@
22788
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22789
- * extent[rank-1];
22790
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22792
retarray->offset = 0;
22793
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22794
@@ -285,7 +283,7 @@
22798
- retarray->base_addr = xmalloc (alloc_size);
22799
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
22803
@@ -430,8 +428,7 @@
22804
retarray->offset = 0;
22805
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22807
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22808
- * extent[rank-1];
22809
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22811
if (alloc_size == 0)
22813
@@ -440,7 +437,7 @@
22817
- retarray->base_addr = xmalloc (alloc_size);
22818
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
22822
Index: libgfortran/generated/maxloc1_8_r10.c
22823
===================================================================
22824
--- a/src/libgfortran/generated/maxloc1_8_r10.c (.../tags/gcc_4_8_3_release)
22825
+++ b/src/libgfortran/generated/maxloc1_8_r10.c (.../branches/gcc-4_8-branch)
22827
retarray->offset = 0;
22828
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22830
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22831
- * extent[rank-1];
22832
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22834
- retarray->base_addr = xmalloc (alloc_size);
22835
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22836
if (alloc_size == 0)
22838
/* Make sure we have a zero-sized array. */
22839
@@ -294,8 +293,7 @@
22843
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22844
- * extent[rank-1];
22845
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22847
retarray->offset = 0;
22848
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22849
@@ -307,7 +305,7 @@
22853
- retarray->base_addr = xmalloc (alloc_size);
22854
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22858
@@ -485,8 +483,7 @@
22859
retarray->offset = 0;
22860
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22862
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22863
- * extent[rank-1];
22864
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22866
if (alloc_size == 0)
22868
@@ -495,7 +492,7 @@
22872
- retarray->base_addr = xmalloc (alloc_size);
22873
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
22877
Index: libgfortran/generated/maxloc0_16_r4.c
22878
===================================================================
22879
--- a/src/libgfortran/generated/maxloc0_16_r4.c (.../tags/gcc_4_8_3_release)
22880
+++ b/src/libgfortran/generated/maxloc0_16_r4.c (.../branches/gcc-4_8-branch)
22882
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22883
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22884
retarray->offset = 0;
22885
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22886
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22890
@@ -199,7 +199,7 @@
22891
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22892
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22893
retarray->offset = 0;
22894
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22895
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22899
@@ -367,7 +367,7 @@
22900
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22901
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22902
retarray->offset = 0;
22903
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
22904
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
22906
else if (unlikely (compile_options.bounds_check))
22908
Index: libgfortran/generated/minloc0_8_i1.c
22909
===================================================================
22910
--- a/src/libgfortran/generated/minloc0_8_i1.c (.../tags/gcc_4_8_3_release)
22911
+++ b/src/libgfortran/generated/minloc0_8_i1.c (.../branches/gcc-4_8-branch)
22913
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22914
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22915
retarray->offset = 0;
22916
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22917
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22921
@@ -199,7 +199,7 @@
22922
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
22923
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22924
retarray->offset = 0;
22925
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22926
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22930
@@ -367,7 +367,7 @@
22931
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
22932
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
22933
retarray->offset = 0;
22934
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
22935
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
22937
else if (unlikely (compile_options.bounds_check))
22939
Index: libgfortran/generated/minloc1_16_r8.c
22940
===================================================================
22941
--- a/src/libgfortran/generated/minloc1_16_r8.c (.../tags/gcc_4_8_3_release)
22942
+++ b/src/libgfortran/generated/minloc1_16_r8.c (.../branches/gcc-4_8-branch)
22944
retarray->offset = 0;
22945
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22947
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22948
- * extent[rank-1];
22949
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22951
- retarray->base_addr = xmalloc (alloc_size);
22952
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22953
if (alloc_size == 0)
22955
/* Make sure we have a zero-sized array. */
22956
@@ -294,8 +293,7 @@
22960
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22961
- * extent[rank-1];
22962
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22964
retarray->offset = 0;
22965
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22966
@@ -307,7 +305,7 @@
22970
- retarray->base_addr = xmalloc (alloc_size);
22971
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22975
@@ -485,8 +483,7 @@
22976
retarray->offset = 0;
22977
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
22979
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
22980
- * extent[rank-1];
22981
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
22983
if (alloc_size == 0)
22985
@@ -495,7 +492,7 @@
22989
- retarray->base_addr = xmalloc (alloc_size);
22990
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
22994
Index: libgfortran/generated/unpack_i8.c
22995
===================================================================
22996
--- a/src/libgfortran/generated/unpack_i8.c (.../tags/gcc_4_8_3_release)
22997
+++ b/src/libgfortran/generated/unpack_i8.c (.../branches/gcc-4_8-branch)
23002
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
23003
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
23007
@@ -244,7 +244,7 @@
23011
- ret->base_addr = xmalloc (rs * sizeof (GFC_INTEGER_8));
23012
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_INTEGER_8));
23016
Index: libgfortran/generated/maxloc0_4_i4.c
23017
===================================================================
23018
--- a/src/libgfortran/generated/maxloc0_4_i4.c (.../tags/gcc_4_8_3_release)
23019
+++ b/src/libgfortran/generated/maxloc0_4_i4.c (.../branches/gcc-4_8-branch)
23021
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23022
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23023
retarray->offset = 0;
23024
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23025
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23029
@@ -199,7 +199,7 @@
23030
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23031
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23032
retarray->offset = 0;
23033
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
23034
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23038
@@ -367,7 +367,7 @@
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_4) * rank);
23043
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
23045
else if (unlikely (compile_options.bounds_check))
23047
Index: libgfortran/generated/count_4_l.c
23048
===================================================================
23049
--- a/src/libgfortran/generated/count_4_l.c (.../tags/gcc_4_8_3_release)
23050
+++ b/src/libgfortran/generated/count_4_l.c (.../branches/gcc-4_8-branch)
23051
@@ -101,8 +101,7 @@
23052
retarray->offset = 0;
23053
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23055
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23056
- * extent[rank-1];
23057
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23059
if (alloc_size == 0)
23061
@@ -111,7 +110,7 @@
23065
- retarray->base_addr = xmalloc (alloc_size);
23066
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23070
Index: libgfortran/generated/sum_r10.c
23071
===================================================================
23072
--- a/src/libgfortran/generated/sum_r10.c (.../tags/gcc_4_8_3_release)
23073
+++ b/src/libgfortran/generated/sum_r10.c (.../branches/gcc-4_8-branch)
23075
retarray->offset = 0;
23076
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23078
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23079
- * extent[rank-1];
23080
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23082
- retarray->base_addr = xmalloc (alloc_size);
23083
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
23084
if (alloc_size == 0)
23086
/* Make sure we have a zero-sized array. */
23087
@@ -272,8 +271,7 @@
23091
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23092
- * extent[rank-1];
23093
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23095
retarray->offset = 0;
23096
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23097
@@ -285,7 +283,7 @@
23101
- retarray->base_addr = xmalloc (alloc_size);
23102
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
23106
@@ -430,8 +428,7 @@
23107
retarray->offset = 0;
23108
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23110
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23111
- * extent[rank-1];
23112
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23114
if (alloc_size == 0)
23116
@@ -440,7 +437,7 @@
23120
- retarray->base_addr = xmalloc (alloc_size);
23121
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
23125
Index: libgfortran/generated/sum_c4.c
23126
===================================================================
23127
--- a/src/libgfortran/generated/sum_c4.c (.../tags/gcc_4_8_3_release)
23128
+++ b/src/libgfortran/generated/sum_c4.c (.../branches/gcc-4_8-branch)
23130
retarray->offset = 0;
23131
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23133
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23134
- * extent[rank-1];
23135
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23137
- retarray->base_addr = xmalloc (alloc_size);
23138
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
23139
if (alloc_size == 0)
23141
/* Make sure we have a zero-sized array. */
23142
@@ -272,8 +271,7 @@
23146
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23147
- * extent[rank-1];
23148
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23150
retarray->offset = 0;
23151
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23152
@@ -285,7 +283,7 @@
23156
- retarray->base_addr = xmalloc (alloc_size);
23157
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
23161
@@ -430,8 +428,7 @@
23162
retarray->offset = 0;
23163
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23165
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23166
- * extent[rank-1];
23167
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23169
if (alloc_size == 0)
23171
@@ -440,7 +437,7 @@
23175
- retarray->base_addr = xmalloc (alloc_size);
23176
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
23180
Index: libgfortran/generated/maxloc1_16_r10.c
23181
===================================================================
23182
--- a/src/libgfortran/generated/maxloc1_16_r10.c (.../tags/gcc_4_8_3_release)
23183
+++ b/src/libgfortran/generated/maxloc1_16_r10.c (.../branches/gcc-4_8-branch)
23185
retarray->offset = 0;
23186
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23188
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23189
- * extent[rank-1];
23190
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23192
- retarray->base_addr = xmalloc (alloc_size);
23193
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23194
if (alloc_size == 0)
23196
/* Make sure we have a zero-sized array. */
23197
@@ -294,8 +293,7 @@
23201
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23202
- * extent[rank-1];
23203
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23205
retarray->offset = 0;
23206
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23207
@@ -307,7 +305,7 @@
23211
- retarray->base_addr = xmalloc (alloc_size);
23212
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23216
@@ -485,8 +483,7 @@
23217
retarray->offset = 0;
23218
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23220
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23221
- * extent[rank-1];
23222
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23224
if (alloc_size == 0)
23226
@@ -495,7 +492,7 @@
23230
- retarray->base_addr = xmalloc (alloc_size);
23231
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23235
Index: libgfortran/generated/pack_i16.c
23236
===================================================================
23237
--- a/src/libgfortran/generated/pack_i16.c (.../tags/gcc_4_8_3_release)
23238
+++ b/src/libgfortran/generated/pack_i16.c (.../branches/gcc-4_8-branch)
23239
@@ -167,8 +167,8 @@
23243
- /* xmalloc allocates a single byte for zero size. */
23244
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * total);
23245
+ /* xmallocarray allocates a single byte for zero size. */
23246
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_16));
23250
Index: libgfortran/generated/matmul_i8.c
23251
===================================================================
23252
--- a/src/libgfortran/generated/matmul_i8.c (.../tags/gcc_4_8_3_release)
23253
+++ b/src/libgfortran/generated/matmul_i8.c (.../branches/gcc-4_8-branch)
23254
@@ -124,7 +124,7 @@
23257
retarray->base_addr
23258
- = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) retarray));
23259
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_8));
23260
retarray->offset = 0;
23262
else if (unlikely (compile_options.bounds_check))
23263
Index: libgfortran/generated/maxloc0_16_i2.c
23264
===================================================================
23265
--- a/src/libgfortran/generated/maxloc0_16_i2.c (.../tags/gcc_4_8_3_release)
23266
+++ b/src/libgfortran/generated/maxloc0_16_i2.c (.../branches/gcc-4_8-branch)
23268
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23269
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23270
retarray->offset = 0;
23271
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23272
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23276
@@ -199,7 +199,7 @@
23277
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23278
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23279
retarray->offset = 0;
23280
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23281
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23285
@@ -367,7 +367,7 @@
23286
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23287
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23288
retarray->offset = 0;
23289
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
23290
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
23292
else if (unlikely (compile_options.bounds_check))
23294
Index: libgfortran/generated/spread_c4.c
23295
===================================================================
23296
--- a/src/libgfortran/generated/spread_c4.c (.../tags/gcc_4_8_3_release)
23297
+++ b/src/libgfortran/generated/spread_c4.c (.../branches/gcc-4_8-branch)
23298
@@ -101,8 +101,8 @@
23302
- /* xmalloc allocates a single byte for zero size. */
23303
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_4));
23304
+ /* xmallocarray allocates a single byte for zero size. */
23305
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_4));
23309
@@ -244,7 +244,7 @@
23311
if (ret->base_addr == NULL)
23313
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_4));
23314
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_4));
23316
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
23318
Index: libgfortran/generated/maxval_r10.c
23319
===================================================================
23320
--- a/src/libgfortran/generated/maxval_r10.c (.../tags/gcc_4_8_3_release)
23321
+++ b/src/libgfortran/generated/maxval_r10.c (.../branches/gcc-4_8-branch)
23323
retarray->offset = 0;
23324
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23326
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23327
- * extent[rank-1];
23328
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23330
- retarray->base_addr = xmalloc (alloc_size);
23331
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
23332
if (alloc_size == 0)
23334
/* Make sure we have a zero-sized array. */
23335
@@ -286,8 +285,7 @@
23339
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23340
- * extent[rank-1];
23341
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23343
retarray->offset = 0;
23344
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23345
@@ -299,7 +297,7 @@
23349
- retarray->base_addr = xmalloc (alloc_size);
23350
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
23354
@@ -472,8 +470,7 @@
23355
retarray->offset = 0;
23356
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23358
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23359
- * extent[rank-1];
23360
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23362
if (alloc_size == 0)
23364
@@ -482,7 +479,7 @@
23368
- retarray->base_addr = xmalloc (alloc_size);
23369
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
23373
Index: libgfortran/generated/pack_i4.c
23374
===================================================================
23375
--- a/src/libgfortran/generated/pack_i4.c (.../tags/gcc_4_8_3_release)
23376
+++ b/src/libgfortran/generated/pack_i4.c (.../branches/gcc-4_8-branch)
23377
@@ -167,8 +167,8 @@
23381
- /* xmalloc allocates a single byte for zero size. */
23382
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * total);
23383
+ /* xmallocarray allocates a single byte for zero size. */
23384
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_4));
23388
Index: libgfortran/generated/maxloc1_4_i1.c
23389
===================================================================
23390
--- a/src/libgfortran/generated/maxloc1_4_i1.c (.../tags/gcc_4_8_3_release)
23391
+++ b/src/libgfortran/generated/maxloc1_4_i1.c (.../branches/gcc-4_8-branch)
23393
retarray->offset = 0;
23394
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23396
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23397
- * extent[rank-1];
23398
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23400
- retarray->base_addr = xmalloc (alloc_size);
23401
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23402
if (alloc_size == 0)
23404
/* Make sure we have a zero-sized array. */
23405
@@ -294,8 +293,7 @@
23409
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23410
- * extent[rank-1];
23411
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23413
retarray->offset = 0;
23414
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23415
@@ -307,7 +305,7 @@
23419
- retarray->base_addr = xmalloc (alloc_size);
23420
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23424
@@ -485,8 +483,7 @@
23425
retarray->offset = 0;
23426
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23428
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23429
- * extent[rank-1];
23430
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23432
if (alloc_size == 0)
23434
@@ -495,7 +492,7 @@
23438
- retarray->base_addr = xmalloc (alloc_size);
23439
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23443
Index: libgfortran/generated/matmul_r10.c
23444
===================================================================
23445
--- a/src/libgfortran/generated/matmul_r10.c (.../tags/gcc_4_8_3_release)
23446
+++ b/src/libgfortran/generated/matmul_r10.c (.../branches/gcc-4_8-branch)
23447
@@ -124,7 +124,7 @@
23450
retarray->base_addr
23451
- = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) retarray));
23452
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_10));
23453
retarray->offset = 0;
23455
else if (unlikely (compile_options.bounds_check))
23456
Index: libgfortran/generated/minloc1_4_i8.c
23457
===================================================================
23458
--- a/src/libgfortran/generated/minloc1_4_i8.c (.../tags/gcc_4_8_3_release)
23459
+++ b/src/libgfortran/generated/minloc1_4_i8.c (.../branches/gcc-4_8-branch)
23461
retarray->offset = 0;
23462
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23464
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23465
- * extent[rank-1];
23466
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23468
- retarray->base_addr = xmalloc (alloc_size);
23469
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23470
if (alloc_size == 0)
23472
/* Make sure we have a zero-sized array. */
23473
@@ -294,8 +293,7 @@
23477
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23478
- * extent[rank-1];
23479
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23481
retarray->offset = 0;
23482
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23483
@@ -307,7 +305,7 @@
23487
- retarray->base_addr = xmalloc (alloc_size);
23488
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23492
@@ -485,8 +483,7 @@
23493
retarray->offset = 0;
23494
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23496
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23497
- * extent[rank-1];
23498
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23500
if (alloc_size == 0)
23502
@@ -495,7 +492,7 @@
23506
- retarray->base_addr = xmalloc (alloc_size);
23507
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23511
Index: libgfortran/generated/minloc0_8_r4.c
23512
===================================================================
23513
--- a/src/libgfortran/generated/minloc0_8_r4.c (.../tags/gcc_4_8_3_release)
23514
+++ b/src/libgfortran/generated/minloc0_8_r4.c (.../branches/gcc-4_8-branch)
23516
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23517
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23518
retarray->offset = 0;
23519
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23520
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23524
@@ -199,7 +199,7 @@
23525
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23526
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23527
retarray->offset = 0;
23528
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23529
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23533
@@ -367,7 +367,7 @@
23534
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23535
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23536
retarray->offset = 0;
23537
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23538
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23540
else if (unlikely (compile_options.bounds_check))
23542
Index: libgfortran/generated/matmul_l4.c
23543
===================================================================
23544
--- a/src/libgfortran/generated/matmul_l4.c (.../tags/gcc_4_8_3_release)
23545
+++ b/src/libgfortran/generated/matmul_l4.c (.../branches/gcc-4_8-branch)
23549
retarray->base_addr
23550
- = xmalloc (sizeof (GFC_LOGICAL_4) * size0 ((array_t *) retarray));
23551
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_4));
23552
retarray->offset = 0;
23554
else if (unlikely (compile_options.bounds_check))
23555
Index: libgfortran/generated/reshape_r8.c
23556
===================================================================
23557
--- a/src/libgfortran/generated/reshape_r8.c (.../tags/gcc_4_8_3_release)
23558
+++ b/src/libgfortran/generated/reshape_r8.c (.../branches/gcc-4_8-branch)
23559
@@ -111,11 +111,11 @@
23562
if (unlikely (rs < 1))
23566
- alloc_size = rs * sizeof (GFC_REAL_8);
23569
- ret->base_addr = xmalloc (alloc_size);
23570
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
23571
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
23574
Index: libgfortran/generated/in_pack_c10.c
23575
===================================================================
23576
--- a/src/libgfortran/generated/in_pack_c10.c (.../tags/gcc_4_8_3_release)
23577
+++ b/src/libgfortran/generated/in_pack_c10.c (.../branches/gcc-4_8-branch)
23579
return source->base_addr;
23581
/* Allocate storage for the destination. */
23582
- destptr = (GFC_COMPLEX_10 *)xmalloc (ssize * sizeof (GFC_COMPLEX_10));
23583
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_10));
23585
src = source->base_addr;
23586
stride0 = stride[0];
23587
Index: libgfortran/generated/all_l4.c
23588
===================================================================
23589
--- a/src/libgfortran/generated/all_l4.c (.../tags/gcc_4_8_3_release)
23590
+++ b/src/libgfortran/generated/all_l4.c (.../branches/gcc-4_8-branch)
23591
@@ -101,8 +101,7 @@
23592
retarray->offset = 0;
23593
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23595
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23596
- * extent[rank-1];
23597
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23599
if (alloc_size == 0)
23601
@@ -111,7 +110,7 @@
23605
- retarray->base_addr = xmalloc (alloc_size);
23606
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
23610
Index: libgfortran/generated/minloc0_8_i2.c
23611
===================================================================
23612
--- a/src/libgfortran/generated/minloc0_8_i2.c (.../tags/gcc_4_8_3_release)
23613
+++ b/src/libgfortran/generated/minloc0_8_i2.c (.../branches/gcc-4_8-branch)
23615
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23616
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23617
retarray->offset = 0;
23618
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23619
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23623
@@ -199,7 +199,7 @@
23624
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
23625
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23626
retarray->offset = 0;
23627
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23628
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23632
@@ -367,7 +367,7 @@
23633
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
23634
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
23635
retarray->offset = 0;
23636
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
23637
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
23639
else if (unlikely (compile_options.bounds_check))
23641
Index: libgfortran/generated/norm2_r16.c
23642
===================================================================
23643
--- a/src/libgfortran/generated/norm2_r16.c (.../tags/gcc_4_8_3_release)
23644
+++ b/src/libgfortran/generated/norm2_r16.c (.../branches/gcc-4_8-branch)
23645
@@ -105,10 +105,9 @@
23646
retarray->offset = 0;
23647
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23649
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23650
- * extent[rank-1];
23651
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23653
- retarray->base_addr = xmalloc (alloc_size);
23654
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
23655
if (alloc_size == 0)
23657
/* Make sure we have a zero-sized array. */
23658
Index: libgfortran/generated/reshape_c10.c
23659
===================================================================
23660
--- a/src/libgfortran/generated/reshape_c10.c (.../tags/gcc_4_8_3_release)
23661
+++ b/src/libgfortran/generated/reshape_c10.c (.../branches/gcc-4_8-branch)
23662
@@ -111,11 +111,11 @@
23665
if (unlikely (rs < 1))
23669
- alloc_size = rs * sizeof (GFC_COMPLEX_10);
23672
- ret->base_addr = xmalloc (alloc_size);
23673
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
23674
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
23677
Index: libgfortran/generated/unpack_c16.c
23678
===================================================================
23679
--- a/src/libgfortran/generated/unpack_c16.c (.../tags/gcc_4_8_3_release)
23680
+++ b/src/libgfortran/generated/unpack_c16.c (.../branches/gcc-4_8-branch)
23685
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
23686
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
23690
@@ -244,7 +244,7 @@
23694
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_16));
23695
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_16));
23699
Index: libgfortran/generated/maxloc1_4_r4.c
23700
===================================================================
23701
--- a/src/libgfortran/generated/maxloc1_4_r4.c (.../tags/gcc_4_8_3_release)
23702
+++ b/src/libgfortran/generated/maxloc1_4_r4.c (.../branches/gcc-4_8-branch)
23704
retarray->offset = 0;
23705
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23707
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23708
- * extent[rank-1];
23709
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23711
- retarray->base_addr = xmalloc (alloc_size);
23712
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23713
if (alloc_size == 0)
23715
/* Make sure we have a zero-sized array. */
23716
@@ -294,8 +293,7 @@
23720
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23721
- * extent[rank-1];
23722
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23724
retarray->offset = 0;
23725
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23726
@@ -307,7 +305,7 @@
23730
- retarray->base_addr = xmalloc (alloc_size);
23731
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23735
@@ -485,8 +483,7 @@
23736
retarray->offset = 0;
23737
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23739
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23740
- * extent[rank-1];
23741
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23743
if (alloc_size == 0)
23745
@@ -495,7 +492,7 @@
23749
- retarray->base_addr = xmalloc (alloc_size);
23750
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23754
Index: libgfortran/generated/maxval_r8.c
23755
===================================================================
23756
--- a/src/libgfortran/generated/maxval_r8.c (.../tags/gcc_4_8_3_release)
23757
+++ b/src/libgfortran/generated/maxval_r8.c (.../branches/gcc-4_8-branch)
23759
retarray->offset = 0;
23760
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23762
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23763
- * extent[rank-1];
23764
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23766
- retarray->base_addr = xmalloc (alloc_size);
23767
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
23768
if (alloc_size == 0)
23770
/* Make sure we have a zero-sized array. */
23771
@@ -286,8 +285,7 @@
23775
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23776
- * extent[rank-1];
23777
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23779
retarray->offset = 0;
23780
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23781
@@ -299,7 +297,7 @@
23785
- retarray->base_addr = xmalloc (alloc_size);
23786
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
23790
@@ -472,8 +470,7 @@
23791
retarray->offset = 0;
23792
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23794
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23795
- * extent[rank-1];
23796
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23798
if (alloc_size == 0)
23800
@@ -482,7 +479,7 @@
23804
- retarray->base_addr = xmalloc (alloc_size);
23805
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
23809
Index: libgfortran/generated/transpose_c4.c
23810
===================================================================
23811
--- a/src/libgfortran/generated/transpose_c4.c (.../tags/gcc_4_8_3_release)
23812
+++ b/src/libgfortran/generated/transpose_c4.c (.../branches/gcc-4_8-branch)
23814
GFC_DIMENSION_SET(ret->dim[1], 0, GFC_DESCRIPTOR_EXTENT(source,0) - 1,
23815
GFC_DESCRIPTOR_EXTENT(source, 1));
23817
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) ret));
23818
+ ret->base_addr = xmallocarray (size0 ((array_t *) ret),
23819
+ sizeof (GFC_COMPLEX_4));
23821
} else if (unlikely (compile_options.bounds_check))
23823
Index: libgfortran/generated/eoshift1_4.c
23824
===================================================================
23825
--- a/src/libgfortran/generated/eoshift1_4.c (.../tags/gcc_4_8_3_release)
23826
+++ b/src/libgfortran/generated/eoshift1_4.c (.../branches/gcc-4_8-branch)
23827
@@ -105,8 +105,8 @@
23828
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
23831
- /* xmalloc allocates a single byte for zero size. */
23832
- ret->base_addr = xmalloc (size * arraysize);
23833
+ /* xmallocarray allocates a single byte for zero size. */
23834
+ ret->base_addr = xmallocarray (arraysize, size);
23837
else if (unlikely (compile_options.bounds_check))
23838
Index: libgfortran/generated/minval_r16.c
23839
===================================================================
23840
--- a/src/libgfortran/generated/minval_r16.c (.../tags/gcc_4_8_3_release)
23841
+++ b/src/libgfortran/generated/minval_r16.c (.../branches/gcc-4_8-branch)
23843
retarray->offset = 0;
23844
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23846
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23847
- * extent[rank-1];
23848
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23850
- retarray->base_addr = xmalloc (alloc_size);
23851
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
23852
if (alloc_size == 0)
23854
/* Make sure we have a zero-sized array. */
23855
@@ -286,8 +285,7 @@
23859
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23860
- * extent[rank-1];
23861
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23863
retarray->offset = 0;
23864
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23865
@@ -299,7 +297,7 @@
23869
- retarray->base_addr = xmalloc (alloc_size);
23870
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
23874
@@ -472,8 +470,7 @@
23875
retarray->offset = 0;
23876
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23878
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23879
- * extent[rank-1];
23880
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23882
if (alloc_size == 0)
23884
@@ -482,7 +479,7 @@
23888
- retarray->base_addr = xmalloc (alloc_size);
23889
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
23893
Index: libgfortran/generated/iany_i16.c
23894
===================================================================
23895
--- a/src/libgfortran/generated/iany_i16.c (.../tags/gcc_4_8_3_release)
23896
+++ b/src/libgfortran/generated/iany_i16.c (.../branches/gcc-4_8-branch)
23898
retarray->offset = 0;
23899
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23901
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23902
- * extent[rank-1];
23903
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23905
- retarray->base_addr = xmalloc (alloc_size);
23906
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23907
if (alloc_size == 0)
23909
/* Make sure we have a zero-sized array. */
23910
@@ -272,8 +271,7 @@
23914
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23915
- * extent[rank-1];
23916
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23918
retarray->offset = 0;
23919
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23920
@@ -285,7 +283,7 @@
23924
- retarray->base_addr = xmalloc (alloc_size);
23925
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23929
@@ -430,8 +428,7 @@
23930
retarray->offset = 0;
23931
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23933
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23934
- * extent[rank-1];
23935
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23937
if (alloc_size == 0)
23939
@@ -440,7 +437,7 @@
23943
- retarray->base_addr = xmalloc (alloc_size);
23944
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
23948
Index: libgfortran/generated/maxloc1_4_i2.c
23949
===================================================================
23950
--- a/src/libgfortran/generated/maxloc1_4_i2.c (.../tags/gcc_4_8_3_release)
23951
+++ b/src/libgfortran/generated/maxloc1_4_i2.c (.../branches/gcc-4_8-branch)
23953
retarray->offset = 0;
23954
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23956
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23957
- * extent[rank-1];
23958
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23960
- retarray->base_addr = xmalloc (alloc_size);
23961
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23962
if (alloc_size == 0)
23964
/* Make sure we have a zero-sized array. */
23965
@@ -294,8 +293,7 @@
23969
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23970
- * extent[rank-1];
23971
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23973
retarray->offset = 0;
23974
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23975
@@ -307,7 +305,7 @@
23979
- retarray->base_addr = xmalloc (alloc_size);
23980
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
23984
@@ -485,8 +483,7 @@
23985
retarray->offset = 0;
23986
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
23988
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
23989
- * extent[rank-1];
23990
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
23992
if (alloc_size == 0)
23994
@@ -495,7 +492,7 @@
23998
- retarray->base_addr = xmalloc (alloc_size);
23999
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24003
Index: libgfortran/generated/maxloc1_8_i8.c
24004
===================================================================
24005
--- a/src/libgfortran/generated/maxloc1_8_i8.c (.../tags/gcc_4_8_3_release)
24006
+++ b/src/libgfortran/generated/maxloc1_8_i8.c (.../branches/gcc-4_8-branch)
24008
retarray->offset = 0;
24009
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24011
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24012
- * extent[rank-1];
24013
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24015
- retarray->base_addr = xmalloc (alloc_size);
24016
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24017
if (alloc_size == 0)
24019
/* Make sure we have a zero-sized array. */
24020
@@ -294,8 +293,7 @@
24024
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24025
- * extent[rank-1];
24026
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24028
retarray->offset = 0;
24029
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24030
@@ -307,7 +305,7 @@
24034
- retarray->base_addr = xmalloc (alloc_size);
24035
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24039
@@ -485,8 +483,7 @@
24040
retarray->offset = 0;
24041
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24043
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24044
- * extent[rank-1];
24045
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24047
if (alloc_size == 0)
24049
@@ -495,7 +492,7 @@
24053
- retarray->base_addr = xmalloc (alloc_size);
24054
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24058
Index: libgfortran/generated/maxloc0_4_r8.c
24059
===================================================================
24060
--- a/src/libgfortran/generated/maxloc0_4_r8.c (.../tags/gcc_4_8_3_release)
24061
+++ b/src/libgfortran/generated/maxloc0_4_r8.c (.../branches/gcc-4_8-branch)
24063
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24064
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24065
retarray->offset = 0;
24066
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24067
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24071
@@ -199,7 +199,7 @@
24072
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24073
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24074
retarray->offset = 0;
24075
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24076
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24080
@@ -367,7 +367,7 @@
24081
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24082
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24083
retarray->offset = 0;
24084
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
24085
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
24087
else if (unlikely (compile_options.bounds_check))
24089
Index: libgfortran/generated/maxloc0_16_r16.c
24090
===================================================================
24091
--- a/src/libgfortran/generated/maxloc0_16_r16.c (.../tags/gcc_4_8_3_release)
24092
+++ b/src/libgfortran/generated/maxloc0_16_r16.c (.../branches/gcc-4_8-branch)
24094
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24095
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24096
retarray->offset = 0;
24097
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24098
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24102
@@ -199,7 +199,7 @@
24103
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24104
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24105
retarray->offset = 0;
24106
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24107
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24111
@@ -367,7 +367,7 @@
24112
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24113
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24114
retarray->offset = 0;
24115
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24116
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24118
else if (unlikely (compile_options.bounds_check))
24120
Index: libgfortran/generated/sum_c10.c
24121
===================================================================
24122
--- a/src/libgfortran/generated/sum_c10.c (.../tags/gcc_4_8_3_release)
24123
+++ b/src/libgfortran/generated/sum_c10.c (.../branches/gcc-4_8-branch)
24125
retarray->offset = 0;
24126
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24128
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24129
- * extent[rank-1];
24130
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24132
- retarray->base_addr = xmalloc (alloc_size);
24133
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
24134
if (alloc_size == 0)
24136
/* Make sure we have a zero-sized array. */
24137
@@ -272,8 +271,7 @@
24141
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24142
- * extent[rank-1];
24143
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24145
retarray->offset = 0;
24146
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24147
@@ -285,7 +283,7 @@
24151
- retarray->base_addr = xmalloc (alloc_size);
24152
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
24156
@@ -430,8 +428,7 @@
24157
retarray->offset = 0;
24158
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24160
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24161
- * extent[rank-1];
24162
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24164
if (alloc_size == 0)
24166
@@ -440,7 +437,7 @@
24170
- retarray->base_addr = xmalloc (alloc_size);
24171
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
24175
Index: libgfortran/generated/iall_i4.c
24176
===================================================================
24177
--- a/src/libgfortran/generated/iall_i4.c (.../tags/gcc_4_8_3_release)
24178
+++ b/src/libgfortran/generated/iall_i4.c (.../branches/gcc-4_8-branch)
24180
retarray->offset = 0;
24181
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24183
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24184
- * extent[rank-1];
24185
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24187
- retarray->base_addr = xmalloc (alloc_size);
24188
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24189
if (alloc_size == 0)
24191
/* Make sure we have a zero-sized array. */
24192
@@ -272,8 +271,7 @@
24196
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24197
- * extent[rank-1];
24198
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24200
retarray->offset = 0;
24201
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24202
@@ -285,7 +283,7 @@
24206
- retarray->base_addr = xmalloc (alloc_size);
24207
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24211
@@ -430,8 +428,7 @@
24212
retarray->offset = 0;
24213
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24215
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24216
- * extent[rank-1];
24217
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24219
if (alloc_size == 0)
24221
@@ -440,7 +437,7 @@
24225
- retarray->base_addr = xmalloc (alloc_size);
24226
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24230
Index: libgfortran/generated/minloc1_4_r16.c
24231
===================================================================
24232
--- a/src/libgfortran/generated/minloc1_4_r16.c (.../tags/gcc_4_8_3_release)
24233
+++ b/src/libgfortran/generated/minloc1_4_r16.c (.../branches/gcc-4_8-branch)
24235
retarray->offset = 0;
24236
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24238
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24239
- * extent[rank-1];
24240
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24242
- retarray->base_addr = xmalloc (alloc_size);
24243
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24244
if (alloc_size == 0)
24246
/* Make sure we have a zero-sized array. */
24247
@@ -294,8 +293,7 @@
24251
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24252
- * extent[rank-1];
24253
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24255
retarray->offset = 0;
24256
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24257
@@ -307,7 +305,7 @@
24261
- retarray->base_addr = xmalloc (alloc_size);
24262
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24266
@@ -485,8 +483,7 @@
24267
retarray->offset = 0;
24268
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24270
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24271
- * extent[rank-1];
24272
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24274
if (alloc_size == 0)
24276
@@ -495,7 +492,7 @@
24280
- retarray->base_addr = xmalloc (alloc_size);
24281
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24285
Index: libgfortran/generated/maxloc0_8_r16.c
24286
===================================================================
24287
--- a/src/libgfortran/generated/maxloc0_8_r16.c (.../tags/gcc_4_8_3_release)
24288
+++ b/src/libgfortran/generated/maxloc0_8_r16.c (.../branches/gcc-4_8-branch)
24290
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24291
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24292
retarray->offset = 0;
24293
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24294
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24298
@@ -199,7 +199,7 @@
24299
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24300
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24301
retarray->offset = 0;
24302
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24303
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24307
@@ -367,7 +367,7 @@
24308
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24309
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24310
retarray->offset = 0;
24311
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24312
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24314
else if (unlikely (compile_options.bounds_check))
24316
Index: libgfortran/generated/pack_r8.c
24317
===================================================================
24318
--- a/src/libgfortran/generated/pack_r8.c (.../tags/gcc_4_8_3_release)
24319
+++ b/src/libgfortran/generated/pack_r8.c (.../branches/gcc-4_8-branch)
24320
@@ -167,8 +167,8 @@
24324
- /* xmalloc allocates a single byte for zero size. */
24325
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * total);
24326
+ /* xmallocarray allocates a single byte for zero size. */
24327
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_8));
24331
Index: libgfortran/generated/matmul_c10.c
24332
===================================================================
24333
--- a/src/libgfortran/generated/matmul_c10.c (.../tags/gcc_4_8_3_release)
24334
+++ b/src/libgfortran/generated/matmul_c10.c (.../branches/gcc-4_8-branch)
24335
@@ -124,7 +124,7 @@
24338
retarray->base_addr
24339
- = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) retarray));
24340
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_10));
24341
retarray->offset = 0;
24343
else if (unlikely (compile_options.bounds_check))
24344
Index: libgfortran/generated/maxloc0_16_i4.c
24345
===================================================================
24346
--- a/src/libgfortran/generated/maxloc0_16_i4.c (.../tags/gcc_4_8_3_release)
24347
+++ b/src/libgfortran/generated/maxloc0_16_i4.c (.../branches/gcc-4_8-branch)
24349
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24350
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24351
retarray->offset = 0;
24352
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24353
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24357
@@ -199,7 +199,7 @@
24358
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24359
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24360
retarray->offset = 0;
24361
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24362
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24366
@@ -367,7 +367,7 @@
24367
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24368
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24369
retarray->offset = 0;
24370
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24371
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24373
else if (unlikely (compile_options.bounds_check))
24375
Index: libgfortran/generated/pack_r16.c
24376
===================================================================
24377
--- a/src/libgfortran/generated/pack_r16.c (.../tags/gcc_4_8_3_release)
24378
+++ b/src/libgfortran/generated/pack_r16.c (.../branches/gcc-4_8-branch)
24379
@@ -167,8 +167,8 @@
24383
- /* xmalloc allocates a single byte for zero size. */
24384
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * total);
24385
+ /* xmallocarray allocates a single byte for zero size. */
24386
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_16));
24390
Index: libgfortran/generated/minloc1_16_i8.c
24391
===================================================================
24392
--- a/src/libgfortran/generated/minloc1_16_i8.c (.../tags/gcc_4_8_3_release)
24393
+++ b/src/libgfortran/generated/minloc1_16_i8.c (.../branches/gcc-4_8-branch)
24395
retarray->offset = 0;
24396
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24398
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24399
- * extent[rank-1];
24400
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24402
- retarray->base_addr = xmalloc (alloc_size);
24403
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24404
if (alloc_size == 0)
24406
/* Make sure we have a zero-sized array. */
24407
@@ -294,8 +293,7 @@
24411
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24412
- * extent[rank-1];
24413
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24415
retarray->offset = 0;
24416
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24417
@@ -307,7 +305,7 @@
24421
- retarray->base_addr = xmalloc (alloc_size);
24422
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24426
@@ -485,8 +483,7 @@
24427
retarray->offset = 0;
24428
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24430
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24431
- * extent[rank-1];
24432
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24434
if (alloc_size == 0)
24436
@@ -495,7 +492,7 @@
24440
- retarray->base_addr = xmalloc (alloc_size);
24441
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24445
Index: libgfortran/generated/minloc0_16_r10.c
24446
===================================================================
24447
--- a/src/libgfortran/generated/minloc0_16_r10.c (.../tags/gcc_4_8_3_release)
24448
+++ b/src/libgfortran/generated/minloc0_16_r10.c (.../branches/gcc-4_8-branch)
24450
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24451
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24452
retarray->offset = 0;
24453
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24454
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24458
@@ -199,7 +199,7 @@
24459
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24460
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24461
retarray->offset = 0;
24462
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24463
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24467
@@ -367,7 +367,7 @@
24468
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24469
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24470
retarray->offset = 0;
24471
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
24472
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
24474
else if (unlikely (compile_options.bounds_check))
24476
Index: libgfortran/generated/unpack_c4.c
24477
===================================================================
24478
--- a/src/libgfortran/generated/unpack_c4.c (.../tags/gcc_4_8_3_release)
24479
+++ b/src/libgfortran/generated/unpack_c4.c (.../branches/gcc-4_8-branch)
24484
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
24485
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
24489
@@ -244,7 +244,7 @@
24493
- ret->base_addr = xmalloc (rs * sizeof (GFC_COMPLEX_4));
24494
+ ret->base_addr = xmallocarray (rs, sizeof (GFC_COMPLEX_4));
24498
Index: libgfortran/generated/iparity_i1.c
24499
===================================================================
24500
--- a/src/libgfortran/generated/iparity_i1.c (.../tags/gcc_4_8_3_release)
24501
+++ b/src/libgfortran/generated/iparity_i1.c (.../branches/gcc-4_8-branch)
24503
retarray->offset = 0;
24504
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24506
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24507
- * extent[rank-1];
24508
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24510
- retarray->base_addr = xmalloc (alloc_size);
24511
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
24512
if (alloc_size == 0)
24514
/* Make sure we have a zero-sized array. */
24515
@@ -272,8 +271,7 @@
24519
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24520
- * extent[rank-1];
24521
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24523
retarray->offset = 0;
24524
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24525
@@ -285,7 +283,7 @@
24529
- retarray->base_addr = xmalloc (alloc_size);
24530
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
24534
@@ -430,8 +428,7 @@
24535
retarray->offset = 0;
24536
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24538
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24539
- * extent[rank-1];
24540
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24542
if (alloc_size == 0)
24544
@@ -440,7 +437,7 @@
24548
- retarray->base_addr = xmalloc (alloc_size);
24549
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
24553
Index: libgfortran/generated/product_c8.c
24554
===================================================================
24555
--- a/src/libgfortran/generated/product_c8.c (.../tags/gcc_4_8_3_release)
24556
+++ b/src/libgfortran/generated/product_c8.c (.../branches/gcc-4_8-branch)
24558
retarray->offset = 0;
24559
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24561
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24562
- * extent[rank-1];
24563
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24565
- retarray->base_addr = xmalloc (alloc_size);
24566
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
24567
if (alloc_size == 0)
24569
/* Make sure we have a zero-sized array. */
24570
@@ -272,8 +271,7 @@
24574
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24575
- * extent[rank-1];
24576
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24578
retarray->offset = 0;
24579
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24580
@@ -285,7 +283,7 @@
24584
- retarray->base_addr = xmalloc (alloc_size);
24585
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
24589
@@ -430,8 +428,7 @@
24590
retarray->offset = 0;
24591
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24593
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24594
- * extent[rank-1];
24595
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24597
if (alloc_size == 0)
24599
@@ -440,7 +437,7 @@
24603
- retarray->base_addr = xmalloc (alloc_size);
24604
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
24608
Index: libgfortran/generated/in_pack_i16.c
24609
===================================================================
24610
--- a/src/libgfortran/generated/in_pack_i16.c (.../tags/gcc_4_8_3_release)
24611
+++ b/src/libgfortran/generated/in_pack_i16.c (.../branches/gcc-4_8-branch)
24613
return source->base_addr;
24615
/* Allocate storage for the destination. */
24616
- destptr = (GFC_INTEGER_16 *)xmalloc (ssize * sizeof (GFC_INTEGER_16));
24617
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_16));
24619
src = source->base_addr;
24620
stride0 = stride[0];
24621
Index: libgfortran/generated/minloc0_8_i4.c
24622
===================================================================
24623
--- a/src/libgfortran/generated/minloc0_8_i4.c (.../tags/gcc_4_8_3_release)
24624
+++ b/src/libgfortran/generated/minloc0_8_i4.c (.../branches/gcc-4_8-branch)
24626
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24627
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24628
retarray->offset = 0;
24629
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24630
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24634
@@ -199,7 +199,7 @@
24635
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
24636
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24637
retarray->offset = 0;
24638
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24639
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24643
@@ -367,7 +367,7 @@
24644
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
24645
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
24646
retarray->offset = 0;
24647
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
24648
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
24650
else if (unlikely (compile_options.bounds_check))
24652
Index: libgfortran/generated/matmul_c4.c
24653
===================================================================
24654
--- a/src/libgfortran/generated/matmul_c4.c (.../tags/gcc_4_8_3_release)
24655
+++ b/src/libgfortran/generated/matmul_c4.c (.../branches/gcc-4_8-branch)
24656
@@ -124,7 +124,7 @@
24659
retarray->base_addr
24660
- = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) retarray));
24661
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_4));
24662
retarray->offset = 0;
24664
else if (unlikely (compile_options.bounds_check))
24665
Index: libgfortran/generated/reshape_i8.c
24666
===================================================================
24667
--- a/src/libgfortran/generated/reshape_i8.c (.../tags/gcc_4_8_3_release)
24668
+++ b/src/libgfortran/generated/reshape_i8.c (.../branches/gcc-4_8-branch)
24669
@@ -111,11 +111,11 @@
24672
if (unlikely (rs < 1))
24676
- alloc_size = rs * sizeof (GFC_INTEGER_8);
24679
- ret->base_addr = xmalloc (alloc_size);
24680
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24681
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
24684
Index: libgfortran/generated/in_pack_c8.c
24685
===================================================================
24686
--- a/src/libgfortran/generated/in_pack_c8.c (.../tags/gcc_4_8_3_release)
24687
+++ b/src/libgfortran/generated/in_pack_c8.c (.../branches/gcc-4_8-branch)
24689
return source->base_addr;
24691
/* Allocate storage for the destination. */
24692
- destptr = (GFC_COMPLEX_8 *)xmalloc (ssize * sizeof (GFC_COMPLEX_8));
24693
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_8));
24695
src = source->base_addr;
24696
stride0 = stride[0];
24697
Index: libgfortran/generated/bessel_r10.c
24698
===================================================================
24699
--- a/src/libgfortran/generated/bessel_r10.c (.../tags/gcc_4_8_3_release)
24700
+++ b/src/libgfortran/generated/bessel_r10.c (.../branches/gcc-4_8-branch)
24703
size_t size = n2 < n1 ? 0 : n2-n1+1;
24704
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
24705
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
24706
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
24710
@@ -122,7 +122,7 @@
24712
size_t size = n2 < n1 ? 0 : n2-n1+1;
24713
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
24714
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
24715
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
24719
@@ -162,7 +162,7 @@
24721
x2rev = GFC_REAL_10_LITERAL(2.)/x;
24723
- for (i = 2; i <= n1+n2; i++)
24724
+ for (i = 2; i <= n2 - n1; i++)
24726
#if defined(GFC_REAL_10_INFINITY)
24727
if (unlikely (last2 == -GFC_REAL_10_INFINITY))
24728
Index: libgfortran/generated/iall_i16.c
24729
===================================================================
24730
--- a/src/libgfortran/generated/iall_i16.c (.../tags/gcc_4_8_3_release)
24731
+++ b/src/libgfortran/generated/iall_i16.c (.../branches/gcc-4_8-branch)
24733
retarray->offset = 0;
24734
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24736
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24737
- * extent[rank-1];
24738
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24740
- retarray->base_addr = xmalloc (alloc_size);
24741
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24742
if (alloc_size == 0)
24744
/* Make sure we have a zero-sized array. */
24745
@@ -272,8 +271,7 @@
24749
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24750
- * extent[rank-1];
24751
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24753
retarray->offset = 0;
24754
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24755
@@ -285,7 +283,7 @@
24759
- retarray->base_addr = xmalloc (alloc_size);
24760
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24764
@@ -430,8 +428,7 @@
24765
retarray->offset = 0;
24766
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24768
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24769
- * extent[rank-1];
24770
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24772
if (alloc_size == 0)
24774
@@ -440,7 +437,7 @@
24778
- retarray->base_addr = xmalloc (alloc_size);
24779
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24783
Index: libgfortran/generated/maxloc1_16_i1.c
24784
===================================================================
24785
--- a/src/libgfortran/generated/maxloc1_16_i1.c (.../tags/gcc_4_8_3_release)
24786
+++ b/src/libgfortran/generated/maxloc1_16_i1.c (.../branches/gcc-4_8-branch)
24788
retarray->offset = 0;
24789
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24791
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24792
- * extent[rank-1];
24793
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24795
- retarray->base_addr = xmalloc (alloc_size);
24796
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24797
if (alloc_size == 0)
24799
/* Make sure we have a zero-sized array. */
24800
@@ -294,8 +293,7 @@
24804
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24805
- * extent[rank-1];
24806
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24808
retarray->offset = 0;
24809
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24810
@@ -307,7 +305,7 @@
24814
- retarray->base_addr = xmalloc (alloc_size);
24815
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24819
@@ -485,8 +483,7 @@
24820
retarray->offset = 0;
24821
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24823
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24824
- * extent[rank-1];
24825
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24827
if (alloc_size == 0)
24829
@@ -495,7 +492,7 @@
24833
- retarray->base_addr = xmalloc (alloc_size);
24834
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24838
Index: libgfortran/generated/reshape_i16.c
24839
===================================================================
24840
--- a/src/libgfortran/generated/reshape_i16.c (.../tags/gcc_4_8_3_release)
24841
+++ b/src/libgfortran/generated/reshape_i16.c (.../branches/gcc-4_8-branch)
24842
@@ -111,11 +111,11 @@
24845
if (unlikely (rs < 1))
24849
- alloc_size = rs * sizeof (GFC_INTEGER_16);
24852
- ret->base_addr = xmalloc (alloc_size);
24853
+ ret->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24854
ret->dtype = (source->dtype & ~GFC_DTYPE_RANK_MASK) | rdim;
24857
Index: libgfortran/generated/count_16_l.c
24858
===================================================================
24859
--- a/src/libgfortran/generated/count_16_l.c (.../tags/gcc_4_8_3_release)
24860
+++ b/src/libgfortran/generated/count_16_l.c (.../branches/gcc-4_8-branch)
24861
@@ -101,8 +101,7 @@
24862
retarray->offset = 0;
24863
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24865
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24866
- * extent[rank-1];
24867
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24869
if (alloc_size == 0)
24871
@@ -111,7 +110,7 @@
24875
- retarray->base_addr = xmalloc (alloc_size);
24876
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
24880
Index: libgfortran/generated/minloc1_8_i1.c
24881
===================================================================
24882
--- a/src/libgfortran/generated/minloc1_8_i1.c (.../tags/gcc_4_8_3_release)
24883
+++ b/src/libgfortran/generated/minloc1_8_i1.c (.../branches/gcc-4_8-branch)
24885
retarray->offset = 0;
24886
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24888
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24889
- * extent[rank-1];
24890
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24892
- retarray->base_addr = xmalloc (alloc_size);
24893
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24894
if (alloc_size == 0)
24896
/* Make sure we have a zero-sized array. */
24897
@@ -294,8 +293,7 @@
24901
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24902
- * extent[rank-1];
24903
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24905
retarray->offset = 0;
24906
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24907
@@ -307,7 +305,7 @@
24911
- retarray->base_addr = xmalloc (alloc_size);
24912
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24916
@@ -485,8 +483,7 @@
24917
retarray->offset = 0;
24918
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24920
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24921
- * extent[rank-1];
24922
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24924
if (alloc_size == 0)
24926
@@ -495,7 +492,7 @@
24930
- retarray->base_addr = xmalloc (alloc_size);
24931
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
24935
Index: libgfortran/generated/maxloc1_4_i4.c
24936
===================================================================
24937
--- a/src/libgfortran/generated/maxloc1_4_i4.c (.../tags/gcc_4_8_3_release)
24938
+++ b/src/libgfortran/generated/maxloc1_4_i4.c (.../branches/gcc-4_8-branch)
24940
retarray->offset = 0;
24941
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24943
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24944
- * extent[rank-1];
24945
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24947
- retarray->base_addr = xmalloc (alloc_size);
24948
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24949
if (alloc_size == 0)
24951
/* Make sure we have a zero-sized array. */
24952
@@ -294,8 +293,7 @@
24956
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24957
- * extent[rank-1];
24958
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24960
retarray->offset = 0;
24961
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24962
@@ -307,7 +305,7 @@
24966
- retarray->base_addr = xmalloc (alloc_size);
24967
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24971
@@ -485,8 +483,7 @@
24972
retarray->offset = 0;
24973
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24975
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24976
- * extent[rank-1];
24977
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
24979
if (alloc_size == 0)
24981
@@ -495,7 +492,7 @@
24985
- retarray->base_addr = xmalloc (alloc_size);
24986
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
24990
Index: libgfortran/generated/maxval_i8.c
24991
===================================================================
24992
--- a/src/libgfortran/generated/maxval_i8.c (.../tags/gcc_4_8_3_release)
24993
+++ b/src/libgfortran/generated/maxval_i8.c (.../branches/gcc-4_8-branch)
24995
retarray->offset = 0;
24996
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
24998
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
24999
- * extent[rank-1];
25000
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25002
- retarray->base_addr = xmalloc (alloc_size);
25003
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25004
if (alloc_size == 0)
25006
/* Make sure we have a zero-sized array. */
25007
@@ -286,8 +285,7 @@
25011
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25012
- * extent[rank-1];
25013
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25015
retarray->offset = 0;
25016
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25017
@@ -299,7 +297,7 @@
25021
- retarray->base_addr = xmalloc (alloc_size);
25022
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25026
@@ -472,8 +470,7 @@
25027
retarray->offset = 0;
25028
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25030
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25031
- * extent[rank-1];
25032
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25034
if (alloc_size == 0)
25036
@@ -482,7 +479,7 @@
25040
- retarray->base_addr = xmalloc (alloc_size);
25041
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25045
Index: libgfortran/generated/eoshift3_16.c
25046
===================================================================
25047
--- a/src/libgfortran/generated/eoshift3_16.c (.../tags/gcc_4_8_3_release)
25048
+++ b/src/libgfortran/generated/eoshift3_16.c (.../branches/gcc-4_8-branch)
25053
- ret->base_addr = xmalloc (size * arraysize);
25054
+ ret->base_addr = xmallocarray (arraysize, size);
25056
ret->dtype = array->dtype;
25057
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
25058
@@ -107,8 +107,8 @@
25059
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
25062
- /* xmalloc allocates a single byte for zero size. */
25063
- ret->base_addr = xmalloc (size * arraysize);
25064
+ /* xmallocarray allocates a single byte for zero size. */
25065
+ ret->base_addr = xmallocarray (arraysize, size);
25068
else if (unlikely (compile_options.bounds_check))
25069
Index: libgfortran/generated/shape_i8.c
25070
===================================================================
25071
--- a/src/libgfortran/generated/shape_i8.c (.../tags/gcc_4_8_3_release)
25072
+++ b/src/libgfortran/generated/shape_i8.c (.../branches/gcc-4_8-branch)
25075
GFC_DIMENSION_SET(ret->dim[0], 0, rank - 1, 1);
25077
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25078
+ ret->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25081
stride = GFC_DESCRIPTOR_STRIDE(ret,0);
25082
Index: libgfortran/generated/maxloc0_4_i16.c
25083
===================================================================
25084
--- a/src/libgfortran/generated/maxloc0_4_i16.c (.../tags/gcc_4_8_3_release)
25085
+++ b/src/libgfortran/generated/maxloc0_4_i16.c (.../branches/gcc-4_8-branch)
25087
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25088
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25089
retarray->offset = 0;
25090
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
25091
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
25095
@@ -199,7 +199,7 @@
25096
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25097
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25098
retarray->offset = 0;
25099
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
25100
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
25104
@@ -367,7 +367,7 @@
25105
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25106
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25107
retarray->offset = 0;
25108
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
25109
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
25111
else if (unlikely (compile_options.bounds_check))
25113
Index: libgfortran/generated/maxloc1_4_r10.c
25114
===================================================================
25115
--- a/src/libgfortran/generated/maxloc1_4_r10.c (.../tags/gcc_4_8_3_release)
25116
+++ b/src/libgfortran/generated/maxloc1_4_r10.c (.../branches/gcc-4_8-branch)
25118
retarray->offset = 0;
25119
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25121
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25122
- * extent[rank-1];
25123
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25125
- retarray->base_addr = xmalloc (alloc_size);
25126
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25127
if (alloc_size == 0)
25129
/* Make sure we have a zero-sized array. */
25130
@@ -294,8 +293,7 @@
25134
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25135
- * extent[rank-1];
25136
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25138
retarray->offset = 0;
25139
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25140
@@ -307,7 +305,7 @@
25144
- retarray->base_addr = xmalloc (alloc_size);
25145
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25149
@@ -485,8 +483,7 @@
25150
retarray->offset = 0;
25151
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25153
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25154
- * extent[rank-1];
25155
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25157
if (alloc_size == 0)
25159
@@ -495,7 +492,7 @@
25163
- retarray->base_addr = xmalloc (alloc_size);
25164
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
25168
Index: libgfortran/generated/maxloc1_8_i16.c
25169
===================================================================
25170
--- a/src/libgfortran/generated/maxloc1_8_i16.c (.../tags/gcc_4_8_3_release)
25171
+++ b/src/libgfortran/generated/maxloc1_8_i16.c (.../branches/gcc-4_8-branch)
25173
retarray->offset = 0;
25174
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25176
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25177
- * extent[rank-1];
25178
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25180
- retarray->base_addr = xmalloc (alloc_size);
25181
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25182
if (alloc_size == 0)
25184
/* Make sure we have a zero-sized array. */
25185
@@ -294,8 +293,7 @@
25189
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25190
- * extent[rank-1];
25191
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25193
retarray->offset = 0;
25194
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25195
@@ -307,7 +305,7 @@
25199
- retarray->base_addr = xmalloc (alloc_size);
25200
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25204
@@ -485,8 +483,7 @@
25205
retarray->offset = 0;
25206
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25208
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25209
- * extent[rank-1];
25210
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25212
if (alloc_size == 0)
25214
@@ -495,7 +492,7 @@
25218
- retarray->base_addr = xmalloc (alloc_size);
25219
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25223
Index: libgfortran/generated/minloc0_8_r10.c
25224
===================================================================
25225
--- a/src/libgfortran/generated/minloc0_8_r10.c (.../tags/gcc_4_8_3_release)
25226
+++ b/src/libgfortran/generated/minloc0_8_r10.c (.../branches/gcc-4_8-branch)
25228
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25229
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25230
retarray->offset = 0;
25231
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25232
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25236
@@ -199,7 +199,7 @@
25237
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25238
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25239
retarray->offset = 0;
25240
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25241
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25245
@@ -367,7 +367,7 @@
25246
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25247
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25248
retarray->offset = 0;
25249
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25250
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25252
else if (unlikely (compile_options.bounds_check))
25254
Index: libgfortran/generated/iparity_i2.c
25255
===================================================================
25256
--- a/src/libgfortran/generated/iparity_i2.c (.../tags/gcc_4_8_3_release)
25257
+++ b/src/libgfortran/generated/iparity_i2.c (.../branches/gcc-4_8-branch)
25259
retarray->offset = 0;
25260
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25262
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25263
- * extent[rank-1];
25264
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25266
- retarray->base_addr = xmalloc (alloc_size);
25267
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
25268
if (alloc_size == 0)
25270
/* Make sure we have a zero-sized array. */
25271
@@ -272,8 +271,7 @@
25275
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25276
- * extent[rank-1];
25277
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25279
retarray->offset = 0;
25280
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25281
@@ -285,7 +283,7 @@
25285
- retarray->base_addr = xmalloc (alloc_size);
25286
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
25290
@@ -430,8 +428,7 @@
25291
retarray->offset = 0;
25292
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25294
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25295
- * extent[rank-1];
25296
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25298
if (alloc_size == 0)
25300
@@ -440,7 +437,7 @@
25304
- retarray->base_addr = xmalloc (alloc_size);
25305
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
25309
Index: libgfortran/generated/maxloc1_16_r4.c
25310
===================================================================
25311
--- a/src/libgfortran/generated/maxloc1_16_r4.c (.../tags/gcc_4_8_3_release)
25312
+++ b/src/libgfortran/generated/maxloc1_16_r4.c (.../branches/gcc-4_8-branch)
25314
retarray->offset = 0;
25315
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25317
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25318
- * extent[rank-1];
25319
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25321
- retarray->base_addr = xmalloc (alloc_size);
25322
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25323
if (alloc_size == 0)
25325
/* Make sure we have a zero-sized array. */
25326
@@ -294,8 +293,7 @@
25330
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25331
- * extent[rank-1];
25332
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25334
retarray->offset = 0;
25335
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25336
@@ -307,7 +305,7 @@
25340
- retarray->base_addr = xmalloc (alloc_size);
25341
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25345
@@ -485,8 +483,7 @@
25346
retarray->offset = 0;
25347
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25349
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25350
- * extent[rank-1];
25351
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25353
if (alloc_size == 0)
25355
@@ -495,7 +492,7 @@
25359
- retarray->base_addr = xmalloc (alloc_size);
25360
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25364
Index: libgfortran/generated/maxloc0_16_r8.c
25365
===================================================================
25366
--- a/src/libgfortran/generated/maxloc0_16_r8.c (.../tags/gcc_4_8_3_release)
25367
+++ b/src/libgfortran/generated/maxloc0_16_r8.c (.../branches/gcc-4_8-branch)
25369
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25370
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25371
retarray->offset = 0;
25372
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25373
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25377
@@ -199,7 +199,7 @@
25378
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25379
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25380
retarray->offset = 0;
25381
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25382
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25386
@@ -367,7 +367,7 @@
25387
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25388
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25389
retarray->offset = 0;
25390
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
25391
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
25393
else if (unlikely (compile_options.bounds_check))
25395
Index: libgfortran/generated/sum_i16.c
25396
===================================================================
25397
--- a/src/libgfortran/generated/sum_i16.c (.../tags/gcc_4_8_3_release)
25398
+++ b/src/libgfortran/generated/sum_i16.c (.../branches/gcc-4_8-branch)
25400
retarray->offset = 0;
25401
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25403
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25404
- * extent[rank-1];
25405
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25407
- retarray->base_addr = xmalloc (alloc_size);
25408
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25409
if (alloc_size == 0)
25411
/* Make sure we have a zero-sized array. */
25412
@@ -272,8 +271,7 @@
25416
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25417
- * extent[rank-1];
25418
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25420
retarray->offset = 0;
25421
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25422
@@ -285,7 +283,7 @@
25426
- retarray->base_addr = xmalloc (alloc_size);
25427
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25431
@@ -430,8 +428,7 @@
25432
retarray->offset = 0;
25433
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25435
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25436
- * extent[rank-1];
25437
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25439
if (alloc_size == 0)
25441
@@ -440,7 +437,7 @@
25445
- retarray->base_addr = xmalloc (alloc_size);
25446
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25450
Index: libgfortran/generated/maxloc0_4_i8.c
25451
===================================================================
25452
--- a/src/libgfortran/generated/maxloc0_4_i8.c (.../tags/gcc_4_8_3_release)
25453
+++ b/src/libgfortran/generated/maxloc0_4_i8.c (.../branches/gcc-4_8-branch)
25455
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25456
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25457
retarray->offset = 0;
25458
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
25459
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
25463
@@ -199,7 +199,7 @@
25464
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25465
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25466
retarray->offset = 0;
25467
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
25468
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
25472
@@ -367,7 +367,7 @@
25473
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25474
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25475
retarray->offset = 0;
25476
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
25477
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
25479
else if (unlikely (compile_options.bounds_check))
25481
Index: libgfortran/generated/pack_c16.c
25482
===================================================================
25483
--- a/src/libgfortran/generated/pack_c16.c (.../tags/gcc_4_8_3_release)
25484
+++ b/src/libgfortran/generated/pack_c16.c (.../branches/gcc-4_8-branch)
25485
@@ -167,8 +167,8 @@
25489
- /* xmalloc allocates a single byte for zero size. */
25490
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * total);
25491
+ /* xmallocarray allocates a single byte for zero size. */
25492
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_16));
25496
Index: libgfortran/generated/maxloc1_16_i16.c
25497
===================================================================
25498
--- a/src/libgfortran/generated/maxloc1_16_i16.c (.../tags/gcc_4_8_3_release)
25499
+++ b/src/libgfortran/generated/maxloc1_16_i16.c (.../branches/gcc-4_8-branch)
25501
retarray->offset = 0;
25502
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25504
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25505
- * extent[rank-1];
25506
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25508
- retarray->base_addr = xmalloc (alloc_size);
25509
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25510
if (alloc_size == 0)
25512
/* Make sure we have a zero-sized array. */
25513
@@ -294,8 +293,7 @@
25517
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25518
- * extent[rank-1];
25519
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25521
retarray->offset = 0;
25522
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25523
@@ -307,7 +305,7 @@
25527
- retarray->base_addr = xmalloc (alloc_size);
25528
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25532
@@ -485,8 +483,7 @@
25533
retarray->offset = 0;
25534
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25536
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25537
- * extent[rank-1];
25538
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25540
if (alloc_size == 0)
25542
@@ -495,7 +492,7 @@
25546
- retarray->base_addr = xmalloc (alloc_size);
25547
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25551
Index: libgfortran/generated/minloc1_8_r4.c
25552
===================================================================
25553
--- a/src/libgfortran/generated/minloc1_8_r4.c (.../tags/gcc_4_8_3_release)
25554
+++ b/src/libgfortran/generated/minloc1_8_r4.c (.../branches/gcc-4_8-branch)
25556
retarray->offset = 0;
25557
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25559
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25560
- * extent[rank-1];
25561
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25563
- retarray->base_addr = xmalloc (alloc_size);
25564
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25565
if (alloc_size == 0)
25567
/* Make sure we have a zero-sized array. */
25568
@@ -294,8 +293,7 @@
25572
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25573
- * extent[rank-1];
25574
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25576
retarray->offset = 0;
25577
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25578
@@ -307,7 +305,7 @@
25582
- retarray->base_addr = xmalloc (alloc_size);
25583
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25587
@@ -485,8 +483,7 @@
25588
retarray->offset = 0;
25589
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25591
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25592
- * extent[rank-1];
25593
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25595
if (alloc_size == 0)
25597
@@ -495,7 +492,7 @@
25601
- retarray->base_addr = xmalloc (alloc_size);
25602
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25606
Index: libgfortran/generated/sum_c8.c
25607
===================================================================
25608
--- a/src/libgfortran/generated/sum_c8.c (.../tags/gcc_4_8_3_release)
25609
+++ b/src/libgfortran/generated/sum_c8.c (.../branches/gcc-4_8-branch)
25611
retarray->offset = 0;
25612
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25614
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25615
- * extent[rank-1];
25616
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25618
- retarray->base_addr = xmalloc (alloc_size);
25619
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
25620
if (alloc_size == 0)
25622
/* Make sure we have a zero-sized array. */
25623
@@ -272,8 +271,7 @@
25627
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25628
- * extent[rank-1];
25629
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25631
retarray->offset = 0;
25632
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25633
@@ -285,7 +283,7 @@
25637
- retarray->base_addr = xmalloc (alloc_size);
25638
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
25642
@@ -430,8 +428,7 @@
25643
retarray->offset = 0;
25644
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25646
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25647
- * extent[rank-1];
25648
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25650
if (alloc_size == 0)
25652
@@ -440,7 +437,7 @@
25656
- retarray->base_addr = xmalloc (alloc_size);
25657
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
25661
Index: libgfortran/generated/maxloc1_16_i2.c
25662
===================================================================
25663
--- a/src/libgfortran/generated/maxloc1_16_i2.c (.../tags/gcc_4_8_3_release)
25664
+++ b/src/libgfortran/generated/maxloc1_16_i2.c (.../branches/gcc-4_8-branch)
25666
retarray->offset = 0;
25667
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25669
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25670
- * extent[rank-1];
25671
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25673
- retarray->base_addr = xmalloc (alloc_size);
25674
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25675
if (alloc_size == 0)
25677
/* Make sure we have a zero-sized array. */
25678
@@ -294,8 +293,7 @@
25682
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25683
- * extent[rank-1];
25684
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25686
retarray->offset = 0;
25687
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25688
@@ -307,7 +305,7 @@
25692
- retarray->base_addr = xmalloc (alloc_size);
25693
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25697
@@ -485,8 +483,7 @@
25698
retarray->offset = 0;
25699
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25701
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25702
- * extent[rank-1];
25703
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25705
if (alloc_size == 0)
25707
@@ -495,7 +492,7 @@
25711
- retarray->base_addr = xmalloc (alloc_size);
25712
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25716
Index: libgfortran/generated/parity_l1.c
25717
===================================================================
25718
--- a/src/libgfortran/generated/parity_l1.c (.../tags/gcc_4_8_3_release)
25719
+++ b/src/libgfortran/generated/parity_l1.c (.../branches/gcc-4_8-branch)
25721
retarray->offset = 0;
25722
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25724
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25725
- * extent[rank-1];
25726
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25728
- retarray->base_addr = xmalloc (alloc_size);
25729
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
25730
if (alloc_size == 0)
25732
/* Make sure we have a zero-sized array. */
25733
Index: libgfortran/generated/maxval_i16.c
25734
===================================================================
25735
--- a/src/libgfortran/generated/maxval_i16.c (.../tags/gcc_4_8_3_release)
25736
+++ b/src/libgfortran/generated/maxval_i16.c (.../branches/gcc-4_8-branch)
25738
retarray->offset = 0;
25739
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25741
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25742
- * extent[rank-1];
25743
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25745
- retarray->base_addr = xmalloc (alloc_size);
25746
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25747
if (alloc_size == 0)
25749
/* Make sure we have a zero-sized array. */
25750
@@ -286,8 +285,7 @@
25754
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25755
- * extent[rank-1];
25756
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25758
retarray->offset = 0;
25759
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25760
@@ -299,7 +297,7 @@
25764
- retarray->base_addr = xmalloc (alloc_size);
25765
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25769
@@ -472,8 +470,7 @@
25770
retarray->offset = 0;
25771
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25773
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25774
- * extent[rank-1];
25775
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25777
if (alloc_size == 0)
25779
@@ -482,7 +479,7 @@
25783
- retarray->base_addr = xmalloc (alloc_size);
25784
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
25788
Index: libgfortran/generated/spread_c8.c
25789
===================================================================
25790
--- a/src/libgfortran/generated/spread_c8.c (.../tags/gcc_4_8_3_release)
25791
+++ b/src/libgfortran/generated/spread_c8.c (.../branches/gcc-4_8-branch)
25792
@@ -101,8 +101,8 @@
25796
- /* xmalloc allocates a single byte for zero size. */
25797
- ret->base_addr = xmalloc (rs * sizeof(GFC_COMPLEX_8));
25798
+ /* xmallocarray allocates a single byte for zero size. */
25799
+ ret->base_addr = xmallocarray (rs, sizeof(GFC_COMPLEX_8));
25803
@@ -244,7 +244,7 @@
25805
if (ret->base_addr == NULL)
25807
- ret->base_addr = xmalloc (ncopies * sizeof (GFC_COMPLEX_8));
25808
+ ret->base_addr = xmallocarray (ncopies, sizeof (GFC_COMPLEX_8));
25810
GFC_DIMENSION_SET(ret->dim[0], 0, ncopies - 1, 1);
25812
Index: libgfortran/generated/matmul_i16.c
25813
===================================================================
25814
--- a/src/libgfortran/generated/matmul_i16.c (.../tags/gcc_4_8_3_release)
25815
+++ b/src/libgfortran/generated/matmul_i16.c (.../branches/gcc-4_8-branch)
25816
@@ -124,7 +124,7 @@
25819
retarray->base_addr
25820
- = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) retarray));
25821
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_16));
25822
retarray->offset = 0;
25824
else if (unlikely (compile_options.bounds_check))
25825
Index: libgfortran/generated/pack_i8.c
25826
===================================================================
25827
--- a/src/libgfortran/generated/pack_i8.c (.../tags/gcc_4_8_3_release)
25828
+++ b/src/libgfortran/generated/pack_i8.c (.../branches/gcc-4_8-branch)
25829
@@ -167,8 +167,8 @@
25833
- /* xmalloc allocates a single byte for zero size. */
25834
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * total);
25835
+ /* xmallocarray allocates a single byte for zero size. */
25836
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_8));
25840
Index: libgfortran/generated/any_l1.c
25841
===================================================================
25842
--- a/src/libgfortran/generated/any_l1.c (.../tags/gcc_4_8_3_release)
25843
+++ b/src/libgfortran/generated/any_l1.c (.../branches/gcc-4_8-branch)
25844
@@ -101,8 +101,7 @@
25845
retarray->offset = 0;
25846
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25848
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25849
- * extent[rank-1];
25850
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25852
if (alloc_size == 0)
25854
@@ -111,7 +110,7 @@
25858
- retarray->base_addr = xmalloc (alloc_size);
25859
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
25863
Index: libgfortran/generated/minloc1_8_i2.c
25864
===================================================================
25865
--- a/src/libgfortran/generated/minloc1_8_i2.c (.../tags/gcc_4_8_3_release)
25866
+++ b/src/libgfortran/generated/minloc1_8_i2.c (.../branches/gcc-4_8-branch)
25868
retarray->offset = 0;
25869
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25871
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25872
- * extent[rank-1];
25873
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25875
- retarray->base_addr = xmalloc (alloc_size);
25876
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25877
if (alloc_size == 0)
25879
/* Make sure we have a zero-sized array. */
25880
@@ -294,8 +293,7 @@
25884
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25885
- * extent[rank-1];
25886
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25888
retarray->offset = 0;
25889
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25890
@@ -307,7 +305,7 @@
25894
- retarray->base_addr = xmalloc (alloc_size);
25895
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25899
@@ -485,8 +483,7 @@
25900
retarray->offset = 0;
25901
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25903
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25904
- * extent[rank-1];
25905
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25907
if (alloc_size == 0)
25909
@@ -495,7 +492,7 @@
25913
- retarray->base_addr = xmalloc (alloc_size);
25914
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
25918
Index: libgfortran/generated/minloc0_8_r8.c
25919
===================================================================
25920
--- a/src/libgfortran/generated/minloc0_8_r8.c (.../tags/gcc_4_8_3_release)
25921
+++ b/src/libgfortran/generated/minloc0_8_r8.c (.../branches/gcc-4_8-branch)
25923
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25924
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25925
retarray->offset = 0;
25926
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25927
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25931
@@ -199,7 +199,7 @@
25932
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
25933
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25934
retarray->offset = 0;
25935
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25936
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25940
@@ -367,7 +367,7 @@
25941
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
25942
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
25943
retarray->offset = 0;
25944
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
25945
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
25947
else if (unlikely (compile_options.bounds_check))
25949
Index: libgfortran/generated/matmul_l8.c
25950
===================================================================
25951
--- a/src/libgfortran/generated/matmul_l8.c (.../tags/gcc_4_8_3_release)
25952
+++ b/src/libgfortran/generated/matmul_l8.c (.../branches/gcc-4_8-branch)
25956
retarray->base_addr
25957
- = xmalloc (sizeof (GFC_LOGICAL_8) * size0 ((array_t *) retarray));
25958
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_8));
25959
retarray->offset = 0;
25961
else if (unlikely (compile_options.bounds_check))
25962
Index: libgfortran/generated/product_r10.c
25963
===================================================================
25964
--- a/src/libgfortran/generated/product_r10.c (.../tags/gcc_4_8_3_release)
25965
+++ b/src/libgfortran/generated/product_r10.c (.../branches/gcc-4_8-branch)
25967
retarray->offset = 0;
25968
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25970
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25971
- * extent[rank-1];
25972
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25974
- retarray->base_addr = xmalloc (alloc_size);
25975
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
25976
if (alloc_size == 0)
25978
/* Make sure we have a zero-sized array. */
25979
@@ -272,8 +271,7 @@
25983
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
25984
- * extent[rank-1];
25985
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
25987
retarray->offset = 0;
25988
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
25989
@@ -285,7 +283,7 @@
25993
- retarray->base_addr = xmalloc (alloc_size);
25994
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
25998
@@ -430,8 +428,7 @@
25999
retarray->offset = 0;
26000
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26002
- alloc_size = sizeof (GFC_REAL_10) * 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
@@ -440,7 +437,7 @@
26012
- retarray->base_addr = xmalloc (alloc_size);
26013
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
26017
Index: libgfortran/generated/product_i1.c
26018
===================================================================
26019
--- a/src/libgfortran/generated/product_i1.c (.../tags/gcc_4_8_3_release)
26020
+++ b/src/libgfortran/generated/product_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_1) * 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_1));
26031
if (alloc_size == 0)
26033
/* Make sure we have a zero-sized array. */
26034
@@ -272,8 +271,7 @@
26038
- alloc_size = sizeof (GFC_INTEGER_1) * 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
@@ -285,7 +283,7 @@
26048
- retarray->base_addr = xmalloc (alloc_size);
26049
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
26053
@@ -430,8 +428,7 @@
26054
retarray->offset = 0;
26055
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26057
- alloc_size = sizeof (GFC_INTEGER_1) * 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
@@ -440,7 +437,7 @@
26067
- retarray->base_addr = xmalloc (alloc_size);
26068
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
26072
Index: libgfortran/generated/all_l8.c
26073
===================================================================
26074
--- a/src/libgfortran/generated/all_l8.c (.../tags/gcc_4_8_3_release)
26075
+++ b/src/libgfortran/generated/all_l8.c (.../branches/gcc-4_8-branch)
26076
@@ -101,8 +101,7 @@
26077
retarray->offset = 0;
26078
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
26080
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
26081
- * extent[rank-1];
26082
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
26084
if (alloc_size == 0)
26086
@@ -111,7 +110,7 @@
26090
- retarray->base_addr = xmalloc (alloc_size);
26091
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
26095
Index: libgfortran/generated/in_pack_r16.c
26096
===================================================================
26097
--- a/src/libgfortran/generated/in_pack_r16.c (.../tags/gcc_4_8_3_release)
26098
+++ b/src/libgfortran/generated/in_pack_r16.c (.../branches/gcc-4_8-branch)
26100
return source->base_addr;
26102
/* Allocate storage for the destination. */
26103
- destptr = (GFC_REAL_16 *)xmalloc (ssize * sizeof (GFC_REAL_16));
26104
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_16));
26106
src = source->base_addr;
26107
stride0 = stride[0];
26108
Index: libgfortran/generated/in_pack_i1.c
26109
===================================================================
26110
--- a/src/libgfortran/generated/in_pack_i1.c (.../tags/gcc_4_8_3_release)
26111
+++ b/src/libgfortran/generated/in_pack_i1.c (.../branches/gcc-4_8-branch)
26113
return source->base_addr;
26115
/* Allocate storage for the destination. */
26116
- destptr = (GFC_INTEGER_1 *)xmalloc (ssize * sizeof (GFC_INTEGER_1));
26117
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_1));
26119
src = source->base_addr;
26120
stride0 = stride[0];
26121
Index: libgfortran/libgfortran.h
26122
===================================================================
26123
--- a/src/libgfortran/libgfortran.h (.../tags/gcc_4_8_3_release)
26124
+++ b/src/libgfortran/libgfortran.h (.../branches/gcc-4_8-branch)
26125
@@ -751,6 +751,9 @@
26126
extern void *xmalloc (size_t) __attribute__ ((malloc));
26127
internal_proto(xmalloc);
26129
+extern void *xmallocarray (size_t, size_t) __attribute__ ((malloc));
26130
+internal_proto(xmallocarray);
26132
extern void *xcalloc (size_t, size_t) __attribute__ ((malloc));
26133
internal_proto(xcalloc);
26135
Index: libgfortran/config.h.in
26136
===================================================================
26137
--- a/src/libgfortran/config.h.in (.../tags/gcc_4_8_3_release)
26138
+++ b/src/libgfortran/config.h.in (.../branches/gcc-4_8-branch)
26139
@@ -711,6 +711,9 @@
26140
/* Define to 1 if you have the `strtof' function. */
26143
+/* Define to 1 if you have the `strtok_r' function. */
26144
+#undef HAVE_STRTOK_R
26146
/* Define to 1 if you have the `strtold' function. */
26147
#undef HAVE_STRTOLD
26149
Index: libgfortran/io/list_read.c
26150
===================================================================
26151
--- a/src/libgfortran/io/list_read.c (.../tags/gcc_4_8_3_release)
26152
+++ b/src/libgfortran/io/list_read.c (.../branches/gcc-4_8-branch)
26153
@@ -2354,7 +2354,7 @@
26155
index_type len = strlen (nl->var_name) + 1;
26157
- char * ext_name = (char*)xmalloc (len + 1);
26158
+ char * ext_name = xmalloc (len + 1);
26159
memcpy (ext_name, nl->var_name, len-1);
26160
memcpy (ext_name + len - 1, "%", 2);
26161
for (nl = nl->next; nl; nl = nl->next)
26162
Index: libgfortran/io/unit.c
26163
===================================================================
26164
--- a/src/libgfortran/io/unit.c (.../tags/gcc_4_8_3_release)
26165
+++ b/src/libgfortran/io/unit.c (.../branches/gcc-4_8-branch)
26166
@@ -455,7 +455,7 @@
26168
iunit->rank = GFC_DESCRIPTOR_RANK (dtp->internal_unit_desc);
26169
iunit->ls = (array_loop_spec *)
26170
- xmalloc (iunit->rank * sizeof (array_loop_spec));
26171
+ xmallocarray (iunit->rank, sizeof (array_loop_spec));
26172
dtp->internal_unit_len *=
26173
init_loop_spec (dtp->internal_unit_desc, iunit->ls, &start_record);
26175
Index: libgfortran/io/unix.c
26176
===================================================================
26177
--- a/src/libgfortran/io/unix.c (.../tags/gcc_4_8_3_release)
26178
+++ b/src/libgfortran/io/unix.c (.../branches/gcc-4_8-branch)
26179
@@ -407,7 +407,9 @@
26183
- if (s->fd != STDOUT_FILENO
26186
+ else if (s->fd != STDOUT_FILENO
26187
&& s->fd != STDERR_FILENO
26188
&& s->fd != STDIN_FILENO)
26189
retval = close (s->fd);
26190
@@ -983,7 +985,15 @@
26192
/* Get the current length of the file. */
26194
- fstat (fd, &statbuf);
26195
+ if (fstat (fd, &statbuf) == -1)
26197
+ s->st_dev = s->st_ino = -1;
26198
+ s->file_length = 0;
26199
+ if (errno == EBADF)
26202
+ return (stream *) s;
26205
s->st_dev = statbuf.st_dev;
26206
s->st_ino = statbuf.st_ino;
26207
Index: libgfortran/io/transfer.c
26208
===================================================================
26209
--- a/src/libgfortran/io/transfer.c (.../tags/gcc_4_8_3_release)
26210
+++ b/src/libgfortran/io/transfer.c (.../branches/gcc-4_8-branch)
26211
@@ -3776,9 +3776,9 @@
26212
if (nml->var_rank > 0)
26214
nml->dim = (descriptor_dimension*)
26215
- xmalloc (nml->var_rank * sizeof (descriptor_dimension));
26216
+ xmallocarray (nml->var_rank, sizeof (descriptor_dimension));
26217
nml->ls = (array_loop_spec*)
26218
- xmalloc (nml->var_rank * sizeof (array_loop_spec));
26219
+ xmallocarray (nml->var_rank, sizeof (array_loop_spec));
26223
Index: libgfortran/io/write.c
26224
===================================================================
26225
--- a/src/libgfortran/io/write.c (.../tags/gcc_4_8_3_release)
26226
+++ b/src/libgfortran/io/write.c (.../branches/gcc-4_8-branch)
26227
@@ -1863,7 +1863,7 @@
26228
base_var_name_len = base ? strlen (base->var_name) : 0;
26229
ext_name_len = base_name_len + base_var_name_len
26230
+ strlen (obj->var_name) + obj->var_rank * NML_DIGITS + 1;
26231
- ext_name = (char*)xmalloc (ext_name_len);
26232
+ ext_name = xmalloc (ext_name_len);
26234
memcpy (ext_name, base_name, base_name_len);
26235
clen = strlen (obj->var_name + base_var_name_len);
26236
@@ -1892,7 +1892,7 @@
26237
/* Now obj_name. */
26239
obj_name_len = strlen (obj->var_name) + 1;
26240
- obj_name = xmalloc (obj_name_len+1);
26241
+ obj_name = xmalloc (obj_name_len + 1);
26242
memcpy (obj_name, obj->var_name, obj_name_len-1);
26243
memcpy (obj_name + obj_name_len-1, "%", 2);
26245
Index: Makefile.def
26246
===================================================================
26247
--- a/src/Makefile.def (.../tags/gcc_4_8_3_release)
26248
+++ b/src/Makefile.def (.../branches/gcc-4_8-branch)
26249
@@ -292,6 +292,10 @@
26250
// Host modules specific to gcc.
26251
dependencies = { module=configure-gcc; on=configure-intl; };
26252
dependencies = { module=configure-gcc; on=all-gmp; };
26253
+dependencies = { module=configure-gcc; on=all-mpfr; };
26254
+dependencies = { module=configure-gcc; on=all-mpc; };
26255
+dependencies = { module=configure-gcc; on=all-isl; };
26256
+dependencies = { module=configure-gcc; on=all-cloog; };
26257
dependencies = { module=configure-gcc; on=all-lto-plugin; };
26258
dependencies = { module=configure-gcc; on=all-binutils; };
26259
dependencies = { module=configure-gcc; on=all-gas; };
26260
Index: libada/Makefile.in
26261
===================================================================
26262
--- a/src/libada/Makefile.in (.../tags/gcc_4_8_3_release)
26263
+++ b/src/libada/Makefile.in (.../branches/gcc-4_8-branch)
26265
PICFLAG = @PICFLAG@
26266
GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
26267
GNATLIBCFLAGS= -g -O2
26268
-GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \
26269
+GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
26270
-fexceptions -DIN_RTS @have_getipinfo@
26272
host_subdir = @host_subdir@
26273
Index: libada/ChangeLog
26274
===================================================================
26275
--- a/src/libada/ChangeLog (.../tags/gcc_4_8_3_release)
26276
+++ b/src/libada/ChangeLog (.../branches/gcc-4_8-branch)
26278
+2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
26280
+ * Makefile.in: Add CFLAGS_FOR_TARGET to GNATLIBCFLAGS_FOR_C.
26282
2014-05-22 Release Manager
26284
* GCC 4.8.3 released.
26285
Index: libffi/src/powerpc/linux64_closure.S
26286
===================================================================
26287
--- a/src/libffi/src/powerpc/linux64_closure.S (.../tags/gcc_4_8_3_release)
26288
+++ b/src/libffi/src/powerpc/linux64_closure.S (.../branches/gcc-4_8-branch)
26289
@@ -381,7 +381,8 @@
26293
-# if defined __ELF__ && defined __linux__
26296
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
26297
.section .note.GNU-stack,"",@progbits
26300
Index: libffi/src/powerpc/linux64.S
26301
===================================================================
26302
--- a/src/libffi/src/powerpc/linux64.S (.../tags/gcc_4_8_3_release)
26303
+++ b/src/libffi/src/powerpc/linux64.S (.../branches/gcc-4_8-branch)
26304
@@ -254,7 +254,8 @@
26308
-# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
26311
+#if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2
26312
.section .note.GNU-stack,"",@progbits
26315
Index: libffi/ChangeLog
26316
===================================================================
26317
--- a/src/libffi/ChangeLog (.../tags/gcc_4_8_3_release)
26318
+++ b/src/libffi/ChangeLog (.../branches/gcc-4_8-branch)
26320
+2014-09-11 Jakub Jelinek <jakub@redhat.com>
26322
+ * src/powerpc/linux64.S: Emit .note.GNU-stack even when
26323
+ POWERPC64 is not defined.
26324
+ * src/powerpc/linux64_closure.S: Likewise. Also test _CALL_ELF == 2.
26326
2014-05-22 Release Manager
26328
* GCC 4.8.3 released.
26329
Index: libcpp/line-map.c
26330
===================================================================
26331
--- a/src/libcpp/line-map.c (.../tags/gcc_4_8_3_release)
26332
+++ b/src/libcpp/line-map.c (.../branches/gcc-4_8-branch)
26333
@@ -527,10 +527,10 @@
26334
&& line_delta * ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) > 1000)
26335
|| (max_column_hint >= (1U << ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map)))
26336
|| (max_column_hint <= 80
26337
- && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10))
26341
+ && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10)
26342
+ || (highest > 0x60000000
26343
+ && (set->max_column_hint || highest > 0x70000000)))
26346
max_column_hint = set->max_column_hint;
26348
@@ -541,7 +541,7 @@
26349
/* If the column number is ridiculous or we've allocated a huge
26350
number of source_locations, give up on column numbers. */
26351
max_column_hint = 0;
26352
- if (highest >0x70000000)
26353
+ if (highest > 0x70000000)
26357
Index: libcpp/ChangeLog
26358
===================================================================
26359
--- a/src/libcpp/ChangeLog (.../tags/gcc_4_8_3_release)
26360
+++ b/src/libcpp/ChangeLog (.../branches/gcc-4_8-branch)
26362
+2014-11-28 Jakub Jelinek <jakub@redhat.com>
26364
+ Backported from mainline
26365
+ 2014-11-25 Jakub Jelinek <jakub@redhat.com>
26367
+ PR preprocessor/60436
26368
+ * line-map.c (linemap_line_start): If highest is above 0x60000000
26369
+ and we are still tracking columns or highest is above 0x70000000,
26372
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26374
+ Backport from mainline r215873
26375
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26377
+ * lex.c (search_line_fast): Add new version to be used for Power8
26378
+ and later targets when Altivec is enabled. Restrict the existing
26379
+ Altivec version to big-endian systems so that lvsr is not used on
26380
+ little endian, where it is deprecated. Remove LE-specific code
26381
+ from the now-BE-only version.
26383
2014-05-22 Release Manager
26385
* GCC 4.8.3 released.
26386
Index: libcpp/lex.c
26387
===================================================================
26388
--- a/src/libcpp/lex.c (.../tags/gcc_4_8_3_release)
26389
+++ b/src/libcpp/lex.c (.../branches/gcc-4_8-branch)
26390
@@ -515,9 +515,111 @@
26391
search_line_fast = impl;
26394
-#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__)
26395
+#elif defined(_ARCH_PWR8) && defined(__ALTIVEC__)
26397
-/* A vection of the fast scanner using AltiVec vectorized byte compares. */
26398
+/* A vection of the fast scanner using AltiVec vectorized byte compares
26399
+ and VSX unaligned loads (when VSX is available). This is otherwise
26400
+ the same as the pre-GCC 5 version. */
26402
+static const uchar *
26403
+search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
26405
+ typedef __attribute__((altivec(vector))) unsigned char vc;
26407
+ const vc repl_nl = {
26408
+ '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n',
26409
+ '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n'
26411
+ const vc repl_cr = {
26412
+ '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r',
26413
+ '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r'
26415
+ const vc repl_bs = {
26416
+ '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\',
26417
+ '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\'
26419
+ const vc repl_qm = {
26420
+ '?', '?', '?', '?', '?', '?', '?', '?',
26421
+ '?', '?', '?', '?', '?', '?', '?', '?',
26423
+ const vc zero = { 0 };
26427
+ /* Main loop processing 16 bytes at a time. */
26430
+ vc m_nl, m_cr, m_bs, m_qm;
26432
+ data = *((const vc *)s);
26435
+ m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
26436
+ m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr);
26437
+ m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs);
26438
+ m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm);
26439
+ t = (m_nl | m_cr) | (m_bs | m_qm);
26441
+ /* T now contains 0xff in bytes for which we matched one of the relevant
26442
+ characters. We want to exit the loop if any byte in T is non-zero.
26443
+ Below is the expansion of vec_any_ne(t, zero). */
26445
+ while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero));
26447
+ /* Restore s to to point to the 16 bytes we just processed. */
26451
+#define N (sizeof(vc) / sizeof(long))
26455
+ /* Statically assert that N is 2 or 4. */
26456
+ unsigned long l[(N == 2 || N == 4) ? N : -1];
26458
+ unsigned long l, i = 0;
26462
+ /* Find the first word of T that is non-zero. */
26469
+ s += sizeof(unsigned long);
26473
+ s += sizeof(unsigned long);
26478
+ s += sizeof(unsigned long);
26482
+ /* L now contains 0xff in bytes for which we matched one of the
26483
+ relevant characters. We can find the byte index by finding
26484
+ its bit index and dividing by 8. */
26485
+#ifdef __BIG_ENDIAN__
26486
+ l = __builtin_clzl(l) >> 3;
26488
+ l = __builtin_ctzl(l) >> 3;
26496
+#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__) && defined (__BIG_ENDIAN__)
26498
+/* A vection of the fast scanner using AltiVec vectorized byte compares.
26499
+ This cannot be used for little endian because vec_lvsl/lvsr are
26500
+ deprecated for little endian and the code won't work properly. */
26501
/* ??? Unfortunately, attribute(target("altivec")) is not yet supported,
26502
so we can't compile this function without -maltivec on the command line
26503
(or implied by some other switch). */
26504
@@ -559,13 +661,8 @@
26505
beginning with all ones and shifting in zeros according to the
26506
mis-alignment. The LVSR instruction pulls the exact shift we
26507
want from the address. */
26508
-#ifdef __BIG_ENDIAN__
26509
mask = __builtin_vec_lvsr(0, s);
26510
mask = __builtin_vec_perm(zero, ones, mask);
26512
- mask = __builtin_vec_lvsl(0, s);
26513
- mask = __builtin_vec_perm(ones, zero, mask);
26517
/* While altivec loads mask addresses, we still need to align S so
26518
@@ -629,11 +726,7 @@
26519
/* L now contains 0xff in bytes for which we matched one of the
26520
relevant characters. We can find the byte index by finding
26521
its bit index and dividing by 8. */
26522
-#ifdef __BIG_ENDIAN__
26523
l = __builtin_clzl(l) >> 3;
26525
- l = __builtin_ctzl(l) >> 3;
26531
===================================================================
26532
--- a/src/. (.../tags/gcc_4_8_3_release)
26533
+++ b/src/. (.../branches/gcc-4_8-branch)
26535
Property changes on: .
26536
___________________________________________________________________
26537
Modified: svn:mergeinfo
26538
Merged /trunk:r211733,215049