diff options
author | doko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca> | 2013-07-15 12:28:52 +0000 |
---|---|---|
committer | doko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca> | 2013-07-15 12:28:52 +0000 |
commit | 516e0286125de47b4f8db639afd99cb3531e8056 (patch) | |
tree | 0a5c0c2c292420b0fbbf2b30ff17fbad8f0ea214 | |
parent | d9b7120641671686ebf742ef56ea288fe765e042 (diff) | |
download | gcc-47-516e0286125de47b4f8db639afd99cb3531e8056.tar.gz |
* Update to SVN 20130715 (r200955) from the gcc-4_7-branch.
* Update the Linaro support to the 4.7-2013.07 release.
git-svn-id: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.7@6915 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | debian/patches/gcc-linaro-doc.diff | 8 | ||||
-rw-r--r-- | debian/patches/gcc-linaro.diff | 681 | ||||
-rw-r--r-- | debian/patches/svn-updates-linaro.diff | 1012 | ||||
-rw-r--r-- | debian/patches/svn-updates.diff | 867 |
5 files changed, 2107 insertions, 466 deletions
diff --git a/debian/changelog b/debian/changelog index d21a675..24e1028 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,17 +1,20 @@ gcc-4.7 (4.7.3-6) UNRELEASED; urgency=low + * Update to SVN 20130715 (r200955) from the gcc-4_7-branch. + [ Matthias Klose ] * Fall back to the binutils version of the binutils build dependency if the binutils version used for the build cannot be determined. * For ARM multilib builds, use libsf/libhf system directories to lookup files for the non-default multilib (for now, only for the cross compilers). * Fix documentation builds with texinfo-5.1. + * Update the Linaro support to the 4.7-2013.07 release. [ Aurelien Jarno ] * Don't pass --with-mips-plt on mips/mipsel. * Add 32-bit biarch packages on sparc64. - -- Matthias Klose <doko@debian.org> Mon, 17 Jun 2013 18:23:31 +0200 + -- Matthias Klose <doko@debian.org> Mon, 15 Jul 2013 11:40:45 +0200 gcc-4.7 (4.7.3-5) unstable; urgency=low diff --git a/debian/patches/gcc-linaro-doc.diff b/debian/patches/gcc-linaro-doc.diff index 076e33e..13be1b2 100644 --- a/debian/patches/gcc-linaro-doc.diff +++ b/debian/patches/gcc-linaro-doc.diff @@ -1,3 +1,5 @@ +# DP: Changes for the Linaro 4.7-2013.07 release (documentation). + --- a/src/gcc/doc/extend.texi +++ b/src/gcc/doc/extend.texi @@ -8575,12 +8575,17 @@ @@ -93,7 +95,7 @@ .\" .IX Title "FSF-FUNDING 7" -.TH FSF-FUNDING 7 "2013-04-11" "gcc-4.7.3" "GNU" -+.TH FSF-FUNDING 7 "2013-06-03" "gcc-4.7.4" "GNU" ++.TH FSF-FUNDING 7 "2013-06-26" "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 @@ -139,7 +141,7 @@ .\" .IX Title "GFDL 7" -.TH GFDL 7 "2013-04-11" "gcc-4.7.3" "GNU" -+.TH GFDL 7 "2013-06-03" "gcc-4.7.4" "GNU" ++.TH GFDL 7 "2013-06-26" "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 @@ -197,7 +199,7 @@ .\" .IX Title "GPL 7" -.TH GPL 7 "2013-04-11" "gcc-4.7.3" "GNU" -+.TH GPL 7 "2013-06-03" "gcc-4.7.4" "GNU" ++.TH GPL 7 "2013-06-26" "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 diff --git a/debian/patches/gcc-linaro.diff b/debian/patches/gcc-linaro.diff index 9ba3a34..941f005 100644 --- a/debian/patches/gcc-linaro.diff +++ b/debian/patches/gcc-linaro.diff @@ -1,11 +1,22 @@ -# DP: Changes for the Linaro 4.7-2013.06 release. +# DP: Changes for the Linaro 4.7-2013.07 release. --- a/src/ChangeLog.linaro +++ b/src/ChangeLog.linaro -@@ -0,0 +1,2551 @@ -+2013-06-11 Rob Savoye <rob.savoye@linaro.org> +@@ -0,0 +1,2562 @@ ++2013-07-03 Yvan Roux <yvan.roux@linaro.org> + -+ GCC Linaro 4.7-2013.06 released. ++ GCC Linaro 4.7-2013.07 released. ++ ++ gcc/ ++ * LINARO-VERSION: Update. ++ ++2013-06-26 Matthew Gretton-Dann <matthew.gretton-dann@linaro.org> ++ ++ Merge from FSF GCC 4.7.4 (svn branches/gcc-4_7-branch 200408). ++ ++2013-06-14 Rob Savoye <rob.savoye@linaro.org> ++ ++ GCC Linaro 4.7-2013.06-1 released. + + gcc/ + * LINARO-VERSION: Update. @@ -2903,28 +2914,6 @@ ;; m68*-cisco) os=-aout ---- a/src/contrib/gcc_build -+++ b/src/contrib/gcc_build -@@ -146,7 +146,7 @@ - - # Bootstrap the compiler - echo "Building: ${MAKE} ${MAKE_BOOTSTRAP_OPTIONS} bootstrap" -- eval ${MAKE} ${MAKE_BOOTSTRAP_OPTIONS} bootstrap || \ -+ eval ${MAKE} -j8 ${MAKE_BOOTSTRAP_OPTIONS} bootstrap || \ - error "Could not bootstrap the compiler" - } - -@@ -159,8 +159,8 @@ - changedir ${OBJDIR} - - echo "Running tests... This will take a while." -- eval \${MAKE} -k ${MAKE_CHECK_OPTIONS} check -- ${DESTINATION}/contrib/test_summary -+ #eval \${MAKE} -k ${MAKE_CHECK_OPTIONS} check -+ #${DESTINATION}/contrib/test_summary - } - - # Export the GCC source tree. --- a/src/gcc/ada/ChangeLog +++ b/src/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ @@ -3178,7 +3167,49 @@ { --- a/src/gcc/ChangeLog +++ b/src/gcc/ChangeLog -@@ -1,3 +1,220 @@ +@@ -1,3 +1,262 @@ ++2013-06-21 David Edelsohn <dje.gcc@gmail.com> ++ ++ Backport from mainline ++ 2013-06-19 David Edelsohn <dje.gcc@gmail.com> ++ ++ PR driver/57652 ++ * collect2.c (collect_atexit): New. ++ (collect_exit): Delete. ++ (main): Register collect_atexit with atexit. ++ (collect_wait): Change collect_exit to exit. ++ (do_wait): Same. ++ * collect2.h (collect_exit): Delete. ++ * tlink.c (do_tlink): Rename exit to ret. Change collect_exit to exit. ++ ++2013-06-07 Uros Bizjak <ubizjak@gmail.com> ++ ++ Backport from mainline ++ 2013-06-10 Uros Bizjak <ubizjak@gmail.com> ++ ++ * config/alpha/alpha.c (alpha_emit_xfloating_compare): Also use ++ cmp_code to construct REG_EQUAL note. ++ ++ Backport from mainline ++ 2013-06-05 Uros Bizjak <ubizjak@gmail.com> ++ ++ * config/alpha/alpha.c (alpha_emit_conditional_move): Swap all ++ GE, GT, GEU and GTU compares, modulo DImode compares with zero. ++ ++ Backport from mainline ++ 2013-05-23 Uros Bizjak <ubizjak@gmail.com> ++ ++ PR target/57379 ++ * config/alpha/alpha.md (unspec): Add UNSPEC_XFLT_COMPARE. ++ * config/alpha/alpha.c (alpha_emit_xfloating_compare): Construct ++ REG_EQUAL note as UNSPEC_XFLT_COMPARE unspec. ++ ++2013-06-09 Jakub Jelinek <jakub@redhat.com> ++ ++ PR target/57568 ++ * config/i386/i386.md (TARGET_READ_MODIFY_WRITE peepholes): Ensure ++ that operands[2] doesn't overlap with operands[0]. ++ +2013-05-22 Uros Bizjak <ubizjak@gmail.com> + + PR target/57356 @@ -4497,6 +4528,88 @@ + (read_rtx): Parse and read int iterators mapping and attributes. + Initialize int iterators group's hash-table. Memory management. + (read_rtx_code): Handle case for rtl field specifier 'i'. +--- a/src/gcc/collect2.c ++++ b/src/gcc/collect2.c +@@ -1,7 +1,7 @@ + /* Collect static initialization info into data structures that can be + traversed by C++ initialization and finalization routines. + Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, +- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 ++ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2013 + Free Software Foundation, Inc. + Contributed by Chris Smith (csmith@convex.com). + Heavily modified by Michael Meissner (meissner@cygnus.com), +@@ -384,8 +384,8 @@ + + /* Delete tempfiles and exit function. */ + +-void +-collect_exit (int status) ++static void ++collect_atexit (void) + { + if (c_file != 0 && c_file[0]) + maybe_unlink (c_file); +@@ -413,13 +413,8 @@ + maybe_unlink (lderrout); + } + +- if (status != 0 && output_file != 0 && output_file[0]) +- maybe_unlink (output_file); +- + if (response_file) + maybe_unlink (response_file); +- +- exit (status); + } + + +@@ -1132,6 +1127,9 @@ + signal (SIGCHLD, SIG_DFL); + #endif + ++ if (atexit (collect_atexit) != 0) ++ fatal_error ("atexit failed"); ++ + /* Unlock the stdio streams. */ + unlock_std_streams (); + +@@ -1973,7 +1971,7 @@ + error ("%s terminated with signal %d [%s]%s", + prog, sig, strsignal(sig), + WCOREDUMP(status) ? ", core dumped" : ""); +- collect_exit (FATAL_EXIT_CODE); ++ exit (FATAL_EXIT_CODE); + } + + if (WIFEXITED (status)) +@@ -1989,7 +1987,7 @@ + if (ret != 0) + { + error ("%s returned %d exit status", prog, ret); +- collect_exit (ret); ++ exit (ret); + } + + if (response_file) +--- a/src/gcc/collect2.h ++++ b/src/gcc/collect2.h +@@ -1,5 +1,5 @@ + /* Header file for collect/tlink routines. +- Copyright (C) 1998, 2003, 2004, 2005, 2007, 2010, 2011 ++ Copyright (C) 1998, 2003, 2004, 2005, 2007, 2010, 2011, 2013 + Free Software Foundation, Inc. + + This file is part of GCC. +@@ -26,8 +26,6 @@ + extern struct pex_obj *collect_execute (const char *, char **, const char *, + const char *, int flags); + +-extern void collect_exit (int) ATTRIBUTE_NORETURN; +- + extern int collect_wait (const char *, struct pex_obj *); + + extern void dump_file (const char *, FILE *); --- a/src/gcc/combine.c +++ b/src/gcc/combine.c @@ -9291,36 +9291,22 @@ @@ -50787,6 +50900,53 @@ + +LIB1ASMSRC = aarch64/lib1funcs.asm +LIB1ASMFUNCS = _aarch64_sync_cache_range +--- a/src/gcc/config/alpha/alpha.c ++++ b/src/gcc/config/alpha/alpha.c +@@ -2658,12 +2658,12 @@ + break; + + case GE: case GT: case GEU: case GTU: +- /* These must be swapped. */ +- if (op1 != CONST0_RTX (cmp_mode)) +- { +- code = swap_condition (code); +- tem = op0, op0 = op1, op1 = tem; +- } ++ /* These normally need swapping, but for integer zero we have ++ special patterns that recognize swapped operands. */ ++ if (cmp_mode == DImode && op1 == const0_rtx) ++ break; ++ code = swap_condition (code); ++ tem = op0, op0 = op1, op1 = tem; + break; + + default: +@@ -3025,12 +3025,9 @@ + operands[1] = op1; + out = gen_reg_rtx (DImode); + +- /* What's actually returned is -1,0,1, not a proper boolean value, +- so use an EXPR_LIST as with a generic libcall instead of a +- comparison type expression. */ +- note = gen_rtx_EXPR_LIST (VOIDmode, op1, NULL_RTX); +- note = gen_rtx_EXPR_LIST (VOIDmode, op0, note); +- note = gen_rtx_EXPR_LIST (VOIDmode, func, note); ++ /* What's actually returned is -1,0,1, not a proper boolean value. */ ++ note = gen_rtx_fmt_ee (cmp_code, VOIDmode, op0, op1); ++ note = gen_rtx_UNSPEC (DImode, gen_rtvec (1, note), UNSPEC_XFLT_COMPARE); + alpha_emit_xfloating_libcall (func, out, operands, 2, note); + + return out; +--- a/src/gcc/config/alpha/alpha.md ++++ b/src/gcc/config/alpha/alpha.md +@@ -25,6 +25,7 @@ + ;; Uses of UNSPEC in this file: + + (define_c_enum "unspec" [ ++ UNSPEC_XFLT_COMPARE + UNSPEC_ARG_HOME + UNSPEC_LDGP1 + UNSPEC_INSXH --- a/src/gcc/config/arm/arm1020e.md +++ b/src/gcc/config/arm/arm1020e.md @@ -66,13 +66,13 @@ @@ -58020,6 +58180,22 @@ "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])" "stosb" [(set_attr "type" "str") +@@ -17190,6 +17194,7 @@ + "(TARGET_READ_MODIFY_WRITE || optimize_insn_for_size_p ()) + && peep2_reg_dead_p (4, operands[0]) + && !reg_overlap_mentioned_p (operands[0], operands[1]) ++ && !reg_overlap_mentioned_p (operands[0], operands[2]) + && (<MODE>mode != QImode + || immediate_operand (operands[2], QImode) + || q_regs_operand (operands[2], QImode)) +@@ -17254,6 +17259,7 @@ + || immediate_operand (operands[2], SImode) + || q_regs_operand (operands[2], SImode)) + && !reg_overlap_mentioned_p (operands[0], operands[1]) ++ && !reg_overlap_mentioned_p (operands[0], operands[2]) + && ix86_match_ccmode (peep2_next_insn (3), + (GET_CODE (operands[3]) == PLUS + || GET_CODE (operands[3]) == MINUS) --- a/src/gcc/config/i386/sse.md +++ b/src/gcc/config/i386/sse.md @@ -11167,7 +11167,8 @@ @@ -58628,7 +58804,7 @@ +++ b/src/gcc/DATESTAMP @@ -1 +1 @@ -20130411 -+20130603 ++20130626 --- a/src/gcc/dwarf2out.c +++ b/src/gcc/dwarf2out.c @@ -22538,7 +22538,7 @@ @@ -58659,7 +58835,16 @@ { --- a/src/gcc/fortran/ChangeLog +++ b/src/gcc/fortran/ChangeLog -@@ -1,3 +1,49 @@ +@@ -1,3 +1,58 @@ ++2013-06-06 Tobias Burnus <burnus@net-b.de> ++ ++ Backport from mainline ++ 2012-08-27 Tobias Burnus <burnus@net-b.de> ++ ++ PR fortran/54370 ++ * trans-stmt.c (gfc_trans_do_while): Don't change the logical ++ kind for negation of the condition. ++ +2013-06-01 Janus Weil <janus@gcc.gnu.org> + Tobias Burnus <burnus@net-b.de> + @@ -59111,6 +59296,17 @@ size_t gfc_target_expr_size (gfc_expr *); /* Write a constant expression in binary form to a target buffer. */ +--- a/src/gcc/fortran/trans-stmt.c ++++ b/src/gcc/fortran/trans-stmt.c +@@ -1743,7 +1743,7 @@ + gfc_conv_expr_val (&cond, code->expr1); + gfc_add_block_to_block (&block, &cond.pre); + cond.expr = fold_build1_loc (code->expr1->where.lb->location, +- TRUTH_NOT_EXPR, boolean_type_node, cond.expr); ++ TRUTH_NOT_EXPR, TREE_TYPE (cond.expr), cond.expr); + + /* Build "IF (! cond) GOTO exit_label". */ + tmp = build1_v (GOTO_EXPR, exit_label); --- a/src/gcc/fwprop.c +++ b/src/gcc/fwprop.c @@ -664,7 +664,12 @@ @@ -59167,7 +59363,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 1 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" /* -*- indented-text -*- */ /* Process source files and output type information. Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 @@ -59176,7 +59372,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 25 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" #ifdef GENERATOR_FILE #include "bconfig.h" #else @@ -59225,7 +59421,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 63 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" /* Do this on entry to yylex(): */ *yylval = 0; @@ -59243,7 +59439,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 74 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { BEGIN(in_struct); return TYPEDEF; @@ -59252,7 +59448,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 78 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { BEGIN(in_struct); return STRUCT; @@ -59261,7 +59457,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 82 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { BEGIN(in_struct); return UNION; @@ -59270,7 +59466,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 86 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { BEGIN(in_struct); return EXTERN; @@ -59279,7 +59475,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 90 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { BEGIN(in_struct); return STATIC; @@ -59288,7 +59484,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 95 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { BEGIN(in_struct); return DEFVEC_OP; @@ -59297,7 +59493,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 99 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { BEGIN(in_struct); return DEFVEC_I; @@ -59306,7 +59502,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 103 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { BEGIN(in_struct); return DEFVEC_ALLOC; @@ -59315,21 +59511,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 111 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 113 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 114 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 12: @@ -59338,7 +59534,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 116 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" /* don't care */ YY_BREAK case 13: @@ -59347,7 +59543,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 117 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { return GTY_TOKEN; } YY_BREAK case 14: @@ -59356,7 +59552,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 118 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { return VEC_TOKEN; } YY_BREAK case 15: @@ -59365,7 +59561,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 119 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { return UNION; } YY_BREAK case 16: @@ -59374,7 +59570,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 120 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { return STRUCT; } YY_BREAK case 17: @@ -59383,7 +59579,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 121 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { return ENUM; } YY_BREAK case 18: @@ -59392,7 +59588,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 122 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { return PTR_ALIAS; } YY_BREAK case 19: @@ -59401,13 +59597,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 123 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 124 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { return NUM; } YY_BREAK case 21: @@ -59416,7 +59612,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 125 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext, yyleng, yyleng+1); return PARAM_IS; @@ -59425,12 +59621,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 131 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 131 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { size_t len; @@ -59439,7 +59635,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 143 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext, yyleng, yyleng+1); return ID; @@ -59448,7 +59644,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 148 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng-1); return STRING; @@ -59457,7 +59653,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 153 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng-1); return ARRAY; @@ -59466,7 +59662,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 157 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng); return CHAR; @@ -59475,13 +59671,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 162 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 163 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { return yytext[0]; } YY_BREAK /* ignore pp-directives */ @@ -59489,13 +59685,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 166 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 168 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { error_at_line (&lexer_line, "unexpected character `%s'", yytext); } @@ -59504,35 +59700,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 173 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 174 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 176 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 177 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 177 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 178 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { update_lineno (yytext, yyleng); } YY_BREAK case 38: @@ -59541,7 +59737,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 179 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK @@ -59549,16 +59745,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 182 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 184 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 184 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 42: @@ -59567,29 +59763,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 185 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 187 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 188 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 191 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 191 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" { error_at_line (&lexer_line, "unterminated comment or string; unexpected EOF"); @@ -59598,13 +59794,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 196 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 198 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1654 "gengtype-lex.c" @@ -59628,7 +59824,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-RC-20130614/gcc-4.7-RC-20130614/gcc/gengtype-lex.l" ++#line 198 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" @@ -61645,7 +61841,7 @@ --- a/src/gcc/LINARO-VERSION +++ b/src/gcc/LINARO-VERSION @@ -0,0 +1 @@ -+4.7-2013.05-1~dev ++4.7-2013.07 --- a/src/gcc/lower-subreg.c +++ b/src/gcc/lower-subreg.c @@ -233,9 +233,9 @@ @@ -62777,7 +62973,20 @@ bool, false) --- a/src/gcc/testsuite/ChangeLog +++ b/src/gcc/testsuite/ChangeLog -@@ -1,3 +1,120 @@ +@@ -1,3 +1,133 @@ ++2013-06-09 Jakub Jelinek <jakub@redhat.com> ++ ++ PR target/57568 ++ * gcc.c-torture/execute/pr57568.c: New test. ++ ++2013-06-06 Tobias Burnus <burnus@net-b.de> ++ ++ Backport from mainline ++ 2012-08-27 Tobias Burnus <burnus@net-b.de> ++ ++ PR fortran/54370 ++ * gfortran.dg/do_5.f90: New. ++ +2013-06-01 Janus Weil <janus@gcc.gnu.org> + Tobias Burnus <burnus@net-b.de> + @@ -63428,6 +63637,21 @@ +#endif + return 0; +} +--- a/src/gcc/testsuite/gcc.c-torture/execute/pr57568.c ++++ b/src/gcc/testsuite/gcc.c-torture/execute/pr57568.c +@@ -0,0 +1,12 @@ ++/* PR target/57568 */ ++ ++extern void abort (void); ++int a[6][9] = { }, b = 1, *c = &a[3][5]; ++ ++int ++main () ++{ ++ if (b && (*c = *c + *c)) ++ abort (); ++ return 0; ++} --- a/src/gcc/testsuite/gcc.dg/20020312-2.c +++ b/src/gcc/testsuite/gcc.dg/20020312-2.c @@ -92,6 +92,8 @@ @@ -76920,6 +77144,38 @@ C { dg-skip-if "No stabs" {*-*-* } { "*" } { "-gstabs" } } common i,j common /label/l,m +--- a/src/gcc/testsuite/gfortran.dg/do_5.f90 ++++ b/src/gcc/testsuite/gfortran.dg/do_5.f90 +@@ -0,0 +1,29 @@ ++! { dg-do compile } ++! ++! PR fortran/54370 ++! ++! The following program was ICEing at tree-check time ++! "L()" was regarded as default-kind logical. ++! ++! Contributed by Kirill Chilikin ++! ++ MODULE M ++ CONTAINS ++ ++ LOGICAL(C_BOOL) FUNCTION L() BIND(C) ++ USE, INTRINSIC :: ISO_C_BINDING ++ L = .FALSE. ++ END FUNCTION ++ ++ LOGICAL(8) FUNCTION L2() BIND(C) ! { dg-warning "may not be a C interoperable kind but it is bind" } ++ L2 = .FALSE._8 ++ END FUNCTION ++ ++ SUBROUTINE S() ++ DO WHILE (L()) ++ ENDDO ++ DO WHILE (L2()) ++ ENDDO ++ END ++ ++ END --- a/src/gcc/testsuite/gfortran.dg/namelist_77.f90 +++ b/src/gcc/testsuite/gfortran.dg/namelist_77.f90 @@ -0,0 +1,49 @@ @@ -77820,6 +78076,61 @@ + return 0 + } +} +--- a/src/gcc/tlink.c ++++ b/src/gcc/tlink.c +@@ -2,7 +2,7 @@ + them. + + Copyright (C) 1995, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2007, 2008, +- 2009, 2010, 2011 Free Software Foundation, Inc. ++ 2009, 2010, 2011, 2013 Free Software Foundation, Inc. + Contributed by Jason Merrill (jason@cygnus.com). + + This file is part of GCC. +@@ -820,18 +820,18 @@ + void + do_tlink (char **ld_argv, char **object_lst ATTRIBUTE_UNUSED) + { +- int exit = tlink_execute ("ld", ld_argv, ldout, lderrout); ++ int ret = tlink_execute ("ld", ld_argv, ldout, lderrout); + + tlink_init (); + +- if (exit) ++ if (ret) + { + int i = 0; + + /* Until collect does a better job of figuring out which are object + files, assume that everything on the command line could be. */ + if (read_repo_files (ld_argv)) +- while (exit && i++ < MAX_ITERATIONS) ++ while (ret && i++ < MAX_ITERATIONS) + { + if (tlink_verbose >= 3) + { +@@ -846,7 +846,7 @@ + break; + if (tlink_verbose) + fprintf (stderr, _("collect: relinking\n")); +- exit = tlink_execute ("ld", ld_argv, ldout, lderrout); ++ ret = tlink_execute ("ld", ld_argv, ldout, lderrout); + } + } + +@@ -854,9 +854,9 @@ + unlink (ldout); + dump_file (lderrout, stderr); + unlink (lderrout); +- if (exit) ++ if (ret) + { +- error ("ld returned %d exit status", exit); +- collect_exit (exit); ++ error ("ld returned %d exit status", ret); ++ exit (ret); + } + } --- a/src/gcc/tree.c +++ b/src/gcc/tree.c @@ -9358,6 +9358,7 @@ @@ -79219,9 +79530,8 @@ <!-- --- a/src/LAST_UPDATED +++ b/src/LAST_UPDATED -@@ -1 +1 @@ +@@ -1 +0,0 @@ -Obtained from SVN: tags/gcc_4_7_3_release revision 197739 -+Obtained from SVN: branches/gcc-4_7-branch revision --- a/src/libcpp/ChangeLog.aarch64 +++ b/src/libcpp/ChangeLog.aarch64 @@ -0,0 +1,13 @@ @@ -79330,9 +79640,42 @@ #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.07/libcpp/po/be.gmo differ +Binary files gcc-4.7.3/libcpp/po/ca.gmo and gcc-linaro-4.7-2013.07/libcpp/po/ca.gmo differ +Binary files gcc-4.7.3/libcpp/po/da.gmo and gcc-linaro-4.7-2013.07/libcpp/po/da.gmo differ +Binary files gcc-4.7.3/libcpp/po/de.gmo and gcc-linaro-4.7-2013.07/libcpp/po/de.gmo differ +Binary files gcc-4.7.3/libcpp/po/el.gmo and gcc-linaro-4.7-2013.07/libcpp/po/el.gmo differ +Binary files gcc-4.7.3/libcpp/po/eo.gmo and gcc-linaro-4.7-2013.07/libcpp/po/eo.gmo differ +Binary files gcc-4.7.3/libcpp/po/es.gmo and gcc-linaro-4.7-2013.07/libcpp/po/es.gmo differ +Binary files gcc-4.7.3/libcpp/po/fi.gmo and gcc-linaro-4.7-2013.07/libcpp/po/fi.gmo differ +Binary files gcc-4.7.3/libcpp/po/fr.gmo and gcc-linaro-4.7-2013.07/libcpp/po/fr.gmo differ +Binary files gcc-4.7.3/libcpp/po/id.gmo and gcc-linaro-4.7-2013.07/libcpp/po/id.gmo differ +Binary files gcc-4.7.3/libcpp/po/ja.gmo and gcc-linaro-4.7-2013.07/libcpp/po/ja.gmo differ +Binary files gcc-4.7.3/libcpp/po/nl.gmo and gcc-linaro-4.7-2013.07/libcpp/po/nl.gmo differ +Binary files gcc-4.7.3/libcpp/po/ru.gmo and gcc-linaro-4.7-2013.07/libcpp/po/ru.gmo differ +Binary files gcc-4.7.3/libcpp/po/sr.gmo and gcc-linaro-4.7-2013.07/libcpp/po/sr.gmo differ +Binary files gcc-4.7.3/libcpp/po/sv.gmo and gcc-linaro-4.7-2013.07/libcpp/po/sv.gmo differ +Binary files gcc-4.7.3/libcpp/po/tr.gmo and gcc-linaro-4.7-2013.07/libcpp/po/tr.gmo differ +Binary files gcc-4.7.3/libcpp/po/uk.gmo and gcc-linaro-4.7-2013.07/libcpp/po/uk.gmo differ +Binary files gcc-4.7.3/libcpp/po/vi.gmo and gcc-linaro-4.7-2013.07/libcpp/po/vi.gmo differ +Binary files gcc-4.7.3/libcpp/po/zh_CN.gmo and gcc-linaro-4.7-2013.07/libcpp/po/zh_CN.gmo differ +Binary files gcc-4.7.3/libcpp/po/zh_TW.gmo and gcc-linaro-4.7-2013.07/libcpp/po/zh_TW.gmo differ --- a/src/libgcc/ChangeLog +++ b/src/libgcc/ChangeLog -@@ -1,3 +1,18 @@ +@@ -1,3 +1,31 @@ ++2013-06-08 Walter Lee <walt@tilera.com> ++ ++ Backport from mainline: ++ 2013-06-08 Walter Lee <walt@tilera.com> ++ ++ * config/tilepro/atomic.h: Don't include stdint.h or features.h. ++ Replace int64_t with long long. Add __extension__ where ++ appropriate. ++ ++2013-06-06 Douglas B Rupp <rupp@adacore.com> ++ ++ * config.host (arm-wrs-vxworks): Configure with other soft float. ++ +2013-05-20 Chung-Ju Wu <jasonwucj@gmail.com> + + Backport from mainline: @@ -80253,6 +80596,122 @@ @@ -1 +1 @@ -LIB1ASMFUNCS += _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _call_via_rX _interwork_call_via_rX _clzsi2 _clzdi2 +LIB1ASMFUNCS += _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _call_via_rX _interwork_call_via_rX _clzsi2 _clzdi2 _ctzsi2 +--- a/src/libgcc/config/tilepro/atomic.h ++++ b/src/libgcc/config/tilepro/atomic.h +@@ -1,6 +1,5 @@ + /* Macros for atomic functionality for tile. +- Copyright (C) 2011, 2012 +- Free Software Foundation, Inc. ++ Copyright (C) 2011-2013 Free Software Foundation, Inc. + Contributed by Walter Lee (walt@tilera.com) + + This file is free software; you can redistribute it and/or modify it +@@ -93,8 +92,6 @@ + compare-and-exchange routine, so may be potentially less efficient. */ + #endif + +-#include <stdint.h> +-#include <features.h> + #ifdef __tilegx__ + #include <arch/spr_def.h> + #else +@@ -123,9 +120,9 @@ + + /* 64-bit integer compare-and-exchange. */ + static __inline __attribute__ ((always_inline)) +- int64_t arch_atomic_val_compare_and_exchange_8 (volatile int64_t * mem, +- int64_t oldval, +- int64_t newval) ++ long long arch_atomic_val_compare_and_exchange_8 (volatile long long ++ *mem, long long oldval, ++ long long newval) + { + #ifdef __tilegx__ + __insn_mtspr (SPR_CMPEXCH_VALUE, oldval); +@@ -140,7 +137,7 @@ + "R04" (newval_lo), "R05" (newval_hi), + "m" (*mem):"r20", "r21", "r22", "r23", "r24", "r25", + "r26", "r27", "r28", "r29", "memory"); +- return ((uint64_t) result_hi) << 32 | result_lo; ++ return ((long long) result_hi) << 32 | result_lo; + #endif + } + +@@ -151,11 +148,11 @@ + + + #define arch_atomic_val_compare_and_exchange(mem, o, n) \ +- ({ \ ++ __extension__ ({ \ + (__typeof(*(mem)))(__typeof(*(mem)-*(mem))) \ + ((sizeof(*(mem)) == 8) ? \ + arch_atomic_val_compare_and_exchange_8( \ +- (volatile int64_t*)(mem), (__typeof((o)-(o)))(o), \ ++ (volatile long long*)(mem), (__typeof((o)-(o)))(o), \ + (__typeof((n)-(n)))(n)) : \ + (sizeof(*(mem)) == 4) ? \ + arch_atomic_val_compare_and_exchange_4( \ +@@ -165,7 +162,7 @@ + }) + + #define arch_atomic_bool_compare_and_exchange(mem, o, n) \ +- ({ \ ++ __extension__ ({ \ + __typeof(o) __o = (o); \ + __builtin_expect( \ + __o == arch_atomic_val_compare_and_exchange((mem), __o, (n)), 1); \ +@@ -175,7 +172,7 @@ + /* Loop with compare_and_exchange until we guess the correct value. + Normally "expr" will be an expression using __old and __value. */ + #define __arch_atomic_update_cmpxchg(mem, value, expr) \ +- ({ \ ++ __extension__ ({ \ + __typeof(value) __value = (value); \ + __typeof(*(mem)) *__mem = (mem), __old = *__mem, __guess; \ + do { \ +@@ -190,12 +187,14 @@ + /* Generic atomic op with 8- or 4-byte variant. + The _mask, _addend, and _expr arguments are ignored on tilegx. */ + #define __arch_atomic_update(mem, value, op, _mask, _addend, _expr) \ +- ({ \ ++ __extension__ ({ \ + ((__typeof(*(mem))) \ + ((sizeof(*(mem)) == 8) ? (__typeof(*(mem)-*(mem)))__insn_##op( \ +- (void *)(mem), (int64_t)(__typeof((value)-(value)))(value)) : \ ++ (volatile void *)(mem), \ ++ (long long)(__typeof((value)-(value)))(value)) : \ + (sizeof(*(mem)) == 4) ? (int)__insn_##op##4( \ +- (void *)(mem), (int32_t)(__typeof((value)-(value)))(value)) : \ ++ (volatile void *)(mem), \ ++ (int)(__typeof((value)-(value)))(value)) : \ + __arch_atomic_error_bad_argument_size())); \ + }) + +@@ -225,7 +224,7 @@ + /* Generic atomic op with 8- or 4-byte variant. + The _op argument is ignored on tilepro. */ + #define __arch_atomic_update(mem, value, _op, mask, addend, expr) \ +- ({ \ ++ __extension__ ({ \ + (__typeof(*(mem)))(__typeof(*(mem)-*(mem))) \ + ((sizeof(*(mem)) == 8) ? \ + __arch_atomic_update_cmpxchg((mem), (value), (expr)) : \ +@@ -264,13 +263,13 @@ + __arch_atomic_update_cmpxchg(mem, mask, ~(__old & __value)) + + #define arch_atomic_bit_set(mem, bit) \ +- ({ \ ++ __extension__ ({ \ + __typeof(*(mem)) __mask = (__typeof(*(mem)))1 << (bit); \ + __mask & arch_atomic_or((mem), __mask); \ + }) + + #define arch_atomic_bit_clear(mem, bit) \ +- ({ \ ++ __extension__ ({ \ + __typeof(*(mem)) __mask = (__typeof(*(mem)))1 << (bit); \ + __mask & arch_atomic_and((mem), ~__mask); \ + }) --- a/src/libgcc/config.host +++ b/src/libgcc/config.host @@ -83,6 +83,9 @@ @@ -80282,6 +80741,15 @@ alpha*-*-linux*) tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee t-crtfm alpha/t-linux" extra_parts="$extra_parts crtfastmath.o" +@@ -315,7 +328,7 @@ + md_unwind_header=alpha/vms-unwind.h + ;; + arm-wrs-vxworks) +- tmake_file="$tmake_file arm/t-arm arm/t-vxworks t-fdpbit" ++ tmake_file="$tmake_file arm/t-arm arm/t-vxworks t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" + extra_parts="$extra_parts crti.o crtn.o" + ;; + arm*-*-freebsd*) --- a/src/libgcc/longlong.h +++ b/src/libgcc/longlong.h @@ -203,7 +203,8 @@ @@ -80979,44 +81447,3 @@ // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } // { dg-require-cstdint "" } ---- a/src/maintainer-scripts/gcc_release -+++ b/src/maintainer-scripts/gcc_release -@@ -144,7 +144,7 @@ - fi - - # Tag the sources. -- if [ -n "${TAG}" ]; then -+ if false || [ -n "${TAG}" ]; then - inform "Tagging sources as ${TAG}" - # We don't want to overwrite an existing tag. So, if the tag - # already exists, issue an error message; the release manager can -@@ -157,13 +157,14 @@ - error "Could not tag sources" - SVNBRANCH=${TAG} - fi -- SVNREV=`${SVN} info "${SVNROOT}/${SVNBRANCH}"|awk '/Revision:/ {print $2}'` -+ #SVNREV=`${SVN} info "${SVNROOT}/${SVNBRANCH}"|awk '/Revision:/ {print $2}'` - - # Export the current sources. -- inform "Retrieving sources (svn export -r ${SVNREV} ${SVNROOT}/${SVNBRANCH})" -+ inform "Copying sources (cp -a /scratch/packages/gcc/bzr/4.7 ...)" - -- ${SVN} -q export -r${SVNREV} "${SVNROOT}/${SVNBRANCH}" "`basename ${SOURCE_DIRECTORY}`" ||\ -- error "Could not retrieve sources" -+ #${SVN} -q export -r${SVNREV} "${SVNROOT}/${SVNBRANCH}" "`basename ${SOURCE_DIRECTORY}`" ||\ -+ # error "Could not retrieve sources" -+ cp -a /scratch/packages/gcc/bzr/4.7 "`basename ${SOURCE_DIRECTORY}`" - - # Run gcc_update on them to set up the timestamps nicely, and (re)write - # the LAST_UPDATED file containing the SVN tag/revision used. -@@ -184,8 +185,8 @@ - ${SOURCE_DIRECTORY}/gcc/doc/install.texi2html - - # Regenerate the NEWS file. -- contrib/gennews > NEWS || \ -- error "Could not regenerate NEWS files" -+ #contrib/gennews > NEWS || \ -+ # error "Could not regenerate NEWS files" - - # Now, we must build the compiler in order to create any generated - # files that are supposed to go in the source directory. This is diff --git a/debian/patches/svn-updates-linaro.diff b/debian/patches/svn-updates-linaro.diff index 47d1fd9..f5b76b3 100644 --- a/debian/patches/svn-updates-linaro.diff +++ b/debian/patches/svn-updates-linaro.diff @@ -1,382 +1,762 @@ -# DP: updates from the 4.7 branch upto 20130614 (r200084). +# DP: updates from the 4.7 branch upto 20130715 (r200955). last_updated() { cat > ${dir}LAST_UPDATED <<EOF -Fri Jun 14 09:56:44 CEST 2013 -Fri Jun 14 07:56:44 UTC 2013 (revision 200084) +Mon Jul 15 11:09:50 CEST 2013 +Mon Jul 15 09:09:50 UTC 2013 (revision 200955) EOF } -LANG=C svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@199594 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@200408 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: libgcc/config.host -=================================================================== ---- a/src/libgcc/config.host (revision -+++ b/src/libgcc/config.host (revision -@@ -315,7 +315,7 @@ - md_unwind_header=alpha/vms-unwind.h - ;; - arm-wrs-vxworks) -- tmake_file="$tmake_file arm/t-arm arm/t-vxworks t-fdpbit" -+ tmake_file="$tmake_file arm/t-arm arm/t-vxworks t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" - extra_parts="$extra_parts crti.o crtn.o" - ;; - arm*-*-freebsd*) -Index: libgcc/ChangeLog -=================================================================== ---- a/src/libgcc/ChangeLog (revision -+++ b/src/libgcc/ChangeLog (revision -@@ -1,3 +1,16 @@ -+2013-06-08 Walter Lee <walt@tilera.com> -+ -+ Backport from mainline: -+ 2013-06-08 Walter Lee <walt@tilera.com> -+ -+ * config/tilepro/atomic.h: Don't include stdint.h or features.h. -+ Replace int64_t with long long. Add __extension__ where -+ appropriate. -+ -+2013-06-06 Douglas B Rupp <rupp@adacore.com> -+ -+ * config.host (arm-wrs-vxworks): Configure with other soft float. -+ - 2013-05-20 Chung-Ju Wu <jasonwucj@gmail.com> - - Backport from mainline: -Index: libgcc/config/tilepro/atomic.h -=================================================================== ---- a/src/libgcc/config/tilepro/atomic.h (revision -+++ b/src/libgcc/config/tilepro/atomic.h (revision -@@ -1,6 +1,5 @@ - /* Macros for atomic functionality for tile. -- Copyright (C) 2011, 2012 -- Free Software Foundation, Inc. -+ Copyright (C) 2011-2013 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is free software; you can redistribute it and/or modify it -@@ -93,8 +92,6 @@ - compare-and-exchange routine, so may be potentially less efficient. */ - #endif - --#include <stdint.h> --#include <features.h> - #ifdef __tilegx__ - #include <arch/spr_def.h> - #else -@@ -123,9 +120,9 @@ - - /* 64-bit integer compare-and-exchange. */ - static __inline __attribute__ ((always_inline)) -- int64_t arch_atomic_val_compare_and_exchange_8 (volatile int64_t * mem, -- int64_t oldval, -- int64_t newval) -+ long long arch_atomic_val_compare_and_exchange_8 (volatile long long -+ *mem, long long oldval, -+ long long newval) - { - #ifdef __tilegx__ - __insn_mtspr (SPR_CMPEXCH_VALUE, oldval); -@@ -140,7 +137,7 @@ - "R04" (newval_lo), "R05" (newval_hi), - "m" (*mem):"r20", "r21", "r22", "r23", "r24", "r25", - "r26", "r27", "r28", "r29", "memory"); -- return ((uint64_t) result_hi) << 32 | result_lo; -+ return ((long long) result_hi) << 32 | result_lo; - #endif - } - -@@ -151,11 +148,11 @@ - - - #define arch_atomic_val_compare_and_exchange(mem, o, n) \ -- ({ \ -+ __extension__ ({ \ - (__typeof(*(mem)))(__typeof(*(mem)-*(mem))) \ - ((sizeof(*(mem)) == 8) ? \ - arch_atomic_val_compare_and_exchange_8( \ -- (volatile int64_t*)(mem), (__typeof((o)-(o)))(o), \ -+ (volatile long long*)(mem), (__typeof((o)-(o)))(o), \ - (__typeof((n)-(n)))(n)) : \ - (sizeof(*(mem)) == 4) ? \ - arch_atomic_val_compare_and_exchange_4( \ -@@ -165,7 +162,7 @@ - }) - - #define arch_atomic_bool_compare_and_exchange(mem, o, n) \ -- ({ \ -+ __extension__ ({ \ - __typeof(o) __o = (o); \ - __builtin_expect( \ - __o == arch_atomic_val_compare_and_exchange((mem), __o, (n)), 1); \ -@@ -175,7 +172,7 @@ - /* Loop with compare_and_exchange until we guess the correct value. - Normally "expr" will be an expression using __old and __value. */ - #define __arch_atomic_update_cmpxchg(mem, value, expr) \ -- ({ \ -+ __extension__ ({ \ - __typeof(value) __value = (value); \ - __typeof(*(mem)) *__mem = (mem), __old = *__mem, __guess; \ - do { \ -@@ -190,12 +187,14 @@ - /* Generic atomic op with 8- or 4-byte variant. - The _mask, _addend, and _expr arguments are ignored on tilegx. */ - #define __arch_atomic_update(mem, value, op, _mask, _addend, _expr) \ -- ({ \ -+ __extension__ ({ \ - ((__typeof(*(mem))) \ - ((sizeof(*(mem)) == 8) ? (__typeof(*(mem)-*(mem)))__insn_##op( \ -- (void *)(mem), (int64_t)(__typeof((value)-(value)))(value)) : \ -+ (volatile void *)(mem), \ -+ (long long)(__typeof((value)-(value)))(value)) : \ - (sizeof(*(mem)) == 4) ? (int)__insn_##op##4( \ -- (void *)(mem), (int32_t)(__typeof((value)-(value)))(value)) : \ -+ (volatile void *)(mem), \ -+ (int)(__typeof((value)-(value)))(value)) : \ - __arch_atomic_error_bad_argument_size())); \ - }) - -@@ -225,7 +224,7 @@ - /* Generic atomic op with 8- or 4-byte variant. - The _op argument is ignored on tilepro. */ - #define __arch_atomic_update(mem, value, _op, mask, addend, expr) \ -- ({ \ -+ __extension__ ({ \ - (__typeof(*(mem)))(__typeof(*(mem)-*(mem))) \ - ((sizeof(*(mem)) == 8) ? \ - __arch_atomic_update_cmpxchg((mem), (value), (expr)) : \ -@@ -264,13 +263,13 @@ - __arch_atomic_update_cmpxchg(mem, mask, ~(__old & __value)) - - #define arch_atomic_bit_set(mem, bit) \ -- ({ \ -+ __extension__ ({ \ - __typeof(*(mem)) __mask = (__typeof(*(mem)))1 << (bit); \ - __mask & arch_atomic_or((mem), __mask); \ - }) - - #define arch_atomic_bit_clear(mem, bit) \ -- ({ \ -+ __extension__ ({ \ - __typeof(*(mem)) __mask = (__typeof(*(mem)))1 << (bit); \ - __mask & arch_atomic_and((mem), ~__mask); \ - }) Index: gcc/DATESTAMP =================================================================== --- a/src/gcc/DATESTAMP (revision +++ b/src/gcc/DATESTAMP (revision @@ -1 +1 @@ --20130603 -+20130614 +-20130626 ++20130715 Index: gcc/ChangeLog =================================================================== --- a/src/gcc/ChangeLog (revision +++ b/src/gcc/ChangeLog (revision -@@ -1,3 +1,31 @@ -+2013-06-07 Uros Bizjak <ubizjak@gmail.com> +@@ -1,3 +1,51 @@ ++2013-07-11 Georg-Johann Lay <avr@gjlay.de> + -+ Backport from mainline -+ 2013-06-10 Uros Bizjak <ubizjak@gmail.com> ++ Backport from 2013-07-11 trunk r200901. + -+ * config/alpha/alpha.c (alpha_emit_xfloating_compare): Also use -+ cmp_code to construct REG_EQUAL note. ++ PR target/57631 ++ * config/avr/avr.c (avr_set_current_function): Sanity-check signal ++ name seen by assembler/linker if available. + -+ Backport from mainline -+ 2013-06-05 Uros Bizjak <ubizjak@gmail.com> ++2013-07-10 Georg-Johann Lay <avr@gjlay.de> ++ ++ Backport from 2013-07-10 trunk r200872. ++ ++ PR target/57844 ++ * config/avr/avr.c (avr_prologue_setup_frame): Trunk -size to mode ++ of my_fp. + -+ * config/alpha/alpha.c (alpha_emit_conditional_move): Swap all -+ GE, GT, GEU and GTU compares, modulo DImode compares with zero. ++2013-07-10 Uros Bizjak <ubizjak@gmail.com> + + Backport from mainline -+ 2013-05-23 Uros Bizjak <ubizjak@gmail.com> ++ 2013-07-06 Uros Bizjak <ubizjak@gmail.com> ++ ++ * config/i386/sse.md (sse_movlhps): Change alternative 3 ++ of operand 2 to "m". ++ ++2013-07-09 Joseph Myers <joseph@codesourcery.com> ++ ++ * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Only ++ adjust register size for TDmode and TFmode for VSX registers. ++ ++2013-07-08 Eric Botcazou <ebotcazou@adacore.com> ++ ++ * Makefile.in (tree-ssa-reassoc.o): Add dependency on $(PARAMS_H). + -+ PR target/57379 -+ * config/alpha/alpha.md (unspec): Add UNSPEC_XFLT_COMPARE. -+ * config/alpha/alpha.c (alpha_emit_xfloating_compare): Construct -+ REG_EQUAL note as UNSPEC_XFLT_COMPARE unspec. ++2013-07-08 Jakub Jelinek <jakub@redhat.com> + -+2013-06-09 Jakub Jelinek <jakub@redhat.com> ++ PR rtl-optimization/57829 ++ * simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Ensure that ++ mask bits outside of mode are just sign-extension from mode to HWI. + -+ PR target/57568 -+ * config/i386/i386.md (TARGET_READ_MODIFY_WRITE peepholes): Ensure -+ that operands[2] doesn't overlap with operands[0]. ++2013-07-05 Uros Bizjak <ubizjak@gmail.com> + - 2013-05-22 Uros Bizjak <ubizjak@gmail.com> ++ Backport from mainline ++ 2013-06-20 Uros Bizjak <ubizjak@gmail.com> ++ ++ PR target/57655 ++ * config/i386/i386.c (construct_container): Report error if ++ long double is used with disabled x87 float returns. ++ + 2013-06-21 David Edelsohn <dje.gcc@gmail.com> - PR target/57356 -Index: gcc/testsuite/gfortran.dg/do_5.f90 + Backport from mainline +Index: gcc/testsuite/gcc.target/i386/pr57655.c =================================================================== ---- a/src/gcc/testsuite/gfortran.dg/do_5.f90 (revision -+++ b/src/gcc/testsuite/gfortran.dg/do_5.f90 (revision -@@ -0,0 +1,29 @@ +--- a/src/gcc/testsuite/gcc.target/i386/pr57655.c (revision ++++ b/src/gcc/testsuite/gcc.target/i386/pr57655.c (revision +@@ -0,0 +1,10 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mavx -mvzeroupper -mno-fp-ret-in-387" } ++ ++/* { dg-error "x87 register return with x87 disabled" "" { target { ! ia32 } } 8 } */ ++ ++long double ++foo (long double x) ++{ ++ return __builtin_ilogbl (x); ++} +Index: gcc/testsuite/gfortran.dg/dot_product_2.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/dot_product_2.f90 (revision ++++ b/src/gcc/testsuite/gfortran.dg/dot_product_2.f90 (revision +@@ -0,0 +1,38 @@ +! { dg-do compile } ++! { dg-options "-fdump-tree-original" } +! -+! PR fortran/54370 ++! PR fortran/57785 +! -+! The following program was ICEing at tree-check time -+! "L()" was regarded as default-kind logical. ++! Contributed by Kontantinos Anagnostopoulos +! -+! Contributed by Kirill Chilikin ++! The implicit complex conjugate was missing for DOT_PRODUCT ++ ++ ++! For the following, the compile-time simplification fails for SUM; ++! see PR fortran/56342. Hence, a manually expanded SUM is used. ++ ++!if (DOT_PRODUCT ((/ (1.0, 2.0), (2.0, 3.0) /), (/ (1.0, 1.0), (1.0, 4.0) /)) & ++! /= SUM (CONJG ((/ (1.0, 2.0), (2.0, 3.0) /))*(/ (1.0, 1.0), (1.0, 4.0) /))) & ++! call abort () +! -+ MODULE M -+ CONTAINS -+ -+ LOGICAL(C_BOOL) FUNCTION L() BIND(C) -+ USE, INTRINSIC :: ISO_C_BINDING -+ L = .FALSE. -+ END FUNCTION -+ -+ LOGICAL(8) FUNCTION L2() BIND(C) ! { dg-warning "may not be a C interoperable kind but it is bind" } -+ L2 = .FALSE._8 -+ END FUNCTION -+ -+ SUBROUTINE S() -+ DO WHILE (L()) -+ ENDDO -+ DO WHILE (L2()) -+ ENDDO -+ END -+ -+ END -Index: gcc/testsuite/gcc.c-torture/execute/pr57568.c ++!if (ANY (MATMUL ((/ (1.0, 2.0), (2.0, 3.0) /), & ++! RESHAPE ((/ (1.0, 1.0), (1.0, 4.0) /),(/2, 1/))) /= & ++! SUM ((/ (1.0, 2.0), (2.0, 3.0) /)*(/ (1.0, 1.0), (1.0, 4.0) /)))) & ++! call abort () ++ ++ ++if (DOT_PRODUCT ((/ (1.0, 2.0), (2.0, 3.0) /), (/ (1.0, 1.0), (1.0, 4.0) /)) & ++ /= CONJG (cmplx(1.0, 2.0)) * cmplx(1.0, 1.0) & ++ + CONJG (cmplx(2.0, 3.0)) * cmplx(1.0, 4.0)) & ++ call abort () ++ ++if (ANY (MATMUL ((/ (1.0, 2.0), (2.0, 3.0) /), & ++ RESHAPE ((/ (1.0, 1.0), (1.0, 4.0) /),(/2, 1/))) & ++ /= cmplx(1.0, 2.0) * cmplx(1.0, 1.0) & ++ + cmplx(2.0, 3.0) * cmplx(1.0, 4.0))) & ++ call abort () ++end ++ ++ ++! { dg-final { scan-tree-dump-not "abort" "original" } } ++! { dg-final { cleanup-tree-dump "original" } } +Index: gcc/testsuite/gcc.c-torture/execute/pr57829.c =================================================================== ---- a/src/gcc/testsuite/gcc.c-torture/execute/pr57568.c (revision -+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr57568.c (revision -@@ -0,0 +1,12 @@ -+/* PR target/57568 */ +--- a/src/gcc/testsuite/gcc.c-torture/execute/pr57829.c (revision ++++ b/src/gcc/testsuite/gcc.c-torture/execute/pr57829.c (revision +@@ -0,0 +1,31 @@ ++/* PR rtl-optimization/57829 */ ++ ++__attribute__((noinline, noclone)) ++int ++f1 (int k) ++{ ++ return 2 | ((k - 1) >> ((int) sizeof (int) * __CHAR_BIT__ - 1)); ++} ++ ++__attribute__((noinline, noclone)) ++long int ++f2 (long int k) ++{ ++ return 2L | ((k - 1L) >> ((int) sizeof (long int) * __CHAR_BIT__ - 1)); ++} + -+extern void abort (void); -+int a[6][9] = { }, b = 1, *c = &a[3][5]; ++__attribute__((noinline, noclone)) ++int ++f3 (int k) ++{ ++ k &= 63; ++ return 4 | ((k + 2) >> 5); ++} + +int +main () +{ -+ if (b && (*c = *c + *c)) -+ abort (); ++ if (f1 (1) != 2 || f2 (1L) != 2L || f3 (63) != 6 || f3 (1) != 4) ++ __builtin_abort (); + return 0; +} Index: gcc/testsuite/ChangeLog =================================================================== --- a/src/gcc/testsuite/ChangeLog (revision +++ b/src/gcc/testsuite/ChangeLog (revision -@@ -1,3 +1,16 @@ -+2013-06-09 Jakub Jelinek <jakub@redhat.com> +@@ -1,3 +1,26 @@ ++2012-12-03 Paolo Carlini <paolo.carlini@oracle.com> ++ ++ PR c++/54170 ++ * g++.dg/cpp0x/lambda/lambda-nullptr.C: New. + -+ PR target/57568 -+ * gcc.c-torture/execute/pr57568.c: New test. ++2013-07-08 Tobias Burnus <burnus@net-b.de> + -+2013-06-06 Tobias Burnus <burnus@net-b.de> ++ PR fortran/57785 ++ * gfortran.dg/dot_product_2.f90: New. ++ ++2013-07-08 Jakub Jelinek <jakub@redhat.com> ++ ++ PR rtl-optimization/57829 ++ * gcc.c-torture/execute/pr57829.c: New test. ++ ++2013-07-05 Uros Bizjak <ubizjak@gmail.com> + + Backport from mainline -+ 2012-08-27 Tobias Burnus <burnus@net-b.de> ++ 2013-06-20 Uros Bizjak <ubizjak@gmail.com> + -+ PR fortran/54370 -+ * gfortran.dg/do_5.f90: New. ++ PR target/57655 ++ * gcc.target/i386/pr57655.c: New test. + - 2013-06-01 Janus Weil <janus@gcc.gnu.org> - Tobias Burnus <burnus@net-b.de> + 2013-06-09 Jakub Jelinek <jakub@redhat.com> -Index: gcc/fortran/ChangeLog + PR target/57568 +Index: gcc/testsuite/g++.dg/debug/template2.C =================================================================== ---- a/src/gcc/fortran/ChangeLog (revision -+++ b/src/gcc/fortran/ChangeLog (revision -@@ -1,3 +1,12 @@ -+2013-06-06 Tobias Burnus <burnus@net-b.de> +--- a/src/gcc/testsuite/g++.dg/debug/template2.C (revision ++++ b/src/gcc/testsuite/g++.dg/debug/template2.C (revision +@@ -0,0 +1,14 @@ ++// PR c++/57545 + -+ Backport from mainline -+ 2012-08-27 Tobias Burnus <burnus@net-b.de> ++template<typename T, long unsigned int N> ++struct array { ++ T data[N]; ++}; ++ ++template<typename T> ++struct derived { ++ typedef long unsigned int size_type; ++ static const size_type n = 42; ++ ++ array<int, n> a; ++}; +Index: gcc/testsuite/g++.dg/expr/const1.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/expr/const1.C (revision ++++ b/src/gcc/testsuite/g++.dg/expr/const1.C (revision +@@ -0,0 +1,9 @@ ++// PR c++/57551 ++ ++extern unsigned long ADDR; ++ ++unsigned long f(){ ++ const unsigned long* const var=&ADDR; ++ const unsigned long retval=var[1]; ++ return retval; ++} +Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C (revision ++++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C (revision +@@ -0,0 +1,26 @@ ++// PR c++/57437 ++// { dg-require-effective-target c++11 } ++ ++struct A { ++ int i; + -+ PR fortran/54370 -+ * trans-stmt.c (gfc_trans_do_while): Don't change the logical -+ kind for negation of the condition. ++ A(): i(42) {} ++ A(const A&) = default; ++ A(A&& a): i(a.i) { a.i = 0; } ++}; + - 2013-06-01 Janus Weil <janus@gcc.gnu.org> - Tobias Burnus <burnus@net-b.de> ++int main() ++{ ++ A x; ++ ++ auto y = [x] () mutable { ++ x.i++; ++ return x; ++ }; ++ ++ if (y().i != 43) ++ __builtin_abort (); ++ ++ if (y().i != 44) ++ __builtin_abort (); ++} +Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C (revision ++++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C (revision +@@ -0,0 +1,47 @@ ++// PR c++/54170 ++// { dg-do run { target c++11 } } ++ ++#include <cassert> ++ ++struct A; ++typedef A* ptr; ++typedef int (A::*pmf) (int); ++typedef int (A::*pdm); ++ ++int total; ++ ++void add(int n) ++{ ++ total += n; ++} ++ ++template <typename RType, typename Callable> ++RType Call(Callable native_func, int arg) ++{ ++ return native_func(arg); ++} ++ ++template <typename RType> ++RType do_test(int delta) ++{ ++ return Call<RType>([=](int delta) { add(delta); return nullptr; }, delta); ++} ++ ++template <typename RType> ++void test() ++{ ++ total = 0; ++ assert (!do_test<RType>(5)); ++ assert (total == 5); ++ assert (!do_test<RType>(20)); ++ assert (total == 25); ++ assert (!do_test<RType>(-256)); ++ assert (total == -231); ++} ++ ++int main() ++{ ++ test<ptr>(); ++ test<pdm>(); ++ test<pmf>(); ++} +Index: gcc/testsuite/g++.dg/template/using23.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/template/using23.C (revision ++++ b/src/gcc/testsuite/g++.dg/template/using23.C (revision +@@ -0,0 +1,15 @@ ++// PR c++/57831 ++ ++struct A { ++ void f(); ++}; ++template <class T> struct B : T { ++ typedef T base; ++ using base::f; // If I write "using B<T>::f" it's ok ++ void g( ) { ++ B<T>::f(); // This is OK as expected ++ (this->*&T::f)(); // This is also OK ++ (this->*&B<T>::f)(); // This causes error ++ } ++}; ++template struct B< A >; +Index: gcc/cp/typeck.c +=================================================================== +--- a/src/gcc/cp/typeck.c (revision ++++ b/src/gcc/cp/typeck.c (revision +@@ -7246,7 +7246,7 @@ + /* Handle null pointer to member function conversions. */ + if (null_ptr_cst_p (pfn)) + { +- pfn = build_c_cast (input_location, type, nullptr_node); ++ pfn = build_c_cast (input_location, type, pfn); + return build_ptrmemfunc1 (to_type, + integer_zero_node, + pfn); +@@ -7929,7 +7929,8 @@ + && TREE_CODE (retval) == VAR_DECL + && DECL_CONTEXT (retval) == current_function_decl + && ! TREE_STATIC (retval) +- && ! DECL_ANON_UNION_VAR_P (retval) ++ /* And not a lambda or anonymous union proxy. */ ++ && !DECL_HAS_VALUE_EXPR_P (retval) + && (DECL_ALIGN (retval) + >= DECL_ALIGN (DECL_RESULT (current_function_decl))) + /* The cv-unqualified type of the returned value must be the +@@ -7978,7 +7979,8 @@ + Note that these conditions are similar to, but not as strict as, + the conditions for the named return value optimization. */ + if ((cxx_dialect != cxx98) +- && (TREE_CODE (retval) == VAR_DECL ++ && ((TREE_CODE (retval) == VAR_DECL ++ && !DECL_HAS_VALUE_EXPR_P (retval)) + || TREE_CODE (retval) == PARM_DECL) + && DECL_CONTEXT (retval) == current_function_decl + && !TREE_STATIC (retval) +Index: gcc/cp/ChangeLog +=================================================================== +--- a/src/gcc/cp/ChangeLog (revision ++++ b/src/gcc/cp/ChangeLog (revision +@@ -1,3 +1,27 @@ ++2012-12-03 Paolo Carlini <paolo.carlini@oracle.com> ++ ++ PR c++/54170 ++ * cvt.c (cp_convert_to_pointer): Don't discard side-effects from ++ expressions of nullptr_t. ++ * typeck.c (build_ptrmemfunc): Likewise. ++ ++2013-07-09 Jason Merrill <jason@redhat.com> ++ ++ PR c++/57437 ++ * typeck.c (check_return_expr): Lambda proxies aren't eligible ++ for nrv or return by move. ++ ++ PR c++/57545 ++ * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the ++ argument to have the exact type of the parameter. ++ ++ PR c++/57551 ++ * semantics.c (cxx_eval_indirect_ref): Don't try to look through ++ a POINTER_PLUS_EXPR for type punning diagnostic. ++ ++ PR c++/57831 ++ * pt.c (tsubst_copy): Handle USING_DECL. ++ + 2013-05-20 Jason Merrill <jason@redhat.com> -Index: gcc/fortran/trans-stmt.c + PR c++/57325 +Index: gcc/cp/pt.c =================================================================== ---- a/src/gcc/fortran/trans-stmt.c (revision -+++ b/src/gcc/fortran/trans-stmt.c (revision -@@ -1743,7 +1743,7 @@ - gfc_conv_expr_val (&cond, code->expr1); - gfc_add_block_to_block (&block, &cond.pre); - cond.expr = fold_build1_loc (code->expr1->where.lb->location, -- TRUTH_NOT_EXPR, boolean_type_node, cond.expr); -+ TRUTH_NOT_EXPR, TREE_TYPE (cond.expr), cond.expr); - - /* Build "IF (! cond) GOTO exit_label". */ - tmp = build1_v (GOTO_EXPR, exit_label); -Index: gcc/config/alpha/alpha.md +--- a/src/gcc/cp/pt.c (revision ++++ b/src/gcc/cp/pt.c (revision +@@ -5521,6 +5521,10 @@ + else + return NULL_TREE; + } ++ ++ /* Avoid typedef problems. */ ++ if (TREE_TYPE (expr) != type) ++ expr = fold_convert (type, expr); + } + /* [temp.arg.nontype]/5, bullet 2 + +@@ -12214,6 +12218,9 @@ + case TYPE_DECL: + return tsubst (t, args, complain, in_decl); + ++ case USING_DECL: ++ t = DECL_NAME (t); ++ /* Fall through. */ + case IDENTIFIER_NODE: + if (IDENTIFIER_TYPENAME_P (t)) + { +Index: gcc/cp/semantics.c =================================================================== ---- a/src/gcc/config/alpha/alpha.md (revision -+++ b/src/gcc/config/alpha/alpha.md (revision -@@ -25,6 +25,7 @@ - ;; Uses of UNSPEC in this file: - - (define_c_enum "unspec" [ -+ UNSPEC_XFLT_COMPARE - UNSPEC_ARG_HOME - UNSPEC_LDGP1 - UNSPEC_INSXH -Index: gcc/config/alpha/alpha.c +--- a/src/gcc/cp/semantics.c (revision ++++ b/src/gcc/cp/semantics.c (revision +@@ -7459,11 +7459,6 @@ + { + tree sub = op0; + STRIP_NOPS (sub); +- if (TREE_CODE (sub) == POINTER_PLUS_EXPR) +- { +- sub = TREE_OPERAND (sub, 0); +- STRIP_NOPS (sub); +- } + if (TREE_CODE (sub) == ADDR_EXPR) + { + /* We couldn't fold to a constant value. Make sure it's not +Index: gcc/cp/cvt.c =================================================================== ---- a/src/gcc/config/alpha/alpha.c (revision -+++ b/src/gcc/config/alpha/alpha.c (revision -@@ -2658,12 +2658,12 @@ - break; - - case GE: case GT: case GEU: case GTU: -- /* These must be swapped. */ -- if (op1 != CONST0_RTX (cmp_mode)) +--- a/src/gcc/cp/cvt.c (revision ++++ b/src/gcc/cp/cvt.c (revision +@@ -198,6 +198,8 @@ + + if (null_ptr_cst_p (expr)) + { ++ tree val; ++ + if (c_inhibit_evaluation_warnings == 0 + && !NULLPTR_TYPE_P (TREE_TYPE (expr))) + warning (OPT_Wzero_as_null_pointer_constant, +@@ -207,16 +209,14 @@ + return build_ptrmemfunc (TYPE_PTRMEMFUNC_FN_TYPE (type), expr, 0, + /*c_cast_p=*/false, tf_warning_or_error); + +- if (TYPE_PTRMEM_P (type)) - { -- code = swap_condition (code); -- tem = op0, op0 = op1, op1 = tem; +- /* A NULL pointer-to-member is represented by -1, not by +- zero. */ +- expr = build_int_cst_type (type, -1); - } -+ /* These normally need swapping, but for integer zero we have -+ special patterns that recognize swapped operands. */ -+ if (cmp_mode == DImode && op1 == const0_rtx) -+ break; -+ code = swap_condition (code); -+ tem = op0, op0 = op1, op1 = tem; - break; - - default: -@@ -3025,12 +3025,9 @@ - operands[1] = op1; - out = gen_reg_rtx (DImode); - -- /* What's actually returned is -1,0,1, not a proper boolean value, -- so use an EXPR_LIST as with a generic libcall instead of a -- comparison type expression. */ -- note = gen_rtx_EXPR_LIST (VOIDmode, op1, NULL_RTX); -- note = gen_rtx_EXPR_LIST (VOIDmode, op0, note); -- note = gen_rtx_EXPR_LIST (VOIDmode, func, note); -+ /* What's actually returned is -1,0,1, not a proper boolean value. */ -+ note = gen_rtx_fmt_ee (cmp_code, VOIDmode, op0, op1); -+ note = gen_rtx_UNSPEC (DImode, gen_rtvec (1, note), UNSPEC_XFLT_COMPARE); - alpha_emit_xfloating_libcall (func, out, operands, 2, note); - - return out; -Index: gcc/config/i386/i386.md +- else +- expr = build_int_cst (type, 0); ++ /* A NULL pointer-to-data-member is represented by -1, not by ++ zero. */ ++ val = (TYPE_PTRMEM_P (type) ++ ? build_int_cst_type (type, -1) ++ : build_int_cst (type, 0)); + +- return expr; ++ return (TREE_SIDE_EFFECTS (expr) ++ ? build2 (COMPOUND_EXPR, type, expr, val) : val); + } + else if (TYPE_PTR_TO_MEMBER_P (type) && INTEGRAL_CODE_P (form)) + { +Index: gcc/fortran/ChangeLog =================================================================== ---- a/src/gcc/config/i386/i386.md (revision -+++ b/src/gcc/config/i386/i386.md (revision -@@ -17194,6 +17194,7 @@ - "(TARGET_READ_MODIFY_WRITE || optimize_insn_for_size_p ()) - && peep2_reg_dead_p (4, operands[0]) - && !reg_overlap_mentioned_p (operands[0], operands[1]) -+ && !reg_overlap_mentioned_p (operands[0], operands[2]) - && (<MODE>mode != QImode - || immediate_operand (operands[2], QImode) - || q_regs_operand (operands[2], QImode)) -@@ -17258,6 +17259,7 @@ - || immediate_operand (operands[2], SImode) - || q_regs_operand (operands[2], SImode)) - && !reg_overlap_mentioned_p (operands[0], operands[1]) -+ && !reg_overlap_mentioned_p (operands[0], operands[2]) - && ix86_match_ccmode (peep2_next_insn (3), - (GET_CODE (operands[3]) == PLUS - || GET_CODE (operands[3]) == MINUS) +--- a/src/gcc/fortran/ChangeLog (revision ++++ b/src/gcc/fortran/ChangeLog (revision +@@ -1,3 +1,10 @@ ++2013-07-08 Tobias Burnus <burnus@net-b.de> ++ ++ PR fortran/57785 ++ * simplify.c (compute_dot_product): Complex conjugate for ++ dot_product. ++ (gfc_simplify_dot_product, gfc_simplify_matmul): Update call. ++ + 2013-06-06 Tobias Burnus <burnus@net-b.de> + + Backport from mainline +Index: gcc/fortran/simplify.c +=================================================================== +--- a/src/gcc/fortran/simplify.c (revision ++++ b/src/gcc/fortran/simplify.c (revision +@@ -332,13 +332,15 @@ + } + + +-/* Helper function for gfc_simplify_dot_product() and gfc_simplify_matmul. */ ++/* Helper function for gfc_simplify_dot_product() and gfc_simplify_matmul; ++ if conj_a is true, the matrix_a is complex conjugated. */ + + static gfc_expr * + compute_dot_product (gfc_expr *matrix_a, int stride_a, int offset_a, +- gfc_expr *matrix_b, int stride_b, int offset_b) ++ gfc_expr *matrix_b, int stride_b, int offset_b, ++ bool conj_a) + { +- gfc_expr *result, *a, *b; ++ gfc_expr *result, *a, *b, *c; + + result = gfc_get_constant_expr (matrix_a->ts.type, matrix_a->ts.kind, + &matrix_a->where); +@@ -361,9 +363,11 @@ + case BT_INTEGER: + case BT_REAL: + case BT_COMPLEX: +- result = gfc_add (result, +- gfc_multiply (gfc_copy_expr (a), +- gfc_copy_expr (b))); ++ if (conj_a && a->ts.type == BT_COMPLEX) ++ c = gfc_simplify_conjg (a); ++ else ++ c = gfc_copy_expr (a); ++ result = gfc_add (result, gfc_multiply (c, gfc_copy_expr (b))); + break; + + default: +@@ -1877,7 +1881,7 @@ + gcc_assert (vector_b->rank == 1); + gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts)); + +- return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0); ++ return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true); + } + + +@@ -3883,7 +3887,7 @@ + for (row = 0; row < result_rows; ++row) + { + gfc_expr *e = compute_dot_product (matrix_a, stride_a, offset_a, +- matrix_b, 1, offset_b); ++ matrix_b, 1, offset_b, false); + gfc_constructor_append_expr (&result->value.constructor, + e, NULL); + +Index: gcc/simplify-rtx.c +=================================================================== +--- a/src/gcc/simplify-rtx.c (revision ++++ b/src/gcc/simplify-rtx.c (revision +@@ -2558,6 +2558,7 @@ + HOST_WIDE_INT mask = INTVAL (trueop1) << count; + + if (mask >> count == INTVAL (trueop1) ++ && trunc_int_for_mode (mask, mode) == mask + && (mask & nonzero_bits (XEXP (op0, 0), mode)) == 0) + return simplify_gen_binary (ASHIFTRT, mode, + plus_constant (XEXP (op0, 0), mask), +Index: gcc/Makefile.in +=================================================================== +--- a/src/gcc/Makefile.in (revision ++++ b/src/gcc/Makefile.in (revision +@@ -2570,7 +2570,7 @@ + $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) \ + tree-iterator.h $(BASIC_BLOCK_H) $(GIMPLE_H) $(TREE_INLINE_H) \ + $(VEC_H) langhooks.h alloc-pool.h pointer-set.h $(CFGLOOP_H) \ +- tree-pretty-print.h gimple-pretty-print.h $(DIAGNOSTIC_CORE_H) ++ tree-pretty-print.h gimple-pretty-print.h $(DIAGNOSTIC_CORE_H) $(PARAMS_H) + tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ + $(TREE_H) $(TM_P_H) $(GGC_H) output.h \ + $(DIAGNOSTIC_H) $(BASIC_BLOCK_H) $(FLAGS_H) $(TIMEVAR_H) $(TM_H) \ +Index: gcc/config/i386/sse.md +=================================================================== +--- a/src/gcc/config/i386/sse.md (revision ++++ b/src/gcc/config/i386/sse.md (revision +@@ -3276,7 +3276,7 @@ + (vec_select:V4SF + (vec_concat:V8SF + (match_operand:V4SF 1 "nonimmediate_operand" " 0,x,0,x,0") +- (match_operand:V4SF 2 "nonimmediate_operand" " x,x,m,x,x")) ++ (match_operand:V4SF 2 "nonimmediate_operand" " x,x,m,m,x")) + (parallel [(const_int 0) + (const_int 1) + (const_int 4) +Index: gcc/config/i386/i386.c +=================================================================== +--- a/src/gcc/config/i386/i386.c (revision ++++ b/src/gcc/config/i386/i386.c (revision +@@ -6303,7 +6303,7 @@ + + /* Likewise, error if the ABI requires us to return values in the + x87 registers and the user specified -mno-80387. */ +- if (!TARGET_80387 && in_return) ++ if (!TARGET_FLOAT_RETURNS_IN_80387 && in_return) + for (i = 0; i < n; i++) + if (regclass[i] == X86_64_X87_CLASS + || regclass[i] == X86_64_X87UP_CLASS +Index: gcc/config/avr/avr.c +=================================================================== +--- a/src/gcc/config/avr/avr.c (revision ++++ b/src/gcc/config/avr/avr.c (revision +@@ -549,7 +549,12 @@ + { + tree args = TYPE_ARG_TYPES (TREE_TYPE (decl)); + tree ret = TREE_TYPE (TREE_TYPE (decl)); +- const char *name = IDENTIFIER_POINTER (DECL_NAME (decl)); ++ const char *name; ++ ++ name = DECL_ASSEMBLER_NAME_SET_P (decl) ++ /* Remove the leading '*' added in set_user_assembler_name. */ ++ ? 1 + IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)) ++ : IDENTIFIER_POINTER (DECL_NAME (decl)); + + /* Silently ignore 'signal' if 'interrupt' is present. AVR-LibC startet + using this when it switched from SIGNAL and INTERRUPT to ISR. */ +@@ -1004,7 +1009,7 @@ + leaf function and thus X has already been saved. */ + + int irq_state = -1; +- HOST_WIDE_INT size_cfa = size; ++ HOST_WIDE_INT size_cfa = size, neg_size; + rtx fp_plus_insns, fp, my_fp; + + gcc_assert (frame_pointer_needed +@@ -1043,6 +1048,7 @@ + } + + size = trunc_int_for_mode (size, GET_MODE (my_fp)); ++ neg_size = trunc_int_for_mode (-size, GET_MODE (my_fp)); + + /************ Method 1: Adjust frame pointer ************/ + +@@ -1062,7 +1068,7 @@ + gen_rtx_SET (VOIDmode, fp, stack_pointer_rtx)); + } + +- insn = emit_move_insn (my_fp, plus_constant (my_fp, -size)); ++ insn = emit_move_insn (my_fp, plus_constant (my_fp, neg_size)); + if (frame_pointer_needed) + { + RTX_FRAME_RELATED_P (insn) = 1; +Index: gcc/config/rs6000/rs6000.c +=================================================================== +--- a/src/gcc/config/rs6000/rs6000.c (revision ++++ b/src/gcc/config/rs6000/rs6000.c (revision +@@ -2402,7 +2402,8 @@ + int reg_size2 = reg_size; + + /* TFmode/TDmode always takes 2 registers, even in VSX. */ +- if (m == TDmode || m == TFmode) ++ if (TARGET_VSX && VSX_REG_CLASS_P (c) ++ && (m == TDmode || m == TFmode)) + reg_size2 = UNITS_PER_FP_WORD; + + rs6000_class_max_nregs[m][c] +Index: libgfortran/ChangeLog +=================================================================== +--- a/src/libgfortran/ChangeLog (revision ++++ b/src/libgfortran/ChangeLog (revision +@@ -1,3 +1,19 @@ ++2013-07-03 Uros Bizjak <ubizjak@gmail.com> ++ ++ Backport from mainline ++ 2013-06-20 Uros Bizjak <ubizjak@gmail.com> ++ ++ * config/fpu-387.h (_FPU_MASK_ALL): New. ++ (_FPU_EX_ALL): Ditto. ++ (set_fpu): Use fstcw to store x87 FPU control word. Use fnclex to ++ clear stalled exception flags. Correctly clear stalled SSE ++ exception flags. Simplify code. ++ ++ Backport from mainline ++ 2013-06-19 Uros Bizjak <ubizjak@gmail.com> ++ ++ * config/fpu-387.h: Use __asm__ and __volatile__ consistently. ++ + 2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + Backport from mainline: +Index: libgfortran/config/fpu-387.h +=================================================================== +--- a/src/libgfortran/config/fpu-387.h (revision ++++ b/src/libgfortran/config/fpu-387.h (revision +@@ -73,7 +73,7 @@ + + /* We need a single SSE instruction here so the handler can safely skip + over it. */ +- __asm__ volatile ("movaps %xmm0,%xmm0"); ++ __asm__ __volatile__ ("movaps\t%xmm0,%xmm0"); + + sigaction (SIGILL, &oact, NULL); + +@@ -95,42 +95,42 @@ + #define _FPU_MASK_OM 0x08 + #define _FPU_MASK_UM 0x10 + #define _FPU_MASK_PM 0x20 ++#define _FPU_MASK_ALL 0x3f + ++#define _FPU_EX_ALL 0x3f ++ + void set_fpu (void) + { ++ int excepts = 0; + unsigned short cw; + +- asm volatile ("fnstcw %0" : "=m" (cw)); ++ __asm__ __volatile__ ("fstcw\t%0" : "=m" (cw)); + +- cw |= (_FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM | _FPU_MASK_OM +- | _FPU_MASK_UM | _FPU_MASK_PM); ++ if (options.fpe & GFC_FPE_INVALID) excepts |= _FPU_MASK_IM; ++ if (options.fpe & GFC_FPE_DENORMAL) excepts |= _FPU_MASK_DM; ++ if (options.fpe & GFC_FPE_ZERO) excepts |= _FPU_MASK_ZM; ++ if (options.fpe & GFC_FPE_OVERFLOW) excepts |= _FPU_MASK_OM; ++ if (options.fpe & GFC_FPE_UNDERFLOW) excepts |= _FPU_MASK_UM; ++ if (options.fpe & GFC_FPE_INEXACT) excepts |= _FPU_MASK_PM; + +- if (options.fpe & GFC_FPE_INVALID) cw &= ~_FPU_MASK_IM; +- if (options.fpe & GFC_FPE_DENORMAL) cw &= ~_FPU_MASK_DM; +- if (options.fpe & GFC_FPE_ZERO) cw &= ~_FPU_MASK_ZM; +- if (options.fpe & GFC_FPE_OVERFLOW) cw &= ~_FPU_MASK_OM; +- if (options.fpe & GFC_FPE_UNDERFLOW) cw &= ~_FPU_MASK_UM; +- if (options.fpe & GFC_FPE_INEXACT) cw &= ~_FPU_MASK_PM; ++ cw |= _FPU_MASK_ALL; ++ cw &= ~excepts; + +- asm volatile ("fldcw %0" : : "m" (cw)); ++ __asm__ __volatile__ ("fnclex\n\tfldcw\t%0" : : "m" (cw)); + + if (has_sse()) + { + unsigned int cw_sse; + +- asm volatile ("%vstmxcsr %0" : "=m" (cw_sse)); ++ __asm__ __volatile__ ("%vstmxcsr\t%0" : "=m" (cw_sse)); + +- cw_sse &= 0xffff0000; +- cw_sse |= (_FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM | _FPU_MASK_OM +- | _FPU_MASK_UM | _FPU_MASK_PM ) << 7; ++ /* The SSE exception masks are shifted by 7 bits. */ ++ cw_sse |= _FPU_MASK_ALL << 7; ++ cw_sse &= ~(excepts << 7); + +- if (options.fpe & GFC_FPE_INVALID) cw_sse &= ~(_FPU_MASK_IM << 7); +- if (options.fpe & GFC_FPE_DENORMAL) cw_sse &= ~(_FPU_MASK_DM << 7); +- if (options.fpe & GFC_FPE_ZERO) cw_sse &= ~(_FPU_MASK_ZM << 7); +- if (options.fpe & GFC_FPE_OVERFLOW) cw_sse &= ~(_FPU_MASK_OM << 7); +- if (options.fpe & GFC_FPE_UNDERFLOW) cw_sse &= ~(_FPU_MASK_UM << 7); +- if (options.fpe & GFC_FPE_INEXACT) cw_sse &= ~(_FPU_MASK_PM << 7); ++ /* Clear stalled exception flags. */ ++ cw_sse &= ~_FPU_EX_ALL; + +- asm volatile ("%vldmxcsr %0" : : "m" (cw_sse)); ++ __asm__ __volatile__ ("%vldmxcsr\t%0" : : "m" (cw_sse)); + } + } diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff index 61a6eb2..96741e2 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 20130614 (r200084). +# DP: updates from the 4.7 branch upto 20130715 (r200955). last_updated() { cat > ${dir}LAST_UPDATED <<EOF -Fri Jun 14 09:56:44 CEST 2013 -Fri Jun 14 07:56:44 UTC 2013 (revision 200084) +Mon Jul 15 11:09:50 CEST 2013 +Mon Jul 15 09:09:50 UTC 2013 (revision 200955) EOF } @@ -464,7 +464,7 @@ Index: gcc/DATESTAMP +++ b/src/gcc/DATESTAMP (.../branches/gcc-4_7-branch) @@ -1 +1 @@ -20130411 -+20130614 ++20130715 Index: gcc/builtins.c =================================================================== --- a/src/gcc/builtins.c (.../tags/gcc_4_7_3_release) @@ -491,7 +491,69 @@ 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,248 @@ +@@ -1,3 +1,310 @@ ++2013-07-11 Georg-Johann Lay <avr@gjlay.de> ++ ++ Backport from 2013-07-11 trunk r200901. ++ ++ PR target/57631 ++ * config/avr/avr.c (avr_set_current_function): Sanity-check signal ++ name seen by assembler/linker if available. ++ ++2013-07-10 Georg-Johann Lay <avr@gjlay.de> ++ ++ Backport from 2013-07-10 trunk r200872. ++ ++ PR target/57844 ++ * config/avr/avr.c (avr_prologue_setup_frame): Trunk -size to mode ++ of my_fp. ++ ++2013-07-10 Uros Bizjak <ubizjak@gmail.com> ++ ++ Backport from mainline ++ 2013-07-06 Uros Bizjak <ubizjak@gmail.com> ++ ++ * config/i386/sse.md (sse_movlhps): Change alternative 3 ++ of operand 2 to "m". ++ ++2013-07-09 Joseph Myers <joseph@codesourcery.com> ++ ++ * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Only ++ adjust register size for TDmode and TFmode for VSX registers. ++ ++2013-07-08 Eric Botcazou <ebotcazou@adacore.com> ++ ++ * Makefile.in (tree-ssa-reassoc.o): Add dependency on $(PARAMS_H). ++ ++2013-07-08 Jakub Jelinek <jakub@redhat.com> ++ ++ PR rtl-optimization/57829 ++ * simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Ensure that ++ mask bits outside of mode are just sign-extension from mode to HWI. ++ ++2013-07-05 Uros Bizjak <ubizjak@gmail.com> ++ ++ Backport from mainline ++ 2013-06-20 Uros Bizjak <ubizjak@gmail.com> ++ ++ PR target/57655 ++ * config/i386/i386.c (construct_container): Report error if ++ long double is used with disabled x87 float returns. ++ ++2013-06-21 David Edelsohn <dje.gcc@gmail.com> ++ ++ Backport from mainline ++ 2013-06-19 David Edelsohn <dje.gcc@gmail.com> ++ ++ PR driver/57652 ++ * collect2.c (collect_atexit): New. ++ (collect_exit): Delete. ++ (main): Register collect_atexit with atexit. ++ (collect_wait): Change collect_exit to exit. ++ (do_wait): Same. ++ * collect2.h (collect_exit): Delete. ++ * tlink.c (do_tlink): Rename exit to ret. Change collect_exit to exit. ++ +2013-06-07 Uros Bizjak <ubizjak@gmail.com> + + Backport from mainline @@ -863,6 +925,21 @@ Index: gcc/testsuite/gcc.target/i386/pr57098.c +{ + *p = __builtin_shuffle (*p, *mask); +} +Index: gcc/testsuite/gcc.target/i386/pr57655.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/i386/pr57655.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gcc.target/i386/pr57655.c (.../branches/gcc-4_7-branch) +@@ -0,0 +1,10 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mavx -mvzeroupper -mno-fp-ret-in-387" } ++ ++/* { dg-error "x87 register return with x87 disabled" "" { target { ! ia32 } } 8 } */ ++ ++long double ++foo (long double x) ++{ ++ return __builtin_ilogbl (x); ++} Index: gcc/testsuite/gcc.target/sh/pr57108.c =================================================================== --- a/src/gcc/testsuite/gcc.target/sh/pr57108.c (.../tags/gcc_4_7_3_release) @@ -1054,6 +1131,49 @@ Index: gcc/testsuite/gfortran.dg/namelist_79.f90 + if (.not. tracer(3)%lini) call abort + +end program testje +Index: gcc/testsuite/gfortran.dg/dot_product_2.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/dot_product_2.f90 (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gfortran.dg/dot_product_2.f90 (.../branches/gcc-4_7-branch) +@@ -0,0 +1,38 @@ ++! { dg-do compile } ++! { dg-options "-fdump-tree-original" } ++! ++! PR fortran/57785 ++! ++! Contributed by Kontantinos Anagnostopoulos ++! ++! The implicit complex conjugate was missing for DOT_PRODUCT ++ ++ ++! For the following, the compile-time simplification fails for SUM; ++! see PR fortran/56342. Hence, a manually expanded SUM is used. ++ ++!if (DOT_PRODUCT ((/ (1.0, 2.0), (2.0, 3.0) /), (/ (1.0, 1.0), (1.0, 4.0) /)) & ++! /= SUM (CONJG ((/ (1.0, 2.0), (2.0, 3.0) /))*(/ (1.0, 1.0), (1.0, 4.0) /))) & ++! call abort () ++! ++!if (ANY (MATMUL ((/ (1.0, 2.0), (2.0, 3.0) /), & ++! RESHAPE ((/ (1.0, 1.0), (1.0, 4.0) /),(/2, 1/))) /= & ++! SUM ((/ (1.0, 2.0), (2.0, 3.0) /)*(/ (1.0, 1.0), (1.0, 4.0) /)))) & ++! call abort () ++ ++ ++if (DOT_PRODUCT ((/ (1.0, 2.0), (2.0, 3.0) /), (/ (1.0, 1.0), (1.0, 4.0) /)) & ++ /= CONJG (cmplx(1.0, 2.0)) * cmplx(1.0, 1.0) & ++ + CONJG (cmplx(2.0, 3.0)) * cmplx(1.0, 4.0)) & ++ call abort () ++ ++if (ANY (MATMUL ((/ (1.0, 2.0), (2.0, 3.0) /), & ++ RESHAPE ((/ (1.0, 1.0), (1.0, 4.0) /),(/2, 1/))) & ++ /= cmplx(1.0, 2.0) * cmplx(1.0, 1.0) & ++ + cmplx(2.0, 3.0) * cmplx(1.0, 4.0))) & ++ call abort () ++end ++ ++ ++! { dg-final { scan-tree-dump-not "abort" "original" } } ++! { dg-final { cleanup-tree-dump "original" } } 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) @@ -1278,6 +1398,42 @@ Index: gcc/testsuite/gfortran.dg/namelist_78.f90 + if (der%d(1)%k%j /= 1) call abort + if (der%d(2)%k%j /= 2) call abort +end program namelist +Index: gcc/testsuite/gcc.c-torture/execute/pr57829.c +=================================================================== +--- a/src/gcc/testsuite/gcc.c-torture/execute/pr57829.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gcc.c-torture/execute/pr57829.c (.../branches/gcc-4_7-branch) +@@ -0,0 +1,31 @@ ++/* PR rtl-optimization/57829 */ ++ ++__attribute__((noinline, noclone)) ++int ++f1 (int k) ++{ ++ return 2 | ((k - 1) >> ((int) sizeof (int) * __CHAR_BIT__ - 1)); ++} ++ ++__attribute__((noinline, noclone)) ++long int ++f2 (long int k) ++{ ++ return 2L | ((k - 1L) >> ((int) sizeof (long int) * __CHAR_BIT__ - 1)); ++} ++ ++__attribute__((noinline, noclone)) ++int ++f3 (int k) ++{ ++ k &= 63; ++ return 4 | ((k + 2) >> 5); ++} ++ ++int ++main () ++{ ++ if (f1 (1) != 2 || f2 (1L) != 2L || f3 (63) != 6 || f3 (1) != 4) ++ __builtin_abort (); ++ return 0; ++} Index: gcc/testsuite/gcc.c-torture/execute/pr57568.c =================================================================== --- a/src/gcc/testsuite/gcc.c-torture/execute/pr57568.c (.../tags/gcc_4_7_3_release) @@ -1509,7 +1665,30 @@ 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,133 @@ +@@ -1,3 +1,156 @@ ++2012-12-03 Paolo Carlini <paolo.carlini@oracle.com> ++ ++ PR c++/54170 ++ * g++.dg/cpp0x/lambda/lambda-nullptr.C: New. ++ ++2013-07-08 Tobias Burnus <burnus@net-b.de> ++ ++ PR fortran/57785 ++ * gfortran.dg/dot_product_2.f90: New. ++ ++2013-07-08 Jakub Jelinek <jakub@redhat.com> ++ ++ PR rtl-optimization/57829 ++ * gcc.c-torture/execute/pr57829.c: New test. ++ ++2013-07-05 Uros Bizjak <ubizjak@gmail.com> ++ ++ Backport from mainline ++ 2013-06-20 Uros Bizjak <ubizjak@gmail.com> ++ ++ PR target/57655 ++ * gcc.target/i386/pr57655.c: New test. ++ +2013-06-09 Jakub Jelinek <jakub@redhat.com> + + PR target/57568 @@ -1643,6 +1822,39 @@ Index: gcc/testsuite/ChangeLog 2013-04-11 Release Manager * GCC 4.7.3 released. +Index: gcc/testsuite/g++.dg/debug/template2.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/debug/template2.C (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/g++.dg/debug/template2.C (.../branches/gcc-4_7-branch) +@@ -0,0 +1,14 @@ ++// PR c++/57545 ++ ++template<typename T, long unsigned int N> ++struct array { ++ T data[N]; ++}; ++ ++template<typename T> ++struct derived { ++ typedef long unsigned int size_type; ++ static const size_type n = 42; ++ ++ array<int, n> a; ++}; +Index: gcc/testsuite/g++.dg/expr/const1.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/expr/const1.C (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/g++.dg/expr/const1.C (.../branches/gcc-4_7-branch) +@@ -0,0 +1,9 @@ ++// PR c++/57551 ++ ++extern unsigned long ADDR; ++ ++unsigned long f(){ ++ const unsigned long* const var=&ADDR; ++ const unsigned long retval=var[1]; ++ return retval; ++} Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C =================================================================== --- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C (.../tags/gcc_4_7_3_release) @@ -1662,6 +1874,89 @@ Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C + } + }(); +} +Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C (.../branches/gcc-4_7-branch) +@@ -0,0 +1,26 @@ ++// PR c++/57437 ++// { dg-require-effective-target c++11 } ++ ++struct A { ++ int i; ++ ++ A(): i(42) {} ++ A(const A&) = default; ++ A(A&& a): i(a.i) { a.i = 0; } ++}; ++ ++int main() ++{ ++ A x; ++ ++ auto y = [x] () mutable { ++ x.i++; ++ return x; ++ }; ++ ++ if (y().i != 43) ++ __builtin_abort (); ++ ++ if (y().i != 44) ++ __builtin_abort (); ++} +Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C (.../branches/gcc-4_7-branch) +@@ -0,0 +1,47 @@ ++// PR c++/54170 ++// { dg-do run { target c++11 } } ++ ++#include <cassert> ++ ++struct A; ++typedef A* ptr; ++typedef int (A::*pmf) (int); ++typedef int (A::*pdm); ++ ++int total; ++ ++void add(int n) ++{ ++ total += n; ++} ++ ++template <typename RType, typename Callable> ++RType Call(Callable native_func, int arg) ++{ ++ return native_func(arg); ++} ++ ++template <typename RType> ++RType do_test(int delta) ++{ ++ return Call<RType>([=](int delta) { add(delta); return nullptr; }, delta); ++} ++ ++template <typename RType> ++void test() ++{ ++ total = 0; ++ assert (!do_test<RType>(5)); ++ assert (total == 5); ++ assert (!do_test<RType>(20)); ++ assert (total == 25); ++ assert (!do_test<RType>(-256)); ++ assert (total == -231); ++} ++ ++int main() ++{ ++ test<ptr>(); ++ test<pdm>(); ++ test<pmf>(); ++} 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) @@ -1766,6 +2061,59 @@ Index: gcc/testsuite/g++.dg/template/array26.C + SimpleJets < double >b; + TestJets (&b); +} +Index: gcc/testsuite/g++.dg/template/using23.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/template/using23.C (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/g++.dg/template/using23.C (.../branches/gcc-4_7-branch) +@@ -0,0 +1,15 @@ ++// PR c++/57831 ++ ++struct A { ++ void f(); ++}; ++template <class T> struct B : T { ++ typedef T base; ++ using base::f; // If I write "using B<T>::f" it's ok ++ void g( ) { ++ B<T>::f(); // This is OK as expected ++ (this->*&T::f)(); // This is also OK ++ (this->*&B<T>::f)(); // This causes error ++ } ++}; ++template struct B< A >; +Index: gcc/cp/typeck.c +=================================================================== +--- a/src/gcc/cp/typeck.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/cp/typeck.c (.../branches/gcc-4_7-branch) +@@ -7246,7 +7246,7 @@ + /* Handle null pointer to member function conversions. */ + if (null_ptr_cst_p (pfn)) + { +- pfn = build_c_cast (input_location, type, nullptr_node); ++ pfn = build_c_cast (input_location, type, pfn); + return build_ptrmemfunc1 (to_type, + integer_zero_node, + pfn); +@@ -7929,7 +7929,8 @@ + && TREE_CODE (retval) == VAR_DECL + && DECL_CONTEXT (retval) == current_function_decl + && ! TREE_STATIC (retval) +- && ! DECL_ANON_UNION_VAR_P (retval) ++ /* And not a lambda or anonymous union proxy. */ ++ && !DECL_HAS_VALUE_EXPR_P (retval) + && (DECL_ALIGN (retval) + >= DECL_ALIGN (DECL_RESULT (current_function_decl))) + /* The cv-unqualified type of the returned value must be the +@@ -7978,7 +7979,8 @@ + Note that these conditions are similar to, but not as strict as, + the conditions for the named return value optimization. */ + if ((cxx_dialect != cxx98) +- && (TREE_CODE (retval) == VAR_DECL ++ && ((TREE_CODE (retval) == VAR_DECL ++ && !DECL_HAS_VALUE_EXPR_P (retval)) + || TREE_CODE (retval) == PARM_DECL) + && DECL_CONTEXT (retval) == current_function_decl + && !TREE_STATIC (retval) Index: gcc/cp/tree.c =================================================================== --- a/src/gcc/cp/tree.c (.../tags/gcc_4_7_3_release) @@ -1789,7 +2137,31 @@ 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,24 @@ +@@ -1,3 +1,48 @@ ++2012-12-03 Paolo Carlini <paolo.carlini@oracle.com> ++ ++ PR c++/54170 ++ * cvt.c (cp_convert_to_pointer): Don't discard side-effects from ++ expressions of nullptr_t. ++ * typeck.c (build_ptrmemfunc): Likewise. ++ ++2013-07-09 Jason Merrill <jason@redhat.com> ++ ++ PR c++/57437 ++ * typeck.c (check_return_expr): Lambda proxies aren't eligible ++ for nrv or return by move. ++ ++ PR c++/57545 ++ * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the ++ argument to have the exact type of the parameter. ++ ++ PR c++/57551 ++ * semantics.c (cxx_eval_indirect_ref): Don't try to look through ++ a POINTER_PLUS_EXPR for type punning diagnostic. ++ ++ PR c++/57831 ++ * pt.c (tsubst_copy): Handle USING_DECL. ++ +2013-05-20 Jason Merrill <jason@redhat.com> + + PR c++/57325 @@ -1814,6 +2186,31 @@ Index: gcc/cp/ChangeLog 2013-04-11 Release Manager * GCC 4.7.3 released. +Index: gcc/cp/pt.c +=================================================================== +--- a/src/gcc/cp/pt.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/cp/pt.c (.../branches/gcc-4_7-branch) +@@ -5521,6 +5521,10 @@ + else + return NULL_TREE; + } ++ ++ /* Avoid typedef problems. */ ++ if (TREE_TYPE (expr) != type) ++ expr = fold_convert (type, expr); + } + /* [temp.arg.nontype]/5, bullet 2 + +@@ -12214,6 +12218,9 @@ + case TYPE_DECL: + return tsubst (t, args, complain, in_decl); + ++ case USING_DECL: ++ t = DECL_NAME (t); ++ /* Fall through. */ + case IDENTIFIER_NODE: + if (IDENTIFIER_TYPENAME_P (t)) + { Index: gcc/cp/semantics.c =================================================================== --- a/src/gcc/cp/semantics.c (.../tags/gcc_4_7_3_release) @@ -1839,7 +2236,19 @@ Index: gcc/cp/semantics.c 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 @@ +@@ -7457,11 +7459,6 @@ + { + tree sub = op0; + STRIP_NOPS (sub); +- if (TREE_CODE (sub) == POINTER_PLUS_EXPR) +- { +- sub = TREE_OPERAND (sub, 0); +- STRIP_NOPS (sub); +- } + if (TREE_CODE (sub) == ADDR_EXPR) + { + /* We couldn't fold to a constant value. Make sure it's not +@@ -8959,13 +8956,12 @@ insert_capture_proxy (tree var) { cp_binding_level *b; @@ -1854,7 +2263,7 @@ Index: gcc/cp/semantics.c { cp_binding_level *n = b->level_chain; if (n->kind == sk_function_parms) -@@ -8976,8 +8977,7 @@ +@@ -8976,8 +8972,7 @@ /* And put a DECL_EXPR in the STATEMENT_LIST for the same block. */ var = build_stmt (DECL_SOURCE_LOCATION (var), DECL_EXPR, var); @@ -1888,6 +2297,43 @@ Index: gcc/cp/parser.c if (quals >= 0) { /* DR 1207: 'this' is in scope in the trailing return type. */ +Index: gcc/cp/cvt.c +=================================================================== +--- a/src/gcc/cp/cvt.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/cp/cvt.c (.../branches/gcc-4_7-branch) +@@ -198,6 +198,8 @@ + + if (null_ptr_cst_p (expr)) + { ++ tree val; ++ + if (c_inhibit_evaluation_warnings == 0 + && !NULLPTR_TYPE_P (TREE_TYPE (expr))) + warning (OPT_Wzero_as_null_pointer_constant, +@@ -207,16 +209,14 @@ + return build_ptrmemfunc (TYPE_PTRMEMFUNC_FN_TYPE (type), expr, 0, + /*c_cast_p=*/false, tf_warning_or_error); + +- if (TYPE_PTRMEM_P (type)) +- { +- /* A NULL pointer-to-member is represented by -1, not by +- zero. */ +- expr = build_int_cst_type (type, -1); +- } +- else +- expr = build_int_cst (type, 0); ++ /* A NULL pointer-to-data-member is represented by -1, not by ++ zero. */ ++ val = (TYPE_PTRMEM_P (type) ++ ? build_int_cst_type (type, -1) ++ : build_int_cst (type, 0)); + +- return expr; ++ return (TREE_SIDE_EFFECTS (expr) ++ ? build2 (COMPOUND_EXPR, type, expr, val) : val); + } + else if (TYPE_PTR_TO_MEMBER_P (type) && INTEGRAL_CODE_P (form)) + { Index: gcc/dwarf2out.c =================================================================== --- a/src/gcc/dwarf2out.c (.../tags/gcc_4_7_3_release) @@ -1985,7 +2431,14 @@ 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,58 @@ +@@ -1,3 +1,65 @@ ++2013-07-08 Tobias Burnus <burnus@net-b.de> ++ ++ PR fortran/57785 ++ * simplify.c (compute_dot_product): Complex conjugate for ++ dot_product. ++ (gfc_simplify_dot_product, gfc_simplify_matmul): Update call. ++ +2013-06-06 Tobias Burnus <burnus@net-b.de> + + Backport from mainline @@ -2231,7 +2684,50 @@ Index: gcc/fortran/simplify.c /* 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 @@ +@@ -330,13 +332,15 @@ + } + + +-/* Helper function for gfc_simplify_dot_product() and gfc_simplify_matmul. */ ++/* Helper function for gfc_simplify_dot_product() and gfc_simplify_matmul; ++ if conj_a is true, the matrix_a is complex conjugated. */ + + static gfc_expr * + compute_dot_product (gfc_expr *matrix_a, int stride_a, int offset_a, +- gfc_expr *matrix_b, int stride_b, int offset_b) ++ gfc_expr *matrix_b, int stride_b, int offset_b, ++ bool conj_a) + { +- gfc_expr *result, *a, *b; ++ gfc_expr *result, *a, *b, *c; + + result = gfc_get_constant_expr (matrix_a->ts.type, matrix_a->ts.kind, + &matrix_a->where); +@@ -359,9 +363,11 @@ + case BT_INTEGER: + case BT_REAL: + case BT_COMPLEX: +- result = gfc_add (result, +- gfc_multiply (gfc_copy_expr (a), +- gfc_copy_expr (b))); ++ if (conj_a && a->ts.type == BT_COMPLEX) ++ c = gfc_simplify_conjg (a); ++ else ++ c = gfc_copy_expr (a); ++ result = gfc_add (result, gfc_multiply (c, gfc_copy_expr (b))); + break; + + default: +@@ -1875,7 +1881,7 @@ + gcc_assert (vector_b->rank == 1); + gcc_assert (gfc_compare_types (&vector_a->ts, &vector_b->ts)); + +- return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0); ++ return compute_dot_product (vector_a, 1, 0, vector_b, 1, 0, true); + } + + +@@ -3240,7 +3246,7 @@ gfc_expr* dim = result; mpz_set_si (dim->value.integer, d); @@ -2240,7 +2736,16 @@ Index: gcc/fortran/simplify.c gfc_free_expr (dim); if (!result) goto returnNull; -@@ -5493,15 +5495,12 @@ +@@ -3881,7 +3887,7 @@ + for (row = 0; row < result_rows; ++row) + { + gfc_expr *e = compute_dot_product (matrix_a, stride_a, offset_a, +- matrix_b, 1, offset_b); ++ matrix_b, 1, offset_b, false); + gfc_constructor_append_expr (&result->value.constructor, + e, NULL); + +@@ -5493,15 +5499,12 @@ e = gfc_get_constant_expr (BT_INTEGER, k, &source->where); if (t == SUCCESS) @@ -2258,7 +2763,7 @@ Index: gcc/fortran/simplify.c gfc_free_expr (e); if (f == NULL) { -@@ -5512,24 +5511,31 @@ +@@ -5512,24 +5515,31 @@ e = f; } @@ -2296,7 +2801,7 @@ Index: gcc/fortran/simplify.c /* 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 @@ +@@ -5558,7 +5568,7 @@ replacement = array->value.op.op1; else { @@ -2305,7 +2810,7 @@ Index: gcc/fortran/simplify.c if (simplified) return simplified; -@@ -5568,18 +5574,20 @@ +@@ -5568,18 +5578,20 @@ } /* Try to reduce it directly if possible. */ @@ -2334,7 +2839,7 @@ Index: gcc/fortran/simplify.c return simplified; } -@@ -5598,13 +5606,32 @@ +@@ -5598,13 +5610,32 @@ return NULL; } @@ -2415,6 +2920,18 @@ Index: gcc/cfgexpand.c for (i = 0; i < GET_RTX_LENGTH (GET_CODE (exp)); i++) switch (*format_ptr++) { +Index: gcc/simplify-rtx.c +=================================================================== +--- a/src/gcc/simplify-rtx.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/simplify-rtx.c (.../branches/gcc-4_7-branch) +@@ -2558,6 +2558,7 @@ + HOST_WIDE_INT mask = INTVAL (trueop1) << count; + + if (mask >> count == INTVAL (trueop1) ++ && trunc_int_for_mode (mask, mode) == mask + && (mask & nonzero_bits (XEXP (op0, 0), mode)) == 0) + return simplify_gen_binary (ASHIFTRT, mode, + plus_constant (XEXP (op0, 0), mask), Index: gcc/sched-deps.c =================================================================== --- a/src/gcc/sched-deps.c (.../tags/gcc_4_7_3_release) @@ -2476,6 +2993,76 @@ Index: gcc/sched-deps.c flush_pending_lists (deps, insn, true, true); reg_pending_barrier = NOT_A_BARRIER; +Index: gcc/tlink.c +=================================================================== +--- a/src/gcc/tlink.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/tlink.c (.../branches/gcc-4_7-branch) +@@ -2,7 +2,7 @@ + them. + + Copyright (C) 1995, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2007, 2008, +- 2009, 2010, 2011 Free Software Foundation, Inc. ++ 2009, 2010, 2011, 2013 Free Software Foundation, Inc. + Contributed by Jason Merrill (jason@cygnus.com). + + This file is part of GCC. +@@ -820,18 +820,18 @@ + void + do_tlink (char **ld_argv, char **object_lst ATTRIBUTE_UNUSED) + { +- int exit = tlink_execute ("ld", ld_argv, ldout, lderrout); ++ int ret = tlink_execute ("ld", ld_argv, ldout, lderrout); + + tlink_init (); + +- if (exit) ++ if (ret) + { + int i = 0; + + /* Until collect does a better job of figuring out which are object + files, assume that everything on the command line could be. */ + if (read_repo_files (ld_argv)) +- while (exit && i++ < MAX_ITERATIONS) ++ while (ret && i++ < MAX_ITERATIONS) + { + if (tlink_verbose >= 3) + { +@@ -846,7 +846,7 @@ + break; + if (tlink_verbose) + fprintf (stderr, _("collect: relinking\n")); +- exit = tlink_execute ("ld", ld_argv, ldout, lderrout); ++ ret = tlink_execute ("ld", ld_argv, ldout, lderrout); + } + } + +@@ -854,9 +854,9 @@ + unlink (ldout); + dump_file (lderrout, stderr); + unlink (lderrout); +- if (exit) ++ if (ret) + { +- error ("ld returned %d exit status", exit); +- collect_exit (exit); ++ error ("ld returned %d exit status", ret); ++ exit (ret); + } + } +Index: gcc/Makefile.in +=================================================================== +--- a/src/gcc/Makefile.in (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/Makefile.in (.../branches/gcc-4_7-branch) +@@ -2570,7 +2570,7 @@ + $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) \ + tree-iterator.h $(BASIC_BLOCK_H) $(GIMPLE_H) $(TREE_INLINE_H) \ + $(VEC_H) langhooks.h alloc-pool.h pointer-set.h $(CFGLOOP_H) \ +- tree-pretty-print.h gimple-pretty-print.h $(DIAGNOSTIC_CORE_H) ++ tree-pretty-print.h gimple-pretty-print.h $(DIAGNOSTIC_CORE_H) $(PARAMS_H) + tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ + $(TREE_H) $(TM_P_H) $(GGC_H) output.h \ + $(DIAGNOSTIC_H) $(BASIC_BLOCK_H) $(FLAGS_H) $(TIMEVAR_H) $(TM_H) \ Index: gcc/config/alpha/alpha.md =================================================================== --- a/src/gcc/config/alpha/alpha.md (.../tags/gcc_4_7_3_release) @@ -2732,6 +3319,15 @@ Index: gcc/config/i386/sse.md =================================================================== --- a/src/gcc/config/i386/sse.md (.../tags/gcc_4_7_3_release) +++ b/src/gcc/config/i386/sse.md (.../branches/gcc-4_7-branch) +@@ -3276,7 +3276,7 @@ + (vec_select:V4SF + (vec_concat:V8SF + (match_operand:V4SF 1 "nonimmediate_operand" " 0,x,0,x,0") +- (match_operand:V4SF 2 "nonimmediate_operand" " x,x,m,x,x")) ++ (match_operand:V4SF 2 "nonimmediate_operand" " x,x,m,m,x")) + (parallel [(const_int 0) + (const_int 1) + (const_int 4) @@ -11167,7 +11167,8 @@ (match_operand:SI 2 "const_0_to_<sserotatemax>_operand" "n")))] "TARGET_XOP" @@ -2821,6 +3417,15 @@ Index: gcc/config/i386/i386.c {"corei7-avx", PROCESSOR_COREI7_64, CPU_COREI7, PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_AVX +@@ -6303,7 +6303,7 @@ + + /* Likewise, error if the ABI requires us to return values in the + x87 registers and the user specified -mno-80387. */ +- if (!TARGET_80387 && in_return) ++ if (!TARGET_FLOAT_RETURNS_IN_80387 && in_return) + for (i = 0; i < n; i++) + if (regclass[i] == X86_64_X87_CLASS + || regclass[i] == X86_64_X87UP_CLASS @@ -20026,7 +20026,7 @@ vec[i * 2 + 1] = const1_rtx; } @@ -2861,11 +3466,55 @@ 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/avr/avr.c +=================================================================== +--- a/src/gcc/config/avr/avr.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/config/avr/avr.c (.../branches/gcc-4_7-branch) +@@ -549,7 +549,12 @@ + { + tree args = TYPE_ARG_TYPES (TREE_TYPE (decl)); + tree ret = TREE_TYPE (TREE_TYPE (decl)); +- const char *name = IDENTIFIER_POINTER (DECL_NAME (decl)); ++ const char *name; ++ ++ name = DECL_ASSEMBLER_NAME_SET_P (decl) ++ /* Remove the leading '*' added in set_user_assembler_name. */ ++ ? 1 + IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)) ++ : IDENTIFIER_POINTER (DECL_NAME (decl)); + + /* Silently ignore 'signal' if 'interrupt' is present. AVR-LibC startet + using this when it switched from SIGNAL and INTERRUPT to ISR. */ +@@ -1004,7 +1009,7 @@ + leaf function and thus X has already been saved. */ + + int irq_state = -1; +- HOST_WIDE_INT size_cfa = size; ++ HOST_WIDE_INT size_cfa = size, neg_size; + rtx fp_plus_insns, fp, my_fp; + + gcc_assert (frame_pointer_needed +@@ -1043,6 +1048,7 @@ + } + + size = trunc_int_for_mode (size, GET_MODE (my_fp)); ++ neg_size = trunc_int_for_mode (-size, GET_MODE (my_fp)); + + /************ Method 1: Adjust frame pointer ************/ + +@@ -1062,7 +1068,7 @@ + gen_rtx_SET (VOIDmode, fp, stack_pointer_rtx)); + } + +- insn = emit_move_insn (my_fp, plus_constant (my_fp, -size)); ++ insn = emit_move_insn (my_fp, plus_constant (my_fp, neg_size)); + if (frame_pointer_needed) + { + RTX_FRAME_RELATED_P (insn) = 1; 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 @@ +@@ -2398,8 +2398,17 @@ reg_size = UNITS_PER_WORD; for (m = 0; m < NUM_MACHINE_MODES; ++m) @@ -2875,7 +3524,8 @@ Index: gcc/config/rs6000/rs6000.c + int reg_size2 = reg_size; + + /* TFmode/TDmode always takes 2 registers, even in VSX. */ -+ if (m == TDmode || m == TFmode) ++ if (TARGET_VSX && VSX_REG_CLASS_P (c) ++ && (m == TDmode || m == TFmode)) + reg_size2 = UNITS_PER_FP_WORD; + + rs6000_class_max_nregs[m][c] @@ -3288,11 +3938,113 @@ Index: gcc/config/v850/t-rtems +MULTILIB_MATCHES = mv850e=mv850e1 + MULTILIB_MATCHES += mv850e=mv850es +Index: gcc/collect2.c +=================================================================== +--- a/src/gcc/collect2.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/collect2.c (.../branches/gcc-4_7-branch) +@@ -1,7 +1,7 @@ + /* Collect static initialization info into data structures that can be + traversed by C++ initialization and finalization routines. + Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, +- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 ++ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2013 + Free Software Foundation, Inc. + Contributed by Chris Smith (csmith@convex.com). + Heavily modified by Michael Meissner (meissner@cygnus.com), +@@ -384,8 +384,8 @@ + + /* Delete tempfiles and exit function. */ + +-void +-collect_exit (int status) ++static void ++collect_atexit (void) + { + if (c_file != 0 && c_file[0]) + maybe_unlink (c_file); +@@ -413,13 +413,8 @@ + maybe_unlink (lderrout); + } + +- if (status != 0 && output_file != 0 && output_file[0]) +- maybe_unlink (output_file); +- + if (response_file) + maybe_unlink (response_file); +- +- exit (status); + } + + +@@ -1132,6 +1127,9 @@ + signal (SIGCHLD, SIG_DFL); + #endif + ++ if (atexit (collect_atexit) != 0) ++ fatal_error ("atexit failed"); ++ + /* Unlock the stdio streams. */ + unlock_std_streams (); + +@@ -1973,7 +1971,7 @@ + error ("%s terminated with signal %d [%s]%s", + prog, sig, strsignal(sig), + WCOREDUMP(status) ? ", core dumped" : ""); +- collect_exit (FATAL_EXIT_CODE); ++ exit (FATAL_EXIT_CODE); + } + + if (WIFEXITED (status)) +@@ -1989,7 +1987,7 @@ + if (ret != 0) + { + error ("%s returned %d exit status", prog, ret); +- collect_exit (ret); ++ exit (ret); + } + + if (response_file) +Index: gcc/collect2.h +=================================================================== +--- a/src/gcc/collect2.h (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/collect2.h (.../branches/gcc-4_7-branch) +@@ -1,5 +1,5 @@ + /* Header file for collect/tlink routines. +- Copyright (C) 1998, 2003, 2004, 2005, 2007, 2010, 2011 ++ Copyright (C) 1998, 2003, 2004, 2005, 2007, 2010, 2011, 2013 + Free Software Foundation, Inc. + + This file is part of GCC. +@@ -26,8 +26,6 @@ + extern struct pex_obj *collect_execute (const char *, char **, const char *, + const char *, int flags); + +-extern void collect_exit (int) ATTRIBUTE_NORETURN; +- + extern int collect_wait (const char *, struct pex_obj *); + + extern void dump_file (const char *, FILE *); Index: libgfortran/ChangeLog =================================================================== --- a/src/libgfortran/ChangeLog (.../tags/gcc_4_7_3_release) +++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_7-branch) -@@ -1,3 +1,38 @@ +@@ -1,3 +1,54 @@ ++2013-07-03 Uros Bizjak <ubizjak@gmail.com> ++ ++ Backport from mainline ++ 2013-06-20 Uros Bizjak <ubizjak@gmail.com> ++ ++ * config/fpu-387.h (_FPU_MASK_ALL): New. ++ (_FPU_EX_ALL): Ditto. ++ (set_fpu): Use fstcw to store x87 FPU control word. Use fnclex to ++ clear stalled exception flags. Correctly clear stalled SSE ++ exception flags. Simplify code. ++ ++ Backport from mainline ++ 2013-06-19 Uros Bizjak <ubizjak@gmail.com> ++ ++ * config/fpu-387.h: Use __asm__ and __volatile__ consistently. ++ +2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + Backport from mainline: @@ -3331,6 +4083,83 @@ Index: libgfortran/ChangeLog 2013-04-11 Release Manager * GCC 4.7.3 released. +Index: libgfortran/config/fpu-387.h +=================================================================== +--- a/src/libgfortran/config/fpu-387.h (.../tags/gcc_4_7_3_release) ++++ b/src/libgfortran/config/fpu-387.h (.../branches/gcc-4_7-branch) +@@ -73,7 +73,7 @@ + + /* We need a single SSE instruction here so the handler can safely skip + over it. */ +- __asm__ volatile ("movaps %xmm0,%xmm0"); ++ __asm__ __volatile__ ("movaps\t%xmm0,%xmm0"); + + sigaction (SIGILL, &oact, NULL); + +@@ -95,42 +95,42 @@ + #define _FPU_MASK_OM 0x08 + #define _FPU_MASK_UM 0x10 + #define _FPU_MASK_PM 0x20 ++#define _FPU_MASK_ALL 0x3f + ++#define _FPU_EX_ALL 0x3f ++ + void set_fpu (void) + { ++ int excepts = 0; + unsigned short cw; + +- asm volatile ("fnstcw %0" : "=m" (cw)); ++ __asm__ __volatile__ ("fstcw\t%0" : "=m" (cw)); + +- cw |= (_FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM | _FPU_MASK_OM +- | _FPU_MASK_UM | _FPU_MASK_PM); ++ if (options.fpe & GFC_FPE_INVALID) excepts |= _FPU_MASK_IM; ++ if (options.fpe & GFC_FPE_DENORMAL) excepts |= _FPU_MASK_DM; ++ if (options.fpe & GFC_FPE_ZERO) excepts |= _FPU_MASK_ZM; ++ if (options.fpe & GFC_FPE_OVERFLOW) excepts |= _FPU_MASK_OM; ++ if (options.fpe & GFC_FPE_UNDERFLOW) excepts |= _FPU_MASK_UM; ++ if (options.fpe & GFC_FPE_INEXACT) excepts |= _FPU_MASK_PM; + +- if (options.fpe & GFC_FPE_INVALID) cw &= ~_FPU_MASK_IM; +- if (options.fpe & GFC_FPE_DENORMAL) cw &= ~_FPU_MASK_DM; +- if (options.fpe & GFC_FPE_ZERO) cw &= ~_FPU_MASK_ZM; +- if (options.fpe & GFC_FPE_OVERFLOW) cw &= ~_FPU_MASK_OM; +- if (options.fpe & GFC_FPE_UNDERFLOW) cw &= ~_FPU_MASK_UM; +- if (options.fpe & GFC_FPE_INEXACT) cw &= ~_FPU_MASK_PM; ++ cw |= _FPU_MASK_ALL; ++ cw &= ~excepts; + +- asm volatile ("fldcw %0" : : "m" (cw)); ++ __asm__ __volatile__ ("fnclex\n\tfldcw\t%0" : : "m" (cw)); + + if (has_sse()) + { + unsigned int cw_sse; + +- asm volatile ("%vstmxcsr %0" : "=m" (cw_sse)); ++ __asm__ __volatile__ ("%vstmxcsr\t%0" : "=m" (cw_sse)); + +- cw_sse &= 0xffff0000; +- cw_sse |= (_FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM | _FPU_MASK_OM +- | _FPU_MASK_UM | _FPU_MASK_PM ) << 7; ++ /* The SSE exception masks are shifted by 7 bits. */ ++ cw_sse |= _FPU_MASK_ALL << 7; ++ cw_sse &= ~(excepts << 7); + +- if (options.fpe & GFC_FPE_INVALID) cw_sse &= ~(_FPU_MASK_IM << 7); +- if (options.fpe & GFC_FPE_DENORMAL) cw_sse &= ~(_FPU_MASK_DM << 7); +- if (options.fpe & GFC_FPE_ZERO) cw_sse &= ~(_FPU_MASK_ZM << 7); +- if (options.fpe & GFC_FPE_OVERFLOW) cw_sse &= ~(_FPU_MASK_OM << 7); +- if (options.fpe & GFC_FPE_UNDERFLOW) cw_sse &= ~(_FPU_MASK_UM << 7); +- if (options.fpe & GFC_FPE_INEXACT) cw_sse &= ~(_FPU_MASK_PM << 7); ++ /* Clear stalled exception flags. */ ++ cw_sse &= ~_FPU_EX_ALL; + +- asm volatile ("%vldmxcsr %0" : : "m" (cw_sse)); ++ __asm__ __volatile__ ("%vldmxcsr\t%0" : : "m" (cw_sse)); + } + } Index: libgfortran/io/list_read.c =================================================================== --- a/src/libgfortran/io/list_read.c (.../tags/gcc_4_7_3_release) |