Commit Graph

113991 Commits

Author SHA1 Message Date
Richard Henderson aebac0ca06 arm-linux: Add libitm support.
* config/arm/hwcap.h, config/arm/hwcap.cc: New files.
	* config/arm/sjlj.S, config/arm/target.h: New files.
	* config/generic/asmcfi.h (cfi_adjust_cfa_offset): New.
	(cfi_rel_offset): New.
	* config/linux/futex_bits.h: New file.
	* config/linux/futex.cc: Include futex_bits.h here...
	* config/linux/futex.h: ... not here.
	* Makefile.am (libitm_la_SOURCES) <ARCH_ARM>: Add hwcap.cc.
	* configure.ac (ARCH_AM): New conditional.
	* Makefile.in, configure: Rebuild.
	* configure.tgt: Handle ARM.

From-SVN: r182355
2011-12-14 19:24:05 -08:00
Richard Henderson cc50a1e14e arm: Set predicable on more instructions.
Make sure its set for all CMP, CMN, TST instructions,
which do work inside IT blocks.

        * config/arm/arm.md (*addsi3_compare0_scratch): Set predicable.
        (*compare_negsi_si, *compare_addsi2_op0): Likewise.
        (*compare_addsi2_op1, *zeroextractsi_compare0_scratch): Likewise.
        (*compareqi_eq0, *arm_cmpsi_insn, *arm_cmpsi_negshiftsi_si): Likewise.

From-SVN: r182353
2011-12-14 16:23:32 -08:00
GCC Administrator 6a473864bd Daily bump.
From-SVN: r182352
2011-12-15 00:18:40 +00:00
Ian Lance Taylor dc83cfd817 libgo: Update to weekly.2011-12-06.
From-SVN: r182347
2011-12-14 22:27:04 +00:00
Jason Merrill da3265662d re PR c++/51554 (ICE in cp/semantics.c:cxx_eval_indirect_ref with -Wall)
PR c++/51554
	* semantics.c (cxx_eval_indirect_ref): Fix sanity check.

From-SVN: r182346
2011-12-14 17:26:24 -05:00
Jason Merrill 2f074b08d4 re PR c++/51248 (ICE with pointer to enum)
PR c++/51248
	* decl.c (copy_type_enum): Also update variants.
	(finish_enum): Allow variants of complete enums.

From-SVN: r182345
2011-12-14 17:26:13 -05:00
Dodji Seketeli 3c72114c42 PR c++/51475 - ICE with invalid initializer-list
gcc/cp/

	PR c++/51475
	* call.c (struct conversion)<u.next>: Update comment.
	(next_conversion): New static function.
	(convert_like_real): Use it.

gcc/testsuite/

	PR c++/51475
	* g++.dg/cpp0x/initlist63.C: New test.

From-SVN: r182343
2011-12-14 22:49:52 +01:00
H.J. Lu a13780a666 Check __GLIBC__ when using __SIGRTMIN
2011-12-14  H.J. Lu  <hongjiu.lu@intel.com>

	* generic-morestack.c (__generic_morestack_set_initial_sp): Check
	__GLIBC__ instead of __linux__ when using __SIGRTMIN.

From-SVN: r182342
2011-12-14 10:49:16 -08:00
Ian Lance Taylor d536359059 libgo: Update to weekly.2011-12-06.
From-SVN: r182338
2011-12-14 15:41:54 +00:00
Richard Guenther ef0d4c4d99 tree-cfg.c (replace_uses_by): Fixup TREE_CONSTANT for propagating all kinds of constants.
2011-12-14  Richard Guenther  <rguenther@suse.de>

	* tree-cfg.c (replace_uses_by): Fixup TREE_CONSTANT for
	propagating all kinds of constants.

From-SVN: r182337
2011-12-14 15:34:35 +00:00
Richard Guenther 23ee14a5e6 re PR lto/51497 (The run time for the polyhedron test nf.f90 is ~10% slower with -flto after revision 182107)
2011-12-14  Richard Guenther  <rguenther@suse.de>

	PR lto/51497
	* lto-streamer-in.c (lto_read_body): Fixup local types
	TYPE_CANONICAL and variant chain.

From-SVN: r182336
2011-12-14 15:31:24 +00:00
Ian Lance Taylor 9532fecfc5 runtime: Bump memory limit in gc_test.
From-SVN: r182332
2011-12-14 14:54:32 +00:00
Ian Lance Taylor c623f8372c compiler: Permit omitting &T in composite literal.
From-SVN: r182331
2011-12-14 14:48:01 +00:00
Hariharan Sandanagobalane e6f5278487 MAINTAINERS (picochip): Changed my email address.
* MAINTAINERS (picochip): Changed my email address.

From-SVN: r182330
2011-12-14 11:31:43 +00:00
Richard Guenther ef61eb6071 tree.c (free_lang_data_in_type): Do not clear fields dependent on debuginfo level setting.
2011-12-14  Richard Guenther  <rguenther@suse.de>

	* tree.c (free_lang_data_in_type): Do not clear fields
	dependent on debuginfo level setting.
	(find_decls_types_r): Use TYPE_STUB_DECL rathern than TREE_CHAIN.
	* tree.h (TYPE_STUB_DECL): Properly check that we access
	a type.

From-SVN: r182329
2011-12-14 11:26:13 +00:00
Georg-Johann Lay d7288dfb9f re PR target/50931 ([avr] Support a 24-bit scalar integer mode)
libgcc/
	PR target/50931
	* config/avr/t-avr (LIB1ASMSRC): Add _mulpsi3, _mulsqipsi3.
	* config/avr/lib1funcs.S (__mulpsi3, __mulsqipsi3): New functions.
gcc/
	PR target/50931
	* config/avr/avr.md (mulpsi3): New expander.
	(*umulqihipsi3, *umulhiqipsi3): New insns.
	(*mulsqipsi3.libgcc, *mulpsi3.libgcc): New insns.
	(mulsqipsi3, *mulpsi3): New insn-and-splits.
	(ashlpsi3): Turn to expander.  Move insn code to...
	(*ashlpsi3): ...this new insn.
testsuite/
	PR target/50931
	* gcc.target/avr/torture/int24-mul.c: New testcase.

From-SVN: r182328
2011-12-14 10:00:56 +00:00
Richard Guenther 552d2db565 tree-cfg.c (replace_uses_by): Only mark blocks altered that will make a difference.
2011-12-14  Richard Guenther  <rguenther@suse.de>

	* tree-cfg.c (replace_uses_by): Only mark blocks altered
	that will make a difference.  Only recompute ADDR_EXPR
	invariantness if it could possibly have changed.  Do so
	before folding the statement.

From-SVN: r182327
2011-12-14 09:50:38 +00:00
Dmitry Vyukov 4f9c574a92 Revert the previous "Fix flags for edges from/to entry/exit basic blocks"
patch that caused regressions.

From-SVN: r182326
2011-12-14 01:28:05 -08:00
Dodji Seketeli 56f05abd0f PR c++/51476 - ICE on PTRMEM_CST as template argument in c++11
gcc/cp/

	PR c++/51476
	* pt.c (convert_nontype_argument): Don't call maybe_constant_value
	for PTRMEM_CST nodes.

gcc/testsuite/

	PR c++/51476
	* g++.dg/cpp0x/ptrmem-cst-arg1.C: New test.

From-SVN: r182324
2011-12-14 09:46:13 +01:00
Jason Merrill 58fc93fb00 re PR c++/51406 ([c++0x] Incorrect result of static_cast to rvalue reference to base class.)
PR c++/51406
	PR c++/51161
	* typeck.c (build_static_cast_1): Fix cast of lvalue to
	base rvalue reference.

From-SVN: r182322
2011-12-14 00:18:39 -05:00
Ian Lance Taylor c990877a41 compiler: Move import of Go export data to gcc side of interface.
* go-backend.c: #include "simple-object.h" and "intl.h".
	(GO_EXPORT_SEGMENT_NAME): Define if not defined.
	(GO_EXPORT_SECTION_NAME): Likewise.
	(go_write_export_data): Use GO_EXPORT_SECTION_NAME.
	(go_read_export_data): New function.
	* go-c.h (go_read_export_data): Declare.

From-SVN: r182321
2011-12-14 01:36:11 +00:00
Paolo Carlini 6fdc547369 re PR c++/51464 ([c++0x] ICE with invalid use of [])
/cp
2011-12-13  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51464
	* semantics.c (begin_lambda_type): Check begin_class_definition return
	value for error_mark_node.
	* parser.c (cp_parser_lambda_expression): Check begin_lambda_type
	return value for error_mark_node.

/testsuite
2011-12-13  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51464
	* g++.dg/cpp0x/lambda/lambda-ice6.C: New.

From-SVN: r182320
2011-12-14 00:36:15 +00:00
GCC Administrator 639166b250 Daily bump.
From-SVN: r182319
2011-12-14 00:19:11 +00:00
Ian Lance Taylor 90a9ea010a runtime: Change gc_test to test only newly allocated memory.
From-SVN: r182315
2011-12-13 23:15:36 +00:00
Ian Lance Taylor c915f63f73 mksysinfo.sh: Ensure that IPV6 constants and types are defined.
From-SVN: r182314
2011-12-13 22:25:30 +00:00
Ian Lance Taylor de05aad683 syscall: Don't build wait status functions on RTEMS.
From-SVN: r182313
2011-12-13 22:07:25 +00:00
Eric Botcazou 4ad9a9de2d lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
* lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
	* lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets.
	* lto-streamer-in.c (lto_read_body): Likewise.
	(lto_input_toplevel_asms): Likewise.
	* lto-section-in.c (lto_create_simple_input_block): Likewise.
	* ipa-inline-analysis.c (inline_read_section): Likewise.
	* ipa-prop.c (ipa_prop_read_section): Likewise.

	* df.h (DF_NOTE): Fix typo in comment.
lto/
	* lto.h (lto_parse_hex): Delete.
	* lto.c (lto_read_decls): Use 'int' for offsets.
	(lto_parse_hex): Make static and return proper 64-bit host type.
	(lto_resolution_read): Use proper 64-bit host type.

From-SVN: r182310
2011-12-13 21:59:39 +00:00
Ian Lance Taylor 03eee7f75c runtime: RTEMS build fixes.
From Joel Sherrill.

From-SVN: r182309
2011-12-13 21:59:26 +00:00
Fabien Chêne 091d222216 revert an unattended change about access declaration
From-SVN: r182308
2011-12-13 22:18:03 +01:00
Aldy Hernandez 54c39478f8 trans-mem.c (ipa_tm_create_version_alias): Set DECL_CONTEXT and DECL_LANG_SPECIFIC.
* trans-mem.c (ipa_tm_create_version_alias): Set DECL_CONTEXT and
        DECL_LANG_SPECIFIC.

From-SVN: r182307
2011-12-13 20:32:26 +00:00
Andreas Krebbel c2db543b53 regmove.c (fixup_match_2): Only access call_used_regs with hard regs.
2011-12-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* regmove.c (fixup_match_2): Only access call_used_regs with hard
	regs.

From-SVN: r182306
2011-12-13 20:22:59 +00:00
Richard Henderson 5d9d05d349 rwlock.cc (gtm_rwlock::write_lock_generic): Fix signed/unsigned comparison werror.
* config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix
        signed/unsigned comparison werror.

From-SVN: r182302
2011-12-13 12:10:36 -08:00
Richard Henderson b826bea7f3 Revert two unintended commits
From-SVN: r182301
2011-12-13 12:07:01 -08:00
Andrew Pinski 38a53a0e25 mips-cpus.def: Add Octeon2.
2011-12-13  Andrew Pinski  <apinski@cavium.com>
            Adam Nemet  <anemet@caviumnetworks.com>

	* config/mips/mips-cpus.def: Add Octeon2.
	* config/mips/mips-tables.opt: Regenerate.
	* config/mips/mips.md (define_attr "cpu"): Add Octeon2.
	* config/mips/driver-native.c (host_detect_local_cpu): Support Octeon2 also.
	* config/mips/octeon.md (octeon_arith): Add Octeon2.
	(octeon_condmove): Likewise.
	(octeon_load): Rename to ..
	(octeon_load_o1): this.
	(octeon_load_o2): New reserve.
	(octeon_cop_o2): New reserve.
	(octeon_store):  Match Octeon2 also.
	(octeon_brj): Rename to ..
	(octeon_brj_o1): this.
	(octeon_brj_o2): New reserve.
	(octeon_imul3): Rename to ...
	(octeon_imul3_o1): this.
	(octeon_imul3_o2): New reserve.
	(octeon_imul): Rename to ...
	(octeon_imul_o1): this.
	(octeon_imul_o2): New reserve.
	(octeon_mfhilo): Rename to ...
	(octeon_mfhilo_o1): This.
	(octeon_mfhilo_o2): New reserve.
	(octeon_imadd): Rename to ...
	(octeon_imadd_o1): this.
	(octeon_imadd_o2): New reserve.
	(octeon_idiv): Rename to ..
	(octeon_idiv_o1): This.
	(octeon_idiv_o2_si): New reserve.
	(octeon_idiv_o2_di): Likewise.
	(octeon_unknown): Match Octeon2 also.
	* config/mips/mips.c (mips_rtx_cost_data): Add Octeon2 cost data.
	(mips_issue_rate): Octeon2 can issue 2 at a time.
	* config/mips/mips.h (TARGET_OCTEON): Match Octeon2 also.
	(TARGET_OCTEON2): New define.
	(TUNE_OCTEON): Match Octeon2 also.

2011-12-13  Andrew Pinski  <apinski@cavium.com>
            Adam Nemet  <anemet@caviumnetworks.com>

	* gcc.target/mips/mips.exp (mips_option_groups): Fix debug.  Add
	-fdump-* options.
	* gcc.target/mips/octeon2-pipe-1.c: New testcase.
	* gcc.target/mips/octeon-pipe-1.c: New testcase.


Co-Authored-By: Adam Nemet <anemet@caviumnetworks.com>

From-SVN: r182300
2011-12-13 12:00:18 -08:00
Richard Henderson e9619a8a00 arm: Implement vec_perm and vec_perm_const for NEON.
From-SVN: r182299
2011-12-13 11:58:56 -08:00
Richard Henderson 8c75d41b92 Delete VEC_INTERLEAVE_*_EXPR.
* tree.def (VEC_INTERLEAVE_HIGH_EXPR, VEC_INTERLEAVE_LOW_EXPR): Remove.
	* gimple-pretty-print.c (dump_binary_rhs): Don't handle
	VEC_INTERLEAVE_HIGH_EXPR and VEC_INTERLEAVE_LOW_EXPR.
	* expr.c (expand_expr_real_2): Likewise.
	* tree-cfg.c (verify_gimple_assign_binary): Likewise.
	* cfgexpand.c (expand_debug_expr): Likewise.
	* tree-inline.c (estimate_operator_cost): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree-vect-generic.c (expand_vector_operations_1): Likewise.
	* fold-const.c (fold_binary_loc): Likewise.
	* doc/generic.texi (VEC_INTERLEAVE_HIGH_EXPR,
	VEC_INTERLEAVE_LOW_EXPR): Remove documentation.
	* optabs.c (optab_for_tree_code): Don't handle
	VEC_INTERLEAVE_HIGH_EXPR and VEC_INTERLEAVE_LOW_EXPR.
	(expand_binop, init_optabs): Remove vec_interleave_high_optab
	and vec_interleave_low_optab.
	* genopinit.c (optabs): Likewise.
	* optabs.h (OTI_vec_interleave_high, OTI_vec_interleave_low): Remove.
	(vec_interleave_high_optab, vec_interleave_low_optab): Remove.
	* doc/md.texi (vec_interleave_high, vec_interleave_low): Remove
	documentation.
	* tree-vect-stmts.c (gen_perm_mask): Renamed to...
	(vect_gen_perm_mask): ... this.  No longer static.
	(perm_mask_for_reverse, vectorizable_load): Adjust callers.
	* tree-vectorizer.h (vect_gen_perm_mask): New prototype.
	* tree-vect-data-refs.c (vect_strided_store_supported): Don't try
	VEC_INTERLEAVE_*_EXPR, use can_vec_perm_p instead of
	can_vec_perm_for_code_p.
	(vect_permute_store_chain): Generate VEC_PERM_EXPR with interleaving
	masks instead of VEC_INTERLEAVE_HIGH_EXPR and VEC_INTERLEAVE_LOW_EXPR.
	* config/i386/i386.c (expand_vec_perm_interleave2): If
	expand_vec_perm_interleave3 would handle it, return false.
	(expand_vec_perm_broadcast_1): Don't use vec_interleave_*_optab.

From-SVN: r182298
2011-12-13 11:58:49 -08:00
Richard Henderson 6cc7fb9051 sparc: Default memory model to TSO for Linux and Solaris.
* config/sparc/tso.h: New file.
        * config.gcc (sparc-*-linux*, sparc*-*-solaris2*): Use it.
        * config/sparc/sparc.c (sparc_option_override): Honor
        SUBTARGET_DEFAULT_MEMORY_MODEL.
        * config/sparc/sparc.h (SUBTARGET_DEFAULT_MEMORY_MODEL): New.

From-SVN: r182297
2011-12-13 11:22:44 -08:00
Ian Lance Taylor 9dadf3bf5e libgo: Solaris compatibility patches.
From Rainer Orth.

From-SVN: r182296
2011-12-13 19:18:34 +00:00
Ian Lance Taylor 7b1c3dd9e6 libgo: Update to weekly.2011-12-02.
From-SVN: r182295
2011-12-13 19:16:27 +00:00
Richard Henderson 36cfbee133 libitm: Conversion to c++11 atomics.
* local_atomic: New file.
        * libitm_i.h: Include it.
        (gtm_thread::shared_state): Use atomic template.
        * beginend.cc (GTM::gtm_clock): Use atomic template.
        (global_tid): Use atomic template if 64-bit atomics available.
        (gtm_thread::gtm_thread): Update shared_state access.
        (gtm_thread::trycommit): Likewise.
        (choose_code_path): Update global_tid access.
        * method-gl.cc (gl_mg::orec): Use atomic template.  Update all users.
        * stmlock.h (GTM::gtm_clock): Use atomic template.
        (gtm_get_clock, gtm_inc_clock): Update accesses.
        * config/linux/rwlock.cc (gtm_rwlock::read_lock): Remove
        redundant __sync_synchronize after atomic shared_state access.
        * config/posix/rwlock.cc (gtm_rwlock::read_lock): Likewise.
        (gtm_rwlock::write_lock_generic): Likewise.
        (gtm_rwlock::read_unlock): Likewise.
        * config/alpha/target.h (atomic_read_barrier): Remove.
        (atomic_write_barrier): Remove.
        * config/x86/target.h (atomic_read_barrier): Remove.
        (atomic_write_barrier): Remove.

From-SVN: r182294
2011-12-13 11:11:25 -08:00
Ian Lance Taylor c36cc670b5 compiler: Fix multiple conversions to different named slices.
From-SVN: r182293
2011-12-13 18:52:19 +00:00
Fabien Chêne 0f8fa9b678 re PR c++/14258 (typename in a using declaration not supported)
gcc/testsuite/ChangeLog

2011-12-11  Fabien Chene  <fabien@gcc.gnu.org>

	PR c++/14258
	* g++.dg/template/using16.C: New.
	* g++.dg/template/using17.C: New.

gcc/cp/ChangeLog

2011-12-11  Fabien Chene  <fabien@gcc.gnu.org>

	PR c++/14258
	* cp-tree.h (USING_DECL_TYPENAME_P): New macro.
	* parser.c (cp_parser_nonclass_name): Handle using declarations
	that refer to a dependent type.
	(cp_parser_using_declaration): Set USING_DECL_TYPENAME_P to 1 if
	the using declaration refers to a dependent type.

From-SVN: r182292
2011-12-13 19:46:58 +01:00
Ian Lance Taylor 863ea6cf55 compiler: Permit converting between string and named []byte/[]rune.
From-SVN: r182291
2011-12-13 18:09:56 +00:00
Aldy Hernandez 80fd8eba8e trans-mem.c (struct diagnose_tm): Remove saw_unsafe.
PR/51443
        * trans-mem.c (struct diagnose_tm): Remove saw_unsafe.
        (diagnose_tm_1): Same.
        (ipa_tm_execute): Do not test tm_may_enter_irr before we set it.
        (ipa_tm_scan_irr_function): Return gracefully when no
        DECL_STRUCT_FUNCTION.
        (ipa_tm_scan_irr_block): Believe the user on TM attributes.

From-SVN: r182290
2011-12-13 17:49:55 +00:00
Martin Jambor d370518679 re PR middle-end/50628 (gfortran.fortran-torture/execute/entry_4.f90 fails)
2011-12-13  Martin Jambor  <mjambor@suse.cz>

	PR middle-end/50628
	* tree-sra.c (propagate_subaccesses_across_link): Do not propagate
	sub-accesses of scalar accesses.

From-SVN: r182289
2011-12-13 17:08:14 +01:00
Martin Jambor 0318fc7749 re PR tree-optimization/51362 (ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401)
2011-12-13  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/51362
	* ipa-cp.c (estimate_local_effects): When estimated size of a
	specialized clone is zero, bump it to one.

	* testsuite/gcc.dg/ipa/pr51362.c: New test.

From-SVN: r182288
2011-12-13 16:43:36 +01:00
Uros Bizjak 9170437b04 re PR testsuite/51524 ([BMI2] New regression on 182266 vs 182257)
PR testsuite/51524
	* gcc.target/i386/bmi2-mulx32-1.c (gen_mulx): Add attribute regparm(2).
	* gcc.target/i386/bmi2-mulx32-2.c (calc_mulx_u32): Ditto.

From-SVN: r182287
2011-12-13 16:00:09 +01:00
Richard Guenther ea973bad53 re PR debug/48354 (internal compiler error: in splice_child_die, at dwarf2out.c:8064)
2011-12-13  Richard Guenther  <rguenther@suse.de>

	PR lto/48354
	* tree.c (find_decls_types_r): Also walk DECL_ORIGINAL_TYPE.
	* tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
	Stream DECL_ORIGINAL_TYPE.
	* tree-streamer-out.c (write_ts_decl_non_common_tree_pointers):
	Likewise.

	lto/
	* lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
	with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.

	* g++.dg/lto/pr48354-1_0.C: New testcase.

From-SVN: r182286
2011-12-13 14:43:44 +00:00
Michael Matz 88d599dcf6 life -> live; one favourite typo of mine.
From-SVN: r182285
2011-12-13 14:07:26 +00:00
Jakub Jelinek f6dbed3269 Revert
2011-12-12  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/51481
	* gimple-fold.c (gimple_fold_call): Call
	maybe_clean_or_replace_eh_stmt.  Avoid optimization if stmt has EH
	edges, but gimple_fold_builtin result can't throw.

From-SVN: r182284
2011-12-13 15:00:58 +01:00