Tobias Burnus [Sat, 14 May 2011 06:35:18 +0000 (08:35 +0200)]
re PR libfortran/48961 (EXECUTE_COMMAND_LINE(WAIT=.false.) fails on MinGW)
2011-05-14 Tobias Burnus <burnus@net-b.de>
PR fortran/48961
* intrinsics/execute_command_line.c (set_cmdstat): Don't abort if
synchronously executing with WAIT=.false.
(execute_command_line): Fix setting of cmdstat and exitstat.
Ian Lance Taylor [Fri, 13 May 2011 22:34:56 +0000 (22:34 +0000)]
Fix bug with multiple results returning structs with invalid sizes.
* go-gcc.cc (Gcc_backend::function_type): When building a struct
for multiple results, check that all fields types have a size.
(Gcc_backend::placeholder_pointer_type): Permit name to be empty.
Martin Jambor [Fri, 13 May 2011 22:01:59 +0000 (00:01 +0200)]
ipa-prop.c (ipa_cst_from_jfunc): New function.
2011-05-13 Martin Jambor <mjambor@suse.cz>
* ipa-prop.c (ipa_cst_from_jfunc): New function.
* ipa-prop.h (ipa_cst_from_jfunc): Declare.
* ipa-inline-analysis.c (evaluate_conditions_for_edge): Use it.
(evaluate_conditions_for_ipcp_clone): Removed.
(estimate_ipcp_clone_size_and_time): Accept vector of known constants.
* ipa-cp.c (ipcp_estimate_growth): Build vector of known constants.
* ipa-inline.h (estimate_ipcp_clone_size_and_time): Update.
* cfgrtl.c (cfg_layout_redirect_edge_and_branch): Adjust dump message.
* regcprop.c (copyprop_hardreg_forward): Test MAY_HAVE_DEBUG_INSNS in
lieu of MAY_HAVE_DEBUG_STMTS.
* tree-cfgcleanup.c (remove_forwarder_block): Do not attempt to move
debug statements if !MAY_HAVE_DEBUG_STMTS.
Tobias Burnus [Fri, 13 May 2011 18:16:37 +0000 (20:16 +0200)]
re PR fortran/48972 (OPEN with Unicode file name)
2011-05-12 Tobias Burnus <burnus@net-b.de>
PR fortran/48972
* io.c (resolve_tag_format, resolve_tag): Make sure
that the string is of default kind.
(gfc_resolve_inquire): Also resolve decimal tag.
Kai Tietz [Fri, 13 May 2011 13:37:16 +0000 (15:37 +0200)]
gimplify.c (gimplify_expr): Make sure operand is boolified.
2011-05-13 Kai Tietz <ktietz@redhat.com>
* gimplify.c (gimplify_expr): Make sure operand is boolified.
* tree-cfg.c (verify_gimple_assign_unary): Check for boolean
compatible type for TRUTH_NOT_EXPR.
Joseph Myers [Fri, 13 May 2011 09:59:13 +0000 (10:59 +0100)]
i386-opts.h: New.
* config/i386/i386-opts.h: New.
* gcc/config/i386/i386.c (stringop_alg, ix86_cmodel,
ix86_asm_dialect, ix86_regparm, ix86_abi, ix86_branch_cost,
ix86_section_threshold): Remove.
(ix86_handle_option): Move MAX_CODE_ALIGN define here. Handle
OPT_malign_loops_, OPT_malign_jumps_, OPT_malign_functions_ and
OPT_mbranch_cost_.
(ix86_option_override_internal): Don't decode strings for options
other than -march=, -mtune= and -mfpmath=. Don't allow for
__attribute__ uses in remaining diagnostics for options with
string arguments. Don't check for integer arguments being
negative.
* gcc/config/i386/i386.h (enum stringop_alg, enum calling_abi,
enum tls_dialect, enum cmodel, enum asm_dialect): Move to
i386-opts.h.
(ix86_abi, ix86_tls_dialect, ix86_cmodel, ix86_asm_dialect,
ix86_branch_cost, ix86_section_threshold): Remove.
* gcc/config/i386/i386.opt (config/i386/i386-opts.h): New
HeaderInclude.
(malign-functions=, malign-jumps=, malign-loops=): Use UInteger
but not Var.
(masm=): Use Enum and Init.
(asm_dialect): New Enum and EnumValue entries.
(mbranch-cost=): Use UInteger.
(mlarge-data-threshold=): Use UInteger and Init.
(mcmodel=): Use Enum and Init.
(cmodel): New Enum and EnumValue entries.
(mpc): Replace with separate mpc32, mpc64 and mpc80 entries.
(mpreferred-stack-boundary=, mincoming-stack-boundary=,
mregparm=): Use UInteger.
(mstringop-strategy=): Use Enum and Init.
(stringop_alg): New Enum and EnumValue entries.
(mtls-dialect=): Use Enum and Init.
(tls_dialect): New Enum and EnumValue entries.
(mabi=): Use Enum and Init.
(calling_abi): New Enum and EnumValue entries.
(mveclibabi=): Use Enum and Init.
(ix86_veclibabi): New Enum and EnumValue entries.
Kai Tietz [Fri, 13 May 2011 09:21:36 +0000 (11:21 +0200)]
re PR middle-end/48984 (Many testsuite failures)
2011-05-13 Kai Tietz <ktietz@redhat.com>
PR middle-end/48984
* gimplify.c (gimplify_expr): Check for boolean_type_node instead
for BOOLEAN_TYPE for TRUTH-NOT/AND/OR/XOR.
(gimple_boolify): Check for cast for boolean_type_node instead for
BOOLEAN_TYPE.
Richard Guenther [Fri, 13 May 2011 08:31:18 +0000 (08:31 +0000)]
re PR tree-optimization/48172 (incorrect vectorization of loop in GCC 4.5.* with -O3)
2011-05-13 Richard Guenther <rguenther@suse.de>
PR tree-optimization/48172
* tree-vect-loop-manip.c (vect_vfa_segment_size): Avoid
multiplying by number of iterations for equal step.
(vect_create_cond_for_alias_checks): Likewise.
Kai Tietz [Thu, 12 May 2011 18:19:07 +0000 (20:19 +0200)]
gimplify.c (gimple_boolify): Re-boolify expression arguments even if expression type is of kind BOOLEAN_TYPE.
2011-05-12 Kai Tietz <ktietz@redhat.com>
* gimplify.c (gimple_boolify): Re-boolify expression
arguments even if expression type is of kind BOOLEAN_TYPE.
(gimplify_boolean_expr): Removed.
(gimplify_expr): Boolify truth opcodes AND, ANDIF, OR, ORIF,
and XOR. Additional take care that we keep expression's type.
* tree-cfg.c (verify_gimple_assign_binary): Adjust check for type
of TRUTH_AND|OR|XOR_EXPR.
Jason Merrill [Thu, 12 May 2011 17:33:53 +0000 (13:33 -0400)]
cp-tree.h (DECL_DEFERRED_CONSTEXPR_CHECK): New.
* cp-tree.h (DECL_DEFERRED_CONSTEXPR_CHECK): New.
* semantics.c (validate_constexpr_fundecl): Set it.
(check_deferred_constexpr_decls): Clear it.
(register_constexpr_fundef): Make sure it isn't set.
* decl.c (grok_special_member_properties): Check it.
Eric Botcazou [Thu, 12 May 2011 14:54:09 +0000 (14:54 +0000)]
trans.c (call_to_gnu): In the by-reference case...
* gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
type of the parameter is an unconstrained array, convert the actual to
the type of the formal in the In Out and Out cases as well.
Richard Guenther [Thu, 12 May 2011 14:04:29 +0000 (14:04 +0000)]
gimple.c (gtc_visit): Compare TREE_ADDRESSABLE, handle NULLPTR_TYPE similar to VOID_TYPE.
2011-05-12 Richard Guenther <rguenther@suse.de>
* gimple.c (gtc_visit): Compare TREE_ADDRESSABLE, handle
NULLPTR_TYPE similar to VOID_TYPE. Defer type-leader lookup
until after simple checks.
(gimple_types_compatible_p): Likewise.
(iterative_hash_gimple_type): Always hash pointer targets
and function return and argument types.
(iterative_hash_canonical_type): Do not hash TYPE_QUALS,
hash TYPE_ALIGN. Do not hash TYPE_MIN/MAX_VALUE.
(gimple_canonical_types_compatible_p): Compare TREE_ADDRESSABLE,
handle NULLPTR_TYPE similar to VOID_TYPE. Handle non-aggregates
completely in the simple compare section.
(gimple_register_canonical_type): Query the cache again after
registering.
Richard Guenther [Thu, 12 May 2011 12:14:45 +0000 (12:14 +0000)]
re PR tree-optimization/48172 (incorrect vectorization of loop in GCC 4.5.* with -O3)
2011-05-12 Richard Guenther <rguenther@suse.de>
PR tree-optimization/48172
* tree-vect-loop-manip.c (vect_vfa_segment_size): Do not exclude
the number of iterations from the segment size calculation.
(vect_create_cond_for_alias_checks): Adjust.
DJ Delorie [Thu, 12 May 2011 10:33:57 +0000 (06:33 -0400)]
(rx_builtins): New arrays - holds builtin functions.
(ADD_RX_BUILTIN1, ADD_RX_BUILTIN2, ADD_RX_BUILTIN3): Install
created builtin into rx_builtins array.
(rx_builtin_decl): New function.
(TARGET_BUITLIN_DECL): Define.
Include gt-rx.h.
Co-Authored-By: Nick Clifton <nickc@redhat.com>
From-SVN: r173696
DJ Delorie [Thu, 12 May 2011 10:30:28 +0000 (06:30 -0400)]
rx.h (HAVE_PRE_DECREMENT): Fix typo.
* config/rx/rx.h (HAVE_PRE_DECREMENT): Fix typo.
* config/rx/rx.c (CC_FLAG_FP): Fix comment.
(rx_is_legitimate_address): Add pre-decrement and post-increment
addressing in HImode and QImode. Fix test for out of range
REG+INT addressing.
(rx_legitimate_constant_p): Rename ro rx_is_legitimate_constant.
(rx_align_for_label): Test label before extracting its usage
count.
(rx_adjust_insn_lengths): Fix selection of insn codes.
(TARGET_LEGITIMNATE_CONSTANT_P): Use renamed function.
Co-Authored-By: Nick Clifton <nickc@redhat.com>
From-SVN: r173695
Nathan Froyd [Wed, 11 May 2011 15:53:50 +0000 (15:53 +0000)]
don't use build_function_type in the Ada FE
don't use build_function_type in the Ada FE
* gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
call build_function_type_array or build_varargs_function_type_array
instead.
(create_subprog_type): Don't call build_function_type; call
build_function_type_vec instead.
Uros Bizjak [Wed, 11 May 2011 15:30:52 +0000 (17:30 +0200)]
i386.c (legitimize_tls_address): Call gen_tls_dynamic_gnu2_{32,64} expanders directly for TARGET_GNU2_TLS.
* config/i386/i386.c (legitimize_tls_address)
<TLS_MODEL_GLOBAL_DYNAMIC>: Call gen_tls_dynamic_gnu2_{32,64}
expanders directly for TARGET_GNU2_TLS. Determine pic and
__tls_get_addr symbol reference here. Update call to
gen_tls_global_dynamic_{32,64} for added arguments.
<TLS_MODEL_LOCAL_DYNAMIC>: Call gen_tls_dynamic_gnu2_{32,64}
expanders directly for TARGET_GNU2_TLS. Determine
__tls_get_addr symbol reference here. Update call to
gen_tls_local_dynamic_base_{32,64} for added arguments. Attach
unique UNSPEC REG_EQUIV to libcall block.
(ix86_tls_get_addr): Declare static.
* config/i386/i386-protos.h (ix86_tls_get_addr): Remove declaration.
* config/i386/i386.md (tls_global_dynamic_32): Add operand 2 and 3.
Do not determine pic and __tls_get_addr symbol reference here. Do not
call gen_tls_dynamic_gnu2_32 for TARGET_GNU2_TLS.
(tls_local_dynamic_base_32): Ditto for operands 1 and 2.
(tls_global_dynamic_64): Add operand 2. Do not determine
__tls_get_addr symbol reference here. Do not call
gen_tls_dynamic_gnu2_64 for TARGET_GNU2_TLS here.
(tls_local_dynamic_base64): Ditto for operand 1.
Richard Guenther [Wed, 11 May 2011 14:13:38 +0000 (14:13 +0000)]
re PR tree-optimization/15256 ([tree-ssa] Optimize manual bitfield manipilation.)
2011-05-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/15256
* tree-ssa-forwprop.c (simplify_bitwise_binary): Canonicalize
(A & B) | C, combine (A op CST1) op CST2.
(tree_ssa_forward_propagate_single_use_vars): Only bother to
visit assigns that have uses.
Nathan Froyd [Wed, 11 May 2011 13:48:55 +0000 (13:48 +0000)]
split tree_type
split tree_type
gcc/ada/
* gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
(TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
(TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
Jakub Jelinek [Wed, 11 May 2011 12:53:43 +0000 (14:53 +0200)]
re PR debug/48159 (ICE: SIGSEGV in build2_stat (tree.c:3802) with -ftree-loop-distribution -g)
PR debug/48159
* tree-ssa.c (reset_debug_uses): New function.
* tree-flow.h (reset_debug_uses): New prototype.
* tree-data-ref.c (stmts_from_loop): Ignore debug stmts.
* tree-loop-distribution.c (generate_loops_for_partition): Call
reset_debug_uses on the stmts that will be removed. Keep around
all debug stmts, don't count them as bits in partition bitmap.
(generate_builtin): Don't count debug stmts or labels as bits in
partition bitmap.
* gcc.dg/pr48159-1.c: New test.
* gcc.dg/pr48159-2.c: New test.
Richard Guenther [Wed, 11 May 2011 10:52:57 +0000 (10:52 +0000)]
re PR middle-end/18041 (OR of two single-bit bitfields is inefficient)
2011-05-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/18041
* tree-ssa-forwprop.c (simplify_bitwise_and): Rename to ...
(simplify_bitwise_binary): ... this. Handle operand conversions
by applying them to the result instead.
(tree_ssa_forward_propagate_single_use_vars): Adjust. CSE tree code.
Richard Guenther [Wed, 11 May 2011 08:36:51 +0000 (08:36 +0000)]
gimple.c (gimple_canonical_types_compatible_p): Split out from gimple_types_compatible_p and friends.
2011-05-11 Richard Guenther <rguenther@suse.de>
* gimple.c (gimple_canonical_types_compatible_p): Split out
from gimple_types_compatible_p and friends. Do not recurse
to pointed-to types.
(gimple_canonical_type_eq): Use it.
(iterative_hash_canonical_type): Split out from
iterative_hash_gimple_type and friends. Do not recurse
to pointed-to types.
(gimple_canonical_type_hash): Use it, allocate the hash here.
* class.c (check_for_override): Diagnose final on a nonvirtual
member function, diagnose override for a virtual with no matching
override. Don't fiddle around with DECL_VINDEX.
Nathan Froyd [Tue, 10 May 2011 17:23:31 +0000 (17:23 +0000)]
mark EXPR_PACK_EXPANSION as typed only
mark EXPR_PACK_EXPANSION as typed only
* cp-tree.def (EXPR_PACK_EXPANSION): Add an operand.
* cp-objcp-common.c (cp_common_init_ts): Mark it as TS_TYPED.
* cp-tree.h (PACK_EXPANSION_PARAMETER_PACKS): Use the new
operand of EXPR_PACK_EXPANSION.
(cp_tree_operand_length): Declare.
* tree.c (cp_tree_operand_length): Define.
(cp_tree_equal): Call it.
* pt.c (value_dependent_expr_P): Likewise.
* mangle.c (write_expression): Likewise.
Nathan Froyd [Tue, 10 May 2011 16:56:19 +0000 (16:56 +0000)]
use build_function_type less in c-family and LTO
use build_function_type less in c-family and LTO
gcc/c-family/
* c-common.c (def_fn_type): Don't call build_function_type, call
build_function_type_array or build_varargs_function_type_array
instead.
(c_common_nodes_and_builtins): Likewise.
Joseph Myers [Tue, 10 May 2011 14:46:34 +0000 (15:46 +0100)]
gcc_update (gcc/config/rs6000/rs6000-tables.opt): New dependencies.
contrib:
* gcc_update (gcc/config/rs6000/rs6000-tables.opt): New
dependencies.
gcc:
* config/rs6000/genopt.sh, config/rs6000/rs6000-cpus.def: New
files.
* config/rs6000/rs6000-tables.opt: New file (generated).
* config.gcc (powerpc*-*-*, rs6000*-*-*): Add
rs6000/rs6000-tables.opt to extra_options.
* config/rs6000/rs6000-opts.h (RS6000_CPU_OPTION_NATIVE): Define.
* config/rs6000/rs6000.c (rs6000_select): Remove.
(processor_target_table): Move contents to rs6000-cpus.def.
(darwin_rs6000_override_options): Check
global_options_set.x_rs6000_cpu_index instead of
rs6000_select[1].string.
(rs6000_option_override_internal): Likewise.
(rs6000_handle_option): Don't assert that global structures are in
use. Don't handle OPT_mcpu_ and OPT_mtune_ here.
(rs6000_default_cpu): New variable.
(rs6000_file_start): Set it instead of local default_cpu. Check
rs6000_default_cpu, global_options_set.x_rs6000_cpu_index and
global_options_set.x_rs6000_tune_index instead of rs6000_select.
(rs6000_darwin_file_start): Check rs6000_default_cpu and
global_options_set.x_rs6000_cpu_index instead of rs6000_select.
* config/rs6000/rs6000.h (struct rs6000_cpu_select,
rs6000_select): Remove.
* config/rs6000/rs6000.opt (rs6000_cpu_index, rs6000_tune_index):
Remove.
(mcpu=, mtune=): Use Var, Init, Enum and Save.
* config/rs6000/t-rs6000
($(srcdir)/config/rs6000/rs6000-tables.opt): New.
* config/rs6000/eabispe.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Check
global_options_set.x_rs6000_cpu_index instead of
rs6000_select[1].string.
* config/rs6000/linuxspe.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Check
global_options_set.x_rs6000_cpu_index instead of
rs6000_select[1].string.
Georg-Johann Lay [Tue, 10 May 2011 12:16:09 +0000 (12:16 +0000)]
re PR target/48896 (avr.o warnings)
PR target/48896
* config/avr/avr.c (avr_ret_register): Return unsigned int
instead of int.
(avr_function_value): Mark fn_decl_or_type as unused, don't pass
it to avr_libcall_value.
avr_expand_builtin): Use EXPAND_NORMAL as arg 4 in calls to
expand_expr.
(avr_expand_binop_builtin): Ditto.
(avr_expand_unop_builtin): Ditto.
DJ Delorie [Tue, 10 May 2011 11:01:49 +0000 (07:01 -0400)]
rx.h (JUMP_ALIGN, [...]): Define.
* config/rx/rx.h (JUMP_ALIGN, LABEL_ALIGN, LOOP_ALIGN): Define.
(LABEL_ALIGN_AFTER_BARRIER): Pass label to rx_align_for_label
* config/rx/rx.c (rx_align_for_label): Add label and
uses_threshold parameters. Do not align when the label is not
used enough.
* config/rx/rx-protos.h (rx_align_for_label): Update prototype.
Richard Guenther [Tue, 10 May 2011 09:57:50 +0000 (09:57 +0000)]
tree-ssa-forwprop.c (combine_conversions): Pattern-match a series of conversions and apply foldings similar to what...
2011-05-10 Richard Guenther <rguenther@suse.de>
* tree-ssa-forwprop.c (combine_conversions): Pattern-match
a series of conversions and apply foldings similar to what
fold-const does.
(tree_ssa_forward_propagate_single_use_vars): Call it.
Jakub Jelinek [Tue, 10 May 2011 06:08:18 +0000 (08:08 +0200)]
re PR tree-optimization/48611 (ICE: SIGSEGV in remap_eh_region_nr (tree-inline.c:1194) with -Os -fopenmp -fexceptions -fno-tree-ccp -fno-tree-copy-prop on basic code)
PR tree-optimization/48611
PR tree-optimization/48794
* tree-eh.c (remove_unreachable_handlers): Don't remove regions
referenced from RESX or EH_DISPATCH arguments.
* gfortran.dg/gomp/pr48611.f90: New test.
* gfortran.dg/gomp/pr48794.f90: New test.
Uros Bizjak [Mon, 9 May 2011 20:51:19 +0000 (22:51 +0200)]
i386.c (ix86_autovectorize_vector_sizes): Return 0 for !flag_prefer_avx128.
* config/i386/i386.c (ix86_autovectorize_vector_sizes): Return 0
for !flag_prefer_avx128.
(ix86_preferred_simd_mode): Return word_mode for DFmode without SSE2.