diff options
author | doko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca> | 2013-05-17 19:03:50 +0000 |
---|---|---|
committer | doko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca> | 2013-05-17 19:03:50 +0000 |
commit | c81342705cc97073685e065eadbb56cdd4de7bb0 (patch) | |
tree | 2b259981326304c7659f8b0f0e39ad08c7691980 | |
parent | 710e0a5cae9dd9c6baa40dafb8965c0498399ba7 (diff) | |
download | gcc-47-c81342705cc97073685e065eadbb56cdd4de7bb0.tar.gz |
* Update to SVN 20130517 (r199025) from the gcc-4_7-branch.
* Update the Linaro support to the 4.7-2013.05 release.
git-svn-id: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.7@6771 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/patches/gcc-linaro-doc.diff | 222 | ||||
-rw-r--r-- | debian/patches/gcc-linaro.diff | 3276 | ||||
-rw-r--r-- | debian/patches/pr54974-linaro.diff | 243 | ||||
-rw-r--r-- | debian/patches/pr54974.diff | 243 | ||||
-rw-r--r-- | debian/patches/svn-updates-linaro.diff | 407 | ||||
-rw-r--r-- | debian/patches/svn-updates.diff | 1015 | ||||
-rw-r--r-- | debian/rules.patch | 7 |
8 files changed, 4569 insertions, 851 deletions
diff --git a/debian/changelog b/debian/changelog index 9ac8afa..caf019e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +gcc-4.7 (4.7.3-5) UNRELEASED; urgency=low + + * Update to SVN 20130517 (r199025) from the gcc-4_7-branch. + * Update the Linaro support to the 4.7-2013.05 release. + + -- Matthias Klose <doko@debian.org> Fri, 17 May 2013 20:53:14 +0200 + gcc-4.7 (4.7.3-4) unstable; urgency=medium [ Matthias Klose ] diff --git a/debian/patches/gcc-linaro-doc.diff b/debian/patches/gcc-linaro-doc.diff index 1ad24e3..c9f2d6f 100644 --- a/debian/patches/gcc-linaro-doc.diff +++ b/debian/patches/gcc-linaro-doc.diff @@ -1,4 +1,4 @@ -# DP: Changes for the Linaro 4.7-2013.04 release (documentation). +# DP: Changes for the Linaro 4.7-2013.05 release (documentation). --- a/src/gcc/doc/extend.texi +++ b/src/gcc/doc/extend.texi @@ -62,6 +62,189 @@ @findex MULTILIB_EXTRA_OPTS @item MULTILIB_EXTRA_OPTS Sometimes it is desirable that when building multiple versions of +--- a/src/gcc/doc/fsf-funding.7 ++++ b/src/gcc/doc/fsf-funding.7 +@@ -1,15 +1,7 @@ +-.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05) ++.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) + .\" + .\" Standard preamble: + .\" ======================================================================== +-.de Sh \" Subsection heading +-.br +-.if t .Sp +-.ne 5 +-.PP +-\fB\\$1\fR +-.PP +-.. + .de Sp \" Vertical space (when we can't use .PP) + .if t .sp .5v + .if n .sp +@@ -53,7 +45,7 @@ + .el .ds Aq ' + .\" + .\" If the F register is turned on, we'll generate index entries on stderr for +-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index + .\" entries marked with X<> in POD. Of course, you'll have to process the + .\" output yourself in some meaningful fashion. + .ie \nF \{\ +@@ -132,7 +124,7 @@ + .\" ======================================================================== + .\" + .IX Title "FSF-FUNDING 7" +-.TH FSF-FUNDING 7 "2013-04-11" "gcc-4.7.3" "GNU" ++.TH FSF-FUNDING 7 "2013-05-08" "gcc-4.7.4" "GNU" + .\" For nroff, turn off justification. Always turn off hyphenation; it makes + .\" way too many mistakes in technical documents. + .if n .ad l +@@ -141,7 +133,7 @@ + fsf\-funding \- Funding Free Software + .SH "DESCRIPTION" + .IX Header "DESCRIPTION" +-.Sh "Funding Free Software" ++.SS "Funding Free Software" + .IX Subsection "Funding Free Software" + If you want to have more free software a few years from now, it makes + sense for you to help encourage people to contribute funds for its +--- a/src/gcc/doc/gfdl.7 ++++ b/src/gcc/doc/gfdl.7 +@@ -1,15 +1,7 @@ +-.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05) ++.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) + .\" + .\" Standard preamble: + .\" ======================================================================== +-.de Sh \" Subsection heading +-.br +-.if t .Sp +-.ne 5 +-.PP +-\fB\\$1\fR +-.PP +-.. + .de Sp \" Vertical space (when we can't use .PP) + .if t .sp .5v + .if n .sp +@@ -53,7 +45,7 @@ + .el .ds Aq ' + .\" + .\" If the F register is turned on, we'll generate index entries on stderr for +-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index + .\" entries marked with X<> in POD. Of course, you'll have to process the + .\" output yourself in some meaningful fashion. + .ie \nF \{\ +@@ -132,7 +124,7 @@ + .\" ======================================================================== + .\" + .IX Title "GFDL 7" +-.TH GFDL 7 "2013-04-11" "gcc-4.7.3" "GNU" ++.TH GFDL 7 "2013-05-08" "gcc-4.7.4" "GNU" + .\" For nroff, turn off justification. Always turn off hyphenation; it makes + .\" way too many mistakes in technical documents. + .if n .ad l +@@ -141,9 +133,9 @@ + gfdl \- GNU Free Documentation License + .SH "DESCRIPTION" + .IX Header "DESCRIPTION" +-.Sh "\s-1GNU\s0 Free Documentation License" ++.SS "\s-1GNU\s0 Free Documentation License" + .IX Subsection "GNU Free Documentation License" +-.Sh "Version 1.3, 3 November 2008" ++.SS "Version 1.3, 3 November 2008" + .IX Subsection "Version 1.3, 3 November 2008" + .Vb 2 + \& Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. +@@ -600,7 +592,7 @@ + The operator of an \s-1MMC\s0 Site may republish an \s-1MMC\s0 contained in the site + under CC-BY-SA on the same site at any time before August 1, 2009, + provided the \s-1MMC\s0 is eligible for relicensing. +-.Sh "\s-1ADDENDUM:\s0 How to use this License for your documents" ++.SS "\s-1ADDENDUM:\s0 How to use this License for your documents" + .IX Subsection "ADDENDUM: How to use this License for your documents" + To use this License in a document you have written, include a copy of + the License in the document and put the following copyright and +--- a/src/gcc/doc/gpl.7 ++++ b/src/gcc/doc/gpl.7 +@@ -1,15 +1,7 @@ +-.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05) ++.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) + .\" + .\" Standard preamble: + .\" ======================================================================== +-.de Sh \" Subsection heading +-.br +-.if t .Sp +-.ne 5 +-.PP +-\fB\\$1\fR +-.PP +-.. + .de Sp \" Vertical space (when we can't use .PP) + .if t .sp .5v + .if n .sp +@@ -53,7 +45,7 @@ + .el .ds Aq ' + .\" + .\" If the F register is turned on, we'll generate index entries on stderr for +-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index ++.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index + .\" entries marked with X<> in POD. Of course, you'll have to process the + .\" output yourself in some meaningful fashion. + .ie \nF \{\ +@@ -132,7 +124,7 @@ + .\" ======================================================================== + .\" + .IX Title "GPL 7" +-.TH GPL 7 "2013-04-11" "gcc-4.7.3" "GNU" ++.TH GPL 7 "2013-05-08" "gcc-4.7.4" "GNU" + .\" For nroff, turn off justification. Always turn off hyphenation; it makes + .\" way too many mistakes in technical documents. + .if n .ad l +@@ -141,9 +133,9 @@ + gpl \- GNU General Public License + .SH "DESCRIPTION" + .IX Header "DESCRIPTION" +-.Sh "\s-1GNU\s0 General Public License" ++.SS "\s-1GNU\s0 General Public License" + .IX Subsection "GNU General Public License" +-.Sh "Version 3, 29 June 2007" ++.SS "Version 3, 29 June 2007" + .IX Subsection "Version 3, 29 June 2007" + .Vb 1 + \& Copyright (c) 2007 Free Software Foundation, Inc. <http://fsf.org/> +@@ -151,7 +143,7 @@ + \& Everyone is permitted to copy and distribute verbatim copies of this + \& license document, but changing it is not allowed. + .Ve +-.Sh "Preamble" ++.SS "Preamble" + .IX Subsection "Preamble" + The \s-1GNU\s0 General Public License is a free, copyleft license for + software and other kinds of works. +@@ -215,7 +207,7 @@ + .PP + The precise terms and conditions for copying, distribution and + modification follow. +-.Sh "\s-1TERMS\s0 \s-1AND\s0 \s-1CONDITIONS\s0" ++.SS "\s-1TERMS\s0 \s-1AND\s0 \s-1CONDITIONS\s0" + .IX Subsection "TERMS AND CONDITIONS" + .IP "0. Definitions." 4 + .IX Item "0. Definitions." +@@ -778,9 +770,9 @@ + an absolute waiver of all civil liability in connection with the + Program, unless a warranty or assumption of liability accompanies a + copy of the Program in return for a fee. +-.Sh "\s-1END\s0 \s-1OF\s0 \s-1TERMS\s0 \s-1AND\s0 \s-1CONDITIONS\s0" ++.SS "\s-1END\s0 \s-1OF\s0 \s-1TERMS\s0 \s-1AND\s0 \s-1CONDITIONS\s0" + .IX Subsection "END OF TERMS AND CONDITIONS" +-.Sh "How to Apply These Terms to Your New Programs" ++.SS "How to Apply These Terms to Your New Programs" + .IX Subsection "How to Apply These Terms to Your New Programs" + If you develop a new program, and you want it to be of the greatest + possible use to the public, the best way to achieve this is to make it --- a/src/gcc/doc/install.texi +++ b/src/gcc/doc/install.texi @@ -1047,6 +1047,15 @@ @@ -508,20 +691,27 @@ @item arm_neon_fp16_ok @anchor{arm_neon_fp16_ok} ARM Target supports @code{-mfpu=neon-fp16 -mfloat-abi=softfp} or compatible ---- a/src/INSTALL/configure.html -+++ b/src/INSTALL/configure.html -@@ -446,6 +446,14 @@ - conventions, etc. should not be built. The default is to build a - predefined set of them. +--- a/src/gcc/doc/tm.texi ++++ b/src/gcc/doc/tm.texi +@@ -9495,6 +9495,10 @@ + True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections should be emitted. These sections are not used on most platforms, and in particular GDB does not use them. + @end deftypevr -+ <br><dt><code>--enable-multiarch</code><dd>Specify whether to enable or disable multiarch support. The default is -+to check for glibc start files in a multiarch location, and enable it -+if the files are found. The auto detection is enabled for native builds, -+and for cross builds configured with <samp><span class="option">--with-sysroot</span></samp>, and without -+<samp><span class="option">--with-native-system-header-dir</span></samp>. -+More documentation about multiarch can be found at -+<a href="http://wiki.debian.org/Multiarch">http://wiki.debian.org/Multiarch</a>. ++@deftypevr {Target Hook} bool TARGET_FORCE_AT_COMP_DIR ++True if the @code{DW_AT_comp_dir} attribute should be emitted for each compilation unit. This attribute is required for the darwin linker to emit debug information. ++@end deftypevr ++ + @deftypevr {Target Hook} bool TARGET_DELAY_SCHED2 + True if sched2 is not to be run at its normal place. This usually means it will be run as part of machine-specific reorg. + @end deftypevr +--- a/src/gcc/doc/tm.texi.in ++++ b/src/gcc/doc/tm.texi.in +@@ -9388,6 +9388,8 @@ + + @hook TARGET_WANT_DEBUG_PUB_SECTIONS + ++@hook TARGET_FORCE_AT_COMP_DIR + - <p>Some targets provide finer-grained control over which multilibs are built - (e.g., <samp><span class="option">--disable-softfloat</span></samp>): - <dl> + @hook TARGET_DELAY_SCHED2 + + @hook TARGET_DELAY_VARTRACK diff --git a/debian/patches/gcc-linaro.diff b/debian/patches/gcc-linaro.diff index a60fe9e..e25f258 100644 --- a/debian/patches/gcc-linaro.diff +++ b/debian/patches/gcc-linaro.diff @@ -1,8 +1,53 @@ -# DP: Changes for the Linaro 4.7-2013.04 release. +# DP: Changes for the Linaro 4.7-2013.05 release. --- a/src/ChangeLog.linaro +++ b/src/ChangeLog.linaro -@@ -0,0 +1,2490 @@ +@@ -0,0 +1,2535 @@ ++2013-05-14 Yvan Roux <yvan.roux@linaro.org> ++ ++ GCC Linaro 4.7-2013.05 released. ++ ++ gcc/ ++ * LINARO-VERSION: Update. ++ ++2013-05-08 Matthew Gretton-Dann <matthew.gretton-dann@linaro.org> ++ ++ Merge from FSF arm/aarch64-4.7-branch r198254..r198689. ++ ++ Backport /work/sources/gcc-bzr/arm-aarch64-4.7 r198254: ++ [Backport AArch64] Fix vld1<q>_* asm constraints in arm_neon.h ++ ++ gcc/ ++ * config/aarch64/arm_neon.h (vld1<q>_lane*): Fix constraints. ++ (vld1<q>_dup_<sufp><8, 16, 32, 64>): Likewise. ++ (vld1<q>_<sufp><8, 16, 32, 64>): Likewise. ++ ++ Backport /work/sources/gcc-bzr/arm-aarch64-4.7 r198452: ++ gcc/ ++ Backported from mainline. ++ * config/aarch64/aarch64-simd.md (aarch64_vcond_internal): Fix ++ floating-point vector comparisons against 0. ++ ++ gcc/testsuite/ ++ Backported from mainline. ++ * gcc.target/aarch64/vect-fcm.x: Add check for zero forms of ++ inverse operands. ++ * gcc.target/aarch64/vect-fcm-eq-d.c: Check that new zero form ++ loop is vectorized. ++ * gcc.target/aarch64/vect-fcm-eq-f.c: Likewise. ++ * gcc.target/aarch64/vect-fcm-ge-d.c: Check that new zero form ++ loop is vectorized and that the correct instruction is generated. ++ * gcc.target/aarch64/vect-fcm-ge-f.c: Likewise. ++ * gcc.target/aarch64/vect-fcm-gt-d.c: Likewise. ++ * gcc.target/aarch64/vect-fcm-gt-f.c: Likewise. ++ ++ Backport /work/sources/gcc-bzr/arm-aarch64-4.7 r198689: ++ Backport of AArch64 -fomit-frame-pointer fix ++ ++2013-05-08 Matthew Gretton-Dann <matthew.gretton-dann@linaro.org> ++ ++ Merge from FSF GCC 4.7.3 (svn branches/gcc-4_7-branch 198701). ++ +2013-04-08 Yvan Roux <yvan.roux@linaro.org> + + gcc/ @@ -2939,7 +2984,25 @@ } return NULL_TREE; -@@ -10582,6 +10588,7 @@ +@@ -9692,7 +9698,16 @@ + case rvc_inf: + /* If arg is Inf or NaN and we're logb, return it. */ + if (TREE_CODE (rettype) == REAL_TYPE) +- return fold_convert_loc (loc, rettype, arg); ++ { ++ /* For logb(-Inf) we have to return +Inf. */ ++ if (real_isinf (value) && real_isneg (value)) ++ { ++ REAL_VALUE_TYPE tem; ++ real_inf (&tem); ++ return build_real (rettype, tem); ++ } ++ return fold_convert_loc (loc, rettype, arg); ++ } + /* Fall through... */ + case rvc_zero: + /* Zero may set errno and/or raise an exception for logb, also +@@ -10582,6 +10597,7 @@ CASE_FLT_FN (BUILT_IN_LLRINT): return fold_fixed_mathfn (loc, fndecl, arg0); @@ -2947,7 +3010,7 @@ case BUILT_IN_BSWAP32: case BUILT_IN_BSWAP64: return fold_builtin_bswap (fndecl, arg0); -@@ -14346,6 +14353,7 @@ +@@ -14346,6 +14362,7 @@ case BUILT_IN_ABS: case BUILT_IN_ALLOCA: case BUILT_IN_ALLOCA_WITH_ALIGN: @@ -3018,9 +3081,184 @@ if (c_uint32_type_node) builtin_define_type_max ("__UINT32_MAX__", c_uint32_type_node); if (c_uint64_type_node) +--- a/src/gcc/cfgexpand.c ++++ b/src/gcc/cfgexpand.c +@@ -3646,6 +3646,8 @@ + avoid_complex_debug_insns (rtx insn, rtx *exp_p, int depth) + { + rtx exp = *exp_p; ++ const char *format_ptr; ++ int i, j; + + if (exp == NULL_RTX) + return; +@@ -3668,8 +3670,7 @@ + return; + } + +- const char *format_ptr = GET_RTX_FORMAT (GET_CODE (exp)); +- int i, j; ++ format_ptr = GET_RTX_FORMAT (GET_CODE (exp)); + for (i = 0; i < GET_RTX_LENGTH (GET_CODE (exp)); i++) + switch (*format_ptr++) + { +--- a/src/gcc/ChangeLog ++++ b/src/gcc/ChangeLog +@@ -1,3 +1,126 @@ ++2013-05-07 Michael Meissner <meissner@linux.vnet.ibm.com> ++ ++ Backport from trunk ++ 2013-05-03 Michael Meissner <meissner@linux.vnet.ibm.com> ++ ++ PR target/57150 ++ * config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Use DFmode ++ to save TFmode registers and DImode to save TImode registers for ++ caller save operations. ++ (HARD_REGNO_CALL_PART_CLOBBERED): TFmode and TDmode do not need to ++ mark being partially clobbered since they only use the first ++ double word. ++ ++ * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): TFmode ++ and TDmode only use the upper 64-bits of each VSX register. ++ ++2013-05-03 Marek Polacek <polacek@redhat.com> ++ ++ Backport from mainline ++ 2013-04-25 Marek Polacek <polacek@redhat.com> ++ ++ PR tree-optimization/57066 ++ * builtins.c (fold_builtin_logb): Return +Inf for -Inf. ++ ++2013-04-30 Uros Bizjak <ubizjak@gmail.com> ++ ++ Backport from mainline ++ 2013-04-29 Uros Bizjak <ubizjak@gmail.com> ++ ++ PR target/44578 ++ * config/i386/i386.md (*zero_extendsidi2_rex64): Add "!" to m->?*y ++ alternative. ++ (*zero_extendsidi2): Ditto. ++ ++ Backport from mainline ++ 2013-04-29 Uros Bizjak <ubizjak@gmail.com> ++ ++ PR target/57098 ++ * config/i386/i386.c (ix86_expand_vec_perm): Validize constant memory. ++ ++2013-04-29 Christian Bruel <christian.bruel@st.com> ++ ++ PR target/57108 ++ * sh.md (tstsi_t_zero_extract_eq): Set mode for operand 0. ++ ++2013-04-27 Jakub Jelinek <jakub@redhat.com> ++ ++ PR target/56866 ++ * config/i386/sse.md (xop_rotr<mode>3): Fix up computation of ++ the immediate rotate count. ++ ++2013-04-21 Eric Botcazou <ebotcazou@adacore.com> ++ ++ * cfgexpand.c (avoid_complex_debug_insns): Fix C++ism. ++ ++2013-04-19 Matthias Klose <doko@ubuntu.com> ++ ++ PR middle-end/56848 ++ Re-apply ++ 2013-04-01 Andrey Belevantsev <abel@ispras.ru> ++ ++ Backport from mainline ++ 2013-02-25 Andrey Belevantsev <abel@ispras.ru> ++ Alexander Monakov <amonakov@ispras.ru> ++ ++ PR middle-end/56077 ++ * sched-deps.c (sched_analyze_insn): When reg_pending_barrier, ++ flush pending lists also on non-jumps. Adjust comment. ++ ++ Backport from 4.8: ++ 2012-08-27 Maxim Kuvyrkov <maxim@codesourcery.com> ++ ++ * sched-deps.c (add_dependence_list_and_free): Simplify. ++ (flush_pending_list_and_free): Fix a hack that was fixing a hack. Free ++ lists when add_dependence_list_and_free doesn't free them. ++ ++2013-04-19 Marek Polacek <polacek@redhat.com> ++ ++ Backport from mainline ++ 2013-01-08 Steven Bosscher <steven@gcc.gnu.org> ++ Jakub Jelinek <jakub@redhat.com> ++ ++ PR tree-optimization/48189 ++ * predict.c (predict_loops): If max is 0, don't call compare_tree_int. ++ If nitercst is 0, don't predict the exit edge. ++ ++2013-04-16 Jack Howarth <howarth@bromo.med.uc.edu> ++ ++ Backport from mainline ++ 2012-05-29 Jack Howarth <howarth@bromo.med.uc.edu> ++ * config/darwin.h (STARTFILE_SPEC): Use -no_new_main with -lgcrt1.o ++ on Darwin >= 12. ++ (DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin >= 10 and < 12. ++ ++ ++ 2012-05-29 Jack Howarth <howarth@bromo.med.uc.edu> ++ PR debug/53453 ++ * doc/tm.texi: Update. ++ * doc/tm.texi.in (SDB and DWARF) <TARGET_FORCE_AT_COMP_DIR>: Add @hook. ++ * target.def (force_at_comp_dir): New hook. ++ * config/darwin.h (TARGET_FORCE_AT_COMP_DIR): Define. ++ * dwarf2out.c (dwarf2out_finish): Check targetm.force_at_comp_dir. ++ ++2013-04-15 Eric Botcazou <ebotcazou@adacore.com> ++ ++ PR target/56890 ++ * config/sparc/sparc.c (enum sparc_mode_class): Add H_MODE value. ++ (S_MODES): Set H_MODE bit. ++ (SF_MODES): Set only S_MODE and SF_MODE bits. ++ (DF_MODES): Set SF_MODES and only D_MODE and DF_MODE bits. ++ (sparc_init_modes) <MODE_INT>: Set H_MODE bit for sub-word modes. ++ <MODE_VECTOR_INT>: Do not set SF_MODE for sub-word modes. ++ <MODE_FLOAT>: Likewise. ++ ++2013-04-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> ++ ++ Backport from mainline: ++ 2013-04-06 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> ++ ++ PR target/55487 ++ * config/pa/pa.c (legitimize_pic_address): Before incrementing label ++ nuses, make sure we have a label. ++ + 2013-04-11 Release Manager + + * GCC 4.7.3 released. --- a/src/gcc/ChangeLog.aarch64 +++ b/src/gcc/ChangeLog.aarch64 -@@ -0,0 +1,1070 @@ +@@ -0,0 +1,1095 @@ ++2013-05-07 Ian Bolton <ian.bolton@arm.com> ++ ++ Backport from mainline ++ 2013-03-28 Ian Bolton <ian.bolton@arm.com> ++ ++ * config/aarch64/aarch64.md (aarch64_can_eliminate): Keep frame ++ record only when desired or required. ++ ++2013-04-30 James Greenhalgh <james.greenhalgh@arm.com> ++ ++ Backport from mainline. ++ 2013-04-11 James Greenhalgh <james.greenhalgh@arm.com> ++ ++ * config/aarch64/aarch64-simd.md (aarch64_vcond_internal): Fix ++ floating-point vector comparisons against 0. ++ ++2013-04-24 James Greenhalgh <james.greenhalgh@arm.com> ++ ++ Backport from mainline. ++ 2013-04-24 James Greenhalgh <james.greenhalgh@arm.com> ++ ++ * config/aarch64/arm_neon.h (vld1<q>_lane*): Fix constraints. ++ (vld1<q>_dup_<sufp><8, 16, 32, 64>): Likewise. ++ (vld1<q>_<sufp><8, 16, 32, 64>): Likewise. ++ +2013-03-01 James Greenhalgh <james.greenhalgh@arm.com> + + * config/aarch64/aarch64.c: @@ -5641,7 +5879,7 @@ +#undef AARCH64_FIND_FRINT_VARIANT --- a/src/gcc/config/aarch64/aarch64.c +++ b/src/gcc/config/aarch64/aarch64.c -@@ -0,0 +1,7965 @@ +@@ -0,0 +1,7972 @@ +/* Machine description for AArch64 architecture. + Copyright (C) 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. + Contributed by ARM Ltd. @@ -9509,14 +9747,21 @@ + } + else + { -+ /* If we decided that we didn't need a frame pointer but then used -+ LR in the function, then we do need a frame pointer after all, so -+ prevent this elimination to ensure a frame pointer is used. */ -+ ++ /* If we decided that we didn't need a leaf frame pointer but then used ++ LR in the function, then we'll want a frame pointer after all, so ++ prevent this elimination to ensure a frame pointer is used. ++ ++ NOTE: the original value of flag_omit_frame_pointer gets trashed ++ IFF flag_omit_leaf_frame_pointer is true, so we check the value ++ of faked_omit_frame_pointer here (which is true when we always ++ wish to keep non-leaf frame pointers but only wish to keep leaf frame ++ pointers when LR is clobbered). */ + if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM -+ && df_regs_ever_live_p (LR_REGNUM)) ++ && df_regs_ever_live_p (LR_REGNUM) ++ && faked_omit_frame_pointer) + return false; + } ++ + return true; +} + @@ -18738,7 +18983,7 @@ + BUILTIN_VALL (BINOP, trn2) --- a/src/gcc/config/aarch64/aarch64-simd.md +++ b/src/gcc/config/aarch64/aarch64-simd.md -@@ -0,0 +1,3692 @@ +@@ -0,0 +1,3716 @@ +;; Machine description for AArch64 AdvSIMD architecture. +;; Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc. +;; Contributed by ARM Ltd. @@ -20327,6 +20572,7 @@ + "TARGET_SIMD" +{ + int inverse = 0; ++ int use_zero_form = 0; + int swap_bsl_operands = 0; + rtx mask = gen_reg_rtx (<V_cmp_result>mode); + rtx tmp = gen_reg_rtx (<V_cmp_result>mode); @@ -20337,12 +20583,16 @@ + switch (GET_CODE (operands[3])) + { + case GE: ++ case GT: + case LE: ++ case LT: + case EQ: -+ if (!REG_P (operands[5]) -+ && (operands[5] != CONST0_RTX (<MODE>mode))) -+ operands[5] = force_reg (<MODE>mode, operands[5]); -+ break; ++ if (operands[5] == CONST0_RTX (<MODE>mode)) ++ { ++ use_zero_form = 1; ++ break; ++ } ++ /* Fall through. */ + default: + if (!REG_P (operands[5])) + operands[5] = force_reg (<MODE>mode, operands[5]); @@ -20393,7 +20643,26 @@ + a GT b -> a GT b + a LE b -> b GE a + a LT b -> b GT a -+ a EQ b -> a EQ b */ ++ a EQ b -> a EQ b ++ Note that there also exist direct comparison against 0 forms, ++ so catch those as a special case. */ ++ if (use_zero_form) ++ { ++ inverse = 0; ++ switch (GET_CODE (operands[3])) ++ { ++ case LT: ++ base_comparison = gen_aarch64_cmlt<mode>; ++ break; ++ case LE: ++ base_comparison = gen_aarch64_cmle<mode>; ++ break; ++ default: ++ /* Do nothing, other zero form cases already have the correct ++ base_comparison. */ ++ break; ++ } ++ } + + if (!inverse) + emit_insn (base_comparison (mask, operands[4], operands[5])); @@ -30834,10 +31103,10 @@ +vld1_dup_f32 (const float32_t * a) +{ + float32x2_t result; -+ __asm__ ("ld1r {%0.2s},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.2s}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -30845,10 +31114,10 @@ +vld1_dup_f64 (const float64_t * a) +{ + float64x1_t result; -+ __asm__ ("ld1 {%0.1d},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.1d}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -30856,10 +31125,10 @@ +vld1_dup_p8 (const poly8_t * a) +{ + poly8x8_t result; -+ __asm__ ("ld1r {%0.8b},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.8b}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -30867,10 +31136,10 @@ +vld1_dup_p16 (const poly16_t * a) +{ + poly16x4_t result; -+ __asm__ ("ld1r {%0.4h},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.4h}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -30878,10 +31147,10 @@ +vld1_dup_s8 (const int8_t * a) +{ + int8x8_t result; -+ __asm__ ("ld1r {%0.8b},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.8b}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -30889,10 +31158,10 @@ +vld1_dup_s16 (const int16_t * a) +{ + int16x4_t result; -+ __asm__ ("ld1r {%0.4h},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.4h}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -30900,10 +31169,10 @@ +vld1_dup_s32 (const int32_t * a) +{ + int32x2_t result; -+ __asm__ ("ld1r {%0.2s},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.2s}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -30911,10 +31180,10 @@ +vld1_dup_s64 (const int64_t * a) +{ + int64x1_t result; -+ __asm__ ("ld1 {%0.1d},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.1d}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -30922,10 +31191,10 @@ +vld1_dup_u8 (const uint8_t * a) +{ + uint8x8_t result; -+ __asm__ ("ld1r {%0.8b},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.8b}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -30933,10 +31202,10 @@ +vld1_dup_u16 (const uint16_t * a) +{ + uint16x4_t result; -+ __asm__ ("ld1r {%0.4h},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.4h}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -30944,10 +31213,10 @@ +vld1_dup_u32 (const uint32_t * a) +{ + uint32x2_t result; -+ __asm__ ("ld1r {%0.2s},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.2s}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -30955,10 +31224,10 @@ +vld1_dup_u64 (const uint64_t * a) +{ + uint64x1_t result; -+ __asm__ ("ld1 {%0.1d},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.1d}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -30966,10 +31235,10 @@ +vld1_f32 (const float32_t * a) +{ + float32x2_t result; -+ __asm__ ("ld1 {%0.2s},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.2s}, %1" ++ : "=w"(result) ++ : "Utv"(({const float32x2_t *_a = (float32x2_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -30977,10 +31246,10 @@ +vld1_f64 (const float64_t * a) +{ + float64x1_t result; -+ __asm__ ("ld1 {%0.1d},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.1d}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -30990,9 +31259,9 @@ + float32x2_t b_ = (b); \ + const float32_t * a_ = (a); \ + float32x2_t result; \ -+ __asm__ ("ld1 {%0.s}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.s}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i" (c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31003,9 +31272,9 @@ + float64x1_t b_ = (b); \ + const float64_t * a_ = (a); \ + float64x1_t result; \ -+ __asm__ ("ld1 {%0.d}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.d}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i" (c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31016,9 +31285,9 @@ + poly8x8_t b_ = (b); \ + const poly8_t * a_ = (a); \ + poly8x8_t result; \ -+ __asm__ ("ld1 {%0.b}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.b}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i" (c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31029,9 +31298,9 @@ + poly16x4_t b_ = (b); \ + const poly16_t * a_ = (a); \ + poly16x4_t result; \ -+ __asm__ ("ld1 {%0.h}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.h}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i" (c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31042,9 +31311,9 @@ + int8x8_t b_ = (b); \ + const int8_t * a_ = (a); \ + int8x8_t result; \ -+ __asm__ ("ld1 {%0.b}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.b}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i" (c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31055,9 +31324,9 @@ + int16x4_t b_ = (b); \ + const int16_t * a_ = (a); \ + int16x4_t result; \ -+ __asm__ ("ld1 {%0.h}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.h}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i" (c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31068,9 +31337,9 @@ + int32x2_t b_ = (b); \ + const int32_t * a_ = (a); \ + int32x2_t result; \ -+ __asm__ ("ld1 {%0.s}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.s}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i" (c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31081,9 +31350,9 @@ + int64x1_t b_ = (b); \ + const int64_t * a_ = (a); \ + int64x1_t result; \ -+ __asm__ ("ld1 {%0.d}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.d}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i" (c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31094,9 +31363,9 @@ + uint8x8_t b_ = (b); \ + const uint8_t * a_ = (a); \ + uint8x8_t result; \ -+ __asm__ ("ld1 {%0.b}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.b}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i" (c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31107,9 +31376,9 @@ + uint16x4_t b_ = (b); \ + const uint16_t * a_ = (a); \ + uint16x4_t result; \ -+ __asm__ ("ld1 {%0.h}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.h}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i" (c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31120,9 +31389,9 @@ + uint32x2_t b_ = (b); \ + const uint32_t * a_ = (a); \ + uint32x2_t result; \ -+ __asm__ ("ld1 {%0.s}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.s}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i" (c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31133,9 +31402,9 @@ + uint64x1_t b_ = (b); \ + const uint64_t * a_ = (a); \ + uint64x1_t result; \ -+ __asm__ ("ld1 {%0.d}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.d}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i" (c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31144,10 +31413,10 @@ +vld1_p8 (const poly8_t * a) +{ + poly8x8_t result; -+ __asm__ ("ld1 {%0.8b}, [%1]" -+ : "=w"(result) -+ : "r"(a) -+ : /* No clobbers */); ++ __asm__ ("ld1 {%0.8b}, %1" ++ : "=w"(result) ++ : "Utv"(({const poly8x8_t *_a = (poly8x8_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31155,10 +31424,10 @@ +vld1_p16 (const poly16_t * a) +{ + poly16x4_t result; -+ __asm__ ("ld1 {%0.4h}, [%1]" -+ : "=w"(result) -+ : "r"(a) -+ : /* No clobbers */); ++ __asm__ ("ld1 {%0.4h}, %1" ++ : "=w"(result) ++ : "Utv"(({const poly16x4_t *_a = (poly16x4_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31166,10 +31435,10 @@ +vld1_s8 (const int8_t * a) +{ + int8x8_t result; -+ __asm__ ("ld1 {%0.8b},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.8b}, %1" ++ : "=w"(result) ++ : "Utv"(({const int8x8_t *_a = (int8x8_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31177,10 +31446,10 @@ +vld1_s16 (const int16_t * a) +{ + int16x4_t result; -+ __asm__ ("ld1 {%0.4h},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.4h}, %1" ++ : "=w"(result) ++ : "Utv"(({const int16x4_t *_a = (int16x4_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31188,10 +31457,10 @@ +vld1_s32 (const int32_t * a) +{ + int32x2_t result; -+ __asm__ ("ld1 {%0.2s},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.2s}, %1" ++ : "=w"(result) ++ : "Utv"(({const int32x2_t *_a = (int32x2_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31199,10 +31468,10 @@ +vld1_s64 (const int64_t * a) +{ + int64x1_t result; -+ __asm__ ("ld1 {%0.1d},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.1d}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -31210,10 +31479,10 @@ +vld1_u8 (const uint8_t * a) +{ + uint8x8_t result; -+ __asm__ ("ld1 {%0.8b},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.8b}, %1" ++ : "=w"(result) ++ : "Utv"(({const uint8x8_t *_a = (uint8x8_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31221,10 +31490,10 @@ +vld1_u16 (const uint16_t * a) +{ + uint16x4_t result; -+ __asm__ ("ld1 {%0.4h},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.4h}, %1" ++ : "=w"(result) ++ : "Utv"(({const uint16x4_t *_a = (uint16x4_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31232,10 +31501,10 @@ +vld1_u32 (const uint32_t * a) +{ + uint32x2_t result; -+ __asm__ ("ld1 {%0.2s},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.2s}, %1" ++ : "=w"(result) ++ : "Utv"(({const uint32x2_t *_a = (uint32x2_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31243,10 +31512,10 @@ +vld1_u64 (const uint64_t * a) +{ + uint64x1_t result; -+ __asm__ ("ld1 {%0.1d},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.1d}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -31254,10 +31523,10 @@ +vld1q_dup_f32 (const float32_t * a) +{ + float32x4_t result; -+ __asm__ ("ld1r {%0.4s},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.4s}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -31265,10 +31534,10 @@ +vld1q_dup_f64 (const float64_t * a) +{ + float64x2_t result; -+ __asm__ ("ld1r {%0.2d},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.2d}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -31276,10 +31545,10 @@ +vld1q_dup_p8 (const poly8_t * a) +{ + poly8x16_t result; -+ __asm__ ("ld1r {%0.16b},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.16b}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -31287,10 +31556,10 @@ +vld1q_dup_p16 (const poly16_t * a) +{ + poly16x8_t result; -+ __asm__ ("ld1r {%0.8h},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.8h}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -31298,10 +31567,10 @@ +vld1q_dup_s8 (const int8_t * a) +{ + int8x16_t result; -+ __asm__ ("ld1r {%0.16b},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.16b}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -31309,10 +31578,10 @@ +vld1q_dup_s16 (const int16_t * a) +{ + int16x8_t result; -+ __asm__ ("ld1r {%0.8h},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.8h}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -31320,10 +31589,10 @@ +vld1q_dup_s32 (const int32_t * a) +{ + int32x4_t result; -+ __asm__ ("ld1r {%0.4s},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.4s}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -31331,10 +31600,10 @@ +vld1q_dup_s64 (const int64_t * a) +{ + int64x2_t result; -+ __asm__ ("ld1r {%0.2d},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.2d}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -31342,10 +31611,10 @@ +vld1q_dup_u8 (const uint8_t * a) +{ + uint8x16_t result; -+ __asm__ ("ld1r {%0.16b},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.16b}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -31353,10 +31622,10 @@ +vld1q_dup_u16 (const uint16_t * a) +{ + uint16x8_t result; -+ __asm__ ("ld1r {%0.8h},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.8h}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -31364,10 +31633,10 @@ +vld1q_dup_u32 (const uint32_t * a) +{ + uint32x4_t result; -+ __asm__ ("ld1r {%0.4s},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.4s}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -31375,10 +31644,10 @@ +vld1q_dup_u64 (const uint64_t * a) +{ + uint64x2_t result; -+ __asm__ ("ld1r {%0.2d},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1r {%0.2d}, %1" ++ : "=w"(result) ++ : "Utv"(*a) ++ : /* No clobbers */); + return result; +} + @@ -31386,10 +31655,10 @@ +vld1q_f32 (const float32_t * a) +{ + float32x4_t result; -+ __asm__ ("ld1 {%0.4s},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.4s}, %1" ++ : "=w"(result) ++ : "Utv"(({const float32x4_t *_a = (float32x4_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31397,10 +31666,10 @@ +vld1q_f64 (const float64_t * a) +{ + float64x2_t result; -+ __asm__ ("ld1 {%0.2d},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.2d}, %1" ++ : "=w"(result) ++ : "Utv"(({const float64x2_t *_a = (float64x2_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31410,9 +31679,9 @@ + float32x4_t b_ = (b); \ + const float32_t * a_ = (a); \ + float32x4_t result; \ -+ __asm__ ("ld1 {%0.s}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.s}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i"(c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31423,9 +31692,9 @@ + float64x2_t b_ = (b); \ + const float64_t * a_ = (a); \ + float64x2_t result; \ -+ __asm__ ("ld1 {%0.d}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.d}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i"(c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31436,9 +31705,9 @@ + poly8x16_t b_ = (b); \ + const poly8_t * a_ = (a); \ + poly8x16_t result; \ -+ __asm__ ("ld1 {%0.b}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.b}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i"(c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31449,9 +31718,9 @@ + poly16x8_t b_ = (b); \ + const poly16_t * a_ = (a); \ + poly16x8_t result; \ -+ __asm__ ("ld1 {%0.h}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.h}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i"(c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31462,9 +31731,9 @@ + int8x16_t b_ = (b); \ + const int8_t * a_ = (a); \ + int8x16_t result; \ -+ __asm__ ("ld1 {%0.b}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.b}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i"(c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31475,9 +31744,9 @@ + int16x8_t b_ = (b); \ + const int16_t * a_ = (a); \ + int16x8_t result; \ -+ __asm__ ("ld1 {%0.h}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.h}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i"(c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31488,9 +31757,9 @@ + int32x4_t b_ = (b); \ + const int32_t * a_ = (a); \ + int32x4_t result; \ -+ __asm__ ("ld1 {%0.s}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.s}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i"(c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31501,9 +31770,9 @@ + int64x2_t b_ = (b); \ + const int64_t * a_ = (a); \ + int64x2_t result; \ -+ __asm__ ("ld1 {%0.d}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.d}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i"(c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31514,9 +31783,9 @@ + uint8x16_t b_ = (b); \ + const uint8_t * a_ = (a); \ + uint8x16_t result; \ -+ __asm__ ("ld1 {%0.b}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.b}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i"(c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31527,9 +31796,9 @@ + uint16x8_t b_ = (b); \ + const uint16_t * a_ = (a); \ + uint16x8_t result; \ -+ __asm__ ("ld1 {%0.h}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.h}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i"(c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31540,9 +31809,9 @@ + uint32x4_t b_ = (b); \ + const uint32_t * a_ = (a); \ + uint32x4_t result; \ -+ __asm__ ("ld1 {%0.s}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.s}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i"(c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31553,9 +31822,9 @@ + uint64x2_t b_ = (b); \ + const uint64_t * a_ = (a); \ + uint64x2_t result; \ -+ __asm__ ("ld1 {%0.d}[%3],[%1]" \ ++ __asm__ ("ld1 {%0.d}[%1], %2" \ + : "=w"(result) \ -+ : "r"(a_), "0"(b_), "i"(c) \ ++ : "i"(c), "Utv"(*a_), "0"(b_) \ + : /* No clobbers */); \ + result; \ + }) @@ -31564,10 +31833,10 @@ +vld1q_p8 (const poly8_t * a) +{ + poly8x16_t result; -+ __asm__ ("ld1 {%0.16b},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.16b}, %1" ++ : "=w"(result) ++ : "Utv"(({const poly8x16_t *_a = (poly8x16_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31575,10 +31844,10 @@ +vld1q_p16 (const poly16_t * a) +{ + poly16x8_t result; -+ __asm__ ("ld1 {%0.8h},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.16b}, %1" ++ : "=w"(result) ++ : "Utv"(({const poly16x8_t *_a = (poly16x8_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31586,10 +31855,10 @@ +vld1q_s8 (const int8_t * a) +{ + int8x16_t result; -+ __asm__ ("ld1 {%0.16b},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.16b}, %1" ++ : "=w"(result) ++ : "Utv"(({const int8x16_t *_a = (int8x16_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31597,10 +31866,10 @@ +vld1q_s16 (const int16_t * a) +{ + int16x8_t result; -+ __asm__ ("ld1 {%0.8h},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.8h}, %1" ++ : "=w"(result) ++ : "Utv"(({const int16x8_t *_a = (int16x8_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31608,10 +31877,10 @@ +vld1q_s32 (const int32_t * a) +{ + int32x4_t result; -+ __asm__ ("ld1 {%0.4s},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.4s}, %1" ++ : "=w"(result) ++ : "Utv"(({const int32x4_t *_a = (int32x4_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31619,10 +31888,10 @@ +vld1q_s64 (const int64_t * a) +{ + int64x2_t result; -+ __asm__ ("ld1 {%0.2d},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.2d}, %1" ++ : "=w"(result) ++ : "Utv"(({const int64x2_t *_a = (int64x2_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31630,10 +31899,10 @@ +vld1q_u8 (const uint8_t * a) +{ + uint8x16_t result; -+ __asm__ ("ld1 {%0.16b},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.16b}, %1" ++ : "=w"(result) ++ : "Utv"(({const uint8x16_t *_a = (uint8x16_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31641,10 +31910,10 @@ +vld1q_u16 (const uint16_t * a) +{ + uint16x8_t result; -+ __asm__ ("ld1 {%0.8h},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.8h}, %1" ++ : "=w"(result) ++ : "Utv"(({const uint16x8_t *_a = (uint16x8_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31652,10 +31921,10 @@ +vld1q_u32 (const uint32_t * a) +{ + uint32x4_t result; -+ __asm__ ("ld1 {%0.4s},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.4s}, %1" ++ : "=w"(result) ++ : "Utv"(({const uint32x4_t *_a = (uint32x4_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -31663,10 +31932,10 @@ +vld1q_u64 (const uint64_t * a) +{ + uint64x2_t result; -+ __asm__ ("ld1 {%0.2d},[%1]" -+ : "=w"(result) -+ : "r"(a) -+ : "memory"); ++ __asm__ ("ld1 {%0.2d}, %1" ++ : "=w"(result) ++ : "Utv"(({const uint64x2_t *_a = (uint64x2_t *) a; *_a;})) ++ : /* No clobbers */); + return result; +} + @@ -57102,6 +57371,104 @@ ;; Conversion routines +--- a/src/gcc/config/darwin.h ++++ b/src/gcc/config/darwin.h +@@ -356,7 +356,9 @@ + %{!Zbundle:%{pg:%{static:-lgcrt0.o} \ + %{!static:%{object:-lgcrt0.o} \ + %{!object:%{preload:-lgcrt0.o} \ +- %{!preload:-lgcrt1.o %(darwin_crt2)}}}} \ ++ %{!preload:-lgcrt1.o \ ++ %:version-compare(>= 10.8 mmacosx-version-min= -no_new_main) \ ++ %(darwin_crt2)}}}} \ + %{!pg:%{static:-lcrt0.o} \ + %{!static:%{object:-lcrt0.o} \ + %{!object:%{preload:-lcrt0.o} \ +@@ -379,7 +381,7 @@ + #define DARWIN_CRT1_SPEC \ + "%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o) \ + %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lcrt1.10.5.o) \ +- %:version-compare(>= 10.6 mmacosx-version-min= -lcrt1.10.6.o) \ ++ %:version-compare(>< 10.6 10.8 mmacosx-version-min= -lcrt1.10.6.o) \ + %{fgnu-tm: -lcrttms.o}" + + /* Default Darwin ASM_SPEC, very simple. */ +@@ -414,6 +416,8 @@ + + #define TARGET_WANT_DEBUG_PUB_SECTIONS true + ++#define TARGET_FORCE_AT_COMP_DIR true ++ + /* When generating stabs debugging, use N_BINCL entries. */ + + #define DBX_USE_BINCL +--- a/src/gcc/config/i386/i386.c ++++ b/src/gcc/config/i386/i386.c +@@ -20026,7 +20026,7 @@ + vec[i * 2 + 1] = const1_rtx; + } + vt = gen_rtx_CONST_VECTOR (maskmode, gen_rtvec_v (w, vec)); +- vt = force_const_mem (maskmode, vt); ++ vt = validize_mem (force_const_mem (maskmode, vt)); + t1 = expand_simple_binop (maskmode, PLUS, t1, vt, t1, 1, + OPTAB_DIRECT); + +@@ -20223,7 +20223,7 @@ + for (i = 0; i < 16; ++i) + vec[i] = GEN_INT (i/e * e); + vt = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, vec)); +- vt = force_const_mem (V16QImode, vt); ++ vt = validize_mem (force_const_mem (V16QImode, vt)); + if (TARGET_XOP) + emit_insn (gen_xop_pperm (mask, mask, mask, vt)); + else +@@ -20234,7 +20234,7 @@ + for (i = 0; i < 16; ++i) + vec[i] = GEN_INT (i % e); + vt = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, vec)); +- vt = force_const_mem (V16QImode, vt); ++ vt = validize_mem (force_const_mem (V16QImode, vt)); + emit_insn (gen_addv16qi3 (mask, mask, vt)); + } + +--- a/src/gcc/config/i386/i386.md ++++ b/src/gcc/config/i386/i386.md +@@ -3444,9 +3444,9 @@ + }) + + (define_insn "*zero_extendsidi2_rex64" +- [(set (match_operand:DI 0 "nonimmediate_operand" "=r,o,?*Ym,?*y,?*Yi,*x") ++ [(set (match_operand:DI 0 "nonimmediate_operand" "=r,o,?*Ym,?!*y,?*Yi,*x") + (zero_extend:DI +- (match_operand:SI 1 "nonimmediate_operand" "rm,0,r ,m ,r ,m")))] ++ (match_operand:SI 1 "nonimmediate_operand" "rm,0,r ,m ,r ,m")))] + "TARGET_64BIT" + "@ + mov{l}\t{%1, %k0|%k0, %1} +@@ -3469,9 +3469,9 @@ + + ;; %%% Kill me once multi-word ops are sane. + (define_insn "zero_extendsidi2_1" +- [(set (match_operand:DI 0 "nonimmediate_operand" "=r,?r,?o,?*Ym,?*y,?*Yi,*x") ++ [(set (match_operand:DI 0 "nonimmediate_operand" "=r,?r,?o,?*Ym,?!*y,?*Yi,*x") + (zero_extend:DI +- (match_operand:SI 1 "nonimmediate_operand" "0,rm,r ,r ,m ,r ,m"))) ++ (match_operand:SI 1 "nonimmediate_operand" "0,rm,r ,r ,m ,r ,m"))) + (clobber (reg:CC FLAGS_REG))] + "!TARGET_64BIT" + "@ +--- a/src/gcc/config/i386/sse.md ++++ b/src/gcc/config/i386/sse.md +@@ -11167,7 +11167,8 @@ + (match_operand:SI 2 "const_0_to_<sserotatemax>_operand" "n")))] + "TARGET_XOP" + { +- operands[3] = GEN_INT ((<ssescalarnum> * 8) - INTVAL (operands[2])); ++ operands[3] ++ = GEN_INT (GET_MODE_BITSIZE (<ssescalarmode>mode) - INTVAL (operands[2])); + return \"vprot<ssemodesuffix>\t{%3, %1, %0|%0, %1, %3}\"; + } + [(set_attr "type" "sseishft") --- a/src/gcc/config/m68k/m68k.c +++ b/src/gcc/config/m68k/m68k.c @@ -6090,7 +6090,7 @@ @@ -57113,6 +57480,19 @@ insn_size = sched_ib.filled; } +--- a/src/gcc/config/pa/pa.c ++++ b/src/gcc/config/pa/pa.c +@@ -790,7 +790,9 @@ + /* Extract CODE_LABEL. */ + orig = XEXP (orig, 0); + add_reg_note (insn, REG_LABEL_OPERAND, orig); +- LABEL_NUSES (orig)++; ++ /* Make sure we have label and not a note. */ ++ if (LABEL_P (orig)) ++ LABEL_NUSES (orig)++; + } + crtl->uses_pic_offset_table = 1; + return reg; --- a/src/gcc/config/rs6000/rs6000-builtin.def +++ b/src/gcc/config/rs6000/rs6000-builtin.def @@ -1430,9 +1430,6 @@ @@ -57127,7 +57507,26 @@ RS6000_BTC_MISC) --- a/src/gcc/config/rs6000/rs6000.c +++ b/src/gcc/config/rs6000/rs6000.c -@@ -11388,9 +11388,6 @@ +@@ -2398,8 +2398,16 @@ + reg_size = UNITS_PER_WORD; + + for (m = 0; m < NUM_MACHINE_MODES; ++m) +- rs6000_class_max_nregs[m][c] +- = (GET_MODE_SIZE (m) + reg_size - 1) / reg_size; ++ { ++ int reg_size2 = reg_size; ++ ++ /* TFmode/TDmode always takes 2 registers, even in VSX. */ ++ if (m == TDmode || m == TFmode) ++ reg_size2 = UNITS_PER_FP_WORD; ++ ++ rs6000_class_max_nregs[m][c] ++ = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2; ++ } + } + + if (TARGET_E500_DOUBLE) +@@ -11388,9 +11396,6 @@ case RS6000_BUILTIN_RSQRT: return rs6000_expand_unop_builtin (CODE_FOR_rsqrtdf2, exp, target); @@ -57137,7 +57536,7 @@ case POWER7_BUILTIN_BPERMD: return rs6000_expand_binop_builtin (((TARGET_64BIT) ? CODE_FOR_bpermd_di -@@ -11726,12 +11723,6 @@ +@@ -11726,12 +11731,6 @@ POWER7_BUILTIN_BPERMD, "__builtin_bpermd"); def_builtin ("__builtin_bpermd", ftype, POWER7_BUILTIN_BPERMD); @@ -57150,6 +57549,39 @@ #if TARGET_XCOFF /* AIX libm provides clog as __clog. */ if ((tdecl = builtin_decl_explicit (BUILT_IN_CLOG)) != NULL_TREE) +--- a/src/gcc/config/rs6000/rs6000.h ++++ b/src/gcc/config/rs6000/rs6000.h +@@ -1033,12 +1033,17 @@ + #define HARD_REGNO_NREGS(REGNO, MODE) rs6000_hard_regno_nregs[(MODE)][(REGNO)] + + /* When setting up caller-save slots (MODE == VOIDmode) ensure we allocate +- enough space to account for vectors in FP regs. */ ++ enough space to account for vectors in FP regs. However, TFmode/TDmode ++ should not use VSX instructions to do a caller save. */ + #define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \ + (TARGET_VSX \ + && ((MODE) == VOIDmode || ALTIVEC_OR_VSX_VECTOR_MODE (MODE)) \ +- && FP_REGNO_P (REGNO) \ +- ? V2DFmode \ ++ && FP_REGNO_P (REGNO) \ ++ ? V2DFmode \ ++ : ((MODE) == TFmode && FP_REGNO_P (REGNO)) \ ++ ? DFmode \ ++ : ((MODE) == TDmode && FP_REGNO_P (REGNO)) \ ++ ? DImode \ + : choose_hard_reg_mode ((REGNO), (NREGS), false)) + + #define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) \ +@@ -1046,7 +1051,8 @@ + && (GET_MODE_SIZE (MODE) > 4) \ + && INT_REGNO_P (REGNO)) ? 1 : 0) \ + || (TARGET_VSX && FP_REGNO_P (REGNO) \ +- && GET_MODE_SIZE (MODE) > 8)) ++ && GET_MODE_SIZE (MODE) > 8 && ((MODE) != TDmode) \ ++ && ((MODE) != TFmode))) + + #define VSX_VECTOR_MODE(MODE) \ + ((MODE) == V4SFmode \ --- a/src/gcc/config/rs6000/rs6000.md +++ b/src/gcc/config/rs6000/rs6000.md @@ -2387,7 +2387,7 @@ @@ -57161,6 +57593,85 @@ { if (!REG_P (operands[0]) && !REG_P (operands[1])) operands[1] = force_reg (HImode, operands[1]); +--- a/src/gcc/config/sh/sh.md ++++ b/src/gcc/config/sh/sh.md +@@ -654,7 +654,7 @@ + + (define_insn "tstsi_t_zero_extract_eq" + [(set (reg:SI T_REG) +- (eq:SI (zero_extract:SI (match_operand 0 "logical_operand" "z") ++ (eq:SI (zero_extract:SI (match_operand:SI 0 "logical_operand" "z") + (match_operand:SI 1 "const_int_operand") + (match_operand:SI 2 "const_int_operand")) + (const_int 0)))] +--- a/src/gcc/config/sparc/sparc.c ++++ b/src/gcc/config/sparc/sparc.c +@@ -4207,13 +4207,14 @@ + mapped into one sparc_mode_class mode. */ + + enum sparc_mode_class { +- S_MODE, D_MODE, T_MODE, O_MODE, ++ H_MODE, S_MODE, D_MODE, T_MODE, O_MODE, + SF_MODE, DF_MODE, TF_MODE, OF_MODE, + CC_MODE, CCFP_MODE + }; + + /* Modes for single-word and smaller quantities. */ +-#define S_MODES ((1 << (int) S_MODE) | (1 << (int) SF_MODE)) ++#define S_MODES \ ++ ((1 << (int) H_MODE) | (1 << (int) S_MODE) | (1 << (int) SF_MODE)) + + /* Modes for double-word and smaller quantities. */ + #define D_MODES (S_MODES | (1 << (int) D_MODE) | (1 << DF_MODE)) +@@ -4224,13 +4225,11 @@ + /* Modes for 8-word and smaller quantities. */ + #define O_MODES (T_MODES | (1 << (int) O_MODE) | (1 << (int) OF_MODE)) + +-/* Modes for single-float quantities. We must allow any single word or +- smaller quantity. This is because the fix/float conversion instructions +- take integer inputs/outputs from the float registers. */ +-#define SF_MODES (S_MODES) ++/* Modes for single-float quantities. */ ++#define SF_MODES ((1 << (int) S_MODE) | (1 << (int) SF_MODE)) + + /* Modes for double-float and smaller quantities. */ +-#define DF_MODES (D_MODES) ++#define DF_MODES (SF_MODES | (1 << (int) D_MODE) | (1 << DF_MODE)) + + /* Modes for quad-float and smaller quantities. */ + #define TF_MODES (DF_MODES | (1 << (int) TF_MODE)) +@@ -4326,7 +4325,9 @@ + case MODE_INT: + case MODE_PARTIAL_INT: + case MODE_COMPLEX_INT: +- if (GET_MODE_SIZE (i) <= 4) ++ if (GET_MODE_SIZE (i) < 4) ++ sparc_mode_class[i] = 1 << (int) H_MODE; ++ else if (GET_MODE_SIZE (i) == 4) + sparc_mode_class[i] = 1 << (int) S_MODE; + else if (GET_MODE_SIZE (i) == 8) + sparc_mode_class[i] = 1 << (int) D_MODE; +@@ -4338,14 +4339,16 @@ + sparc_mode_class[i] = 0; + break; + case MODE_VECTOR_INT: +- if (GET_MODE_SIZE (i) <= 4) +- sparc_mode_class[i] = 1 << (int)SF_MODE; ++ if (GET_MODE_SIZE (i) == 4) ++ sparc_mode_class[i] = 1 << (int) SF_MODE; + else if (GET_MODE_SIZE (i) == 8) +- sparc_mode_class[i] = 1 << (int)DF_MODE; ++ sparc_mode_class[i] = 1 << (int) DF_MODE; ++ else ++ sparc_mode_class[i] = 0; + break; + case MODE_FLOAT: + case MODE_COMPLEX_FLOAT: +- if (GET_MODE_SIZE (i) <= 4) ++ if (GET_MODE_SIZE (i) == 4) + sparc_mode_class[i] = 1 << (int) SF_MODE; + else if (GET_MODE_SIZE (i) == 8) + sparc_mode_class[i] = 1 << (int) DF_MODE; --- a/src/gcc/config.gcc +++ b/src/gcc/config.gcc @@ -317,6 +317,13 @@ @@ -57404,6 +57915,87 @@ powerpc-*-*) conftest_s=' .section ".tdata","awT",@progbits +--- a/src/gcc/cp/ChangeLog ++++ b/src/gcc/cp/ChangeLog +@@ -1,3 +1,13 @@ ++2013-04-21 Eric Botcazou <ebotcazou@adacore.com> ++ ++ * parser.c (cp_parser_late_return_type_opt): Fix C++ism. ++ ++2013-04-15 Jason Merrill <jason@redhat.com> ++ ++ PR c++/56388 ++ * semantics.c (insert_capture_proxy): Just use index 1 in the ++ stmt_list_stack. ++ + 2013-04-11 Release Manager + + * GCC 4.7.3 released. +--- a/src/gcc/cp/parser.c ++++ b/src/gcc/cp/parser.c +@@ -16691,7 +16691,7 @@ + cp_parser_late_return_type_opt (cp_parser* parser, cp_cv_quals quals) + { + cp_token *token; +- tree type; ++ tree type, save_ccp, save_ccr; + + /* Peek at the next token. */ + token = cp_lexer_peek_token (parser->lexer); +@@ -16702,8 +16702,8 @@ + /* Consume the ->. */ + cp_lexer_consume_token (parser->lexer); + +- tree save_ccp = current_class_ptr; +- tree save_ccr = current_class_ref; ++ save_ccp = current_class_ptr; ++ save_ccr = current_class_ref; + if (quals >= 0) + { + /* DR 1207: 'this' is in scope in the trailing return type. */ +--- a/src/gcc/cp/semantics.c ++++ b/src/gcc/cp/semantics.c +@@ -8959,13 +8959,12 @@ + insert_capture_proxy (tree var) + { + cp_binding_level *b; +- int skip; + tree stmt_list; + + /* Put the capture proxy in the extra body block so that it won't clash + with a later local variable. */ + b = current_binding_level; +- for (skip = 0; ; ++skip) ++ for (;;) + { + cp_binding_level *n = b->level_chain; + if (n->kind == sk_function_parms) +@@ -8976,8 +8975,7 @@ + + /* And put a DECL_EXPR in the STATEMENT_LIST for the same block. */ + var = build_stmt (DECL_SOURCE_LOCATION (var), DECL_EXPR, var); +- stmt_list = VEC_index (tree, stmt_list_stack, +- VEC_length (tree, stmt_list_stack) - 1 - skip); ++ stmt_list = VEC_index (tree, stmt_list_stack, 1); + gcc_assert (stmt_list); + append_to_statement_list_force (var, &stmt_list); + } +--- a/src/gcc/DATESTAMP ++++ b/src/gcc/DATESTAMP +@@ -1 +1 @@ +-20130411 ++20130508 +--- a/src/gcc/dwarf2out.c ++++ b/src/gcc/dwarf2out.c +@@ -22538,7 +22538,7 @@ + /* Add the name for the main input file now. We delayed this from + dwarf2out_init to avoid complications with PCH. */ + add_name_attribute (comp_unit_die (), remap_debug_filename (filename)); +- if (!IS_ABSOLUTE_PATH (filename)) ++ if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir) + add_comp_dir_attribute (comp_unit_die ()); + else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL) + { --- a/src/gcc/flag-types.h +++ b/src/gcc/flag-types.h @@ -106,6 +106,14 @@ @@ -57421,6 +58013,354 @@ /* The algorithm used for the integrated register allocator (IRA). */ enum ira_algorithm { +--- a/src/gcc/fortran/ChangeLog ++++ b/src/gcc/fortran/ChangeLog +@@ -1,3 +1,39 @@ ++2013-05-07 Tobias Burnus <burnus@net-b.de> ++ ++ Backport from mainline ++ 2013-05-02 Tobias Burnus <burnus@net-b.de> ++ ++ PR fortran/57142 ++ * simplify.c (gfc_simplify_size): Renamed from ++ simplify_size; fix kind=8 handling. ++ (gfc_simplify_size): New function. ++ (gfc_simplify_shape): Add range check. ++ * resolve.c (resolve_function): Fix handling ++ for ISYM_SIZE. ++ ++2013-04-26 Janus Weil <janus@gcc.gnu.org> ++ ++ Backports from trunk: ++ ++ PR fortran/56968 ++ * expr.c (gfc_check_pointer_assign): Handle generic functions returning ++ procedure pointers. ++ ++ PR fortran/53685 ++ PR fortran/57022 ++ * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE ++ expressions. ++ * target-memory.h (gfc_element_size): New prototype. ++ * target-memory.c (size_array): Remove. ++ (gfc_element_size): New function. ++ (gfc_target_expr_size): Modified to always return the full size of the ++ expression. ++ ++2013-04-18 Tobias Burnus <burnus@net-b.de> ++ ++ PR fortran/56994 ++ * invoke.texi (NEAREST): S argument is not optional. ++ + 2013-04-11 Release Manager + + * GCC 4.7.3 released. +--- a/src/gcc/fortran/check.c ++++ b/src/gcc/fortran/check.c +@@ -3988,8 +3988,6 @@ + size_t *result_length_p) + { + size_t result_elt_size; +- mpz_t tmp; +- gfc_expr *mold_element; + + if (source->expr_type == EXPR_FUNCTION) + return FAILURE; +@@ -3998,20 +3996,12 @@ + return FAILURE; + + /* Calculate the size of the source. */ +- if (source->expr_type == EXPR_ARRAY +- && gfc_array_size (source, &tmp) == FAILURE) +- return FAILURE; +- + *source_size = gfc_target_expr_size (source); + if (*source_size == 0) + return FAILURE; + +- mold_element = mold->expr_type == EXPR_ARRAY +- ? gfc_constructor_first (mold->value.constructor)->expr +- : mold; +- + /* Determine the size of the element. */ +- result_elt_size = gfc_target_expr_size (mold_element); ++ result_elt_size = gfc_element_size (mold); + if (result_elt_size == 0) + return FAILURE; + +--- a/src/gcc/fortran/expr.c ++++ b/src/gcc/fortran/expr.c +@@ -3493,8 +3493,12 @@ + } + else if (rvalue->expr_type == EXPR_FUNCTION) + { +- s2 = rvalue->symtree->n.sym->result; +- name = rvalue->symtree->n.sym->result->name; ++ if (rvalue->value.function.esym) ++ s2 = rvalue->value.function.esym->result; ++ else ++ s2 = rvalue->symtree->n.sym->result; ++ ++ name = s2->name; + } + else + { +--- a/src/gcc/fortran/intrinsic.texi ++++ b/src/gcc/fortran/intrinsic.texi +@@ -9209,7 +9209,7 @@ + @item @emph{Arguments}: + @multitable @columnfractions .15 .70 + @item @var{X} @tab Shall be of type @code{REAL}. +-@item @var{S} @tab (Optional) shall be of type @code{REAL} and ++@item @var{S} @tab Shall be of type @code{REAL} and + not equal to zero. + @end multitable + +--- a/src/gcc/fortran/resolve.c ++++ b/src/gcc/fortran/resolve.c +@@ -3155,6 +3155,7 @@ + for (arg = expr->value.function.actual; arg; arg = arg->next) + { + if ((GENERIC_ID == GFC_ISYM_UBOUND || GENERIC_ID == GFC_ISYM_SIZE) ++ && arg == expr->value.function.actual + && arg->next != NULL && arg->next->expr) + { + if (arg->next->expr->expr_type != EXPR_CONSTANT) +--- a/src/gcc/fortran/simplify.c ++++ b/src/gcc/fortran/simplify.c +@@ -32,6 +32,8 @@ + + gfc_expr gfc_bad_expr; + ++static gfc_expr *simplify_size (gfc_expr *, gfc_expr *, int); ++ + + /* Note that 'simplification' is not just transforming expressions. + For functions that are not simplified at compile time, range +@@ -3240,7 +3242,7 @@ + gfc_expr* dim = result; + mpz_set_si (dim->value.integer, d); + +- result = gfc_simplify_size (array, dim, kind); ++ result = simplify_size (array, dim, k); + gfc_free_expr (dim); + if (!result) + goto returnNull; +@@ -5493,15 +5495,12 @@ + e = gfc_get_constant_expr (BT_INTEGER, k, &source->where); + + if (t == SUCCESS) +- { +- mpz_set (e->value.integer, shape[n]); +- mpz_clear (shape[n]); +- } ++ mpz_set (e->value.integer, shape[n]); + else + { + mpz_set_ui (e->value.integer, n + 1); + +- f = gfc_simplify_size (source, e, NULL); ++ f = simplify_size (source, e, k); + gfc_free_expr (e); + if (f == NULL) + { +@@ -5512,23 +5511,30 @@ + e = f; + } + ++ if (e == &gfc_bad_expr || range_check (e, "SHAPE") == &gfc_bad_expr) ++ { ++ gfc_free_expr (result); ++ if (t) ++ gfc_clear_shape (shape, source->rank); ++ return &gfc_bad_expr; ++ } ++ + gfc_constructor_append_expr (&result->value.constructor, e, NULL); + } + ++ if (t) ++ gfc_clear_shape (shape, source->rank); ++ + return result; + } + + +-gfc_expr * +-gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind) ++static gfc_expr * ++simplify_size (gfc_expr *array, gfc_expr *dim, int k) + { + mpz_t size; + gfc_expr *return_value; + int d; +- int k = get_kind (BT_INTEGER, kind, "SIZE", gfc_default_integer_kind); +- +- if (k == -1) +- return &gfc_bad_expr; + + /* For unary operations, the size of the result is given by the size + of the operand. For binary ones, it's the size of the first operand +@@ -5558,7 +5564,7 @@ + replacement = array->value.op.op1; + else + { +- simplified = gfc_simplify_size (array->value.op.op1, dim, kind); ++ simplified = simplify_size (array->value.op.op1, dim, k); + if (simplified) + return simplified; + +@@ -5568,18 +5574,20 @@ + } + + /* Try to reduce it directly if possible. */ +- simplified = gfc_simplify_size (replacement, dim, kind); ++ simplified = simplify_size (replacement, dim, k); + + /* Otherwise, we build a new SIZE call. This is hopefully at least + simpler than the original one. */ + if (!simplified) +- simplified = gfc_build_intrinsic_call (gfc_current_ns, +- GFC_ISYM_SIZE, "size", +- array->where, 3, +- gfc_copy_expr (replacement), +- gfc_copy_expr (dim), +- gfc_copy_expr (kind)); +- ++ { ++ gfc_expr *kind = gfc_get_int_expr (gfc_default_integer_kind, NULL, k); ++ simplified = gfc_build_intrinsic_call (gfc_current_ns, ++ GFC_ISYM_SIZE, "size", ++ array->where, 3, ++ gfc_copy_expr (replacement), ++ gfc_copy_expr (dim), ++ kind); ++ } + return simplified; + } + +@@ -5598,12 +5606,31 @@ + return NULL; + } + +- return_value = gfc_get_int_expr (k, &array->where, mpz_get_si (size)); ++ return_value = gfc_get_constant_expr (BT_INTEGER, k, &array->where); ++ mpz_set (return_value->value.integer, size); + mpz_clear (size); ++ + return return_value; + } + + ++gfc_expr * ++gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind) ++{ ++ gfc_expr *result; ++ int k = get_kind (BT_INTEGER, kind, "SIZE", gfc_default_integer_kind); ++ ++ if (k == -1) ++ return &gfc_bad_expr; ++ ++ result = simplify_size (array, dim, k); ++ if (result == NULL || result == &gfc_bad_expr) ++ return result; ++ ++ return range_check (result, "SIZE"); ++} ++ ++ + gfc_expr * + gfc_simplify_sign (gfc_expr *x, gfc_expr *y) + { +--- a/src/gcc/fortran/target-memory.c ++++ b/src/gcc/fortran/target-memory.c +@@ -35,16 +35,6 @@ + /* --------------------------------------------------------------- */ + /* Calculate the size of an expression. */ + +-static size_t +-size_array (gfc_expr *e) +-{ +- mpz_t array_size; +- gfc_constructor *c = gfc_constructor_first (e->value.constructor); +- size_t elt_size = gfc_target_expr_size (c->expr); +- +- gfc_array_size (e, &array_size); +- return (size_t)mpz_get_ui (array_size) * elt_size; +-} + + static size_t + size_integer (int kind) +@@ -82,16 +72,14 @@ + } + + ++/* Return the size of a single element of the given expression. ++ Identical to gfc_target_expr_size for scalars. */ ++ + size_t +-gfc_target_expr_size (gfc_expr *e) ++gfc_element_size (gfc_expr *e) + { + tree type; + +- gcc_assert (e != NULL); +- +- if (e->expr_type == EXPR_ARRAY) +- return size_array (e); +- + switch (e->ts.type) + { + case BT_INTEGER: +@@ -130,12 +118,36 @@ + return int_size_in_bytes (type); + } + default: +- gfc_internal_error ("Invalid expression in gfc_target_expr_size."); ++ gfc_internal_error ("Invalid expression in gfc_element_size."); + return 0; + } + } + + ++/* Return the size of an expression in its target representation. */ ++ ++size_t ++gfc_target_expr_size (gfc_expr *e) ++{ ++ mpz_t tmp; ++ size_t asz; ++ ++ gcc_assert (e != NULL); ++ ++ if (e->rank) ++ { ++ if (gfc_array_size (e, &tmp)) ++ asz = mpz_get_ui (tmp); ++ else ++ asz = 0; ++ } ++ else ++ asz = 1; ++ ++ return asz * gfc_element_size (e); ++} ++ ++ + /* The encode_* functions export a value into a buffer, and + return the number of bytes of the buffer that have been + used. */ +--- a/src/gcc/fortran/target-memory.h ++++ b/src/gcc/fortran/target-memory.h +@@ -25,7 +25,7 @@ + /* Convert a BOZ to REAL or COMPLEX. */ + bool gfc_convert_boz (gfc_expr *, gfc_typespec *); + +-/* Return the size of an expression in its target representation. */ ++size_t gfc_element_size (gfc_expr *); + size_t gfc_target_expr_size (gfc_expr *); + + /* Write a constant expression in binary form to a target buffer. */ --- a/src/gcc/fwprop.c +++ b/src/gcc/fwprop.c @@ -664,7 +664,12 @@ @@ -57477,7 +58417,7 @@ #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 1 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 1 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" /* -*- indented-text -*- */ /* Process source files and output type information. Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 @@ -57486,7 +58426,7 @@ <http://www.gnu.org/licenses/>. */ #define YY_NO_INPUT 1 -#line 25 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 25 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 25 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" #ifdef GENERATOR_FILE #include "bconfig.h" #else @@ -57535,7 +58475,7 @@ register int yy_act; -#line 63 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 63 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 63 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" /* Do this on entry to yylex(): */ *yylval = 0; @@ -57553,7 +58493,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 74 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 74 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 74 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { BEGIN(in_struct); return TYPEDEF; @@ -57562,7 +58502,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 78 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 78 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 78 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { BEGIN(in_struct); return STRUCT; @@ -57571,7 +58511,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 82 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 82 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 82 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { BEGIN(in_struct); return UNION; @@ -57580,7 +58520,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 86 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 86 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 86 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { BEGIN(in_struct); return EXTERN; @@ -57589,7 +58529,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 90 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 90 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 90 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { BEGIN(in_struct); return STATIC; @@ -57598,7 +58538,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 95 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 95 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 95 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { BEGIN(in_struct); return DEFVEC_OP; @@ -57607,7 +58547,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 99 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 99 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 99 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { BEGIN(in_struct); return DEFVEC_I; @@ -57616,7 +58556,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 103 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 103 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 103 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { BEGIN(in_struct); return DEFVEC_ALLOC; @@ -57625,21 +58565,21 @@ case 9: YY_RULE_SETUP -#line 111 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 111 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 111 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { BEGIN(in_struct_comment); } YY_BREAK case 10: /* rule 10 can match eol */ YY_RULE_SETUP -#line 113 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 113 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 113 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { update_lineno (yytext, yyleng); } YY_BREAK case 11: /* rule 11 can match eol */ YY_RULE_SETUP -#line 114 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 114 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 114 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 12: @@ -57648,7 +58588,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 116 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 116 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 116 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" /* don't care */ YY_BREAK case 13: @@ -57657,7 +58597,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 117 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 117 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 117 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { return GTY_TOKEN; } YY_BREAK case 14: @@ -57666,7 +58606,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 118 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 118 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 118 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { return VEC_TOKEN; } YY_BREAK case 15: @@ -57675,7 +58615,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 119 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 119 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 119 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { return UNION; } YY_BREAK case 16: @@ -57684,7 +58624,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 120 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 120 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 120 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { return STRUCT; } YY_BREAK case 17: @@ -57693,7 +58633,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 121 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 121 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 121 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { return ENUM; } YY_BREAK case 18: @@ -57702,7 +58642,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 122 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 122 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 122 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { return PTR_ALIAS; } YY_BREAK case 19: @@ -57711,13 +58651,13 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 123 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 123 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 123 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { return NESTED_PTR; } YY_BREAK case 20: YY_RULE_SETUP -#line 124 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 124 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 124 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { return NUM; } YY_BREAK case 21: @@ -57726,7 +58666,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 125 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 125 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 125 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext, yyleng, yyleng+1); return PARAM_IS; @@ -57735,12 +58675,12 @@ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ -#line 131 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 131 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 131 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" case 23: /* rule 23 can match eol */ YY_RULE_SETUP -#line 131 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 131 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 131 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { size_t len; @@ -57749,7 +58689,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 143 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 143 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 143 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext, yyleng, yyleng+1); return ID; @@ -57758,7 +58698,7 @@ /* rule 25 can match eol */ YY_RULE_SETUP -#line 148 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 148 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 148 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng-1); return STRING; @@ -57767,7 +58707,7 @@ /* rule 26 can match eol */ YY_RULE_SETUP -#line 153 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 153 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 153 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng-1); return ARRAY; @@ -57776,7 +58716,7 @@ /* rule 27 can match eol */ YY_RULE_SETUP -#line 157 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 157 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 157 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng); return CHAR; @@ -57785,13 +58725,13 @@ case 28: YY_RULE_SETUP -#line 162 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 162 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 162 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { return ELLIPSIS; } YY_BREAK case 29: YY_RULE_SETUP -#line 163 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 163 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 163 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { return yytext[0]; } YY_BREAK /* ignore pp-directives */ @@ -57799,13 +58739,13 @@ /* rule 30 can match eol */ YY_RULE_SETUP -#line 166 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 166 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 166 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" {lexer_line.line++;} YY_BREAK case 31: YY_RULE_SETUP -#line 168 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 168 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 168 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { error_at_line (&lexer_line, "unexpected character `%s'", yytext); } @@ -57814,35 +58754,35 @@ case 32: YY_RULE_SETUP -#line 173 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 173 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 173 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { BEGIN(in_comment); } YY_BREAK case 33: /* rule 33 can match eol */ YY_RULE_SETUP -#line 174 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 174 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 174 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 34: -#line 176 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 176 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 176 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" case 35: /* rule 35 can match eol */ -#line 177 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 177 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 177 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" case 36: /* rule 36 can match eol */ YY_RULE_SETUP -#line 177 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 177 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 177 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 37: /* rule 37 can match eol */ YY_RULE_SETUP -#line 178 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 178 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 178 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { update_lineno (yytext, yyleng); } YY_BREAK case 38: @@ -57851,7 +58791,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 179 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 179 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 179 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK @@ -57859,16 +58799,16 @@ /* rule 39 can match eol */ YY_RULE_SETUP -#line 182 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 182 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 182 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 40: -#line 184 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 184 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 184 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" case 41: YY_RULE_SETUP -#line 184 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 184 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 184 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 42: @@ -57877,29 +58817,29 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 185 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 185 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 185 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 43: YY_RULE_SETUP -#line 187 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 187 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 187 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { BEGIN(INITIAL); } YY_BREAK case 44: YY_RULE_SETUP -#line 188 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 188 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 188 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { BEGIN(in_struct); } YY_BREAK case 45: -#line 191 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 191 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 191 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" case 46: YY_RULE_SETUP -#line 191 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 191 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 191 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" { error_at_line (&lexer_line, "unterminated comment or string; unexpected EOF"); @@ -57908,13 +58848,13 @@ /* rule 47 can match eol */ YY_RULE_SETUP -#line 196 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 196 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 196 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 48: YY_RULE_SETUP -#line 198 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 198 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 198 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1654 "gengtype-lex.c" @@ -57938,7 +58878,7 @@ #define YYTABLES_NAME "yytables" -#line 198 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 198 "/home/doko/gcc-4.7.3-RC-20130411/gcc-4.7.3-RC-20130411/gcc/gengtype-lex.l" ++#line 198 "/work1/rouxy/work/sources/gcc-linaro/release/4.7-2013.05/gcc-linaro-4.7-2013.05/gcc/gengtype-lex.l" @@ -59955,7 +60895,7 @@ --- a/src/gcc/LINARO-VERSION +++ b/src/gcc/LINARO-VERSION @@ -0,0 +1 @@ -+4.7-2013.04-1~dev ++4.7-2013.05 --- a/src/gcc/lower-subreg.c +++ b/src/gcc/lower-subreg.c @@ -233,9 +233,9 @@ @@ -60167,6 +61107,30 @@ /* -Ofast adds optimizations to -O3. */ { OPT_LEVELS_FAST, OPT_ffast_math, NULL, 1 }, +--- a/src/gcc/predict.c ++++ b/src/gcc/predict.c +@@ -983,7 +983,8 @@ + if (TREE_CODE (niter) == INTEGER_CST) + { + if (host_integerp (niter, 1) +- && compare_tree_int (niter, max-1) == -1) ++ && max ++ && compare_tree_int (niter, max - 1) == -1) + nitercst = tree_low_cst (niter, 1) + 1; + else + nitercst = max; +@@ -1005,6 +1006,11 @@ + else + continue; + ++ /* If the prediction for number of iterations is zero, do not ++ predict the exit edges. */ ++ if (nitercst == 0) ++ continue; ++ + probability = ((REG_BR_PROB_BASE + nitercst / 2) / nitercst); + predict_edge (ex, predictor, probability); + } --- a/src/gcc/read-rtl.c +++ b/src/gcc/read-rtl.c @@ -94,6 +94,26 @@ @@ -60828,7 +61792,35 @@ static void flush_pending_lists (struct deps_desc *, rtx, int, int); static void sched_analyze_1 (struct deps_desc *, rtx, rtx); -@@ -1652,7 +1652,7 @@ +@@ -1563,24 +1563,15 @@ + add_dependence_list_and_free (struct deps_desc *deps, rtx insn, rtx *listp, + int uncond, enum reg_note dep_type) + { +- rtx list, next; ++ add_dependence_list (insn, *listp, uncond, dep_type); + + /* We don't want to short-circuit dependencies involving debug + insns, because they may cause actual dependencies to be + disregarded. */ + if (deps->readonly || DEBUG_INSN_P (insn)) +- { +- add_dependence_list (insn, *listp, uncond, dep_type); +- return; +- } ++ return; + +- for (list = *listp, *listp = NULL; list ; list = next) +- { +- next = XEXP (list, 1); +- if (uncond || ! sched_insns_conditions_mutex_p (insn, XEXP (list, 0))) +- add_dependence (insn, XEXP (list, 0), dep_type); +- free_INSN_LIST_node (list); +- } ++ free_INSN_LIST_list (listp); + } + + /* Remove all occurences of INSN from LIST. Return the number of +@@ -1652,7 +1643,7 @@ the previous nonnote insn. */ static void @@ -60837,6 +61829,22 @@ { sd_iterator_def sd_it; dep_t dep; +@@ -1764,6 +1755,15 @@ + add_dependence_list_and_free (deps, insn, &deps->pending_jump_insns, 1, + REG_DEP_ANTI); + ++ if (DEBUG_INSN_P (insn)) ++ { ++ if (for_write) ++ free_INSN_LIST_list (&deps->pending_read_insns); ++ free_INSN_LIST_list (&deps->pending_write_insns); ++ free_INSN_LIST_list (&deps->last_pending_memory_flush); ++ free_INSN_LIST_list (&deps->pending_jump_insns); ++ } ++ + if (!deps->readonly) + { + free_EXPR_LIST_list (&deps->pending_write_mems); @@ -2168,7 +2168,7 @@ static struct reg_pressure_data *pressure_info; rtx link; @@ -60867,6 +61875,19 @@ { setup_insn_reg_uses (deps, insn); init_insn_reg_pressure_info (insn); +@@ -3262,9 +3263,9 @@ + SET_REGNO_REG_SET (&deps->reg_last_in_use, i); + } + +- /* Flush pending lists on jumps, but not on speculative checks. */ +- if (JUMP_P (insn) && !(sel_sched_p () +- && sel_insn_is_speculation_check (insn))) ++ /* Don't flush pending lists on speculative checks for ++ selective scheduling. */ ++ if (!sel_sched_p () || !sel_insn_is_speculation_check (insn)) + flush_pending_lists (deps, insn, true, true); + + reg_pending_barrier = NOT_A_BARRIER; @@ -3294,7 +3295,7 @@ instructions that follow seem like they should be part of the call group. @@ -60988,9 +62009,179 @@ { sched_init_region_reg_pressure_info (); for (bb = 0; bb < current_nr_blocks; bb++) +--- a/src/gcc/target.def ++++ b/src/gcc/target.def +@@ -2758,6 +2758,13 @@ + bool, false) + + DEFHOOKPOD ++(force_at_comp_dir, ++ "True if the @code{DW_AT_comp_dir} attribute should be emitted for each \ ++ compilation unit. This attribute is required for the darwin linker \ ++ to emit debug information.", ++ bool, false) ++ ++DEFHOOKPOD + (delay_sched2, "True if sched2 is not to be run at its normal place. \ + This usually means it will be run as part of machine-specific reorg.", + bool, false) +--- a/src/gcc/testsuite/ChangeLog ++++ b/src/gcc/testsuite/ChangeLog +@@ -1,3 +1,105 @@ ++2013-05-07 Michael Meissner <meissner@linux.vnet.ibm.com> ++ ++ Backport from trunk ++ 2013-05-03 Michael Meissner <meissner@linux.vnet.ibm.com> ++ ++ PR target/57150 ++ * gcc.target/powerpc/pr57150.c: New file. ++ ++2013-05-07 Tobias Burnus <burnus@net-b.de> ++ ++ Backport from mainline ++ 2013-05-02 Tobias Burnus <burnus@net-b.de> ++ ++ PR fortran/57142 ++ * gfortran.dg/size_kind_2.f90: New. ++ * gfortran.dg/size_kind_3.f90: New. ++ ++2013-05-03 Marek Polacek <polacek@redhat.com> ++ ++ Backport from mainline ++ 2013-04-25 Marek Polacek <polacek@redhat.com> ++ ++ PR tree-optimization/57066 ++ * gcc.dg/torture/builtin-logb-1.c: Adjust testcase. ++ ++2013-04-30 Uros Bizjak <ubizjak@gmail.com> ++ ++ Backport from mainline ++ 2013-04-29 Uros Bizjak <ubizjak@gmail.com> ++ ++ PR target/44578 ++ * gcc.target/i386/pr44578.c: New test. ++ ++ Backport from mainline ++ 2013-04-29 Uros Bizjak <ubizjak@gmail.com> ++ ++ PR target/57098 ++ * gcc.target/i386/pr57098.c: New test. ++ ++2013-04-29 Christian Bruel <christian.bruel@st.com> ++ ++ PR target/57108 ++ * gcc.target/sh/pr57108.c: New test. ++ ++2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> ++ ++ Backport from trunk: ++ ++ PR fortran/51825 ++ * gfortran.dg/namelist_77.f90: New test. ++ * gfortran.dg/namelist_78.f90: New test. ++ ++2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> ++ ++ Backport from trunk: ++ ++ PR fortran/56786 ++ * gfortran.dg/namelist_81.f90: New test. ++ ++2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> ++ ++ Backport from trunk: ++ ++ PR fortran/52512 ++ * gfortran.dg/namelist_79.f90: New test. ++ ++2013-04-27 Jakub Jelinek <jakub@redhat.com> ++ ++ PR target/56866 ++ * gcc.c-torture/execute/pr56866.c: New test. ++ * gcc.target/i386/pr56866.c: New test. ++ ++2013-04-26 Janus Weil <janus@gcc.gnu.org> ++ ++ Backports from trunk: ++ ++ PR fortran/56968 ++ * gfortran.dg/proc_ptr_41.f90: New. ++ ++ PR fortran/53685 ++ PR fortran/57022 ++ * gfortran.dg/transfer_check_4.f90: New. ++ ++2013-04-19 Marek Polacek <polacek@redhat.com> ++ ++ Backport from mainline ++ 2013-01-08 Steven Bosscher <steven@gcc.gnu.org> ++ Jakub Jelinek <jakub@redhat.com> ++ ++ PR tree-optimization/48189 ++ * gcc.dg/pr48189.c: New test. ++ ++2013-04-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> ++ ++ * gcc.dg/torture/pr53922.c: Skip on alpha*-*-osf*. ++ Remove dg-skip-if default args. ++ ++2013-04-15 Eric Botcazou <ebotcazou@adacore.com> ++ ++ * gcc.dg/pr56890-1.c: New test. ++ * gcc.dg/pr56890-2.c: Likewise. ++ + 2013-04-11 Release Manager + + * GCC 4.7.3 released. --- a/src/gcc/testsuite/ChangeLog.aarch64 +++ b/src/gcc/testsuite/ChangeLog.aarch64 -@@ -0,0 +1,400 @@ +@@ -0,0 +1,446 @@ ++2013-05-07 Ian Bolton <ian.bolton@arm.com> ++ ++ Backport from mainline (fix to botched commit) ++ 2013-04-04 Tejas Belagod <tejas.belagod@arm.com> ++ ++ * gcc.target/aarch64/inc/asm-adder-clobber-lr.c: Remove duplication. ++ * gcc.target/aarch64/inc/asm-adder-no-clobber-lr.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-1.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-2.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-3.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-4.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-5.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-6.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-7.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-8.c: Likewise. ++ ++ Backport from mainline ++ 2013-03-28 Ian Bolton <ian.bolton@arm.com> ++ ++ * gcc.target/aarch64/inc/asm-adder-clobber-lr.c: New test. ++ * gcc.target/aarch64/inc/asm-adder-no-clobber-lr.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-1.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-2.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-3.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-4.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-5.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-6.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-7.c: Likewise. ++ * gcc.target/aarch64/test-framepointer-8.c: Likewise. ++ ++2013-04-30 James Greenhalgh <james.greenhalgh@arm.com> ++ ++ Backported from mainline. ++ 2013-04-11 James Greenhalgh <james.greenhalgh@arm.com> ++ ++ * gcc.target/aarch64/vect-fcm.x: Add check for zero forms of ++ inverse operands. ++ * gcc.target/aarch64/vect-fcm-eq-d.c: Check that new zero form ++ loop is vectorized. ++ * gcc.target/aarch64/vect-fcm-eq-f.c: Likewise. ++ * gcc.target/aarch64/vect-fcm-ge-d.c: Check that new zero form ++ loop is vectorized and that the correct instruction is generated. ++ * gcc.target/aarch64/vect-fcm-ge-f.c: Likewise. ++ * gcc.target/aarch64/vect-fcm-gt-d.c: Likewise. ++ * gcc.target/aarch64/vect-fcm-gt-f.c: Likewise. ++ +2013-02-13 James Greenhalgh <james.greenhalgh@arm.com> + + Backport from mainline. @@ -61424,6 +62615,54 @@ #elif defined (__TMS320C6X__) /* On TI C6X division by zero does not trap. */ # define DO_TEST 0 +--- a/src/gcc/testsuite/gcc.c-torture/execute/pr56866.c ++++ b/src/gcc/testsuite/gcc.c-torture/execute/pr56866.c +@@ -0,0 +1,45 @@ ++/* PR target/56866 */ ++ ++int ++main () ++{ ++#if __CHAR_BIT__ == 8 && __SIZEOF_LONG_LONG__ == 8 && __SIZEOF_INT__ == 4 && __SIZEOF_SHORT__ == 2 ++ unsigned long long wq[256], rq[256]; ++ unsigned int wi[256], ri[256]; ++ unsigned short ws[256], rs[256]; ++ unsigned char wc[256], rc[256]; ++ int t; ++ ++ __builtin_memset (wq, 0, sizeof wq); ++ __builtin_memset (wi, 0, sizeof wi); ++ __builtin_memset (ws, 0, sizeof ws); ++ __builtin_memset (wc, 0, sizeof wc); ++ wq[0] = 0x0123456789abcdefULL; ++ wi[0] = 0x01234567; ++ ws[0] = 0x4567; ++ wc[0] = 0x73; ++ ++ asm volatile ("" : : "g" (wq), "g" (wi), "g" (ws), "g" (wc) : "memory"); ++ ++ for (t = 0; t < 256; ++t) ++ rq[t] = (wq[t] >> 8) | (wq[t] << (sizeof (wq[0]) * __CHAR_BIT__ - 8)); ++ for (t = 0; t < 256; ++t) ++ ri[t] = (wi[t] >> 8) | (wi[t] << (sizeof (wi[0]) * __CHAR_BIT__ - 8)); ++ for (t = 0; t < 256; ++t) ++ rs[t] = (ws[t] >> 9) | (ws[t] << (sizeof (ws[0]) * __CHAR_BIT__ - 9)); ++ for (t = 0; t < 256; ++t) ++ rc[t] = (wc[t] >> 5) | (wc[t] << (sizeof (wc[0]) * __CHAR_BIT__ - 5)); ++ ++ asm volatile ("" : : "g" (rq), "g" (ri), "g" (rs), "g" (rc) : "memory"); ++ ++ if (rq[0] != 0xef0123456789abcdULL || rq[1]) ++ __builtin_abort (); ++ if (ri[0] != 0x67012345 || ri[1]) ++ __builtin_abort (); ++ if (rs[0] != 0xb3a2 || rs[1]) ++ __builtin_abort (); ++ if (rc[0] != 0x9b || rc[1]) ++ __builtin_abort (); ++#endif ++ return 0; ++} --- a/src/gcc/testsuite/gcc.dg/20020312-2.c +++ b/src/gcc/testsuite/gcc.dg/20020312-2.c @@ -92,6 +92,8 @@ @@ -61602,6 +62841,62 @@ /* { dg-options "-O -fdump-rtl-subreg1" } */ /* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && x32 } { "*" } { "" } } */ /* { dg-require-effective-target ilp32 } */ +--- a/src/gcc/testsuite/gcc.dg/pr48189.c ++++ b/src/gcc/testsuite/gcc.dg/pr48189.c +@@ -0,0 +1,13 @@ ++/* PR tree-optimization/48189 */ ++/* { dg-do compile } */ ++/* { dg-options "-O --param max-predicted-iterations=0" } */ ++ ++struct S { int s[8]; }; ++ ++void ++foo (int *x, struct S *y) ++{ ++ int i; ++ for (i = 0; y[i].s[i]; i++) ++ *x++ = y[i].s[i]; ++} +--- a/src/gcc/testsuite/gcc.dg/pr56890-1.c ++++ b/src/gcc/testsuite/gcc.dg/pr56890-1.c +@@ -0,0 +1,15 @@ ++/* PR target/56890 */ ++/* Reported by Rainer Jung <rainer.jung@kippdata.de> */ ++ ++/* { dg-do assemble } */ ++/* { dg-options "-O2" } */ ++ ++unsigned int buggy(unsigned int min, unsigned int max) ++{ ++ if (max < 16384) { ++ unsigned short num16 = 0; ++ num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0))); ++ return num16; ++ } ++ return 0; ++} +--- a/src/gcc/testsuite/gcc.dg/pr56890-2.c ++++ b/src/gcc/testsuite/gcc.dg/pr56890-2.c +@@ -0,0 +1,19 @@ ++/* PR target/56890 */ ++/* Reported by Rainer Jung <rainer.jung@kippdata.de> */ ++ ++/* { dg-do assemble } */ ++/* { dg-options "-O" } */ ++ ++unsigned int buggy(unsigned int min, unsigned int max) ++{ ++ unsigned int number; ++ if (max < 16384) { ++ unsigned short num16; ++ num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0))); ++ return num16; ++ } ++ else { ++ (number) = min + (long) ((double) (max - min + 1.0) * (number / (4294967295U + 1.0))); ++ } ++ return number; ++} --- a/src/gcc/testsuite/gcc.dg/stack-usage-1.c +++ b/src/gcc/testsuite/gcc.dg/stack-usage-1.c @@ -7,7 +7,9 @@ @@ -61615,11 +62910,82 @@ # define SIZE 248 #elif defined(__x86_64__) # ifndef _WIN64 +--- a/src/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c ++++ b/src/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c +@@ -48,25 +48,25 @@ + /* Test if FUNCRES(FUNC(NEG FUNCARG(ARGARG))) is false. Check the + sign as well. */ + #ifndef __SPU__ +-#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \ ++#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES,NEG2) do { \ + if (!__builtin_##FUNCRES##f(__builtin_##FUNC(NEG __builtin_##FUNCARG##f(ARGARG))) \ +- || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG __builtin_##FUNCARG##f(ARGARG))) \ ++ || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG2 __builtin_##FUNCARG##f(ARGARG))) \ + link_error(__LINE__); \ + if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \ +- || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \ ++ || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG2 __builtin_##FUNCARG(ARGARG))) \ + link_error(__LINE__); \ + if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \ +- || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \ ++ || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG2 __builtin_##FUNCARG##l(ARGARG))) \ + link_error(__LINE__); \ + } while (0) + #else +-#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \ ++#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES,NEG2) do { \ + /* SPU single-precision floating point format does not support Inf or Nan. */ \ + if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \ +- || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \ ++ || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG2 __builtin_##FUNCARG(ARGARG))) \ + link_error(__LINE__); \ + if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \ +- || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \ ++ || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG2 __builtin_##FUNCARG##l(ARGARG))) \ + link_error(__LINE__); \ + } while (0) + #endif +@@ -173,15 +173,15 @@ + + /* Test for f(+-Inf) -> +-Inf and f(+-NaN) -> +-NaN, regardless of + the radix. */ +- TESTIT3 (logb, ,inf, , isinf); +- TESTIT3 (logb, - ,inf, , isinf); +- TESTIT3 (logb, ,nan, "", isnan); +- TESTIT3 (logb, - ,nan, "", isnan); +- +- TESTIT3 (significand, ,inf, , isinf); +- TESTIT3 (significand, - ,inf, , isinf); +- TESTIT3 (significand, ,nan, "", isnan); +- TESTIT3 (significand, - ,nan, "", isnan); ++ TESTIT3 (logb, ,inf, , isinf, ); ++ TESTIT3 (logb, - ,inf, , isinf, ); ++ TESTIT3 (logb, ,nan, "", isnan, ); ++ TESTIT3 (logb, - ,nan, "", isnan, -); ++ ++ TESTIT3 (significand, ,inf, , isinf, ); ++ TESTIT3 (significand, - ,inf, , isinf, -); ++ TESTIT3 (significand, ,nan, "", isnan, ); ++ TESTIT3 (significand, - ,nan, "", isnan, -); + } + + int main() --- a/src/gcc/testsuite/gcc.dg/torture/pr51106-2.s +++ b/src/gcc/testsuite/gcc.dg/torture/pr51106-2.s @@ -0,0 +1,2 @@ + .cpu generic + .file "pr51106-2.c" +--- a/src/gcc/testsuite/gcc.dg/torture/pr53922.c ++++ b/src/gcc/testsuite/gcc.dg/torture/pr53922.c +@@ -1,6 +1,7 @@ + /* { dg-do run } */ + /* { dg-require-weak "" } */ +-/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } { "*" } { "" } } */ ++/* { dg-skip-if "No undefined weak" { alpha*-*-osf* } } */ ++/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } } */ + + int x(int a) + { --- a/src/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c +++ b/src/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c @@ -16,5 +16,5 @@ @@ -65876,6 +67242,58 @@ + struct64_t tmp; + asm volatile ("ldr q0, %[value]" : : [value]"m"(tmp)); +} +--- a/src/gcc/testsuite/gcc.target/aarch64/asm-adder-clobber-lr.c ++++ b/src/gcc/testsuite/gcc.target/aarch64/asm-adder-clobber-lr.c +@@ -0,0 +1,23 @@ ++extern void abort (void); ++ ++int ++adder (int a, int b) ++{ ++ int result; ++ __asm__ ("add %w0,%w1,%w2" : "=r"(result) : "r"(a), "r"(b) : "x30"); ++ return result; ++} ++ ++int ++main (int argc, char** argv) ++{ ++ int i; ++ int total = argc; ++ for (i = 0; i < 20; i++) ++ total = adder (total, i); ++ ++ if (total != (190 + argc)) ++ abort (); ++ ++ return 0; ++} +--- a/src/gcc/testsuite/gcc.target/aarch64/asm-adder-no-clobber-lr.c ++++ b/src/gcc/testsuite/gcc.target/aarch64/asm-adder-no-clobber-lr.c +@@ -0,0 +1,23 @@ ++extern void abort (void); ++ ++int ++adder (int a, int b) ++{ ++ int result; ++ __asm__ ("add %w0,%w1,%w2" : "=r"(result) : "r"(a), "r"(b) : ); ++ return result; ++} ++ ++int ++main (int argc, char** argv) ++{ ++ int i; ++ int total = argc; ++ for (i = 0; i < 20; i++) ++ total = adder (total, i); ++ ++ if (total != (190 + argc)) ++ abort (); ++ ++ return 0; ++} --- a/src/gcc/testsuite/gcc.target/aarch64/atomic-comp-swap-release-acquire.c +++ b/src/gcc/testsuite/gcc.target/aarch64/atomic-comp-swap-release-acquire.c @@ -0,0 +1,41 @@ @@ -69677,6 +71095,152 @@ + +/* { dg-final { scan-assembler-times "tbl v" 42} } */ +/* { dg-final { scan-assembler-times "tbx v" 30} } */ +--- a/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-1.c ++++ b/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-1.c +@@ -0,0 +1,15 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-inline --save-temps" } */ ++ ++#include "asm-adder-no-clobber-lr.c" ++ ++/* omit-frame-pointer is FALSE. ++ omit-leaf-frame-pointer is FALSE. ++ LR is not being clobbered in the leaf. ++ ++ With no frame pointer omissions, we expect a frame record ++ for main and the leaf. */ ++ ++/* { dg-final { scan-assembler-times "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" 2 } } */ ++ ++/* { dg-final { cleanup-saved-temps } } */ +--- a/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-2.c ++++ b/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-2.c +@@ -0,0 +1,15 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2 -fomit-frame-pointer -mno-omit-leaf-frame-pointer -fno-inline --save-temps" } */ ++ ++#include "asm-adder-no-clobber-lr.c" ++ ++/* omit-frame-pointer is TRUE. ++ omit-leaf-frame-pointer is false, but irrelevant due to omit-frame-pointer. ++ LR is not being clobbered in the leaf. ++ ++ Since we asked to have no frame pointers anywhere, we expect no frame ++ record in main or the leaf. */ ++ ++/* { dg-final { scan-assembler-not "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" } } */ ++ ++/* { dg-final { cleanup-saved-temps } } */ +--- a/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-3.c ++++ b/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-3.c +@@ -0,0 +1,15 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2 -fomit-frame-pointer -momit-leaf-frame-pointer -fno-inline --save-temps" } */ ++ ++#include "asm-adder-no-clobber-lr.c" ++ ++/* omit-frame-pointer is TRUE. ++ omit-leaf-frame-pointer is true, but irrelevant due to omit-frame-pointer. ++ LR is not being clobbered in the leaf. ++ ++ Since we asked to have no frame pointers anywhere, we expect no frame ++ record in main or the leaf. */ ++ ++/* { dg-final { scan-assembler-not "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" } } */ ++ ++/* { dg-final { cleanup-saved-temps } } */ +--- a/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-4.c ++++ b/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-4.c +@@ -0,0 +1,16 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2 -fno-omit-frame-pointer -momit-leaf-frame-pointer -fno-inline --save-temps" } */ ++ ++#include "asm-adder-no-clobber-lr.c" ++ ++/* omit-frame-pointer is FALSE. ++ omit-leaf-frame-pointer is TRUE. ++ LR is not being clobbered in the leaf. ++ ++ Unless we are removing all frame records, it's OK to remove the frame ++ record for a leaf where LR is not clobbered. Therefore, we expect a ++ frame record only in main. */ ++ ++/* { dg-final { scan-assembler-times "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" 1 } } */ ++ ++/* { dg-final { cleanup-saved-temps } } */ +--- a/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-5.c ++++ b/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-5.c +@@ -0,0 +1,15 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-inline --save-temps" } */ ++ ++#include "asm-adder-clobber-lr.c" ++ ++/* omit-frame-pointer is FALSE. ++ omit-leaf-frame-pointer is FALSE. ++ LR is being clobbered in the leaf. ++ ++ With no frame pointer omissions, we expect a frame record for main ++ and the leaf. */ ++ ++/* { dg-final { scan-assembler-times "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" 2 } } */ ++ ++/* { dg-final { cleanup-saved-temps } } */ +--- a/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-6.c ++++ b/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-6.c +@@ -0,0 +1,15 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2 -fomit-frame-pointer -mno-omit-leaf-frame-pointer -fno-inline --save-temps" } */ ++ ++#include "asm-adder-clobber-lr.c" ++ ++/* omit-frame-pointer is TRUE. ++ omit-leaf-frame-pointer is false, but irrelevant due to omit-frame-pointer. ++ LR is being clobbered in the leaf. ++ ++ Since we asked to have no frame pointers anywhere, we expect no frame ++ record in main or the leaf. */ ++ ++/* { dg-final { scan-assembler-not "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" } } */ ++ ++/* { dg-final { cleanup-saved-temps } } */ +--- a/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-7.c ++++ b/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-7.c +@@ -0,0 +1,15 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2 -fomit-frame-pointer -momit-leaf-frame-pointer -fno-inline --save-temps" } */ ++ ++#include "asm-adder-clobber-lr.c" ++ ++/* omit-frame-pointer is TRUE. ++ omit-leaf-frame-pointer is true, but irrelevant due to omit-frame-pointer. ++ LR is being clobbered in the leaf. ++ ++ Since we asked to have no frame pointers anywhere, we expect no frame ++ record in main or the leaf. */ ++ ++/* { dg-final { scan-assembler-not "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" } } */ ++ ++/* { dg-final { cleanup-saved-temps } } */ +--- a/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-8.c ++++ b/src/gcc/testsuite/gcc.target/aarch64/test-framepointer-8.c +@@ -0,0 +1,16 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2 -fno-omit-frame-pointer -momit-leaf-frame-pointer -fno-inline --save-temps" } */ ++ ++#include "asm-adder-clobber-lr.c" ++ ++/* omit-frame-pointer is FALSE. ++ omit-leaf-frame-pointer is TRUE. ++ LR is being clobbered in the leaf. ++ ++ Unless we are removing all frame records (which we aren't), it's ++ not OK to remove the frame record for a leaf where LR is clobbered. ++ Therefore, we expect a frame record in main and leaf. */ ++ ++/* { dg-final { scan-assembler-times "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" 2 } } */ ++ ++/* { dg-final { cleanup-saved-temps } } */ --- a/src/gcc/testsuite/gcc.target/aarch64/tst-1.c +++ b/src/gcc/testsuite/gcc.target/aarch64/tst-1.c @@ -0,0 +1,49 @@ @@ -70118,7 +71682,7 @@ + +#include "vect-fcm.x" + -+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */ ++/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" } } */ +/* { dg-final { scan-assembler "fcmeq\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */ +/* { dg-final { scan-assembler "fcmeq\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, 0" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ @@ -70135,14 +71699,14 @@ + +#include "vect-fcm.x" + -+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */ ++/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" } } */ +/* { dg-final { scan-assembler "fcmeq\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s" } } */ +/* { dg-final { scan-assembler "fcmeq\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, 0" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ +/* { dg-final { cleanup-saved-temps } } */ --- a/src/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-d.c +++ b/src/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-d.c -@@ -0,0 +1,14 @@ +@@ -0,0 +1,15 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */ + @@ -70152,14 +71716,15 @@ + +#include "vect-fcm.x" + -+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */ ++/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" } } */ +/* { dg-final { scan-assembler "fcmge\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */ +/* { dg-final { scan-assembler "fcmge\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, 0" } } */ ++/* { dg-final { scan-assembler "fcmlt\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, 0" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ +/* { dg-final { cleanup-saved-temps } } */ --- a/src/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-f.c +++ b/src/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-f.c -@@ -0,0 +1,14 @@ +@@ -0,0 +1,15 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */ + @@ -70169,14 +71734,15 @@ + +#include "vect-fcm.x" + -+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */ ++/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" } } */ +/* { dg-final { scan-assembler "fcmge\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s" } } */ +/* { dg-final { scan-assembler "fcmge\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, 0" } } */ ++/* { dg-final { scan-assembler "fcmlt\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, 0" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ +/* { dg-final { cleanup-saved-temps } } */ --- a/src/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-d.c +++ b/src/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-d.c -@@ -0,0 +1,14 @@ +@@ -0,0 +1,15 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */ + @@ -70186,14 +71752,15 @@ + +#include "vect-fcm.x" + -+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */ ++/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" } } */ +/* { dg-final { scan-assembler "fcmgt\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */ +/* { dg-final { scan-assembler "fcmgt\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, 0" } } */ ++/* { dg-final { scan-assembler "fcmle\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, 0" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ +/* { dg-final { cleanup-saved-temps } } */ --- a/src/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-f.c +++ b/src/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-f.c -@@ -0,0 +1,14 @@ +@@ -0,0 +1,15 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */ + @@ -70203,14 +71770,15 @@ + +#include "vect-fcm.x" + -+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */ ++/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" } } */ +/* { dg-final { scan-assembler "fcmgt\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s" } } */ +/* { dg-final { scan-assembler "fcmgt\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, 0" } } */ ++/* { dg-final { scan-assembler "fcmle\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, 0" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ +/* { dg-final { cleanup-saved-temps } } */ --- a/src/gcc/testsuite/gcc.target/aarch64/vect-fcm.x +++ b/src/gcc/testsuite/gcc.target/aarch64/vect-fcm.x -@@ -0,0 +1,56 @@ +@@ -0,0 +1,70 @@ +#include <stdlib.h> +#define N 16 + @@ -70253,6 +71821,15 @@ + output[i] = (in1[i] OP 0.0) ? 4.0 : 2.0; +} + ++void ++foobarbar (FTYPE *in1, FTYPE *in2, FTYPE *output) ++{ ++ int i = 0; ++ /* Vectorizable. */ ++ for (i = 0; i < N; i++) ++ output[i] = (in1[i] INV_OP 0.0) ? 4.0 : 2.0; ++} ++ +int +main (int argc, char **argv) +{ @@ -70264,6 +71841,11 @@ + for (i = 0; i < N; i++) + if (out1[i] != out2[i]) + abort (); ++ foobar (input1, input2, out1); ++ foobarbar (input1, input2, out2); ++ for (i = 0; i < N; i++) ++ if (out1[i] == out2[i]) ++ abort (); + return 0; +} + @@ -74126,6 +75708,120 @@ +{ + return __builtin_bswap16 (x); +} +--- a/src/gcc/testsuite/gcc.target/i386/pr44578.c ++++ b/src/gcc/testsuite/gcc.target/i386/pr44578.c +@@ -0,0 +1,31 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2 -mtune=athlon64" } */ ++ ++extern void abort (void); ++ ++long double ++__attribute__((noinline, noclone)) ++test (float num) ++{ ++ unsigned int i; ++ ++ if (num < 0.0) ++ num = 0.0; ++ ++ __builtin_memcpy (&i, &num, sizeof(unsigned int)); ++ ++ return (long double)(unsigned long long) i; ++} ++ ++int ++main () ++{ ++ long double x; ++ ++ x = test (0.0); ++ ++ if (x != 0.0) ++ abort (); ++ ++ return 0; ++} +--- a/src/gcc/testsuite/gcc.target/i386/pr56866.c ++++ b/src/gcc/testsuite/gcc.target/i386/pr56866.c +@@ -0,0 +1,16 @@ ++/* PR target/56866 */ ++/* { dg-do run } */ ++/* { dg-require-effective-target xop } */ ++/* { dg-options "-O3 -mxop" } */ ++ ++#define main xop_test_main ++#include "../../gcc.c-torture/execute/pr56866.c" ++#undef main ++ ++#include "xop-check.h" ++ ++static void ++xop_test (void) ++{ ++ xop_test_main (); ++} +--- a/src/gcc/testsuite/gcc.target/i386/pr57098.c ++++ b/src/gcc/testsuite/gcc.target/i386/pr57098.c +@@ -0,0 +1,10 @@ ++/* { dg-do compile } */ ++/* { dg-require-effective-target lp64 } */ ++/* { dg-options "-msse4 -mcmodel=large" } */ ++ ++typedef int V __attribute__((vector_size(16))); ++ ++void foo (V *p, V *mask) ++{ ++ *p = __builtin_shuffle (*p, *mask); ++} +--- a/src/gcc/testsuite/gcc.target/powerpc/pr57150.c ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr57150.c +@@ -0,0 +1,23 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_vsx_ok } */ ++/* { dg-options "-O3 -mcpu=power7 -fcaller-saves" } */ ++/* { dg-final { scan-assembler-not "lxvd2x" } } */ ++/* { dg-final { scan-assembler-not "lxvw4x" } } */ ++/* { dg-final { scan-assembler-not "lvx" } } */ ++/* { dg-final { scan-assembler-not "stxvd2x" } } */ ++/* { dg-final { scan-assembler-not "stxvw4x" } } */ ++/* { dg-final { scan-assembler-not "stvx" } } */ ++ ++/* Insure caller save on long double does not use VSX instructions. */ ++ ++extern long double modify (long double); ++ ++void ++sum (long double *ptr, long double value, unsigned long n) ++{ ++ unsigned long i; ++ ++ for (i = 0; i < n; i++) ++ ptr[i] += modify (value); ++} +--- a/src/gcc/testsuite/gcc.target/sh/pr57108.c ++++ b/src/gcc/testsuite/gcc.target/sh/pr57108.c +@@ -0,0 +1,19 @@ ++/* { dg-do compile { target "sh*-*-*" } } */ ++/* { dg-options "-O1" } */ ++ ++void __assert_func (void) __attribute__ ((__noreturn__)) ; ++ ++void ATATransfer (int num, int buffer) ++{ ++ int wordCount; ++ ++ while (num > 0) ++ { ++ wordCount = num * 512 / sizeof (int); ++ ++ ((0 == (buffer & 63)) ? (void)0 : __assert_func () ); ++ ((0 == (wordCount & 31)) ? (void)0 : __assert_func ()); ++ } ++ ++ ++ } --- a/src/gcc/testsuite/g++.dg/abi/aarch64_guard1.C +++ b/src/gcc/testsuite/g++.dg/abi/aarch64_guard1.C @@ -0,0 +1,17 @@ @@ -74219,6 +75915,23 @@ +// { dg-final { scan-assembler "_Z3f1912__Poly8x16_t:" } } +// { dg-final { scan-assembler "_Z3f2012__Poly16x8_t:" } } +// { dg-final { scan-assembler "_Z3f2111__Int8x16_tS_:" } } +--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C ++++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C +@@ -0,0 +1,14 @@ ++// PR c++/56388 ++// { dg-require-effective-target c++11 } ++ ++int main() ++{ ++ bool /*const*/ condition = false; ++ ++ [&]{ ++ try{} ++ catch(...){ ++ if(condition){} ++ } ++ }(); ++} --- a/src/gcc/testsuite/g++.dg/other/pr23205-2.C +++ b/src/gcc/testsuite/g++.dg/other/pr23205-2.C @@ -1,5 +1,5 @@ @@ -74321,6 +76034,308 @@ C { dg-skip-if "No stabs" {*-*-* } { "*" } { "-gstabs" } } common i,j common /label/l,m +--- a/src/gcc/testsuite/gfortran.dg/namelist_77.f90 ++++ b/src/gcc/testsuite/gfortran.dg/namelist_77.f90 +@@ -0,0 +1,49 @@ ++! { dg-do run } ++! ++! PR libfortran/51825 - Fortran runtime error: Cannot match namelist object name ++! Test case derived from PR. ++ ++module local_mod ++ ++ type mytype1 ++ integer :: int1 ++ end type ++ ++ type mytype2 ++ integer :: n_x ++ integer :: n_px ++ end type ++ ++ type beam_init_struct ++ character(16) :: chars(1) = '' ++ type (mytype1) dummy ++ type (mytype2) grid(1) ++ end type ++ ++end module ++ ++program error_namelist ++ ++ use local_mod ++ ++ implicit none ++ ++ type (beam_init_struct) beam_init ++ ++ namelist / error_params / beam_init ++ ++ open (10, status='scratch') ++ write (10, '(a)') "&error_params" ++ write (10, '(a)') " beam_init%chars(1)='JUNK'" ++ write (10, '(a)') " beam_init%grid(1)%n_x=3" ++ write (10, '(a)') " beam_init%grid(1)%n_px=2" ++ write (10, '(a)') "/" ++ rewind(10) ++ read(10, nml=error_params) ++ close (10) ++ ++ if (beam_init%chars(1) /= 'JUNK') call abort ++ if (beam_init%grid(1)%n_x /= 3) call abort ++ if (beam_init%grid(1)%n_px /= 2) call abort ++ ++end program +--- a/src/gcc/testsuite/gfortran.dg/namelist_78.f90 ++++ b/src/gcc/testsuite/gfortran.dg/namelist_78.f90 +@@ -0,0 +1,34 @@ ++! { dg-do run } ++! ++! PR libfortran/51825 ++! Test case regarding namelist problems with derived types ++ ++program namelist ++ ++ type d1 ++ integer :: j = 0 ++ end type d1 ++ ++ type d2 ++ type(d1) k ++ end type d2 ++ ++ type d3 ++ type(d2) d(2) ++ end type d3 ++ ++ type(d3) der ++ namelist /nmlst/ der ++ ++ open (10, status='scratch') ++ write (10, '(a)') "&NMLST" ++ write (10, '(a)') " DER%D(1)%K%J = 1," ++ write (10, '(a)') " DER%D(2)%K%J = 2," ++ write (10, '(a)') "/" ++ rewind(10) ++ read(10, nml=nmlst) ++ close (10) ++ ++ if (der%d(1)%k%j /= 1) call abort ++ if (der%d(2)%k%j /= 2) call abort ++end program namelist +--- a/src/gcc/testsuite/gfortran.dg/namelist_79.f90 ++++ b/src/gcc/testsuite/gfortran.dg/namelist_79.f90 +@@ -0,0 +1,43 @@ ++! { dg-do run } ++! PR libfortran/52512 - Cannot match namelist object name ++! Test case derived from PR. ++ ++program testje ++ ++ implicit none ++ ++ integer :: getal, jn ++ type ptracer ++ character(len = 8) :: sname !: short name ++ logical :: lini !: read in a file or not ++ end type ptracer ++ type(ptracer) , dimension(3) :: tracer ++ namelist/namtoptrc/ getal,tracer ++ ++ ! standard values ++ getal = 9999 ++ do jn = 1, 3 ++ tracer(jn)%sname = 'default_name' ++ tracer(jn)%lini = .false. ++ end do ++ ++ open (10, status='scratch') ++ write (10, '(a)') "&namtoptrc" ++ write (10, '(a)') " getal = 7" ++ write (10, '(a)') " tracer(1) = 'DIC ', .true." ++ write (10, '(a)') " tracer(2) = 'Alkalini', .true." ++ write (10, '(a)') " tracer(3) = 'O2 ', .true." ++ write (10, '(a)') "/" ++ rewind(10) ++ read(10, nml=namtoptrc) ++ close (10) ++ ++ if (getal /= 7) call abort ++ if (tracer(1)%sname /= 'DIC ') call abort ++ if (tracer(2)%sname /= 'Alkalini') call abort ++ if (tracer(3)%sname /= 'O2 ') call abort ++ if (.not. tracer(1)%lini) call abort ++ if (.not. tracer(2)%lini) call abort ++ if (.not. tracer(3)%lini) call abort ++ ++end program testje +--- a/src/gcc/testsuite/gfortran.dg/namelist_81.f90 ++++ b/src/gcc/testsuite/gfortran.dg/namelist_81.f90 +@@ -0,0 +1,43 @@ ++! { dg-do run } ++! PR56786 Error on embedded spaces ++integer :: i(3) ++namelist /nml/ i ++ ++i = -42 ++open(99,status='scratch') ++write(99,'(a)') '&nml i(3 ) = 5 /' ++rewind(99) ++read(99,nml=nml) ++close(99) ++if (i(1)/=-42 .or. i(2)/=-42 .or. i(3)/=5) call abort() ++ ++! Shorten the file so the read hits EOF ++ ++open(99,status='scratch') ++write(99,'(a)') '&nml i(3 ) = 5 ' ++rewind(99) ++read(99,nml=nml, end=30) ++call abort() ++! Shorten some more ++ 30 close(99) ++open(99,status='scratch') ++write(99,'(a)') '&nml i(3 ) =' ++rewind(99) ++read(99,nml=nml, end=40) ++call abort() ++! Shorten some more ++ 40 close(99) ++open(99,status='scratch') ++write(99,'(a)') '&nml i(3 )' ++rewind(99) ++read(99,nml=nml, end=50) ++call abort() ++! Shorten some more ++ 50 close(99) ++open(99,status='scratch') ++write(99,'(a)') '&nml i(3 ' ++rewind(99) ++read(99,nml=nml, end=60) ++call abort() ++ 60 close(99) ++end +--- a/src/gcc/testsuite/gfortran.dg/proc_ptr_41.f90 ++++ b/src/gcc/testsuite/gfortran.dg/proc_ptr_41.f90 +@@ -0,0 +1,37 @@ ++! { dg-do compile } ++! ++! PR 56968: [4.7/4.8/4.9 Regression] [F03] Issue with a procedure defined with a generic name returning procedure pointer ++! ++! Contributed by Samuel Debionne <samuel.debionne@ujf-grenoble.fr> ++ ++module test ++ ++ interface generic_name_get_proc_ptr ++ module procedure specific_name_get_proc_ptr ++ end interface ++ ++ abstract interface ++ double precision function foo(arg1) ++ real, intent(in) :: arg1 ++ end function ++ end interface ++ ++contains ++ ++ function specific_name_get_proc_ptr() result(res) ++ procedure(foo), pointer :: res ++ end function ++ ++end module test ++ ++program crash_test ++ use :: test ++ ++ procedure(foo), pointer :: ptr ++ ++ ptr => specific_name_get_proc_ptr() ++ ptr => generic_name_get_proc_ptr() ++ ++end program ++ ++! { dg-final { cleanup-modules "test" } } +--- a/src/gcc/testsuite/gfortran.dg/size_kind_2.f90 ++++ b/src/gcc/testsuite/gfortran.dg/size_kind_2.f90 +@@ -0,0 +1,17 @@ ++! { dg-do compile } ++! { dg-options "-fdump-tree-original" } ++! ++! PR fortran/57142 ++! ++integer :: B(huge(1)+3_8,2_8) ++integer(8) :: var1(2), var2, var3 ++ ++var1 = shape(B,kind=8) ++var2 = size(B,kind=8) ++var3 = size(B,dim=1,kind=8) ++end ++ ++! { dg-final { scan-tree-dump "static integer.kind=8. A..\\\[2\\\] = \\\{2147483650, 2\\\};" "original" } } ++! { dg-final { scan-tree-dump "var2 = 4294967300;" "original" } } ++! { dg-final { scan-tree-dump "var3 = 2147483650;" "original" } } ++! { dg-final { cleanup-tree-dump "original" } } +--- a/src/gcc/testsuite/gfortran.dg/size_kind_3.f90 ++++ b/src/gcc/testsuite/gfortran.dg/size_kind_3.f90 +@@ -0,0 +1,11 @@ ++! { dg-do compile } ++! ++! PR fortran/57142 ++! ++integer :: B(huge(1)+3_8,2_8) ++integer(8) :: var1(2), var2, var3 ++ ++var1 = shape(B) ! { dg-error "SHAPE overflows its kind" } ++var2 = size(B) ! { dg-error "SIZE overflows its kind" } ++var3 = size(B,dim=1) ! { dg-error "SIZE overflows its kind" } ++end +--- a/src/gcc/testsuite/gfortran.dg/transfer_check_4.f90 ++++ b/src/gcc/testsuite/gfortran.dg/transfer_check_4.f90 +@@ -0,0 +1,44 @@ ++! { dg-do compile } ++! { dg-options "-Wall" } ++ ++! PR 57022: [4.7/4.8/4.9 Regression] Inappropriate warning for use of TRANSFER with arrays ++! Contributed by William Clodius <wclodius@los-alamos.net> ++ ++subroutine transfers (test) ++ ++ use, intrinsic :: iso_fortran_env ++ ++ integer, intent(in) :: test ++ ++ integer(int8) :: test8(8) = 0 ++ integer(int16) :: test16(4) = 0 ++ integer(int32) :: test32(2) = 0 ++ integer(int64) :: test64 = 0 ++ ++ select case(test) ++ case(0) ++ test64 = transfer(test8, test64) ++ case(1) ++ test64 = transfer(test16, test64) ++ case(2) ++ test64 = transfer(test32, test64) ++ case(3) ++ test8 = transfer(test64, test8, 8) ++ case(4) ++ test16 = transfer(test64, test16, 4) ++ case(5) ++ test32 = transfer(test64, test32, 2) ++ end select ++ ++end subroutine ++ ++ ++! PR 53685: surprising warns about transfer with explicit character range ++! Contributed by Jos de Kloe <kloedej@knmi.nl> ++ ++subroutine mytest(byte_array,val) ++ integer, parameter :: r8_ = Selected_Real_Kind(15,307) ! = real*8 ++ character(len=1), dimension(16), intent(in) :: byte_array ++ real(r8_),intent(out) :: val ++ val = transfer(byte_array(1:8),val) ++end subroutine --- a/src/gcc/testsuite/g++.old-deja/g++.abi/ptrmem.C +++ b/src/gcc/testsuite/g++.old-deja/g++.abi/ptrmem.C @@ -7,7 +7,7 @@ @@ -76121,6 +78136,146 @@ &def, &dt[1]); if (!ok) +--- a/src/INSTALL/binaries.html ++++ b/src/INSTALL/binaries.html +@@ -3,7 +3,7 @@ + <title>Installing GCC: Binaries</title> + <meta http-equiv="Content-Type" content="text/html"> + <meta name="description" content="Installing GCC: Binaries"> +-<meta name="generator" content="makeinfo 4.12"> ++<meta name="generator" content="makeinfo 4.13"> + <link title="Top" rel="top" href="#Top"> + <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> + <!-- +--- a/src/INSTALL/build.html ++++ b/src/INSTALL/build.html +@@ -3,7 +3,7 @@ + <title>Installing GCC: Building</title> + <meta http-equiv="Content-Type" content="text/html"> + <meta name="description" content="Installing GCC: Building"> +-<meta name="generator" content="makeinfo 4.12"> ++<meta name="generator" content="makeinfo 4.13"> + <link title="Top" rel="top" href="#Top"> + <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> + <!-- +--- a/src/INSTALL/configure.html ++++ b/src/INSTALL/configure.html +@@ -3,7 +3,7 @@ + <title>Installing GCC: Configuration</title> + <meta http-equiv="Content-Type" content="text/html"> + <meta name="description" content="Installing GCC: Configuration"> +-<meta name="generator" content="makeinfo 4.12"> ++<meta name="generator" content="makeinfo 4.13"> + <link title="Top" rel="top" href="#Top"> + <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> + <!-- +@@ -446,6 +446,14 @@ + conventions, etc. should not be built. The default is to build a + predefined set of them. + ++ <br><dt><code>--enable-multiarch</code><dd>Specify whether to enable or disable multiarch support. The default is ++to check for glibc start files in a multiarch location, and enable it ++if the files are found. The auto detection is enabled for native builds, ++and for cross builds configured with <samp><span class="option">--with-sysroot</span></samp>, and without ++<samp><span class="option">--with-native-system-header-dir</span></samp>. ++More documentation about multiarch can be found at ++<a href="http://wiki.debian.org/Multiarch">http://wiki.debian.org/Multiarch</a>. ++ + <p>Some targets provide finer-grained control over which multilibs are built + (e.g., <samp><span class="option">--disable-softfloat</span></samp>): + <dl> +--- a/src/INSTALL/download.html ++++ b/src/INSTALL/download.html +@@ -3,7 +3,7 @@ + <title>Downloading GCC</title> + <meta http-equiv="Content-Type" content="text/html"> + <meta name="description" content="Downloading GCC"> +-<meta name="generator" content="makeinfo 4.12"> ++<meta name="generator" content="makeinfo 4.13"> + <link title="Top" rel="top" href="#Top"> + <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> + <!-- +--- a/src/INSTALL/finalinstall.html ++++ b/src/INSTALL/finalinstall.html +@@ -3,7 +3,7 @@ + <title>Installing GCC: Final installation</title> + <meta http-equiv="Content-Type" content="text/html"> + <meta name="description" content="Installing GCC: Final installation"> +-<meta name="generator" content="makeinfo 4.12"> ++<meta name="generator" content="makeinfo 4.13"> + <link title="Top" rel="top" href="#Top"> + <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> + <!-- +--- a/src/INSTALL/gfdl.html ++++ b/src/INSTALL/gfdl.html +@@ -3,7 +3,7 @@ + <title>Installing GCC: GNU Free Documentation License</title> + <meta http-equiv="Content-Type" content="text/html"> + <meta name="description" content="Installing GCC: GNU Free Documentation License"> +-<meta name="generator" content="makeinfo 4.12"> ++<meta name="generator" content="makeinfo 4.13"> + <link title="Top" rel="top" href="#Top"> + <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> + <!-- +--- a/src/INSTALL/index.html ++++ b/src/INSTALL/index.html +@@ -3,7 +3,7 @@ + <title>Installing GCC</title> + <meta http-equiv="Content-Type" content="text/html"> + <meta name="description" content="Installing GCC"> +-<meta name="generator" content="makeinfo 4.12"> ++<meta name="generator" content="makeinfo 4.13"> + <link title="Top" rel="top" href="#Top"> + <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> + <!-- +--- a/src/INSTALL/old.html ++++ b/src/INSTALL/old.html +@@ -3,7 +3,7 @@ + <title>Installing GCC: Old documentation</title> + <meta http-equiv="Content-Type" content="text/html"> + <meta name="description" content="Installing GCC: Old documentation"> +-<meta name="generator" content="makeinfo 4.12"> ++<meta name="generator" content="makeinfo 4.13"> + <link title="Top" rel="top" href="#Top"> + <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> + <!-- +--- a/src/INSTALL/prerequisites.html ++++ b/src/INSTALL/prerequisites.html +@@ -3,7 +3,7 @@ + <title>Prerequisites for GCC</title> + <meta http-equiv="Content-Type" content="text/html"> + <meta name="description" content="Prerequisites for GCC"> +-<meta name="generator" content="makeinfo 4.12"> ++<meta name="generator" content="makeinfo 4.13"> + <link title="Top" rel="top" href="#Top"> + <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> + <!-- +--- a/src/INSTALL/specific.html ++++ b/src/INSTALL/specific.html +@@ -3,7 +3,7 @@ + <title>Host/Target specific installation notes for GCC</title> + <meta http-equiv="Content-Type" content="text/html"> + <meta name="description" content="Host/Target specific installation notes for GCC"> +-<meta name="generator" content="makeinfo 4.12"> ++<meta name="generator" content="makeinfo 4.13"> + <link title="Top" rel="top" href="#Top"> + <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> + <!-- +--- a/src/INSTALL/test.html ++++ b/src/INSTALL/test.html +@@ -3,7 +3,7 @@ + <title>Installing GCC: Testing</title> + <meta http-equiv="Content-Type" content="text/html"> + <meta name="description" content="Installing GCC: Testing"> +-<meta name="generator" content="makeinfo 4.12"> ++<meta name="generator" content="makeinfo 4.13"> + <link title="Top" rel="top" href="#Top"> + <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> + <!-- +--- a/src/LAST_UPDATED ++++ b/src/LAST_UPDATED +@@ -1 +0,0 @@ +-Obtained from SVN: tags/gcc_4_7_3_release revision 197739 --- a/src/libcpp/ChangeLog.aarch64 +++ b/src/libcpp/ChangeLog.aarch64 @@ -0,0 +1,13 @@ @@ -76229,6 +78384,39 @@ #else /* We only have one accellerated alternative. Use a direct call so that +Binary files gcc-4.7.3/libcpp/po/be.gmo and gcc-linaro-4.7-2013.05/libcpp/po/be.gmo differ +Binary files gcc-4.7.3/libcpp/po/ca.gmo and gcc-linaro-4.7-2013.05/libcpp/po/ca.gmo differ +Binary files gcc-4.7.3/libcpp/po/da.gmo and gcc-linaro-4.7-2013.05/libcpp/po/da.gmo differ +Binary files gcc-4.7.3/libcpp/po/de.gmo and gcc-linaro-4.7-2013.05/libcpp/po/de.gmo differ +Binary files gcc-4.7.3/libcpp/po/el.gmo and gcc-linaro-4.7-2013.05/libcpp/po/el.gmo differ +Binary files gcc-4.7.3/libcpp/po/eo.gmo and gcc-linaro-4.7-2013.05/libcpp/po/eo.gmo differ +Binary files gcc-4.7.3/libcpp/po/es.gmo and gcc-linaro-4.7-2013.05/libcpp/po/es.gmo differ +Binary files gcc-4.7.3/libcpp/po/fi.gmo and gcc-linaro-4.7-2013.05/libcpp/po/fi.gmo differ +Binary files gcc-4.7.3/libcpp/po/fr.gmo and gcc-linaro-4.7-2013.05/libcpp/po/fr.gmo differ +Binary files gcc-4.7.3/libcpp/po/id.gmo and gcc-linaro-4.7-2013.05/libcpp/po/id.gmo differ +Binary files gcc-4.7.3/libcpp/po/ja.gmo and gcc-linaro-4.7-2013.05/libcpp/po/ja.gmo differ +Binary files gcc-4.7.3/libcpp/po/nl.gmo and gcc-linaro-4.7-2013.05/libcpp/po/nl.gmo differ +Binary files gcc-4.7.3/libcpp/po/ru.gmo and gcc-linaro-4.7-2013.05/libcpp/po/ru.gmo differ +Binary files gcc-4.7.3/libcpp/po/sr.gmo and gcc-linaro-4.7-2013.05/libcpp/po/sr.gmo differ +Binary files gcc-4.7.3/libcpp/po/sv.gmo and gcc-linaro-4.7-2013.05/libcpp/po/sv.gmo differ +Binary files gcc-4.7.3/libcpp/po/tr.gmo and gcc-linaro-4.7-2013.05/libcpp/po/tr.gmo differ +Binary files gcc-4.7.3/libcpp/po/uk.gmo and gcc-linaro-4.7-2013.05/libcpp/po/uk.gmo differ +Binary files gcc-4.7.3/libcpp/po/vi.gmo and gcc-linaro-4.7-2013.05/libcpp/po/vi.gmo differ +Binary files gcc-4.7.3/libcpp/po/zh_CN.gmo and gcc-linaro-4.7-2013.05/libcpp/po/zh_CN.gmo differ +Binary files gcc-4.7.3/libcpp/po/zh_TW.gmo and gcc-linaro-4.7-2013.05/libcpp/po/zh_TW.gmo differ +--- a/src/libgcc/ChangeLog ++++ b/src/libgcc/ChangeLog +@@ -1,3 +1,10 @@ ++2013-04-11 Julian Brown <julian@codesourcery.com> ++ ++ * config/arm/linux-atomic.c (SUBWORD_SYNC_OP, SUBWORD_VAL_CAS) ++ (SUBWORD_TEST_AND_SET): Use signed char/short types instead of ++ unsigned char/unsigned short. ++ (__sync_val_compare_and_swap_{1,2}): Handle signed argument. ++ + 2013-04-11 Release Manager + + * GCC 4.7.3 released. --- a/src/libgcc/ChangeLog.aarch64 +++ b/src/libgcc/ChangeLog.aarch64 @@ -0,0 +1,83 @@ @@ -76974,6 +79162,116 @@ /* ------------------------------------------------------------------------ */ /* These next two sections are here despite the fact that they contain Thumb assembler because their presence allows interworked code to be linked even +--- a/src/libgcc/config/arm/linux-atomic.c ++++ b/src/libgcc/config/arm/linux-atomic.c +@@ -97,19 +97,19 @@ + return (RETURN & mask) >> shift; \ + } + +-SUBWORD_SYNC_OP (add, , +, unsigned short, 2, oldval) +-SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, oldval) +-SUBWORD_SYNC_OP (or, , |, unsigned short, 2, oldval) +-SUBWORD_SYNC_OP (and, , &, unsigned short, 2, oldval) +-SUBWORD_SYNC_OP (xor, , ^, unsigned short, 2, oldval) +-SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, oldval) +- +-SUBWORD_SYNC_OP (add, , +, unsigned char, 1, oldval) +-SUBWORD_SYNC_OP (sub, , -, unsigned char, 1, oldval) +-SUBWORD_SYNC_OP (or, , |, unsigned char, 1, oldval) +-SUBWORD_SYNC_OP (and, , &, unsigned char, 1, oldval) +-SUBWORD_SYNC_OP (xor, , ^, unsigned char, 1, oldval) +-SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, oldval) ++SUBWORD_SYNC_OP (add, , +, short, 2, oldval) ++SUBWORD_SYNC_OP (sub, , -, short, 2, oldval) ++SUBWORD_SYNC_OP (or, , |, short, 2, oldval) ++SUBWORD_SYNC_OP (and, , &, short, 2, oldval) ++SUBWORD_SYNC_OP (xor, , ^, short, 2, oldval) ++SUBWORD_SYNC_OP (nand, ~, &, short, 2, oldval) ++ ++SUBWORD_SYNC_OP (add, , +, signed char, 1, oldval) ++SUBWORD_SYNC_OP (sub, , -, signed char, 1, oldval) ++SUBWORD_SYNC_OP (or, , |, signed char, 1, oldval) ++SUBWORD_SYNC_OP (and, , &, signed char, 1, oldval) ++SUBWORD_SYNC_OP (xor, , ^, signed char, 1, oldval) ++SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, oldval) + + #define OP_AND_FETCH_WORD(OP, PFX_OP, INF_OP) \ + int HIDDEN \ +@@ -132,19 +132,19 @@ + OP_AND_FETCH_WORD (xor, , ^) + OP_AND_FETCH_WORD (nand, ~, &) + +-SUBWORD_SYNC_OP (add, , +, unsigned short, 2, newval) +-SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, newval) +-SUBWORD_SYNC_OP (or, , |, unsigned short, 2, newval) +-SUBWORD_SYNC_OP (and, , &, unsigned short, 2, newval) +-SUBWORD_SYNC_OP (xor, , ^, unsigned short, 2, newval) +-SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, newval) +- +-SUBWORD_SYNC_OP (add, , +, unsigned char, 1, newval) +-SUBWORD_SYNC_OP (sub, , -, unsigned char, 1, newval) +-SUBWORD_SYNC_OP (or, , |, unsigned char, 1, newval) +-SUBWORD_SYNC_OP (and, , &, unsigned char, 1, newval) +-SUBWORD_SYNC_OP (xor, , ^, unsigned char, 1, newval) +-SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, newval) ++SUBWORD_SYNC_OP (add, , +, short, 2, newval) ++SUBWORD_SYNC_OP (sub, , -, short, 2, newval) ++SUBWORD_SYNC_OP (or, , |, short, 2, newval) ++SUBWORD_SYNC_OP (and, , &, short, 2, newval) ++SUBWORD_SYNC_OP (xor, , ^, short, 2, newval) ++SUBWORD_SYNC_OP (nand, ~, &, short, 2, newval) ++ ++SUBWORD_SYNC_OP (add, , +, signed char, 1, newval) ++SUBWORD_SYNC_OP (sub, , -, signed char, 1, newval) ++SUBWORD_SYNC_OP (or, , |, signed char, 1, newval) ++SUBWORD_SYNC_OP (and, , &, signed char, 1, newval) ++SUBWORD_SYNC_OP (xor, , ^, signed char, 1, newval) ++SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, newval) + + int HIDDEN + __sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval) +@@ -181,7 +181,7 @@ + actual_oldval = *wordptr; \ + \ + if (__builtin_expect (((actual_oldval & mask) >> shift) != \ +- (unsigned int) oldval, 0)) \ ++ ((unsigned int) oldval & MASK_##WIDTH), 0)) \ + return (actual_oldval & mask) >> shift; \ + \ + actual_newval = (actual_oldval & ~mask) \ +@@ -195,8 +195,8 @@ + } \ + } + +-SUBWORD_VAL_CAS (unsigned short, 2) +-SUBWORD_VAL_CAS (unsigned char, 1) ++SUBWORD_VAL_CAS (short, 2) ++SUBWORD_VAL_CAS (signed char, 1) + + typedef unsigned char bool; + +@@ -217,8 +217,8 @@ + return (oldval == actual_oldval); \ + } + +-SUBWORD_BOOL_CAS (unsigned short, 2) +-SUBWORD_BOOL_CAS (unsigned char, 1) ++SUBWORD_BOOL_CAS (short, 2) ++SUBWORD_BOOL_CAS (signed char, 1) + + void HIDDEN + __sync_synchronize (void) +@@ -260,8 +260,8 @@ + return (oldval & mask) >> shift; \ + } + +-SUBWORD_TEST_AND_SET (unsigned short, 2) +-SUBWORD_TEST_AND_SET (unsigned char, 1) ++SUBWORD_TEST_AND_SET (short, 2) ++SUBWORD_TEST_AND_SET (signed char, 1) + + #define SYNC_LOCK_RELEASE(TYPE, WIDTH) \ + void HIDDEN \ --- a/src/libgcc/config/arm/t-elf +++ b/src/libgcc/config/arm/t-elf @@ -10,7 +10,7 @@ @@ -77232,6 +79530,276 @@ } while (0) #define FP_CLS_NORMAL 0 +--- a/src/libgfortran/ChangeLog ++++ b/src/libgfortran/ChangeLog +@@ -1,3 +1,38 @@ ++2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> ++ ++ Backport from mainline: ++ 2013-03-20 Tilo Schwarz <tilo@tilo-schwarz.de> ++ ++ PR libfortran/51825 ++ * io/list_read.c (nml_read_obj): Don't end the component loop on a ++ nested derived type, but continue with the next loop iteration. ++ (nml_get_obj_data): Don't move the first_nl pointer further in the ++ list if a qualifier was found. ++ ++2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> ++ ++ Backport from mainline: ++ ++ PR libfortran/56786 ++ * io/list_read.c (nml_parse_qualifier): Remove spurious next_char call ++ when checking for EOF. Use error return mechanism when EOF detected. ++ Do not return FAILURE unless parse_err_msg and parse_err_msg_size have ++ been set. Use hit_eof. ++ (nml_get_obj_data): Likewise use the correct error mechanism. ++ * io/transfer.c (hit_eof): Do not set AFTER_ENDFILE if in namelist ++ mode. ++ ++2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> ++ ++ Backport from mainline: ++ 2013-03-25 Tilo Schwarz <tilo@tilo-schwarz.de> ++ ++ PR libfortran/52512 ++ * io/list_read.c (nml_parse_qualifier): To check for a derived type ++ don't use the namelist head element type but the current element type. ++ (nml_get_obj_data): Add current namelist element type to ++ nml_parse_qualifier call. ++ + 2013-04-11 Release Manager + + * GCC 4.7.3 released. +--- a/src/libgfortran/io/list_read.c ++++ b/src/libgfortran/io/list_read.c +@@ -2028,8 +2028,8 @@ + + static try + nml_parse_qualifier (st_parameter_dt *dtp, descriptor_dimension *ad, +- array_loop_spec *ls, int rank, char *parse_err_msg, +- size_t parse_err_msg_size, ++ array_loop_spec *ls, int rank, bt nml_elem_type, ++ char *parse_err_msg, size_t parse_err_msg_size, + int *parsed_rank) + { + int dim; +@@ -2053,7 +2053,7 @@ + /* The next character in the stream should be the '('. */ + + if ((c = next_char (dtp)) == EOF) +- return FAILURE; ++ goto err_ret; + + /* Process the qualifier, by dimension and triplet. */ + +@@ -2067,7 +2067,7 @@ + + /* Process a potential sign. */ + if ((c = next_char (dtp)) == EOF) +- return FAILURE; ++ goto err_ret; + switch (c) + { + case '-': +@@ -2085,11 +2085,12 @@ + /* Process characters up to the next ':' , ',' or ')'. */ + for (;;) + { +- if ((c = next_char (dtp)) == EOF) +- return FAILURE; +- ++ c = next_char (dtp); + switch (c) + { ++ case EOF: ++ goto err_ret; ++ + case ':': + is_array_section = 1; + break; +@@ -2112,10 +2113,8 @@ + push_char (dtp, c); + continue; + +- case ' ': case '\t': ++ case ' ': case '\t': case '\r': case '\n': + eat_spaces (dtp); +- if ((c = next_char (dtp) == EOF)) +- return FAILURE; + break; + + default: +@@ -2204,7 +2203,7 @@ + do not allow excess data to be processed. */ + if (is_array_section == 1 + || !(compile_options.allow_std & GFC_STD_GNU) +- || dtp->u.p.ionml->type == BT_DERIVED) ++ || nml_elem_type == BT_DERIVED) + ls[dim].end = ls[dim].start; + else + dtp->u.p.expanded_read = 1; +@@ -2257,6 +2256,15 @@ + + err_ret: + ++ /* The EOF error message is issued by hit_eof. Return true so that the ++ caller does not use parse_err_msg and parse_err_msg_size to generate ++ an unrelated error message. */ ++ if (c == EOF) ++ { ++ hit_eof (dtp); ++ dtp->u.p.input_complete = 1; ++ return SUCCESS; ++ } + return FAILURE; + } + +@@ -2553,17 +2561,17 @@ + since a single object can have multiple reads. */ + dtp->u.p.expanded_read = 0; + +- /* Now loop over the components. Update the component pointer +- with the return value from nml_write_obj. This loop jumps +- past nested derived types by testing if the potential +- component name contains '%'. */ ++ /* Now loop over the components. */ + + for (cmp = nl->next; + cmp && +- !strncmp (cmp->var_name, obj_name, obj_name_len) && +- !strchr (cmp->var_name + obj_name_len, '%'); ++ !strncmp (cmp->var_name, obj_name, obj_name_len); + cmp = cmp->next) + { ++ /* Jump over nested derived type by testing if the potential ++ component name contains '%'. */ ++ if (strchr (cmp->var_name + obj_name_len, '%')) ++ continue; + + if (nml_read_obj (dtp, cmp, (index_type)(pdata - nl->mem_pos), + pprev_nl, nml_err_msg, nml_err_msg_size, +@@ -2726,12 +2734,12 @@ + return SUCCESS; + + if ((c = next_char (dtp)) == EOF) +- return FAILURE; ++ goto nml_err_ret; + switch (c) + { + case '=': + if ((c = next_char (dtp)) == EOF) +- return FAILURE; ++ goto nml_err_ret; + if (c != '?') + { + snprintf (nml_err_msg, nml_err_msg_size, +@@ -2781,8 +2789,9 @@ + if (!is_separator (c)) + push_char (dtp, tolower(c)); + if ((c = next_char (dtp)) == EOF) +- return FAILURE; +- } while (!( c=='=' || c==' ' || c=='\t' || c =='(' || c =='%' )); ++ goto nml_err_ret; ++ } ++ while (!( c=='=' || c==' ' || c=='\t' || c =='(' || c =='%' )); + + unget_char (dtp, c); + +@@ -2842,7 +2851,7 @@ + { + parsed_rank = 0; + if (nml_parse_qualifier (dtp, nl->dim, nl->ls, nl->var_rank, +- nml_err_msg, nml_err_msg_size, ++ nl->type, nml_err_msg, nml_err_msg_size, + &parsed_rank) == FAILURE) + { + char *nml_err_msg_end = strchr (nml_err_msg, '\0'); +@@ -2857,7 +2866,7 @@ + qualifier_flag = 1; + + if ((c = next_char (dtp)) == EOF) +- return FAILURE; ++ goto nml_err_ret; + unget_char (dtp, c); + } + else if (nl->var_rank > 0) +@@ -2876,14 +2885,15 @@ + goto nml_err_ret; + } + +- if (*pprev_nl == NULL || !component_flag) ++ /* Don't move first_nl further in the list if a qualifier was found. */ ++ if ((*pprev_nl == NULL && !qualifier_flag) || !component_flag) + first_nl = nl; + + root_nl = nl; + + component_flag = 1; + if ((c = next_char (dtp)) == EOF) +- return FAILURE; ++ goto nml_err_ret; + goto get_name; + } + +@@ -2898,8 +2908,8 @@ + descriptor_dimension chd[1] = { {1, clow, nl->string_length} }; + array_loop_spec ind[1] = { {1, clow, nl->string_length, 1} }; + +- if (nml_parse_qualifier (dtp, chd, ind, -1, nml_err_msg, +- nml_err_msg_size, &parsed_rank) ++ if (nml_parse_qualifier (dtp, chd, ind, -1, nl->type, ++ nml_err_msg, nml_err_msg_size, &parsed_rank) + == FAILURE) + { + char *nml_err_msg_end = strchr (nml_err_msg, '\0'); +@@ -2921,7 +2931,7 @@ + } + + if ((c = next_char (dtp)) == EOF) +- return FAILURE; ++ goto nml_err_ret; + unget_char (dtp, c); + } + +@@ -2961,7 +2971,7 @@ + return SUCCESS; + + if ((c = next_char (dtp)) == EOF) +- return FAILURE; ++ goto nml_err_ret; + + if (c != '=') + { +@@ -2996,6 +3006,17 @@ + + nml_err_ret: + ++ /* The EOF error message is issued by hit_eof. Return true so that the ++ caller does not use nml_err_msg and nml_err_msg_size to generate ++ an unrelated error message. */ ++ if (c == EOF) ++ { ++ dtp->u.p.input_complete = 1; ++ unget_char (dtp, c); ++ hit_eof (dtp); ++ return SUCCESS; ++ } ++ + return FAILURE; + } + +--- a/src/libgfortran/io/transfer.c ++++ b/src/libgfortran/io/transfer.c +@@ -3748,7 +3748,7 @@ + case NO_ENDFILE: + case AT_ENDFILE: + generate_error (&dtp->common, LIBERROR_END, NULL); +- if (!is_internal_unit (dtp)) ++ if (!is_internal_unit (dtp) && !dtp->u.p.namelist_mode) + { + dtp->u.p.current_unit->endfile = AFTER_ENDFILE; + dtp->u.p.current_unit->current_record = 0; --- a/src/libgomp/ChangeLog.aarch64 +++ b/src/libgomp/ChangeLog.aarch64 @@ -0,0 +1,12 @@ @@ -77260,6 +79828,43 @@ alpha*-*-linux*) config_path="linux/alpha linux posix" ;; +--- a/src/libstdc++-v3/acinclude.m4 ++++ b/src/libstdc++-v3/acinclude.m4 +@@ -1132,6 +1132,11 @@ + dnl --disable-libstdcxx-time + dnl disables the checks completely + dnl ++dnl N.B. Darwin provides nanosleep but doesn't support the whole POSIX ++dnl Timers option, so doesn't define _POSIX_TIMERS. Because the test ++dnl below fails Darwin unconditionally defines _GLIBCXX_USE_NANOSLEEP in ++dnl os_defines.h and also defines _GLIBCXX_USE_SCHED_YIELD. ++dnl + AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [ + + AC_MSG_CHECKING([for clock_gettime, nanosleep and sched_yield]) +--- a/src/libstdc++-v3/ChangeLog ++++ b/src/libstdc++-v3/ChangeLog +@@ -1,3 +1,20 @@ ++2013-04-15 Jack Howarth <howarth@bromo.med.uc.edu> ++ ++ Backport from mainline ++ ++ 2012-10-10 Jack Howarth <howarth@bromo.med.uc.edu> ++ Jonathan Wakely <jwakely.gcc@gmail.com> ++ ++ PR libstdc++/54847 ++ * config/os/bsd/darwin/os_defines.h: Define _GLIBCXX_USE_NANOSLEEP ++ and _GLIBCXX_USE_SCHED_YIELD. ++ * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Add comment. ++ ++2013-04-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> ++ ++ * testsuite/30_threads/condition_variable/members/53841.cc: Add ++ -std=gnu++0x -pthread on alpha*-*-osf*, mips-sgi-irix6*. ++ + 2013-04-11 Release Manager + + * GCC 4.7.3 released. --- a/src/libstdc++-v3/ChangeLog.aarch64 +++ b/src/libstdc++-v3/ChangeLog.aarch64 @@ -0,0 +1,4 @@ @@ -77330,6 +79935,18 @@ +#endif + +#endif +--- a/src/libstdc++-v3/config/os/bsd/darwin/os_defines.h ++++ b/src/libstdc++-v3/config/os/bsd/darwin/os_defines.h +@@ -42,4 +42,9 @@ + // Static initializer macro is buggy in darwin, see libstdc++/51906 + #define _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC + ++// Configure checks for nanosleep fail on Darwin, but nanosleep and ++// sched_yield are always available, so use them. ++#define _GLIBCXX_USE_NANOSLEEP 1 ++#define _GLIBCXX_USE_SCHED_YIELD 1 ++ + #endif --- a/src/libstdc++-v3/configure.host +++ b/src/libstdc++-v3/configure.host @@ -94,6 +94,9 @@ @@ -77342,3 +79959,12 @@ alpha*) try_cpu=alpha ;; +--- a/src/libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc ++++ b/src/libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc +@@ -1,5 +1,5 @@ + // { dg-do compile } +-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* powerpc-ibm-aix* hppa*-hp-hpux11* } } ++// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* hppa*-hp-hpux11* } } + // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } + // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } + // { dg-require-cstdint "" } diff --git a/debian/patches/pr54974-linaro.diff b/debian/patches/pr54974-linaro.diff deleted file mode 100644 index eee38d3..0000000 --- a/debian/patches/pr54974-linaro.diff +++ /dev/null @@ -1,243 +0,0 @@ -# DP: Fix PR target/54974: Thumb literal pools don't handle PC rounding. - -Index: b/src/gcc/config/arm/arm.md -=================================================================== ---- a/src/gcc/config/arm/arm.md 2013-04-11 12:24:07.178055676 +0000 -+++ b/src/gcc/config/arm/arm.md 2013-04-11 12:24:07.142055507 +0000 -@@ -5058,7 +5058,7 @@ - (const_int 2) (const_int 4)) - (const_int 4)]) - (set_attr "type" "simple_alu_shift,load_byte") -- (set_attr "pool_range" "*,1020")] -+ (set_attr "pool_range" "*,1018")] - ) - - ;; This pattern will only be used when ldsh is not available -@@ -5464,7 +5464,7 @@ - (set_attr "type" "*,*,*,load2,store2") - (set_attr "arm_pool_range" "*,*,*,1020,*") - (set_attr "arm_neg_pool_range" "*,*,*,1004,*") -- (set_attr "thumb2_pool_range" "*,*,*,4096,*") -+ (set_attr "thumb2_pool_range" "*,*,*,4094,*") - (set_attr "thumb2_neg_pool_range" "*,*,*,0,*")] - ) - -@@ -5604,7 +5604,7 @@ - [(set_attr "length" "4,4,6,2,2,6,4,4") - (set_attr "type" "*,*,*,load2,store2,load2,store2,*") - (set_attr "insn" "*,mov,*,*,*,*,*,mov") -- (set_attr "pool_range" "*,*,*,*,*,1020,*,*")] -+ (set_attr "pool_range" "*,*,*,*,*,1018,*,*")] - ) - - (define_expand "movsi" -@@ -5764,7 +5764,7 @@ - mov\\t%0, %1" - [(set_attr "length" "2,2,4,4,2,2,2,2,2") - (set_attr "type" "*,*,*,*,load1,store1,load1,store1,*") -- (set_attr "pool_range" "*,*,*,*,*,*,1020,*,*") -+ (set_attr "pool_range" "*,*,*,*,*,*,1018,*,*") - (set_attr "conds" "set,clob,*,*,nocond,nocond,nocond,nocond,nocond")]) - - (define_split -@@ -5857,7 +5857,7 @@ - (match_dup 2)] UNSPEC_PIC_BASE))] - "operands[3] = TARGET_THUMB ? GEN_INT (4) : GEN_INT (8);" - [(set_attr "type" "load1,load1,load1") -- (set_attr "pool_range" "4096,4096,1024") -+ (set_attr "pool_range" "4096,4094,1022") - (set_attr "neg_pool_range" "4084,0,0") - (set_attr "arch" "a,t2,t1") - (set_attr "length" "8,6,4")] -@@ -5873,7 +5873,10 @@ - "TARGET_32BIT && flag_pic" - "ldr%?\\t%0, %1" - [(set_attr "type" "load1") -- (set_attr "pool_range" "4096") -+ (set (attr "pool_range") -+ (if_then_else (eq_attr "is_thumb" "no") -+ (const_int 4096) -+ (const_int 4094))) - (set (attr "neg_pool_range") - (if_then_else (eq_attr "is_thumb" "no") - (const_int 4084) -@@ -5886,7 +5889,7 @@ - "TARGET_THUMB1 && flag_pic" - "ldr\\t%0, %1" - [(set_attr "type" "load1") -- (set (attr "pool_range") (const_int 1024))] -+ (set (attr "pool_range") (const_int 1018))] - ) - - (define_insn "pic_add_dot_plus_four" -@@ -6691,7 +6694,7 @@ - [(set_attr "length" "2") - (set_attr "type" "*,load1,store1,*,*") - (set_attr "insn" "mov,*,*,mov,mov") -- (set_attr "pool_range" "*,1020,*,*,*") -+ (set_attr "pool_range" "*,1018,*,*,*") - (set_attr "conds" "clob,nocond,nocond,nocond,nocond")]) - - (define_expand "movsf" -@@ -6746,7 +6749,8 @@ - [(set_attr "predicable" "yes") - (set_attr "type" "*,load1,store1") - (set_attr "insn" "mov,*,*") -- (set_attr "pool_range" "*,4096,*") -+ (set_attr "arm_pool_range" "*,4096,*") -+ (set_attr "thumb2_pool_range" "*,4094,*") - (set_attr "arm_neg_pool_range" "*,4084,*") - (set_attr "thumb2_neg_pool_range" "*,0,*")] - ) -@@ -6768,7 +6772,7 @@ - mov\\t%0, %1" - [(set_attr "length" "2") - (set_attr "type" "*,load1,store1,load1,store1,*,*") -- (set_attr "pool_range" "*,*,*,1020,*,*,*") -+ (set_attr "pool_range" "*,*,*,1018,*,*,*") - (set_attr "insn" "*,*,*,*,*,mov,mov") - (set_attr "conds" "clob,nocond,nocond,nocond,nocond,nocond,nocond")] - ) -@@ -6857,7 +6861,8 @@ - " - [(set_attr "length" "8,12,16,8,8") - (set_attr "type" "*,*,*,load2,store2") -- (set_attr "pool_range" "*,*,*,1020,*") -+ (set_attr "arm_pool_range" "*,*,*,1020,*") -+ (set_attr "thumb2_pool_range" "*,*,*,1018,*") - (set_attr "arm_neg_pool_range" "*,*,*,1004,*") - (set_attr "thumb2_neg_pool_range" "*,*,*,0,*")] - ) -@@ -6900,7 +6905,7 @@ - [(set_attr "length" "4,2,2,6,4,4") - (set_attr "type" "*,load2,store2,load2,store2,*") - (set_attr "insn" "*,*,*,*,*,mov") -- (set_attr "pool_range" "*,*,*,1020,*,*")] -+ (set_attr "pool_range" "*,*,*,1018,*,*")] - ) - - (define_expand "movxf" -Index: b/src/gcc/config/arm/neon.md -=================================================================== ---- a/src/gcc/config/arm/neon.md 2013-04-11 12:24:07.178055676 +0000 -+++ b/src/gcc/config/arm/neon.md 2013-04-11 12:24:07.174055671 +0000 -@@ -197,7 +197,8 @@ - (set_attr "type" "*,f_stored,*,f_loadd,*,*,alu_reg,load2,store2") - (set_attr "insn" "*,*,*,*,*,*,mov,*,*") - (set_attr "length" "4,4,4,4,4,4,8,8,8") -- (set_attr "pool_range" "*,*,*,1020,*,*,*,1020,*") -+ (set_attr "arm_pool_range" "*,*,*,1020,*,*,*,1020,*") -+ (set_attr "thumb2_pool_range" "*,*,*,1018,*,*,*,1018,*") - (set_attr "neg_pool_range" "*,*,*,1004,*,*,*,1004,*")]) - - (define_insn "*neon_mov<mode>" -@@ -242,7 +243,8 @@ - (set_attr "type" "*,*,*,*,*,*,alu_reg,load4,store4") - (set_attr "insn" "*,*,*,*,*,*,mov,*,*") - (set_attr "length" "4,8,4,8,8,8,16,8,16") -- (set_attr "pool_range" "*,*,*,1020,*,*,*,1020,*") -+ (set_attr "arm_pool_range" "*,*,*,1020,*,*,*,1020,*") -+ (set_attr "thumb2_pool_range" "*,*,*,1018,*,*,*,1018,*") - (set_attr "neg_pool_range" "*,*,*,996,*,*,*,996,*")]) - - (define_expand "movti" -Index: b/src/gcc/config/arm/thumb2.md -=================================================================== ---- a/src/gcc/config/arm/thumb2.md 2013-04-11 12:24:07.178055676 +0000 -+++ b/src/gcc/config/arm/thumb2.md 2013-04-11 12:24:07.174055671 +0000 -@@ -184,7 +184,7 @@ - str%?\\t%1, %0" - [(set_attr "type" "*,*,simple_alu_imm,*,load1,load1,store1,store1") - (set_attr "predicable" "yes") -- (set_attr "pool_range" "*,*,*,*,1020,4096,*,*") -+ (set_attr "pool_range" "*,*,*,*,1018,4094,*,*") - (set_attr "neg_pool_range" "*,*,*,*,0,0,*,*")] - ) - -@@ -219,7 +219,7 @@ - ldr%(h%)\\t%0, %1\\t%@ movhi" - [(set_attr "type" "*,*,store1,load1") - (set_attr "predicable" "yes") -- (set_attr "pool_range" "*,*,*,4096") -+ (set_attr "pool_range" "*,*,*,4094") - (set_attr "neg_pool_range" "*,*,*,250")] - ) - -@@ -572,7 +572,7 @@ - ldr%(sb%)\\t%0, %1" - [(set_attr "type" "simple_alu_shift,load_byte") - (set_attr "predicable" "yes") -- (set_attr "pool_range" "*,4096") -+ (set_attr "pool_range" "*,4094") - (set_attr "neg_pool_range" "*,250")] - ) - -@@ -585,7 +585,7 @@ - ldr%(h%)\\t%0, %1" - [(set_attr "type" "simple_alu_shift,load_byte") - (set_attr "predicable" "yes") -- (set_attr "pool_range" "*,4096") -+ (set_attr "pool_range" "*,4094") - (set_attr "neg_pool_range" "*,250")] - ) - -@@ -598,7 +598,7 @@ - ldr%(b%)\\t%0, %1\\t%@ zero_extendqisi2" - [(set_attr "type" "simple_alu_shift,load_byte") - (set_attr "predicable" "yes") -- (set_attr "pool_range" "*,4096") -+ (set_attr "pool_range" "*,4094") - (set_attr "neg_pool_range" "*,250")] - ) - -Index: b/src/gcc/config/arm/vfp.md -=================================================================== ---- a/src/gcc/config/arm/vfp.md 2013-04-11 12:24:07.178055676 +0000 -+++ b/src/gcc/config/arm/vfp.md 2013-04-11 12:24:07.174055671 +0000 -@@ -130,7 +130,7 @@ - (set_attr "type" "*,*,*,*,load1,load1,store1,store1,r_2_f,f_2_r,fcpys,f_loads,f_stores") - (set_attr "neon_type" "*,*,*,*,*,*,*,*,neon_mcr,neon_mrc,neon_vmov,*,*") - (set_attr "insn" "mov,mov,mvn,mov,*,*,*,*,*,*,*,*,*") -- (set_attr "pool_range" "*,*,*,*,1020,4096,*,*,*,*,*,1020,*") -+ (set_attr "pool_range" "*,*,*,*,1018,4094,*,*,*,*,*,1018,*") - (set_attr "neg_pool_range" "*,*,*,*, 0, 0,*,*,*,*,*,1008,*")] - ) - -@@ -183,7 +183,8 @@ - (const_int 8) - (const_int 4))] - (const_int 4))) -- (set_attr "pool_range" "*,*,*,*,1020,4096,*,*,*,*,1020,*") -+ (set_attr "arm_pool_range" "*,*,*,*,1020,4096,*,*,*,*,1020,*") -+ (set_attr "thumb2_pool_range" "*,*,*,*,1018,4094,*,*,*,*,1018,*") - (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*") - (set_attr "arch" "t2,any,any,any,a,t2,any,any,any,any,any,any")] - ) -@@ -230,7 +231,8 @@ - * 4")] - (const_int 4))) - (set_attr "predicable" "yes") -- (set_attr "pool_range" "*,*,*,*,1020,4096,*,*,*,*,1020,*") -+ (set_attr "arm_pool_range" "*,*,*,*,1018,4094,*,*,*,*,1018,*") -+ (set_attr "thumb2_pool_range" "*,*,*,*,1018,4094,*,*,*,*,1018,*") - (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*") - (set (attr "ce_count") - (symbol_ref "get_attr_length (insn) / 4")) -@@ -419,7 +421,7 @@ - "r_2_f,f_2_r,fconsts,f_loads,f_stores,load1,store1,fcpys,*") - (set_attr "neon_type" "neon_mcr,neon_mrc,*,*,*,*,*,neon_vmov,*") - (set_attr "insn" "*,*,*,*,*,*,*,*,mov") -- (set_attr "pool_range" "*,*,*,1020,*,4092,*,*,*") -+ (set_attr "pool_range" "*,*,*,1018,*,4090,*,*,*") - (set_attr "neg_pool_range" "*,*,*,1008,*,0,*,*,*")] - ) - -@@ -513,7 +515,7 @@ - (const_int 8) - (const_int 4))] - (const_int 4))) -- (set_attr "pool_range" "*,*,*,1020,*,4096,*,*,*") -+ (set_attr "pool_range" "*,*,*,1018,*,4094,*,*,*") - (set_attr "neg_pool_range" "*,*,*,1008,*,0,*,*,*")] - ) - diff --git a/debian/patches/pr54974.diff b/debian/patches/pr54974.diff deleted file mode 100644 index 4fe0a82..0000000 --- a/debian/patches/pr54974.diff +++ /dev/null @@ -1,243 +0,0 @@ -# DP: Fix PR target/54974: Thumb literal pools don't handle PC rounding. - -Index: b/src/gcc/config/arm/arm.md -=================================================================== ---- a/src/gcc/config/arm/arm.md -+++ b/src/gcc/config/arm/arm.md -@@ -4833,7 +4833,7 @@ - (const_int 2) (const_int 4)) - (const_int 4)]) - (set_attr "type" "alu_shift,load_byte") -- (set_attr "pool_range" "*,1020")] -+ (set_attr "pool_range" "*,1018")] - ) - - ;; This pattern will only be used when ldsh is not available -@@ -5239,7 +5239,7 @@ - (set_attr "type" "*,*,*,load2,store2") - (set_attr "arm_pool_range" "*,*,*,1020,*") - (set_attr "arm_neg_pool_range" "*,*,*,1004,*") -- (set_attr "thumb2_pool_range" "*,*,*,4096,*") -+ (set_attr "thumb2_pool_range" "*,*,*,4094,*") - (set_attr "thumb2_neg_pool_range" "*,*,*,0,*")] - ) - -@@ -5379,7 +5379,7 @@ - [(set_attr "length" "4,4,6,2,2,6,4,4") - (set_attr "type" "*,*,*,load2,store2,load2,store2,*") - (set_attr "insn" "*,mov,*,*,*,*,*,mov") -- (set_attr "pool_range" "*,*,*,*,*,1020,*,*")] -+ (set_attr "pool_range" "*,*,*,*,*,1018,*,*")] - ) - - (define_expand "movsi" -@@ -5539,7 +5539,7 @@ - mov\\t%0, %1" - [(set_attr "length" "2,2,4,4,2,2,2,2,2") - (set_attr "type" "*,*,*,*,load1,store1,load1,store1,*") -- (set_attr "pool_range" "*,*,*,*,*,*,1020,*,*") -+ (set_attr "pool_range" "*,*,*,*,*,*,1018,*,*") - (set_attr "conds" "set,clob,*,*,nocond,nocond,nocond,nocond,nocond")]) - - (define_split -@@ -5632,7 +5632,7 @@ - (match_dup 2)] UNSPEC_PIC_BASE))] - "operands[3] = TARGET_THUMB ? GEN_INT (4) : GEN_INT (8);" - [(set_attr "type" "load1,load1,load1") -- (set_attr "pool_range" "4096,4096,1024") -+ (set_attr "pool_range" "4096,4094,1022") - (set_attr "neg_pool_range" "4084,0,0") - (set_attr "arch" "a,t2,t1") - (set_attr "length" "8,6,4")] -@@ -5648,7 +5648,10 @@ - "TARGET_32BIT && flag_pic" - "ldr%?\\t%0, %1" - [(set_attr "type" "load1") -- (set_attr "pool_range" "4096") -+ (set (attr "pool_range") -+ (if_then_else (eq_attr "is_thumb" "no") -+ (const_int 4096) -+ (const_int 4094))) - (set (attr "neg_pool_range") - (if_then_else (eq_attr "is_thumb" "no") - (const_int 4084) -@@ -5661,7 +5664,7 @@ - "TARGET_THUMB1 && flag_pic" - "ldr\\t%0, %1" - [(set_attr "type" "load1") -- (set (attr "pool_range") (const_int 1024))] -+ (set (attr "pool_range") (const_int 1018))] - ) - - (define_insn "pic_add_dot_plus_four" -@@ -6456,7 +6459,7 @@ - [(set_attr "length" "2") - (set_attr "type" "*,load1,store1,*,*") - (set_attr "insn" "mov,*,*,mov,mov") -- (set_attr "pool_range" "*,1020,*,*,*") -+ (set_attr "pool_range" "*,1018,*,*,*") - (set_attr "conds" "clob,nocond,nocond,nocond,nocond")]) - - (define_expand "movsf" -@@ -6511,7 +6514,8 @@ - [(set_attr "predicable" "yes") - (set_attr "type" "*,load1,store1") - (set_attr "insn" "mov,*,*") -- (set_attr "pool_range" "*,4096,*") -+ (set_attr "arm_pool_range" "*,4096,*") -+ (set_attr "thumb2_pool_range" "*,4094,*") - (set_attr "arm_neg_pool_range" "*,4084,*") - (set_attr "thumb2_neg_pool_range" "*,0,*")] - ) -@@ -6533,7 +6537,7 @@ - mov\\t%0, %1" - [(set_attr "length" "2") - (set_attr "type" "*,load1,store1,load1,store1,*,*") -- (set_attr "pool_range" "*,*,*,1020,*,*,*") -+ (set_attr "pool_range" "*,*,*,1018,*,*,*") - (set_attr "insn" "*,*,*,*,*,mov,mov") - (set_attr "conds" "clob,nocond,nocond,nocond,nocond,nocond,nocond")] - ) -@@ -6622,7 +6626,8 @@ - " - [(set_attr "length" "8,12,16,8,8") - (set_attr "type" "*,*,*,load2,store2") -- (set_attr "pool_range" "*,*,*,1020,*") -+ (set_attr "arm_pool_range" "*,*,*,1020,*") -+ (set_attr "thumb2_pool_range" "*,*,*,1018,*") - (set_attr "arm_neg_pool_range" "*,*,*,1004,*") - (set_attr "thumb2_neg_pool_range" "*,*,*,0,*")] - ) -@@ -6665,7 +6670,7 @@ - [(set_attr "length" "4,2,2,6,4,4") - (set_attr "type" "*,load2,store2,load2,store2,*") - (set_attr "insn" "*,*,*,*,*,mov") -- (set_attr "pool_range" "*,*,*,1020,*,*")] -+ (set_attr "pool_range" "*,*,*,1018,*,*")] - ) - - (define_expand "movxf" -Index: b/src/gcc/config/arm/neon.md -=================================================================== ---- a/src/gcc/config/arm/neon.md -+++ b/src/gcc/config/arm/neon.md -@@ -201,7 +201,8 @@ - (set_attr "type" "*,f_stored,*,f_loadd,*,*,alu,load2,store2") - (set_attr "insn" "*,*,*,*,*,*,mov,*,*") - (set_attr "length" "4,4,4,4,4,4,8,8,8") -- (set_attr "pool_range" "*,*,*,1020,*,*,*,1020,*") -+ (set_attr "arm_pool_range" "*,*,*,1020,*,*,*,1020,*") -+ (set_attr "thumb2_pool_range" "*,*,*,1018,*,*,*,1018,*") - (set_attr "neg_pool_range" "*,*,*,1004,*,*,*,1004,*")]) - - (define_insn "*neon_mov<mode>" -@@ -246,7 +247,8 @@ - (set_attr "type" "*,*,*,*,*,*,alu,load4,store4") - (set_attr "insn" "*,*,*,*,*,*,mov,*,*") - (set_attr "length" "4,8,4,8,8,8,16,8,16") -- (set_attr "pool_range" "*,*,*,1020,*,*,*,1020,*") -+ (set_attr "arm_pool_range" "*,*,*,1020,*,*,*,1020,*") -+ (set_attr "thumb2_pool_range" "*,*,*,1018,*,*,*,1018,*") - (set_attr "neg_pool_range" "*,*,*,996,*,*,*,996,*")]) - - (define_expand "movti" -Index: b/src/gcc/config/arm/thumb2.md -=================================================================== ---- a/src/gcc/config/arm/thumb2.md -+++ b/src/gcc/config/arm/thumb2.md -@@ -182,7 +182,7 @@ - str%?\\t%1, %0" - [(set_attr "type" "*,*,*,*,load1,load1,store1,store1") - (set_attr "predicable" "yes") -- (set_attr "pool_range" "*,*,*,*,1020,4096,*,*") -+ (set_attr "pool_range" "*,*,*,*,1018,4094,*,*") - (set_attr "neg_pool_range" "*,*,*,*,0,0,*,*")] - ) - -@@ -217,7 +217,7 @@ - ldr%(h%)\\t%0, %1\\t%@ movhi" - [(set_attr "type" "*,*,store1,load1") - (set_attr "predicable" "yes") -- (set_attr "pool_range" "*,*,*,4096") -+ (set_attr "pool_range" "*,*,*,4094") - (set_attr "neg_pool_range" "*,*,*,250")] - ) - -@@ -570,7 +570,7 @@ - ldr%(sb%)\\t%0, %1" - [(set_attr "type" "alu_shift,load_byte") - (set_attr "predicable" "yes") -- (set_attr "pool_range" "*,4096") -+ (set_attr "pool_range" "*,4094") - (set_attr "neg_pool_range" "*,250")] - ) - -@@ -583,7 +583,7 @@ - ldr%(h%)\\t%0, %1" - [(set_attr "type" "alu_shift,load_byte") - (set_attr "predicable" "yes") -- (set_attr "pool_range" "*,4096") -+ (set_attr "pool_range" "*,4094") - (set_attr "neg_pool_range" "*,250")] - ) - -@@ -596,7 +596,7 @@ - ldr%(b%)\\t%0, %1\\t%@ zero_extendqisi2" - [(set_attr "type" "alu_shift,load_byte") - (set_attr "predicable" "yes") -- (set_attr "pool_range" "*,4096") -+ (set_attr "pool_range" "*,4094") - (set_attr "neg_pool_range" "*,250")] - ) - -Index: b/src/gcc/config/arm/vfp.md -=================================================================== ---- a/src/gcc/config/arm/vfp.md -+++ b/src/gcc/config/arm/vfp.md -@@ -126,7 +126,7 @@ - [(set_attr "predicable" "yes") - (set_attr "type" "*,*,*,*,load1,load1,store1,store1,r_2_f,f_2_r,fcpys,f_loads,f_stores") - (set_attr "insn" "mov,mov,mvn,mov,*,*,*,*,*,*,*,*,*") -- (set_attr "pool_range" "*,*,*,*,1020,4096,*,*,*,*,*,1020,*") -+ (set_attr "pool_range" "*,*,*,*,1018,4094,*,*,*,*,*,1018,*") - (set_attr "neg_pool_range" "*,*,*,*, 0, 0,*,*,*,*,*,1008,*")] - ) - -@@ -177,7 +177,8 @@ - (const_int 8) - (const_int 4))] - (const_int 4))) -- (set_attr "pool_range" "*,*,*,*,1020,4096,*,*,*,*,1020,*") -+ (set_attr "arm_pool_range" "*,*,*,*,1020,4096,*,*,*,*,1020,*") -+ (set_attr "thumb2_pool_range" "*,*,*,*,1018,4094,*,*,*,*,1018,*") - (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*") - (set_attr "arch" "t2,any,any,any,a,t2,any,any,any,any,any,any")] - ) -@@ -222,7 +223,8 @@ - * 4")] - (const_int 4))) - (set_attr "predicable" "yes") -- (set_attr "pool_range" "*,*,*,*,1020,4096,*,*,*,*,1020,*") -+ (set_attr "arm_pool_range" "*,*,*,*,1018,4094,*,*,*,*,1018,*") -+ (set_attr "thumb2_pool_range" "*,*,*,*,1018,4094,*,*,*,*,1018,*") - (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*") - (set (attr "ce_count") - (symbol_ref "get_attr_length (insn) / 4")) -@@ -409,7 +411,7 @@ - (set_attr "type" - "r_2_f,f_2_r,fconsts,f_loads,f_stores,load1,store1,fcpys,*") - (set_attr "insn" "*,*,*,*,*,*,*,*,mov") -- (set_attr "pool_range" "*,*,*,1020,*,4092,*,*,*") -+ (set_attr "pool_range" "*,*,*,1018,*,4090,*,*,*") - (set_attr "neg_pool_range" "*,*,*,1008,*,0,*,*,*")] - ) - -@@ -501,7 +503,7 @@ - (const_int 8) - (const_int 4))] - (const_int 4))) -- (set_attr "pool_range" "*,*,*,1020,*,4096,*,*,*") -+ (set_attr "pool_range" "*,*,*,1018,*,4094,*,*,*") - (set_attr "neg_pool_range" "*,*,*,1008,*,0,*,*,*")] - ) - diff --git a/debian/patches/svn-updates-linaro.diff b/debian/patches/svn-updates-linaro.diff index b2e28e3..e529ca8 100644 --- a/debian/patches/svn-updates-linaro.diff +++ b/debian/patches/svn-updates-linaro.diff @@ -1,14 +1,413 @@ -# DP: updates from the 4.7 branch upto 20130404 (r197476). +# DP: updates from the 4.7 branch upto 20130517 (r199025). last_updated() { cat > ${dir}LAST_UPDATED <<EOF -Thu Apr 4 12:59:07 CEST 2013 -Thu Apr 4 10:59:07 UTC 2013 (revision 197476) +Fri May 17 19:37:13 CEST 2013 +Fri May 17 17:37:13 UTC 2013 (revision 199025) EOF } -LANG=C svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@196272 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch \ +LANG=C svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@198701 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch \ | sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \ | awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0' +Index: libstdc++-v3/src/c++11/system_error.cc +=================================================================== +--- a/src/libstdc++-v3/src/c++11/system_error.cc (revision ++++ b/src/libstdc++-v3/src/c++11/system_error.cc (revision +@@ -62,8 +62,8 @@ + } + }; + +- const generic_error_category generic_category_instance; +- const system_error_category system_category_instance; ++ const generic_error_category generic_category_instance{}; ++ const system_error_category system_category_instance{}; + } + + namespace std _GLIBCXX_VISIBILITY(default) +Index: libstdc++-v3/src/c++11/future.cc +=================================================================== +--- a/src/libstdc++-v3/src/c++11/future.cc (revision ++++ b/src/libstdc++-v3/src/c++11/future.cc (revision +@@ -60,7 +60,7 @@ + const future_error_category& + __future_category_instance() noexcept + { +- static const future_error_category __fec; ++ static const future_error_category __fec{}; + return __fec; + } + } +Index: libstdc++-v3/include/bits/basic_string.h +=================================================================== +--- a/src/libstdc++-v3/include/bits/basic_string.h (revision ++++ b/src/libstdc++-v3/include/bits/basic_string.h (revision +@@ -2764,10 +2764,9 @@ + * + * Stores characters from @a __is into @a __str until @a __delim is + * found, the end of the stream is encountered, or str.max_size() +- * is reached. If is.width() is non-zero, that is the limit on the +- * number of characters stored into @a __str. Any previous +- * contents of @a __str are erased. If @a __delim was encountered, +- * it is extracted but not stored into @a __str. ++ * is reached. Any previous contents of @a __str are erased. If ++ * @a __delim is encountered, it is extracted but not stored into ++ * @a __str. + */ + template<typename _CharT, typename _Traits, typename _Alloc> + basic_istream<_CharT, _Traits>& +@@ -2782,10 +2781,9 @@ + * + * Stores characters from is into @a __str until '\n' is + * found, the end of the stream is encountered, or str.max_size() +- * is reached. If __is.width() is non-zero, that is the limit on +- * the number of characters stored into @a __str. Any previous +- * contents of @a __str are erased. If end of line was +- * encountered, it is extracted but not stored into @a __str. ++ * is reached. Any previous contents of @a __str are erased. If ++ * end of line is encountered, it is extracted but not stored into ++ * @a __str. + */ + template<typename _CharT, typename _Traits, typename _Alloc> + inline basic_istream<_CharT, _Traits>& +Index: libstdc++-v3/ChangeLog +=================================================================== +--- a/src/libstdc++-v3/ChangeLog (revision ++++ b/src/libstdc++-v3/ChangeLog (revision +@@ -1,3 +1,14 @@ ++2013-05-15 Jonathan Wakely <jwakely.gcc@gmail.com> ++ ++ * include/bits/basic_string.h (getline): Fix doxygen comments. ++ ++2013-05-14 Evgeniy Stepanov <eugenis@google.com> ++ ++ * src/c++11/system_error.cc (generic_category_instance): Add ++ initializer. ++ (system_category_instance): Likewise. ++ * src/c++11/future.cc (__fec): Likewise. ++ + 2013-04-15 Jack Howarth <howarth@bromo.med.uc.edu> + + Backport from mainline +Index: gcc/DATESTAMP +=================================================================== +--- a/src/gcc/DATESTAMP (revision ++++ b/src/gcc/DATESTAMP (revision +@@ -1 +1 @@ +-20130508 ++20130517 +Index: gcc/ChangeLog +=================================================================== +--- a/src/gcc/ChangeLog (revision ++++ b/src/gcc/ChangeLog (revision +@@ -1,3 +1,68 @@ ++2013-05-14 Richard Biener <rguenther@suse.de> ++ ++ PR gcov-profile/57269 ++ Backport from mainline ++ 2012-06-30 Nathan Sidwell <nathan@acm.org> ++ ++ * coverage.c (coverage_init): Read counts file before writing ++ graph header. ++ ++2013-05-13 Uros Bizjak <ubizjak@gmail.com> ++ ++ PR target/57264 ++ Backport from mainline ++ 2013-01-22 Jakub Jelinek <jakub@redhat.com> ++ ++ PR target/55686 ++ * config/i386/i386.md (UNSPEC_STOS): New. ++ (strset_singleop, *strsetdi_rex_1, *strsetsi_1, *strsethi_1, ++ *strsetqi_1): Add UNSPEC_STOS. ++ ++2013-05-10 Joey Ye <joey.ye@arm.com> ++ ++ Backport from mainline ++ 2012-11-29 Matthew Gretton-Dann <matthew.gretton-dann@linaro.org> ++ ++ PR target/54974 ++ * config/arm/arm.md (thumb2_pool_range, pool_range): Add comment on ++ Thumb pool ranges. ++ (thumb1_extendhisi2): Reduce Thumb pool range. ++ (arm_movdi): Likewise. ++ (thumb1_movdi_insn): Likewise. ++ (thumb1_movsi_insn): Likewise. ++ (pic_load_addr_unified): Likewise. ++ (pic_load_addr_32bit): Likewise. ++ (pic_load_addr_thumb1): Likewise. ++ (thumb1_movhf): Likewise. ++ (arm_movsf_soft_insn): Likewise. ++ (thumb1_movsf_soft_insn): Likewise. ++ (movdf_soft_insn): Likewise. ++ (thumb1_movdf_soft_insn): Likewise. ++ * config/arm/neon.md (*neon_mov<mode>): Likewise. ++ (*neon_mov<mode>): Likwise. ++ * config/arm/thumb2.md: (*thumb2_movsi_insn): Likewise. ++ (*thumb2_movhi_insn): Likewise. ++ (*thumb2_extendqisi_v6): Likewise. ++ (*thumb2_zero_extendqisi_v6): Likewise. ++ (*thumb2_zero_extendqisi2_v6): Likewise. ++ * config/arm/vfp.md: (*thumb2_movsi_vfp): Likewise. ++ (*movdi_vfp): Likewise. ++ (*movdi_vfp_cortexa8): Likewise. ++ (*thumb2_movsf_vfp): Likewise. ++ (*thumb2_movdf_vfp): Likewise. ++ ++2013-05-10 Sebastian Huber <sebastian.huber@embedded-brains.de> ++ ++ * config/arm/t-rtems-eabi: Remove mthumb/march=armv7 multilib. ++ Add mthumb/march=armv7-a multilib. ++ Add mthumb/march=armv7-r multilib. ++ Add mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard multilib. ++ ++2013-05-10 Ralf Corsépius <ralf.corsepius@rtems.org> ++ ++ PR target/57237 ++ * config/v850/t-rtems: Add more multilibs. ++ + 2013-05-07 Michael Meissner <meissner@linux.vnet.ibm.com> + + Backport from trunk +@@ -20,7 +85,7 @@ + 2013-04-25 Marek Polacek <polacek@redhat.com> + + PR tree-optimization/57066 +- * builtins.c (fold_builtin_logb): Return +Inf for -Inf. ++ * builtins.c (fold_builtin_logb): Return +Inf for -Inf. + + 2013-04-30 Uros Bizjak <ubizjak@gmail.com> + +Index: gcc/testsuite/gcc.target/i386/pr57264.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/i386/pr57264.c (revision ++++ b/src/gcc/testsuite/gcc.target/i386/pr57264.c (revision +@@ -0,0 +1,18 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O1 -mcld" } */ ++ ++void test (int x, int **pp) ++{ ++ while (x) ++ { ++ int *ip = *pp; ++ int *op = *pp; ++ while (*ip) ++ { ++ int v = *ip++; ++ *op++ = v + 1; ++ } ++ } ++} ++ ++/* { dg-final { scan-assembler-not "stosl" } } */ +Index: gcc/testsuite/ChangeLog +=================================================================== +--- a/src/gcc/testsuite/ChangeLog (revision ++++ b/src/gcc/testsuite/ChangeLog (revision +@@ -1,3 +1,8 @@ ++2013-05-13 Uros Bizjak <ubizjak@gmail.com> ++ ++ PR target/57264 ++ * gcc.target/i386/pr57264.c: New test. ++ + 2013-05-07 Michael Meissner <meissner@linux.vnet.ibm.com> + + Backport from trunk +Index: gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr8.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr8.C (revision ++++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr8.C (revision +@@ -0,0 +1,54 @@ ++// PR c++/57047 ++// { dg-require-effective-target c++11 } ++ ++template <typename> ++struct A; ++template <typename T> ++struct A <T &> ++{ ++ typedef T type; ++}; ++template <typename T> ++constexpr T && foo (typename A <T>::type & __t) noexcept ++{ ++ return static_cast <T &&>(__t); ++} ++template <class T1, class T2> ++struct B ++{ ++ T1 t1; ++ T2 t2; ++ template <class U> ++ constexpr B (U && __x, const T2 & __y) : t1 (foo <U> (__x)), t2 (__y) {} ++}; ++static inline constexpr bool ++fn1 (const char c) ++{ ++ return ('0' <= c) && (c <= '9'); ++} ++static inline constexpr bool ++fn2 (const char c) ++{ ++ return (('A' <= c) && (c <= 'Z')) || (('a' <= c) && (c <= 'z')); ++} ++static constexpr bool ++fn3 (const char *const x) ++{ ++ return (x[1] == '\0' && x[0] == ']') ? true : (!fn1 (x[0])) ? false : fn3 (&x[1]); ++} ++static constexpr bool ++fn4 (const char *const x) ++{ ++ return (x[0] == '\0') ? fn3 (&x[1]) : fn4 (&x[1]); ++} ++static inline constexpr bool ++fn5 (const char *const x) ++{ ++ return fn2 (x[0]) ? fn4 (x) : false; ++} ++struct C final ++{ ++ constexpr C (const char *const t1) : c (fn5 (t1) ? 199 : 69) {} ++ unsigned c; ++}; ++B <C, C> p ("a", "b"); +Index: gcc/cp/ChangeLog +=================================================================== +--- a/src/gcc/cp/ChangeLog (revision ++++ b/src/gcc/cp/ChangeLog (revision +@@ -1,3 +1,8 @@ ++2013-05-09 Jason Merrill <jason@redhat.com> ++ ++ PR c++/57047 ++ * semantics.c (cxx_fold_indirect_ref): Fix thinko. ++ + 2013-04-21 Eric Botcazou <ebotcazou@adacore.com> + + * parser.c (cp_parser_late_return_type_opt): Fix C++ism. +Index: gcc/cp/semantics.c +=================================================================== +--- a/src/gcc/cp/semantics.c (revision ++++ b/src/gcc/cp/semantics.c (revision +@@ -7412,15 +7412,17 @@ + } + } + } +- /* *(foo *)fooarrptreturn> (*fooarrptr)[0] */ ++ /* *(foo *)fooarrptr => (*fooarrptr)[0] */ + else if (TREE_CODE (TREE_TYPE (subtype)) == ARRAY_TYPE + && (same_type_ignoring_top_level_qualifiers_p + (type, TREE_TYPE (TREE_TYPE (subtype))))) + { + tree type_domain; + tree min_val = size_zero_node; +- sub = cxx_fold_indirect_ref (loc, TREE_TYPE (subtype), sub, NULL); +- if (!sub) ++ tree newsub = cxx_fold_indirect_ref (loc, TREE_TYPE (subtype), sub, NULL); ++ if (newsub) ++ sub = newsub; ++ else + sub = build1_loc (loc, INDIRECT_REF, TREE_TYPE (subtype), sub); + type_domain = TYPE_DOMAIN (TREE_TYPE (sub)); + if (type_domain && TYPE_MIN_VALUE (type_domain)) +Index: gcc/coverage.c +=================================================================== +--- a/src/gcc/coverage.c (revision ++++ b/src/gcc/coverage.c (revision +@@ -1099,6 +1099,9 @@ + memcpy (da_file_name + prefix_len, filename, len); + strcpy (da_file_name + prefix_len + len, GCOV_DATA_SUFFIX); + ++ if (flag_branch_probabilities) ++ read_counts_file (); ++ + /* Name of bbg file. */ + if (flag_test_coverage && !flag_compare_debug) + { +@@ -1118,9 +1121,6 @@ + gcov_write_unsigned (local_tick); + } + } +- +- if (flag_branch_probabilities) +- read_counts_file (); + } + + /* Performs file-level cleanup. Close graph file, generate coverage +Index: gcc/config/i386/i386.md +=================================================================== +--- a/src/gcc/config/i386/i386.md (revision ++++ b/src/gcc/config/i386/i386.md (revision +@@ -109,6 +109,7 @@ + UNSPEC_CALL_NEEDS_VZEROUPPER + UNSPEC_PAUSE + UNSPEC_LEA_ADDR ++ UNSPEC_STOS + + ;; For SSE/MMX support: + UNSPEC_FIX_NOTRUNC +@@ -15912,7 +15913,8 @@ + [(parallel [(set (match_operand 1 "memory_operand" "") + (match_operand 2 "register_operand" "")) + (set (match_operand 0 "register_operand" "") +- (match_operand 3 "" ""))])] ++ (match_operand 3 "" "")) ++ (unspec [(const_int 0)] UNSPEC_STOS)])] + "" + "ix86_current_function_needs_cld = 1;") + +@@ -15921,7 +15923,8 @@ + (match_operand:DI 2 "register_operand" "a")) + (set (match_operand:DI 0 "register_operand" "=D") + (plus:DI (match_dup 1) +- (const_int 8)))] ++ (const_int 8))) ++ (unspec [(const_int 0)] UNSPEC_STOS)] + "TARGET_64BIT + && !(fixed_regs[AX_REG] || fixed_regs[DI_REG])" + "stosq" +@@ -15934,7 +15937,8 @@ + (match_operand:SI 2 "register_operand" "a")) + (set (match_operand:P 0 "register_operand" "=D") + (plus:P (match_dup 1) +- (const_int 4)))] ++ (const_int 4))) ++ (unspec [(const_int 0)] UNSPEC_STOS)] + "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])" + "stos{l|d}" + [(set_attr "type" "str") +@@ -15946,7 +15950,8 @@ + (match_operand:HI 2 "register_operand" "a")) + (set (match_operand:P 0 "register_operand" "=D") + (plus:P (match_dup 1) +- (const_int 2)))] ++ (const_int 2))) ++ (unspec [(const_int 0)] UNSPEC_STOS)] + "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])" + "stosw" + [(set_attr "type" "str") +@@ -15958,7 +15963,8 @@ + (match_operand:QI 2 "register_operand" "a")) + (set (match_operand:P 0 "register_operand" "=D") + (plus:P (match_dup 1) +- (const_int 1)))] ++ (const_int 1))) ++ (unspec [(const_int 0)] UNSPEC_STOS)] + "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])" + "stosb" + [(set_attr "type" "str") +Index: gcc/config/v850/t-rtems +=================================================================== +--- a/src/gcc/config/v850/t-rtems (revision ++++ b/src/gcc/config/v850/t-rtems (revision +@@ -1,3 +1,7 @@ + # Custom multilibs for RTEMS + ++MULTILIB_OPTIONS = mv850/mv850e/mv850e2/mv850e2v3 ++MULTILIB_DIRNAMES = v850 v850e v850e2 v850e2v3 ++MULTILIB_MATCHES = mv850e=mv850e1 ++ + MULTILIB_MATCHES += mv850e=mv850es diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff index c51b662..6a3cbde 100644 --- a/debian/patches/svn-updates.diff +++ b/debian/patches/svn-updates.diff @@ -1,10 +1,10 @@ -# DP: updates from the 4.7 branch upto 20130506 (r198653). +# DP: updates from the 4.7 branch upto 20130517 (r199025). last_updated() { cat > ${dir}LAST_UPDATED <<EOF -Tue May 7 00:15:37 CEST 2013 -Mon May 6 22:15:37 UTC 2013 (revision 198653) +Fri May 17 19:37:13 CEST 2013 +Fri May 17 17:37:13 UTC 2013 (revision 199025) EOF } @@ -12,11 +12,82 @@ LANG=C svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_4_7_3_release svn://gcc.gnu.o | sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \ | awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0' +Index: libstdc++-v3/src/c++11/system_error.cc +=================================================================== +--- a/src/libstdc++-v3/src/c++11/system_error.cc (.../tags/gcc_4_7_3_release) ++++ b/src/libstdc++-v3/src/c++11/system_error.cc (.../branches/gcc-4_7-branch) +@@ -62,8 +62,8 @@ + } + }; + +- const generic_error_category generic_category_instance; +- const system_error_category system_category_instance; ++ const generic_error_category generic_category_instance{}; ++ const system_error_category system_category_instance{}; + } + + namespace std _GLIBCXX_VISIBILITY(default) +Index: libstdc++-v3/src/c++11/future.cc +=================================================================== +--- a/src/libstdc++-v3/src/c++11/future.cc (.../tags/gcc_4_7_3_release) ++++ b/src/libstdc++-v3/src/c++11/future.cc (.../branches/gcc-4_7-branch) +@@ -60,7 +60,7 @@ + const future_error_category& + __future_category_instance() noexcept + { +- static const future_error_category __fec; ++ static const future_error_category __fec{}; + return __fec; + } + } +Index: libstdc++-v3/include/bits/basic_string.h +=================================================================== +--- a/src/libstdc++-v3/include/bits/basic_string.h (.../tags/gcc_4_7_3_release) ++++ b/src/libstdc++-v3/include/bits/basic_string.h (.../branches/gcc-4_7-branch) +@@ -2764,10 +2764,9 @@ + * + * Stores characters from @a __is into @a __str until @a __delim is + * found, the end of the stream is encountered, or str.max_size() +- * is reached. If is.width() is non-zero, that is the limit on the +- * number of characters stored into @a __str. Any previous +- * contents of @a __str are erased. If @a __delim was encountered, +- * it is extracted but not stored into @a __str. ++ * is reached. Any previous contents of @a __str are erased. If ++ * @a __delim is encountered, it is extracted but not stored into ++ * @a __str. + */ + template<typename _CharT, typename _Traits, typename _Alloc> + basic_istream<_CharT, _Traits>& +@@ -2782,10 +2781,9 @@ + * + * Stores characters from is into @a __str until '\n' is + * found, the end of the stream is encountered, or str.max_size() +- * is reached. If __is.width() is non-zero, that is the limit on +- * the number of characters stored into @a __str. Any previous +- * contents of @a __str are erased. If end of line was +- * encountered, it is extracted but not stored into @a __str. ++ * is reached. Any previous contents of @a __str are erased. If ++ * end of line is encountered, it is extracted but not stored into ++ * @a __str. + */ + template<typename _CharT, typename _Traits, typename _Alloc> + inline basic_istream<_CharT, _Traits>& Index: libstdc++-v3/ChangeLog =================================================================== --- a/src/libstdc++-v3/ChangeLog (.../tags/gcc_4_7_3_release) +++ b/src/libstdc++-v3/ChangeLog (.../branches/gcc-4_7-branch) -@@ -1,3 +1,20 @@ +@@ -1,3 +1,31 @@ ++2013-05-15 Jonathan Wakely <jwakely.gcc@gmail.com> ++ ++ * include/bits/basic_string.h (getline): Fix doxygen comments. ++ ++2013-05-14 Evgeniy Stepanov <eugenis@google.com> ++ ++ * src/c++11/system_error.cc (generic_category_instance): Add ++ initializer. ++ (system_category_instance): Likewise. ++ * src/c++11/future.cc (__fec): Likewise. ++ +2013-04-15 Jack Howarth <howarth@bromo.med.uc.edu> + + Backport from mainline @@ -227,7 +298,7 @@ Index: gcc/DATESTAMP +++ b/src/gcc/DATESTAMP (.../branches/gcc-4_7-branch) @@ -1 +1 @@ -20130411 -+20130506 ++20130517 Index: gcc/builtins.c =================================================================== --- a/src/gcc/builtins.c (.../tags/gcc_4_7_3_release) @@ -254,14 +325,95 @@ Index: gcc/ChangeLog =================================================================== --- a/src/gcc/ChangeLog (.../tags/gcc_4_7_3_release) +++ b/src/gcc/ChangeLog (.../branches/gcc-4_7-branch) -@@ -1,3 +1,110 @@ +@@ -1,3 +1,191 @@ ++2013-05-14 Richard Biener <rguenther@suse.de> ++ ++ PR gcov-profile/57269 ++ Backport from mainline ++ 2012-06-30 Nathan Sidwell <nathan@acm.org> ++ ++ * coverage.c (coverage_init): Read counts file before writing ++ graph header. ++ ++2013-05-13 Uros Bizjak <ubizjak@gmail.com> ++ ++ PR target/57264 ++ Backport from mainline ++ 2013-01-22 Jakub Jelinek <jakub@redhat.com> ++ ++ PR target/55686 ++ * config/i386/i386.md (UNSPEC_STOS): New. ++ (strset_singleop, *strsetdi_rex_1, *strsetsi_1, *strsethi_1, ++ *strsetqi_1): Add UNSPEC_STOS. ++ ++2013-05-10 Joey Ye <joey.ye@arm.com> ++ ++ Backport from mainline ++ 2012-11-29 Matthew Gretton-Dann <matthew.gretton-dann@linaro.org> ++ ++ PR target/54974 ++ * config/arm/arm.md (thumb2_pool_range, pool_range): Add comment on ++ Thumb pool ranges. ++ (thumb1_extendhisi2): Reduce Thumb pool range. ++ (arm_movdi): Likewise. ++ (thumb1_movdi_insn): Likewise. ++ (thumb1_movsi_insn): Likewise. ++ (pic_load_addr_unified): Likewise. ++ (pic_load_addr_32bit): Likewise. ++ (pic_load_addr_thumb1): Likewise. ++ (thumb1_movhf): Likewise. ++ (arm_movsf_soft_insn): Likewise. ++ (thumb1_movsf_soft_insn): Likewise. ++ (movdf_soft_insn): Likewise. ++ (thumb1_movdf_soft_insn): Likewise. ++ * config/arm/neon.md (*neon_mov<mode>): Likewise. ++ (*neon_mov<mode>): Likwise. ++ * config/arm/thumb2.md: (*thumb2_movsi_insn): Likewise. ++ (*thumb2_movhi_insn): Likewise. ++ (*thumb2_extendqisi_v6): Likewise. ++ (*thumb2_zero_extendqisi_v6): Likewise. ++ (*thumb2_zero_extendqisi2_v6): Likewise. ++ * config/arm/vfp.md: (*thumb2_movsi_vfp): Likewise. ++ (*movdi_vfp): Likewise. ++ (*movdi_vfp_cortexa8): Likewise. ++ (*thumb2_movsf_vfp): Likewise. ++ (*thumb2_movdf_vfp): Likewise. ++ ++2013-05-10 Sebastian Huber <sebastian.huber@embedded-brains.de> ++ ++ * config/arm/t-rtems-eabi: Remove mthumb/march=armv7 multilib. ++ Add mthumb/march=armv7-a multilib. ++ Add mthumb/march=armv7-r multilib. ++ Add mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard multilib. ++ ++2013-05-10 Ralf Corsépius <ralf.corsepius@rtems.org> ++ ++ PR target/57237 ++ * config/v850/t-rtems: Add more multilibs. ++ ++2013-05-07 Michael Meissner <meissner@linux.vnet.ibm.com> ++ ++ Backport from trunk ++ 2013-05-03 Michael Meissner <meissner@linux.vnet.ibm.com> ++ ++ PR target/57150 ++ * config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Use DFmode ++ to save TFmode registers and DImode to save TImode registers for ++ caller save operations. ++ (HARD_REGNO_CALL_PART_CLOBBERED): TFmode and TDmode do not need to ++ mark being partially clobbered since they only use the first ++ double word. ++ ++ * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): TFmode ++ and TDmode only use the upper 64-bits of each VSX register. ++ +2013-05-03 Marek Polacek <polacek@redhat.com> + + Backport from mainline + 2013-04-25 Marek Polacek <polacek@redhat.com> + + PR tree-optimization/57066 -+ * builtins.c (fold_builtin_logb): Return +Inf for -Inf. ++ * builtins.c (fold_builtin_logb): Return +Inf for -Inf. + +2013-04-30 Uros Bizjak <ubizjak@gmail.com> + @@ -365,6 +517,57 @@ Index: gcc/ChangeLog 2013-04-11 Release Manager * GCC 4.7.3 released. +Index: gcc/testsuite/gcc.target/powerpc/pr57150.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/powerpc/pr57150.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr57150.c (.../branches/gcc-4_7-branch) +@@ -0,0 +1,23 @@ ++/* { dg-do compile { target { powerpc*-*-* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-require-effective-target powerpc_vsx_ok } */ ++/* { dg-options "-O3 -mcpu=power7 -fcaller-saves" } */ ++/* { dg-final { scan-assembler-not "lxvd2x" } } */ ++/* { dg-final { scan-assembler-not "lxvw4x" } } */ ++/* { dg-final { scan-assembler-not "lvx" } } */ ++/* { dg-final { scan-assembler-not "stxvd2x" } } */ ++/* { dg-final { scan-assembler-not "stxvw4x" } } */ ++/* { dg-final { scan-assembler-not "stvx" } } */ ++ ++/* Insure caller save on long double does not use VSX instructions. */ ++ ++extern long double modify (long double); ++ ++void ++sum (long double *ptr, long double value, unsigned long n) ++{ ++ unsigned long i; ++ ++ for (i = 0; i < n; i++) ++ ptr[i] += modify (value); ++} +Index: gcc/testsuite/gcc.target/i386/pr57264.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/i386/pr57264.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gcc.target/i386/pr57264.c (.../branches/gcc-4_7-branch) +@@ -0,0 +1,18 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O1 -mcld" } */ ++ ++void test (int x, int **pp) ++{ ++ while (x) ++ { ++ int *ip = *pp; ++ int *op = *pp; ++ while (*ip) ++ { ++ int v = *ip++; ++ *op++ = v + 1; ++ } ++ } ++} ++ ++/* { dg-final { scan-assembler-not "stosl" } } */ Index: gcc/testsuite/gcc.target/i386/pr44578.c =================================================================== --- a/src/gcc/testsuite/gcc.target/i386/pr44578.c (.../tags/gcc_4_7_3_release) @@ -461,6 +664,22 @@ Index: gcc/testsuite/gcc.target/sh/pr57108.c + + + } +Index: gcc/testsuite/gfortran.dg/size_kind_3.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/size_kind_3.f90 (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gfortran.dg/size_kind_3.f90 (.../branches/gcc-4_7-branch) +@@ -0,0 +1,11 @@ ++! { dg-do compile } ++! ++! PR fortran/57142 ++! ++integer :: B(huge(1)+3_8,2_8) ++integer(8) :: var1(2), var2, var3 ++ ++var1 = shape(B) ! { dg-error "SHAPE overflows its kind" } ++var2 = size(B) ! { dg-error "SIZE overflows its kind" } ++var3 = size(B,dim=1) ! { dg-error "SIZE overflows its kind" } ++end Index: gcc/testsuite/gfortran.dg/transfer_check_4.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/transfer_check_4.f90 (.../tags/gcc_4_7_3_release) @@ -612,6 +831,28 @@ Index: gcc/testsuite/gfortran.dg/namelist_79.f90 + if (.not. tracer(3)%lini) call abort + +end program testje +Index: gcc/testsuite/gfortran.dg/size_kind_2.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/size_kind_2.f90 (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gfortran.dg/size_kind_2.f90 (.../branches/gcc-4_7-branch) +@@ -0,0 +1,17 @@ ++! { dg-do compile } ++! { dg-options "-fdump-tree-original" } ++! ++! PR fortran/57142 ++! ++integer :: B(huge(1)+3_8,2_8) ++integer(8) :: var1(2), var2, var3 ++ ++var1 = shape(B,kind=8) ++var2 = size(B,kind=8) ++var3 = size(B,dim=1,kind=8) ++end ++ ++! { dg-final { scan-tree-dump "static integer.kind=8. A..\\\[2\\\] = \\\{2147483650, 2\\\};" "original" } } ++! { dg-final { scan-tree-dump "var2 = 4294967300;" "original" } } ++! { dg-final { scan-tree-dump "var3 = 2147483650;" "original" } } ++! { dg-final { cleanup-tree-dump "original" } } Index: gcc/testsuite/gfortran.dg/proc_ptr_41.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/proc_ptr_41.f90 (.../tags/gcc_4_7_3_release) @@ -931,14 +1172,36 @@ Index: gcc/testsuite/ChangeLog =================================================================== --- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_4_7_3_release) +++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-4_7-branch) -@@ -1,3 +1,88 @@ +@@ -1,3 +1,110 @@ ++2013-05-13 Uros Bizjak <ubizjak@gmail.com> ++ ++ PR target/57264 ++ * gcc.target/i386/pr57264.c: New test. ++ ++2013-05-07 Michael Meissner <meissner@linux.vnet.ibm.com> ++ ++ Backport from trunk ++ 2013-05-03 Michael Meissner <meissner@linux.vnet.ibm.com> ++ ++ PR target/57150 ++ * gcc.target/powerpc/pr57150.c: New file. ++ ++2013-05-07 Tobias Burnus <burnus@net-b.de> ++ ++ Backport from mainline ++ 2013-05-02 Tobias Burnus <burnus@net-b.de> ++ ++ PR fortran/57142 ++ * gfortran.dg/size_kind_2.f90: New. ++ * gfortran.dg/size_kind_3.f90: New. ++ +2013-05-03 Marek Polacek <polacek@redhat.com> + + Backport from mainline + 2013-04-25 Marek Polacek <polacek@redhat.com> + + PR tree-optimization/57066 -+ * gcc.dg/torture/builtin-logb-1.c: Adjust testcase. ++ * gcc.dg/torture/builtin-logb-1.c: Adjust testcase. + +2013-04-30 Uros Bizjak <ubizjak@gmail.com> + @@ -1039,11 +1302,75 @@ Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C + } + }(); +} +Index: gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr8.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr8.C (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr8.C (.../branches/gcc-4_7-branch) +@@ -0,0 +1,54 @@ ++// PR c++/57047 ++// { dg-require-effective-target c++11 } ++ ++template <typename> ++struct A; ++template <typename T> ++struct A <T &> ++{ ++ typedef T type; ++}; ++template <typename T> ++constexpr T && foo (typename A <T>::type & __t) noexcept ++{ ++ return static_cast <T &&>(__t); ++} ++template <class T1, class T2> ++struct B ++{ ++ T1 t1; ++ T2 t2; ++ template <class U> ++ constexpr B (U && __x, const T2 & __y) : t1 (foo <U> (__x)), t2 (__y) {} ++}; ++static inline constexpr bool ++fn1 (const char c) ++{ ++ return ('0' <= c) && (c <= '9'); ++} ++static inline constexpr bool ++fn2 (const char c) ++{ ++ return (('A' <= c) && (c <= 'Z')) || (('a' <= c) && (c <= 'z')); ++} ++static constexpr bool ++fn3 (const char *const x) ++{ ++ return (x[1] == '\0' && x[0] == ']') ? true : (!fn1 (x[0])) ? false : fn3 (&x[1]); ++} ++static constexpr bool ++fn4 (const char *const x) ++{ ++ return (x[0] == '\0') ? fn3 (&x[1]) : fn4 (&x[1]); ++} ++static inline constexpr bool ++fn5 (const char *const x) ++{ ++ return fn2 (x[0]) ? fn4 (x) : false; ++} ++struct C final ++{ ++ constexpr C (const char *const t1) : c (fn5 (t1) ? 199 : 69) {} ++ unsigned c; ++}; ++B <C, C> p ("a", "b"); Index: gcc/cp/ChangeLog =================================================================== --- a/src/gcc/cp/ChangeLog (.../tags/gcc_4_7_3_release) +++ b/src/gcc/cp/ChangeLog (.../branches/gcc-4_7-branch) -@@ -1,3 +1,13 @@ +@@ -1,3 +1,18 @@ ++2013-05-09 Jason Merrill <jason@redhat.com> ++ ++ PR c++/57047 ++ * semantics.c (cxx_fold_indirect_ref): Fix thinko. ++ +2013-04-21 Eric Botcazou <ebotcazou@adacore.com> + + * parser.c (cp_parser_late_return_type_opt): Fix C++ism. @@ -1061,7 +1388,28 @@ Index: gcc/cp/semantics.c =================================================================== --- a/src/gcc/cp/semantics.c (.../tags/gcc_4_7_3_release) +++ b/src/gcc/cp/semantics.c (.../branches/gcc-4_7-branch) -@@ -8959,13 +8959,12 @@ +@@ -7412,15 +7412,17 @@ + } + } + } +- /* *(foo *)fooarrptreturn> (*fooarrptr)[0] */ ++ /* *(foo *)fooarrptr => (*fooarrptr)[0] */ + else if (TREE_CODE (TREE_TYPE (subtype)) == ARRAY_TYPE + && (same_type_ignoring_top_level_qualifiers_p + (type, TREE_TYPE (TREE_TYPE (subtype))))) + { + tree type_domain; + tree min_val = size_zero_node; +- sub = cxx_fold_indirect_ref (loc, TREE_TYPE (subtype), sub, NULL); +- if (!sub) ++ tree newsub = cxx_fold_indirect_ref (loc, TREE_TYPE (subtype), sub, NULL); ++ if (newsub) ++ sub = newsub; ++ else + sub = build1_loc (loc, INDIRECT_REF, TREE_TYPE (subtype), sub); + type_domain = TYPE_DOMAIN (TREE_TYPE (sub)); + if (type_domain && TYPE_MIN_VALUE (type_domain)) +@@ -8959,13 +8961,12 @@ insert_capture_proxy (tree var) { cp_binding_level *b; @@ -1076,7 +1424,7 @@ Index: gcc/cp/semantics.c { cp_binding_level *n = b->level_chain; if (n->kind == sk_function_parms) -@@ -8976,8 +8975,7 @@ +@@ -8976,8 +8977,7 @@ /* And put a DECL_EXPR in the STATEMENT_LIST for the same block. */ var = build_stmt (DECL_SOURCE_LOCATION (var), DECL_EXPR, var); @@ -1153,7 +1501,20 @@ Index: gcc/fortran/ChangeLog =================================================================== --- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_7_3_release) +++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_7-branch) -@@ -1,3 +1,26 @@ +@@ -1,3 +1,39 @@ ++2013-05-07 Tobias Burnus <burnus@net-b.de> ++ ++ Backport from mainline ++ 2013-05-02 Tobias Burnus <burnus@net-b.de> ++ ++ PR fortran/57142 ++ * simplify.c (gfc_simplify_size): Renamed from ++ simplify_size; fix kind=8 handling. ++ (gfc_simplify_size): New function. ++ (gfc_simplify_shape): Add range check. ++ * resolve.c (resolve_function): Fix handling ++ for ISYM_SIZE. ++ +2013-04-26 Janus Weil <janus@gcc.gnu.org> + + Backports from trunk: @@ -1199,6 +1560,18 @@ Index: gcc/fortran/expr.c } else { +Index: gcc/fortran/resolve.c +=================================================================== +--- a/src/gcc/fortran/resolve.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/fortran/resolve.c (.../branches/gcc-4_7-branch) +@@ -3155,6 +3155,7 @@ + for (arg = expr->value.function.actual; arg; arg = arg->next) + { + if ((GENERIC_ID == GFC_ISYM_UBOUND || GENERIC_ID == GFC_ISYM_SIZE) ++ && arg == expr->value.function.actual + && arg->next != NULL && arg->next->expr) + { + if (arg->next->expr->expr_type != EXPR_CONSTANT) Index: gcc/fortran/target-memory.c =================================================================== --- a/src/gcc/fortran/target-memory.c (.../tags/gcc_4_7_3_release) @@ -1328,6 +1701,181 @@ Index: gcc/fortran/check.c if (result_elt_size == 0) return FAILURE; +Index: gcc/fortran/simplify.c +=================================================================== +--- a/src/gcc/fortran/simplify.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/fortran/simplify.c (.../branches/gcc-4_7-branch) +@@ -32,7 +32,9 @@ + + gfc_expr gfc_bad_expr; + ++static gfc_expr *simplify_size (gfc_expr *, gfc_expr *, int); + ++ + /* Note that 'simplification' is not just transforming expressions. + For functions that are not simplified at compile time, range + checking is done if possible. +@@ -3240,7 +3242,7 @@ + gfc_expr* dim = result; + mpz_set_si (dim->value.integer, d); + +- result = gfc_simplify_size (array, dim, kind); ++ result = simplify_size (array, dim, k); + gfc_free_expr (dim); + if (!result) + goto returnNull; +@@ -5493,15 +5495,12 @@ + e = gfc_get_constant_expr (BT_INTEGER, k, &source->where); + + if (t == SUCCESS) +- { +- mpz_set (e->value.integer, shape[n]); +- mpz_clear (shape[n]); +- } ++ mpz_set (e->value.integer, shape[n]); + else + { + mpz_set_ui (e->value.integer, n + 1); + +- f = gfc_simplify_size (source, e, NULL); ++ f = simplify_size (source, e, k); + gfc_free_expr (e); + if (f == NULL) + { +@@ -5512,24 +5511,31 @@ + e = f; + } + ++ if (e == &gfc_bad_expr || range_check (e, "SHAPE") == &gfc_bad_expr) ++ { ++ gfc_free_expr (result); ++ if (t) ++ gfc_clear_shape (shape, source->rank); ++ return &gfc_bad_expr; ++ } ++ + gfc_constructor_append_expr (&result->value.constructor, e, NULL); + } + ++ if (t) ++ gfc_clear_shape (shape, source->rank); ++ + return result; + } + + +-gfc_expr * +-gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind) ++static gfc_expr * ++simplify_size (gfc_expr *array, gfc_expr *dim, int k) + { + mpz_t size; + gfc_expr *return_value; + int d; +- int k = get_kind (BT_INTEGER, kind, "SIZE", gfc_default_integer_kind); + +- if (k == -1) +- return &gfc_bad_expr; +- + /* For unary operations, the size of the result is given by the size + of the operand. For binary ones, it's the size of the first operand + unless it is scalar, then it is the size of the second. */ +@@ -5558,7 +5564,7 @@ + replacement = array->value.op.op1; + else + { +- simplified = gfc_simplify_size (array->value.op.op1, dim, kind); ++ simplified = simplify_size (array->value.op.op1, dim, k); + if (simplified) + return simplified; + +@@ -5568,18 +5574,20 @@ + } + + /* Try to reduce it directly if possible. */ +- simplified = gfc_simplify_size (replacement, dim, kind); ++ simplified = simplify_size (replacement, dim, k); + + /* Otherwise, we build a new SIZE call. This is hopefully at least + simpler than the original one. */ + if (!simplified) +- simplified = gfc_build_intrinsic_call (gfc_current_ns, +- GFC_ISYM_SIZE, "size", +- array->where, 3, +- gfc_copy_expr (replacement), +- gfc_copy_expr (dim), +- gfc_copy_expr (kind)); +- ++ { ++ gfc_expr *kind = gfc_get_int_expr (gfc_default_integer_kind, NULL, k); ++ simplified = gfc_build_intrinsic_call (gfc_current_ns, ++ GFC_ISYM_SIZE, "size", ++ array->where, 3, ++ gfc_copy_expr (replacement), ++ gfc_copy_expr (dim), ++ kind); ++ } + return simplified; + } + +@@ -5598,13 +5606,32 @@ + return NULL; + } + +- return_value = gfc_get_int_expr (k, &array->where, mpz_get_si (size)); ++ return_value = gfc_get_constant_expr (BT_INTEGER, k, &array->where); ++ mpz_set (return_value->value.integer, size); + mpz_clear (size); ++ + return return_value; + } + + + gfc_expr * ++gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind) ++{ ++ gfc_expr *result; ++ int k = get_kind (BT_INTEGER, kind, "SIZE", gfc_default_integer_kind); ++ ++ if (k == -1) ++ return &gfc_bad_expr; ++ ++ result = simplify_size (array, dim, k); ++ if (result == NULL || result == &gfc_bad_expr) ++ return result; ++ ++ return range_check (result, "SIZE"); ++} ++ ++ ++gfc_expr * + gfc_simplify_sign (gfc_expr *x, gfc_expr *y) + { + gfc_expr *result; +Index: gcc/coverage.c +=================================================================== +--- a/src/gcc/coverage.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/coverage.c (.../branches/gcc-4_7-branch) +@@ -1099,6 +1099,9 @@ + memcpy (da_file_name + prefix_len, filename, len); + strcpy (da_file_name + prefix_len + len, GCOV_DATA_SUFFIX); + ++ if (flag_branch_probabilities) ++ read_counts_file (); ++ + /* Name of bbg file. */ + if (flag_test_coverage && !flag_compare_debug) + { +@@ -1118,9 +1121,6 @@ + gcov_write_unsigned (local_tick); + } + } +- +- if (flag_branch_probabilities) +- read_counts_file (); + } + + /* Performs file-level cleanup. Close graph file, generate coverage Index: gcc/cfgexpand.c =================================================================== --- a/src/gcc/cfgexpand.c (.../tags/gcc_4_7_3_release) @@ -1486,7 +2034,15 @@ Index: gcc/config/i386/i386.md =================================================================== --- a/src/gcc/config/i386/i386.md (.../tags/gcc_4_7_3_release) +++ b/src/gcc/config/i386/i386.md (.../branches/gcc-4_7-branch) -@@ -3444,9 +3444,9 @@ +@@ -109,6 +109,7 @@ + UNSPEC_CALL_NEEDS_VZEROUPPER + UNSPEC_PAUSE + UNSPEC_LEA_ADDR ++ UNSPEC_STOS + + ;; For SSE/MMX support: + UNSPEC_FIX_NOTRUNC +@@ -3444,9 +3445,9 @@ }) (define_insn "*zero_extendsidi2_rex64" @@ -1498,7 +2054,7 @@ Index: gcc/config/i386/i386.md "TARGET_64BIT" "@ mov{l}\t{%1, %k0|%k0, %1} -@@ -3469,9 +3469,9 @@ +@@ -3469,9 +3470,9 @@ ;; %%% Kill me once multi-word ops are sane. (define_insn "zero_extendsidi2_1" @@ -1510,6 +2066,56 @@ Index: gcc/config/i386/i386.md (clobber (reg:CC FLAGS_REG))] "!TARGET_64BIT" "@ +@@ -15912,7 +15913,8 @@ + [(parallel [(set (match_operand 1 "memory_operand" "") + (match_operand 2 "register_operand" "")) + (set (match_operand 0 "register_operand" "") +- (match_operand 3 "" ""))])] ++ (match_operand 3 "" "")) ++ (unspec [(const_int 0)] UNSPEC_STOS)])] + "" + "ix86_current_function_needs_cld = 1;") + +@@ -15921,7 +15923,8 @@ + (match_operand:DI 2 "register_operand" "a")) + (set (match_operand:DI 0 "register_operand" "=D") + (plus:DI (match_dup 1) +- (const_int 8)))] ++ (const_int 8))) ++ (unspec [(const_int 0)] UNSPEC_STOS)] + "TARGET_64BIT + && !(fixed_regs[AX_REG] || fixed_regs[DI_REG])" + "stosq" +@@ -15934,7 +15937,8 @@ + (match_operand:SI 2 "register_operand" "a")) + (set (match_operand:P 0 "register_operand" "=D") + (plus:P (match_dup 1) +- (const_int 4)))] ++ (const_int 4))) ++ (unspec [(const_int 0)] UNSPEC_STOS)] + "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])" + "stos{l|d}" + [(set_attr "type" "str") +@@ -15946,7 +15950,8 @@ + (match_operand:HI 2 "register_operand" "a")) + (set (match_operand:P 0 "register_operand" "=D") + (plus:P (match_dup 1) +- (const_int 2)))] ++ (const_int 2))) ++ (unspec [(const_int 0)] UNSPEC_STOS)] + "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])" + "stosw" + [(set_attr "type" "str") +@@ -15958,7 +15963,8 @@ + (match_operand:QI 2 "register_operand" "a")) + (set (match_operand:P 0 "register_operand" "=D") + (plus:P (match_dup 1) +- (const_int 1)))] ++ (const_int 1))) ++ (unspec [(const_int 0)] UNSPEC_STOS)] + "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])" + "stosb" + [(set_attr "type" "str") Index: gcc/config/i386/sse.md =================================================================== --- a/src/gcc/config/i386/sse.md (.../tags/gcc_4_7_3_release) @@ -1568,6 +2174,64 @@ Index: gcc/config/sh/sh.md (match_operand:SI 1 "const_int_operand") (match_operand:SI 2 "const_int_operand")) (const_int 0)))] +Index: gcc/config/rs6000/rs6000.c +=================================================================== +--- a/src/gcc/config/rs6000/rs6000.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/config/rs6000/rs6000.c (.../branches/gcc-4_7-branch) +@@ -2398,8 +2398,16 @@ + reg_size = UNITS_PER_WORD; + + for (m = 0; m < NUM_MACHINE_MODES; ++m) +- rs6000_class_max_nregs[m][c] +- = (GET_MODE_SIZE (m) + reg_size - 1) / reg_size; ++ { ++ int reg_size2 = reg_size; ++ ++ /* TFmode/TDmode always takes 2 registers, even in VSX. */ ++ if (m == TDmode || m == TFmode) ++ reg_size2 = UNITS_PER_FP_WORD; ++ ++ rs6000_class_max_nregs[m][c] ++ = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2; ++ } + } + + if (TARGET_E500_DOUBLE) +Index: gcc/config/rs6000/rs6000.h +=================================================================== +--- a/src/gcc/config/rs6000/rs6000.h (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/config/rs6000/rs6000.h (.../branches/gcc-4_7-branch) +@@ -1033,12 +1033,17 @@ + #define HARD_REGNO_NREGS(REGNO, MODE) rs6000_hard_regno_nregs[(MODE)][(REGNO)] + + /* When setting up caller-save slots (MODE == VOIDmode) ensure we allocate +- enough space to account for vectors in FP regs. */ ++ enough space to account for vectors in FP regs. However, TFmode/TDmode ++ should not use VSX instructions to do a caller save. */ + #define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \ + (TARGET_VSX \ + && ((MODE) == VOIDmode || ALTIVEC_OR_VSX_VECTOR_MODE (MODE)) \ +- && FP_REGNO_P (REGNO) \ +- ? V2DFmode \ ++ && FP_REGNO_P (REGNO) \ ++ ? V2DFmode \ ++ : ((MODE) == TFmode && FP_REGNO_P (REGNO)) \ ++ ? DFmode \ ++ : ((MODE) == TDmode && FP_REGNO_P (REGNO)) \ ++ ? DImode \ + : choose_hard_reg_mode ((REGNO), (NREGS), false)) + + #define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) \ +@@ -1046,7 +1051,8 @@ + && (GET_MODE_SIZE (MODE) > 4) \ + && INT_REGNO_P (REGNO)) ? 1 : 0) \ + || (TARGET_VSX && FP_REGNO_P (REGNO) \ +- && GET_MODE_SIZE (MODE) > 8)) ++ && GET_MODE_SIZE (MODE) > 8 && ((MODE) != TDmode) \ ++ && ((MODE) != TFmode))) + + #define VSX_VECTOR_MODE(MODE) \ + ((MODE) == V4SFmode \ Index: gcc/config/darwin.h =================================================================== --- a/src/gcc/config/darwin.h (.../tags/gcc_4_7_3_release) @@ -1601,6 +2265,315 @@ Index: gcc/config/darwin.h /* When generating stabs debugging, use N_BINCL entries. */ #define DBX_USE_BINCL +Index: gcc/config/arm/thumb2.md +=================================================================== +--- a/src/gcc/config/arm/thumb2.md (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/config/arm/thumb2.md (.../branches/gcc-4_7-branch) +@@ -182,7 +182,7 @@ + str%?\\t%1, %0" + [(set_attr "type" "*,*,*,*,load1,load1,store1,store1") + (set_attr "predicable" "yes") +- (set_attr "pool_range" "*,*,*,*,1020,4096,*,*") ++ (set_attr "pool_range" "*,*,*,*,1018,4094,*,*") + (set_attr "neg_pool_range" "*,*,*,*,0,0,*,*")] + ) + +@@ -217,7 +217,7 @@ + ldr%(h%)\\t%0, %1\\t%@ movhi" + [(set_attr "type" "*,*,store1,load1") + (set_attr "predicable" "yes") +- (set_attr "pool_range" "*,*,*,4096") ++ (set_attr "pool_range" "*,*,*,4094") + (set_attr "neg_pool_range" "*,*,*,250")] + ) + +@@ -570,7 +570,7 @@ + ldr%(sb%)\\t%0, %1" + [(set_attr "type" "alu_shift,load_byte") + (set_attr "predicable" "yes") +- (set_attr "pool_range" "*,4096") ++ (set_attr "pool_range" "*,4094") + (set_attr "neg_pool_range" "*,250")] + ) + +@@ -583,7 +583,7 @@ + ldr%(h%)\\t%0, %1" + [(set_attr "type" "alu_shift,load_byte") + (set_attr "predicable" "yes") +- (set_attr "pool_range" "*,4096") ++ (set_attr "pool_range" "*,4094") + (set_attr "neg_pool_range" "*,250")] + ) + +@@ -596,7 +596,7 @@ + ldr%(b%)\\t%0, %1\\t%@ zero_extendqisi2" + [(set_attr "type" "alu_shift,load_byte") + (set_attr "predicable" "yes") +- (set_attr "pool_range" "*,4096") ++ (set_attr "pool_range" "*,4094") + (set_attr "neg_pool_range" "*,250")] + ) + +Index: gcc/config/arm/vfp.md +=================================================================== +--- a/src/gcc/config/arm/vfp.md (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/config/arm/vfp.md (.../branches/gcc-4_7-branch) +@@ -126,7 +126,7 @@ + [(set_attr "predicable" "yes") + (set_attr "type" "*,*,*,*,load1,load1,store1,store1,r_2_f,f_2_r,fcpys,f_loads,f_stores") + (set_attr "insn" "mov,mov,mvn,mov,*,*,*,*,*,*,*,*,*") +- (set_attr "pool_range" "*,*,*,*,1020,4096,*,*,*,*,*,1020,*") ++ (set_attr "pool_range" "*,*,*,*,1018,4094,*,*,*,*,*,1018,*") + (set_attr "neg_pool_range" "*,*,*,*, 0, 0,*,*,*,*,*,1008,*")] + ) + +@@ -177,7 +177,8 @@ + (const_int 8) + (const_int 4))] + (const_int 4))) +- (set_attr "pool_range" "*,*,*,*,1020,4096,*,*,*,*,1020,*") ++ (set_attr "arm_pool_range" "*,*,*,*,1020,4096,*,*,*,*,1020,*") ++ (set_attr "thumb2_pool_range" "*,*,*,*,1018,4094,*,*,*,*,1018,*") + (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*") + (set_attr "arch" "t2,any,any,any,a,t2,any,any,any,any,any,any")] + ) +@@ -222,7 +223,8 @@ + * 4")] + (const_int 4))) + (set_attr "predicable" "yes") +- (set_attr "pool_range" "*,*,*,*,1020,4096,*,*,*,*,1020,*") ++ (set_attr "arm_pool_range" "*,*,*,*,1018,4094,*,*,*,*,1018,*") ++ (set_attr "thumb2_pool_range" "*,*,*,*,1018,4094,*,*,*,*,1018,*") + (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*") + (set (attr "ce_count") + (symbol_ref "get_attr_length (insn) / 4")) +@@ -409,7 +411,7 @@ + (set_attr "type" + "r_2_f,f_2_r,fconsts,f_loads,f_stores,load1,store1,fcpys,*") + (set_attr "insn" "*,*,*,*,*,*,*,*,mov") +- (set_attr "pool_range" "*,*,*,1020,*,4092,*,*,*") ++ (set_attr "pool_range" "*,*,*,1018,*,4090,*,*,*") + (set_attr "neg_pool_range" "*,*,*,1008,*,0,*,*,*")] + ) + +@@ -501,7 +503,7 @@ + (const_int 8) + (const_int 4))] + (const_int 4))) +- (set_attr "pool_range" "*,*,*,1020,*,4096,*,*,*") ++ (set_attr "pool_range" "*,*,*,1018,*,4094,*,*,*") + (set_attr "neg_pool_range" "*,*,*,1008,*,0,*,*,*")] + ) + +Index: gcc/config/arm/neon.md +=================================================================== +--- a/src/gcc/config/arm/neon.md (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/config/arm/neon.md (.../branches/gcc-4_7-branch) +@@ -201,7 +201,8 @@ + (set_attr "type" "*,f_stored,*,f_loadd,*,*,alu,load2,store2") + (set_attr "insn" "*,*,*,*,*,*,mov,*,*") + (set_attr "length" "4,4,4,4,4,4,8,8,8") +- (set_attr "pool_range" "*,*,*,1020,*,*,*,1020,*") ++ (set_attr "arm_pool_range" "*,*,*,1020,*,*,*,1020,*") ++ (set_attr "thumb2_pool_range" "*,*,*,1018,*,*,*,1018,*") + (set_attr "neg_pool_range" "*,*,*,1004,*,*,*,1004,*")]) + + (define_insn "*neon_mov<mode>" +@@ -246,7 +247,8 @@ + (set_attr "type" "*,*,*,*,*,*,alu,load4,store4") + (set_attr "insn" "*,*,*,*,*,*,mov,*,*") + (set_attr "length" "4,8,4,8,8,8,16,8,16") +- (set_attr "pool_range" "*,*,*,1020,*,*,*,1020,*") ++ (set_attr "arm_pool_range" "*,*,*,1020,*,*,*,1020,*") ++ (set_attr "thumb2_pool_range" "*,*,*,1018,*,*,*,1018,*") + (set_attr "neg_pool_range" "*,*,*,996,*,*,*,996,*")]) + + (define_expand "movti" +Index: gcc/config/arm/arm.md +=================================================================== +--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_7-branch) +@@ -256,6 +256,9 @@ + ; POOL_RANGE is how far away from a constant pool entry that this insn + ; can be placed. If the distance is zero, then this insn will never + ; reference the pool. ++; Note that for Thumb constant pools the PC value is rounded down to the ++; nearest multiple of four. Therefore, THUMB2_POOL_RANGE (and POOL_RANGE for ++; Thumb insns) should be set to <max_range> - 2. + ; NEG_POOL_RANGE is nonzero for insns that can reference a constant pool entry + ; before its address. It is set to <max_range> - (8 + <data_size>). + (define_attr "arm_pool_range" "" (const_int 0)) +@@ -4833,7 +4836,7 @@ + (const_int 2) (const_int 4)) + (const_int 4)]) + (set_attr "type" "alu_shift,load_byte") +- (set_attr "pool_range" "*,1020")] ++ (set_attr "pool_range" "*,1018")] + ) + + ;; This pattern will only be used when ldsh is not available +@@ -5239,7 +5242,7 @@ + (set_attr "type" "*,*,*,load2,store2") + (set_attr "arm_pool_range" "*,*,*,1020,*") + (set_attr "arm_neg_pool_range" "*,*,*,1004,*") +- (set_attr "thumb2_pool_range" "*,*,*,4096,*") ++ (set_attr "thumb2_pool_range" "*,*,*,4094,*") + (set_attr "thumb2_neg_pool_range" "*,*,*,0,*")] + ) + +@@ -5379,7 +5382,7 @@ + [(set_attr "length" "4,4,6,2,2,6,4,4") + (set_attr "type" "*,*,*,load2,store2,load2,store2,*") + (set_attr "insn" "*,mov,*,*,*,*,*,mov") +- (set_attr "pool_range" "*,*,*,*,*,1020,*,*")] ++ (set_attr "pool_range" "*,*,*,*,*,1018,*,*")] + ) + + (define_expand "movsi" +@@ -5539,7 +5542,7 @@ + mov\\t%0, %1" + [(set_attr "length" "2,2,4,4,2,2,2,2,2") + (set_attr "type" "*,*,*,*,load1,store1,load1,store1,*") +- (set_attr "pool_range" "*,*,*,*,*,*,1020,*,*") ++ (set_attr "pool_range" "*,*,*,*,*,*,1018,*,*") + (set_attr "conds" "set,clob,*,*,nocond,nocond,nocond,nocond,nocond")]) + + (define_split +@@ -5632,7 +5635,7 @@ + (match_dup 2)] UNSPEC_PIC_BASE))] + "operands[3] = TARGET_THUMB ? GEN_INT (4) : GEN_INT (8);" + [(set_attr "type" "load1,load1,load1") +- (set_attr "pool_range" "4096,4096,1024") ++ (set_attr "pool_range" "4096,4094,1022") + (set_attr "neg_pool_range" "4084,0,0") + (set_attr "arch" "a,t2,t1") + (set_attr "length" "8,6,4")] +@@ -5648,7 +5651,10 @@ + "TARGET_32BIT && flag_pic" + "ldr%?\\t%0, %1" + [(set_attr "type" "load1") +- (set_attr "pool_range" "4096") ++ (set (attr "pool_range") ++ (if_then_else (eq_attr "is_thumb" "no") ++ (const_int 4096) ++ (const_int 4094))) + (set (attr "neg_pool_range") + (if_then_else (eq_attr "is_thumb" "no") + (const_int 4084) +@@ -5661,7 +5667,7 @@ + "TARGET_THUMB1 && flag_pic" + "ldr\\t%0, %1" + [(set_attr "type" "load1") +- (set (attr "pool_range") (const_int 1024))] ++ (set (attr "pool_range") (const_int 1018))] + ) + + (define_insn "pic_add_dot_plus_four" +@@ -6456,7 +6462,7 @@ + [(set_attr "length" "2") + (set_attr "type" "*,load1,store1,*,*") + (set_attr "insn" "mov,*,*,mov,mov") +- (set_attr "pool_range" "*,1020,*,*,*") ++ (set_attr "pool_range" "*,1018,*,*,*") + (set_attr "conds" "clob,nocond,nocond,nocond,nocond")]) + + (define_expand "movsf" +@@ -6511,7 +6517,8 @@ + [(set_attr "predicable" "yes") + (set_attr "type" "*,load1,store1") + (set_attr "insn" "mov,*,*") +- (set_attr "pool_range" "*,4096,*") ++ (set_attr "arm_pool_range" "*,4096,*") ++ (set_attr "thumb2_pool_range" "*,4094,*") + (set_attr "arm_neg_pool_range" "*,4084,*") + (set_attr "thumb2_neg_pool_range" "*,0,*")] + ) +@@ -6533,7 +6540,7 @@ + mov\\t%0, %1" + [(set_attr "length" "2") + (set_attr "type" "*,load1,store1,load1,store1,*,*") +- (set_attr "pool_range" "*,*,*,1020,*,*,*") ++ (set_attr "pool_range" "*,*,*,1018,*,*,*") + (set_attr "insn" "*,*,*,*,*,mov,mov") + (set_attr "conds" "clob,nocond,nocond,nocond,nocond,nocond,nocond")] + ) +@@ -6622,7 +6629,8 @@ + " + [(set_attr "length" "8,12,16,8,8") + (set_attr "type" "*,*,*,load2,store2") +- (set_attr "pool_range" "*,*,*,1020,*") ++ (set_attr "arm_pool_range" "*,*,*,1020,*") ++ (set_attr "thumb2_pool_range" "*,*,*,1018,*") + (set_attr "arm_neg_pool_range" "*,*,*,1004,*") + (set_attr "thumb2_neg_pool_range" "*,*,*,0,*")] + ) +@@ -6665,7 +6673,7 @@ + [(set_attr "length" "4,2,2,6,4,4") + (set_attr "type" "*,load2,store2,load2,store2,*") + (set_attr "insn" "*,*,*,*,*,mov") +- (set_attr "pool_range" "*,*,*,1020,*,*")] ++ (set_attr "pool_range" "*,*,*,1018,*,*")] + ) + + (define_expand "movxf" +Index: gcc/config/arm/t-rtems-eabi +=================================================================== +--- a/src/gcc/config/arm/t-rtems-eabi (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/config/arm/t-rtems-eabi (.../branches/gcc-4_7-branch) +@@ -1,8 +1,47 @@ + # Custom RTEMS EABI multilibs + +-MULTILIB_OPTIONS = mthumb march=armv6-m/march=armv7/march=armv7-m +-MULTILIB_DIRNAMES = thumb armv6-m armv7 armv7-m +-MULTILIB_EXCEPTIONS = march=armv6-m march=armv7 march=armv7-m +-MULTILIB_MATCHES = +-MULTILIB_EXCLUSIONS = +-MULTILIB_OSDIRNAMES = ++MULTILIB_OPTIONS = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard ++MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard ++ ++# Enumeration of multilibs ++ ++MULTILIB_EXCEPTIONS = ++MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon ++MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard ++# MULTILIB_EXCEPTIONS += mthumb/march=armv6-m ++# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon ++MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard ++# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a ++MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon ++MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard ++# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r ++MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon ++MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard ++# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m ++MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += mthumb/mfpu=neon ++MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard ++# MULTILIB_EXCEPTIONS += mthumb ++MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon ++MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += march=armv6-m ++MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon ++MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += march=armv7-a ++MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon ++MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += march=armv7-r ++MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon ++MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += march=armv7-m ++MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard ++MULTILIB_EXCEPTIONS += mfpu=neon ++MULTILIB_EXCEPTIONS += mfloat-abi=hard Index: gcc/config/pa/pa.c =================================================================== --- a/src/gcc/config/pa/pa.c (.../tags/gcc_4_7_3_release) @@ -1616,6 +2589,18 @@ Index: gcc/config/pa/pa.c } crtl->uses_pic_offset_table = 1; return reg; +Index: gcc/config/v850/t-rtems +=================================================================== +--- a/src/gcc/config/v850/t-rtems (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/config/v850/t-rtems (.../branches/gcc-4_7-branch) +@@ -1,3 +1,7 @@ + # Custom multilibs for RTEMS + ++MULTILIB_OPTIONS = mv850/mv850e/mv850e2/mv850e2v3 ++MULTILIB_DIRNAMES = v850 v850e v850e2 v850e2v3 ++MULTILIB_MATCHES = mv850e=mv850e1 ++ + MULTILIB_MATCHES += mv850e=mv850es Index: libgfortran/ChangeLog =================================================================== --- a/src/libgfortran/ChangeLog (.../tags/gcc_4_7_3_release) diff --git a/debian/rules.patch b/debian/rules.patch index d5b20f5..2096915 100644 --- a/debian/rules.patch +++ b/debian/rules.patch @@ -14,11 +14,9 @@ series_file ?= $(patchdir)/series debian_patches = \ $(if $(with_linaro_branch),gcc-linaro) \ - svn-updates \ + svn-updates$(if $(with_linaro_branch),-linaro) \ hjl-x32-gcc-4_7-branch \ -# svn-updates$(if $(with_linaro_branch),-linaro) \ - ifeq ($(with_java),yes) # debian_patches += \ # svn-class-updates @@ -84,7 +82,6 @@ debian_patches += \ libmudflap-x32 \ pr54411 \ hurd-pthread \ - pr54974$(if $(with_linaro_branch),-linaro) \ libgo-testsuite \ gcc-target-include-asm \ libgcc-backports \ @@ -248,7 +245,7 @@ ifeq ($(DEB_CROSS),yes) endif ifeq ($(DEB_TARGET_ARCH_OS),hurd) - debian_patches += hurd-changes r195826 + debian_patches += hurd-changes endif debian_patches += gcc-ice-hack gcc-ice-apport |