Commit Graph

117603 Commits

Author SHA1 Message Date
Jakub Jelinek 891ca07d49 re PR rtl-optimization/53589 (ICE in maybe_record_trace_start with asm goto)
PR rtl-optimization/53589
	* cfgrtl.c (force_nonfallthru_and_redirect): Do asm_goto_edge
	discovery even when e->dest != target.  If any LABEL_REF points
	to e->dest label, redirect it to target's label.

	* gcc.dg/torture/pr53589.c: New test.

From-SVN: r188428
2012-06-12 09:52:47 +02:00
Oleg Endo ed6a1ff987 re PR rtl-optimization/50749 (Auto-inc-dec does not find subsequent contiguous mem accesses)
PR target/50749
	* gcc.target/sh/pr50749-sf-postinc-2.c: New.
	* gcc.target/sh/pr50749-sf-postinc-4.c: New.
	* gcc.target/sh/pr50749-qihisi-postinc-2.c: New.
	* gcc.target/sh/pr50749-qihisi-postinc-4.c: New.
	* gcc.target/sh/pr50749-sf-predec-2.c: New.
	* gcc.target/sh/pr50749-sf-predec-4.c: New.
	* gcc.target/sh/pr50749-qihisi-predec-1.c: New.
	* gcc.target/sh/pr50749-qihisi-predec-3.c: New.
	* gcc.target/sh/pr50749-sf-postinc-1.c: New.
	* gcc.target/sh/pr50749-sf-postinc-3.c: New.
	* gcc.target/sh/pr50749-qihisi-postinc-1.c: New.
	* gcc.target/sh/pr50749-qihisi-postinc-3.c: New.
	* gcc.target/sh/pr50749-sf-predec-1.c: New.
	* gcc.target/sh/pr50749-sf-predec-3.c: New.
	* gcc.target/sh/pr50749-qihisi-predec-2.c: New.
	* gcc.target/sh/pr50749-qihisi-predec-4.c: New.

From-SVN: r188426
2012-06-12 07:09:52 +00:00
Chung-Lin Tang 2b8088e7c8 sh.c (output_stack_adjust): Remove !epilogue_p condition for generating REG_FRAME_RELATED_EXPR note.
2012-06-12  Chung-Lin Tang  <cltang@codesourcery.com>

	* config/sh/sh.c (output_stack_adjust): Remove !epilogue_p
	condition for generating REG_FRAME_RELATED_EXPR note.
	(pop): Add code for generating REG_CFA_RESTORE,
	REG_CFA_ADJUST_CFA notes. Set RTX_FRAME_RELATED_P to 1.
	(sh_expand_epilogue): Use frame_insn() for FP to SP move.
	Set 'frame_p' of calls to output_stack_adjust() to 'true'.

From-SVN: r188424
2012-06-12 06:11:09 +00:00
Sriraman Tallam 91fe5efbd2 libgcc-bsd.ver: Version symbol __cpu_indicator_init.
2012-06-11  Sriraman Tallam  <tmsriram@google.com>

	* config/i386/libgcc-bsd.ver: Version symbol __cpu_indicator_init.
	* config/i386/libgcc-sol2.ver: Ditto.
	* config/i386/libgcc-glibc.ver: Ditto.

	* gcc.target/i386/builtin_target.c (vendor_signatures): New enum.
	(check_intel_cpu_model): New function.
	(check_amd_cpu_model): New function.
	(check_features): New function.
	(__get_cpuid_output): New function.
	(check_detailed): New function.
	(fn1): Rename to quick_check.
	(main): Update to call quick_check and call check_detailed.

From-SVN: r188417
2012-06-12 02:55:20 +00:00
Richard Henderson 3db91d7e0b alpha.c (HWI_HEX2): Add missing shift.
* config/alpha/alpha.c (HWI_HEX2): Add missing shift.
        * vmsdbgout.c (VMS_EPOCH_OFFSET): Add LL suffix.

From-SVN: r188413
2012-06-11 18:00:39 -07:00
GCC Administrator fce7766425 Daily bump.
From-SVN: r188409
2012-06-12 00:19:26 +00:00
Richard Henderson 4522854abf * config/alpha/alpha.c (alpha_trampoline_init): Split large constants.
From-SVN: r188405
2012-06-11 16:03:14 -07:00
Hans-Peter Nilsson f938987f60 tm.texi.in (Addressing Modes): Mention that this hook needs to be defined for native TLS.
* doc/tm.texi.in (Addressing Modes) <TARGET_LEGITIMIZE_ADDRESS>:
	Mention that this hook needs to be defined for native TLS.
	* doc/tm.texi: Regenerate.

From-SVN: r188404
2012-06-11 22:46:45 +00:00
Mike Stump ede6c7341c emit-rtl.c (init_emit_once): Iterate through the MODE_PARTIAL_INT modes with MIN_MODE_PARTIAL_INT and...
* emit-rtl.c (init_emit_once): Iterate through the
	MODE_PARTIAL_INT modes with MIN_MODE_PARTIAL_INT and
	MAX_MODE_PARTIAL_INT, as GET_MODE_WIDER_MODE doesn't step through
	all the MIN_MODE_PARTIAL_INT modes anymore.

From-SVN: r188402
2012-06-11 21:46:55 +00:00
Maxim Kuvyrkov 8b007d75c3 * gcc/config/mips/mips-tables.opt (xlp): Fix merge typo.
From-SVN: r188401
2012-06-11 21:42:02 +00:00
Roland McGrath 67a218c536 gthr-posix.h [...] (__gthread_active_p): If __GLIBC__ is defined, refer to __pthread_key_create instead of pthread_cancel.
* gthr-posix.h [neither FreeBSD nor Solaris] (__gthread_active_p):
	If __GLIBC__ is defined, refer to __pthread_key_create instead of
	pthread_cancel.

From-SVN: r188400
2012-06-11 14:15:38 -07:00
Richard Henderson d3843c6726 * lib/target-supports.exp
(check_effective_target_sync_long_long_runtime): Use
        check_effective_target_lp64 instead of
        check_effective_target_powerpc64 for powerpc targets.

From-SVN: r188399
2012-06-11 13:48:30 -07:00
Roland McGrath a04739cb17 Roland McGrath <mcgrathr@google.com>
* dwarf2out.c (const_ok_for_output_1): Detect a TLS UNSPEC using
	SYMBOL_REF_TLS_MODEL rather than DECL_THREAD_LOCAL_P, in case it's
	not a VAR_DECL.  Also don't limit it to UNSPECs with exactly one
	operand.

From-SVN: r188398
2012-06-11 13:42:20 -07:00
Oleg Endo f9f472bd6a Fix ChangeLog formatting.
From-SVN: r188397
2012-06-11 19:33:14 +00:00
Oleg Endo 159b4b2f03 re PR target/53511 (SH Target: Add support for fma patterns)
PR target/53511
	* config/sh/sh.md (fmasf4): New expander.
	(*macsf3): Rename to fmasf4_i.  Adapt to fma pattern.
	(mac_media): Rename to fmasf4_media.  Adapt to fma pattern.
	* config/sh/sh.opt (mfused-madd): Remove.
	* config/sh/sh.c (sh_option_override): Remove mfused-madd handling.
	(builtin_description bdesc): Remove __builtin_sh_media_FMAC_S.
	* config.gcc (sh[123456789lbe]*-*-* | sh-*-*): Add fused-madd.opt
	as extra options.
	* doc/invoke.texi (SH Options): Update mfused-madd and mno-fused-madd
	descriptions.

	PR target/53511
	* gcc.target/sh/pr53511-1.c: New.

From-SVN: r188396
2012-06-11 19:24:20 +00:00
Richard Henderson bf27c43e07 * dwarf2cfi.c (scan_trace): Handle annulled branch-taken delay slots.
From-SVN: r188391
2012-06-11 11:04:25 -07:00
Olivier Hainque f35aed4938 Makefile.in (GNATLIBCFLAGS_FOR_C): Remove $(PIC_FLAG_FOR_TARGET).
* Makefile.in (GNATLIBCFLAGS_FOR_C): Remove $(PIC_FLAG_FOR_TARGET).
       (gnatlib-shared-default): Add $(PIC_FLAG_FOR_TARGET) to
       GNATLIBCFLAGS_FOR_C passed to gnatlib.
       (gnatlib-shared-win32): Likewise.
       (gnatlib-shared-darwin): Likewise.
       (gnatlib-shared-dual-win32): Pass PIC_FLAG_FOR_TARGET to 
       gnatlib-shared-win32.

       libada/
       * Makefile.in (GNATLIBCFLAGS_FOR_C): Remove $(PICFLAG).

From-SVN: r188390
2012-06-11 15:24:12 +00:00
Richard Biener 35981f1f3f Fixup ChangeLog
From-SVN: r188388
2012-06-11 14:22:01 +00:00
Richard Guenther e3b127e818 re PR debug/53470 (ICE when linking with -g in splice_child_die, at dwarf2out.c:4264)
2012-06-11  Richard Guenther  <rguenther@suse.de>

	PR middle-end/53470
	* tree.c (free_lang_data_in_type): Do not clear TYPE_CONTEXT but
	replace it with the first non-BLOCK context.

	* g++.dg/lto/pr53470_0.C: New testcase.
	* gcc.dg/lto/pr53470_0.c: Likewise.

From-SVN: r188387
2012-06-11 14:14:09 +00:00
Richard Guenther 5a20ffcb3a re PR c++/53605 (Compiler ICEs in size_binop_loc)
2012-06-11  Richard Guenther  <rguenther@suse.de>

	PR c++/53616
	* mangle.c (write_array_type): Use double-ints for array domain
	arithmetic.

	* g++.dg/ext/pr53605.C: New testcase.

From-SVN: r188386
2012-06-11 13:58:29 +00:00
Richard Guenther a95b3cc734 alias.c (aliases_everything_p): Remove.
2012-06-11  Richard Guenther  <rguenther@suse.de>

	* alias.c (aliases_everything_p): Remove.
	(DIFFERENT_ALIAS_SETS_P): Likewise.
	(true_dependence_1): Use mems_in_disjoint_alias_sets_p directly.
	Do not use aliases_everything_p or special-case ANDs.  Do not
	special-case BLKmode moves.
	(may_alias_p): Likewise.  Handle BLKmode similar like everywhere
	- for SCATCH only.

From-SVN: r188384
2012-06-11 10:04:23 +00:00
Eric Botcazou f54ee9801d decl.c (gnat_to_gnu_entity): Convert GNU_SIZE to units before invoking allocatable_size_p on it.
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Convert GNU_SIZE
	to units before invoking allocatable_size_p on it.
	Remove orphaned comment.  Do not use ssize_int.
	<E_Record_Subtype>: Traverse list in original order.  Minor tweak.
	(allocatable_size_p): Adjust and simplify.
	(build_subst_list): Use consistent terminology throughout.
	(build_variant_list): Likewise.  Traverse list in original order.
	(create_field_decl_from): Likewise.
	(copy_and_substitute_in_size): Likewise.
	(create_variant_part_from): Add comment about field list order.
	* gcc-interface/utils.c (build_vms_descriptor): Do not use ssize_int.
	* gcc-interface/utils2.c (build_allocator): Likewise.

From-SVN: r188382
2012-06-11 09:14:20 +00:00
Eric Botcazou e4270465dd trans.c (Identifier_to_gnu): Test Is_Elementary_Type instead of Is_Scalar_Type for a constant with an...
* gcc-interface/trans.c (Identifier_to_gnu): Test Is_Elementary_Type
	instead of Is_Scalar_Type for a constant with an address clause.
	Do not return the underlying constant for a constant used by reference
	if it holds the address of a constant and an lvalue is required.

From-SVN: r188380
2012-06-11 08:54:32 +00:00
Eric Botcazou 9083aacd09 decl.c (gnat_to_gnu_entity): Do not specifically deal with external constants wrt force_global here...
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not specifically deal
	with external constants wrt force_global here...
	<E_Constant>: ...but here instead.
	* gcc-interface/utils.c (gnat_pushdecl): Do not put external DECLs onto
	the list of global DECLs.

From-SVN: r188379
2012-06-11 08:34:44 +00:00
Eric Botcazou 9cbad0a362 decl.c (gnat_to_gnu_entity): Translate the Esize on entry only for elementary types and abort if it is too large.
* gcc-interface/decl.c (gnat_to_gnu_entity): Translate the Esize on
	entry only for elementary types and abort if it is too large.
	<E_Record_Type>: Make sure the Esize is known before using it.

From-SVN: r188378
2012-06-11 08:02:35 +00:00
GCC Administrator ebf780036e Daily bump.
From-SVN: r188375
2012-06-11 00:17:34 +00:00
GCC Administrator 5043693c68 Daily bump.
From-SVN: r188370
2012-06-10 00:17:20 +00:00
Hans-Peter Nilsson 2f352e3d30 Fix CRIS build errors with --enable-build-with-cxx.
* config/cris/cris.c (cris_emit_trap_for_misalignment): Rename
	variable "and" to "andop".
	* config/cris/sync.md ("atomic_fetch_<atomic_op_name><mode>"): Use
	temporary variable for memory model, passing C++-type-correct
	parameter type to expand_mem_thread_fence.
	("atomic_compare_and_swap<mode>"): Ditto.

From-SVN: r188362
2012-06-09 20:53:39 +00:00
Uros Bizjak 492fbea162 sfp-machine.h (__gcc_CMPtype, [...]): Move ...
* config/i386/32/sfp-machine.h (__gcc_CMPtype, CMPtype,
	_FP_KEEPNANFRACP, _FP_CHOOSENAN, FP_EX_INVALID, FP_EX_DENORM,
	FP_EX_DIVZERO, FP_EX_OVERFLOW, FP_EX_UNDERFLOW, FP_EX_INEXACT,
	FP_HANDLE_EXCEPTIONS, FP_RND_NEAREST, FP_RND_ZERO, FP_RND_PINF,
	FP_RND_MINF, _FP_DEXL_EX, FP_INIT_ROUNDMODE, FP_ROUNDMODE,
	__LITTLE_ENDIAN, __BIG_ENDIAN, strong_alias): Move ...
	* config/i386/64/sfp-machine: ... (delete here) ...
	* config/i386/sfp-machine.h: ... to here.
	(FP_EX_MASK): New.
	(__sfp_handle_exceptions): New function declaration.
	(FP_HANDLE_EXCEPTIONS): Use __sfp_handle_exceptions.
	* config/i386/sfp-exceptions.c: New.
	* config/i386/t-softfp: New.
	* config.host (i[34567]86-*-* and x86_64-*-* soft-fp targets): Add
	i386/t-softfp to tmake_file.

From-SVN: r188361
2012-06-09 19:32:27 +02:00
Richard Henderson 11a687e750 re PR c++/53602 (Libre Office causes an internal compiler error)
PR c++/53602
        * cfgcleanup.c (execute_jump): Rename from rest_of_handle_jump2.
        (pass_jump): Rename from pass_jump2.
        (execute_jump2, pass_jump2): New.
        * combine-stack-adj.c (rest_of_handle_stack_adjustments): Don't
        perform cfg cleanup here.  Move the test of PUSH_ROUNDING
        and ACCUMULATE_OUTGOING_ARGS test...
        (gate_handle_stack_adjustments): ... here.
        * passes.c (init_optimization_passes): Update for pass_jump2 rename.
        Place new pass_jump2 after pass_stack_adjustments.
        * tree-pass.h (pass_jump): Declare.

From-SVN: r188360
2012-06-09 09:27:52 -07:00
Kenneth Zadeck aef2b1d1f0 simplify-rtx.c (simplify_const_binary_operation): Fixed shift count trucation.
2012-06-09  Kenneth Zadeck <zadeck@naturalbridge.com>

	* simplify-rtx.c (simplify_const_binary_operation): Fixed shift
	count trucation.

From-SVN: r188359
2012-06-09 12:40:40 +00:00
Richard Henderson bca672f610 re PR c++/53602 (Libre Office causes an internal compiler error)
PR c++/53602

From-SVN: r188358
2012-06-08 23:18:38 -07:00
Richard Henderson 65c2e636b5 re PR c++/53602 (Libre Office causes an internal compiler error)
PR c++/53602
        * combine-stack-adj.c (force_move_args_size_note): Add ARGS_SIZE
        note to a clobber insn when no other insn is available.

From-SVN: r188357
2012-06-08 23:17:12 -07:00
GCC Administrator 5bf482f672 Daily bump.
From-SVN: r188354
2012-06-09 00:18:01 +00:00
Jakub Jelinek afd90490f9 Adjust last commit.
From-SVN: r188338
2012-06-08 20:52:32 +02:00
Jakub Jelinek c6133dbed2 dwarf2.def (DW_FORM_GNU_ref_alt, [...]): New forms.
* dwarf2.def (DW_FORM_GNU_ref_alt, DW_FORM_GNU_strp_alt): New
	forms.
	* dwarf2.h (enum dwarf_macro_record_type): Add
	DW_MACRO_GNU_define_indirect_alt, DW_MACRO_GNU_undef_indirect_alt
	and DW_MACRO_GNU_transparent_include_alt.

From-SVN: r188337
2012-06-08 20:48:46 +02:00
Georg-Johann Lay 102375cc16 avr.c (avr_case_values_threshold): Return 7.
* config/avr/avr.c (avr_case_values_threshold): Return 7.

From-SVN: r188336
2012-06-08 18:32:25 +00:00
Janus Weil 98cf47d1a5 re PR fortran/52552 ([OOP] ICE when trying to allocate non-allocatable object giving a dynamic type)
2012-06-08  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/52552
	* match.c (gfc_match_allocate): Modify order of checks. Change wording
	of error message. Remove FIXME note.
	* resolve.c (resolve_allocate_expr): Add a comment.

2012-06-08  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/52552
	* gfortran.dg/allocate_alloc_opt_1.f90: Modified.
	* gfortran.dg/allocate_class_1.f90: Modified.
	* gfortran.dg/allocate_with_typespec_4.f90: Modified.
	* gfortran.dg/allocate_class_2.f90: New.

From-SVN: r188335
2012-06-08 19:26:11 +02:00
Hans-Peter Nilsson ef0cd8fe8b Fix discrepancies in submitted patch vs.
Fix discrepancies in submitted patch vs. committed patch for CRIS
-march= fix change on 2012-05-31 and ditto typo ChangeLog.

From-SVN: r188324
2012-06-08 02:25:08 +00:00
GCC Administrator f53448204e Daily bump.
From-SVN: r188322
2012-06-08 00:18:06 +00:00
Hans-Peter Nilsson 8cb0d9b97f re PR middle-end/53535 (non-aligned memset on non-strict-alignment targets not optimized where aligned memset is)
PR middle-end/53535
	* gcc.dg/pr46647.c: xfail for cris-* and crisv32-*.

From-SVN: r188317
2012-06-07 20:44:01 +00:00
Thomas Koenig 1acbf7a1bf re PR fortran/52861 ((missed optimisation) missed transformation to memset with -O3)
2012-06-07  Thomas König  <tkoenig@gcc.gnu.org>

	PR fortran/52861
	* frontend-passes.c (optimize_assignment):  Don't set the
	length of an empty string for deferred-length character
	variables.

2012-06-07  Thomas König  <tkoenig@gcc.gnu.org>

	PR fortran/52861
	* gfortran.dg/string_assign_2.f90:  New test case.

From-SVN: r188305
2012-06-07 14:33:51 +00:00
Andreas Schwab 17c4f786f5 genhooks.c (main): Set progname.
* genhooks.c (main): Set progname.
(emit_documentation): Remove variable found_start, always bail out
when a place is missing.
* doc/tm.texi.in (C++ ABI): Add @hook
TARGET_CXX_DECL_MANGLING_CONTEXT.

From-SVN: r188302
2012-06-07 12:12:01 +00:00
Thomas Koenig 94d145bf5b re PR fortran/52861 ((missed optimisation) missed transformation to memset with -O3)
2012-06-07  Thomas König  <tkoenig@gcc.gnu.org>

	PR fortran/52861
	* frontend-passes (empty_string):  Add prototype.
	(optimize_assignment):  Set the length of an empty string
	constant to zero.

2012-06-07  Thomas König  <tkoenig@gcc.gnu.org>

	PR fortran/52861
	* gfortran.dg/string_assign_1.f90:  New test case.

From-SVN: r188300
2012-06-07 11:11:55 +00:00
Ian Lance Taylor d8a5e488d5 compiler: Fix taking address of field of local variable.
From-SVN: r188299
2012-06-07 08:06:08 +00:00
Jakub Jelinek 26127932dd re PR c/53580 (Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives)
PR middle-end/53580
	* omp-low.c (scan_omp): Change first argument to
	gimple_seq *, call walk_gimple_seq_mod instead of
	walk_gimple_seq.
	(scan_sharing_clauses, scan_omp_parallel, scan_omp_task,
	scan_omp_for, scan_omp_sections, scan_omp_single,
	execute_lower_omp): Adjust callers.
	(scan_omp_1_stmt): Likewise.  If check_omp_nesting_restrictions
	returns false, replace stmt with GIMPLE_NOP.
	(check_omp_nesting_restrictions): Instead of issuing warnings,
	issue errors and return false if any errors were reported.

	* gcc.dg/gomp/nesting-1.c: Expect errors rather than warnings.
	* gcc.dg/gomp/critical-4.c: Likewise.
	* gfortran.dg/gomp/appendix-a/a.35.1.f90: Likewise.
	* gfortran.dg/gomp/appendix-a/a.35.3.f90: Likewise.
	* gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise.
	* gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise.
	* c-c++-common/gomp/pr53580.c: New test.

	* testsuite/libgomp.c/pr26943-2.c: Remove #pragma omp barrier,
	use GOMP_barrier () call instead.
	* testsuite/libgomp.c/pr26943-3.c: Likewise.
	* testsuite/libgomp.c/pr26943-4.c: Likewise.
	* testsuite/libgomp.fortran/vla4.f90: Remove !$omp barrier,
	call GOMP_barrier instead.
	* testsuite/libgomp.fortran/vla5.f90: Likewise.

From-SVN: r188298
2012-06-07 08:36:55 +02:00
Ian Lance Taylor f3dbbfcedf runtime: Fix printing of names in stack dumps.
From-SVN: r188297
2012-06-07 06:34:52 +00:00
Ian Lance Taylor c59a4d0fa6 compiler: Fix unsafe.Sizeof for named structs with named struct fields.
From-SVN: r188295
2012-06-07 05:49:44 +00:00
Fabien Chêne cba0366cac re PR c++/51214 ([C++11] name lookup issue with c++11 enums)
gcc/testsuite/ChangeLog

2012-06-07  Fabien Chêne  <fabien@gcc.gnu.org>

	PR c++/51214
	* g++.dg/cpp0x/forw_enum11.C: New.

gcc/cp/ChangeLog

2012-06-07  Fabien Chêne  <fabien@gcc.gnu.org>

	PR c++/51214
	* cp-tree.h (insert_late_enum_def_into_classtype_sorted_fields):
	Declare.
	* class.c (insert_into_classtype_sorted_fields): New.
	(add_enum_fields_to_record_type): New.
	(count_fields): Adjust the comment.
	(add_fields_to_record_type): Likewise.
	(finish_struct_1): Move the code that inserts the fields for the
	sorted case, into insert_into_classtype_sorted_fields, and call
	it.
	(insert_late_enum_def_into_classtype_sorted_fields): Define.
	* decl.c (finish_enum_value_list): Call
	insert_late_enum_def_into_classtype_sorted_fields if a late enum
	definition is encountered.

From-SVN: r188294
2012-06-07 07:36:18 +02:00
Ian Lance Taylor 0d7afaa749 runtime: Use dl_iterate_phdr to get TLS size.
From-SVN: r188290
2012-06-07 00:55:20 +00:00