Commit Graph

105717 Commits

Author SHA1 Message Date
Ian Lance Taylor
a2c76d48b5 Rework handling of recursive function types.
From-SVN: r167898
2010-12-16 02:24:10 +00:00
Ian Lance Taylor
7892de0c05 Don't crash when copying a call with no arguments.
From-SVN: r167897
2010-12-16 01:47:10 +00:00
Jan Hubicka
f7480e3b79 re PR lto/46976 (FAIL: gcc.dg/lto/pr46940_0.c)
PR lto/46976
	* gcc.dg/lto/pr46940_0.c: Fix commit.

From-SVN: r167896
2010-12-16 01:47:08 +00:00
Nathan Froyd
782d1c333f re PR c++/39859 (duplicated and unhelpful error for "c:n" (parser))
gcc/cp/
	PR c++/39859
	PR c++/44522
	PR c++/44523
	* parser.c (struct cp_parser): Add colon_corrects_to_scope_p field.
	(cp_parser_new): Initialize it.
	(cp_parser_nested_name_specifier_opt): Auto-correct colons to
	scopes if we are able to.
	(cp_parser_question_colon_clause): Disallow colon correction.
	(cp_parser_label_for_labeled_statement): Likewise.
	(cp_parser_range_for): Likewise.
	(cp_parser_enum_specifier): Likewise.
	(cp_parser_class_head): Likewise.
	(cp_parser_member_declaration): Likewise.

gcc/testsuite/
	PR c++/39859
	PR c++/44522
	PR c++/44523
	* g++.dg/parse/colon-autocorrect-1.C: New testcase.
	* g++.dg/parse/colon-autocorrect-2.C: New testcase.

From-SVN: r167895
2010-12-16 01:36:09 +00:00
Nathan Froyd
b2d49fe5aa re PR c++/46852 (ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in cp_parser_class_specifier, at cp/parser.c:16947)
gcc/cp/
	PR c++/46852
	* parser.c (cp_parser_class_specifier): Check for TYPE_P.

gcc/testsuite/
	PR c++/46852
	* g++.dg/pr46852.C: New test.

From-SVN: r167894
2010-12-16 01:33:03 +00:00
Jan Hubicka
5210bbc5aa re PR tree-optimization/46939 (http://blog.regehr.org/archives/320 example 6)
PR middle-end/46939
	* predic.c (predict_paths_leading_to_edge): New function.
	(apply_return_prediction): Use it.
	(predict_paths_for_bb): Do not special case abnormals.
	* gcc.target/i386/pr46939.c: New testcase.

From-SVN: r167893
2010-12-16 01:27:23 +00:00
Ian Lance Taylor
7a2d845d3e Don't crash on invalid tuple assignment.
From-SVN: r167892
2010-12-16 01:26:35 +00:00
Ian Lance Taylor
faff9b0430 Check for errors from Gogo::call_builtin.
From-SVN: r167891
2010-12-16 00:44:14 +00:00
GCC Administrator
0c5be64e9a Daily bump.
From-SVN: r167890
2010-12-16 00:17:16 +00:00
Ian Lance Taylor
4955456b2d Don't crash with go or defer of bad call.
From-SVN: r167886
2010-12-16 00:15:16 +00:00
Joseph Myers
183d062a77 config.gcc (powerpc-*-lynxos*): Don't add lynx.opt to extra_options twice.
* config.gcc (powerpc-*-lynxos*): Don't add lynx.opt to
	extra_options twice.

From-SVN: r167885
2010-12-16 00:04:17 +00:00
Ian Lance Taylor
cf15c41988 Don't crash on Sizeof of undefined type.
From-SVN: r167884
2010-12-16 00:02:33 +00:00
Ian Lance Taylor
70749e9cbe Don't crash on Sizeof of undefined type.
From-SVN: r167883
2010-12-15 23:56:51 +00:00
Ian Lance Taylor
e495c1360d Don't crash on tuple initialization from erroneous channel.
From-SVN: r167882
2010-12-15 23:50:02 +00:00
Ian Lance Taylor
81ef977e9e Don't crash on empty struct created due to recursive reference.
From-SVN: r167881
2010-12-15 23:40:15 +00:00
Joseph Myers
bd9c1f8f18 tm.texi.in (US_SOFTWARE_GOFAST): Don't document.
* doc/tm.texi.in (US_SOFTWARE_GOFAST): Don't document.
	* doc/tm.texi: Regenerate.
	* system.h (US_SOFTWARE_GOFAST): Poison.
	* config.gcc (enable_gofast): Don't handle.
	* config/gofast.h: Remove.
	* config/mips/t-gofast: Remove.
	* config/fp-bit.c (US_SOFTWARE_GOFAST): Don't handle.
	* config/fp-bit.h (US_SOFTWARE_GOFAST): Don't handle.
	* config/mips/elforion.h: Don't mention GOFAST in comment.
	* config/mips/mips.c: Don't include gofast.h.
	(mips_init_libfuncs): Don't call gofast_maybe_init_libfuncs.
	* config/mips/t-sr71k (dp-bit.c, fp-bit.c): Don't define
	US_SOFTWARE_GOFAST.
	* config/sparc/sparc.c: Don't include gofast.h.
	(sparc_init_libfuncs): Don't call gofast_maybe_init_libfuncs.
	* config/spu/t-spu-elf (dp-bit.c, fp-bit.c): Don't undefine
	US_SOFTWARE_GOFAST.

From-SVN: r167880
2010-12-15 22:55:53 +00:00
Ian Lance Taylor
73487f1ebc Tweak handling of invalid function signature for function literal.
From-SVN: r167879
2010-12-15 22:42:30 +00:00
Ian Lance Taylor
97d2b65862 Check for pointer to error type when looking for method.
From-SVN: r167878
2010-12-15 22:32:03 +00:00
Ian Lance Taylor
5b26ad5542 Permit _ as a result variable name.
From-SVN: r167877
2010-12-15 22:08:44 +00:00
Sebastian Pop
354bc607c1 Add testcase for PR46404.
2010-12-15  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/46404
	* gcc.dg/graphite/pr46404.c: New.

From-SVN: r167876
2010-12-15 22:00:59 +00:00
Ian Lance Taylor
f4ba233240 Fix test for invalid type in anonymous field.
From-SVN: r167875
2010-12-15 21:50:51 +00:00
Ian Lance Taylor
3870e7a5da Add statements to type switch even if there are no valid types.
From-SVN: r167874
2010-12-15 21:39:40 +00:00
Ian Lance Taylor
89ca9e6020 Check errors in binary comparisons and builtin calls.
From-SVN: r167872
2010-12-15 20:35:57 +00:00
Jakub Jelinek
79cae72e5d re PR fortran/46945 (gfortran.dg/unpack_zerosize_1.f90 FAILs with -ftree-vrp -fno-tree-ccp -fno-tree-fre)
PR fortran/46945
	* trans-array.c (gfc_array_init_size): Perform stride overflow
	checking and multiplication by element_size in size_type_node instead
	of sizetype, return value with size_type_node type instead of
	sometimes with sizetype and sometimes with gfc_array_index_type.

	* gfortran.dg/pr46945.f90: New test.

From-SVN: r167871
2010-12-15 21:20:10 +01:00
Ian Lance Taylor
50ba28bb63 Push hash table identity check down to subtypes.
From-SVN: r167870
2010-12-15 19:47:44 +00:00
Nicola Pero
53f672caaa In libobjc/: 2010-12-15 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-15  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc/message.h (objc_super): When using the modern API, do not
	define Super and Super_t, and always use 'super_class' for the
	super class field.	
	(objc_msg_lookup_super): Updated prototype to use 'struct
	objc_super *' instead of 'Super_t'.
	* sendmsg.c (objc_msg_lookup_super): Updated prototype to use
	'struct objc_super *' instead of 'Super_t'.

From-SVN: r167869
2010-12-15 19:47:18 +00:00
Ian Lance Taylor
2a3b37c3b9 Use a different identity function for Types in hash tables.
From-SVN: r167866
2010-12-15 18:33:34 +00:00
Jakub Jelinek
140806fa55 re PR debug/46815 (Invalid DW_AT_location for a retval instance of a class that has a virtual function)
PR debug/46815
	* cp-gimplify.c (cp_genericize): When changing RESULT_DECL
	into invisible reference, change also DECL_VALUE_EXPR of
	NRV optimized variable.

	* g++.dg/guality/pr46815.C: New test.

From-SVN: r167865
2010-12-15 18:50:34 +01:00
Nicola Pero
db1792ee33 In libobjc/: 2010-12-15 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-15  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc/message.h: Update comments, reindented code and moved
	deprecated types and functions at the end of the file.  No code
	changes.

From-SVN: r167864
2010-12-15 17:43:01 +00:00
Janne Blomqvist
bd085c2093 Better error message for malloc() failure
From-SVN: r167863
2010-12-15 19:42:09 +02:00
Paolo Carlini
272dc85143 re PR c++/42083 ([C++0x] ICE on invalid with "tree check: expected aggr_init_expr, have error_mark in build_value_init")
/cp
2010-12-15  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/42083
	* init.c (build_value_init): Check build_special_member_call return
	value for error_mark_node.

/testsuite
2010-12-15  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/42083
	* g++.dg/cpp0x/lambda/lambda-ice2.C: New.

From-SVN: r167862
2010-12-15 17:35:04 +00:00
Janne Blomqvist
da17cbb79b PR 28105 Remove size<0 checks before calling malloc/realloc
From-SVN: r167860
2010-12-15 19:15:25 +02:00
Rainer Orth
be3ea0c8c9 Revert last change.
From-SVN: r167859
2010-12-15 16:56:26 +00:00
Jan Hubicka
b121d18c5e tree.c (get_file_function_name): Avoid using random seed on GLOBAL_sub_I and GLOBAL_sub_D.
* tree.c (get_file_function_name): Avoid using random seed on GLOBAL_sub_I
	and GLOBAL_sub_D.

From-SVN: r167858
2010-12-15 15:34:36 +00:00
H.J. Lu
740a2a0237 Correct PR number in gfortran.dg/debug/pr46756.f.
2010-12-15  H.J. Lu  <hongjiu.lu@intel.com>

	* gfortran.dg/debug/pr46756.f: Correct PR number.

From-SVN: r167857
2010-12-15 07:16:31 -08:00
H.J. Lu
e439f469a2 Move gfortran.dg/debug/pr46576.f to gfortran.dg/debug/pr46756.f.
From-SVN: r167856
2010-12-15 07:14:44 -08:00
Martin Jambor
ceeffab0ba re PR tree-optimization/46053 (g++.dg/torture/pr45699.C FAILs with -fno-early-inlining)
2010-12-15  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/46053
	PR middle-end/46287
	PR middle-end/46242
	* cgraph.h (cgraph_indirect_call_info): New field thunk_delta.
	* gimple.h (gimple_fold_obj_type_ref): Declaration removed.
	(gimple_fold_call): Declare.
	(gimple_adjust_this_by_delta): Likewise.
	* cgraph.c (cgraph_make_edge_direct): New parameter delta.  Updated
	all users.
	(cgraph_clone_edge): Create a copy of indirect_info also for direct
	edges.
	* cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Adjust this
	parameters.
	* gimple-fold.c (gimple_fold_obj_type_ref_known_binfo): Renamed to
	gimple_get_virt_mehtod_for_binfo, new parameter delta.  Do not search
	through thunks, in fact bail out if we encounter one, check that
	BINFO_VIRTUALS is not NULL.
	(gimple_adjust_this_by_delta): New function.
	(gimple_fold_obj_type_ref): Removed.
	(gimple_fold_obj_type_ref_call): New function.
	(fold_gimple_call): Renamed to gimple_fold_call, made external.
	Updated users.  Call gimple_fold_obj_type_ref_call instead of
	gimple_fold_obj_type_ref.
	* ipa-cp.c (ipcp_process_devirtualization_opportunities): Process
	thunk deltas.
	(ipcp_discover_new_direct_edges): Likewise.
	* ipa-prop.c (ipa_make_edge_direct_to_target): New parameter delta.
	Updated callers.
	(ipa_write_indirect_edge_info): Stream thunk_delta.
	(ipa_read_indirect_edge_info): Likewise.
	* tree-ssa-ccp.c (ccp_fold_stmt): Use gimple_fold_call instead of
	gimple_fold_obj_type_ref.

	* testsuite/g++.dg/ipa/pr46053.C: New test.
	* testsuite/g++.dg/ipa/pr46287-1.C: Likewise.
	* testsuite/g++.dg/ipa/pr46287-2.C: Likewise.
	* testsuite/g++.dg/ipa/pr46287-3.C: Likewise.
	* testsuite/g++.dg/torture/covariant-1.C: Likewise.
	* testsuite/g++.dg/torture/pr46287.C: Likewise.

From-SVN: r167855
2010-12-15 14:19:46 +01:00
Alexander Monakov
9d0dcda15c re PR rtl-optimization/46649 (ICE: in move_bb_info, at sel-sched-ir.c:5080 with -fschedule-insns -fselective-scheduling)
PR rtl-optimization/46649
	* sel-sched-ir.c (purge_empty_blocks): Unconditionally skip the first
	basic block in the region.

testsuite:
	* g++.dg/opt/pr46649.C: New.

From-SVN: r167854
2010-12-15 16:08:41 +03:00
Paolo Carlini
3ca4d07dff vstring.h (operator+(__versa_string<>&&, const __versa_string<>&), [...]): Add.
2010-12-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/vstring.h (operator+(__versa_string<>&&,
	const __versa_string<>&), operator+(const __versa_string<>&,
	__versa_string<>&&), operator+(__versa_string<>&&,
	__versa_string<>&&), operator+(const _CharT*,
	__versa_string<>&&), operator+(_CharT, __versa_string<>&&),
	operator+(__versa_string<>&&, const _CharT*),
	operator+(__versa_string<>&&, _CharT)): Add.
	* testsuite/ext/vstring/operators/1.cc: New.

From-SVN: r167853
2010-12-15 12:59:05 +00:00
Joseph Myers
5519175f4c stormy16.h (LINK_SPEC, WCHAR_TYPE): Define.
* config/stormy16/stormy16.h (LINK_SPEC, WCHAR_TYPE): Define.
	* config.gcc (xstormy16-*-elf): Don't use svr4.h.

From-SVN: r167852
2010-12-15 12:55:45 +00:00
Joseph Myers
9cce57f741 rx.h (WCHAR_TYPE, [...]): Define.
* config/rx/rx.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Define.
	* config.gcc (rx-*-elf*): Don't use svr4.h.

From-SVN: r167851
2010-12-15 12:54:46 +00:00
Rainer Orth
dd8587d668 Makefile.am (liblto_plugin_la_DEPENDENCIES): Define.
* Makefile.am (liblto_plugin_la_DEPENDENCIES): Define.
	(liblto_plugin_la_LIBADD): Use -L../libiberty/pic -liberty.
	(liblto_plugin_la_LDFLAGS): Use -L../libiberty -liberty.
	* Makefile.in: Regenerate.

From-SVN: r167850
2010-12-15 10:29:01 +00:00
Dave Korn
9dd22dd867 decl.c (java_init_decl_processing): Initialise integer_three_node.
* decl.c (java_init_decl_processing): Initialise integer_three_node.
	* lang.c (put_decl_node): Handle nested function decls.

From-SVN: r167849
2010-12-15 09:59:24 +00:00
Dave Korn
bce965d3ed re PR testsuite/46938 (FAIL: gcc.dg/pr43157.c (test for excess errors))
PR testsuite/46938
	* gcc.dg/pr43157.c: Add dg-require-linker-plugin  directive.

From-SVN: r167848
2010-12-15 09:51:26 +00:00
Ian Lance Taylor
5becc70b69 Check for errors when converting array index to GENERIC.
From-SVN: r167846
2010-12-15 06:25:38 +00:00
Ian Lance Taylor
5c5ea553a7 Don't crash on undefined anonymous field.
From-SVN: r167845
2010-12-15 06:16:31 +00:00
Sebastian Pop
05575a4695 Fix PR46845: handle scop parameters before scev analysis.
2010-12-14  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/46845
	* sese.c (scalar_evolution_in_region): Handle scop parameters
	before scev analysis.

	* gcc.dg/graphite/id-pr46845.c: New.

From-SVN: r167844
2010-12-15 05:04:50 +00:00
Sebastian Pop
3e6f8b5606 Fix PR46928: handle "A[p] == A[p]" in data dep analysis with p a parameter of the loop.
2010-12-14  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/46928
	* tree-data-ref.c (analyze_overlapping_iterations): Handle "A[p] == A[p]"
	in data dependence analysis with p a parameter of the loop.

	* gcc.dg/tree-ssa/ldist-17.c: New.

From-SVN: r167843
2010-12-15 05:04:40 +00:00
Sebastian Pop
ab2210870b Fix PR45948: add ssa defs from builtin partitions to the last partition.
2010-12-14  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/45948
	* tree-loop-distribution.c (ssa_name_has_uses_outside_loop_p): New.
	(stmt_has_scalar_dependences_outside_loop): New.
	(stmt_generated_in_another_partition): New.
	(add_scalar_computations_to_partition): New.
	(rdg_build_partitions): Call add_scalar_computations_to_partition.

	* gcc.dg/tree-ssa/ldist-pr45948.c: New.

From-SVN: r167842
2010-12-15 05:04:30 +00:00
Joseph Myers
56fb2b3625 arc.h (LIB_SPEC): Define.
* config/arc/arc.h (LIB_SPEC): Define.
	* config.gcc (arc-*-elf*): Don't use svr4.h.

From-SVN: r167840
2010-12-15 02:32:24 +00:00