Commit Graph

114936 Commits

Author SHA1 Message Date
Andrey Belevantsev
3881dee9f0 re PR middle-end/51389 (GCC uses up to 75GB of virtual memory)
PR middle-end/51389
        * Makefile.in (tree-data-ref.o): Depend on $(PARAMS_H).
        * tree-data-ref.h (find_data_references_in_loop): Remove declaration.
        * tree-data-ref.c (find_data_references_in_loop): Make static.
        (compute_all_dependences): Change return type to bool.  Bail out
        for too many datarefs in a loop.  Move the hunk resetting the data
        dependences vector from ...
        (compute_data_dependences_for_loop): ... here.  Account for
        compute_all_dependences returning false.
        (compute_data_dependences_for_bb): Likewise.
        * params.def (PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS): New param.
        * doc/invoke.texi (loop-max-datarefs-for-datadeps): Document it.

From-SVN: r183624
2012-01-27 17:47:41 +04:00
Tobias Burnus
102344e274 re PR fortran/51970 ([OOP] gimplification failed for polymorphic MOVE_ALLOC)
2012-01-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/51970
        PR fortran/51977
        * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
        handle array spec for BT_CLASS.
        * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
        * frontend-passes.c (create_var): Ditto.
        * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
        * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
        instead of attr.pointer.
        (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
        * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
        * trans-stmt.c (trans_associate_var): Ask for the descriptor.

2012-01-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/51970
        PR fortran/51977
        * gfortran.dg/move_alloc_13.f90: New.

From-SVN: r183622
2012-01-27 14:08:52 +01:00
Tobias Burnus
4cb2a86715 re PR fortran/51953 ([F2008] Allow multiple allocate-objects in ALLOCATE with SOURCE=)
2012-01-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/51953
        * match.c (gfc_match_allocate): Allow more than allocate
        object with SOURCE=.

2012-01-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/51953
        * gfortran.dg/allocate_alloc_opt_13.f90: New.
        * gfortran.dg/allocate_alloc_opt_4.f90: Add -std=f2003
        and change dg-error string.

From-SVN: r183621
2012-01-27 14:06:13 +01:00
Tobias Burnus
9775a921e0 re PR fortran/52016 ([OOP] Polymorphism and elemental: missing diagnostic)
2012-01-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/52016
        * resolve.c (resolve_formal_arglist): Fix elemental
        constraint checks for polymorphic dummies.

2012-01-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/52016
        * gfortran.dg/elemental_args_check_5.f90: New.

From-SVN: r183620
2012-01-27 14:02:54 +01:00
Richard Guenther
45c8342998 re PR middle-end/51959 (ICE in set_mem_alias_set, at emit-rtl.c:1884)
2012-01-27  Richard Guenther  <rguenther@suse.de>

	PR middle-end/51959
	* expr.c (store_field): Use the alias-set of the scratch memory
	for storing to it.

	* g++.dg/torture/pr51959.C: New testcase.

From-SVN: r183616
2012-01-27 10:54:51 +00:00
Tom de Vries
10c7477699 re PR tree-optimization/51990 (ICE in copy_reference_ops_from_ref)
2012-01-27  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/51990
	* gcc.dg/pr51990.c: New test.
	* gcc.dg/pr51990-2.c: Same.

From-SVN: r183615
2012-01-27 10:38:34 +00:00
Tom de Vries
842679dc9f re PR tree-optimization/51990 (ICE in copy_reference_ops_from_ref)
2012-01-27  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/51990
	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle WITH_SIZE_EXPR.
	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Same.

From-SVN: r183614
2012-01-27 10:38:27 +00:00
Paul Thomas
4daa71b063 re PR fortran/48705 ([OOP] ALLOCATE with non-trivial SOURCE)
2012-01-27  Paul Thomas  <pault@gcc.gnu.org>
	    Tobias Burnus <burnus@gcc.gnu.org>

	PR fortran/48705
	PR fortran/51870
	PR fortran/51943
	PR fortran/51946
	* trans-array.c (gfc_array_init_size): Add two extra arguments
	to convey the dynamic element size of a calls object and to
	return the number of elements that have been allocated.
	(gfc_array_allocate): Add the same arguments and use them to
	call gfc_array_init_size.  Before the allocation dereference
	the data pointer, if necessary. Set the allocated array to zero
	if the class element size or expr3 are non-null.
	* trans-expr.c (gfc_conv_class_to_class): Give this function
	global scope.
	(get_class_array_ref): New function.
	(gfc_copy_class_to_class): New function.
	* trans-array.h : Update prototype for gfc_array_allocate.
	* trans-stmt.c (gfc_trans_allocate): For non-variable class
	STATUS expressions extract the class object and the dynamic
	element size. Use the latter to call gfc_array_allocate and
	the former for setting the vptr and, via
	gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
	* trans.h : Prototypes for gfc_get_class_array_ref,
	gfc_copy_class_to_class and gfc_conv_class_to_class.
  

2012-01-27  Paul Thomas  <pault@gcc.gnu.org>
	    Tobias Burnus <burnus@gcc.gnu.org>

	PR fortran/48705
	* gfortran.dg/class_allocate_11.f03: New.

	PR fortran/51870
	PR fortran/51943
	PR fortran/51946
	* gfortran.dg/class_allocate_7.f03: New.
	* gfortran.dg/class_allocate_8.f03: New.
	* gfortran.dg/class_allocate_9.f03: New.
	* gfortran.dg/class_allocate_10.f03: New.


Co-Authored-By: Tobias Burnus <burnus@gcc.gnu.org>

From-SVN: r183613
2012-01-27 10:05:56 +00:00
Eric Botcazou
46c91e4518 decl.c (gnat_to_gnu_entity): Do not set an alignment on fields of the RETURN type built for the CICO mechanism.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
	an alignment on fields of the RETURN type built for the CICO mechanism.

From-SVN: r183611
2012-01-27 09:50:17 +00:00
Eric Botcazou
16934bbf73 trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for a call to a function that returns an unconstrained...
* gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for
	a call to a function that returns an unconstrained type with default
	discriminant.  Similarly, avoid doing the conversion to the nominal

From-SVN: r183610
2012-01-27 09:44:27 +00:00
Eric Botcazou
5f2e59d44b ada-tree.h (DECL_ALIASED_P): New flag.
* gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
	* gcc-interface/decl.c (is_variable_size): Rename to...
	(type_has_variable_size): ...this.
	(adjust_packed): Adjust to above renaming.
	(gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
	(field_is_artificial): New predicate.
	(field_is_aliased): Likewise.
	(field_has_self_size): Likewise.
	(field_has_variable_size): Likewise.
	(components_to_record): Record information for the final layout during
	the first pass on fields.
	If there is an aliased field placed after a field whose length depends
	on discriminants, put all the fields of the latter sort, last.

From-SVN: r183609
2012-01-27 09:35:03 +00:00
Jakub Jelinek
ae25db4568 re PR debug/52001 (Huge compile-time regression with var-tracking)
PR debug/52001
	* var-tracking.c (reverse_op): Don't add any reverse operation
	if V already has any constant locations.

From-SVN: r183608
2012-01-27 10:26:48 +01:00
Eric Botcazou
1228a6a69b gigi.h (get_minimal_subprog_decl): Declare.
* gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
	* gcc-interface/decl.c (get_minimal_subprog_decl): New function.
	* gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
	Access-like attribute in a dispatch table if the subprogram is public.

From-SVN: r183607
2012-01-27 09:22:36 +00:00
Eric Botcazou
88a94e2bba gigi.h (create_label_decl): Adjust.
* gcc-interface/gigi.h (create_label_decl): Adjust.
	* gcc-interface/utils.c (create_label_decl): Add GNAT_NODE parameter
	and invoke gnat_pushdecl on it.  Remove obsolete settings.
	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Label>: Adjust call to
	create_label_decl.
	* gcc-interface/trans.c (gnat_to_gnu) <N_Null): Likewise.  Ignore the
	label for debugging purposes.

From-SVN: r183606
2012-01-27 09:12:14 +00:00
Eric Botcazou
6b318bf2bf decl.c (gnat_to_gnu_entity): For an aliased object with an unconstrained nominal subtype and if...
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
	object with an unconstrained nominal subtype and if optimization isn't
	enabled, create a special VAR_DECL for debugging purposes.

From-SVN: r183605
2012-01-27 08:53:38 +00:00
Eric Botcazou
a76358008e stack_usage1.adb: New test.
* gnat.dg/stack_usage1.adb: New test.
	* gnat.dg/stack_usage1_pkg.ad[sb]: New helper.

	* gcc.dg/pr44194-1.c: Remove superfluous include directive.
	* gcc.dg/pr44194-2.c: Likewise.

From-SVN: r183604
2012-01-27 08:36:31 +00:00
Sandra Loosemore
cb485fff38 invoke.texi: Correct usage of "command line" (noun) vs "command-line" (adjective) throughout.
2012-01-27  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* doc/invoke.texi: Correct usage of "command line" (noun)
	vs "command-line" (adjective) throughout.

From-SVN: r183603
2012-01-27 00:13:03 -05:00
Sandra Loosemore
e3bd34b856 invoke.texi (Language Independent Options): Move -Wcoverage-mismatch blurb from here....
2012-01-27  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* doc/invoke.texi (Language Independent Options): Move
	-Wcoverage-mismatch blurb from here....
	(Warning Options): ...to here.

From-SVN: r183602
2012-01-26 22:33:17 -05:00
Peter Bergner
b7c0a0d45d rs6000.c (rs6000_option_override_internal): Set rs6000_always_hint to false for 476.
* config/rs6000/rs6000.c (rs6000_option_override_internal):
	Set rs6000_always_hint to false for 476.

From-SVN: r183601
2012-01-26 20:45:51 -06:00
Benjamin Kosnik
56378d0ea2 configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Use -gdwarf-4 -g3 -O0.
2012-01-27  Benjamin Kosnik  <bkoz@redhat.com>
	    Matthias Klose  <doko@ubuntu.com>

	* configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Use -gdwarf-4 -g3 -O0.
	* configure.in: Regenerated.
	* src/Makefile.am (all-once, install-data-once): New rules.
	(all-local, install-data-local): Use them.
	(build-debug, install-debug): Tweak.
	* src/Makefile.in: Regenerate.

Co-Authored-By: Matthias Klose <doko@ubuntu.com>

From-SVN: r183599
2012-01-27 01:21:29 +00:00
GCC Administrator
7031e9dc17 Daily bump.
From-SVN: r183598
2012-01-27 00:19:08 +00:00
Paolo Carlini
6c1e7aa99c re PR c++/51370 (ICE with invalid template parameter)
/cp
2012-01-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51370
	* error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
	as TREE_OPERAND (t, 1).

/testsuite
2012-01-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51370
	* g++.dg/template/crash112.C: New.

From-SVN: r183593
2012-01-27 00:12:41 +00:00
Matthias Klose
2fda54bd15 gcc.c (add_sysrooted_prefix): Remove trailing dir separator from system root.
2012-01-27  Matthias Klose  <doko@ubuntu.com>

        * gcc.c (add_sysrooted_prefix): Remove trailing dir separator from
          system root.
        * incpath.c (add_standard_paths): Likewise.

From-SVN: r183591
2012-01-26 23:34:58 +00:00
Cary Coutant
3beac6b971 dwarf2.h (enum dwarf_form): Add Fission extensions.
* dwarf2.h (enum dwarf_form): Add Fission extensions.
	(enum dwarf_attribute): Likewise.

From-SVN: r183588
2012-01-26 14:58:11 -08:00
Richard Henderson
4c1fd0845e m68k: Convert to atomic_test_and_set.
* config/m68k/m68k.c (TARGET_ATOMIC_TEST_AND_SET_TRUEVAL): New.
        * config/m68k/sync.md (atomic_test_and_set): Rename from
        sync_test_and_setqi and adjust the operands.
        (atomic_test_and_set_1): Rename from sync_test_and_setqi_1
        and unconditionally enable.

From-SVN: r183585
2012-01-26 14:07:44 -08:00
Richard Henderson
5a843a13dc sparc: Fix atomic_test_and_set definition.
* config/sparc/sparc.c (TARGET_ATOMIC_TEST_AND_SET_TRUEVAL): New.
        * config/sparc/sync.md (atomic_test_and_set): Only handle QImode.
        (ldstub): Rename from ldstubqi.
        (ldstub<I24MODE>): Remove.

From-SVN: r183584
2012-01-26 14:04:54 -08:00
Richard Henderson
f10f496896 Update gcc.dg/atomic-flag.c test for non-boolean TAS targets.
* gcc.dg/atomic-flag.c: Adjust for __GCC_ATOMIC_TEST_AND_SET_TRUEVAL.

From-SVN: r183583
2012-01-26 14:01:17 -08:00
Richard Henderson
e29137fe36 libstdc++: Use __GCC_ATOMIC_TEST_AND_SET in atomic_flag.
* include/bits/atomic_base.h (__atomic_flag_base): Define _M_i
        based on the value of __GCC_ATOMIC_TEST_AND_SET_TRUEVAL.
        (ATOMIC_FLAG_INIT): Initialize with 0, not false.
        (atomic_flag::atomic_flag): Use __GCC_ATOMIC_TEST_AND_SET_TRUEVAL.

From-SVN: r183582
2012-01-26 13:50:52 -08:00
Richard Henderson
57c5ab1ba6 Define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL
* target.def (TARGET_ATOMIC_TEST_AND_SET_TRUEVAL): New.
        * c-cppbuiltin.c (cpp_atomic_builtins): Define
        __GCC_ATOMIC_TEST_AND_SET_TRUEVAL.
        * doc/tm.texi.in (TARGET_ATOMIC_TEST_AND_SET_TRUEVAL): Add doc hook.
        * doc/tm.texi: Rebuild.

From-SVN: r183581
2012-01-26 13:48:27 -08:00
Richard Henderson
15e73e0657 Use maybe_expand_insn in maybe_emit_atomic_test_and_set.
* optabs.c (gen_atomic_test_and_set): Remove default.
        (maybe_emit_atomic_test_and_set): Use maybe_expand_insn.

From-SVN: r183580
2012-01-26 13:17:27 -08:00
Ian Lance Taylor
13b6172204 compiler: Don't make type fns for private fields in other packages.
From-SVN: r183579
2012-01-26 21:06:06 +00:00
Ian Lance Taylor
e02ed81e1b libgo: Build stubs for some syscall functions not on older systems.
From-SVN: r183577
2012-01-26 20:24:01 +00:00
Andreas Krebbel
0c2f01020d reassoc_4.f: Use dg-additional-options.
2012-01-26  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* gfortran.dg/reassoc_4.f: Use dg-additional-options.

From-SVN: r183570
2012-01-26 16:49:21 +00:00
Jakub Jelinek
089dacc5ee re PR rtl-optimization/51978 (ext-elim-1.c ICE on powerpc64)
PR rtl-optimization/51978
	* ree.c (make_defs_and_copies_lists): Change set_pat type
	to const_rtx.
	(combine_reaching_defs): Likewise.
	(struct re_info): Remove.
	(add_removable_extension): Remove x and data arguments,
	add insn, insn_list and def_map.  Use the arguments directly
	instead of using struct re_info.
	(find_removable_extensions): Don't call add_removable_extension
	through note_stores, instead just call it with single_set
	result if non-NULL.
	(find_and_remove_re): Pass curr_cand->expr instead of
	PATTERN (curr_cand->insn) as set_pat argument to
	combine_reaching_defs.

From-SVN: r183567
2012-01-26 16:52:55 +01:00
Michael Matz
81bfd1977a re PR tree-optimization/46590 (long compile time with -O2 and many loops)
PR tree-optimization/46590
	* cfgexpand.c: Revert last change (r183305).
	* gimplify.c (gimplify_bind_expr): Add clobbers for all non-gimple
	regs.
	* tree-eh.c (cleanup_empty_eh): Try to optimize clobbers before
	checking for emptiness.

From-SVN: r183566
2012-01-26 15:50:33 +00:00
Jakub Jelinek
bfb676c121 make-relative-prefix.c (make_relative_prefix_1): Avoid warning about using preprocessor directives inside of macro arguments.
* make-relative-prefix.c (make_relative_prefix_1): Avoid warning
	about using preprocessor directives inside of macro arguments.

From-SVN: r183561
2012-01-26 15:26:25 +01:00
Jakub Jelinek
892123df86 re PR middle-end/51895 (ICE in simplify_subreg)
PR middle-end/51895
	* expr.c (expand_expr_real_1): Handle BLKmode MEM_REF of
	non-addressable non-BLKmode base correctly.

	* g++.dg/opt/pr51895.C: New test.

From-SVN: r183560
2012-01-26 15:09:29 +01:00
Michael Matz
1a47f99c0f re PR tree-optimization/48794 (ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop)
PR tree-optimization/48794
	* tree-eh.c (remove_unreachable_handlers_no_lp): Don't remove
	regions referenced from RESX/EH_DISPATCH.

testsuite/
	* gfortran.dg/gomp/pr48794-2.f90: New testcase.

From-SVN: r183559
2012-01-26 13:24:58 +00:00
Andreas Krebbel
c0a9d2a12e ssa-dom-thread-4.c: Set -mbranch-cost=2 for s390 and s390x.
2012-01-26  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* gcc.dg/ssa-dom-thread-4.c: Set -mbranch-cost=2 for s390 and
          s390x.

From-SVN: r183557
2012-01-26 11:51:03 +00:00
Jakub Jelinek
4bca22f3c2 re PR bootstrap/51985 (Bootstrap failure due to revision 183457)
PR bootstrap/51985
	* src/c++98/Makefile.am (libc__98_la_SOURCES,
	libc__98convenience_la_SOURCES): Remove $(inst_sources).
	* src/c++98/Makefile.in: Regenerated.

From-SVN: r183556
2012-01-26 11:55:12 +01:00
Andreas Krebbel
3d427cc1c8 s390.h: Make BRANCH_COST an option.
2012-01-26  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/s390.h: Make BRANCH_COST an option.
	* config/s390/s390.opt: New option -mbranch-cost.

2012-01-26  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* gcc.dg/pr46309.c: Set branch-cost to 2 for s390 and s390x.
	* gcc.dg/pr44194-1.c: Disable since s390 returns structs always in
	memory.
	* gfortran.dg/reassoc_4.f: Force max-completely-peeled-insns to
	the default value for s390 and s390x.

From-SVN: r183555
2012-01-26 10:04:43 +00:00
Ian Lance Taylor
2887732181 libgo/mksysinfo: Always define IPV6_TCLASS.
From-SVN: r183552
2012-01-26 05:43:42 +00:00
Ian Lance Taylor
70a3ffe8c7 libgo/mksysinfo: Correct typo.
From-SVN: r183549
2012-01-26 01:08:20 +00:00
GCC Administrator
ab093e5d34 Daily bump.
From-SVN: r183547
2012-01-26 00:18:57 +00:00
Ian Lance Taylor
e5a9c99718 Remove a couple of object files committed by accident.
From-SVN: r183542
2012-01-25 23:13:36 +00:00
Tobias Burnus
5cfa7039f3 re PR fortran/51995 ([OOP] Polymorphic class fails at runtime)
2012-01-25  Tobias Burnus  <burnus@net-b.de>

        PR fortran/51995
        * class.c (gfc_build_class_symbol): Fix invalid freeing
        issue with fclass->f2k_derived.

From-SVN: r183541
2012-01-25 23:21:14 +01:00
Ian Lance Taylor
af92e38566 libgo: Update to weekly.2012-01-20.
From-SVN: r183540
2012-01-25 21:54:22 +00:00
Ian Lance Taylor
df1304ee03 libgo: Update to weekly.2012-01-15.
From-SVN: r183539
2012-01-25 20:56:26 +00:00
Richard Henderson
3be18e47c3 Revert * trans-mem.c (requires_barrier): Do not instrument thread local
variables and emit save/restore for them.

From-SVN: r183538
2012-01-25 12:35:34 -08:00
Aldy Hernandez
dda6ecaea8 re PR lto/51698 ([trans-mem] TM runtime and application with LTO)
PR lto/51698
        * builtin-types.def: (BT_CONST_DOUBLE_PTR): New.
        (BT_FN_VOID_PTR_CONST_PTR_SIZE): New.
        (BT_FN_VOID_PTR_INT_SIZE): New.
        (BT_FN_UINT_UINT_VAR): Remove.
        (BT_FN_UINT32_UINT32_VAR): New.
        (BT_FN_DOUBLE_VPTR): Remove.
        (BT_FN_DOUBLE_CONST_DOUBLE_PTR): New.
        * gtm-builtins.def (_ITM_abortTransaction): Set return type to
        void.
        (_ITM_changeTransactionMode): Same.
        (_ITM_memmoveRtWt): Change return type to void.
        (_ITM_memcpyRtWt): Same.
        (_ITM_memsetW): Same.
        (_ITM_RaRD): Change types to double.
        (_ITM_RD): Same.
        (_ITM_RaWD): Same.
        (_ITM_RfWD): Same.
        * builtins.def (DEF_TM_BUILTIN): Set BOTH_P to true.
testsuite/
        PR lto/51698
        * gcc.dg/lto/trans-mem-4_0.c: New.
        * gcc.dg/lto/trans-mem-4_1.c: New.
        * gcc.dg/lto/trans-mem-2_0.c: Provide correct argument types for
        TM builtins.
        * gcc.dg/lto/trans-mem-1_0.c: Require stdint_types.
        * gcc.dg/lto/trans-mem-1_1.c: Provide correct argument types for
        TM builtins.
        * gcc.dg/lto/trans-mem-3_0.c: Require stdint_types.
        * gcc.dg/lto/trans-mem-3_1.c: Provide correct argument types for
        TM builtins.

From-SVN: r183537
2012-01-25 20:32:57 +00:00