diff options
author | doko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca> | 2013-08-21 09:53:02 +0000 |
---|---|---|
committer | doko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca> | 2013-08-21 09:53:02 +0000 |
commit | c3114f53093d24117c88c31c183cf0573dfe7463 (patch) | |
tree | bb05dd710ed3e9dbe76930dfdcb816cce61bd630 | |
parent | 566503d654b11b2eebc0e397542d144730b26e9f (diff) | |
download | gcc-47-c3114f53093d24117c88c31c183cf0573dfe7463.tar.gz |
* Update to SVN 20130821 (r201895) from the gcc-4_7-branch.
* Update the Linaro support to the 4.7-2013.08 release.
git-svn-id: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.7@6934 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/patches/gcc-linaro-doc.diff | 8 | ||||
-rw-r--r-- | debian/patches/gcc-linaro.diff | 1805 | ||||
-rw-r--r-- | debian/patches/svn-updates-linaro.diff | 1041 | ||||
-rw-r--r-- | debian/patches/svn-updates.diff | 1431 |
5 files changed, 3513 insertions, 779 deletions
diff --git a/debian/changelog b/debian/changelog index 6253704..ab16c03 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +gcc-4.7 (4.7.3-7) UNRELEASED; urgency=low + + * Update to SVN 20130821 (r201895) from the gcc-4_7-branch. + * Update the Linaro support to the 4.7-2013.08 release. + + -- Matthias Klose <doko@debian.org> Wed, 21 Aug 2013 11:40:56 +0200 + gcc-4.7 (4.7.3-6) unstable; urgency=low * Update to SVN 20130715 (r200955) from the gcc-4_7-branch. diff --git a/debian/patches/gcc-linaro-doc.diff b/debian/patches/gcc-linaro-doc.diff index 13be1b2..10234bf 100644 --- a/debian/patches/gcc-linaro-doc.diff +++ b/debian/patches/gcc-linaro-doc.diff @@ -1,4 +1,4 @@ -# DP: Changes for the Linaro 4.7-2013.07 release (documentation). +# DP: Changes for the Linaro 4.7-2013.08 release (documentation). --- a/src/gcc/doc/extend.texi +++ b/src/gcc/doc/extend.texi @@ -95,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-26" "gcc-4.7.4" "GNU" ++.TH FSF-FUNDING 7 "2013-08-12" "gcc-4.7.4" "GNU" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -141,7 +141,7 @@ .\" .IX Title "GFDL 7" -.TH GFDL 7 "2013-04-11" "gcc-4.7.3" "GNU" -+.TH GFDL 7 "2013-06-26" "gcc-4.7.4" "GNU" ++.TH GFDL 7 "2013-08-12" "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 @@ -199,7 +199,7 @@ .\" .IX Title "GPL 7" -.TH GPL 7 "2013-04-11" "gcc-4.7.3" "GNU" -+.TH GPL 7 "2013-06-26" "gcc-4.7.4" "GNU" ++.TH GPL 7 "2013-08-12" "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 941f005..5c9d27f 100644 --- a/debian/patches/gcc-linaro.diff +++ b/debian/patches/gcc-linaro.diff @@ -1,8 +1,24 @@ -# DP: Changes for the Linaro 4.7-2013.07 release. +# DP: Changes for the Linaro 4.7-2013.08 release. --- a/src/ChangeLog.linaro +++ b/src/ChangeLog.linaro -@@ -0,0 +1,2562 @@ +@@ -0,0 +1,2578 @@ ++2013-08-15 Yvan Roux <yvan.roux@linaro.org> ++ ++ GCC Linaro 4.7-2013.08 released. ++ ++ gcc/ ++ * LINARO-VERSION: Update. ++ ++2013-08-12 Yvan Roux <yvan.roux@linaro.org> ++ ++ Merge from FSF GCC 4.7.4 (svn branches/gcc-4_7-branch 201655). ++ ++2013-07-03 Yvan Roux <yvan.roux@linaro.org> ++ ++ gcc/ ++ * LINARO-VERSION: Bump version. ++ +2013-07-03 Yvan Roux <yvan.roux@linaro.org> + + GCC Linaro 4.7-2013.07 released. @@ -3167,7 +3183,60 @@ { --- a/src/gcc/ChangeLog +++ b/src/gcc/ChangeLog -@@ -1,3 +1,262 @@ +@@ -1,3 +1,315 @@ ++2013-08-02 Eric Botcazou <ebotcazou@adacore.com> ++ ++ * config/sparc/sparc.c (sparc_emit_membar_for_model) <SMM_TSO>: Add ++ the implied StoreLoad barrier for atomic operations if before. ++ ++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 @@ -57934,6 +58003,48 @@ ;; Conversion routines +--- a/src/gcc/config/avr/avr.c ++++ b/src/gcc/config/avr/avr.c +@@ -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; --- a/src/gcc/config/darwin.h +++ b/src/gcc/config/darwin.h @@ -356,7 +356,9 @@ @@ -58040,6 +58151,15 @@ {"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; } @@ -58198,6 +58318,15 @@ || GET_CODE (operands[3]) == MINUS) --- a/src/gcc/config/i386/sse.md +++ b/src/gcc/config/i386/sse.md +@@ -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" @@ -58246,7 +58375,7 @@ RS6000_BTC_MISC) --- a/src/gcc/config/rs6000/rs6000.c +++ b/src/gcc/config/rs6000/rs6000.c -@@ -2398,8 +2398,16 @@ +@@ -2398,8 +2398,17 @@ reg_size = UNITS_PER_WORD; for (m = 0; m < NUM_MACHINE_MODES; ++m) @@ -58256,7 +58385,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] @@ -58265,7 +58395,7 @@ } if (TARGET_E500_DOUBLE) -@@ -11388,9 +11396,6 @@ +@@ -11388,9 +11397,6 @@ case RS6000_BUILTIN_RSQRT: return rs6000_expand_unop_builtin (CODE_FOR_rsqrtdf2, exp, target); @@ -58275,7 +58405,7 @@ case POWER7_BUILTIN_BPERMD: return rs6000_expand_binop_builtin (((TARGET_64BIT) ? CODE_FOR_bpermd_di -@@ -11726,12 +11731,6 @@ +@@ -11726,12 +11732,6 @@ POWER7_BUILTIN_BPERMD, "__builtin_bpermd"); def_builtin ("__builtin_bpermd", ftype, POWER7_BUILTIN_BPERMD); @@ -58411,6 +58541,18 @@ sparc_mode_class[i] = 1 << (int) SF_MODE; else if (GET_MODE_SIZE (i) == 8) sparc_mode_class[i] = 1 << (int) DF_MODE; +@@ -10926,6 +10929,11 @@ + /* Total Store Ordering: all memory transactions with store semantics + are followed by an implied StoreStore. */ + implied |= StoreStore; ++ ++ /* If we're not looking for a raw barrer (before+after), then atomic ++ operations get the benefit of being both load and store. */ ++ if (load_store == 3 && before_after == 1) ++ implied |= StoreLoad; + /* FALLTHRU */ + + case SMM_PSO: --- a/src/gcc/config/v850/t-rtems +++ b/src/gcc/config/v850/t-rtems @@ -1,3 +1,7 @@ @@ -58688,7 +58830,31 @@ /* Performs file-level cleanup. Close graph file, generate coverage --- a/src/gcc/cp/ChangeLog +++ b/src/gcc/cp/ChangeLog -@@ -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 @@ -58713,6 +58879,41 @@ 2013-04-11 Release Manager * GCC 4.7.3 released. +--- a/src/gcc/cp/cvt.c ++++ b/src/gcc/cp/cvt.c +@@ -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)) + { --- a/src/gcc/cp/parser.c +++ b/src/gcc/cp/parser.c @@ -16691,7 +16691,7 @@ @@ -58735,6 +58936,29 @@ if (quals >= 0) { /* DR 1207: 'this' is in scope in the trailing return type. */ +--- a/src/gcc/cp/pt.c ++++ b/src/gcc/cp/pt.c +@@ -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)) + { --- a/src/gcc/cp/semantics.c +++ b/src/gcc/cp/semantics.c @@ -7412,15 +7412,17 @@ @@ -58758,7 +58982,19 @@ 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; @@ -58773,7 +59009,7 @@ { 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); @@ -58800,11 +59036,42 @@ tree size = TYPE_SIZE (t); tree size_unit = TYPE_SIZE_UNIT (t); unsigned int align = TYPE_ALIGN (t); +--- a/src/gcc/cp/typeck.c ++++ b/src/gcc/cp/typeck.c +@@ -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) --- a/src/gcc/DATESTAMP +++ b/src/gcc/DATESTAMP @@ -1 +1 @@ -20130411 -+20130626 ++20130812 --- a/src/gcc/dwarf2out.c +++ b/src/gcc/dwarf2out.c @@ -22538,7 +22538,7 @@ @@ -58835,7 +59102,23 @@ { --- a/src/gcc/fortran/ChangeLog +++ b/src/gcc/fortran/ChangeLog -@@ -1,3 +1,58 @@ +@@ -1,3 +1,74 @@ ++2013-08-11 Janus Weil <janus@gcc.gnu.org> ++ ++ Backport from trunk: ++ 2013-08-09 Janus Weil <janus@gcc.gnu.org> ++ ++ PR fortran/58058 ++ * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Free the temporary ++ string, if necessary. ++ ++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 @@ -59072,7 +59355,50 @@ /* Note that 'simplification' is not just transforming expressions. For functions that are not simplified at compile time, range -@@ -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); @@ -59081,7 +59407,16 @@ 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) @@ -59099,7 +59434,7 @@ gfc_free_expr (e); if (f == NULL) { -@@ -5512,23 +5511,30 @@ +@@ -5512,23 +5515,30 @@ e = f; } @@ -59136,7 +59471,7 @@ /* For unary operations, the size of the result is given by the size of the operand. For binary ones, it's the size of the first operand -@@ -5558,7 +5564,7 @@ +@@ -5558,7 +5568,7 @@ replacement = array->value.op.op1; else { @@ -59145,7 +59480,7 @@ if (simplified) return simplified; -@@ -5568,18 +5574,20 @@ +@@ -5568,18 +5578,20 @@ } /* Try to reduce it directly if possible. */ @@ -59174,7 +59509,7 @@ return simplified; } -@@ -5598,12 +5606,31 @@ +@@ -5598,12 +5610,31 @@ return NULL; } @@ -59296,6 +59631,32 @@ size_t gfc_target_expr_size (gfc_expr *); /* Write a constant expression in binary form to a target buffer. */ +--- a/src/gcc/fortran/trans-intrinsic.c ++++ b/src/gcc/fortran/trans-intrinsic.c +@@ -5623,8 +5623,7 @@ + + if (expr->ts.type == BT_CHARACTER) + { +- tree direct; +- tree indirect; ++ tree direct, indirect, free; + + ptr = convert (gfc_get_pchar_type (expr->ts.kind), source); + tmpdecl = gfc_create_var (gfc_get_pchar_type (expr->ts.kind), +@@ -5657,6 +5656,13 @@ + tmp = build3_v (COND_EXPR, tmp, direct, indirect); + gfc_add_expr_to_block (&se->pre, tmp); + ++ /* Free the temporary string, if necessary. */ ++ free = gfc_call_free (tmpdecl); ++ tmp = fold_build2_loc (input_location, GT_EXPR, boolean_type_node, ++ dest_word_len, source_bytes); ++ tmp = build3_v (COND_EXPR, tmp, free, build_empty_stmt (input_location)); ++ gfc_add_expr_to_block (&se->post, tmp); ++ + se->expr = tmpdecl; + se->string_length = fold_convert (gfc_charlen_type_node, dest_word_len); + } --- a/src/gcc/fortran/trans-stmt.c +++ b/src/gcc/fortran/trans-stmt.c @@ -1743,7 +1743,7 @@ @@ -59363,7 +59724,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 1 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" /* -*- indented-text -*- */ /* Process source files and output type information. Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 @@ -59372,7 +59733,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 25 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" #ifdef GENERATOR_FILE #include "bconfig.h" #else @@ -59421,7 +59782,7 @@ register int yy_act; -#line 63 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 63 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 63 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" /* Do this on entry to yylex(): */ *yylval = 0; @@ -59439,7 +59800,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 74 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { BEGIN(in_struct); return TYPEDEF; @@ -59448,7 +59809,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 78 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { BEGIN(in_struct); return STRUCT; @@ -59457,7 +59818,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 82 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { BEGIN(in_struct); return UNION; @@ -59466,7 +59827,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 86 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { BEGIN(in_struct); return EXTERN; @@ -59475,7 +59836,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 90 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { BEGIN(in_struct); return STATIC; @@ -59484,7 +59845,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 95 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { BEGIN(in_struct); return DEFVEC_OP; @@ -59493,7 +59854,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 99 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { BEGIN(in_struct); return DEFVEC_I; @@ -59502,7 +59863,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 103 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { BEGIN(in_struct); return DEFVEC_ALLOC; @@ -59511,21 +59872,21 @@ case 9: YY_RULE_SETUP -#line 111 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 111 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 111 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 113 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 114 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 12: @@ -59534,7 +59895,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 116 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" /* don't care */ YY_BREAK case 13: @@ -59543,7 +59904,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 117 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { return GTY_TOKEN; } YY_BREAK case 14: @@ -59552,7 +59913,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 118 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { return VEC_TOKEN; } YY_BREAK case 15: @@ -59561,7 +59922,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 119 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { return UNION; } YY_BREAK case 16: @@ -59570,7 +59931,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 120 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { return STRUCT; } YY_BREAK case 17: @@ -59579,7 +59940,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 121 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { return ENUM; } YY_BREAK case 18: @@ -59588,7 +59949,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 122 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { return PTR_ALIAS; } YY_BREAK case 19: @@ -59597,13 +59958,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 123 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 124 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { return NUM; } YY_BREAK case 21: @@ -59612,7 +59973,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 125 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext, yyleng, yyleng+1); return PARAM_IS; @@ -59621,12 +59982,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 131 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 131 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { size_t len; @@ -59635,7 +59996,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 143 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext, yyleng, yyleng+1); return ID; @@ -59644,7 +60005,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 148 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng-1); return STRING; @@ -59653,7 +60014,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 153 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng-1); return ARRAY; @@ -59662,7 +60023,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 157 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng); return CHAR; @@ -59671,13 +60032,13 @@ case 28: YY_RULE_SETUP -#line 162 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 162 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 162 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 163 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { return yytext[0]; } YY_BREAK /* ignore pp-directives */ @@ -59685,13 +60046,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 166 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 168 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { error_at_line (&lexer_line, "unexpected character `%s'", yytext); } @@ -59700,35 +60061,35 @@ case 32: YY_RULE_SETUP -#line 173 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 173 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 173 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 174 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 176 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 177 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 177 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 178 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { update_lineno (yytext, yyleng); } YY_BREAK case 38: @@ -59737,7 +60098,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 179 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK @@ -59745,16 +60106,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 182 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 184 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 184 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 42: @@ -59763,29 +60124,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 185 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 187 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 188 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 191 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 191 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" { error_at_line (&lexer_line, "unterminated comment or string; unexpected EOF"); @@ -59794,13 +60155,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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 196 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/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 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 198 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1654 "gengtype-lex.c" @@ -59824,7 +60185,7 @@ #define YYTABLES_NAME "yytables" -#line 198 "/space/rguenther/gcc-4.7.3/gcc-4.7.3/gcc/gengtype-lex.l" -+#line 198 "/work1/rouxy/release/4.7-2013.07/gcc-linaro-4.7-2013.07/gcc/gengtype-lex.l" ++#line 198 "/home/yvan/release/4.7-2013.08/gcc-linaro-4.7-2013.08/gcc/gengtype-lex.l" @@ -61841,7 +62202,7 @@ --- a/src/gcc/LINARO-VERSION +++ b/src/gcc/LINARO-VERSION @@ -0,0 +1 @@ -+4.7-2013.07 ++4.7-2013.08 --- a/src/gcc/lower-subreg.c +++ b/src/gcc/lower-subreg.c @@ -233,9 +233,9 @@ @@ -61950,6 +62311,15 @@ > tmp-mlib.h; \ fi $(SHELL) $(srcdir)/../move-if-change tmp-mlib.h multilib.h +@@ -2570,7 +2571,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) \ @@ -3904,7 +3905,7 @@ $(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h build/gengenrtl.o : gengenrtl.c $(BCONFIG_H) $(SYSTEM_H) rtl.def @@ -62955,6 +63325,16 @@ { sched_init_region_reg_pressure_info (); for (bb = 0; bb < current_nr_blocks; bb++) +--- a/src/gcc/simplify-rtx.c ++++ b/src/gcc/simplify-rtx.c +@@ -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), --- a/src/gcc/target.def +++ b/src/gcc/target.def @@ -2758,6 +2758,13 @@ @@ -62973,7 +63353,71 @@ bool, false) --- a/src/gcc/testsuite/ChangeLog +++ b/src/gcc/testsuite/ChangeLog -@@ -1,3 +1,133 @@ +@@ -1,3 +1,197 @@ ++2013-08-11 Janus Weil <janus@gcc.gnu.org> ++ ++ Backport from trunk: ++ 2013-08-09 Janus Weil <janus@gcc.gnu.org> ++ ++ PR fortran/58058 ++ * gfortran.dg/transfer_intrinsic_6.f90: New. ++ ++2013-07-16 Iain Sandoe <iain@codesourcery.com> ++ ++ PR target/55656 ++ PR target/55657 ++ * obj-c++.dg/cxx-ivars-3.mm: Use NSObject instead of Object. ++ * obj-c++.dg/strings/const-cfstring-5.mm: Likewise. ++ * obj-c++.dg/torture/strings/const-str-10.mm: Likewise. ++ * obj-c++.dg/torture/strings/const-str-9.mm: Likewise. ++ * objc.dg/image-info.m: Likewise. ++ * objc.dg/symtab-1.m: Likewise. ++ * objc.dg/torture/strings/const-str-10.m: Likewise. ++ * objc.dg/torture/strings/const-str-11.m: Likewise. ++ * objc.dg/torture/strings/const-str-9.m: Likewise. ++ * objc.dg/zero-link-1.m: Likewise. ++ * objc.dg/zero-link-2.m: Likewise. ++ * objc.dg/no-extra-load.m: Avoid Foundation.h. ++ * objc.dg/objc-foreach-4.m: Likewise. ++ * objc.dg/objc-foreach-5.m: Likewise. ++ * obj-c++.dg/proto-lossage-7.mm: Use NSObject instead of Object ++ (for Darwin). ++ * obj-c++.dg/strings/const-str-12.mm: Likewise. ++ * obj-c++.dg/syntax-error-1.mm: Likewise. ++ * objc.dg/method-6.m: Likewise. ++ * objc.dg/pr23214.m: Likewise. ++ * objc.dg/proto-lossage-7.m: Likewise. ++ * objc.dg/strings/const-str-12b.m: Likewise. ++ * objc.dg/zero-link-3.m: Likewise. ++ * obj-c++.dg/method-12.mm: Skip on Darwin versions without 'Object'. ++ * objc.dg/encode-7-next-64bit.m: Use NSObject instead of Object, ++ adjust headers, interfaces and encoded types to reflect current system ++ versions. Add FIXME and outputs from current system compiler for ++ reference. ++ ++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 @@ -63652,6 +64096,40 @@ + abort (); + return 0; +} +--- a/src/gcc/testsuite/gcc.c-torture/execute/pr57829.c ++++ b/src/gcc/testsuite/gcc.c-torture/execute/pr57829.c +@@ -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; ++} --- a/src/gcc/testsuite/gcc.dg/20020312-2.c +++ b/src/gcc/testsuite/gcc.dg/20020312-2.c @@ -92,6 +92,8 @@ @@ -76784,6 +77262,19 @@ +} + +/* { dg-final { scan-assembler-not "stosl" } } */ +--- a/src/gcc/testsuite/gcc.target/i386/pr57655.c ++++ b/src/gcc/testsuite/gcc.target/i386/pr57655.c +@@ -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); ++} --- a/src/gcc/testsuite/gcc.target/powerpc/pr57150.c +++ b/src/gcc/testsuite/gcc.target/powerpc/pr57150.c @@ -0,0 +1,23 @@ @@ -76999,6 +77490,114 @@ + } + }(); +} +--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C ++++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C +@@ -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>(); ++} +--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C ++++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C +@@ -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 (); ++} +--- a/src/gcc/testsuite/g++.dg/debug/template2.C ++++ b/src/gcc/testsuite/g++.dg/debug/template2.C +@@ -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; ++}; +--- a/src/gcc/testsuite/g++.dg/expr/const1.C ++++ b/src/gcc/testsuite/g++.dg/expr/const1.C +@@ -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; ++} --- a/src/gcc/testsuite/g++.dg/other/pr23205-2.C +++ b/src/gcc/testsuite/g++.dg/other/pr23205-2.C @@ -1,5 +1,5 @@ @@ -77060,6 +77659,24 @@ + SimpleJets < double >b; + TestJets (&b); +} +--- a/src/gcc/testsuite/g++.dg/template/using23.C ++++ b/src/gcc/testsuite/g++.dg/template/using23.C +@@ -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 >; --- a/src/gcc/testsuite/g++.dg/torture/pr54684.C +++ b/src/gcc/testsuite/g++.dg/torture/pr54684.C @@ -0,0 +1,62 @@ @@ -77176,6 +77793,47 @@ + END + + END +--- a/src/gcc/testsuite/gfortran.dg/dot_product_2.f90 ++++ b/src/gcc/testsuite/gfortran.dg/dot_product_2.f90 +@@ -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" } } --- a/src/gcc/testsuite/gfortran.dg/namelist_77.f90 +++ b/src/gcc/testsuite/gfortran.dg/namelist_77.f90 @@ -0,0 +1,49 @@ @@ -77478,6 +78136,29 @@ + real(r8_),intent(out) :: val + val = transfer(byte_array(1:8),val) +end subroutine +--- a/src/gcc/testsuite/gfortran.dg/transfer_intrinsic_6.f90 ++++ b/src/gcc/testsuite/gfortran.dg/transfer_intrinsic_6.f90 +@@ -0,0 +1,20 @@ ++! { dg-do compile } ++! { dg-options "-fdump-tree-original" } ++! ++! PR 58058: [4.7/4.8/4.9 Regression] Memory leak with transfer function ++! ++! Contributed by Thomas Jourdan <thomas.jourdan@orange.fr> ++ ++ implicit none ++ ++ integer, dimension(3) :: t1 ++ character(len=64) :: str ++ ++ t1 = (/1,2,3/) ++ ++ str = transfer(t1,str) ++ ++end ++ ++! { dg-final { scan-tree-dump-times "__builtin_free" 1 "original" } } ++! { dg-final { cleanup-tree-dump "original" } } --- a/src/gcc/testsuite/gfortran.dg/typebound_override_4.f90 +++ b/src/gcc/testsuite/gfortran.dg/typebound_override_4.f90 @@ -0,0 +1,34 @@ @@ -78076,6 +78757,762 @@ + return 0 + } +} +--- a/src/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm ++++ b/src/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm +@@ -2,12 +2,15 @@ + + // { dg-do run { target *-*-darwin* } } + // { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } +-// { dg-options "-fobjc-call-cxx-cdtors -mmacosx-version-min=10.4" } ++// { dg-additional-options "-fobjc-call-cxx-cdtors -mmacosx-version-min=10.4 -framework Foundation" } + // This test has no equivalent or meaning for m64/ABI V2 + // { dg-xfail-run-if "No Test Avail" { *-*-darwin* && lp64 } { "-fnext-runtime" } { "" } } + + #include <objc/objc-runtime.h> + #include <stdlib.h> ++#include <Foundation/NSObject.h> ++ ++//extern "C" { int printf(const char *,...); } + #define CHECK_IF(expr) if(!(expr)) abort() + + #ifndef CLS_HAS_CXX_STRUCTORS +@@ -19,7 +22,7 @@ + cxx_struct (void) { a = b = 55; } + }; + +-@interface Foo { ++@interface Foo: NSObject { + int c; + cxx_struct s; + } +@@ -42,9 +45,11 @@ + Class cls; + + cls = objc_getClass("Foo"); +- CHECK_IF(cls->info & CLS_HAS_CXX_STRUCTORS); ++// printf((const char *)"Foo info %lx\n",cls->info); ++ CHECK_IF((cls->info & CLS_HAS_CXX_STRUCTORS) != 0); + cls = objc_getClass("Bar"); +- CHECK_IF(!(cls->info & CLS_HAS_CXX_STRUCTORS)); ++// printf((const char *)"Bar info %lx\n",cls->info); ++ CHECK_IF((cls->info & CLS_HAS_CXX_STRUCTORS) == 0); + + #else + /* No test needed or available. */ +--- a/src/gcc/testsuite/obj-c++.dg/method-12.mm ++++ b/src/gcc/testsuite/obj-c++.dg/method-12.mm +@@ -2,6 +2,7 @@ + /* Author: Ziemowit Laski <zlaski@apple.com> */ + /* { dg-options "-Wstrict-selector-match" } */ + /* { dg-do compile } */ ++/* { dg-skip-if "Object interface removed" { *-*-darwin[1-2]* && { lp64 } } { "-fnext-runtime" } { "" } } */ + + #include <objc/Protocol.h> + +@@ -19,13 +20,13 @@ + Class receiver; + + [receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */ +- /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 9 } */ +- /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 14 } */ ++ /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 10 } */ ++ /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 15 } */ + + [receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */ +- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 25 } */ +- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 25 } */ +- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 25 } */ ++ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 26 } */ ++ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 26 } */ ++ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 26 } */ + + [Class port]; /* { dg-error ".Class. is not an Objective\\-C class name or alias" } */ + } +--- a/src/gcc/testsuite/obj-c++.dg/proto-lossage-7.mm ++++ b/src/gcc/testsuite/obj-c++.dg/proto-lossage-7.mm +@@ -1,12 +1,19 @@ + /* Check that typedefs of ObjC classes preserve + any @protocol qualifiers. */ + /* { dg-do compile } */ ++ ++#ifdef __NEXT_RUNTIME__ ++#include <Foundation/NSObject.h> ++#define OBJECT NSObject ++#else + #include <objc/Object.h> ++#define OBJECT Object ++#endif + + @protocol CanDoStuff; + +-typedef Object<CanDoStuff> CanDoStuffType; +-typedef Object<CanDoStuff> *CanDoStuffTypePtr; ++typedef OBJECT<CanDoStuff> CanDoStuffType; ++typedef OBJECT<CanDoStuff> *CanDoStuffTypePtr; + + @protocol CanDoStuff + - (int) dostuff; +--- a/src/gcc/testsuite/obj-c++.dg/strings/const-cfstring-5.mm ++++ b/src/gcc/testsuite/obj-c++.dg/strings/const-cfstring-5.mm +@@ -6,16 +6,16 @@ + /* { dg-skip-if "NeXT only" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-mconstant-cfstrings" } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + +-@interface Foo: Object { ++@interface Foo: NSObject { + char *cString; + unsigned int len; + } + + (Foo *)description; + @end + +-@interface Bar: Object ++@interface Bar: NSObject + + (Foo *) getString: (int) which; + @end + +--- a/src/gcc/testsuite/obj-c++.dg/strings/const-str-12.mm ++++ b/src/gcc/testsuite/obj-c++.dg/strings/const-str-12.mm +@@ -5,17 +5,23 @@ + /* { dg-options "-fconstant-string-class=Foo" } */ + /* { dg-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */ + ++#ifdef __NEXT_RUNTIME__ ++#include <Foundation/NSObject.h> ++#define OBJECT NSObject ++#else + #include <objc/Object.h> ++#define OBJECT Object ++#endif + #include "../../objc-obj-c++-shared/objc-test-suite-types.h" + +-@interface Foo: Object { ++@interface Foo: OBJECT { + char *cString; + unsigned int len; + } + + (id)description; + @end + +-@interface Bar: Object ++@interface Bar: OBJECT + + (Foo *) getString: (int) which; + @end + +--- a/src/gcc/testsuite/obj-c++.dg/syntax-error-1.mm ++++ b/src/gcc/testsuite/obj-c++.dg/syntax-error-1.mm +@@ -1,7 +1,13 @@ + /* Graceful handling of a syntax error. */ + /* { dg-do compile } */ + ++#ifdef __NEXT_RUNTIME__ ++#include <Foundation/NSObject.h> ++#define OBJECT NSObject ++#else + #include <objc/Object.h> ++#define OBJECT Object ++#endif + + class foo { + public: +@@ -12,7 +18,7 @@ + + extern void NXLog(const char *, ...); + +-@interface Test2 : Object { ++@interface Test2 : OBJECT { + } + - (void) foo2; + @end +@@ -23,4 +29,4 @@ + } /* { dg-error "stray .\}. between Objective\\-C\\+\\+ methods" } */ + @end + +-/* { dg-error "expected constructor, destructor, or type conversion before" "" { target *-*-* } 22 } */ ++/* { dg-error "expected constructor, destructor, or type conversion before" "" { target *-*-* } 28 } */ +--- a/src/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm ++++ b/src/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm +@@ -6,10 +6,10 @@ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + #include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */ + +-@interface NSString: Object ++@interface NSString: NSObject + @end + + @interface NSSimpleCString : NSString { +--- a/src/gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm ++++ b/src/gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm +@@ -7,10 +7,10 @@ + /* { dg-options "-fconstant-string-class=XStr" } */ + /* { dg-options "-mno-constant-cfstrings -fconstant-string-class=XStr" { target *-*-darwin* } } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + #include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */ + +-@interface XString: Object { ++@interface XString: NSObject { + @protected + char *bytes; + } +--- a/src/gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm ++++ b/src/gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm +@@ -5,10 +5,10 @@ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + #include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */ + +-@interface NSConstantString: Object { ++@interface NSConstantString: NSObject { + char *cString; + unsigned int len; + } +--- a/src/gcc/testsuite/objc.dg/encode-7-next-64bit.m ++++ b/src/gcc/testsuite/objc.dg/encode-7-next-64bit.m +@@ -4,24 +4,25 @@ + /* { dg-require-effective-target lp64 } */ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ ++/* { dg-additional-options "-framework Foundation" } */ + + #include <stdbool.h> + #include <string.h> + #include <stdlib.h> +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + #include "../objc-obj-c++-shared/runtime.h" + +-#define CHECK_IF(E) if (!(E)) abort () ++extern int printf(char *,...); ++void CHECK_IF(const char *s1, const char *s2) ++{ ++ if (strcmp(s1,s2) != 0) { ++ printf ("'%s'\n'%s'\n",s1,s2); ++ abort (); ++ } ++} + + @class NSDictionary, NSFont, NSError, _NSATSTypesetterGuts, NSString, NSMenu, NSArray; + +-typedef unsigned char UInt8; +-typedef const signed long OSStatus; +-typedef unsigned long CFIndex; +-typedef unsigned int UInt32; +-typedef UInt32 FourCharCode; +-typedef FourCharCode OSType; +- + struct FSRef { + UInt8 hidden[80]; + }; +@@ -99,10 +100,10 @@ + unsigned int parameterMask; + } NSErrorUserInfoFormatter; + +-typedef Object MyObj; +-typedef Object *MyPtr; ++typedef NSObject MyObj; ++typedef NSObject *MyPtr; + +-@interface Foo: Object { ++@interface Foo: NSObject { + NSATSGlyphStorageRun r; + } + - (NSError *)_errorWithOSStatus:(OSStatus)inOSStatus ref1:(const FSRef *)inRef1 ref2:(const struct FSRef *)inRef2 +@@ -114,7 +115,7 @@ + - (id)str1:(const char *)str1 str2:(char *)str2 str3:(char *const)str3 str4:(const char *const)str4; + - (oneway void)foo1:(Foo *)foo1 foo2:(const Foo *)foo2 foo3:(Foo *const)foo3 foo4:(const Foo *const)foo4; + - (in const char *)sel1:(const SEL)sel1 id1:(const id)id1; +-- (inout id)obj1:(const MyPtr)obj1 obj2:(Object *const)obj2 obj3:(MyObj *const)obj3; ++- (inout id)obj1:(const MyPtr)obj1 obj2:(NSObject *const)obj2 obj3:(MyObj *const)obj3; + + (ComponentInstance)_defaultScriptingComponent; + - (NSString *)_formatCocoaErrorString:(NSString *)formatString parameters:(const char *)parameters + applicableFormatters:(NSErrorUserInfoFormatter **)formatters count:(int)numFormatters; +@@ -156,7 +157,7 @@ + - (in const char *)sel1:(const SEL)sel1 id1:(const id)id1 { + return "Hello"; + } +-- (inout id)obj1:(const MyPtr)obj1 obj2:(Object *const)obj2 obj3:(MyObj *const)obj3 { ++- (inout id)obj1:(const MyPtr)obj1 obj2:(NSObject *const)obj2 obj3:(MyObj *const)obj3 { + return self; + } + + (ComponentInstance)_defaultScriptingComponent { +@@ -191,6 +192,8 @@ + } + @end + ++/* FIXME: we produce different output c.f. the system compiler on OSX10.6+ */ ++ + int main(void) { + Class fooClass = objc_getClass ("Foo"); + Method meth; +@@ -199,72 +202,76 @@ + Ivar ivar; + + meth = class_getInstanceMethod (fooClass, @selector(_errorWithOSStatus:ref1:ref2:reading:)); +- CHECK_IF (!strcmp (method_getTypeEncoding(meth), "@44@0:8q16r^{FSRef=[80C]}24r^{FSRef=[80C]}32c40")); ++ CHECK_IF (method_getTypeEncoding(meth), "@40@0:8i16r^{FSRef=[80C]}20r^{FSRef=[80C]}28c36"); + + meth = class_getInstanceMethod (fooClass, @selector(_attributeRunForCharacterAtIndex:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "r^{?=@@QQ^Qffff{_NSRect={_NSPoint=ff}{_NSSize=ff}}q^qQ^Q@@@:::****{?=b1b1b1b1b1b27}}24@0:8Q16")); ++ CHECK_IF (method_getTypeEncoding (meth), "r^{?=@@qq^qffff{_NSRect={_NSPoint=ff}{_NSSize=ff}}q^qQ^Q@@@:::****{?=b1b1b1b1b1b27}}24@0:8q16"); ++/* clang produces: r^{?=@@qq^qffff{_NSRect={_NSPoint=ff}{_NSSize=ff}}q^qQ^Q@@@::^{objc_selector}****{?=b1b1b1b1b1b27}}24@0:8q16 */ + + meth = class_getInstanceMethod (fooClass, @selector(_getATSTypesetterGuts:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "r@24@0:8r:16")); ++ CHECK_IF (method_getTypeEncoding (meth), "r@24@0:8r:16"); ++/* "@24@0:8r^{objc_selector=}16" */ + + meth = class_getInstanceMethod (fooClass, @selector(resumeWithSuspensionID:and:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "v32@0:8^{__NSAppleEventManagerSuspension=}16r^Q24")); ++ CHECK_IF (method_getTypeEncoding (meth), "v32@0:8^{__NSAppleEventManagerSuspension=}16r^q24"); + + meth = class_getInstanceMethod (fooClass, @selector(anotherMeth:and:and:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "r@40@0:8r:16r@24r@32")); ++ CHECK_IF (method_getTypeEncoding (meth), "r@40@0:8r:16r@24r@32"); + + meth = class_getInstanceMethod (fooClass, @selector(str1:str2:str3:str4:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "@48@0:8r*16*24*32r*40")); ++ CHECK_IF (method_getTypeEncoding (meth), "@48@0:8r*16*24*32r*40"); + + meth = class_getInstanceMethod (fooClass, @selector(foo1:foo2:foo3:foo4:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "Vv48@0:8@16r@24@32r@40")); ++ CHECK_IF (method_getTypeEncoding (meth), "Vv48@0:8@16r@24@32r@40"); + + meth = class_getInstanceMethod (fooClass, @selector(sel1:id1:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "rn*32@0:8r:16r@24")); ++ CHECK_IF (method_getTypeEncoding (meth), "rn*32@0:8r:16r@24"); + + meth = class_getInstanceMethod (fooClass, @selector(obj1:obj2:obj3:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "N@40@0:8r@16@24^{Object=#}32")); ++ CHECK_IF (method_getTypeEncoding (meth), "N@40@0:8r@16@24^{NSObject=#}32"); + + meth = class_getClassMethod (fooClass, @selector(_defaultScriptingComponent)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "^{ComponentInstanceRecord=[1q]}16@0:8")); ++ CHECK_IF (method_getTypeEncoding (meth), "^{ComponentInstanceRecord=[1q]}16@0:8"); + + meth = class_getInstanceMethod (fooClass, @selector(_formatCocoaErrorString:parameters:applicableFormatters:count:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "@44@0:8@16r*24^^{?}32i40")); ++ CHECK_IF (method_getTypeEncoding (meth), "@44@0:8@16r*24^^{?}32i40"); + + meth = class_getInstanceMethod (fooClass, @selector(formatter_func:run:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "^{?=^?@I}32@0:8@16r^^{?}24")); ++ CHECK_IF (method_getTypeEncoding (meth), "^{?=^?@I}32@0:8@16r^^{?}24"); + + meth = class_getInstanceMethod (fooClass, @selector(_forgetWord:inDictionary:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "c32@0:8nO@16nO@24")); ++ CHECK_IF (method_getTypeEncoding (meth), "c32@0:8nO@16nO@24"); + + meth = class_getInstanceMethod (fooClass, @selector(_registerServicesMenu:withSendTypes:andReturnTypes:addToList:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "v44@0:8@16r^*24r^*32c40")); ++ CHECK_IF (method_getTypeEncoding (meth), "v44@0:8@16r^*24r^*32c40"); + + meth = class_getClassMethod (fooClass, @selector(_proxySharePointer)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "^^{__CFSet}16@0:8")); ++ CHECK_IF (method_getTypeEncoding (meth), "^^{__CFSet}16@0:8"); + + meth = class_getInstanceMethod (fooClass, @selector(_checkGrammarInString:language:details:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "{_NSRange=II}40@0:8n@16nO@24oO^@32")); ++ CHECK_IF (method_getTypeEncoding (meth), "{_NSRange=II}40@0:8n@16nO@24oO^@32"); + + meth = class_getInstanceMethod (fooClass, @selector(_resolvePositionalStakeGlyphsForLineFragment:lineFragmentRect:minPosition:maxPosition:maxLineFragmentWidth:breakHint:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "B60@0:8^{__CTLine=}16{_NSRect={_NSPoint=ff}{_NSSize=ff}}24f40f44f48^Q52")); ++ CHECK_IF (method_getTypeEncoding (meth), "B60@0:8^{__CTLine=}16{_NSRect={_NSPoint=ff}{_NSSize=ff}}24f40f44f48^q52"); + + meth = class_getClassMethod (fooClass, @selector(findVoiceByIdentifier:returningCreator:returningID:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "c40@0:8@16^I24^I32")); ++ CHECK_IF (method_getTypeEncoding (meth), "c40@0:8@16^I24^I32"); + + ivars = class_copyIvarList (fooClass, &ivar_count); +- CHECK_IF (ivar_count == 1); ++ if (ivar_count != 1) { ++ abort (); ++ } + + ivar = ivars[0]; +- CHECK_IF (!strcmp (ivar_getName(ivar), "r")); +- CHECK_IF (!strcmp (ivar_getTypeEncoding(ivar), ++ CHECK_IF (ivar_getName(ivar), "r"); ++ CHECK_IF (ivar_getTypeEncoding(ivar), + "{?=\"_attributes\"@\"NSDictionary\"\"_font\"@\"NSFont\"\"_characterLength\"" +- "Q\"_nominalGlyphLocation\"Q\"p\"^Q\"_defaultLineHeight\"f\"_defaultBaselineOffset\"" ++ "q\"_nominalGlyphLocation\"q\"p\"^q\"_defaultLineHeight\"f\"_defaultBaselineOffset\"" + "f\"_horizExpansion\"f\"_baselineDelta\"f\"_attachmentBBox\"{_NSRect=\"origin\"" + "{_NSPoint=\"x\"f\"y\"f}\"size\"{_NSSize=\"width\"f\"height\"f}}\"ll\"q\"llp\"^q\"ull\"" + "Q\"ullp\"^Q\"a\"@\"a1\"@\"a2\"@\"b\":\"b1\":\"b2\":\"str1\"*\"str2\"*\"str3\"*\"str4\"" + "*\"_rFlags\"{?=\"_isAttachmentRun\"b1\"_hasPositionalStake\"b1\"_isDefaultFace\"" +- "b1\"_hasCombiningMarks\"b1\"_isScreenFont\"b1\"_reserved\"b27}}")); +- ++ "b1\"_hasCombiningMarks\"b1\"_isScreenFont\"b1\"_reserved\"b27}}"); ++/*"{?=\"_attributes\"@\"NSDictionary\"\"_font\"@\"NSFont\"\"_characterLength\"q\"_nominalGlyphLocation\"q\"p\"^q\"_defaultLineHeight\"f\"_defaultBaselineOffset\"f\"_horizExpansion\"f\"_baselineDelta\"f\"_attachmentBBox\"{_NSRect=\"origin\"{_NSPoint=\"x\"f\"y\"f}\"size\"{_NSSize=\"width\"f\"height\"f}}\"ll\"q\"llp\"^q\"ull\"Q\"ullp\"^Q\"a\"@\"a1\"@\"a2\"@\"b\":\"b1\":\"b2\"^{objc_selector}\"str1\"*\"str2\"*\"str3\"*\"str4\"*\"_rFlags\"{?=\"_isAttachmentRun\"b1\"_hasPositionalStake\"b1\"_isDefaultFace\"b1\"_hasCombiningMarks\"b1\"_isScreenFont\"b1\"_reserved\"b27}}"*/ + return 0; + } +--- a/src/gcc/testsuite/objc.dg/image-info.m ++++ b/src/gcc/testsuite/objc.dg/image-info.m +@@ -7,20 +7,19 @@ + /* { dg-skip-if "NeXT-only" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-freplace-objc-classes" } */ + +-#include <objc/objc.h> +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + + extern void abort(void); + #define CHECK_IF(expr) if(!(expr)) abort(); + +-@interface Object (TEST_SUITE_C1) ++@interface NSObject (TEST_SUITE_C1) + - init; + @end +-@implementation Object (TEST_SUITE_C1) ++@implementation NSObject (TEST_SUITE_C1) + - init {return self;} + @end + +-@interface Base: Object { ++@interface Base: NSObject { + @public + int a; + float b; +--- a/src/gcc/testsuite/objc.dg/method-6.m ++++ b/src/gcc/testsuite/objc.dg/method-6.m +@@ -4,14 +4,21 @@ + /* { dg-do compile } */ + /* { dg-options "-Wstrict-selector-match" } */ + ++#ifdef __NEXT_RUNTIME__ ++#include <Foundation/NSObject.h> ++#define OBJECT NSObject ++#else ++#include <objc/Object.h> + #include <objc/Protocol.h> ++#define OBJECT Object ++#endif + + @interface Base + - (unsigned)port; + @end + + @interface Derived: Base +-- (Object *)port; ++- (OBJECT *)port; + + (Protocol *)port; + - (id)starboard; + @end +@@ -20,13 +27,13 @@ + Class receiver; + + [receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */ +- /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 10 } */ +- /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 15 } */ ++ /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 17 } */ ++ /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 22 } */ + + [receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */ +- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 26 } */ +- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 26 } */ +- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 26 } */ ++ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 33 } */ ++ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 33 } */ ++ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 33 } */ + + [Class port]; /* { dg-error ".Class. is not an Objective\\-C class name or alias" } */ + } +--- a/src/gcc/testsuite/objc.dg/no-extra-load.m ++++ b/src/gcc/testsuite/objc.dg/no-extra-load.m +@@ -1,7 +1,7 @@ + /* { dg-do compile { target *-*-darwin* } } */ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + +-#import <Foundation/Foundation.h> ++#include <Foundation/NSObject.h> + main() { [NSObject new]; } + + /* { dg-final { scan-assembler-not "L_objc_msgSend\\\$non_lazy_ptr" } } */ +--- a/src/gcc/testsuite/objc.dg/objc-foreach-4.m ++++ b/src/gcc/testsuite/objc.dg/objc-foreach-4.m +@@ -1,17 +1,13 @@ + /* Test for valid objc objects used in a for-each statement. */ + /* FIXME: Run this test with the GNU runtime as well. */ +-/* { dg-do compile { target *-*-darwin* } } */ ++/* { dg-do run { target *-*-darwin* } } */ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-skip-if "No NeXT fast enum. pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */ ++/* { dg-additional-options "-framework Foundation" { target { *-*-darwin* } } } */ + +-#include <objc/objc-api.h> +-#include <Foundation/Foundation.h> +- +-#if defined (__NEXT_RUNTIME__) && defined (__LP64__) +-/* Fudge the class reference until we implement the compiler-side +- const strings. */ +-extern void *_NSConstantStringClassReference; +-#endif ++#include <Foundation/NSString.h> ++#include <Foundation/NSAutoreleasePool.h> ++#include <Foundation/NSArray.h> + + // gcc -o foo foo.m -framework Foundation + +--- a/src/gcc/testsuite/objc.dg/objc-foreach-5.m ++++ b/src/gcc/testsuite/objc.dg/objc-foreach-5.m +@@ -2,8 +2,10 @@ + /* { dg-do compile { target *-*-darwin* } } */ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-skip-if "No NeXT fast enum. pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */ ++/* { dg-additional-options "-framework Foundation" { target { *-*-darwin* } } } */ + +-#import <Foundation/Foundation.h> ++#include <Foundation/NSArray.h> ++#include <Foundation/NSAutoreleasePool.h> + + NSArray * createTestVictim(unsigned capacity) { + NSMutableArray * arr = [[NSMutableArray alloc] initWithCapacity:capacity]; +--- a/src/gcc/testsuite/objc.dg/pr23214.m ++++ b/src/gcc/testsuite/objc.dg/pr23214.m +@@ -3,14 +3,24 @@ + + /* { dg-do run } */ + /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ ++/* { dg-additional-options "-framework Foundation" { target { { *-*-darwin* } && objc2 } } } */ + ++#if defined (__NEXT_RUNTIME__) && defined(__OBJC2__) \ ++ && defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \ ++ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1070 + #include <objc/Protocol.h> +- +-@interface Object (TS_CAT) ++#define OBJECT NSObject ++#else ++#include <objc/Object.h> ++#define OBJECT Object ++#include <objc/Protocol.h> ++#endif ++ ++@interface OBJECT (TS_CAT) + - test; + @end + +-@implementation Object (TS_CAT) ++@implementation OBJECT (TS_CAT) + - test { return self; } + @end + +@@ -20,7 +30,7 @@ + @protocol B + @end + +-@interface Dummy : Object <B> ++@interface Dummy : OBJECT <B> + @end + + int main () +--- a/src/gcc/testsuite/objc.dg/proto-lossage-7.m ++++ b/src/gcc/testsuite/objc.dg/proto-lossage-7.m +@@ -1,12 +1,19 @@ + /* Check that typedefs of ObjC classes preserve + any @protocol qualifiers. */ + /* { dg-do compile } */ ++ ++#ifdef __NEXT_RUNTIME__ ++#include <Foundation/NSObject.h> ++#define OBJECT NSObject ++#else + #include <objc/Object.h> ++#define OBJECT Object ++#endif + + @protocol CanDoStuff; + +-typedef Object<CanDoStuff> CanDoStuffType; +-typedef Object<CanDoStuff> *CanDoStuffTypePtr; ++typedef OBJECT<CanDoStuff> CanDoStuffType; ++typedef OBJECT<CanDoStuff> *CanDoStuffTypePtr; + + @protocol CanDoStuff + - (int) dostuff; +--- a/src/gcc/testsuite/objc.dg/strings/const-cfstring-5.m ++++ b/src/gcc/testsuite/objc.dg/strings/const-cfstring-5.m +@@ -6,16 +6,16 @@ + /* { dg-skip-if "NeXT only" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-mconstant-cfstrings" } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + +-@interface Foo: Object { ++@interface Foo: NSObject { + char *cString; + unsigned int len; + } + + (Foo *)description; + @end + +-@interface Bar: Object ++@interface Bar: NSObject + + (Foo *) getString: (int) which; + @end + +--- a/src/gcc/testsuite/objc.dg/strings/const-str-12b.m ++++ b/src/gcc/testsuite/objc.dg/strings/const-str-12b.m +@@ -5,17 +5,23 @@ + /* { dg-options "-fconstant-string-class=Foo" } */ + /* { dg-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */ + ++#ifdef __NEXT_RUNTIME__ ++#include <Foundation/NSObject.h> ++#define OBJECT NSObject ++#else + #include <objc/Object.h> ++#define OBJECT Object ++#endif + #include "../../objc-obj-c++-shared/objc-test-suite-types.h" + +-@interface Foo: Object { ++@interface Foo: OBJECT { + char *cString; + unsigned int len; + } + + (id)description; + @end + +-@interface Bar: Object ++@interface Bar: OBJECT + + (Foo *) getString: (int) which; + @end + +--- a/src/gcc/testsuite/objc.dg/symtab-1.m ++++ b/src/gcc/testsuite/objc.dg/symtab-1.m +@@ -4,9 +4,9 @@ + /* { dg-do compile { target { *-*-darwin* } } } */ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + +-@interface Base: Object ++@interface Base: NSObject + - (void)setValues; + @end + +--- a/src/gcc/testsuite/objc.dg/torture/strings/const-str-10.m ++++ b/src/gcc/testsuite/objc.dg/torture/strings/const-str-10.m +@@ -6,10 +6,10 @@ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + #include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */ + +-@interface NSString: Object ++@interface NSString: NSObject + @end + + @interface NSSimpleCString : NSString { +--- a/src/gcc/testsuite/objc.dg/torture/strings/const-str-11.m ++++ b/src/gcc/testsuite/objc.dg/torture/strings/const-str-11.m +@@ -7,10 +7,10 @@ + /* { dg-options "-fconstant-string-class=XStr" } */ + /* { dg-options "-mno-constant-cfstrings -fconstant-string-class=XStr" { target *-*-darwin* } } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + #include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */ + +-@interface XString: Object { ++@interface XString: NSObject { + @protected + char *bytes; + } +--- a/src/gcc/testsuite/objc.dg/torture/strings/const-str-9.m ++++ b/src/gcc/testsuite/objc.dg/torture/strings/const-str-9.m +@@ -5,10 +5,10 @@ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + #include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */ + +-@interface NSConstantString: Object { ++@interface NSConstantString: NSObject { + char *cString; + unsigned int len; + } +--- a/src/gcc/testsuite/objc.dg/zero-link-1.m ++++ b/src/gcc/testsuite/objc.dg/zero-link-1.m +@@ -5,13 +5,12 @@ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-fzero-link" } */ + +-#include <objc/Object.h> +-#include <objc/objc.h> ++#include <Foundation/NSObject.h> + + extern void abort(void); + #define CHECK_IF(expr) if(!(expr)) abort(); + +-@interface Base: Object ++@interface Base: NSObject + + (int) getValue; + @end + +--- a/src/gcc/testsuite/objc.dg/zero-link-2.m ++++ b/src/gcc/testsuite/objc.dg/zero-link-2.m +@@ -5,12 +5,12 @@ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-fno-zero-link" } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + + extern void abort(void); + #define CHECK_IF(expr) if(!(expr)) abort(); + +-@interface Base: Object ++@interface Base: NSObject + + (int) getValue; + @end + +--- a/src/gcc/testsuite/objc.dg/zero-link-3.m ++++ b/src/gcc/testsuite/objc.dg/zero-link-3.m +@@ -2,15 +2,23 @@ + /* Contributed by Ziemowit Laski <zlaski@apple.com>. */ + + /* { dg-do run { target *-*-darwin* } } */ +-/* { dg-options "-fzero-link" } */ ++/* { dg-additional-options "-fzero-link" } */ ++/* { dg-additional-options "-framework Foundation" { target { *-*-darwin* } } } */ + /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ + ++#ifdef __NEXT_RUNTIME__ ++#include <Foundation/NSObject.h> ++#define OBJECT NSObject ++#else + #include <objc/Object.h> ++#include <objc/Protocol.h> ++#define OBJECT Object ++#endif + + extern void abort(void); + #define CHECK_IF(expr) if(!(expr)) abort(); + +-@interface Base: Object ++@interface Base: OBJECT + + (int) getValue; + @end + --- a/src/gcc/tlink.c +++ b/src/gcc/tlink.c @@ -2,7 +2,7 @@ @@ -79640,29 +81077,37 @@ #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 +Binary files gcc-4.7.3/libcpp/po/be.gmo and gcc-linaro-4.7-2013.08/libcpp/po/be.gmo differ +Binary files gcc-4.7.3/libcpp/po/ca.gmo and gcc-linaro-4.7-2013.08/libcpp/po/ca.gmo differ +Binary files gcc-4.7.3/libcpp/po/da.gmo and gcc-linaro-4.7-2013.08/libcpp/po/da.gmo differ +Binary files gcc-4.7.3/libcpp/po/de.gmo and gcc-linaro-4.7-2013.08/libcpp/po/de.gmo differ +Binary files gcc-4.7.3/libcpp/po/el.gmo and gcc-linaro-4.7-2013.08/libcpp/po/el.gmo differ +Binary files gcc-4.7.3/libcpp/po/eo.gmo and gcc-linaro-4.7-2013.08/libcpp/po/eo.gmo differ +Binary files gcc-4.7.3/libcpp/po/es.gmo and gcc-linaro-4.7-2013.08/libcpp/po/es.gmo differ +Binary files gcc-4.7.3/libcpp/po/fi.gmo and gcc-linaro-4.7-2013.08/libcpp/po/fi.gmo differ +Binary files gcc-4.7.3/libcpp/po/fr.gmo and gcc-linaro-4.7-2013.08/libcpp/po/fr.gmo differ +Binary files gcc-4.7.3/libcpp/po/id.gmo and gcc-linaro-4.7-2013.08/libcpp/po/id.gmo differ +Binary files gcc-4.7.3/libcpp/po/ja.gmo and gcc-linaro-4.7-2013.08/libcpp/po/ja.gmo differ +Binary files gcc-4.7.3/libcpp/po/nl.gmo and gcc-linaro-4.7-2013.08/libcpp/po/nl.gmo differ +Binary files gcc-4.7.3/libcpp/po/ru.gmo and gcc-linaro-4.7-2013.08/libcpp/po/ru.gmo differ +Binary files gcc-4.7.3/libcpp/po/sr.gmo and gcc-linaro-4.7-2013.08/libcpp/po/sr.gmo differ +Binary files gcc-4.7.3/libcpp/po/sv.gmo and gcc-linaro-4.7-2013.08/libcpp/po/sv.gmo differ +Binary files gcc-4.7.3/libcpp/po/tr.gmo and gcc-linaro-4.7-2013.08/libcpp/po/tr.gmo differ +Binary files gcc-4.7.3/libcpp/po/uk.gmo and gcc-linaro-4.7-2013.08/libcpp/po/uk.gmo differ +Binary files gcc-4.7.3/libcpp/po/vi.gmo and gcc-linaro-4.7-2013.08/libcpp/po/vi.gmo differ +Binary files gcc-4.7.3/libcpp/po/zh_CN.gmo and gcc-linaro-4.7-2013.08/libcpp/po/zh_CN.gmo differ +Binary files gcc-4.7.3/libcpp/po/zh_TW.gmo and gcc-linaro-4.7-2013.08/libcpp/po/zh_TW.gmo differ --- a/src/libgcc/ChangeLog +++ b/src/libgcc/ChangeLog -@@ -1,3 +1,31 @@ +@@ -1,3 +1,39 @@ ++2013-08-01 Maxim Kuvyrkov <maxim@kugelworks.com> ++ ++ Backport from trunk: Fix licenses on several libgcc files. ++ ++ * config/ia64/unwind-ia64.h, ++ * config/mips/vr4120-div.S: Fix license from GPL-3.0+ to ++ GPL-3.0-with-GCC-exception. ++ +2013-06-08 Walter Lee <walt@tilera.com> + + Backport from mainline: @@ -80596,6 +82041,86 @@ Binary files gcc-4.7.3/libcpp/po/zh_TW.gmo and gcc-linaro-4.7-2013.07/libcpp/po/ @@ -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/ia64/unwind-ia64.h ++++ b/src/libgcc/config/ia64/unwind-ia64.h +@@ -2,21 +2,26 @@ + Contributed by Andrew MacLeod <amacleod@cygnus.com> + Andrew Haley <aph@cygnus.com> + +- This file is part of GCC. ++This file is part of GCC. + +- GCC is free software; you can redistribute it and/or modify +- it under the terms of the GNU General Public License as published by +- the Free Software Foundation; either version 3, or (at your option) +- any later version. +- +- GCC is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. +- +- You should have received a copy of the GNU General Public License +- along with GCC; see the file COPYING3. If not see +- <http://www.gnu.org/licenses/>. */ ++GCC is free software; you can redistribute it and/or modify it under ++the terms of the GNU General Public License as published by the Free ++Software Foundation; either version 3, or (at your option) any later ++version. ++ ++GCC is distributed in the hope that it will be useful, but WITHOUT ANY ++WARRANTY; without even the implied warranty of MERCHANTABILITY or ++FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++for more details. ++ ++Under Section 7 of GPL version 3, you are granted additional ++permissions described in the GCC Runtime Library Exception, version ++3.1, as published by the Free Software Foundation. ++ ++You should have received a copy of the GNU General Public License and ++a copy of the GCC Runtime Library Exception along with this program; ++see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++<http://www.gnu.org/licenses/>. */ + + struct unw_table_entry + { +--- a/src/libgcc/config/mips/vr4120-div.S ++++ b/src/libgcc/config/mips/vr4120-div.S +@@ -3,18 +3,23 @@ + + This file is part of GCC. + +-GCC is free software; you can redistribute it and/or modify +-it under the terms of the GNU General Public License as published by +-the Free Software Foundation; either version 3, or (at your option) +-any later version. +- +-GCC is distributed in the hope that it will be useful, +-but WITHOUT ANY WARRANTY; without even the implied warranty of +-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-GNU General Public License for more details. ++GCC is free software; you can redistribute it and/or modify it under ++the terms of the GNU General Public License as published by the Free ++Software Foundation; either version 3, or (at your option) any later ++version. + +-You should have received a copy of the GNU General Public License +- along with GCC; see the file COPYING3. If not see ++GCC is distributed in the hope that it will be useful, but WITHOUT ANY ++WARRANTY; without even the implied warranty of MERCHANTABILITY or ++FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++for more details. ++ ++Under Section 7 of GPL version 3, you are granted additional ++permissions described in the GCC Runtime Library Exception, version ++3.1, as published by the Free Software Foundation. ++ ++You should have received a copy of the GNU General Public License and ++a copy of the GCC Runtime Library Exception along with this program; ++see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + <http://www.gnu.org/licenses/>. */ + + /* This file contains functions which implement divsi3 and modsi3 for --- a/src/libgcc/config/tilepro/atomic.h +++ b/src/libgcc/config/tilepro/atomic.h @@ -1,6 +1,5 @@ @@ -80946,7 +82471,23 @@ Binary files gcc-4.7.3/libcpp/po/zh_TW.gmo and gcc-linaro-4.7-2013.07/libcpp/po/ #define FP_CLS_NORMAL 0 --- a/src/libgfortran/ChangeLog +++ b/src/libgfortran/ChangeLog -@@ -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: @@ -80985,6 +82526,82 @@ Binary files gcc-4.7.3/libcpp/po/zh_TW.gmo and gcc-linaro-4.7-2013.07/libcpp/po/ 2013-04-11 Release Manager * GCC 4.7.3 released. +--- a/src/libgfortran/config/fpu-387.h ++++ b/src/libgfortran/config/fpu-387.h +@@ -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)); ++ ++ /* The SSE exception masks are shifted by 7 bits. */ ++ cw_sse |= _FPU_MASK_ALL << 7; ++ cw_sse &= ~(excepts << 7); + +- cw_sse &= 0xffff0000; +- cw_sse |= (_FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM | _FPU_MASK_OM +- | _FPU_MASK_UM | _FPU_MASK_PM ) << 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)); + } + } --- a/src/libgfortran/io/list_read.c +++ b/src/libgfortran/io/list_read.c @@ -2028,8 +2028,8 @@ diff --git a/debian/patches/svn-updates-linaro.diff b/debian/patches/svn-updates-linaro.diff index f5b76b3..741d683 100644 --- a/debian/patches/svn-updates-linaro.diff +++ b/debian/patches/svn-updates-linaro.diff @@ -1,762 +1,463 @@ -# DP: updates from the 4.7 branch upto 20130715 (r200955). +# DP: updates from the 4.7 branch upto 20130821 (r201895). last_updated() { cat > ${dir}LAST_UPDATED <<EOF -Mon Jul 15 11:09:50 CEST 2013 -Mon Jul 15 09:09:50 UTC 2013 (revision 200955) +Wed Aug 21 11:15:52 CEST 2013 +Wed Aug 21 09:15:52 UTC 2013 (revision 201895) EOF } -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 \ +LANG=C svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@201655 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch \ | sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \ | awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0' +Index: libstdc++-v3/src/c++98/compatibility.cc +=================================================================== +--- a/src/libstdc++-v3/src/c++98/compatibility.cc (revision ++++ b/src/libstdc++-v3/src/c++98/compatibility.cc (revision +@@ -518,14 +518,21 @@ + extern __attribute__((used, weak)) const char _ZTSPe[3] = "Pe"; + extern __attribute__((used, weak)) const char _ZTSPKe[4] = "PKe"; + extern __attribute__((used, weak)) const void * const _ZTIe[2] +- = { (void *) &_ZTVN10__cxxabiv123__fundamental_type_infoE[2], +- (void *) _ZTSe }; ++ = { reinterpret_cast<const void *> ++ (&_ZTVN10__cxxabiv123__fundamental_type_infoE[2]), ++ reinterpret_cast<const void *>(_ZTSe) }; + extern __attribute__((used, weak)) const void * const _ZTIPe[4] +- = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2], +- (void *) _ZTSPe, (void *) 0L, (void *) _ZTIe }; ++ = { reinterpret_cast<const void *> ++ (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]), ++ reinterpret_cast<const void *>(_ZTSPe), ++ reinterpret_cast<const void *>(0L), ++ reinterpret_cast<const void *>(_ZTIe) }; + extern __attribute__((used, weak)) const void * const _ZTIPKe[4] +- = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2], +- (void *) _ZTSPKe, (void *) 1L, (void *) _ZTIe }; ++ = { reinterpret_cast<const void *> ++ (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]), ++ reinterpret_cast<const void *>(_ZTSPKe), ++ reinterpret_cast<const void *>(1L), ++ reinterpret_cast<const void *>(_ZTIe) }; + #endif // _GLIBCXX_LONG_DOUBLE_COMPAT + + #ifdef _GLIBCXX_SYMVER_DARWIN +Index: libstdc++-v3/ChangeLog +=================================================================== +--- a/src/libstdc++-v3/ChangeLog (revision ++++ b/src/libstdc++-v3/ChangeLog (revision +@@ -1,3 +1,10 @@ ++2013-08-17 Uros Bizjak <ubizjak@gmail.com> ++ ++ * src/c++98/compatibility.cc (_ZTIe): Use ++ reinterpret_cast<const cast *> to avoid -Wcast-qual warnings. ++ (_ZTIPe): Ditto. ++ (ZTIPKe): Ditto. ++ + 2013-05-15 Jonathan Wakely <jwakely.gcc@gmail.com> + + * include/bits/basic_string.h (getline): Fix doxygen comments. Index: gcc/DATESTAMP =================================================================== --- a/src/gcc/DATESTAMP (revision +++ b/src/gcc/DATESTAMP (revision @@ -1 +1 @@ --20130626 -+20130715 +-20130812 ++20130821 +Index: gcc/tree-tailcall.c +=================================================================== +--- a/src/gcc/tree-tailcall.c (revision ++++ b/src/gcc/tree-tailcall.c (revision +@@ -329,8 +329,10 @@ + case NEGATE_EXPR: + if (FLOAT_TYPE_P (TREE_TYPE (op0))) + *m = build_real (TREE_TYPE (op0), dconstm1); ++ else if (INTEGRAL_TYPE_P (TREE_TYPE (op0))) ++ *m = build_int_cst (TREE_TYPE (op0), -1); + else +- *m = build_int_cst (TREE_TYPE (op0), -1); ++ return false; + + *ass_var = dest; + return true; +@@ -342,8 +344,10 @@ + { + if (FLOAT_TYPE_P (TREE_TYPE (non_ass_var))) + *m = build_real (TREE_TYPE (non_ass_var), dconstm1); +- else ++ else if (INTEGRAL_TYPE_P (TREE_TYPE (non_ass_var))) + *m = build_int_cst (TREE_TYPE (non_ass_var), -1); ++ else ++ return false; + + *a = fold_build1 (NEGATE_EXPR, TREE_TYPE (non_ass_var), non_ass_var); + } Index: gcc/ChangeLog =================================================================== --- a/src/gcc/ChangeLog (revision +++ b/src/gcc/ChangeLog (revision -@@ -1,3 +1,51 @@ -+2013-07-11 Georg-Johann Lay <avr@gjlay.de> +@@ -1,3 +1,30 @@ ++2013-08-17 Uros Bizjak <ubizjak@gmail.com> + -+ Backport from 2013-07-11 trunk r200901. ++ Backport from mainline ++ 2013-08-12 Perez Read <netfirewall@gmail.com> + -+ PR target/57631 -+ * config/avr/avr.c (avr_set_current_function): Sanity-check signal -+ name seen by assembler/linker if available. ++ PR target/58132 ++ * config/i386/i386.md (*movabs<mode>_1): Add <ptrsize> PTR before ++ operand 0 for intel asm alternative. ++ (*movabs<mode>_2): Ditto for operand 1. + -+2013-07-10 Georg-Johann Lay <avr@gjlay.de> ++2013-08-13 Marek Polacek <polacek@redhat.com> + -+ Backport from 2013-07-10 trunk r200872. ++ Backport from 4.8: ++ 2013-0813 Marek Polacek <polacek@redhat.com> ++ Jakub Jelinek <jakub@redhat.com> + -+ PR target/57844 -+ * config/avr/avr.c (avr_prologue_setup_frame): Trunk -size to mode -+ of my_fp. ++ PR tree-optimization/57980 ++ * tree-tailcall.c (process_assignment): Return false ++ when not dealing with integers or floats. + -+2013-07-10 Uros Bizjak <ubizjak@gmail.com> ++2013-08-12 David Edelsohn <dje.gcc@gmail.com> + + Backport from mainline -+ 2013-07-06 Uros Bizjak <ubizjak@gmail.com> ++ 2013-02-14 Steven Bosscher <steven@gcc.gnu.org> + -+ * config/i386/sse.md (sse_movlhps): Change alternative 3 -+ of operand 2 to "m". ++ * collect2-aix.h: Define F_LOADONLY. + -+2013-07-09 Joseph Myers <joseph@codesourcery.com> + 2013-08-02 Eric Botcazou <ebotcazou@adacore.com> + + * config/sparc/sparc.c (sparc_emit_membar_for_model) <SMM_TSO>: Add +Index: gcc/testsuite/gnat.dg/loop_optimization16_pkg.adb +=================================================================== +--- a/src/gcc/testsuite/gnat.dg/loop_optimization16_pkg.adb (revision ++++ b/src/gcc/testsuite/gnat.dg/loop_optimization16_pkg.adb (revision +@@ -0,0 +1,8 @@ ++package body Loop_Optimization16_Pkg is ++ ++ function F return Natural is ++ begin ++ return Natural (Index_Base'Last); ++ end; ++ ++end Loop_Optimization16_Pkg; +Index: gcc/testsuite/gnat.dg/loop_optimization16_pkg.ads +=================================================================== +--- a/src/gcc/testsuite/gnat.dg/loop_optimization16_pkg.ads (revision ++++ b/src/gcc/testsuite/gnat.dg/loop_optimization16_pkg.ads (revision +@@ -0,0 +1,7 @@ ++package Loop_Optimization16_Pkg is + -+ * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Only -+ adjust register size for TDmode and TFmode for VSX registers. ++ type Index_Base is range 0 .. 127; + -+2013-07-08 Eric Botcazou <ebotcazou@adacore.com> ++ function F return Natural; + -+ * Makefile.in (tree-ssa-reassoc.o): Add dependency on $(PARAMS_H). ++end Loop_Optimization16_Pkg; +Index: gcc/testsuite/gnat.dg/loop_optimization16.adb +=================================================================== +--- a/src/gcc/testsuite/gnat.dg/loop_optimization16.adb (revision ++++ b/src/gcc/testsuite/gnat.dg/loop_optimization16.adb (revision +@@ -0,0 +1,24 @@ ++-- { dg-do run } + -+2013-07-08 Jakub Jelinek <jakub@redhat.com> ++with Loop_Optimization16_Pkg; use Loop_Optimization16_Pkg; + -+ 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. ++procedure Loop_Optimization16 is + -+2013-07-05 Uros Bizjak <ubizjak@gmail.com> ++ Counter : Natural := 0; + -+ Backport from mainline -+ 2013-06-20 Uros Bizjak <ubizjak@gmail.com> ++ C : constant Natural := F; + -+ PR target/57655 -+ * config/i386/i386.c (construct_container): Report error if -+ long double is used with disabled x87 float returns. ++ subtype Index_T is Index_Base range 1 .. Index_Base (C); + - 2013-06-21 David Edelsohn <dje.gcc@gmail.com> - - Backport from mainline -Index: gcc/testsuite/gcc.target/i386/pr57655.c -=================================================================== ---- 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" } ++begin + -+/* { dg-error "x87 register return with x87 disabled" "" { target { ! ia32 } } 8 } */ ++ for I in Index_T'First .. Index_T'Last loop ++ Counter := Counter + 1; ++ exit when Counter > 200; ++ end loop; + -+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/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/gcc.c-torture/execute/pr57829.c ++ if Counter > 200 then ++ raise Program_Error; ++ end if; ++ ++end Loop_Optimization16; +Index: gcc/testsuite/gcc.dg/pr57980.c =================================================================== ---- 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)); -+} +--- a/src/gcc/testsuite/gcc.dg/pr57980.c (revision ++++ b/src/gcc/testsuite/gcc.dg/pr57980.c (revision +@@ -0,0 +1,19 @@ ++/* PR tree-optimization/57980 */ ++/* { dg-do compile } */ ++/* { dg-options "-O -foptimize-sibling-calls -w" } */ + -+__attribute__((noinline, noclone)) -+long int -+f2 (long int k) -+{ -+ return 2L | ((k - 1L) >> ((int) sizeof (long int) * __CHAR_BIT__ - 1)); -+} ++typedef int V __attribute__ ((vector_size (2 * sizeof (int)))); ++extern V f (void); + -+__attribute__((noinline, noclone)) -+int -+f3 (int k) ++V ++bar (void) +{ -+ k &= 63; -+ return 4 | ((k + 2) >> 5); ++ return -f (); +} + -+int -+main () ++V ++foo (void) +{ -+ if (f1 (1) != 2 || f2 (1L) != 2L || f3 (63) != 6 || f3 (1) != 4) -+ __builtin_abort (); -+ return 0; ++ V v = { }; ++ return v - f (); +} Index: gcc/testsuite/ChangeLog =================================================================== --- a/src/gcc/testsuite/ChangeLog (revision +++ b/src/gcc/testsuite/ChangeLog (revision -@@ -1,3 +1,26 @@ -+2012-12-03 Paolo Carlini <paolo.carlini@oracle.com> -+ -+ PR c++/54170 -+ * g++.dg/cpp0x/lambda/lambda-nullptr.C: New. +@@ -1,3 +1,16 @@ ++2013-08-13 Eric Botcazou <ebotcazou@adacore.com> + -+2013-07-08 Tobias Burnus <burnus@net-b.de> ++ * gnat.dg/loop_optimization16.adb: New test. ++ * gnat.dg/loop_optimization16_pkg.ad[sb]: New helper. + -+ PR fortran/57785 -+ * gfortran.dg/dot_product_2.f90: New. ++2013-08-13 Marek Polacek <polacek@redhat.com> + -+2013-07-08 Jakub Jelinek <jakub@redhat.com> ++ Backport from 4.8: ++ 2013-08-13 Marek Polacek <polacek@redhat.com> + -+ PR rtl-optimization/57829 -+ * gcc.c-torture/execute/pr57829.c: New test. ++ PR tree-optimization/57980 ++ * gcc.dg/pr57980.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> + 2013-08-11 Janus Weil <janus@gcc.gnu.org> - PR target/57568 -Index: gcc/testsuite/g++.dg/debug/template2.C -=================================================================== ---- 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 -+ -+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 + Backport from trunk: +Index: gcc/testsuite/g++.dg/template/delete2.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 +--- a/src/gcc/testsuite/g++.dg/template/delete2.C (revision ++++ b/src/gcc/testsuite/g++.dg/template/delete2.C (revision @@ -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 (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> ++// PR c++/58119 + -+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) ++template <class T> ++struct A +{ -+ return native_func(arg); -+} -+ -+template <typename RType> -+RType do_test(int delta) -+{ -+ return Call<RType>([=](int delta) { add(delta); return nullptr; }, delta); -+} ++ operator T*(); ++ template <class U> ++ operator A<U>(); ++}; + -+template <typename RType> -+void test() ++template <class T> ++struct B +{ -+ 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); -+} ++ operator T*(); ++ template <class U> ++ operator A<U>*(); ++}; + +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 ++ A<int> a; ++ delete a; + -+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) ++ B<int> b; ++ delete b; // { dg-error "template|delete" } ++} 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. +@@ -1,3 +1,11 @@ ++2013-08-20 Jason Merrill <jason@redhat.com> + -+ 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++/58119 ++ * cp-tree.h (WILDCARD_TYPE_P): Split out from... ++ (MAYBE_CLASS_TYPE_P): ...here. ++ * cvt.c (build_expr_type_conversion): Don't complain about a ++ template that can't match the desired type category. + -+ PR c++/57831 -+ * pt.c (tsubst_copy): Handle USING_DECL. -+ - 2013-05-20 Jason Merrill <jason@redhat.com> + 2012-12-03 Paolo Carlini <paolo.carlini@oracle.com> - PR c++/57325 -Index: gcc/cp/pt.c -=================================================================== ---- 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/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 + PR c++/54170 Index: gcc/cp/cvt.c =================================================================== --- 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); +@@ -1539,17 +1539,6 @@ + if (DECL_NONCONVERTING_P (cand)) + continue; -- if (TYPE_PTRMEM_P (type)) +- if (TREE_CODE (cand) == TEMPLATE_DECL) - { -- /* A NULL pointer-to-member is represented by -1, not by -- zero. */ -- expr = build_int_cst_type (type, -1); +- if (complain) +- { +- error ("ambiguous default type conversion from %qT", +- basetype); +- error (" candidate conversions include %qD", cand); +- } +- return error_mark_node; - } -- 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)); +- + candidate = non_reference (TREE_TYPE (TREE_TYPE (cand))); + + switch (TREE_CODE (candidate)) +@@ -1583,11 +1572,23 @@ + break; + + default: ++ /* A wildcard could be instantiated to match any desired ++ type, but we can't deduce the template argument. */ ++ if (WILDCARD_TYPE_P (candidate)) ++ win = true; + break; + } -- 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 + if (win) + { ++ if (TREE_CODE (cand) == TEMPLATE_DECL) ++ { ++ if (complain) ++ error ("default type conversion can't deduce template" ++ " argument for %qD", cand); ++ return error_mark_node; ++ } ++ + if (winner) + { + if (complain) +Index: gcc/cp/cp-tree.h =================================================================== ---- 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> +--- a/src/gcc/cp/cp-tree.h (revision ++++ b/src/gcc/cp/cp-tree.h (revision +@@ -1191,18 +1191,21 @@ + /* The _DECL for this _TYPE. */ + #define TYPE_MAIN_DECL(NODE) (TYPE_STUB_DECL (TYPE_MAIN_VARIANT (NODE))) + +-/* Nonzero if T is a class (or struct or union) type. Also nonzero +- for template type parameters, typename types, and instantiated +- template template parameters. Keep these checks in ascending code +- order. */ +-#define MAYBE_CLASS_TYPE_P(T) \ ++/* Nonzero if T is a type that could resolve to any kind of concrete type ++ at instantiation time. */ ++#define WILDCARD_TYPE_P(T) \ + (TREE_CODE (T) == TEMPLATE_TYPE_PARM \ + || TREE_CODE (T) == TYPENAME_TYPE \ + || TREE_CODE (T) == TYPEOF_TYPE \ + || TREE_CODE (T) == BOUND_TEMPLATE_TEMPLATE_PARM \ +- || TREE_CODE (T) == DECLTYPE_TYPE \ +- || CLASS_TYPE_P (T)) ++ || TREE_CODE (T) == DECLTYPE_TYPE) + ++/* Nonzero if T is a class (or struct or union) type. Also nonzero ++ for template type parameters, typename types, and instantiated ++ template template parameters. Keep these checks in ascending code ++ order. */ ++#define MAYBE_CLASS_TYPE_P(T) (WILDCARD_TYPE_P (T) || CLASS_TYPE_P (T)) ++ + /* Set CLASS_TYPE_P for T to VAL. T must be a class, struct, or + union type. */ + #define SET_CLASS_TYPE_P(T, VAL) \ +Index: gcc/ada/ChangeLog +=================================================================== +--- a/src/gcc/ada/ChangeLog (revision ++++ b/src/gcc/ada/ChangeLog (revision +@@ -1,3 +1,8 @@ ++2013-08-13 Eric Botcazou <ebotcazou@adacore.com> + -+ PR fortran/57785 -+ * simplify.c (compute_dot_product): Complex conjugate for -+ dot_product. -+ (gfc_simplify_dot_product, gfc_simplify_matmul): Update call. ++ * gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared for ++ values outside of the range of the type. + - 2013-06-06 Tobias Burnus <burnus@net-b.de> + 2013-05-26 Eric Botcazou <ebotcazou@adacore.com> - Backport from mainline -Index: gcc/fortran/simplify.c + * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge +Index: gcc/ada/gcc-interface/trans.c =================================================================== ---- a/src/gcc/fortran/simplify.c (revision -+++ b/src/gcc/fortran/simplify.c (revision -@@ -332,13 +332,15 @@ +--- a/src/gcc/ada/gcc-interface/trans.c (revision ++++ b/src/gcc/ada/gcc-interface/trans.c (revision +@@ -2232,7 +2232,10 @@ + if (TREE_CODE (val) != INTEGER_CST) + return true; + +- return tree_int_cst_equal (val, min_or_max_val) == 1; ++ if (max) ++ return tree_int_cst_lt (val, min_or_max_val) == 0; ++ else ++ return tree_int_cst_lt (min_or_max_val, val) == 0; } - --/* 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 + /* Return true if VAL (of type TYPE) can equal the minimum value of TYPE. +Index: gcc/collect2-aix.h =================================================================== ---- 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/collect2-aix.h (revision ++++ b/src/gcc/collect2-aix.h (revision +@@ -1,5 +1,5 @@ + /* AIX cross support for collect2. +- Copyright (C) 2009 Free Software Foundation, Inc. ++ Copyright (C) 2009-2013 Free Software Foundation, Inc. + + This file is part of GCC. + +@@ -29,7 +29,7 @@ + Definitions adapted from bfd. (Fairly heavily adapted in some cases.) + ------------------------------------------------------------------------- */ + +-/* Compatiblity types for bfd. */ ++/* Compatibility types for bfd. */ + typedef unsigned HOST_WIDE_INT bfd_vma; + + /* The size of an archive's fl_magic field. */ +@@ -135,7 +135,7 @@ + /* The number of entries in the symbol table. */ + char f_nsyms[4]; + +- /* The size of the auxillary header. */ ++ /* The size of the auxiliary header. */ + char f_opthdr[2]; + + /* Flags. */ +@@ -157,7 +157,7 @@ + /* The offset of the symbol table from the start of the file. */ + char f_symptr[8]; + +- /* The size of the auxillary header. */ ++ /* The size of the auxiliary header. */ + char f_opthdr[2]; + + /* Flags. */ +@@ -222,14 +222,15 @@ + /* The class of symbol (a C_* value). */ + char n_sclass[1]; + +- /* The number of auxillary symbols attached to this entry. */ ++ /* The number of auxiliary symbols attached to this entry. */ + char n_numaux[1]; + }; + + /* Definitions required by collect2. */ + #define C_EXT 2 + +-#define F_SHROBJ 0x2000 ++#define F_SHROBJ 0x2000 ++#define F_LOADONLY 0x4000 + + #define N_UNDEF ((short) 0) + #define N_TMASK 060 +Index: gcc/config/i386/i386.md =================================================================== ---- 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)); - } - } +--- a/src/gcc/config/i386/i386.md (revision ++++ b/src/gcc/config/i386/i386.md (revision +@@ -2327,7 +2327,7 @@ + "TARGET_LP64 && ix86_check_movabs (insn, 0)" + "@ + movabs{<imodesuffix>}\t{%1, %P0|[%P0], %1} +- mov{<imodesuffix>}\t{%1, %a0|%a0, %1}" ++ mov{<imodesuffix>}\t{%1, %a0|<iptrsize> PTR %a0, %1}" + [(set_attr "type" "imov") + (set_attr "modrm" "0,*") + (set_attr "length_address" "8,0") +@@ -2341,7 +2341,7 @@ + "TARGET_LP64 && ix86_check_movabs (insn, 1)" + "@ + movabs{<imodesuffix>}\t{%P1, %0|%0, [%P1]} +- mov{<imodesuffix>}\t{%a1, %0|%0, %a1}" ++ mov{<imodesuffix>}\t{%a1, %0|%0, <iptrsize> PTR %a1}" + [(set_attr "type" "imov") + (set_attr "modrm" "0,*") + (set_attr "length_address" "8,0") diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff index 96741e2..b43c402 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 20130715 (r200955). +# DP: updates from the 4.7 branch upto 20130820 (r201895). last_updated() { cat > ${dir}LAST_UPDATED <<EOF -Mon Jul 15 11:09:50 CEST 2013 -Mon Jul 15 09:09:50 UTC 2013 (revision 200955) +Wed Aug 21 11:15:52 CEST 2013 +Wed Aug 21 09:15:52 UTC 2013 (revision 201895) EOF } @@ -12,6 +12,38 @@ LANG=C svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_4_7_3_release svn://gcc.gnu.o | sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \ | awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0' +Index: libstdc++-v3/src/c++98/compatibility.cc +=================================================================== +--- a/src/libstdc++-v3/src/c++98/compatibility.cc (.../tags/gcc_4_7_3_release) ++++ b/src/libstdc++-v3/src/c++98/compatibility.cc (.../branches/gcc-4_7-branch) +@@ -518,14 +518,21 @@ + extern __attribute__((used, weak)) const char _ZTSPe[3] = "Pe"; + extern __attribute__((used, weak)) const char _ZTSPKe[4] = "PKe"; + extern __attribute__((used, weak)) const void * const _ZTIe[2] +- = { (void *) &_ZTVN10__cxxabiv123__fundamental_type_infoE[2], +- (void *) _ZTSe }; ++ = { reinterpret_cast<const void *> ++ (&_ZTVN10__cxxabiv123__fundamental_type_infoE[2]), ++ reinterpret_cast<const void *>(_ZTSe) }; + extern __attribute__((used, weak)) const void * const _ZTIPe[4] +- = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2], +- (void *) _ZTSPe, (void *) 0L, (void *) _ZTIe }; ++ = { reinterpret_cast<const void *> ++ (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]), ++ reinterpret_cast<const void *>(_ZTSPe), ++ reinterpret_cast<const void *>(0L), ++ reinterpret_cast<const void *>(_ZTIe) }; + extern __attribute__((used, weak)) const void * const _ZTIPKe[4] +- = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2], +- (void *) _ZTSPKe, (void *) 1L, (void *) _ZTIe }; ++ = { reinterpret_cast<const void *> ++ (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]), ++ reinterpret_cast<const void *>(_ZTSPKe), ++ reinterpret_cast<const void *>(1L), ++ reinterpret_cast<const void *>(_ZTIe) }; + #endif // _GLIBCXX_LONG_DOUBLE_COMPAT + + #ifdef _GLIBCXX_SYMVER_DARWIN Index: libstdc++-v3/src/c++11/system_error.cc =================================================================== --- a/src/libstdc++-v3/src/c++11/system_error.cc (.../tags/gcc_4_7_3_release) @@ -76,7 +108,14 @@ Index: libstdc++-v3/ChangeLog =================================================================== --- a/src/libstdc++-v3/ChangeLog (.../tags/gcc_4_7_3_release) +++ b/src/libstdc++-v3/ChangeLog (.../branches/gcc-4_7-branch) -@@ -1,3 +1,31 @@ +@@ -1,3 +1,38 @@ ++2013-08-17 Uros Bizjak <ubizjak@gmail.com> ++ ++ * src/c++98/compatibility.cc (_ZTIe): Use ++ reinterpret_cast<const cast *> to avoid -Wcast-qual warnings. ++ (_ZTIPe): Ditto. ++ (ZTIPKe): Ditto. ++ +2013-05-15 Jonathan Wakely <jwakely.gcc@gmail.com> + + * include/bits/basic_string.h (getline): Fix doxygen comments. @@ -180,7 +219,15 @@ Index: libgcc/ChangeLog =================================================================== --- a/src/libgcc/ChangeLog (.../tags/gcc_4_7_3_release) +++ b/src/libgcc/ChangeLog (.../branches/gcc-4_7-branch) -@@ -1,3 +1,31 @@ +@@ -1,3 +1,39 @@ ++2013-08-01 Maxim Kuvyrkov <maxim@kugelworks.com> ++ ++ Backport from trunk: Fix licenses on several libgcc files. ++ ++ * config/ia64/unwind-ia64.h, ++ * config/mips/vr4120-div.S: Fix license from GPL-3.0+ to ++ GPL-3.0-with-GCC-exception. ++ +2013-06-08 Walter Lee <walt@tilera.com> + + Backport from mainline: @@ -212,6 +259,50 @@ Index: libgcc/ChangeLog 2013-04-11 Release Manager * GCC 4.7.3 released. +Index: libgcc/config/ia64/unwind-ia64.h +=================================================================== +--- a/src/libgcc/config/ia64/unwind-ia64.h (.../tags/gcc_4_7_3_release) ++++ b/src/libgcc/config/ia64/unwind-ia64.h (.../branches/gcc-4_7-branch) +@@ -2,22 +2,27 @@ + Contributed by Andrew MacLeod <amacleod@cygnus.com> + Andrew Haley <aph@cygnus.com> + +- This file is part of GCC. ++This file is part of GCC. + +- GCC is free software; you can redistribute it and/or modify +- it under the terms of the GNU General Public License as published by +- the Free Software Foundation; either version 3, or (at your option) +- any later version. ++GCC is free software; you can redistribute it and/or modify it under ++the terms of the GNU General Public License as published by the Free ++Software Foundation; either version 3, or (at your option) any later ++version. + +- GCC is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. ++GCC is distributed in the hope that it will be useful, but WITHOUT ANY ++WARRANTY; without even the implied warranty of MERCHANTABILITY or ++FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++for more details. + +- You should have received a copy of the GNU General Public License +- along with GCC; see the file COPYING3. If not see +- <http://www.gnu.org/licenses/>. */ ++Under Section 7 of GPL version 3, you are granted additional ++permissions described in the GCC Runtime Library Exception, version ++3.1, as published by the Free Software Foundation. + ++You should have received a copy of the GNU General Public License and ++a copy of the GCC Runtime Library Exception along with this program; ++see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ++<http://www.gnu.org/licenses/>. */ ++ + struct unw_table_entry + { + unsigned long start_offset; Index: libgcc/config/tilepro/atomic.h =================================================================== --- a/src/libgcc/config/tilepro/atomic.h (.../tags/gcc_4_7_3_release) @@ -440,6 +531,44 @@ Index: libgcc/config/arm/linux-atomic.c #define SYNC_LOCK_RELEASE(TYPE, WIDTH) \ void HIDDEN \ +Index: libgcc/config/mips/vr4120-div.S +=================================================================== +--- a/src/libgcc/config/mips/vr4120-div.S (.../tags/gcc_4_7_3_release) ++++ b/src/libgcc/config/mips/vr4120-div.S (.../branches/gcc-4_7-branch) +@@ -3,18 +3,23 @@ + + This file is part of GCC. + +-GCC is free software; you can redistribute it and/or modify +-it under the terms of the GNU General Public License as published by +-the Free Software Foundation; either version 3, or (at your option) +-any later version. ++GCC is free software; you can redistribute it and/or modify it under ++the terms of the GNU General Public License as published by the Free ++Software Foundation; either version 3, or (at your option) any later ++version. + +-GCC is distributed in the hope that it will be useful, +-but WITHOUT ANY WARRANTY; without even the implied warranty of +-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-GNU General Public License for more details. ++GCC is distributed in the hope that it will be useful, but WITHOUT ANY ++WARRANTY; without even the implied warranty of MERCHANTABILITY or ++FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++for more details. + +-You should have received a copy of the GNU General Public License +- along with GCC; see the file COPYING3. If not see ++Under Section 7 of GPL version 3, you are granted additional ++permissions described in the GCC Runtime Library Exception, version ++3.1, as published by the Free Software Foundation. ++ ++You should have received a copy of the GNU General Public License and ++a copy of the GCC Runtime Library Exception along with this program; ++see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + <http://www.gnu.org/licenses/>. */ + + /* This file contains functions which implement divsi3 and modsi3 for Index: gcc/target.def =================================================================== --- a/src/gcc/target.def (.../tags/gcc_4_7_3_release) @@ -464,7 +593,35 @@ Index: gcc/DATESTAMP +++ b/src/gcc/DATESTAMP (.../branches/gcc-4_7-branch) @@ -1 +1 @@ -20130411 -+20130715 ++20130821 +Index: gcc/tree-tailcall.c +=================================================================== +--- a/src/gcc/tree-tailcall.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/tree-tailcall.c (.../branches/gcc-4_7-branch) +@@ -329,8 +329,10 @@ + case NEGATE_EXPR: + if (FLOAT_TYPE_P (TREE_TYPE (op0))) + *m = build_real (TREE_TYPE (op0), dconstm1); ++ else if (INTEGRAL_TYPE_P (TREE_TYPE (op0))) ++ *m = build_int_cst (TREE_TYPE (op0), -1); + else +- *m = build_int_cst (TREE_TYPE (op0), -1); ++ return false; + + *ass_var = dest; + return true; +@@ -342,8 +344,10 @@ + { + if (FLOAT_TYPE_P (TREE_TYPE (non_ass_var))) + *m = build_real (TREE_TYPE (non_ass_var), dconstm1); +- else ++ else if (INTEGRAL_TYPE_P (TREE_TYPE (non_ass_var))) + *m = build_int_cst (TREE_TYPE (non_ass_var), -1); ++ else ++ return false; + + *a = fold_build1 (NEGATE_EXPR, TREE_TYPE (non_ass_var), non_ass_var); + } Index: gcc/builtins.c =================================================================== --- a/src/gcc/builtins.c (.../tags/gcc_4_7_3_release) @@ -491,7 +648,39 @@ 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,310 @@ +@@ -1,3 +1,342 @@ ++2013-08-17 Uros Bizjak <ubizjak@gmail.com> ++ ++ Backport from mainline ++ 2013-08-12 Perez Read <netfirewall@gmail.com> ++ ++ PR target/58132 ++ * config/i386/i386.md (*movabs<mode>_1): Add <ptrsize> PTR before ++ operand 0 for intel asm alternative. ++ (*movabs<mode>_2): Ditto for operand 1. ++ ++2013-08-13 Marek Polacek <polacek@redhat.com> ++ ++ Backport from 4.8: ++ 2013-0813 Marek Polacek <polacek@redhat.com> ++ Jakub Jelinek <jakub@redhat.com> ++ ++ PR tree-optimization/57980 ++ * tree-tailcall.c (process_assignment): Return false ++ when not dealing with integers or floats. ++ ++2013-08-12 David Edelsohn <dje.gcc@gmail.com> ++ ++ Backport from mainline ++ 2013-02-14 Steven Bosscher <steven@gcc.gnu.org> ++ ++ * collect2-aix.h: Define F_LOADONLY. ++ ++2013-08-02 Eric Botcazou <ebotcazou@adacore.com> ++ ++ * config/sparc/sparc.c (sparc_emit_membar_for_model) <SMM_TSO>: Add ++ the implied StoreLoad barrier for atomic operations if before. ++ +2013-07-11 Georg-Johann Lay <avr@gjlay.de> + + Backport from 2013-07-11 trunk r200901. @@ -1230,6 +1419,31 @@ Index: gcc/testsuite/gfortran.dg/do_5.f90 + END + + END +Index: gcc/testsuite/gfortran.dg/transfer_intrinsic_6.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/transfer_intrinsic_6.f90 (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gfortran.dg/transfer_intrinsic_6.f90 (.../branches/gcc-4_7-branch) +@@ -0,0 +1,20 @@ ++! { dg-do compile } ++! { dg-options "-fdump-tree-original" } ++! ++! PR 58058: [4.7/4.8/4.9 Regression] Memory leak with transfer function ++! ++! Contributed by Thomas Jourdan <thomas.jourdan@orange.fr> ++ ++ implicit none ++ ++ integer, dimension(3) :: t1 ++ character(len=64) :: str ++ ++ t1 = (/1,2,3/) ++ ++ str = transfer(t1,str) ++ ++end ++ ++! { dg-final { scan-tree-dump-times "__builtin_free" 1 "original" } } ++! { dg-final { cleanup-tree-dump "original" } } Index: gcc/testsuite/gfortran.dg/proc_ptr_41.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/proc_ptr_41.f90 (.../tags/gcc_4_7_3_release) @@ -1501,6 +1715,60 @@ Index: gcc/testsuite/gcc.c-torture/execute/pr56866.c +#endif + return 0; +} +Index: gcc/testsuite/gnat.dg/loop_optimization16_pkg.adb +=================================================================== +--- a/src/gcc/testsuite/gnat.dg/loop_optimization16_pkg.adb (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gnat.dg/loop_optimization16_pkg.adb (.../branches/gcc-4_7-branch) +@@ -0,0 +1,8 @@ ++package body Loop_Optimization16_Pkg is ++ ++ function F return Natural is ++ begin ++ return Natural (Index_Base'Last); ++ end; ++ ++end Loop_Optimization16_Pkg; +Index: gcc/testsuite/gnat.dg/loop_optimization16_pkg.ads +=================================================================== +--- a/src/gcc/testsuite/gnat.dg/loop_optimization16_pkg.ads (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gnat.dg/loop_optimization16_pkg.ads (.../branches/gcc-4_7-branch) +@@ -0,0 +1,7 @@ ++package Loop_Optimization16_Pkg is ++ ++ type Index_Base is range 0 .. 127; ++ ++ function F return Natural; ++ ++end Loop_Optimization16_Pkg; +Index: gcc/testsuite/gnat.dg/loop_optimization16.adb +=================================================================== +--- a/src/gcc/testsuite/gnat.dg/loop_optimization16.adb (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gnat.dg/loop_optimization16.adb (.../branches/gcc-4_7-branch) +@@ -0,0 +1,24 @@ ++-- { dg-do run } ++ ++with Loop_Optimization16_Pkg; use Loop_Optimization16_Pkg; ++ ++procedure Loop_Optimization16 is ++ ++ Counter : Natural := 0; ++ ++ C : constant Natural := F; ++ ++ subtype Index_T is Index_Base range 1 .. Index_Base (C); ++ ++begin ++ ++ for I in Index_T'First .. Index_T'Last loop ++ Counter := Counter + 1; ++ exit when Counter > 200; ++ end loop; ++ ++ if Counter > 200 then ++ raise Program_Error; ++ end if; ++ ++end Loop_Optimization16; Index: gcc/testsuite/gnat.dg/specs/last_bit.ads =================================================================== --- a/src/gcc/testsuite/gnat.dg/specs/last_bit.ads (.../tags/gcc_4_7_3_release) @@ -1567,6 +1835,30 @@ Index: gcc/testsuite/gcc.dg/pr48189.c + for (i = 0; y[i].s[i]; i++) + *x++ = y[i].s[i]; +} +Index: gcc/testsuite/gcc.dg/pr57980.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/pr57980.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gcc.dg/pr57980.c (.../branches/gcc-4_7-branch) +@@ -0,0 +1,19 @@ ++/* PR tree-optimization/57980 */ ++/* { dg-do compile } */ ++/* { dg-options "-O -foptimize-sibling-calls -w" } */ ++ ++typedef int V __attribute__ ((vector_size (2 * sizeof (int)))); ++extern V f (void); ++ ++V ++bar (void) ++{ ++ return -f (); ++} ++ ++V ++foo (void) ++{ ++ V v = { }; ++ return v - f (); ++} Index: gcc/testsuite/gcc.dg/torture/builtin-logb-1.c =================================================================== --- a/src/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c (.../tags/gcc_4_7_3_release) @@ -1665,7 +1957,61 @@ 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,156 @@ +@@ -1,3 +1,210 @@ ++2013-08-13 Eric Botcazou <ebotcazou@adacore.com> ++ ++ * gnat.dg/loop_optimization16.adb: New test. ++ * gnat.dg/loop_optimization16_pkg.ad[sb]: New helper. ++ ++2013-08-13 Marek Polacek <polacek@redhat.com> ++ ++ Backport from 4.8: ++ 2013-08-13 Marek Polacek <polacek@redhat.com> ++ ++ PR tree-optimization/57980 ++ * gcc.dg/pr57980.c: New test. ++ ++2013-08-11 Janus Weil <janus@gcc.gnu.org> ++ ++ Backport from trunk: ++ 2013-08-09 Janus Weil <janus@gcc.gnu.org> ++ ++ PR fortran/58058 ++ * gfortran.dg/transfer_intrinsic_6.f90: New. ++ ++2013-07-16 Iain Sandoe <iain@codesourcery.com> ++ ++ PR target/55656 ++ PR target/55657 ++ * obj-c++.dg/cxx-ivars-3.mm: Use NSObject instead of Object. ++ * obj-c++.dg/strings/const-cfstring-5.mm: Likewise. ++ * obj-c++.dg/torture/strings/const-str-10.mm: Likewise. ++ * obj-c++.dg/torture/strings/const-str-9.mm: Likewise. ++ * objc.dg/image-info.m: Likewise. ++ * objc.dg/symtab-1.m: Likewise. ++ * objc.dg/torture/strings/const-str-10.m: Likewise. ++ * objc.dg/torture/strings/const-str-11.m: Likewise. ++ * objc.dg/torture/strings/const-str-9.m: Likewise. ++ * objc.dg/zero-link-1.m: Likewise. ++ * objc.dg/zero-link-2.m: Likewise. ++ * objc.dg/no-extra-load.m: Avoid Foundation.h. ++ * objc.dg/objc-foreach-4.m: Likewise. ++ * objc.dg/objc-foreach-5.m: Likewise. ++ * obj-c++.dg/proto-lossage-7.mm: Use NSObject instead of Object ++ (for Darwin). ++ * obj-c++.dg/strings/const-str-12.mm: Likewise. ++ * obj-c++.dg/syntax-error-1.mm: Likewise. ++ * objc.dg/method-6.m: Likewise. ++ * objc.dg/pr23214.m: Likewise. ++ * objc.dg/proto-lossage-7.m: Likewise. ++ * objc.dg/strings/const-str-12b.m: Likewise. ++ * objc.dg/zero-link-3.m: Likewise. ++ * obj-c++.dg/method-12.mm: Skip on Darwin versions without 'Object'. ++ * objc.dg/encode-7-next-64bit.m: Use NSObject instead of Object, ++ adjust headers, interfaces and encoded types to reflect current system ++ versions. Add FIXME and outputs from current system compiler for ++ reference. ++ +2012-12-03 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/54170 @@ -2081,6 +2427,846 @@ Index: gcc/testsuite/g++.dg/template/using23.C + } +}; +template struct B< A >; +Index: gcc/testsuite/g++.dg/template/delete2.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/template/delete2.C (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/g++.dg/template/delete2.C (.../branches/gcc-4_7-branch) +@@ -0,0 +1,26 @@ ++// PR c++/58119 ++ ++template <class T> ++struct A ++{ ++ operator T*(); ++ template <class U> ++ operator A<U>(); ++}; ++ ++template <class T> ++struct B ++{ ++ operator T*(); ++ template <class U> ++ operator A<U>*(); ++}; ++ ++int main() ++{ ++ A<int> a; ++ delete a; ++ ++ B<int> b; ++ delete b; // { dg-error "template|delete" } ++} +Index: gcc/testsuite/objc.dg/no-extra-load.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/no-extra-load.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/no-extra-load.m (.../branches/gcc-4_7-branch) +@@ -1,7 +1,7 @@ + /* { dg-do compile { target *-*-darwin* } } */ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + +-#import <Foundation/Foundation.h> ++#include <Foundation/NSObject.h> + main() { [NSObject new]; } + + /* { dg-final { scan-assembler-not "L_objc_msgSend\\\$non_lazy_ptr" } } */ +Index: gcc/testsuite/objc.dg/method-6.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/method-6.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/method-6.m (.../branches/gcc-4_7-branch) +@@ -4,14 +4,21 @@ + /* { dg-do compile } */ + /* { dg-options "-Wstrict-selector-match" } */ + ++#ifdef __NEXT_RUNTIME__ ++#include <Foundation/NSObject.h> ++#define OBJECT NSObject ++#else ++#include <objc/Object.h> + #include <objc/Protocol.h> ++#define OBJECT Object ++#endif + + @interface Base + - (unsigned)port; + @end + + @interface Derived: Base +-- (Object *)port; ++- (OBJECT *)port; + + (Protocol *)port; + - (id)starboard; + @end +@@ -20,13 +27,13 @@ + Class receiver; + + [receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */ +- /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 10 } */ +- /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 15 } */ ++ /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 17 } */ ++ /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 22 } */ + + [receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */ +- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 26 } */ +- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 26 } */ +- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 26 } */ ++ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 33 } */ ++ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 33 } */ ++ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 33 } */ + + [Class port]; /* { dg-error ".Class. is not an Objective\\-C class name or alias" } */ + } +Index: gcc/testsuite/objc.dg/strings/const-cfstring-5.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/strings/const-cfstring-5.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/strings/const-cfstring-5.m (.../branches/gcc-4_7-branch) +@@ -6,16 +6,16 @@ + /* { dg-skip-if "NeXT only" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-mconstant-cfstrings" } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + +-@interface Foo: Object { ++@interface Foo: NSObject { + char *cString; + unsigned int len; + } + + (Foo *)description; + @end + +-@interface Bar: Object ++@interface Bar: NSObject + + (Foo *) getString: (int) which; + @end + +Index: gcc/testsuite/objc.dg/strings/const-str-12b.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/strings/const-str-12b.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/strings/const-str-12b.m (.../branches/gcc-4_7-branch) +@@ -5,17 +5,23 @@ + /* { dg-options "-fconstant-string-class=Foo" } */ + /* { dg-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */ + ++#ifdef __NEXT_RUNTIME__ ++#include <Foundation/NSObject.h> ++#define OBJECT NSObject ++#else + #include <objc/Object.h> ++#define OBJECT Object ++#endif + #include "../../objc-obj-c++-shared/objc-test-suite-types.h" + +-@interface Foo: Object { ++@interface Foo: OBJECT { + char *cString; + unsigned int len; + } + + (id)description; + @end + +-@interface Bar: Object ++@interface Bar: OBJECT + + (Foo *) getString: (int) which; + @end + +Index: gcc/testsuite/objc.dg/encode-7-next-64bit.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/encode-7-next-64bit.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/encode-7-next-64bit.m (.../branches/gcc-4_7-branch) +@@ -4,24 +4,25 @@ + /* { dg-require-effective-target lp64 } */ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ ++/* { dg-additional-options "-framework Foundation" } */ + + #include <stdbool.h> + #include <string.h> + #include <stdlib.h> +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + #include "../objc-obj-c++-shared/runtime.h" + +-#define CHECK_IF(E) if (!(E)) abort () ++extern int printf(char *,...); ++void CHECK_IF(const char *s1, const char *s2) ++{ ++ if (strcmp(s1,s2) != 0) { ++ printf ("'%s'\n'%s'\n",s1,s2); ++ abort (); ++ } ++} + + @class NSDictionary, NSFont, NSError, _NSATSTypesetterGuts, NSString, NSMenu, NSArray; + +-typedef unsigned char UInt8; +-typedef const signed long OSStatus; +-typedef unsigned long CFIndex; +-typedef unsigned int UInt32; +-typedef UInt32 FourCharCode; +-typedef FourCharCode OSType; +- + struct FSRef { + UInt8 hidden[80]; + }; +@@ -99,10 +100,10 @@ + unsigned int parameterMask; + } NSErrorUserInfoFormatter; + +-typedef Object MyObj; +-typedef Object *MyPtr; ++typedef NSObject MyObj; ++typedef NSObject *MyPtr; + +-@interface Foo: Object { ++@interface Foo: NSObject { + NSATSGlyphStorageRun r; + } + - (NSError *)_errorWithOSStatus:(OSStatus)inOSStatus ref1:(const FSRef *)inRef1 ref2:(const struct FSRef *)inRef2 +@@ -114,7 +115,7 @@ + - (id)str1:(const char *)str1 str2:(char *)str2 str3:(char *const)str3 str4:(const char *const)str4; + - (oneway void)foo1:(Foo *)foo1 foo2:(const Foo *)foo2 foo3:(Foo *const)foo3 foo4:(const Foo *const)foo4; + - (in const char *)sel1:(const SEL)sel1 id1:(const id)id1; +-- (inout id)obj1:(const MyPtr)obj1 obj2:(Object *const)obj2 obj3:(MyObj *const)obj3; ++- (inout id)obj1:(const MyPtr)obj1 obj2:(NSObject *const)obj2 obj3:(MyObj *const)obj3; + + (ComponentInstance)_defaultScriptingComponent; + - (NSString *)_formatCocoaErrorString:(NSString *)formatString parameters:(const char *)parameters + applicableFormatters:(NSErrorUserInfoFormatter **)formatters count:(int)numFormatters; +@@ -156,7 +157,7 @@ + - (in const char *)sel1:(const SEL)sel1 id1:(const id)id1 { + return "Hello"; + } +-- (inout id)obj1:(const MyPtr)obj1 obj2:(Object *const)obj2 obj3:(MyObj *const)obj3 { ++- (inout id)obj1:(const MyPtr)obj1 obj2:(NSObject *const)obj2 obj3:(MyObj *const)obj3 { + return self; + } + + (ComponentInstance)_defaultScriptingComponent { +@@ -191,6 +192,8 @@ + } + @end + ++/* FIXME: we produce different output c.f. the system compiler on OSX10.6+ */ ++ + int main(void) { + Class fooClass = objc_getClass ("Foo"); + Method meth; +@@ -199,72 +202,76 @@ + Ivar ivar; + + meth = class_getInstanceMethod (fooClass, @selector(_errorWithOSStatus:ref1:ref2:reading:)); +- CHECK_IF (!strcmp (method_getTypeEncoding(meth), "@44@0:8q16r^{FSRef=[80C]}24r^{FSRef=[80C]}32c40")); ++ CHECK_IF (method_getTypeEncoding(meth), "@40@0:8i16r^{FSRef=[80C]}20r^{FSRef=[80C]}28c36"); + + meth = class_getInstanceMethod (fooClass, @selector(_attributeRunForCharacterAtIndex:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "r^{?=@@QQ^Qffff{_NSRect={_NSPoint=ff}{_NSSize=ff}}q^qQ^Q@@@:::****{?=b1b1b1b1b1b27}}24@0:8Q16")); ++ CHECK_IF (method_getTypeEncoding (meth), "r^{?=@@qq^qffff{_NSRect={_NSPoint=ff}{_NSSize=ff}}q^qQ^Q@@@:::****{?=b1b1b1b1b1b27}}24@0:8q16"); ++/* clang produces: r^{?=@@qq^qffff{_NSRect={_NSPoint=ff}{_NSSize=ff}}q^qQ^Q@@@::^{objc_selector}****{?=b1b1b1b1b1b27}}24@0:8q16 */ + + meth = class_getInstanceMethod (fooClass, @selector(_getATSTypesetterGuts:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "r@24@0:8r:16")); ++ CHECK_IF (method_getTypeEncoding (meth), "r@24@0:8r:16"); ++/* "@24@0:8r^{objc_selector=}16" */ + + meth = class_getInstanceMethod (fooClass, @selector(resumeWithSuspensionID:and:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "v32@0:8^{__NSAppleEventManagerSuspension=}16r^Q24")); ++ CHECK_IF (method_getTypeEncoding (meth), "v32@0:8^{__NSAppleEventManagerSuspension=}16r^q24"); + + meth = class_getInstanceMethod (fooClass, @selector(anotherMeth:and:and:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "r@40@0:8r:16r@24r@32")); ++ CHECK_IF (method_getTypeEncoding (meth), "r@40@0:8r:16r@24r@32"); + + meth = class_getInstanceMethod (fooClass, @selector(str1:str2:str3:str4:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "@48@0:8r*16*24*32r*40")); ++ CHECK_IF (method_getTypeEncoding (meth), "@48@0:8r*16*24*32r*40"); + + meth = class_getInstanceMethod (fooClass, @selector(foo1:foo2:foo3:foo4:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "Vv48@0:8@16r@24@32r@40")); ++ CHECK_IF (method_getTypeEncoding (meth), "Vv48@0:8@16r@24@32r@40"); + + meth = class_getInstanceMethod (fooClass, @selector(sel1:id1:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "rn*32@0:8r:16r@24")); ++ CHECK_IF (method_getTypeEncoding (meth), "rn*32@0:8r:16r@24"); + + meth = class_getInstanceMethod (fooClass, @selector(obj1:obj2:obj3:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "N@40@0:8r@16@24^{Object=#}32")); ++ CHECK_IF (method_getTypeEncoding (meth), "N@40@0:8r@16@24^{NSObject=#}32"); + + meth = class_getClassMethod (fooClass, @selector(_defaultScriptingComponent)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "^{ComponentInstanceRecord=[1q]}16@0:8")); ++ CHECK_IF (method_getTypeEncoding (meth), "^{ComponentInstanceRecord=[1q]}16@0:8"); + + meth = class_getInstanceMethod (fooClass, @selector(_formatCocoaErrorString:parameters:applicableFormatters:count:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "@44@0:8@16r*24^^{?}32i40")); ++ CHECK_IF (method_getTypeEncoding (meth), "@44@0:8@16r*24^^{?}32i40"); + + meth = class_getInstanceMethod (fooClass, @selector(formatter_func:run:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "^{?=^?@I}32@0:8@16r^^{?}24")); ++ CHECK_IF (method_getTypeEncoding (meth), "^{?=^?@I}32@0:8@16r^^{?}24"); + + meth = class_getInstanceMethod (fooClass, @selector(_forgetWord:inDictionary:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "c32@0:8nO@16nO@24")); ++ CHECK_IF (method_getTypeEncoding (meth), "c32@0:8nO@16nO@24"); + + meth = class_getInstanceMethod (fooClass, @selector(_registerServicesMenu:withSendTypes:andReturnTypes:addToList:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "v44@0:8@16r^*24r^*32c40")); ++ CHECK_IF (method_getTypeEncoding (meth), "v44@0:8@16r^*24r^*32c40"); + + meth = class_getClassMethod (fooClass, @selector(_proxySharePointer)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "^^{__CFSet}16@0:8")); ++ CHECK_IF (method_getTypeEncoding (meth), "^^{__CFSet}16@0:8"); + + meth = class_getInstanceMethod (fooClass, @selector(_checkGrammarInString:language:details:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "{_NSRange=II}40@0:8n@16nO@24oO^@32")); ++ CHECK_IF (method_getTypeEncoding (meth), "{_NSRange=II}40@0:8n@16nO@24oO^@32"); + + meth = class_getInstanceMethod (fooClass, @selector(_resolvePositionalStakeGlyphsForLineFragment:lineFragmentRect:minPosition:maxPosition:maxLineFragmentWidth:breakHint:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "B60@0:8^{__CTLine=}16{_NSRect={_NSPoint=ff}{_NSSize=ff}}24f40f44f48^Q52")); ++ CHECK_IF (method_getTypeEncoding (meth), "B60@0:8^{__CTLine=}16{_NSRect={_NSPoint=ff}{_NSSize=ff}}24f40f44f48^q52"); + + meth = class_getClassMethod (fooClass, @selector(findVoiceByIdentifier:returningCreator:returningID:)); +- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "c40@0:8@16^I24^I32")); ++ CHECK_IF (method_getTypeEncoding (meth), "c40@0:8@16^I24^I32"); + + ivars = class_copyIvarList (fooClass, &ivar_count); +- CHECK_IF (ivar_count == 1); ++ if (ivar_count != 1) { ++ abort (); ++ } + + ivar = ivars[0]; +- CHECK_IF (!strcmp (ivar_getName(ivar), "r")); +- CHECK_IF (!strcmp (ivar_getTypeEncoding(ivar), ++ CHECK_IF (ivar_getName(ivar), "r"); ++ CHECK_IF (ivar_getTypeEncoding(ivar), + "{?=\"_attributes\"@\"NSDictionary\"\"_font\"@\"NSFont\"\"_characterLength\"" +- "Q\"_nominalGlyphLocation\"Q\"p\"^Q\"_defaultLineHeight\"f\"_defaultBaselineOffset\"" ++ "q\"_nominalGlyphLocation\"q\"p\"^q\"_defaultLineHeight\"f\"_defaultBaselineOffset\"" + "f\"_horizExpansion\"f\"_baselineDelta\"f\"_attachmentBBox\"{_NSRect=\"origin\"" + "{_NSPoint=\"x\"f\"y\"f}\"size\"{_NSSize=\"width\"f\"height\"f}}\"ll\"q\"llp\"^q\"ull\"" + "Q\"ullp\"^Q\"a\"@\"a1\"@\"a2\"@\"b\":\"b1\":\"b2\":\"str1\"*\"str2\"*\"str3\"*\"str4\"" + "*\"_rFlags\"{?=\"_isAttachmentRun\"b1\"_hasPositionalStake\"b1\"_isDefaultFace\"" +- "b1\"_hasCombiningMarks\"b1\"_isScreenFont\"b1\"_reserved\"b27}}")); +- ++ "b1\"_hasCombiningMarks\"b1\"_isScreenFont\"b1\"_reserved\"b27}}"); ++/*"{?=\"_attributes\"@\"NSDictionary\"\"_font\"@\"NSFont\"\"_characterLength\"q\"_nominalGlyphLocation\"q\"p\"^q\"_defaultLineHeight\"f\"_defaultBaselineOffset\"f\"_horizExpansion\"f\"_baselineDelta\"f\"_attachmentBBox\"{_NSRect=\"origin\"{_NSPoint=\"x\"f\"y\"f}\"size\"{_NSSize=\"width\"f\"height\"f}}\"ll\"q\"llp\"^q\"ull\"Q\"ullp\"^Q\"a\"@\"a1\"@\"a2\"@\"b\":\"b1\":\"b2\"^{objc_selector}\"str1\"*\"str2\"*\"str3\"*\"str4\"*\"_rFlags\"{?=\"_isAttachmentRun\"b1\"_hasPositionalStake\"b1\"_isDefaultFace\"b1\"_hasCombiningMarks\"b1\"_isScreenFont\"b1\"_reserved\"b27}}"*/ + return 0; + } +Index: gcc/testsuite/objc.dg/proto-lossage-7.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/proto-lossage-7.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/proto-lossage-7.m (.../branches/gcc-4_7-branch) +@@ -1,12 +1,19 @@ + /* Check that typedefs of ObjC classes preserve + any @protocol qualifiers. */ + /* { dg-do compile } */ ++ ++#ifdef __NEXT_RUNTIME__ ++#include <Foundation/NSObject.h> ++#define OBJECT NSObject ++#else + #include <objc/Object.h> ++#define OBJECT Object ++#endif + + @protocol CanDoStuff; + +-typedef Object<CanDoStuff> CanDoStuffType; +-typedef Object<CanDoStuff> *CanDoStuffTypePtr; ++typedef OBJECT<CanDoStuff> CanDoStuffType; ++typedef OBJECT<CanDoStuff> *CanDoStuffTypePtr; + + @protocol CanDoStuff + - (int) dostuff; +Index: gcc/testsuite/objc.dg/symtab-1.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/symtab-1.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/symtab-1.m (.../branches/gcc-4_7-branch) +@@ -4,9 +4,9 @@ + /* { dg-do compile { target { *-*-darwin* } } } */ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + +-@interface Base: Object ++@interface Base: NSObject + - (void)setValues; + @end + +Index: gcc/testsuite/objc.dg/objc-foreach-4.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/objc-foreach-4.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/objc-foreach-4.m (.../branches/gcc-4_7-branch) +@@ -1,18 +1,14 @@ + /* Test for valid objc objects used in a for-each statement. */ + /* FIXME: Run this test with the GNU runtime as well. */ +-/* { dg-do compile { target *-*-darwin* } } */ ++/* { dg-do run { target *-*-darwin* } } */ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-skip-if "No NeXT fast enum. pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */ ++/* { dg-additional-options "-framework Foundation" { target { *-*-darwin* } } } */ + +-#include <objc/objc-api.h> +-#include <Foundation/Foundation.h> ++#include <Foundation/NSString.h> ++#include <Foundation/NSAutoreleasePool.h> ++#include <Foundation/NSArray.h> + +-#if defined (__NEXT_RUNTIME__) && defined (__LP64__) +-/* Fudge the class reference until we implement the compiler-side +- const strings. */ +-extern void *_NSConstantStringClassReference; +-#endif +- + // gcc -o foo foo.m -framework Foundation + + int main (int argc, char const* argv[]) { +Index: gcc/testsuite/objc.dg/objc-foreach-5.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/objc-foreach-5.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/objc-foreach-5.m (.../branches/gcc-4_7-branch) +@@ -2,8 +2,10 @@ + /* { dg-do compile { target *-*-darwin* } } */ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-skip-if "No NeXT fast enum. pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */ ++/* { dg-additional-options "-framework Foundation" { target { *-*-darwin* } } } */ + +-#import <Foundation/Foundation.h> ++#include <Foundation/NSArray.h> ++#include <Foundation/NSAutoreleasePool.h> + + NSArray * createTestVictim(unsigned capacity) { + NSMutableArray * arr = [[NSMutableArray alloc] initWithCapacity:capacity]; +Index: gcc/testsuite/objc.dg/zero-link-1.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/zero-link-1.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/zero-link-1.m (.../branches/gcc-4_7-branch) +@@ -5,13 +5,12 @@ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-fzero-link" } */ + +-#include <objc/Object.h> +-#include <objc/objc.h> ++#include <Foundation/NSObject.h> + + extern void abort(void); + #define CHECK_IF(expr) if(!(expr)) abort(); + +-@interface Base: Object ++@interface Base: NSObject + + (int) getValue; + @end + +Index: gcc/testsuite/objc.dg/zero-link-2.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/zero-link-2.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/zero-link-2.m (.../branches/gcc-4_7-branch) +@@ -5,12 +5,12 @@ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-fno-zero-link" } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + + extern void abort(void); + #define CHECK_IF(expr) if(!(expr)) abort(); + +-@interface Base: Object ++@interface Base: NSObject + + (int) getValue; + @end + +Index: gcc/testsuite/objc.dg/torture/strings/const-str-10.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/torture/strings/const-str-10.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/torture/strings/const-str-10.m (.../branches/gcc-4_7-branch) +@@ -6,10 +6,10 @@ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + #include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */ + +-@interface NSString: Object ++@interface NSString: NSObject + @end + + @interface NSSimpleCString : NSString { +Index: gcc/testsuite/objc.dg/torture/strings/const-str-11.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/torture/strings/const-str-11.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/torture/strings/const-str-11.m (.../branches/gcc-4_7-branch) +@@ -7,10 +7,10 @@ + /* { dg-options "-fconstant-string-class=XStr" } */ + /* { dg-options "-mno-constant-cfstrings -fconstant-string-class=XStr" { target *-*-darwin* } } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + #include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */ + +-@interface XString: Object { ++@interface XString: NSObject { + @protected + char *bytes; + } +Index: gcc/testsuite/objc.dg/torture/strings/const-str-9.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/torture/strings/const-str-9.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/torture/strings/const-str-9.m (.../branches/gcc-4_7-branch) +@@ -5,10 +5,10 @@ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + #include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */ + +-@interface NSConstantString: Object { ++@interface NSConstantString: NSObject { + char *cString; + unsigned int len; + } +Index: gcc/testsuite/objc.dg/zero-link-3.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/zero-link-3.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/zero-link-3.m (.../branches/gcc-4_7-branch) +@@ -2,15 +2,23 @@ + /* Contributed by Ziemowit Laski <zlaski@apple.com>. */ + + /* { dg-do run { target *-*-darwin* } } */ +-/* { dg-options "-fzero-link" } */ ++/* { dg-additional-options "-fzero-link" } */ ++/* { dg-additional-options "-framework Foundation" { target { *-*-darwin* } } } */ + /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ + ++#ifdef __NEXT_RUNTIME__ ++#include <Foundation/NSObject.h> ++#define OBJECT NSObject ++#else + #include <objc/Object.h> ++#include <objc/Protocol.h> ++#define OBJECT Object ++#endif + + extern void abort(void); + #define CHECK_IF(expr) if(!(expr)) abort(); + +-@interface Base: Object ++@interface Base: OBJECT + + (int) getValue; + @end + +Index: gcc/testsuite/objc.dg/image-info.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/image-info.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/image-info.m (.../branches/gcc-4_7-branch) +@@ -7,20 +7,19 @@ + /* { dg-skip-if "NeXT-only" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-freplace-objc-classes" } */ + +-#include <objc/objc.h> +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + + extern void abort(void); + #define CHECK_IF(expr) if(!(expr)) abort(); + +-@interface Object (TEST_SUITE_C1) ++@interface NSObject (TEST_SUITE_C1) + - init; + @end +-@implementation Object (TEST_SUITE_C1) ++@implementation NSObject (TEST_SUITE_C1) + - init {return self;} + @end + +-@interface Base: Object { ++@interface Base: NSObject { + @public + int a; + float b; +Index: gcc/testsuite/objc.dg/pr23214.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/pr23214.m (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/objc.dg/pr23214.m (.../branches/gcc-4_7-branch) +@@ -3,14 +3,24 @@ + + /* { dg-do run } */ + /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ ++/* { dg-additional-options "-framework Foundation" { target { { *-*-darwin* } && objc2 } } } */ + ++#if defined (__NEXT_RUNTIME__) && defined(__OBJC2__) \ ++ && defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \ ++ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1070 + #include <objc/Protocol.h> +- +-@interface Object (TS_CAT) ++#define OBJECT NSObject ++#else ++#include <objc/Object.h> ++#define OBJECT Object ++#include <objc/Protocol.h> ++#endif ++ ++@interface OBJECT (TS_CAT) + - test; + @end + +-@implementation Object (TS_CAT) ++@implementation OBJECT (TS_CAT) + - test { return self; } + @end + +@@ -20,7 +30,7 @@ + @protocol B + @end + +-@interface Dummy : Object <B> ++@interface Dummy : OBJECT <B> + @end + + int main () +Index: gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm +=================================================================== +--- a/src/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm (.../branches/gcc-4_7-branch) +@@ -2,12 +2,15 @@ + + // { dg-do run { target *-*-darwin* } } + // { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } +-// { dg-options "-fobjc-call-cxx-cdtors -mmacosx-version-min=10.4" } ++// { dg-additional-options "-fobjc-call-cxx-cdtors -mmacosx-version-min=10.4 -framework Foundation" } + // This test has no equivalent or meaning for m64/ABI V2 + // { dg-xfail-run-if "No Test Avail" { *-*-darwin* && lp64 } { "-fnext-runtime" } { "" } } + + #include <objc/objc-runtime.h> + #include <stdlib.h> ++#include <Foundation/NSObject.h> ++ ++//extern "C" { int printf(const char *,...); } + #define CHECK_IF(expr) if(!(expr)) abort() + + #ifndef CLS_HAS_CXX_STRUCTORS +@@ -19,7 +22,7 @@ + cxx_struct (void) { a = b = 55; } + }; + +-@interface Foo { ++@interface Foo: NSObject { + int c; + cxx_struct s; + } +@@ -42,9 +45,11 @@ + Class cls; + + cls = objc_getClass("Foo"); +- CHECK_IF(cls->info & CLS_HAS_CXX_STRUCTORS); ++// printf((const char *)"Foo info %lx\n",cls->info); ++ CHECK_IF((cls->info & CLS_HAS_CXX_STRUCTORS) != 0); + cls = objc_getClass("Bar"); +- CHECK_IF(!(cls->info & CLS_HAS_CXX_STRUCTORS)); ++// printf((const char *)"Bar info %lx\n",cls->info); ++ CHECK_IF((cls->info & CLS_HAS_CXX_STRUCTORS) == 0); + + #else + /* No test needed or available. */ +Index: gcc/testsuite/obj-c++.dg/method-12.mm +=================================================================== +--- a/src/gcc/testsuite/obj-c++.dg/method-12.mm (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/obj-c++.dg/method-12.mm (.../branches/gcc-4_7-branch) +@@ -2,6 +2,7 @@ + /* Author: Ziemowit Laski <zlaski@apple.com> */ + /* { dg-options "-Wstrict-selector-match" } */ + /* { dg-do compile } */ ++/* { dg-skip-if "Object interface removed" { *-*-darwin[1-2]* && { lp64 } } { "-fnext-runtime" } { "" } } */ + + #include <objc/Protocol.h> + +@@ -19,13 +20,13 @@ + Class receiver; + + [receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */ +- /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 9 } */ +- /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 14 } */ ++ /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 10 } */ ++ /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 15 } */ + + [receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */ +- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 25 } */ +- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 25 } */ +- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 25 } */ ++ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 26 } */ ++ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 26 } */ ++ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 26 } */ + + [Class port]; /* { dg-error ".Class. is not an Objective\\-C class name or alias" } */ + } +Index: gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm +=================================================================== +--- a/src/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm (.../branches/gcc-4_7-branch) +@@ -6,10 +6,10 @@ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + #include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */ + +-@interface NSString: Object ++@interface NSString: NSObject + @end + + @interface NSSimpleCString : NSString { +Index: gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm +=================================================================== +--- a/src/gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm (.../branches/gcc-4_7-branch) +@@ -7,10 +7,10 @@ + /* { dg-options "-fconstant-string-class=XStr" } */ + /* { dg-options "-mno-constant-cfstrings -fconstant-string-class=XStr" { target *-*-darwin* } } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + #include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */ + +-@interface XString: Object { ++@interface XString: NSObject { + @protected + char *bytes; + } +Index: gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm +=================================================================== +--- a/src/gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm (.../branches/gcc-4_7-branch) +@@ -5,10 +5,10 @@ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + #include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */ + +-@interface NSConstantString: Object { ++@interface NSConstantString: NSObject { + char *cString; + unsigned int len; + } +Index: gcc/testsuite/obj-c++.dg/strings/const-str-12.mm +=================================================================== +--- a/src/gcc/testsuite/obj-c++.dg/strings/const-str-12.mm (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/obj-c++.dg/strings/const-str-12.mm (.../branches/gcc-4_7-branch) +@@ -5,17 +5,23 @@ + /* { dg-options "-fconstant-string-class=Foo" } */ + /* { dg-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */ + ++#ifdef __NEXT_RUNTIME__ ++#include <Foundation/NSObject.h> ++#define OBJECT NSObject ++#else + #include <objc/Object.h> ++#define OBJECT Object ++#endif + #include "../../objc-obj-c++-shared/objc-test-suite-types.h" + +-@interface Foo: Object { ++@interface Foo: OBJECT { + char *cString; + unsigned int len; + } + + (id)description; + @end + +-@interface Bar: Object ++@interface Bar: OBJECT + + (Foo *) getString: (int) which; + @end + +Index: gcc/testsuite/obj-c++.dg/strings/const-cfstring-5.mm +=================================================================== +--- a/src/gcc/testsuite/obj-c++.dg/strings/const-cfstring-5.mm (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/obj-c++.dg/strings/const-cfstring-5.mm (.../branches/gcc-4_7-branch) +@@ -6,16 +6,16 @@ + /* { dg-skip-if "NeXT only" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-options "-mconstant-cfstrings" } */ + +-#include <objc/Object.h> ++#include <Foundation/NSObject.h> + +-@interface Foo: Object { ++@interface Foo: NSObject { + char *cString; + unsigned int len; + } + + (Foo *)description; + @end + +-@interface Bar: Object ++@interface Bar: NSObject + + (Foo *) getString: (int) which; + @end + +Index: gcc/testsuite/obj-c++.dg/proto-lossage-7.mm +=================================================================== +--- a/src/gcc/testsuite/obj-c++.dg/proto-lossage-7.mm (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/obj-c++.dg/proto-lossage-7.mm (.../branches/gcc-4_7-branch) +@@ -1,12 +1,19 @@ + /* Check that typedefs of ObjC classes preserve + any @protocol qualifiers. */ + /* { dg-do compile } */ ++ ++#ifdef __NEXT_RUNTIME__ ++#include <Foundation/NSObject.h> ++#define OBJECT NSObject ++#else + #include <objc/Object.h> ++#define OBJECT Object ++#endif + + @protocol CanDoStuff; + +-typedef Object<CanDoStuff> CanDoStuffType; +-typedef Object<CanDoStuff> *CanDoStuffTypePtr; ++typedef OBJECT<CanDoStuff> CanDoStuffType; ++typedef OBJECT<CanDoStuff> *CanDoStuffTypePtr; + + @protocol CanDoStuff + - (int) dostuff; +Index: gcc/testsuite/obj-c++.dg/syntax-error-1.mm +=================================================================== +--- a/src/gcc/testsuite/obj-c++.dg/syntax-error-1.mm (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/obj-c++.dg/syntax-error-1.mm (.../branches/gcc-4_7-branch) +@@ -1,7 +1,13 @@ + /* Graceful handling of a syntax error. */ + /* { dg-do compile } */ + ++#ifdef __NEXT_RUNTIME__ ++#include <Foundation/NSObject.h> ++#define OBJECT NSObject ++#else + #include <objc/Object.h> ++#define OBJECT Object ++#endif + + class foo { + public: +@@ -12,7 +18,7 @@ + + extern void NXLog(const char *, ...); + +-@interface Test2 : Object { ++@interface Test2 : OBJECT { + } + - (void) foo2; + @end +@@ -23,4 +29,4 @@ + } /* { dg-error "stray .\}. between Objective\\-C\\+\\+ methods" } */ + @end + +-/* { dg-error "expected constructor, destructor, or type conversion before" "" { target *-*-* } 22 } */ ++/* { dg-error "expected constructor, destructor, or type conversion before" "" { target *-*-* } 28 } */ Index: gcc/cp/typeck.c =================================================================== --- a/src/gcc/cp/typeck.c (.../tags/gcc_4_7_3_release) @@ -2137,7 +3323,15 @@ 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,48 @@ +@@ -1,3 +1,56 @@ ++2013-08-20 Jason Merrill <jason@redhat.com> ++ ++ PR c++/58119 ++ * cp-tree.h (WILDCARD_TYPE_P): Split out from... ++ (MAYBE_CLASS_TYPE_P): ...here. ++ * cvt.c (build_expr_type_conversion): Don't complain about a ++ template that can't match the desired type category. ++ +2012-12-03 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/54170 @@ -2334,6 +3528,81 @@ Index: gcc/cp/cvt.c } else if (TYPE_PTR_TO_MEMBER_P (type) && INTEGRAL_CODE_P (form)) { +@@ -1539,17 +1539,6 @@ + if (DECL_NONCONVERTING_P (cand)) + continue; + +- if (TREE_CODE (cand) == TEMPLATE_DECL) +- { +- if (complain) +- { +- error ("ambiguous default type conversion from %qT", +- basetype); +- error (" candidate conversions include %qD", cand); +- } +- return error_mark_node; +- } +- + candidate = non_reference (TREE_TYPE (TREE_TYPE (cand))); + + switch (TREE_CODE (candidate)) +@@ -1583,11 +1572,23 @@ + break; + + default: ++ /* A wildcard could be instantiated to match any desired ++ type, but we can't deduce the template argument. */ ++ if (WILDCARD_TYPE_P (candidate)) ++ win = true; + break; + } + + if (win) + { ++ if (TREE_CODE (cand) == TEMPLATE_DECL) ++ { ++ if (complain) ++ error ("default type conversion can't deduce template" ++ " argument for %qD", cand); ++ return error_mark_node; ++ } ++ + if (winner) + { + if (complain) +Index: gcc/cp/cp-tree.h +=================================================================== +--- a/src/gcc/cp/cp-tree.h (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/cp/cp-tree.h (.../branches/gcc-4_7-branch) +@@ -1191,18 +1191,21 @@ + /* The _DECL for this _TYPE. */ + #define TYPE_MAIN_DECL(NODE) (TYPE_STUB_DECL (TYPE_MAIN_VARIANT (NODE))) + +-/* Nonzero if T is a class (or struct or union) type. Also nonzero +- for template type parameters, typename types, and instantiated +- template template parameters. Keep these checks in ascending code +- order. */ +-#define MAYBE_CLASS_TYPE_P(T) \ ++/* Nonzero if T is a type that could resolve to any kind of concrete type ++ at instantiation time. */ ++#define WILDCARD_TYPE_P(T) \ + (TREE_CODE (T) == TEMPLATE_TYPE_PARM \ + || TREE_CODE (T) == TYPENAME_TYPE \ + || TREE_CODE (T) == TYPEOF_TYPE \ + || TREE_CODE (T) == BOUND_TEMPLATE_TEMPLATE_PARM \ +- || TREE_CODE (T) == DECLTYPE_TYPE \ +- || CLASS_TYPE_P (T)) ++ || TREE_CODE (T) == DECLTYPE_TYPE) + ++/* Nonzero if T is a class (or struct or union) type. Also nonzero ++ for template type parameters, typename types, and instantiated ++ template template parameters. Keep these checks in ascending code ++ order. */ ++#define MAYBE_CLASS_TYPE_P(T) (WILDCARD_TYPE_P (T) || CLASS_TYPE_P (T)) ++ + /* Set CLASS_TYPE_P for T to VAL. T must be a class, struct, or + union type. */ + #define SET_CLASS_TYPE_P(T, VAL) \ Index: gcc/dwarf2out.c =================================================================== --- a/src/gcc/dwarf2out.c (.../tags/gcc_4_7_3_release) @@ -2377,7 +3646,12 @@ Index: gcc/ada/ChangeLog =================================================================== --- a/src/gcc/ada/ChangeLog (.../tags/gcc_4_7_3_release) +++ b/src/gcc/ada/ChangeLog (.../branches/gcc-4_7-branch) -@@ -1,3 +1,8 @@ +@@ -1,3 +1,13 @@ ++2013-08-13 Eric Botcazou <ebotcazou@adacore.com> ++ ++ * gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared for ++ values outside of the range of the type. ++ +2013-05-26 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge @@ -2413,6 +3687,18 @@ Index: gcc/ada/gcc-interface/trans.c /* If this has a PLACEHOLDER_EXPR, qualify it by the object we are handling. */ +@@ -2227,7 +2232,10 @@ + if (TREE_CODE (val) != INTEGER_CST) + return true; + +- return tree_int_cst_equal (val, min_or_max_val) == 1; ++ if (max) ++ return tree_int_cst_lt (val, min_or_max_val) == 0; ++ else ++ return tree_int_cst_lt (min_or_max_val, val) == 0; + } + + /* Return true if VAL (of type TYPE) can equal the minimum value of TYPE. Index: gcc/fortran/interface.c =================================================================== --- a/src/gcc/fortran/interface.c (.../tags/gcc_4_7_3_release) @@ -2431,7 +3717,16 @@ 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,65 @@ +@@ -1,3 +1,74 @@ ++2013-08-11 Janus Weil <janus@gcc.gnu.org> ++ ++ Backport from trunk: ++ 2013-08-09 Janus Weil <janus@gcc.gnu.org> ++ ++ PR fortran/58058 ++ * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Free the temporary ++ string, if necessary. ++ +2013-07-08 Tobias Burnus <burnus@net-b.de> + + PR fortran/57785 @@ -2670,6 +3965,34 @@ Index: gcc/fortran/check.c if (result_elt_size == 0) return FAILURE; +Index: gcc/fortran/trans-intrinsic.c +=================================================================== +--- a/src/gcc/fortran/trans-intrinsic.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/fortran/trans-intrinsic.c (.../branches/gcc-4_7-branch) +@@ -5623,8 +5623,7 @@ + + if (expr->ts.type == BT_CHARACTER) + { +- tree direct; +- tree indirect; ++ tree direct, indirect, free; + + ptr = convert (gfc_get_pchar_type (expr->ts.kind), source); + tmpdecl = gfc_create_var (gfc_get_pchar_type (expr->ts.kind), +@@ -5657,6 +5656,13 @@ + tmp = build3_v (COND_EXPR, tmp, direct, indirect); + gfc_add_expr_to_block (&se->pre, tmp); + ++ /* Free the temporary string, if necessary. */ ++ free = gfc_call_free (tmpdecl); ++ tmp = fold_build2_loc (input_location, GT_EXPR, boolean_type_node, ++ dest_word_len, source_bytes); ++ tmp = build3_v (COND_EXPR, tmp, free, build_empty_stmt (input_location)); ++ gfc_add_expr_to_block (&se->post, tmp); ++ + se->expr = tmpdecl; + se->string_length = fold_convert (gfc_charlen_type_node, dest_word_len); + } Index: gcc/fortran/simplify.c =================================================================== --- a/src/gcc/fortran/simplify.c (.../tags/gcc_4_7_3_release) @@ -2993,6 +4316,62 @@ Index: gcc/sched-deps.c flush_pending_lists (deps, insn, true, true); reg_pending_barrier = NOT_A_BARRIER; +Index: gcc/collect2-aix.h +=================================================================== +--- a/src/gcc/collect2-aix.h (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/collect2-aix.h (.../branches/gcc-4_7-branch) +@@ -1,5 +1,5 @@ + /* AIX cross support for collect2. +- Copyright (C) 2009 Free Software Foundation, Inc. ++ Copyright (C) 2009-2013 Free Software Foundation, Inc. + + This file is part of GCC. + +@@ -29,7 +29,7 @@ + Definitions adapted from bfd. (Fairly heavily adapted in some cases.) + ------------------------------------------------------------------------- */ + +-/* Compatiblity types for bfd. */ ++/* Compatibility types for bfd. */ + typedef unsigned HOST_WIDE_INT bfd_vma; + + /* The size of an archive's fl_magic field. */ +@@ -135,7 +135,7 @@ + /* The number of entries in the symbol table. */ + char f_nsyms[4]; + +- /* The size of the auxillary header. */ ++ /* The size of the auxiliary header. */ + char f_opthdr[2]; + + /* Flags. */ +@@ -157,7 +157,7 @@ + /* The offset of the symbol table from the start of the file. */ + char f_symptr[8]; + +- /* The size of the auxillary header. */ ++ /* The size of the auxiliary header. */ + char f_opthdr[2]; + + /* Flags. */ +@@ -222,14 +222,15 @@ + /* The class of symbol (a C_* value). */ + char n_sclass[1]; + +- /* The number of auxillary symbols attached to this entry. */ ++ /* The number of auxiliary symbols attached to this entry. */ + char n_numaux[1]; + }; + + /* Definitions required by collect2. */ + #define C_EXT 2 + +-#define F_SHROBJ 0x2000 ++#define F_SHROBJ 0x2000 ++#define F_LOADONLY 0x4000 + + #define N_UNDEF ((short) 0) + #define N_TMASK 060 Index: gcc/tlink.c =================================================================== --- a/src/gcc/tlink.c (.../tags/gcc_4_7_3_release) @@ -3184,6 +4563,18 @@ Index: gcc/config/sparc/sparc.c sparc_mode_class[i] = 1 << (int) SF_MODE; else if (GET_MODE_SIZE (i) == 8) sparc_mode_class[i] = 1 << (int) DF_MODE; +@@ -10926,6 +10929,11 @@ + /* Total Store Ordering: all memory transactions with store semantics + are followed by an implied StoreStore. */ + implied |= StoreStore; ++ ++ /* If we're not looking for a raw barrer (before+after), then atomic ++ operations get the benefit of being both load and store. */ ++ if (load_store == 3 && before_after == 1) ++ implied |= StoreLoad; + /* FALLTHRU */ + + case SMM_PSO: Index: gcc/config/i386/i386.md =================================================================== --- a/src/gcc/config/i386/i386.md (.../tags/gcc_4_7_3_release) @@ -3225,6 +4616,24 @@ Index: gcc/config/i386/i386.md (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") +@@ -2328,7 +2327,7 @@ + "TARGET_LP64 && ix86_check_movabs (insn, 0)" + "@ + movabs{<imodesuffix>}\t{%1, %P0|[%P0], %1} +- mov{<imodesuffix>}\t{%1, %a0|%a0, %1}" ++ mov{<imodesuffix>}\t{%1, %a0|<iptrsize> PTR %a0, %1}" + [(set_attr "type" "imov") + (set_attr "modrm" "0,*") + (set_attr "length_address" "8,0") +@@ -2342,7 +2341,7 @@ + "TARGET_LP64 && ix86_check_movabs (insn, 1)" + "@ + movabs{<imodesuffix>}\t{%P1, %0|%0, [%P1]} +- mov{<imodesuffix>}\t{%a1, %0|%0, %a1}" ++ mov{<imodesuffix>}\t{%a1, %0|%0, <iptrsize> PTR %a1}" + [(set_attr "type" "imov") + (set_attr "modrm" "0,*") + (set_attr "length_address" "8,0") @@ -3444,9 +3443,9 @@ }) |