Commit Graph

107249 Commits

Author SHA1 Message Date
GCC Administrator
98aa09c6b1 Daily bump.
From-SVN: r171123
2011-03-18 00:18:53 +00:00
Anatoly Sokolov
24da2019e9 v850.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
* config/v850/v850.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
	* config/v850/v850-protos.h (v850_output_addr_const_extra): Remove.
	* config/v850/v850.c (v850_output_addr_const_extra): Make static.
	Change return type to bool.
	(TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.

From-SVN: r171117
2011-03-18 01:02:00 +03:00
Jason Merrill
c598e5fa54 re PR c++/47504 ([C++0x] some constexpr calculations erroneously overflow when using negative numbers)
PR c++/47504
	* semantics.c (cxx_eval_constant_expression) [NOP_EXPR]: Don't let
	the conversion set TREE_OVERFLOW.

From-SVN: r171116
2011-03-17 18:00:47 -04:00
Jakub Jelinek
8b29c87a61 re PR debug/48163 (ICEs for cris-elf, like gcc.c-torture/compile/calls.c gcc.c-torture/execute/complex-1.c)
PR debug/48163
	* var-tracking.c (prepare_call_arguments): If CALL target
	is a non-SYMBOL_REF CONSTANT_P, just add that into the list as
	pc instead of looking it up using cselib_lookup and use
	Pmode for it if x has VOIDmode.
	* dwarf2out.c (gen_subprogram_die): If also both first and
	second CONCAT arguments are VOIDmode, use mode of CONCAT itself.

From-SVN: r171114
2011-03-17 21:34:59 +01:00
Jakub Jelinek
a82ff31f39 re PR debug/48163 (ICEs for cris-elf, like gcc.c-torture/compile/calls.c gcc.c-torture/execute/complex-1.c)
PR debug/48163
	* function.c (assign_parms): For data.passed_pointer parms
	use MEM of data.entry_parm instead of data.entry_parm itself
	as DECL_INCOMING_RTL.
	* dwarf2out.c (rtl_for_decl_location): Use DECL_INCOMING_RTL
	also when passed and declared mode is the same, DECL_RTL
	is a MEM with pseudo as address and DECL_INCOMING_RTL is
	a MEM too.

From-SVN: r171113
2011-03-17 21:33:54 +01:00
Jeff Law
82ce305c0c re PR rtl-optimization/37273 (IRA does not re-materializes addresses (loads from the TOC))
PR rtl-optimization/37273
	* ira-costs.c (scan_one_insn): Detect constants living in memory and
	handle them like argument loads from stack slots.  Do not double
	count memory for memory constants and argument loads from stack slots.

From-SVN: r171111
2011-03-17 14:08:01 -06:00
Joseph Myers
3ade8456a1 * gcc.pot: Regenerate.
From-SVN: r171109
2011-03-17 19:57:48 +00:00
H.J. Lu
fe58e02b22 Check SUBREG in prepare_call_arguments.
2011-03-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR debug/48160
	* var-tracking.c (prepare_call_arguments): Check SUBREG.

From-SVN: r171108
2011-03-17 12:51:03 -07:00
H.J. Lu
6fc4dbc729 Add Save to -mavx and -mfma.
2011-03-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/48171
	* config/i386/i386.opt: Add Save to -mavx and -mfma.

From-SVN: r171107
2011-03-17 12:23:34 -07:00
Eric Botcazou
f230d7593b decl.c (elaborate_expression_1): Try harder to find out whether the expression is read-only.
* gcc-interface/decl.c (elaborate_expression_1): Try harder to find
	out whether the expression is read-only.  Short-circuit placeholder
	case and rename a couple of local variables.

From-SVN: r171106
2011-03-17 17:12:21 +00:00
Jason Merrill
c1e4152744 Core 1212
Core 1212
	* semantics.c (finish_decltype_type): Return T&& for xvalue.
	* typeck.c (unlowered_expr_type): Preserve cv-quals.

From-SVN: r171104
2011-03-17 12:20:16 -04:00
Jason Merrill
547206a4e5 re PR c++/48166 (ICE on static member function with invalid type qualifier)
PR c++/48166
	* decl.c (revert_static_member_fn): Strip function-cv-quals.

From-SVN: r171103
2011-03-17 12:02:08 -04:00
Jakub Jelinek
8054a38972 re PR bootstrap/48153 (Bootstrapping revision 171033 fails on x86_64-apple-darwin10)
PR bootstrap/48153
	* dwarf2out.c (mem_loc_descriptor) <case ENTRY_VALUE>: Return NULL
	if dwarf_strict.
	(gen_subprogram_die): Don't add call_site DIEs if dwarf_strict.
	Clear call_arg_locations and call_arg_loc_last always.

From-SVN: r171102
2011-03-17 16:22:20 +01:00
Jakub Jelinek
db3ed0b3b7 re PR middle-end/48152 (Bootstrap failure for x86_64-w64-mingw32 due ICE)
PR middle-end/48152
	* var-tracking.c (prepare_call_arguments): If argument needs to be
	passed by reference, adjust argtype and mode.

From-SVN: r171101
2011-03-17 16:21:39 +01:00
Richard Guenther
1bce4ff313 re PR tree-optimization/48134 (ICE: in refs_may_alias_p_1, at tree-ssa-alias.c:1085 with custom flags)
2011-03-17  Richard Guenther  <rguenther@suse.de>

	PR middle-end/48134
	* tree-ssa.c (insert_debug_temp_for_var_def): If we propagated
	a value make sure to fold the statement.

	* gcc.dg/pr48134.c: New testcase.

From-SVN: r171098
2011-03-17 14:59:00 +00:00
Chung-Lin Tang
7c71147df3 re PR target/43872 (VLAs are not aligned correctly on ARM)
2011-03-17  Chung-Lin Tang  <cltang@codesourcery.com>

	PR target/43872
	* config/arm/arm.c (arm_get_frame_offsets): Adjust early
	return condition with !cfun->calls_alloca.

From-SVN: r171096
2011-03-17 14:02:12 +00:00
Richard Guenther
0e1ee172e8 re PR bootstrap/48148 (LTO bootstrap failed with bootstrap-profiled)
2011-03-17  Richard Guenther  <rguenther@suse.de>

	PR bootstrap/48148
	* lto-cgraph.c (input_overwrite_node): Clear the abstract
	origin for decls in other ltrans units.
	(input_varpool_node): Likewise.

From-SVN: r171094
2011-03-17 13:25:23 +00:00
Richard Guenther
f8bce518af re PR tree-optimization/48165 (gcc-4.6: internal compiler error: in build2_stat)
2011-03-17  Richard Guenther  <rguenther@suse.de>

	PR middle-end/48165
	* tree-object-size.c (compute_object_offset): Properly return
	the offset operand of MEM_REFs as sizetype.

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

From-SVN: r171092
2011-03-17 13:19:01 +00:00
Eric Botcazou
bb1f792960 gigi.h (smaller_form_type_p): Declare.
* gcc-interface/gigi.h (smaller_form_type_p): Declare.
	* gcc-interface/trans.c (smaller_form_type_p): Make global and move...
	* gcc-interface/utils.c (smaller_form_type_p): ...to here.
	(convert): Deal with conversions from a smaller form type specially.

From-SVN: r171091
2011-03-17 12:37:53 +00:00
Jakub Jelinek
dabd47e701 re PR rtl-optimization/48141 (DSE compile time hog)
PR rtl-optimization/48141
	* params.def (PARAM_MAX_DSE_ACTIVE_LOCAL_STORES): New.
	* dse.c: Include params.h.
	(active_local_stores_len): New variable.
	(add_wild_read, dse_step1): Clear it when setting active_local_stores
	to NULL.
	(record_store, check_mem_read_rtx): Decrease it when removing
	from the chain.
	(scan_insn): Likewise.  Increase it when adding to chain, if it
	reaches PARAM_MAX_DSE_ACTIVE_LOCAL_STORES limit, set to 1 and
	set active_local_stores to NULL before the addition.
	* Makefile.in (dse.o): Depend on $(PARAMS_H).

From-SVN: r171090
2011-03-17 13:36:04 +01:00
Jakub Jelinek
1b6fa86002 re PR rtl-optimization/48141 (DSE compile time hog)
PR rtl-optimization/48141
	* dse.c (record_store): If no positions are needed in an insn
	that cannot be deleted, at least unchain it from active_local_stores.

	* gcc.dg/pr48141.c: New test.

From-SVN: r171089
2011-03-17 13:35:04 +01:00
Jason Merrill
cb21e9cdf7 re PR c++/48089 ([C++0x] ICE on in(?)valid in constexpr constructors)
PR c++/48089
	* semantics.c (potential_constant_expression_1): Don't allow *this
	in a constructor.
	(register_constexpr_fundef): Use potential_rvalue_constant_expression.

From-SVN: r171086
2011-03-16 22:36:29 -04:00
Jason Merrill
89ae3825aa re PR c++/47301 ([C++0x] ICE: in fold_convert_loc, at fold-const.c:1906 with -fabi-version=1 and constexpr)
PR c++/47301
	* decl.c (compute_array_index_type): Don't bother trying to deal
	with literal classes in ABI v1.

From-SVN: r171085
2011-03-16 22:36:20 -04:00
Jason Merrill
9f2a22d0b8 re PR c++/46336 ([C++0X] ICE on invalid: in register_constexpr_fundef, at cp/semantics.c:5571)
PR c++/46336
	* decl.c (duplicate_decls): Return NULL_TREE for clashing
	C functions.

From-SVN: r171084
2011-03-16 22:36:12 -04:00
Jason Merrill
3f7c745381 re PR c++/47570 ([C++0x] "one() >= 0" isn't constexpr for unsigned int, yet == and > is.)
PR c++/47570
	* semantics.c (cxx_eval_constant_expression) [COMPOUND_EXPR]: Don't
	use the generic binary expression handling.

From-SVN: r171083
2011-03-16 22:36:04 -04:00
GCC Administrator
ab958d7c81 Daily bump.
From-SVN: r171082
2011-03-17 00:18:12 +00:00
Ian Lance Taylor
7b5da51d4f Don't catch LIBPROF in Go code.
From-SVN: r171077
2011-03-16 23:18:40 +00:00
Ian Lance Taylor
5133f00ef8 Update to current version of Go library (revision 94d654be2064).
From-SVN: r171076
2011-03-16 23:05:44 +00:00
Diego Novillo
f617201f55 Make-lang.in (CXX_PARSER_H): New.
* Make-lang.in (CXX_PARSER_H): New.
	(cp/parser.o): Add dependency on CXX_PARSER_H.
	Add dependency on tree-pretty-print.h
	(cp/cp-lang.o): Add dependency on CXX_PARSER_H.
	* cp-lang.c: Include parser.h.
	* parser.c: Include parser.h.
	(struct cp_token): Add bitfield purged_p.
	Update all users.
	Move to parser.h.
	(CPP_PURGED): Remove.  Update all users.
	(struct cp_lexer): Change field buffer to be a VEC of cp_token.
	Remove field buffer_length.
	Update all users.
	Move to parser.h.
	(struct tree_check): Move to parser.h.
	(cp_token_position): Likewise.
	(struct cp_token_cache): Likewise.
	(CPP_KEYWORD): Likewise.
	(CPP_TEMPLATE_ID): Likewise.
	(CPP_NESTED_NAME_SPECIFIER): Likewise.
	(N_CP_TTYPES): Likewise.
	(enum cp_parser_status_kind): Likewise.
	(struct cp_parser_context): Likewise.
	(struct cp_default_arg_entry_d): Likewise.
	(struct cp_unparsed_functions_entry_d): Likewise.
	(struct cp_parser): Likewise.
	(cp_lexer_dump_tokens): New.
	(cp_lexer_debug_tokens): New.
	(cp_lexer_finished_p): New.
	(cp_lexer_alloc): Factor out of cp_lexer_new_main.
	(cp_lexer_new_main): Re-write main lexing loop to push
	tokens into the new VEC buffer.
	(cp_lexer_print_token): Improve printing of CPP_NUMBER tokens.
	Do not abort if the token type is not recognized, just print
	its code.
	* parser.h: New file.
	* config-lang.in (gtfiles): Add cp/parser.h.

From-SVN: r171075
2011-03-16 18:03:56 -04:00
Dodji Seketeli
7b5cb7d634 re PR debug/47510 (DW_TAG_typedef can have children when designating a naming typedef)
PR debug/47510

gcc/

	PR debug/47510
	* dwarf2out.c (strip_naming_typedef): Factorize out of ...
	(lookup_type_die_strip_naming_typedef): ... here.
	(get_context_die): Use it.
	(gen_typedef_die): Add a DW_AT_{,MIPS_}linkage_name attribute to
	the anonymous struct named by the naming typedef.

gcc/testsuite/

        PR debug/47510
	* g++.dg/debug/dwarf2/typedef6.C: New test.

From-SVN: r171073
2011-03-16 22:04:58 +01:00
Jason Merrill
532c679ea9 Core 1148
Core 1148
	* typeck.c (check_return_expr): Fix conditions for setting
	LOOKUP_PREFER_RVALUE.

From-SVN: r171071
2011-03-16 16:15:37 -04:00
Jason Merrill
e676810ed1 * call.c (build_over_call): Remove require_complete_type_sfinae call.
From-SVN: r171070
2011-03-16 16:15:24 -04:00
H.J. Lu
585e9d9de3 Check TARGET_ROUND for BUILT_IN_{FLOOR,CEIL,TRUNC,RINT}{,F} builtins.
2011-03-16  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/48154
	* config/i386/i386.c (ix86_builtin_vectorized_function): Check
	TARGET_ROUND for BUILT_IN_{FLOOR,CEIL,TRUNC,RINT}{,F} builtins.

From-SVN: r171069
2011-03-16 13:04:40 -07:00
Jason Merrill
0136dc743a re PR c++/48132 ([C++0x] Internal compiler error on array of std::complex with -std=c++0x)
PR c++/48132
	* decl.c (check_array_designated_initializer): Allow integer index.
	(reshape_init_array_1): Set index on the elements.

From-SVN: r171068
2011-03-16 16:04:06 -04:00
Jason Merrill
f8f122781f re PR c++/48113 ([C++0x] bind with tuple argument fails)
PR c++/48113
	* typeck.c (convert_for_initialization): Use
	perform_implicit_conversion_flags.
	* call.c (standard_conversion): If LOOKUP_PREFER_RVALUE, set
	rvaluedness_matches_p on ck_rvalue.
	(convert_like_real) [ck_rvalue]: And restore it here.

From-SVN: r171067
2011-03-16 16:03:56 -04:00
Jason Merrill
85a273bae4 re PR c++/48115 (internal compiler error: in type_has_nontrivial_copy_init, at cp/tree.c:2482)
PR c++/48115
	* call.c (convert_arg_to_ellipsis): Handle incomplete type.

From-SVN: r171066
2011-03-16 16:03:46 -04:00
Jack Howarth
51fd6b9057 re PR lto/48086 (bootstrap-lto creates c-common.s with too many sections on x86_64-apple-darwin10)
2011-03-16  Jack Howarth  <howarth@bromo.med.uc.edu>

	PR lto/48086
	* configure.ac: Re-enable LTO on *-apple-darwin9.
	* configure: Regenerate.

From-SVN: r171058
2011-03-16 18:19:12 +00:00
Francois-Xavier Coudert
de15ea9461 re PR libfortran/47883 (libgfortran configuration should use AC_LINK_IFELSE instead of AC_TRY_LINK)
PR libfortran/47883
	* acinclude.m4: Don't use AC_TRY_ macros.
	* configure.ac: Likewise.
	* configure: Regenerate.

From-SVN: r171056
2011-03-16 17:43:41 +00:00
Jeff Law
6261ab0ee6 tree-vrp.c (identify_jump_threads): Slightly simplify type check for operands of conditional.
* tree-vrp.c (identify_jump_threads): Slightly simplify type
 	check for operands of conditional.  Allow type to be a
 	pointer.
 
 
 	* gcc.dg/tree-ssa/vrp55.c: New test.

From-SVN: r171055
2011-03-16 11:32:58 -06:00
Jason Merrill
23d956f935 parser.c (cp_parser_abort_tentative_parse): Make sure we haven't committed to this tentative parse.
* parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
	committed to this tentative parse.

From-SVN: r171054
2011-03-16 13:04:41 -04:00
Jason Merrill
bb4586d388 re PR c++/47999 ([C++0x] auto type deduction works incorrectly in a function template)
PR c++/47999
	* semantics.c (finish_call_expr): Preserve reference semantics
	in templates.

From-SVN: r171053
2011-03-16 13:04:30 -04:00
Jason Merrill
a8d7041a30 * call.c (convert_default_arg): Use LOOKUP_IMPLICIT.
From-SVN: r171052
2011-03-16 13:00:13 -04:00
Richard Guenther
51cdce9ab6 vla-1.c (main): Use result of f1 to avoid optimizing it away if promoted to const.
2011-03-16  Richard Guenther  <rguenther@suse.de>

	* gcc.dg/guality/vla-1.c (main): Use result of f1 to avoid
	optimizing it away if promoted to const.

From-SVN: r171050
2011-03-16 16:51:35 +00:00
Benjamin Kosnik
4db6d7d79d gnu.ver: Add base destructors for stdexcept classes.
2011-03-16  Benjamin Kosnik  <bkoz@redhat.com>

	* config/abi/pre/gnu.ver: Add base destructors for stdexcept classes.
	* testsuite/19_diagnostics/stdexcept.cc: New.

From-SVN: r171049
2011-03-16 16:05:45 +00:00
Richard Guenther
0b0081eca4 re PR tree-optimization/48149 (Piecewise complex pass-through not optimized)
2011-03-16  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/48149
	* fold-const.c (fold_binary_loc): Fold
	COMPLEX_EXPR <REALPART_EXPR <x>, IMAGPART_EXPR <x>>.

	* gcc.dg/fold-complex-1.c: New testcase.

From-SVN: r171048
2011-03-16 15:55:48 +00:00
Richard Guenther
9977914ea5 re PR debug/48147 (New debug test failures)
2011-03-16  Richard Guenther  <rguenther@suse.de>

	PR testsuite/48147
	* gcc.dg/guality/pr45882.c: Really make sure no inlining
	or cloning happens.

From-SVN: r171047
2011-03-16 13:57:28 +00:00
Richard Guenther
64a3d6470e re PR middle-end/26134 (fold *(float*)(&complex_float_var) into REALPART_EXPR<complex_float_var>)
2011-03-16  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/26134
	* tree-ssa.c (maybe_rewrite_mem_ref_base): Handle rewriting
	complex part accesses to REALPART_EXPR and IMAGPART_EXPR.
	(non_rewritable_mem_ref_base): Handle complex type component
	accesses, constrain offsets for vector and complex extracts
	more properly.

	* gcc.dg/tree-ssa/complex-6.c: New testcase.

From-SVN: r171046
2011-03-16 13:53:09 +00:00
Richard Guenther
ef13324eca re PR c/48146 (ICE tree check: expected ssa_name, have var_decl in has_zero_uses, at tree-flow-inline.h:342)
2011-03-16  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/48146
	* tree-ssa-sink.c (sink_code_in_bb): Manually update virtual
	operands avoiding the need for renaming.

	* gcc.dg/torture/pr48146.c: New testcase.

From-SVN: r171045
2011-03-16 12:41:08 +00:00
Richard Guenther
f0eddb9019 gimple-fold.c (maybe_fold_reference): Open-code relevant constant folding.
2011-03-16  Richard Guenther  <rguenther@suse.de>

	* gimple-fold.c (maybe_fold_reference): Open-code relevant
	constant folding.  Move MEM_REF canonicalization first.
	Rely on fold_const_aggregate_ref for initializer folding.
	* tree-ssa-ccp.c (ccp_fold): Handle constant vector extracts.

	* gcc.dg/tree-ssa/pr14814.c: Adjust.
	* gcc.dg/tree-ssa/ssa-ccp-19.c: Likewise.

From-SVN: r171043
2011-03-16 11:36:30 +00:00
Jakub Jelinek
29f10e7178 re PR middle-end/48136 (verify_gimple failed at -O0)
PR middle-end/48136
	* fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Make sure
	arg0/arg1 or their arguments are always fold converted to matching
	types.

	* gcc.c-torture/compile/pr48136.c: New test.

From-SVN: r171041
2011-03-16 11:24:44 +01:00