libgcc:
* Makefile.in (cpu_type): Define.
* config.host (i[34567]86-*-rtems*): Handle it.
(i[34567]86-*-solaris2*): Move body ...
(*-*-solaris2*): ... here.
New case, generalize.
(sparc-*-elf*): Handle it.
(sparc-*-linux*, sparc64-*-linux*): Replace sparc/t-crtfm by t-crtfm.
(sparc-*-rtems*, sparc64-*-rtems*); Handle it.
(sparc64-*-solaris2*, sparcv9-*-solaris2*, sparc-*-solaris2*):
Fold into ...
(sparc*-*-solaris2*): ... this.
New case.
(sparc64-*-elf*): Handle it.
* config/gmon-sol2.c: Move from ../gcc/config/sparc.
Merge ../gcc/config/i386/gmon-sol2.c.
* config/i386/sol2-c1.S: Move from ../gcc/config/i386/sol2-c1.asm.
Use C comments.
Merge ../gcc/config/i386/sol2-gc1.asm.
* config/i386/sol2-ci.S: Move from ../gcc/config/i386/sol2-ci.asm.
Use C comments.
* config/i386/sol2-cn.S: Move from ../gcc/config/i386/sol2-cn.asm.
Use C comments.
* config/i386/t-crtfm (crtfastmath.o): Use $<.
* config/i386/t-crtstuff: New file.
* config/i386/t-softfp: New file.
* config/i386/t-sol2 ($(T)gmon.o, $(T)gcrt1.o, $(T)crt1.o),
$(T)crti.o, $(T)crtn.o): Remove.
(gcrt1.o): New rule.
(TARGET_LIBGCC2_CFLAGS): Remove.
* config/sparc/sol2-c1.S: Move from ../gcc/config/sparc/sol2-c1.asm.
* config/sparc/sol2-ci.S: Move from ../gcc/config/sparc/sol2-ci.asm.
* config/sparc/sol2-cn.S: Move from ../gcc/config/sparc/sol2-cn.asm.
* config/sparc/t-sol2: New file.
* config/sparc/t-crtfm: Move to ...
* config/t-crtfm: ... this.
Use $(cpu_type), $<.
* config/t-crtin: New file.
* config/sparc/t-softfp: New file.
* config/sparc/t-softmul: New file.
* config/t-rtems: New file.
* config/t-slibgcc: New file.
* config/t-slibgcc-elf-ver: New file.
* config/t-slibgcc-gld: New file.
* config/t-slibgcc-sld: New file.
* config/t-sol2: New file.
* configure.ac: Include ../config/lib-ld.m4.
Call AC_LIB_PROG_LD_GNU.
Substitute cpu_type.
* configure: Regenerate.
Martin Jambor [Wed, 1 Jun 2011 12:52:08 +0000 (14:52 +0200)]
ipa-utils.c (searchc_env): New field allow_overwritable.
2011-06-01 Martin Jambor <mjambor@suse.cz>
* ipa-utils.c (searchc_env): New field allow_overwritable.
(searchc): do not ignore edges to overwritable nodes if indicated
by env->allow_overwritable.
(ipa_reduced_postorder): Set env.allow_overwritable.
tree.c (free_lang_data): Do not reset boolean_type_node nor char_type_node.
2011-06-01 Richard Guenther <rguenther@suse.de>
* tree.c (free_lang_data): Do not reset boolean_type_node nor
char_type_node.
* lto-streamer.c (lto_record_common_node): Take node pointer,
do not register types.
(lto_preload_common_nodes): Explicitly skip preloading nodes
that differ between frontends.
lto/
* lto-lang.c (lto_register_canonical_types): New function.
(lto_init): Register common nodes with the canonical type machinery.
Do not play tricks with char_type_node.
Pat Haugen [Tue, 31 May 2011 20:47:37 +0000 (20:47 +0000)]
rs6000.c (rs6000_register_move_cost): Preserve from parameter value for dump.
* config/rs6000/rs6000.c (rs6000_register_move_cost): Preserve from
parameter value for dump. Dump cost on outermost call only.
(rs6000_memory_move_cost): Dump cost on outermost call only.
Jakub Jelinek [Tue, 31 May 2011 19:14:21 +0000 (21:14 +0200)]
cselib.c (promote_debug_loc): Allow l->next non-NULL for cselib_preserve_constants.
* cselib.c (promote_debug_loc): Allow l->next non-NULL for
cselib_preserve_constants.
(cselib_lookup_1): If cselib_preserve_constants,
a new VALUE is being created for REG and there is a VALUE for the
same register in wider mode, add another loc with lowpart SUBREG of
the wider VALUE.
(cselib_subst_to_values): Handle ENTRY_VALUE.
* var-tracking.c (replace_expr_with_values): Return NULL for
ENTRY_VALUE too.
* dwarf2out.c (convert_descriptor_to_signed): New function.
(mem_loc_descriptor) <case ZERO_EXTEND>: Optimize using DW_OP_and
instead of two shifts.
(mem_loc_descriptor) <do_shift>: ZERO_EXTEND second argument to
the right mode if needed.
(mem_loc_descriptor) <case MOD>: For typed ops just use DW_OP_mod.
(mem_loc_descriptor) <case UNSIGNED_FIX>: Use
convert_descriptor_to_signed.
(mem_loc_descriptor) <case UDIV, CLZ, CTZ, FFS, POPCOUNT, PARITY,
BSWAP, ROTATE, ROTATERT>: Handle these rtls.
* gcc.dg/guality/bswaptest.c: New test.
* gcc.dg/guality/clztest.c: New test.
* gcc.dg/guality/ctztest.c: New test.
* gcc.dg/guality/rotatetest.c: New test.
Fabien ChĂȘne [Tue, 31 May 2011 19:02:19 +0000 (21:02 +0200)]
re PR c++/48010 (typedef redefinitions are allowed if the redefined type is a nested class type)
gcc/cp/ChangeLog
2010-05-31 Fabien Chene <fabien@gcc.gnu.org>
PR c++/48010
* name-lookup.c (supplement_binding_1): If the old binding was a
type name, also check that the DECL actually refers to the same
type or is not a type.
Tobias Burnus [Tue, 31 May 2011 18:25:51 +0000 (20:25 +0200)]
re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])
2011-05-31 Tobias Burnus <burnus@net-b.de>
PR fortran/18918
* resolve.c (resolve_fl_variable): Handle static coarrays
with non-constant cobounds.
(resolve_symbol): Handle SAVE statement without arguments
for coarrays.
* trans-array.c (gfc_trans_array_cobounds): New function.
(gfc_trans_array_bounds): Place code by call to it.
* trans-array.h (gfc_trans_array_cobounds): New prototype.
* trans-decl.c (gfc_get_symbol_decl, gfc_trans_deferred_vars):
Handle static coarrays with nonconstant cobounds.
Uros Bizjak [Tue, 31 May 2011 17:43:04 +0000 (19:43 +0200)]
i386.md: Use SWI248x instead of X87MODEI...
* config/i386/i386.md: Use SWI248x instead of X87MODEI, SWI24 instead
of X87MODEI12 and SWI48x instead of SSEMODEI24.
(SWI248x): New mode iterator, rename from X87MODEI.
(X87MODEI): Remove mode iterator.
(X87MODEI12): Ditto.
(SSEMODEI24): Ditto.
Uros Bizjak [Tue, 31 May 2011 16:14:08 +0000 (18:14 +0200)]
i386.md (*movtf_internal): Avoid allocating general registers.
* config/i386/i386.md (*movtf_internal): Avoid allocating general
registers. Penalize F*r->o alternative to prevent partial memory
stalls. Slightly penalize *roF->*r alternative. Generate SSE
CONST_DOUBLE immediates when optimizing function for size. Do not move
CONST_DOUBLEs directly to memory for !TARGET_MEMORY_MISMATCH_STALL.
(*movxf_internal): Slightly penalize Yx*roF->Yx*r alternative.
(*movdf_internal): Slightly penalize Yd*roF->Yd*r alternative.
(*movdf_internal_rex64): Slightly penalize rm->r, F->m and r->m
alternatives.
(*movsf_internal): Slightly penalize rmF->r and Fr->m alternatives.
(fp_register_operand splitters): Use fp_register_operand
constraint. Do not use FP_REG_P in insn condition.
(any_fp_register_operand splitters): Use any_fp_register_operand
constraint. Do not use ANY_FP_REG_P in insn condition.
Jan Hubicka [Tue, 31 May 2011 14:58:49 +0000 (16:58 +0200)]
cgraph.h (cgraph_inline_failed_t): Give enum a name
* cgraph.h (cgraph_inline_failed_t): Give enum a name
* lto-cgraph.c (LDPR_NUM_KNOWN): New macro.
(LTO_cgraph_tags): Add LTO_cgraph_last_tag.
(lto_output_edge): Use output_enum and var_len_unsigned.
(lto_output_varpool_node): Likewise.
(input_overwrite_node): Do not take resolution parameter;
extract it from a bitpack.
(input_node): Do not read resolution; use input_enum and
var_len_unsigned.
(input_varpool_node): Likewise.
(input_edge): Likewise.
(input_cgraph_1): Likewise.
Paolo Carlini [Tue, 31 May 2011 12:50:31 +0000 (12:50 +0000)]
basic_string.h: Use noexcept per the FDIS (minus compare(const string&)...
2011-05-31 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/basic_string.h: Use noexcept per the FDIS (minus
compare(const string&), which uses char_traits::compare, which
isn't noexcept; also no noexcept in the move assignment operator
and move assign, see c++std-lib-30855).
* include/bits/basic_string.tcc: Likewise.
* include/ext/vstring.h: Likewise.
* include/ext/vstring.tcc: Likewise.
* include/debug/string: Likewise.
Jakub Jelinek [Tue, 31 May 2011 12:34:42 +0000 (14:34 +0200)]
re PR rtl-optimization/49235 (ICE: in int_mode_for_mode, at stor-layout.c:424 with -O -fno-delete-null-pointer-checks -fno-tree-scev-cprop -ftree-vectorize -fno-vect-cost-model)
PR rtl-optimization/49235
* tree-ssa-address.c (gen_addr_rtx): Ignore base if it is const0_rtx.
(create_mem_ref_raw): Create MEM_REF even if base is INTEGER_CST.
Richard Guenther [Tue, 31 May 2011 09:37:46 +0000 (09:37 +0000)]
tree-ssa-forwprop.c (forward_propagate_into_comparison): Rename to ...
2011-05-31 Richard Guenther <rguenther@suse.de>
* tree-ssa-forwprop.c (forward_propagate_into_comparison): Rename
to ...
(forward_propagate_into_comparison_1): ... this.
(forward_propagate_comparison): Rename to ...
(forward_propagate_into_comparison): ... this. Split out
real forward propagation code to ...
(forward_propagate_comparison): ... this.
(forward_propagate_into_gimple_cond): Remove looping.
(forward_propagate_into_cond): Likewise.
(simplify_not_neg_expr): Return whether we have done something.
(simplify_gimple_switch): Likewise.
(tree_ssa_forward_propagate_single_use_vars): Rename to ...
(ssa_forward_propagate_and_combine): ... this. Re-structure
to do a forward forward-propagation walk on BBs and a backward
stmt combining walk on BBs. Consistently re-scan changed
statements.
(pass_forwprop): Adjust.
Uros Bizjak [Mon, 30 May 2011 20:55:30 +0000 (22:55 +0200)]
i386.md (*movxf_internal): Penalize FYx*r->o alternative to prevent partial memory stalls.
* config/i386/i386.md (*movxf_internal): Penalize FYx*r->o alternative
to prevent partial memory stalls. Do not move CONST_DOUBLEs directly
to memory for !TARGET_MEMORY_MISMATCH_STALL.
(*movdf_internal_rex64): Do not penalize F->r alternative.
(*movdf_internal): Penalize FYd*r->o alternative to prevent partial
memory stalls. Generate SSE and x87 CONST_DOUBLE immediates only
when optimizing function for size. Do not move CONST_DOUBLEs
directly to memory for !TARGET_MEMORY_MISMATCH_STALL.
(FP move splitters): Merge {TF,XF,DF}mode move splitters. Do not
handle SUBREGs. Do not check for MEM_P operands in the insn condition,
check for ANY_FP_REGNO_P instead.
* config/i386/constraints.md (Yd): Enable GENERAL_REGS for
TARGET_64BIT and for TARGET_INTEGER_DFMODE_MOVES when optimizing
function for speed.
* config/i386/i386.c (ix86_option_override_internal): Do not
set TARGET_INTEGER_DFMODE_MOVES here.
* tree.h (struct tree_identifier): Inherit from tree_typed, not
tree_common.
(HT_IDENT_TO_GCC_IDENT): Adjust for said change.
* tree.c (initialize_tree_contains_struct): Mark TS_IDENTIFIER as
TS_BASE instead of TS_COMMON.
* varasm.c (assemble_name): Remove assert.
Jakub Jelinek [Mon, 30 May 2011 15:16:40 +0000 (15:16 +0000)]
var-tracking.c (vt_add_function_parameter): Remap incoming MEMs with crtl->args.internal_arg_pointer based address to...
* var-tracking.c (vt_add_function_parameter): Remap incoming MEMs with
crtl->args.internal_arg_pointer based address to arg_pointer_rtx if
there is a DRAP register and arg_pointer_rtx is the CFA pointer.
(vt_init_cfa_base): Don't equate cfa_base_rtx if stack was realigned.
(vt_initialize): Initialize cfa_base_rtx if there is a DRAP register.
Richard Guenther [Mon, 30 May 2011 13:12:23 +0000 (13:12 +0000)]
re PR middle-end/49210 (verify_gimple fails building ada/einfo.o at -O3)
2011-05-30 Richard Guenther <rguenther@suse.de>
PR tree-optimization/49210
* ipa-split.c (split_function): Care for the case where the
call result is not trivially convertible to the result holding
variable.
* gnat.dg/boolean_subtype2.adb: New testcase.
* gnat.dg/boolean_subtype2.ads: Likewise.
* gnat.dg/boolean_subtype2_pkg.ads: Likewise.
Jakub Jelinek [Mon, 30 May 2011 12:16:04 +0000 (14:16 +0200)]
re PR c++/49223 (Internal compiler error when using OpenMP)
PR c++/49223
* semantics.c (finish_omp_clauses): Call require_complete_type
even for copyin/copyprivate clauses. Only call
cxx_omp_create_clause_info if inner_type is COMPLETE_TYPE_P.
* g++.dg/gomp/pr49223-1.C: New test.
* g++.dg/gomp/pr49223-2.C: New test.
Richard Guenther [Mon, 30 May 2011 09:19:58 +0000 (09:19 +0000)]
tree-ssa-forwprop.c (forward_propagate_into_comparison): New function split out from ...
2011-05-30 Richard Guenther <rguenther@suse.de>
* tree-ssa-forwprop.c (forward_propagate_into_comparison):
New function split out from ...
(forward_propagate_into_gimple_cond): ... here. Adjust.
(forward_propagate_into_cond): Likewise.
(forward_propagate_comparison): Also propagate into
comparisons on assignment RHS. Change return value to
behave similar to forward_propagate_into_cond.
(tree_ssa_forward_propagate_single_use_vars): Handle
strict-overflow warnings properly for forward_propagate_comparison.
Ira Rosen [Mon, 30 May 2011 07:15:31 +0000 (07:15 +0000)]
re PR tree-optimization/49199 (ICE: in vect_create_epilog_for_reduction at tree-vect-loop.c:3445 with -O -fno-tree-scev-cprop -ftree-vectorize -funswitch-loops)
PR tree-optimization/49199
* tree-vect-loop.c (vect_is_slp_reduction): Check that the
non-reduction operands are either defined in the loop or
by induction.
Uros Bizjak [Sun, 29 May 2011 21:33:27 +0000 (23:33 +0200)]
i386.md (*movoi_internal_avx): Use standard_sse_constant_opcode for alternative 0.
* config/i386/i386.md (*movoi_internal_avx): Use
standard_sse_constant_opcode for alternative 0.
(*movti_internal_sse): Ditto.
(*movti_internal_rex64): Use standard_sse_constant_opcode for
alternative 2.
(*movdi_internal_rex64): Use standard_sse_constant_opcode for
sselog1 type moves.
(*movsi_internal): Ditto.
(*movdi_internal): Ditto. Add ssecvt type moves.
Jakub Jelinek [Sun, 29 May 2011 18:51:48 +0000 (20:51 +0200)]
re PR rtl-optimization/49095 (Horrible code generation for trivial decrement with test)
PR rtl-optimization/49095
* config/i386/predicates.md (plusminuslogic_operator): New predicate.
* config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0.
Thomas Koenig [Sun, 29 May 2011 18:41:00 +0000 (18:41 +0000)]
re PR fortran/45786 (Relational operators .eq. and == are not recognized as equivalent)
2011-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45786
* interface.c (gfc_equivalent_op): New function.
(gfc_check_interface): Use gfc_equivalent_op instead
of switch statement.
* decl.c (access_attr_decl): Also set access to an
equivalent operator.
2011-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45786
* gfortran.dg/operator_7.f90: New test case.
re PR target/43995 (internal compiler error: Segmentation fault on Mips64 crossbuild of ext2progs)
gcc/
PR target/43995
* config/mips/mips.c (mips_pic_call_symbol_from_set): Add a
recurse_p argument. Only follow register copies if it is set,
and prevent mips_find_pic_call_symbol from recursing.
(mips_find_pic_call_symbol): Add a recurse_p argument.
Pass it to mips_pic_call_symbol_from_set.
(mips_annotate_pic_calls): Update accordingly.
Jason Merrill [Sat, 28 May 2011 22:01:38 +0000 (18:01 -0400)]
re PR c++/46124 ([C++0x] ICE: tree check: expected var_decl or function_decl, have error_mark in cp_parser_lambda_declarator_opt, at cp/parser.c:7817 on invalid lambda function)