Commit Graph

124105 Commits

Author SHA1 Message Date
GCC Administrator efc58ac548 Daily bump.
From-SVN: r200562
2013-06-29 00:16:32 +00:00
Paolo Carlini a5e90b2af3 re PR c++/57645 (Explicitly-declared destructor with no exception specification is always noexcept(true))
/cp
2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57645
	* class.c (deduce_noexcept_on_destructors): Save, set, and restore
	TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
	destructors.

/testsuite
2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57645
	* g++.dg/cpp0x/noexcept21.C: New.

From-SVN: r200559
2013-06-29 00:11:03 +00:00
Vladimir Makarov e6631d3801 revert: lra-constraints.c (need_for_split_p): Check call used hard regs living through calls.
2013-06-28  Vladimir Makarov  <vmakarov@redhat.com>

	Revert:
	2013-06-28  Vladimir Makarov  <vmakarov@redhat.com>
	* lra-constraints.c (need_for_split_p): Check call used hard regs
	living through calls.

	* lra-constraints.c (inherit_in_ebb): Reset live_hard_regs for
	call used regs for call insn.

From-SVN: r200558
2013-06-28 23:55:52 +00:00
Jakub Jelinek 53c1275b31 re PR target/57736 (ICE in emit_move_insn with __builtin_ia32_rdtsc)
PR target/57736
	* config/i386/i386.c (ix86_expand_builtin): If target == NULL
	and mode is VOIDmode, don't create a VOIDmode pseudo to copy result
	into.

	* gcc.target/i386/pr57736.c: New test.

From-SVN: r200555
2013-06-28 22:25:35 +02:00
Balaji V. Iyer 1141ed3f71 Implemented Jason Merrill's suggestions on Array Notation C++.
gcc/ChangeLog
2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>

        * builtins.def: Fixed the function type of CILKPLUS_BUILTIN.

gcc/c/ChangeLog
2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>

        * c-parser.c (c_parser_array_notation): Removed rejection of array
        notations in an array of function pointers.

gcc/c-family/ChangeLog
2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>

        * array-notation-common.c (length_mismatch_in_expr_p): Collapsed two
        if-statements and compared the trees directly using tree_int_cst_equal.
        (find_rank): Checked for array notations in function name to handle
        array notations in function pointers.
        (extract_array_notation_exprs): Likewise.
        (replace_array_notations): Likewise.
        (cilkplus_extract_an_triplets): Replaced safe_push with
        safe_grow_cleared.  Also removed an unnecessary check to see if the
        node is of type ARRAY_NOTATION_REF.
        (fix_sec_implicit_args): Removed an unnecessary check for ADDR_EXPR.
        Also switched two if-statements to remove an unnecessary comparison.


gcc/cp/ChangeLog
2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>

        * parser.c (cp_parser_array_notation): Removed rejection array notation
        of type function pointers. Added handling of array expressions when
        Cilk Plus is enabled.  Took out type-checking.
        (cp_parser_postfix_open_square_expression): Moved normal array expr.
        parsing into cp_parser_array_notation when cilkplus is enabled.
        (cp_parser_compound_statement): Removed expansion of array notations.
        (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
        (cp_parser_function_definition_after_declarator): Likewise.
        (cp_parser_selection_statement): Removed error reporting.
        (cp_parser_iteration_statement): Likewise.
        (cp_parser_direct_declarator): Removed error checking/reporting if
        array notations are used in the declarator.
        * pt.c (instantiate_decl): Likewise.
        (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
        (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
        (potential_constant_expression_1): Returned false for ARRAY_NOTATION_REF
        case.
        * cp-gimplify.c (cp_genericize): Added expansion of array notation
        expressions here.
        * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry 
        parameters.  Replaced build_decls with get_temp_regvar with type as
        ptrdiff.
        (create_array_refs): Made the type-casting to ptrdiff_type.
        (replace_invariant_var): Added a check for void return type before 
	creating new var.  Replaced build_decl and build_min_nt_loc with
        get_temp_regvar.
        (expand_an_in_modify_expr): Ditto.  Replaced body of redundant else with
        gcc_unreachable.  Removed few unwanted checks.  Made induction variable
        type as ptrdiff_type.  Removed loc and complain arguments passed into
        make_triplet_val_inv.  Replaced all modify expression's code from NOP
        EXPR to INIT EXPR.  Replaced all forceful appending into stmt. list
        with the non-forceful one.  Replaced some integer conversion and
        equality-checking to using tree_int_cst_equal.
        (expand_sec_reduce_builtin): All changes mentioned in above function
        expand_an_in_modify_expr.  Made the new variable type of
        SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
        (expand_array_notation_exprs): Removed SWITCH_EXPR case.  Moved all
        the error reporting from parser to this function.  Removed unwanted
        statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
        (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
        in function pointers.
        (cp_expand_cond_array_notations): Added a new if statements to check
        if condition has a zero rank.  If so, then just return.
        (expand_return_expr): Added a check for return expressions with a rank.
        Replaced get_tmp_regvar with a create_temporary_var.
        (build_array_notation_ref): Simplified and removed unwanted if-stmts.
        Moved common code outside if-statements.  Moved type-checking from
        parser to here.
        * semantics.c (finish_return_stmt): Removed a check for return exprs.
        with a rank.
        * call.c (convert_like_real): Removed a check for array notation
        expression in a function.
        (build_over_call): Likewise.
        (magic_varargs_p): Added a check for builtin array notation function.
        Made this function non-static and removed its prototype.
        * cp-tree.h (magic_varargs_p): New prototype.
        * typeck.c (cp_build_function_call_vec): Removed automatic setting of
        nargs to the param->length when builtin reduction function is used.
        (convert_arguments): Replaced check for a constant_p function with
        margic_varargs_p function call.
        (cp_build_binary_op): Removed calling of the function
        find_correct_array_notation_type.
        (cp_build_addr_expr_1): Removed an unwanted if-statement.
        (convert_for_assignment): Removed automatic return of rhs when array
        notation builtin function is used.

gcc/testsuite/ChangeLog
2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>

        * c-c++-common/cilk-plus/AN/decl-ptr-colon.c (main): Made this testcase
        c specific.
        * c-c++-common/cilk-plus/AN/decl-ptr-colon.c (main): Changed dg-error
        strings to match the fixed error messages.
        * c-c++-common/cilk-plus/AN/misc.c (main): Likewise.
        * c-c++-common/cilk-plus/AN/rank_mismatch.c (main): Added a new error
        message check.

From-SVN: r200554
2013-06-28 13:04:36 -07:00
Vladimir Makarov e32e4c4a88 lra-constraints.c (need_for_split_p): Check call used hard regs living through calls.
2013-06-28  Vladimir Makarov  <vmakarov@redhat.com>

	* lra-constraints.c (need_for_split_p): Check call used hard regs
	living through calls.

From-SVN: r200553
2013-06-28 19:43:39 +00:00
Michael Meissner f161bfd330 re PR target/57744 (Power8 support has problems with quad word atomic instructions)
[gcc]
2013-06-28  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/57744
	* config/rs6000/rs6000.h (MODES_TIEABLE_P): Do not allow PTImode
	to tie with any other modes.  Eliminate Altivec vector mode tests,
	since these are a subset of ALTIVEC or VSX vector modes.  Simplify
	code, to return 0 if testing MODE2 for a condition, if we've
	already tested MODE1 for the same condition.

[gcc/testsuite]
2013-06-28  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/57744
	* gcc.target/powerpc/pr57744.c: New test to make sure lqarx and
	stqcx. get even registers.

From-SVN: r200538
2013-06-28 16:15:17 +00:00
Paolo Carlini 7d9800e39a *: Move inside testsuite/21_strings/basic_string/operations/data/.
2013-06-27  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/21_strings/basic_string/operations/*: Move inside
	testsuite/21_strings/basic_string/operations/data/.
	* testsuite/21_strings/basic_string/compare/*: Move inside
	testsuite/21_strings/basic_string/operations/.
	* testsuite/21_strings/basic_string/find/*: Likewise.
	* testsuite/21_strings/basic_string/rfind/*: Likewise.
	* testsuite/21_strings/basic_string/substr/*: Likewise.

From-SVN: r200537
2013-06-28 16:01:08 +00:00
Marcus Shawcroft 7eda14e188 [AArch64] Fix layout of aarch64_cannot_force_const_mem.
From-SVN: r200532
2013-06-28 15:22:48 +00:00
Marcus Shawcroft c822f852e9 [AArch64] Update comment w.r.t SYMBOL_TINY_ABSOLUTE address model.
From-SVN: r200531
2013-06-28 15:17:19 +00:00
Marcus Shawcroft 946c8f7bff Disable strassen.f90 test for aarch64 tiny memory.
This test case is too large to fit into the aarch64 tiny memory model.

From-SVN: r200521
2013-06-28 12:45:57 +00:00
Marcus Shawcroft da4f13a4f9 [AArch64] Remove aarch64_symbolic_constant_p.
From-SVN: r200519
2013-06-28 12:26:20 +00:00
Kyrylo Tkachov 956a95a55f constraints.md (Ts): New constraint.
2013-06-28  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/constraints.md (Ts): New constraint.
	* config/arm/arm.md (arm_movqi_insn): Add alternatives for
	16-bit encodings.
	(compare_scc): Use "Ts" constraint for operand 0.
	(ior_scc_scc): Likewise.
	(and_scc_scc): Likewise.
	(and_scc_scc_nodom): Likewise.
	(ior_scc_scc_cmp): Likewise for operand 7.
	(and_scc_scc_cmp): Likewise.
	* config/arm/thumb2.md (thumb2_movsi_insn):
	Add alternatives for 16-bit encodings.
	(thumb2_movhi_insn): Likewise.
	(thumb2_movsicc_insn): Likewise.
	(thumb2_and_scc): Take 'and' outside cond_exec.  Use "Ts" constraint.
	(thumb2_negscc): Use "Ts" constraint.
	Move mvn instruction outside cond_exec block.
	* config/arm/vfp.md (thumb2_movsi_vfp): Add alternatives
	for 16-bit encodings.

From-SVN: r200515
2013-06-28 11:16:03 +00:00
Kyrylo Tkachov 31dfce1008 arm.md (arm_mulsi3_v6): Add alternative for 16-bit encoding.
2013-06-28  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm.md (arm_mulsi3_v6): Add alternative for 16-bit
	encoding.
	(mulsi3addsi_v6): Disable predicable variant for arm_restrict_it.
	(mulsi3subsi): Likewise.
	(mulsidi3adddi): Likewise.
	(mulsidi3_v6): Likewise.
	(umulsidi3_v6): Likewise.
	(umulsidi3adddi_v6): Likewise.
	(smulsi3_highpart_v6): Likewise.
	(umulsi3_highpart_v6): Likewise.
	(mulhisi3tb): Likewise.
	(mulhisi3bt): Likewise.
	(mulhisi3tt): Likewise.
	(maddhisi4): Likewise.
	(maddhisi4tb): Likewise.
	(maddhisi4tt): Likewise.
	(maddhidi4): Likewise.
	(maddhidi4tb): Likewise.
	(maddhidi4tt): Likewise.
	(zeroextractsi_compare0_scratch): Likewise.
	(insv_zero): Likewise.
	(insv_t2): Likewise.
	(anddi_notzesidi_di): Likewise.
	(anddi_notsesidi_di): Likewise.
	(andsi_notsi_si): Likewise.
	(iordi_zesidi_di): Likewise.
	(xordi_zesidi_di): Likewise.
	(andsi_iorsi3_notsi): Likewise.
	(smax_0): Likewise.
	(smax_m1): Likewise.
	(smin_0): Likewise.
	(not_shiftsi): Likewise.
	(unaligned_loadsi): Likewise.
	(unaligned_loadhis): Likewise.
	(unaligned_loadhiu): Likewise.
	(unaligned_storesi): Likewise.
	(unaligned_storehi): Likewise.
	(extv_reg): Likewise.
	(extzv_t2): Likewise.
	(divsi3): Likewise.
	(udivsi3): Likewise.
	(arm_zero_extendhisi2addsi): Likewise.
	(arm_zero_extendqisi2addsi): Likewise.
	(compareqi_eq0): Likewise.
	(arm_extendhisi2_v6): Likewise.
	(arm_extendqisi2addsi): Likewise.
	(arm_movt): Likewise.
	(thumb2_ldrd): Likewise.
	(thumb2_ldrd_base): Likewise.
	(thumb2_ldrd_base_neg): Likewise.
	(thumb2_strd): Likewise.
	(thumb2_strd_base): Likewise.
	(thumb2_strd_base_neg): Likewise.
	(arm_negsi2): Add alternative for 16-bit encoding.
	(arm_one_cmplsi2): Likewise.

From-SVN: r200513
2013-06-28 10:56:27 +00:00
Marc Glisse ee429bdfe0 re PR c++/57509 (Segmentation fault when using __builtin_shuffle in templated class.)
2013-06-28  Marc Glisse  <marc.glisse@inria.fr>

	PR c++/57509
	* g++.dg/ext/pr57509.C: Pass vectors by reference to avoid warnings.

From-SVN: r200511
2013-06-28 10:31:39 +00:00
Kyrylo Tkachov 1572e697b7 predicates.md (arm_cond_move_operator): New predicate.
2013-06-28  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/predicates.md (arm_cond_move_operator): New predicate.
	* config/arm/arm.md (movsfcc): Use arm_cond_move_operator predicate.
	(movdfcc): Likewise.
	* config/arm/vfp.md (*thumb2_movsf_vfp):
	Disable predication for arm_restrict_it.
	(*thumb2_movsfcc_vfp): Disable for arm_restrict_it.
	(*thumb2_movdfcc_vfp): Likewise.
	(*abssf2_vfp, *absdf2_vfp, *negsf2_vfp, *negdf2_vfp,*addsf3_vfp,
	*adddf3_vfp, *subsf3_vfp, *subdf3_vfpc, *divsf3_vfp,*divdf3_vfp,
	*mulsf3_vfp, *muldf3_vfp, *mulsf3negsf_vfp, *muldf3negdf_vfp,
	*mulsf3addsf_vfp, *muldf3adddf_vfp, *mulsf3subsf_vfp,
	*muldf3subdf_vfp, *mulsf3negsfaddsf_vfp, *fmuldf3negdfadddf_vfp,
	*mulsf3negsfsubsf_vfp, *muldf3negdfsubdf_vfp, *fma<SDF:mode>4,
	*fmsub<SDF:mode>4, *fnmsub<SDF:mode>4, *fnmadd<SDF:mode>4,
	*extendsfdf2_vfp, *truncdfsf2_vfp, *extendhfsf2, *truncsfhf2,
	*truncsisf2_vfp, *truncsidf2_vfp, fixuns_truncsfsi2, fixuns_truncdfsi2,
	*floatsisf2_vfp, *floatsidf2_vfp, floatunssisf2, floatunssidf2,
	*sqrtsf2_vfp, *sqrtdf2_vfp, *cmpsf_vfp, *cmpsf_trap_vfp, *cmpdf_vfp,
	*cmpdf_trap_vfp, <vrint_pattern><SDF:mode>2):
	Disable predication for arm_restrict_it.

From-SVN: r200510
2013-06-28 10:05:27 +00:00
Jakub Jelinek 4ea3d77451 re PR middle-end/36041 (Speed up builtin_popcountll)
PR middle-end/36041
	* libgcc2.c (POPCOUNTCST2, POPCOUNTCST4, POPCOUNTCST8, POPCOUNTCST):
	Define.
	(__popcountSI2): For __SIZEOF_INT__ > 2 targets use arithmetics
	instead of table lookups.
	(__popcountDI2): Likewise.

From-SVN: r200506
2013-06-28 11:28:40 +02:00
Kirill Yukhin ebf8f0eaeb bmiintrin.h (_bextr_u32): New.
ChangeLog:
* config/i386/bmiintrin.h (_bextr_u32): New.
(_bextr_u64): Ditto.

testsuite/ChangeLog:
* gcc.target/i386/bmi-1.c: Extend with new instrinsic.
Fix scan patterns.
* gcc.target/i386/bmi-1.c: Ditto.
* gcc.target/i386/bmi-bextr-4.c: New.
* gcc.target/i386/bmi-bextr-5.c: Ditto.

From-SVN: r200505
2013-06-28 09:02:46 +00:00
Paolo Carlini 7350faad6f re PR c++/57682 (Uniform initialization syntax rejected in function-try-block)
/cp
2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57682
	* parser.c (cp_parser_save_member_function_body): Handle correctly
	curly braces in function-try-block mem-initializers.

/testsuite
2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57682
	* g++.dg/cpp0x/initlist73.C: New.

From-SVN: r200504
2013-06-28 08:53:03 +00:00
Meador Inge 1c3429049a atomic-flag.c: Add dg-require-effective-target sync_*.
gcc/testsuite/

2013-06-27  Meador Inge  <meadori@codesourcery.com>

	* gcc.dg/atomic-flag.c: Add dg-require-effective-target sync_*.
	* g++.dg/simulate-thread/atomics-2.C: Likewise.
	* g++.dg/simulate-thread/atomics-1.C: Likewise.

From-SVN: r200501
2013-06-28 00:55:13 +00:00
GCC Administrator a34eb0bdab Daily bump.
From-SVN: r200500
2013-06-28 00:16:29 +00:00
Richard Sandiford a290fcda13 gcc/
* config.gcc (mips*-mti-elf*, mips*-sde-elf*, mips64r5900-*-elf*)
	(mips64r5900el-*-elf*): Include mips/n32-elf.h.
	* config/mips/sde.h (LOCAL_LABEL_PREFIX, NO_DOLLAR_IN_LABEL)
	(LONG_DOUBLE_TYPE_SIZE, LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Move to...
	* config/mips/n32-elf.h: ...this new file.

From-SVN: r200496
2013-06-27 21:31:05 +00:00
Marc Glisse bedc293e87 re PR c++/57509 (Segmentation fault when using __builtin_shuffle in templated class.)
2013-06-27  Marc Glisse  <marc.glisse@inria.fr>

	PR c++/57509

gcc/c-family/
	* c-common.h (c_build_vec_perm_expr): New complain argument.
	* c-common.c (c_build_vec_perm_expr): Likewise.
	Use save_expr also in C++.

gcc/cp/
	* typeck.c (cp_build_vec_perm_expr): New function.
	* cp-tree.h: Declare it.
	* parser.c (cp_parser_postfix_expression): Call it.
	* pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
	(tsubst_copy_and_build): Likewise.

gcc/testsuite/
	* g++.dg/ext/pr57509.C: New file.

From-SVN: r200495
2013-06-27 21:29:22 +00:00
Ian Lance Taylor 4a197d64cb compiler: structs inherit all methods from embedded pointer fields.
Previously if a struct S contained an embedded field *T,
a method with receiver *T would not be promoted to a method
with value receiver S.

From-SVN: r200493
2013-06-27 20:51:55 +00:00
Marc Glisse ea16999619 re PR target/57224 (Remove __builtin_ia32_cmpngtss and __builtin_ia32_cmpngess)
2013-06-27  Marc Glisse  <marc.glisse@inria.fr>

	PR target/57224
	* config/i386/i386.c (enum ix86_builtins, bdesc_args): Remove
	IX86_BUILTIN_CMPNGTSS and IX86_BUILTIN_CMPNGESS.

From-SVN: r200492
2013-06-27 20:07:32 +00:00
Ian Lance Taylor d4134e8598 compiler: more consistent error message for [...]T(x)
The message should be similar to the one for "var x [...]T",
not to the message for []T(x...).

From-SVN: r200490
2013-06-27 19:20:08 +00:00
Catherine Moore 8e932114ee mips-tables.opt: Regenerate.
2013-06-27  Catherine Moore <clm@codesourcery.com>

	* config/mips/mips-tables.opt: Regenerate.
	* config/mips/mips-cpus.def: Add m14ke and m14kec.
	* config/mips/mips.h (BASE_DRIVER_SELF_SPECS): m14ke* implies
	-mdspr2.
	* doc/invoke.texi: Add -m14kc.

From-SVN: r200487
2013-06-27 14:56:00 -04:00
Jakub Jelinek cd06d2a20c re PR target/57623 (BEXTR intrinsic has memory operands switched around (fails to compile code))
PR target/57623
	* config/i386/i386.md (bmi_bextr_<mode>): Swap predicates and
	constraints of operand 1 and 2.

	* gcc.target/i386/bmi-bextr-3.c: New test.

From-SVN: r200479
2013-06-27 18:48:05 +02:00
Jakub Jelinek 2444244ecf re PR target/57623 (BEXTR intrinsic has memory operands switched around (fails to compile code))
PR target/57623
	* config/i386/i386.md (bmi2_bzhi_<mode>3): Swap AND arguments
	to match RTL canonicalization.  Swap predicates and
	constraints of operand 1 and 2.

	* gcc.target/i386/bmi2-bzhi-1.c: New test.

From-SVN: r200477
2013-06-27 18:44:17 +02:00
Vladimir Makarov 2f25972039 lra-constraints.c (inherit_in_ebb): Process static hard regs too.
2013-06-27  Vladimir Makarov  <vmakarov@redhat.com>

	* lra-constraints.c (inherit_in_ebb): Process static hard regs
	too.  Process OP_INOUT regs for splitting too.

From-SVN: r200475
2013-06-27 16:20:38 +00:00
Jakub Jelinek fef4d2b3eb tree-vect-stmts.c (vectorizable_store): Move ptr_incr var decl before the loop, initialize to NULL.
* tree-vect-stmts.c (vectorizable_store): Move ptr_incr var
	decl before the loop, initialize to NULL.
	(vectorizable_load): Initialize ptr_incr to NULL.

From-SVN: r200471
2013-06-27 17:35:57 +02:00
Roland Lutz d0c8b5fc8f aot-compile.in: Fix typo in option list.
2013-06-20  Roland Lutz  <rlutz@hedmen.org>

 	* contrib/aot-compile.in: Fix typo in option list.

From-SVN: r200469
2013-06-27 13:58:20 +00:00
Martin Jambor 79ee9826b3 re PR c++/57208 (Latest chromium compilation fails with enabled LTO)
2013-06-27  Martin Jambor  <mjambor@suse.cz>

	PR lto/57208
	* ipa-ref.h (ipa_maybe_record_reference): Declare.
	* ipa-ref.c (ipa_maybe_record_reference): New function.
	* cgraphclones.c (cgraph_create_virtual_clone): Use it.
	* ipa-cp.c (create_specialized_node): Record potential references from
	aggvals.
	* Makefile.in (ipa-ref.o): Add IPA_REF_H to dependencies.

From-SVN: r200468
2013-06-27 15:49:28 +02:00
Yufeng Zhang e18b4a817c aarch64.c (aarch64_force_temporary): Add an extra parameter 'mode' of type 'enum machine_mode mode'...
gcc/

	* config/aarch64/aarch64.c (aarch64_force_temporary): Add an extra
	parameter 'mode' of type 'enum machine_mode mode'; change to pass
	'mode' to force_reg.
	(aarch64_add_offset): Update calls to aarch64_force_temporary.
	(aarch64_expand_mov_immediate): Likewise.

From-SVN: r200467
2013-06-27 12:32:07 +00:00
Yufeng Zhang 9c023bf0bd aarch64.c (aarch64_add_offset): Change to pass 'mode' to aarch64_plus_immediate and gen_rtx_PLUS.
gcc/

	* config/aarch64/aarch64.c (aarch64_add_offset): Change to pass
	'mode' to aarch64_plus_immediate and gen_rtx_PLUS.

From-SVN: r200466
2013-06-27 12:30:11 +00:00
Paolo Carlini 17ee10dbec *: Move inside testsuite/21_strings/basic_string/modifiers/.
2013-06-27  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/21_strings/basic_string/append/*: Move inside
	testsuite/21_strings/basic_string/modifiers/.
	* testsuite/21_strings/basic_string/assign/*: Likewise.
	* testsuite/21_strings/basic_string/insert/*: Likewise.
	* testsuite/21_strings/basic_string/replace/*: Likewise.
	* testsuite/21_strings/basic_string/modifiers/pop_back/char/
	pop_back.cc: Rename to 1.cc.
	* testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t/
	pop_back.cc: Likewise.
	* testsuite/ext/vstring/assign/*: Move inside
	testsuite/ext/vstring/modifiers/.

From-SVN: r200465
2013-06-27 12:15:34 +00:00
Marc Glisse 85afa0754c re PR c++/57172 ([C++11][DR 1164] Template overload resolution ambiguous for T&& versus T&)
2013-06-27  Marc Glisse  <marc.glisse@inria.fr>

	PR c++/57172
gcc/cp/
	* pt.c (more_specialized_fn): If both arguments are references,
	give priority to an lvalue.

gcc/testsuite/
	* g++.dg/cpp0x/pr57172.C: New testcase.

From-SVN: r200463
2013-06-27 11:34:48 +00:00
Paolo Carlini 7b61c5a9cb stl_deque.h (deque<>::insert(iterator, const value_type&), [...]): Adjust C++11 signatures to take a const_iterator.
2013-06-27  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/stl_deque.h (deque<>::insert(iterator,
	const value_type&), deque<>::insert(iterator, value_type&&),
	deque<>::emplace(iterator, _Args&&...)): Adjust C++11 signatures to
	take a const_iterator.
	(deque<>::erase): Simplify.
	* include/bits/stl_list.h: Likewise.
	(_List_iterator<>::_M_const_cast): Add.
	* include/bits/stl_vector.h: Likewise.
	* include/bits/stl_bvector.h: Likewise.
	(_Bit_iterator::_M_const_cast): Add.
	* include/bits/deque.tcc: Adjust definitions.
	* include/bits/list.tcc: Likewise.
	* include/bits/vector.tcc: Likewise.
	* include/bits/stl_iterator.h (__normal_iterator<>::_M_const_cast):
	Define trivial version in C++98 mode.
	* include/ext/vstring.h (__versa_string<>::insert(iterator, _CharT),
	__versa_string<>::replace(iterator, iterator, const __versa_string&),
	__versa_string<>::replace(iterator, iterator, const _CharT*,
	size_type), __versa_string<>::replace(iterator, iterator,
	const _CharT*), __versa_string<>::replace(iterator, iterator,
	size_type, _CharT)): Adjust C++11 signatures to take a pair of
	const_iterators.
	* include/debug/deque: Adjust.
	* include/debug/list: Likewise.
	* include/debug/vector: Likewise.
	* include/profile/deque: Likewise.
	* include/profile/list: Likewise.
	* include/profile/vector: Likewise.
	(vector<>::emplace): Add.
	* testsuite/util/exception/safety.h: Update.
	* testsuite/23_containers/deque/modifiers/emplace/const_iterator.cc:
	New.
	* testsuite/23_containers/deque/modifiers/insert/const_iterator.cc:
	Likewise.
	* testsuite/23_containers/list/modifiers/emplace/const_iterator.cc:
	Likewise.
	* testsuite/23_containers/list/modifiers/insert/const_iterator.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/modifiers/insert/
	const_iterator.cc: Likewise.
	* testsuite/23_containers/vector/modifiers/emplace/const_iterator.cc:
	Likewise.
	* testsuite/23_containers/vector/modifiers/insert/const_iterator.cc:
	Likewise.
	* testsuite/ext/vstring/modifiers/insert/char/const_iterator.cc:
	Likewise.
	* testsuite/ext/vstring/modifiers/insert/wchar_t/const_iterator.cc:
	Likewise.
	* testsuite/ext/vstring/modifiers/replace/char/const_iterator.cc:
	Likewise.
	* testsuite/ext/vstring/modifiers/replace/wchar_t/const_iterator.cc:
	Likewise.

	* testsuite/ext/vstring/modifiers/char/54577.cc: Move to testsuite/
	ext/vstring/modifiers/erase/char/.
	* testsuite/ext/vstring/modifiers/wchar_t/54577.cc: Move to testsuite/
	ext/vstring/modifiers/wchar_t/.
	* testsuite/ext/vstring/modifiers/char/pop_back.cc: Move to testsuite/
	ext/vstring/modifiers/pop_back/char/.
	* testsuite/ext/vstring/modifiers/wchar_t/pop_back.cc: Move to
	testsuite/ext/vstring/modifiers/pop_back/wchar_t/.

	* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
	Adjust dg-error line number.
	* testsuite/23_containers/deque/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/
	constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
	Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
	Likewise.

From-SVN: r200458
2013-06-27 09:51:21 +00:00
Andreas Krebbel 5a3fe9b607 s390.c: Rename UNSPEC_CCU_TO_INT to UNSPEC_STRCMPCC_TO_INT and UNSPEC_CCZ_TO_INT to...
2013-06-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/s390.c: Rename UNSPEC_CCU_TO_INT to
	UNSPEC_STRCMPCC_TO_INT and UNSPEC_CCZ_TO_INT to UNSPEC_CC_TO_INT.
	(struct machine_function): Add tbegin_p.
	(s390_canonicalize_comparison): Fold CC mode compares to
	conditional jump if possible.
	(s390_emit_jump): Return the emitted jump.
	(s390_branch_condition_mask, s390_branch_condition_mnemonic):
	Handle CCRAWmode compares.
	(s390_option_override): Default to -mhtm if available.
	(s390_reg_clobbered_rtx): Handle floating point regs as well.
	(s390_regs_ever_clobbered): Use s390_regs_ever_clobbered also for
	FPRs instead of df_regs_ever_live_p.
	(s390_optimize_nonescaping_tx): New function.
	(s390_init_frame_layout): Extend clobbered_regs array to cover
	FPRs as well.
	(s390_emit_prologue): Call s390_optimize_nonescaping_tx.
	(s390_expand_tbegin): New function.
	(enum s390_builtin): New enum definition.
	(code_for_builtin): New array definition.
	(s390_init_builtins): New function.
	(s390_expand_builtin): New function.
	(TARGET_INIT_BUILTINS): Define.
	(TARGET_EXPAND_BUILTIN): Define.
	* common/config/s390/s390-common.c (processor_flags_table): Add
	PF_TX.
	* config/s390/predicates.md (s390_comparison): Handle CCRAWmode.
	(s390_alc_comparison): Likewise.
	* config/s390/s390-modes.def: Add CCRAWmode.
	* config/s390/s390.h (processor_flags): Add PF_TX.
	(TARGET_CPU_HTM): Define macro.
	(TARGET_HTM): Define macro.
	(TARGET_CPU_CPP_BUILTINS): Define __HTM__ for htm.
	* config/s390/s390.md: Rename UNSPEC_CCU_TO_INT to
	UNSPEC_STRCMPCC_TO_INT and UNSPEC_CCZ_TO_INT to UNSPEC_CC_TO_INT.
	(UNSPECV_TBEGIN, UNSPECV_TBEGINC, UNSPECV_TEND, UNSPECV_TABORT)
	(UNSPECV_ETND, UNSPECV_NTSTG, UNSPECV_PPA): New unspecv enum
	values.
	(TBEGIN_MASK, TBEGINC_MASK): New constants.
	("*cc_to_int"): Move up.
	("*mov<mode>cc", "*cjump_64", "*cjump_31"): Accept integer
	constants other than 0.
	("*ccraw_to_int"): New insn and splitter definition.
	("tbegin", "tbegin_nofloat", "tbegin_retry")
	("tbegin_retry_nofloat", "tbeginc", "tend", "tabort")
	("tx_assist"): New expander.
	("tbegin_1", "tbegin_nofloat_1", "*tbeginc_1", "*tend_1")
	("*tabort_1", "etnd", "ntstg", "*ppa"): New insn definition.
	* config/s390/s390.opt: Add -mhtm option.
	* config/s390/s390-protos.h (s390_emit_jump): Add return type.
	* config/s390/htmxlintrin.h: New file.
	* config/s390/htmintrin.h: New file.
	* config/s390/s390intrin.h: New file.
	* doc/extend.texi: Document htm builtins.
	* config.gcc: Add the new header files to extra_headers.

2013-06-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* gcc.target/s390/htm-1.c: New file.
	* gcc.target/s390/htm-nofloat-1.c: New file.
	* gcc.target/s390/htm-xl-intrin-1.c: New file.

2013-06-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/target.h: Include htmintrin.h.
	(_HTM_ITM_RETRIES): New macro definition.
	(htm_available, htm_init, htm_begin, htm_begin_success)
	(htm_commit, htm_abort, htm_abort_should_retry): New functions.

From-SVN: r200454
2013-06-27 07:44:11 +00:00
Jason Merrill b47a3fef9c DR 1589
DR 1589
	* g++.dg/cpp0x/initlist72.C: New.

From-SVN: r200451
2013-06-26 22:35:52 -04:00
Jason Merrill 46812ec24c typeck2.c (store_init_value): Diagnose a non-constant initializer for in-class static.
* typeck2.c (store_init_value): Diagnose a non-constant
	initializer for in-class static.

From-SVN: r200450
2013-06-26 22:35:46 -04:00
Jason Merrill 447cf5546f re PR c++/57408 (lambda, Variable length arrays, thread, internal compiler error: in expand_expr_real_1, at expr.c:9327)
PR c++/57408
	* semantics.c (add_capture): Set type to error_mark_node after
	error.

From-SVN: r200449
2013-06-26 22:35:39 -04:00
GCC Administrator 412ec6cfb9 Daily bump.
From-SVN: r200447
2013-06-27 00:16:41 +00:00
Michael Eager e2c600d251 Revert 200443.
From-SVN: r200444
2013-06-27 00:02:40 +00:00
David Holsgrove 8eedc3ebe7 Add sync_compare_and_swapsi and sync_test_and_setsi.
2013-06-16  David Holsgrove <david.holsgrove@xilinx.com>

	Add sync_compare_and_swapsi and sync_test_and_setsi.

	* gcc/config/microblaze/sync.md: New file.
	* gcc/config/microblaze/microblaze.md: Add UNSPEC_SYNC_CAS,
	UNSPEC_SYNC_XCHG and include sync.md.
	* gcc/config/microblaze/microblaze.c: Add print_operand 'y'.
	* gcc/config/microblaze/constraints.md: Add memory_contraint
	'Q' which is a single register.

From-SVN: r200443
2013-06-26 23:55:52 +00:00
Ian Lance Taylor 33e84ed46b compiler: disallow fallthrough in last case of switch.
In spec: A "fallthrough" statement may appear as the last
statement of all but the last clause of an expression switch.

From-SVN: r200440
2013-06-26 22:58:03 +00:00
Paolo Carlini a9826e56fa abi_tag.cc: Avoid spurious fails with check-debug.
2013-06-25  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/23_containers/map/modifiers/erase/abi_tag.cc: Avoid
	spurious fails with check-debug.
	* testsuite/23_containers/multimap/modifiers/erase/abi_tag.cc:
	Likewise.
	* testsuite/23_containers/set/modifiers/erase/abi_tag.cc: Likewise.
	* testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc:
	Likewise.

From-SVN: r200438
2013-06-26 22:48:06 +00:00
Ian Lance Taylor 69908ca8b6 compiler: reject integer division by zero constant.
From-SVN: r200436
2013-06-26 22:42:35 +00:00
Thomas Schwinge 9e2166298a gcc/
* config/i386/gnu.h [TARGET_LIBC_PROVIDES_SSP]
	(TARGET_CAN_SPLIT_STACK, TARGET_THREAD_SPLIT_STACK_OFFSET):
	Undefine.

From-SVN: r200434
2013-06-26 23:23:43 +02:00
Ian Lance Taylor cf5ef6bd80 compiler: forbid identifiers named "init" in package scope.
From-SVN: r200426
2013-06-26 15:47:53 +00:00