Commit Graph

70413 Commits

Author SHA1 Message Date
Bernhard Fischer
d3a9662cad re PR target/16350 (gcc only understands little endian ARM systems)
PR target/16350
* config.gcc: For arm*b-* define TARGET_BIG_ENDIAN_DEFAULT.
* config/arm/linux-elf.h (TARGET_ENDIAN_DEFAULT): Define based on TARGET_BIG_ENDIAN_DEFAULT.
   Use for MULTILIB_DEFAULTS.
   (TARGET_DEFAULT): Set according to TARGET_ENDIAN_DEFAULT.
   (LINUX_TARGET_LINK_SPEC): Pass -mlittle-endian on to the assembler.
* config/arm/linux-eabi.h (TARGET_LINKER_EMULATION): Set according to TARGET_BIG_ENDIAN_DEFAULT.
   (SUBTARGET_EXTRA_LINK_SPEC): Likewise.
* gcc/config/arm/bpabi.h (TARGET_DEFAULT_MASK): Set according to TARGET_BIG_ENDIAN_DEFAULT.

From-SVN: r129999
2007-11-08 13:44:09 +00:00
Jakub Jelinek
c4e2c79ee4 re PR tree-optimization/32575 (With -ftree-vrp miscompiles a single line of code in SQLite)
PR tree-optimization/32575
	* gcc.c-torture/execute/20071108-1.c: New test.

From-SVN: r129998
2007-11-08 14:07:54 +01:00
Daniel Jacobowitz
8208d7dc30 class.c (build_ctor_vtbl_group): Lay out the new type and decl.
* class.c (build_ctor_vtbl_group): Lay out the new type and decl.

	* g++.dg/opt/anchor1.C: New.

From-SVN: r129997
2007-11-08 12:48:28 +00:00
Diego Novillo
24c1b08d69 tree.h (struct tree_struct_field_tag): Move field in_nested_struct ...
* tree.h (struct tree_struct_field_tag): Move field
	in_nested_struct ...
	(struct tree_memory_tag): ... here.

From-SVN: r129982
2007-11-07 21:18:32 -05:00
GCC Administrator
eba0c53727 Daily bump.
From-SVN: r129980
2007-11-08 00:17:22 +00:00
Diego Novillo
6f09f3140c re PR tree-optimization/33870 (miscompiles sqlite)
PR 33870
	* tree.h (struct tree_struct_field_tag): Add field in_nested_struct.
	(SFT_IN_NESTED_STRUCT): Define.
	* tree-dfa.c (dump_subvars_for): Show offset of each
	sub-var.
	* tree-flow.h (struct fieldoff): Add field in_nested_struct.
	* tree-ssa-structalias.c (struct variable_info): Likewise.
	(push_fields_onto_fieldstack): If OFFSET is positive,
	set in_nested_struct.
	(create_variable_info_for): Copy setting of
	in_nested_struct from the field offset object.
	(set_uids_in_ptset): Set SFT_IN_NESTED_STRUCT from the
	variable info object.
	* tree-ssa-operands.c (add_vars_for_offset): If VAR
	belongs to a nested structure, adjust OFFSET by
	SFT_OFFSET(VAR).

testsuite/ChangeLog

	* gcc.c-torture/execute/pr33870.x: Remove.

From-SVN: r129976
2007-11-07 19:01:38 -05:00
Douglas Gregor
e4fd5b87bf re PR c++/33045 ([c++0x] Incorrect decltype result for function calls.)
2007-11-07  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/33045
	PR c++/33837
	PR c++/33838
	* semantics.c (finish_decltype_type): See through INDIRECT_REFs.
	Be careful with ERROR_MARK_NODEs.
	* parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
	argument.
	
2007-11-07  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/33045
	PR c++/33837
	PR c++/33838
	* g++.dg/cpp0x/decltype-33837.C: New.
	* g++.dg/cpp0x/decltype-refbug.C: New.
	* g++.dg/cpp0x/decltype-33838.C: New.

From-SVN: r129975
2007-11-07 23:37:29 +00:00
Tom Tromey
4a54716a85 re PR java/34019 (Minor typo in gcj documentation)
PR java/34019:
	* gcj.texi (Input Options): Add missing noun.

From-SVN: r129974
2007-11-07 22:55:58 +00:00
Eric Botcazou
52982a970e re PR rtl-optimization/33737 (verify_flow_info failed: Wrong probability of edge 94->1 -6651)
PR rtl-optimization/33737
	* cfgcleanup.c (try_crossjump_to_edge): Add count and frequency of
	target block after computing the probabilities of outgoing edges.
	Cap the frequency to BB_FREQ_MAX.
	* tree-ssa-threadupdate.c (redirect_edges): Also adjust count and
	frequency of the basic block if it has been reused.

From-SVN: r129973
2007-11-07 22:05:37 +00:00
Eric Botcazou
8c6c36a3c9 re PR rtl-optimization/33822 (-g -O -mstrict-align causes an ICE in set_variable_part,)
PR rtl-optimization/33822
	* rtl.h (REG_OFFSET): Fix comment.
	* var-tracking.c (INT_MEM_OFFSET): New macro.
	(var_mem_set): Use it.
	(var_mem_delete_and_set): Likewise.
	(var_mem_delete): Likewise.
	(same_variable_part_p): Likewise.
	(vt_get_decl_and_offset): Likewise.
	(offset_valid_for_tracked_p): New predicate.
	(count_uses): Do not track locations with invalid offsets.
	(add_uses): Likewise.
	(add_stores): Likewise.

From-SVN: r129970
2007-11-07 20:48:08 +00:00
Tom Tromey
83eb8eb789 Makefile.in (tree-ssa-structalias.o): Depend on $(FUNCTION_H)
* Makefile.in (tree-ssa-structalias.o): Depend on $(FUNCTION_H)
	(BASIC_BLOCK_H): Add vec.h, $(FUNCTION_H).

From-SVN: r129969
2007-11-07 20:15:38 +00:00
Jakub Jelinek
2811f33dcd re PR c++/33501 (Copy constructor assumed to exist for undefined class)
PR c++/33501
	* call.c (build_over_call): Don't check TREE_ADDRESSABLE
	on incomplete type.

	* g++.dg/warn/incomplete2.C: New test.
	* g++.dg/template/incomplete4.C: New test.
	* g++.dg/template/incomplete5.C: New test.

From-SVN: r129968
2007-11-07 20:27:27 +01:00
Dmitry Zhurikhin
5cd537421e modulo-sched.c (sms_order_nodes, [...]): Fix prototypes.
* modulo-sched.c (sms_order_nodes, permute_partial_schedule,
        generate_prolog_epilog, duplicate_insns_of_cycles): Fix prototypes.
        (calculate_order_params, sms_order_nodes): New parameter pmax_asap.
        Save calculated max_asap in it.
        (sms_schedule): Calculate maxii using max_asap.


Co-Authored-By: Andrey Belevantsev <abel@ispras.ru>

From-SVN: r129966
2007-11-07 19:07:29 +03:00
Samuel Tardieu
d9c1dc68ad sem_attr.adb (Analyze_Attribute): Remove duplicate identical embedded check for "Ada_Version >= Ada_05".
gcc/ada/
	* sem_attr.adb (Analyze_Attribute): Remove duplicate identical
	embedded check for "Ada_Version >= Ada_05".

From-SVN: r129965
2007-11-07 14:52:24 +00:00
Samuel Tardieu
bc01690e80 tracebak.c (i386 alternative): Remove useless comparaison which is always false...
gcc/ada/
	* tracebak.c (i386 alternative): Remove useless comparaison
	which is always false; LOWEST_ADDRESS is 0 and is never greater
	than an unsigned integer.

From-SVN: r129964
2007-11-07 14:51:05 +00:00
Samuel Tardieu
dcbd752dc4 a-tasatt.adb: Use 'Access instead of 'Unchecked_Access when applicable.
gcc/ada/
	* a-tasatt.adb: Use 'Access instead of 'Unchecked_Access when
	applicable. Local lifetime is the one of the package.
	(Set_Value): W is allocated on the heap.

	* g-socket.adb: Use 'Access instead of 'Unchecked_Access when
	applicable.
	(Get_Socket_Option): Optlen formal of C_Getsockopt is of an anonymous
	access type.
	(Receive_Socket): Fromlen formal of C_Recvfrom is of an anonymous
	access type.

	* s-taasde.adb: Use 'Access instead of 'Unchecked_Access when
	applicable.
	(elaboration code): Timer_Queue lifetime is the one of the
	package.

From-SVN: r129963
2007-11-07 14:49:46 +00:00
Samuel Tardieu
f9d806de0b a-tasatt.adb: Type Wrapper should be declared in comment instead of already declared type...
gcc/ada/
	* a-tasatt.adb: Type Wrapper should be declared in comment instead
	of already declared type Node_Access.

From-SVN: r129962
2007-11-07 14:47:19 +00:00
Olivier Hainque
cb88a3eae3 decl.c (make_aligning_type): Set the mode of the RECORD_TYPE we craft and expand comment.
2007-11-07  Olivier Hainque  <hainque@adacore.com>

        * decl.c (make_aligning_type): Set the mode of the RECORD_TYPE we
        craft and expand comment.

        testsuite/
        * gnat.dg/max_align.adb: New test.

From-SVN: r129958
2007-11-07 09:51:46 +00:00
Andreas Krebbel
4daf64719c invoke.texi: Replace rs6000 dfp switches -mdfp/-mno-dfp with -mhard-dfp/-mno-hard-dfp.
2007-11-07  Andreas Krebbel  <krebbel1@de.ibm.com>

	* doc/invoke.texi: Replace rs6000 dfp switches -mdfp/-mno-dfp
	with -mhard-dfp/-mno-hard-dfp.

From-SVN: r129957
2007-11-07 08:57:02 +00:00
Diego Novillo
28f6b1e4e2 tree-flow.h (struct fieldoff): Reformat comment.
* tree-flow.h (struct fieldoff): Reformat comment.
	Document fields.
	* tree-ssa-operands.c: Tidy top-level comments.
	(add_vop): Likewise.
	(add_vars_for_offset): Tidy parameter formatting..
	(get_addr_dereference_operands): Likewise.
	(get_indirect_ref_operands): Likewise.
	(get_expr_operands) <OMP_ATOMIC_LOAD>: Reformat.
	<OMP_ATOMIC_STORE>: Likewise.

From-SVN: r129956
2007-11-06 22:00:22 -05:00
GCC Administrator
b6e2138fb7 Daily bump.
From-SVN: r129952
2007-11-07 00:17:50 +00:00
Maxim Kuvyrkov
3c9cc6f470 re PR middle-end/33670 (cc1 segfault with -O2 -fsched-stalled-insns=0 for twolf)
PR middle-end/33670
	* haifa-sched.c (check_sched_flags): Remove.
	(sched_init): Don't call it.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r129948
2007-11-07 00:20:38 +01:00
H.J. Lu
6a9497ff33 Correct ChangeLog entry for revision 129904.
From-SVN: r129945
2007-11-06 13:38:44 -08:00
Rask Ingemann Lambertsen
a6ecb05c86 re PR target/32787 (Sun Studio 12 Undefined symbol addl)
2007-11-06  Rask Ingemann Lambertsen  <rask@sygehus.dk>

	PR target/32787
	* config/i386/driver-i386.c: Test for __GNUC__ instead of
	GCC_VERSION which is always defined.

From-SVN: r129944
2007-11-06 20:14:22 +00:00
H.J. Lu
b3519e7c8a re PR target/30961 (redundant reg/mem stores/moves)
gcc/

2007-11-06  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	PR target/30961
	* reload1.c (find_reloads): Also check in_reg when handling a
	simple move with an input reload and a destination of a hard
	register.

gcc/testsuite/

2007-11-06  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/30961
	* gcc.target/i386/pr30961-1.c: New.

From-SVN: r129943
2007-11-06 11:19:23 -08:00
Maxim Kuvyrkov
b8c963204c m68k.c (sched-int.h, [...]): New includes.
* config/m68k/m68k.c (sched-int.h, insn-codes.h): New includes.
	(TARGET_SCHED_ADJUST_COST, TARGET_SCHED_VARIABLE_ISSUE,
	TARGET_SCHED_INIT_GLOBAL, TARGET_SCHED_FINISH_GLOBAL,
	TARGET_SCHED_INIT, TARGET_SCHED_DFA_PRE_ADVANCE_CYCLE,
	TARGET_SCHED_DFA_POST_ADVANCE_CYCLE): Redefine.
	(m68k_sched_attr_type2): New function.
	(sched_adjust_cost_state): New static variable.
	(m68k_sched_adjust_cost): New static function implementing
	scheduler hook.
	(sched_ib_size, sched_ib_filled, sched_ib_insn, sched_mem_unit_code):
	New static variables.
	(m68k_sched_variable_issue): New static function implementing
	scheduler hook.
	(sched_dump_class_def, sched_dump_class_func_t): New typedefs.
	(sched_dump_split_class): New static function.
	(sched_dump_dfa_guess_unit_code, sched_dump_dfa_state): New static
	variables.
	(sched_dump_dfa_class, m68k_sched_dump): New static function.
	(m68k_sched_md_init_global, m68k_sched_md_finish_global,
	m68k_sched_md_init, m68k_sched_dfa_pre_advance_cycle,
	m68k_sched_dfa_post_advance_cycle): New static functions implementing
	scheduler hooks.

	* config/m68k/m68k.h (m68k_sched_attr_type2): Declare.
	(CPU_UNITS_QUERY): Define.

	* config/m68k/cf.md: New file.
	* config/m68k/m68.md (cf.md): New include.

From-SVN: r129938
2007-11-06 16:52:17 +00:00
Tom Tromey
38d346765a PR c++/32256, PR c++/32368:
gcc
	PR c++/32256, PR c++/32368:
	* function.c (saved_in_system_header): New global.
	(push_cfun): Save in_system_header.
	(pop_cfun): Restore in_system_header.
	(push_struct_function): Save in_system_header.
gcc/testsuite
	PR c++/32368:
	* g++.dg/warn/pragma-system_header3.h: New.
	* g++.dg/warn/pragma-system_header3.C: New.

	PR c++/32256:
	* g++.dg/warn/pragma-system_header4.C: New.
	* g++.dg/warn/pragma-system_header4.h: New.

From-SVN: r129936
2007-11-06 15:57:02 +00:00
Douglas Gregor
9ae165a072 re PR c++/33977 (internal compiler error: canonical types differ for identical types const char [5] and const sal_Char [5])
2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/33977
	PR c++/33886
	* tree.c (c_build_qualified_type): Define bridge to
	cp_build_qualified_type.

2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/33977
	PR c++/33886
	* c-common.c (c_build_qualified_type): Moved to c-typeck.c.
	(complete_array_type): Set canonical type appropriately.
	* c-typeck.c (c_build_qualified_type): Moved from c-common.c. The
	C and C++ front ends now have different versions of this function,
	because the C++ version needs to maintain canonical types here.

2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/33977
	PR c++/33886
	* g++.dg/other/canon-array.C: New.

From-SVN: r129929
2007-11-06 14:39:41 +00:00
Douglas Gregor
1ad8aeeb96 re PR c++/31439 (ICE with variadic template and broken specialization)
2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/31439
	PR c++/32114
	PR c++/32115
	PR c++/32125
	PR c++/32126
	PR c++/32127
	PR c++/32128
	PR c++/32253
	PR c++/32566
	* typeck.c (check_return_expr): Pass address of retval to
	check_for_bare_parameter_packs.
	* class.c (build_base_field): Tolerate bases that have no layout
	due to errors.
	(end_of_base): Ditto.
	* tree.c (canonical_type_variant): Be careful with
	ERROR_MARK_NODE.
	* cp-tree.h (check_for_bare_parameter_packs): Now accepts a
	tree*.
	* pt.c (find_parameter_pack_data): Add set_packs_to_error field,
	which states whether parameter packs should be replaced with
	ERROR_MARK_NODE.
	(find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
	possible. If set_packs_to_error is set true, replace the parameter
	pack with ERROR_MARK_NODE. Manage our own pointer sets.
	(uses_parameter_packs): Don't set parameter packs to
	ERROR_MARK_NODE.
	(check_for_bare_parameter_packs): Now takes a pointer to a tree,
	which may be modified (if it is a parameter pack). Instructs
	find_parameter_packs_r to replace parameter packs with
	ERROR_MARK_NODE (so that they won't cause errors later on).
	(process_template_parm): Pass pointer to
	check_for_bare_parameter_packs.
	(process_partial_specialization): Replace pack expansions before
	the end of the template argument list with ERROR_MARK_NODE.
	(push_template_decl_real): Pass pointer to
	check_for_bare_parameter_packs. Replace parameter packs not at the
	end of the template parameter list with ERROR_MARK_NODE.
	(convert_template_argument): Be more careful about using DECL_NAME
	on only declarations.
	(unify): Can't unify against ERROR_MARK_NODE.
	* semantics.c (finish_cond): Pass pointer to
	check_for_bare_parameter_packs.
	(finish_expr_stmt): Ditto.
	(finish_for_expr): Ditto.
	(finish_switch_cond): Pass pointer to
	check_for_bare_parameter_packs, and call it before we put the
	condition into the statement.
	(finish_mem_initializers): Pass pointer to
	check_for_bare_parameter_packs.
	(finish_member_declaration): Ditto.
	* parser.c (cp_parser_base_clause): Ditto.
	
2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>

	* testsuite/g++.dg/parser/crash36.C: Tweak expected errors.
	* testsuite/g++.dg/cpp0x/pr31439.C: New.
	* testsuite/g++.dg/cpp0x/pr32114.C: New.
	* testsuite/g++.dg/cpp0x/pr32115.C: New.
	* testsuite/g++.dg/cpp0x/pr32125.C: New.
	* testsuite/g++.dg/cpp0x/pr32126.C: New.
	* testsuite/g++.dg/cpp0x/pr32127.C: New.
	* testsuite/g++.dg/cpp0x/pr32128.C: New.
	* testsuite/g++.dg/cpp0x/pr32253.C: New.
	* testsuite/g++.dg/cpp0x/pr32566.C: New.
	* testsuite/g++.dg/cpp0x/pr31445.C: Tweak expected errors.
	* testsuite/g++.dg/cpp0x/pr31438.C: Ditto.
	* testsuite/g++.dg/cpp0x/variadic81.C: Ditto.
	* testsuite/g++.dg/cpp0x/pr31432.C: Ditto.
	* testsuite/g++.dg/cpp0x/pr31442.C: Ditto.

From-SVN: r129928
2007-11-06 14:37:56 +00:00
Razya Ladelsky
0eb7e7aa01 tree-parloops.c (reduction_info): Remove reduction_init field.
2007-11-04  Razya Ladelsky  <razya@il.ibm.com>
	
	* tree-parloops.c (reduction_info): Remove reduction_init field.
	(initialize_reductions): Remove creation of the reduction_init variable.
	(struct data_arg): Remove.
	(add_field_for_reduction, create_stores_for_reduction): New functions.
	(add_field_for_name): Remove reduction handling.
	(separate_decls_in_loop): Call add_field_for_reduction, 
	create_stores_for_reduction.

From-SVN: r129923
2007-11-06 10:29:12 +00:00
Jakub Jelinek
b0eb6a8f72 re PR target/33168 (GCC Boot failure, building libstc++)
PR target/33168
	* decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
	with the final TREE_READONLY flag in place.  processing_template_decl
	is known to be 0 in this part of function.

	* g++.dg/other/datasec1.C: New test.

From-SVN: r129922
2007-11-06 09:33:25 +01:00
Jakub Jelinek
36b6e79343 re PR tree-optimization/33458 (ICE "PHI def is not a GIMPLE value")
PR tree-optimization/33458
	* tree-inline.c (copy_phis_for_bb): If PHI arg substitution creates
	!is_gimple_val PHI argument, gimplify it and insert it on edge.

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

From-SVN: r129921
2007-11-06 09:29:48 +01:00
Jakub Jelinek
c563bcd1da re PR tree-optimization/33993 (ICE: verify_stmts failed (invalid reference prefix))
PR tree-optimization/33993
	* tree-vect-transform.c (vect_get_constant_vectors): Use build_vector
	rather than build_constructor_from_list if all list values are
	constants.
	(get_initial_def_for_induction): Use build_vector instead of
	build_constructor_from_list.

	* gcc.c-torture/compile/20071105-1.c: New test.

From-SVN: r129920
2007-11-06 09:28:37 +01:00
Jakub Jelinek
239371f9c7 re PR c++/33894 (pragma omp atomic broken)
PR c++/33894
	* cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
	OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
	* pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
	* semantics.c (finish_omp_atomic): Revert most of the
	2007-02-05 changes, just keep the new representation of
	OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.

	* testsuite/libgomp.c++/atomic-1.C: New test.

From-SVN: r129919
2007-11-06 09:26:50 +01:00
Mark Mitchell
873c716480 re PR target/33579 (INIT_PRIORITY is broken)
PR target/33579
	* tree.h (DECL_INIT_PRIORITY): Do not require
	DECL_HAS_INIT_PRIORITY_P.
	(DECL_FINI_PRIORITY): Likewise.
	* tree.c (decl_init_priority_lookup): Remove assert.
	(decl_fini_priority_insert): Likewise.
	* cgraphunit.c (static_ctors): Make it a VEC.
	(static_dtors): Likewise.
	(record_cdtor_fn): Adjust accordingly.
	(build_cdtor): Generate multiple functions for each initialization
	priority.
	(compare_ctor): New function.
	(compare_dtor): Likewise.
	(cgraph_build_cdtor_fns): Sort the functions by priority before
	calling build_cdtor.
	(cgraph_build_static_cdtor): Put the priority in the function's
	name.

From-SVN: r129918
2007-11-06 00:30:52 +00:00
GCC Administrator
7ef52af452 Daily bump.
From-SVN: r129916
2007-11-06 00:17:19 +00:00
H.J. Lu
528dc60364 re PR driver/32632 (-pie won't override -shared in -shared -pie)
2007-11-05  H.J. Lu  <hongjiu.lu@intel.com>

	PR driver/32632
	* common.opt: Add shared and pie.

From-SVN: r129913
2007-11-05 15:42:30 -08:00
Bob Wilson
d99ffa9404 xtensa.c (xtensa_expand_nonlocal_goto): Do not replace references to virtual_stack_vars_rtx in goto_handler.
* config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Do not replace
	references to virtual_stack_vars_rtx in goto_handler.

From-SVN: r129912
2007-11-05 23:37:38 +00:00
H.J. Lu
565603f84a re PR c++/33871 (typeinfo name referenced in ... defined in discarded section)
2007-11-05  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/33871
	* decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
	local.

From-SVN: r129911
2007-11-05 15:11:57 -08:00
Jakub Jelinek
d03b2e6b4d Fix last entry.
From-SVN: r129910
2007-11-05 23:00:07 +01:00
Jakub Jelinek
2dc675d531 re PR rtl-optimization/33648 (ICE in verify_flow_info for -fmodulo-sched -freorder-blocks-and-partition)
PR rtl-optimization/33648
	* gcc.dg/pr33648.c: New test.

From-SVN: r129909
2007-11-05 22:55:37 +01:00
Revital Eres
77cfbfe79e Fix check_750cl_hw_available function
From-SVN: r129906
2007-11-05 18:58:43 +00:00
Douglas Gregor
86089be5e1 Index...
Index: testsuite/g++.dg/cpp0x/pr33996.C
===================================================================
--- testsuite/g++.dg/cpp0x/pr33996.C	(revision 0)
+++ testsuite/g++.dg/cpp0x/pr33996.C	(revision 0)
@@ -0,0 +1,52 @@
+// { dg-options "-std=c++0x" }
+
+#define BUG
+struct type
+{
+  type() { }
+  type(const type&) { }
+
+private:
+  type(type&&);
+};
+
+template<typename _Tp>
+  struct identity
+  {
+    typedef _Tp type;
+  };
+
+template<typename _Tp>
+  inline _Tp&&
+  forward(typename identity<_Tp>::type&& __t)
+  { return __t; }
+
+struct vec
+{
+  template<typename _Args>
+    void
+    bar(_Args&& __args)
+#ifdef BUG
+    ;
+#else
+    {
+      type(forward<_Args>(__args));
+    }
+#endif
+};
+
+#ifdef BUG
+template<typename _Args>
+  void
+  vec::bar(_Args&& __args)
+  {
+    type(forward<_Args>(__args));
+  }
+#endif
+
+int main()
+{
+  vec v;
+  type c;
+  v.bar(c);
+}
Index: testsuite/g++.dg/cpp0x/rv-trivial-bug.C
===================================================================
--- testsuite/g++.dg/cpp0x/rv-trivial-bug.C	(revision 0)
+++ testsuite/g++.dg/cpp0x/rv-trivial-bug.C	(revision 0)
@@ -0,0 +1,33 @@
+// { dg-do "run" }
+// { dg-options "-std=c++0x" }
+// PR c++/33235
+#include <cassert>
+
+int move_construct = 0;
+int move_assign = 0;
+
+struct base2
+{
+    base2() {}
+    base2(base2&&) {++move_construct;}
+    base2& operator=(base2&&) {++move_assign; return *this;}
+};
+
+int test2()
+{
+    base2 b;
+    base2 b2(b);
+    assert(move_construct == 0);
+    base2 b3(static_cast<base2&&>(b));
+    assert(move_construct == 1);
+    b = b2;
+    assert(move_assign == 0);
+    b = static_cast<base2&&>(b2);
+    assert(move_assign == 1);
+}
+
+int main()
+{
+    test2();
+    return 0;
+}
Index: testsuite/g++.dg/cpp0x/pr33930.C
===================================================================
--- testsuite/g++.dg/cpp0x/pr33930.C	(revision 0)
+++ testsuite/g++.dg/cpp0x/pr33930.C	(revision 0)
@@ -0,0 +1,10 @@
+// { dg-options "-std=c++0x" }
+typedef const int* type;
+
+float& foo( const type& ggg );
+int& foo( type&& ggg );
+
+void bar( int* someptr )
+{
+  int& x = foo( someptr );
+}
Index: cp/typeck.c
===================================================================
--- cp/typeck.c	(revision 129899)
+++ cp/typeck.c	(working copy)
@@ -620,7 +620,7 @@ merge_types (tree t1, tree t2)
 	if (code1 == POINTER_TYPE)
 	  t1 = build_pointer_type (target);
 	else
-	  t1 = build_reference_type (target);
+	  t1 = cp_build_reference_type (target, TYPE_REF_IS_RVALUE (t1));
 	t1 = build_type_attribute_variant (t1, attributes);
 	t1 = cp_build_qualified_type (t1, quals);
 
Index: cp/call.c
===================================================================
--- cp/call.c	(revision 129899)
+++ cp/call.c	(working copy)
@@ -5076,7 +5076,8 @@ build_over_call (struct z_candidate *can
 	    return build_target_expr_with_type (arg, DECL_CONTEXT (fn));
 	}
       else if (TREE_CODE (arg) == TARGET_EXPR
-	       || TYPE_HAS_TRIVIAL_INIT_REF (DECL_CONTEXT (fn)))
+	       || (TYPE_HAS_TRIVIAL_INIT_REF (DECL_CONTEXT (fn))
+		   && !move_fn_p (fn)))
 	{
 	  tree to = stabilize_reference
 	    (build_indirect_ref (TREE_VALUE (args), 0));
@@ -6118,7 +6119,11 @@ compare_ics (conversion *ics1, conversio
   if (ics1->kind == ck_qual
       && ics2->kind == ck_qual
       && same_type_p (from_type1, from_type2))
-    return comp_cv_qual_signature (to_type1, to_type2);
+    {
+      int result = comp_cv_qual_signature (to_type1, to_type2);
+      if (result != 0)
+	return result;
+    }
 
   /* [over.ics.rank]

From-SVN: r129905
2007-11-05 18:42:22 +00:00
Paul Brook
b76c3c4bee config.gcc (arm*-*-*): Set c_target_objs and cxx_target_objs.
2007-11-05  Paul Brook  <paul@codesourcery.com>

	gcc/
	* config.gcc (arm*-*-*): Set c_target_objs and cxx_target_objs.
	* config/arm/arm.c (arm_lang_output_object_attributes_hook): New.
	(arm_file_start): Don't set Tag_ABI_PCS_wchar_t.  Call
	arm_lang_output_object_attributes_hook.
	* config/arm/arm.h (arm_lang_output_object_attributes_hook): Declare.
	(REGISTER_TARGET_PRAGMAS): Call arm_lang_object_attributes_init.
	* config/arm/arm-protos.h (arm_lang_object_attributes_init): Add
	prototype.
	* config/arm/t-arm.c (arm.o): New rule.
	* config/arm/arm-c.c: New file.

From-SVN: r129904
2007-11-05 17:13:46 +00:00
Nick Clifton
f0ed4cfb9d re PR tree-optimization/32540 (Exponential time behavior in PRE)
2007-11-05  Nick Clifton  <nickc@redhat.com>
	    Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/32540
	PR tree-optimization/33922
	* doc/invoke.texi: Document PARAM_MAX_PARTIAL_ANTIC_LENGTH.
	* tree-ssa-pre.c: Include params.h.
	(compute_partial_antic_aux): Use PARAM_MAX_PARTIAL_ANTIC_LENGTH
	to limit the maximum length of the PA set for a given block.
	* Makefile.in: Add a dependency upon params.h for tree-ssa-pre.c
	* params.def (PARAM_MAX_PARTIAL_ANTIC_LENGTH): New parameter.

	* gcc.dg/tree-ssa/pr32540-1.c: New.
	* gcc.dg/tree-ssa/pr32540-2.c: New.
	* gcc.dg/tree-ssa/pr33922.c: New.


Co-Authored-By: Sebastian Pop <sebastian.pop@amd.com>

From-SVN: r129901
2007-11-05 15:42:30 +00:00
Douglas Gregor
2afad0f6bb re PR c++/33939 (Rvalue references not deduced correctly in vararg function templates)
2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/33939
	* pt.c (unify_pack_expansion): bring handling of function call
	arguments into line with type_unification_real. 

2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/33939
	* g++.dg/cpp0x/variadic-rref.C: New.

From-SVN: r129900
2007-11-05 12:50:21 +00:00
Nathan Sidwell
f139f5faa7 libgcc2.c (__fixunstfDI, [...]): Make return type unsigned.
* libgcc2.c (__fixunstfDI, __fixunsxfDI, __fixunsdfDI,
	__fixunssfDI): Make return type unsigned.
	* libgcc2.h (__fixunstfDI, __fixunsxfDI, __fixunsdfDI,
	__fixunssfDI): Make return type unsigned.

From-SVN: r129899
2007-11-05 11:41:40 +00:00
Manuel López-Ibáñez
278b63df62 typeck.c (build_binary_op): Use pedwarn instead of error for consistency.
2007-11-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
cp/
	* typeck.c (build_binary_op): Use pedwarn instead of error for
	consistency.
testsuite/
	* g++dg/warn/pointer-integer-comparison.C: New.

From-SVN: r129898
2007-11-05 10:03:04 +00:00
Jakub Jelinek
0976ffb63f re PR tree-optimization/33856 (Segfault in create_data_ref/compute_data_dependences_for_loop)
PR tree-optimization/33856
	* tree-data-ref.c (get_references_in_stmt): Don't add
	REFERENCE_CLASS_P trees to references vector if get_base_address
	returns NULL on them.

	* gcc.c-torture/compile/20071027-1.c: New test.

From-SVN: r129897
2007-11-05 09:44:23 +01:00
Jakub Jelinek
f370e66bb8 re PR c++/33836 (ICE with invalid use of &&)
PR c++/33836
	* parser.c (cp_parser_unary_expression): For &&label call
	cp_parser_non_integral_constant_expression and return error_mark_node
	if it returned true.

	* g++.dg/ext/label10.C: New test.

From-SVN: r129896
2007-11-05 09:18:03 +01:00
Jakub Jelinek
1b021ff438 re PR c++/33969 (ICE with const and function pointer)
PR c++/33969
	* decl.c (grokdeclarator): Don't call build_memfn_type if type
	is neither FUNCTION_TYPE nor METHOD_TYPE.

	* g++.dg/other/ptrmem9.C: New test.

From-SVN: r129895
2007-11-05 09:10:09 +01:00
Alexandre Oliva
9656bc0fdc * cfg.c (dump_cfg_bb_info): Update bb_bitnames to match enum.
From-SVN: r129893
2007-11-05 06:34:34 +00:00
GCC Administrator
dbf05723cd Daily bump.
From-SVN: r129891
2007-11-05 00:17:30 +00:00
Andrew Pinski
f519a4b315 Index...
Index: ChangeLog
===================================================================
--- ChangeLog   (revision 129887)
+++ ChangeLog   (working copy)
@@ -6447,6 +6447,7 @@
 
 2007-09-02  Joseph Myers  <joseph@codesourcery.com>
 
+       PR c/29237
        PR middle-end/33272
        * c-decl.c (grokdeclarator): Apply qualifiers to type of parameter
        decayed from array.
Index: testsuite/ChangeLog
===================================================================
--- testsuite/ChangeLog (revision 129887)
+++ testsuite/ChangeLog (working copy)
@@ -3041,6 +3041,7 @@
 
 2007-09-02  Joseph Myers  <joseph@codesourcery.com>
 
+       PR C/29237
        PR middle-end/33272
        * gcc.dg/c99-arraydecl-3.c: New test.

From-SVN: r129888
2007-11-04 16:08:04 -08:00
Andrew Pinski
4c85a3da5f re PR middle-end/32931 (FORALL and WHERE give an ICE with -m64)
2007-11-04  Andrew Pinski  <pinskia@gmail.com>

        PR middle-end/32931
        * fold-const.c (fold_binary <case EQ_EXPR>): Convert the inner type
        for TRUTH_NOT_EXPR to type.

2007-11-04  Andrew Pinski  <pinskia@gmail.com>

        PR middle-end/32931
        * gfortran.fortran-torture/compile/forall-1.f90: New testcase.

From-SVN: r129886
2007-11-04 11:04:49 -08:00
Gerald Pfeifer
7284a19735 * doc/contrib.texi (Contributors): Add Manuel Lopez-Ibanez.
From-SVN: r129884
2007-11-04 17:49:16 +00:00
David Edelsohn
bc6812beee _Pragma1.C: Disable on AIX.
* g++.dg/cpp/_Pragma1.C: Disable on AIX.
        * g++.dg/ext/visibility/namespace2.C: Add argument to
        dg-require-visibility.
        * g++.dg/ext/java-1.C: Disable on AIX.

From-SVN: r129883
2007-11-04 11:34:37 -05:00
Francois-Xavier Coudert
9adfa70e26 re PR fortran/10220 (attribute DW_AT_calling_convention not correct for fortran)
PR fortran/10220
	* dwarf2out.c (add_calling_convention_attribute): Change
	second argument. Set calling convention to DW_CC_program for
	Fortran main program.
	(gen_subprogram_die): Adjust to new prototype for
	add_calling_convention_attribute.

From-SVN: r129882
2007-11-04 14:43:45 +00:00
Dorit Nuzman
55e67e4462 no-vfa-pr32377.f90: Remove xfail.
* gfortran.dg/vect/no-vfa-pr32377.f90: Remove xfail.

From-SVN: r129881
2007-11-04 04:34:47 +00:00
Dorit Nuzman
a0aa00d709 re PR tree-optimization/33987 (internal compiler error: in get_initial_def_for_reduction, at tree-vect-transform.c:2110 with -O3 -msse2)
PR tree-optimization/33987
        * tree-vect-transform.c (get_initial_def_for_reduction): Fix assert.
        Fix indentation.
        (vectorizable_reduction): Add type check.

From-SVN: r129880
2007-11-04 03:48:58 +00:00
GCC Administrator
e45d5d63ea Daily bump.
From-SVN: r129878
2007-11-04 00:17:09 +00:00
Francois-Xavier Coudert
83dffdeb44 re PR fortran/33881 (wrong code for assumed length character arrays)
PR fortran/33881

	* trans-array.c (gfc_conv_array_parameter): Evaluate
	se->string_length instead of the expr->ts.cl->backend_decl.

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

From-SVN: r129874
2007-11-03 22:12:03 +00:00
Manuel López-Ibáñez
847c8ce4d1 re PR c/29062 (unclear diagnostic for declaration after label)
2007-11-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c/29062
	* c-parser.c (c_parser_statement_after_labels): Error if a
	declaration is parsed after a label.
testsuite/
	* gcc.dg/20031223-1.c: Adjust error output.
	* gcc.dg/parse-decl-after-label.c: New.

From-SVN: r129873
2007-11-03 19:41:20 +00:00
Daniel Jacobowitz
47c95bff6b re PR debug/33921 (FAIL: gcc.dg/debug/debug-6.c -gdwarf-2 -O scan-assembler xyzzy)
PR debug/33921
	* reorg.c (emit_delay_sequence): Do not clear the locator on
	the jump instruction.

From-SVN: r129872
2007-11-03 17:50:20 +00:00
Jerry DeLisle
241b92c8c5 re PR libfortran/24685 (real(16) formatted input is broken for huge values (gfortran.dg/default_format_2.f90))
2007-11-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/24685
	* gfortran.dg/default_format_2.f90: XFAIL powerpc*-*-linux*
	* gfortran.dg/default_format_denormal_2.f90: XFAIL powerpc*-*-linux*
	* gfortran.dg/large_real_kind_form_io_2.f90: XFAIL powerpc*-*-linux*

From-SVN: r129871
2007-11-03 16:47:37 +00:00
Francois-Xavier Coudert
ecf24057f8 gfortran.h: Shorten comment.
* gfortran.h: Shorten comment.
	* trans-types.c (gfc_get_function_type): Allow argument to have
	flavor FL_PROGRAM.
	* trans-decl.c (gfc_sym_mangled_function_id): Mangle main program
	name into MAIN__.
	(build_function_decl): Fix comment.
	* parse.c (main_program_symbol): Give the main program its proper
	name, if any. Set its flavor to FL_PROGRAM.
	(gfc_parse_file): Likewise.

From-SVN: r129869
2007-11-03 14:51:51 +00:00
Eric Botcazou
9d85b4853b re PR rtl-optimization/28940 (address selection does not work correctly)
PR rtl-optimization/28940
	* gcc.target/i386/addr-sel-1.c: New test.

From-SVN: r129868
2007-11-03 07:53:01 +00:00
GCC Administrator
57ca9c742a Daily bump.
From-SVN: r129866
2007-11-03 00:17:26 +00:00
Jakub Jelinek
ec8628e835 re PR middle-end/33670 (cc1 segfault with -O2 -fsched-stalled-insns=0 for twolf)
PR middle-end/33670
	* haifa-sched.c (ok_for_early_queue_removal): Don't walk out of the
	current sched region.

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

From-SVN: r129863
2007-11-03 00:06:36 +01:00
Jakub Jelinek
eba5fc70ad re PR c++/33516 (Rejects typedef qualified name-lookup)
PR c++/33516
	* parser.c (cp_parser_nested_name_specifier_opt): Use
	TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
	typedef of currently open class.

	* g++.dg/lookup/typedef1.C: New test.

From-SVN: r129862
2007-11-02 22:37:35 +01:00
Jakub Jelinek
444a356a3b ia64.c (struct reg_write_state): Change into unsigned short bitfields rather than unsigned int...
* config/ia64/ia64.c (struct reg_write_state): Change into
	unsigned short bitfields rather than unsigned int, decrease
	first_pred to just 10 bits.
	(rws_insn): Change into a bitmap or if not ENABLE_CHECKING
	into two char array.
	(rws_insn_set, rws_insn_test): New functions.
	(in_safe_group_barrier): New variable.
	(rws_update): Remove first argument, always set rws_sum array.
	(rws_access_regno): Use rws_insn_set macro.  Only call rws_update
	or update rws_sum if !in_safe_group_barrier, adjust rws_update
	args.
	(rtx_needs_barrier): Use rws_insn_test macro.
	(safe_group_barrier_needed): Don't save/restore rws_sum array,
	instead set/clear in_safe_group_barrier flag.

From-SVN: r129861
2007-11-02 21:38:11 +01:00
Tom Tromey
7c4b32bcdc re PR java/33765 (gcj internal compiler error when reading an empty file)
PR java/33765:
	* jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
	* zipfile.h (ZIPEMPTYMAGIC): New define.

From-SVN: r129860
2007-11-02 20:02:35 +00:00
Janis Johnson
ea094d1f23 re PR testsuite/32076 ("gcc.dg/tree-ssa/pr17141-1.c scan-tree-dump locp.*->i =" is the same name twice)
PR testsuite/32076
	* lib/scandump.exp (dump-suffix): New.
	(scan-dump, scan-dump-times, scan-dump-dem, scan-dump-dem-not):
	Include dump suffix in pass/fail messages, put regexp in quotes.

From-SVN: r129858
2007-11-02 17:54:12 +00:00
Francois-Xavier Coudert
3097268934 * intrinsic.texi (ALLOCATED): Fix typo.
From-SVN: r129857
2007-11-02 17:42:06 +00:00
Bob Wilson
4e6c21930e xtensa.c (xtensa_expand_prologue): Put a REG_FRAME_RELATED_EXPR note on the last insn that sets up the stack...
* config/xtensa/xtensa.c (xtensa_expand_prologue): Put a
	REG_FRAME_RELATED_EXPR note on the last insn that sets up the stack
	pointer or frame pointer.
	* config/xtensa/xtensa.h (DWARF_UNWIND_INFO): Delete.
	(MUST_USE_SJLJ_EXCEPTIONS): Define.
	(DWARF2_UNWIND_INFO): Define.
	(INCOMING_RETURN_ADDR_RTX): Define.
	(DWARF_FRAME_RETURN_COLUMN): Define.

From-SVN: r129854
2007-11-02 16:06:41 +00:00
Tom Tromey
f3a032e928 varpool.c (dump_varpool): Use 'next', not 'next_needed' when traversing pool.
* varpool.c (dump_varpool): Use 'next', not 'next_needed' when
	traversing pool.

From-SVN: r129851
2007-11-02 15:29:09 +00:00
Paolo Carlini
10a6624ad6 re PR c++/33495 (Broken diagnostic: Trouble pretty-printing statement expressions)
2007-11-02  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33495
	* error.c (dump_expr): Deal specially with statements.

2007-11-02  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33495
	* g++.dg/other/error19.C: New.

From-SVN: r129850
2007-11-02 14:06:43 +00:00
Eric Botcazou
5625d7ca05 re PR rtl-optimization/28062 (ICE in simplify_subreg, at simplify-rtx.c:4466)
PR rtl-optimization/28062
	* gcc.c-torture/compile/20071102-1.c: New test.

From-SVN: r129846
2007-11-02 11:57:05 +00:00
Diego Novillo
c4e622b658 langhooks.h (struct lang_hooks_for_callgraph): Remove third argument from function pointer ANALYZE_EXPR.
* langhooks.h (struct lang_hooks_for_callgraph): Remove third
	argument from function pointer ANALYZE_EXPR.  Update all
	users.
	* cgraph.c (debug_cgraph_node): New.
	(debug_cgraph): New.

From-SVN: r129845
2007-11-02 07:12:30 -04:00
Jason Merrill
ef3b7b1761 re PR c++/30897 (ICE with default argument in template template parameter)
PR c++/30897
        * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
        template parms.
        (lookup_template_class): Use it to get the outer template args
        for instantiating one.

        PR c++/29236
        * pt.c (reduce_template_parm_level): tsubst the parameters
        of a template template parm.

From-SVN: r129844
2007-11-02 01:50:06 -04:00
Douglas Gregor
e1a18c68eb re PR c++/33955 (internal compiler error: in dependent_type_p, at cp/pt.c:15245 (vararg template problem))
2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/33955
	* pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.

2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>

	* g++.dg/cpp0x/pr33955.C: New.

From-SVN: r129843
2007-11-02 03:26:46 +00:00
GCC Administrator
a19309466a Daily bump.
From-SVN: r129841
2007-11-02 00:17:22 +00:00
Tom Tromey
17bfa461cf re PR preprocessor/30805 (Internal compiler error when using "x##,##__VA_ARGS__" in macro)
PR preprocessor/30805:
	* gcc.dg/cpp/pr30805.c: Use -std=gnu89.

From-SVN: r129838
2007-11-01 23:38:52 +00:00
Jakub Jelinek
3e7eb73400 re PR rtl-optimization/33648 (ICE in verify_flow_info for -fmodulo-sched -freorder-blocks-and-partition)
PR rtl-optimization/33648
	* cfgrtl.c (cfg_layout_split_edge): Initialize BB_PARTITION of
	the newly created basic block.

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

From-SVN: r129837
2007-11-02 00:27:23 +01:00
Jakub Jelinek
e426bd2cc8 re PR c++/32384 (Pseudo-dtor in template class rejected)
PR c++/32384
	* parser.c (cp_parser_postfix_dot_deref_expression): If
	POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
	first and if that succeeds and type is SCALAR_TYPE_P, create
	PSEUDO_DTOR_EXPR.

	* g++.dg/template/pseudodtor1.C: New test.
	* g++.dg/template/pseudodtor2.C: New test.

From-SVN: r129836
2007-11-01 23:54:39 +01:00
Jakub Jelinek
3a44f39543 re PR c++/32260 (too many warning: dereferencing type-punned pointer will break strict-aliasing rules)
PR c++/32260
	* rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
	(typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
	as for std::type_info.

	* g++.dg/rtti/typeid7.C: New test.

From-SVN: r129835
2007-11-01 23:50:32 +01:00
Richard Guenther
945bfaca2e ggc-page.c (extra_order_size_tab): Add bitmap_head size.
2007-11-01  Richard Guenther  <rguenther@suse.de>

        * ggc-page.c (extra_order_size_tab): Add bitmap_head size.

From-SVN: r129833
2007-11-01 22:20:29 +00:00
Steven Bosscher
f8423fea8d re PR rtl-optimization/33828 (Issues with code hoisting implementation in gcse.c)
PR rtl-optimization/33828
	* gcse.c (compute_code_hoist_vbeinout): Fix order of computation
	of VBEIN and VBEOUT.

From-SVN: r129832
2007-11-01 21:03:50 +00:00
Eric Botcazou
ba8a73e9fb optabs.c (prepare_cmp_insn): Merge a couple of conditional blocks.
* optabs.c (prepare_cmp_insn): Merge a couple of conditional blocks.
	* sched-rgn.c (compute_trg_info): Zero 'el' local variable.
	* tree-if-conv.c (process_phi_nodes): Zero 'cond' local variable.

From-SVN: r129830
2007-11-01 20:48:21 +00:00
Tom Tromey
cff75efa57 Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
* Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
	(java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
	(java/jcf-io.o): Depend on zipfile.h.

From-SVN: r129829
2007-11-01 19:37:32 +00:00
Tom Tromey
f373b44d28 re PR preprocessor/30805 (Internal compiler error when using "x##,##__VA_ARGS__" in macro)
libcpp
	PR preprocessor/30805:
	* macro.c (paste_tokens): Handle padding token.
	(paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
gcc/testsuite
	PR preprocessor/30805:
	* gcc.dg/cpp/pr30805.c: New file.

From-SVN: r129827
2007-11-01 18:20:48 +00:00
Eric Botcazou
233a722b41 lang-specs.h: Move translation of -fRTS= after -gnatez switch.
* lang-specs.h: Move translation of -fRTS= after -gnatez switch.

From-SVN: r129826
2007-11-01 18:06:47 +00:00
Nathan Sidwell
5557813a4e gcc.c (getenv_spec_function): Escape the environment variable's value.
* gcc.c (getenv_spec_function): Escape the environment variable's
	value.

From-SVN: r129825
2007-11-01 16:42:39 +00:00
Janis Johnson
d6a64b9df9 invoke.texi (Optimize Options): Under -fcse-follow-jumps, show that CSE means common subexpression elimination.
* doc/invoke.texi (Optimize Options): Under -fcse-follow-jumps,
	show that CSE means common subexpression elimination.  Change wording
	for -fsee and define LCM.  Remove capitalization of optimizations
	for -ftree-reassoc, -ftree-pre, and -ftree-fre.

From-SVN: r129824
2007-11-01 16:34:48 +00:00
Janis Johnson
fdaea7e286 re PR testsuite/25352 (xfail within dg-do command has no effect)
gcc/
	PR testsuite/25352
	* doc/sourcebuild.texi (Test Directives): Document that xfail
	has no effect for dg-do except when dg-do-what is "run".

libstdc++-v3/
	PR testsuite/25352
	* testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
	Remove xfail from dg-do and add dg-skip-if.

gcc/testsuite/
	PR testsuite/25352
	* gcc.c-torture/compile/20000804-1.c: Remove xfail from dg-do and
	add dg-skip-if.
	* gcc.c-torture/compile/20001205-1.c: Ditto.
	* gcc.c-torture/compile/20001226-1.c: Ditto.
	* gcc.c-torture/compile/20020312-1.c: Ditto.
	* gcc.c-torture/compile/20020604-1.c: Ditto.
	* gcc.c-torture/compile/920501-12.c: Ditto.
	* gcc.c-torture/compile/920501-4.c: Ditto.
	* gcc.c-torture/compile/920520-1.c: Ditto.
	* gcc.c-torture/compile/980506-1.c: Ditto.
	* gcc.c-torture/compile/990617-1.c: Ditto.
	* gcc.dg/compare6.c: Ditto.
	* g++.old-deja/g++.brendan/crash43.C: Ditto.
	* g++.old-deja/g++.brendan/synth1.C: Ditto.
	* g++.old-deja/g++.oliva/dwarf2.C: Ditto.
	* g++.old-deja/g++.oliva/dwarf3.C: Ditto.
	* g++.old-deja/g++.pt/static6.C: Ditto.
	* g++.old-deja/g++.pt/crash16.C: Ditto.
	* g++.old-deja/g++.mike/p10416.C: Ditto.
	* g++.old-deja/g++.mike/ns15.C: Ditto.
	* g++.old-deja/g++.mike/eh46.C: Ditto.

From-SVN: r129823
2007-11-01 16:22:36 +00:00
Tom Tromey
5af28c7452 c-decl.c (grokdeclarator): Set decl source locations.
gcc
	* c-decl.c (grokdeclarator): Set decl source locations.
	* c-parser.c (c_parser_enum_specifier): Set location.
	(c_parser_struct_or_union_specifier): Likewise.
gcc/testsuite
	* gcc.dg/redecl-1.c: Update.
	* gcc.dg/pr20368-3.c: Update.
	* gcc.dg/inline-14.c: Update.
	* gcc.dg/builtins-30.c: Update.
	* gcc.dg/dremf-type-compat-4.c: Update.
	* gcc.dg/pr20368-2.c: Update.

From-SVN: r129822
2007-11-01 15:31:12 +00:00
Tom Tromey
18aa09d195 * print-tree.c (print_node): Print column number.
From-SVN: r129821
2007-11-01 15:06:11 +00:00
Jakub Jelinek
611cd333cd re PR debug/33537 (C++ arguments passed by invisible reference have wrong type)
PR debug/33537
	* dwarf2out.c (gen_formal_parameter_die, gen_variable_die,
	gen_decl_die): Use TREE_TYPE (TREE_TYPE (decl)) as type
	rather than TREE_TYPE (decl) if DECL_BY_REFERENCE (decl).

From-SVN: r129820
2007-11-01 11:17:42 +01:00
Jakub Jelinek
d0a55efc84 re PR rtl-optimization/33673 (ICE in verify_flow_info, missing barrier, when multiple tree opts disabled)
PR rtl-optimization/33673
	* gcse.c (cprop_jump): If a conditional jump has been optimized
	into unconditional jump, make the remaining normal edge fallthru
	and delete the jump insn.

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

From-SVN: r129819
2007-11-01 09:48:05 +01:00
Ben Elliston
895a813643 emit-rtl.c (set_reg_attrs_from_mem): Clarify function comment.
* emit-rtl.c (set_reg_attrs_from_mem): Clarify function comment.
	(set_mem_attrs_from_reg): Likewise.

From-SVN: r129818
2007-11-01 16:57:02 +11:00
Michael Matz
e08f02f0bb re PR tree-optimization/33961 (gcc 4.3 causes crash valid code to crash)
PR tree-optimization/33961
        * tree-ssa-phiopt.c (struct name_to_bb.store): New member.
        (name_to_bb_hash, name_to_bb_eq): Consider and check it.
        (add_or_mark_expr): New argument 'store', using it to search
        the hash table.
        (nt_init_block): Adjust calls to add_or_mark_expr.

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

From-SVN: r129817
2007-11-01 03:06:38 +00:00
Paolo Carlini
42e2a99953 re PR c++/33494 (Broken diagnostic: 'modop_expr' not supported by dump_expr)
/cp
2007-10-31  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33494
	* cxx-pretty-print.c (pp_cxx_typeid_expression,
	pp_cxx_delete_expression): Change to static linkage.
	* cxx-pretty-print.h: Adjust declarations.
	* error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
	MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
	MODOP_EXPR): Forward to pp_expression.

	* cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
	Fix typo.

/testsuite
2007-10-31  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33494
	* g++.dg/template/error35.C: New.

From-SVN: r129816
2007-11-01 02:18:44 +00:00
Paolo Carlini
066f956c80 re PR c++/33494 (Broken diagnostic: 'modop_expr' not supported by dump_expr)
/cp
2007-10-31  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33494
	* cxx-pretty-print.c (pp_cxx_typeid_expression,
	pp_cxx_delete_expression): Change to static linkage.
	* cxx-pretty-print.h: Adjust declarations.
	* error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
	MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
	MODOP_EXPR): Forward to pp_expression.

	* cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
	Fix typo.

/testsuite
2007-10-31  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33494
	* g++.dg/template/error35.C: New.

From-SVN: r129815
2007-11-01 02:17:02 +00:00
GCC Administrator
e52e300091 Daily bump.
From-SVN: r129811
2007-11-01 00:17:19 +00:00
Jakub Jelinek
a7efdc8427 re PR target/31507 (libffi regression, many.c, closure_fn2/fn3.c with -Os)
PR target/31507
	* config/i386/i386.md (pushsf_rex64): Use X instead of < constraints
	for the first push_operand.

	* gcc.dg/pr31507-1.c: New test.
	* gcc.dg/pr31507-2.c: New test.

From-SVN: r129807
2007-10-31 23:35:01 +01:00
Revital Eres
e2e95f45a8 Enable auto-vectorization for PowerPC 750CL paired-single instructions
From-SVN: r129803
2007-10-31 17:04:42 +00:00
Tobias Burnus
1e4c40729a [multiple changes]
2007-10-31  Tobias Burnus  <burnus@net-b.de>

        PR fortran/33941
        * modules.c (intrinsics): Use only alphabetic names for
        intrinsic operators.


2007-10-31  Dominique d'Humieres  <dominiq@lps.ens.fr>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/33941
        * gfortran.dg/module_read_1.f90: New.

From-SVN: r129801
2007-10-31 16:10:12 +01:00
Tom Tromey
5b9a40df4e re PR preprocessor/30786 (ICE on _Pragma at end of file)
gcc/testsuite
	PR preprocessor/30786:
	* gcc.dg/cpp/pr30786.c: New file.
libcpp
	PR preprocessor/30786:
	* macro.c (builtin_macro): Return result of _cpp_do__Pragma.
	* directives.c (_cpp_do__Pragma): Return error status.
	* internal.h (_cpp_do__Pragma): Update.
	* directives.c (get__Pragma_string): Back up if EOF seen.

From-SVN: r129800
2007-10-31 14:50:13 +00:00
Jerry DeLisle
69d10e15fb re PR fortran/33162 (INTRINSIC functions as ACTUAL argument)
2007-10-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/33162
	* gfortran.dg/interface_19.f90: New.
	* gfortran.dg/interface_20.f90: New.
	* gfortran.dg/interface_21.f90: New.

From-SVN: r129799
2007-10-31 14:30:48 +00:00
Jerry DeLisle
26033479fb re PR fortran/33162 (INTRINSIC functions as ACTUAL argument)
2007-10-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/33162
	* interface.c (compare_intr_interfaces): New function to check intrinsic
	function arguments against formal arguments. (compare_interfaces): Fix
	logic in comparison of function and subroutine attributes.
	(compare_parameter): Use new function for intrinsic as argument.
	* resolve.c (resolve_actual_arglist): Allow an intrinsic without
	function attribute to be checked further.  Set function attribute if
	intrinsic symbol is found, return FAILURE if not.

From-SVN: r129798
2007-10-31 14:26:57 +00:00
Sebastian Pop
2c26cbfd23 re PR tree-optimization/32377 (can't determine dependence (source/destination overlap without more than size))
2007-10-31  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/32377
	* tree-data-ref.c (compute_overlap_steps_for_affine_univar): Make it
	work also for unknown number of iterations.
	(analyze_subscript_affine_affine): Clean up.  Don't fail when the 
	number of iterations is not known.

	* gfortran.dg/vect/pr32377.f90: New.

From-SVN: r129797
2007-10-31 13:53:03 +00:00
Richard Guenther
ac029795f3 re PR middle-end/33779 (folds unsigned multiplication == 0 to true)
2007-10-31  Richard Guenther  <rguenther@suse.de>

	PR middle-end/33779
	* fold-const.c (extract_muldiv_1): Make sure to not introduce
	new undefined integer overflow.
	(fold_binary): Avoid useless conversion.

	* gcc.c-torture/execute/pr33779-1.c: New testcase.
	* gcc.c-torture/execute/pr33779-2.c: Likewise.

From-SVN: r129796
2007-10-31 12:33:05 +00:00
Paul Thomas
182393f4f7 re PR fortran/33897 (Incorrect host association in module)
2007-10-31  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/33897
        * decl.c (gfc_match_entry): Do not make ENTRY name
        global for contained procedures.
        * parse.c (gfc_fixup_sibling_symbols): Fix code for
        determining whether a procedure is external.

2007-10-31  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/33897
        * gfortran.dg/contained_3.f90: New.

From-SVN: r129795
2007-10-31 10:59:16 +01:00
Richard Sandiford
a3d977243d re PR target/33948 (Bootstrap broken on mips-sgi-irix6.5)
gcc/
	PR target/33948
	* config/mips/mips.c (mips_fpr_return_fields): Fix SCALAR_TYPE_P
	check.

From-SVN: r129794
2007-10-31 08:23:30 +00:00
Andreas Krebbel
47d94c1a50 rs6000.opt: Rename -mdfp option to -mhard-dfp.
2007-10-31  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/rs6000/rs6000.opt: Rename -mdfp option to -mhard-dfp.

	* config/s390/s390.c: (override_options): Replace -mhard-dfp/-msoft-dfp
	with -mhard-dfp/-mno-hard-dfp.
	* config/s390/s390.opt: Likewise.
	* config/s390/s390.h: Add MASK_HARD_DFP to the TARGET_DEFAULT
	definition.

From-SVN: r129793
2007-10-31 07:56:01 +00:00
Christian Bruel
0e95aec103 fix PR c++/19531: NRV is performed on volatile temporary
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r129792
2007-10-31 08:55:46 +01:00
GCC Administrator
4ac4ec1822 Daily bump.
From-SVN: r129790
2007-10-31 00:17:17 +00:00
Janis Johnson
ba927a8b4c * tree-ssa.c (execute_update_addresses_taken): Initialize update_vops.
From-SVN: r129787
2007-10-30 22:47:38 +00:00
Janis Johnson
0c166d0f1c invoke.texi (Option Summary): Add -fdce and -fdse to list of optimization options.
* doc/invoke.texi (Option Summary): Add -fdce and -fdse to list of
	optimization options.
	(Optimize Options): Add -fdce and -fdse to the list of optimizations
	enabled by -O.  Document -fdce and -fdse.

From-SVN: r129786
2007-10-30 22:45:00 +00:00
Jakub Jelinek
33a49c17e8 re PR c++/33709 (Type verification failure with new expression)
PR c++/33709
	* fold-const.c (fold_binary): If one argument is COMPOUND_EXPR,
	convert second operand of COMPOUND_EXPR to the original type of
	that argument.

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

From-SVN: r129785
2007-10-30 23:40:13 +01:00
Jakub Jelinek
4c38e99eb4 re PR c++/33616 ("lvalue required as unary '&' operand" with template pmf)
PR c++/33616
	* decl2.c (build_offset_ref_call_from_tree): Call
	build_non_dependent_expr on object prior to building ADDR_EXPR from it
	if FN is DOTSTAR_EXPR.

	* g++.dg/template/ptrmem18.C: New test.

From-SVN: r129784
2007-10-30 23:37:53 +01:00
Francois-Xavier Coudert
e1332188a4 re PR fortran/33596 (ICE with simplified ISNAN)
PR fortran/33596

	* trans-intrinsic.c (gfc_conv_intrinsic_isnan): Strip NOP_EXPR
	from the result of build_call_expr.

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

From-SVN: r129782
2007-10-30 21:48:23 +00:00
Ed Schouten
7e79298c1d re PR tree-optimization/32500 (Loop optimization limits range to size of array used inside loop)
PR tree-optimization/32500
	* gcc.c-torture/execute/pr32500.c: Fix buffer overflow in testcase.

From-SVN: r129781
2007-10-30 20:30:47 +00:00
H.J. Lu
26796ffd3b Remove ">>>>>>> .r129772".
From-SVN: r129777
2007-10-30 10:54:29 -07:00
Doug Gregor
9c6fc6c6e5 Revert accidental change to crash36.C
From-SVN: r129774
2007-10-30 13:38:10 +00:00
Doug Gregor
88b823145e re PR c++/31993 (ICE with template class in variadic template class)
2007-10-30  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/31993
	PR c++/32252
	* pt.c (find_parameter_packs_r): Fix typo in comment.
	(convert_template_argument): Look at the pattern of a pack
	expansion to determine what kind of entity we're converting.
	(coerce_template_parameter_pack): When we have coerced a non-type
	template parameter pack, substitute into the type of that pack.
	(tsubst_pack_expansion): When our substitution of a parameter pack
	is a "trivial" substitution of itself, just substitute into the
	pack expansion rather than actually expanding.

2007-10-30  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/31993
	PR c++/32252
	* g++.dg/cpp0x/pr31993.C: New
	* g++.dg/cpp0x/pr32252.C: New

From-SVN: r129773
2007-10-30 13:36:34 +00:00
Jakub Jelinek
310750d8ec re PR tree-optimization/33723 (Inefficient code with compound literals)
PR tree-optimization/33723
	* gcc.dg/tree-ssa/pr33723.c (T): Decrease size of field s.

From-SVN: r129772
2007-10-30 14:29:57 +01:00
Richard Guenther
e0734f6239 tree-ssa-operands.c (add_vars_for_offset): Fix exit test of loop adding SFTs as virtual operands.
2007-10-30  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.c (add_vars_for_offset): Fix exit test
	of loop adding SFTs as virtual operands.

	* gcc.c-torture/execute/20071030-1.c: New testcase copied from
	gcc.target/i386/loop-3.c.

From-SVN: r129770
2007-10-30 13:22:36 +00:00
Richard Guenther
19d8eb46e3 Makefile.in (dse.o): Add $(OPTABS_H) and $(RECOG_H)
2007-10-30  Richard Guenther  <rguenther@suse.de>

        * Makefile.in (dse.o): Add $(OPTABS_H) and $(RECOG_H)
        * dependencies.

From-SVN: r129768
2007-10-30 09:05:44 +00:00
Revital Eres
56ac967158 Fix vectorizer testcase
From-SVN: r129767
2007-10-30 08:26:14 +00:00
Revital Eres
1631b7dee2 Fix vectorizer testcases
From-SVN: r129766
2007-10-30 07:03:49 +00:00
Dorit Nuzman
a96681aaee re PR target/32893 (zlib segfault in inflate_table() compiled w/ -O -msse2 ftree-vectorize)
PR tree-optimization/32893
        * tree-vectorize.c (vect_can_force_dr_alignment_p): Check
        STACK_BOUNDARY instead of PREFERRED_STACK_BOUNDARY.

From-SVN: r129764
2007-10-30 05:25:10 +00:00
GCC Administrator
43970902e4 Daily bump.
From-SVN: r129759
2007-10-30 00:17:29 +00:00
Rask Ingemann Lambertsen
9fe2319ede longlong.h (add_ssaaaa): Support Intel asm syntax in i386 and x86_64 versions.
* longlong.h (add_ssaaaa): Support Intel asm syntax in i386 and
	x86_64 versions.
	(sub_ddmmss): Likewise.
	(umul_ppmm): Likewise.
	(udiv_qrnnd): Likewise.

From-SVN: r129756
2007-10-29 23:54:54 +00:00
Janis Johnson
9f143763f0 re PR testsuite/24841 (dg-require compilation-test trigged on test with additional-sources barfs)
PR testsuite/24841
	* doc/sourcebuild.texi (Test Directives): Document that dg-require
	directives must come before dg-additional-sources.

From-SVN: r129744
2007-10-29 22:33:53 +00:00
Jakub Jelinek
489f2598af re PR tree-optimization/33723 (Inefficient code with compound literals)
PR tree-optimization/33723
	* c-gimplify.c (c_gimplify_expr): Optimize INIT_EXPR or
	MODIFY_EXPR with non-addressable COMPOUND_LITERAL_EXPR as source.

	* gcc.c-torture/execute/20071029-1.c: New test.
	* gcc.dg/tree-ssa/pr33723.c: New test.

From-SVN: r129743
2007-10-29 23:26:59 +01:00
Richard Sandiford
9f1da821e6 re PR tree-optimization/33614 (ICE on semi-constant vector CONSTRUCTORs)
gcc/
	PR tree-optimization/33614
	* gimplify.c (gimplify_init_constructor): Gimplify vector constructors
	if they can't be reduced to VECTOR_CSTs and aren't legitimate
	initializer constants.

gcc/testsuite/
	PR tree-optimization/33614
	* gcc.c-torture/compile/pr33614.c: New test.

From-SVN: r129739
2007-10-29 22:01:24 +00:00
Richard Guenther
5a347f2b40 re PR tree-optimization/33870 (miscompiles sqlite)
2007-10-29  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/33870
	* tree-ssa-operands.c (add_vars_for_offset): Remove mpt_vars parameter.
	(add_virtual_operand): Do not recurse into MPTs looking for pointed-to
	SFTs.

	* gcc.c-torture/execute/pr33870.x: XFAIL testcase for -O2 and -Os.

From-SVN: r129738
2007-10-29 21:47:05 +00:00
Jakub Jelinek
9c67102d11 re PR tree-optimization/33757 (Revision 126149 fails gcc.dg/tree-ssa/ssa-fre-4.c)
PR tree-optimization/33757
	* gcc.dg/tree-ssa/ssa-fre-4.c: Run on selected TARGET_PROMOTE_PROTOTYPES
	true architectures instead of having a big dg-skip-if.

From-SVN: r129737
2007-10-29 22:42:51 +01:00
Jakub Jelinek
e7df01809d re PR c++/33841 (ICE with non-integral bit-field)
PR c++/33841
	* class.c (check_bitfield_decl): Don't set field's type to error_mark_node
	for non-integral type bitfields.  Return true if bitfield is correct, false
	error has been diagnosed.
	(check_field_decls): If check_bitfield_decl returned false, call also
	check_field_decl.

	* g++.dg/other/bitfield3.C: New test.

From-SVN: r129736
2007-10-29 22:41:29 +01:00
Richard Guenther
324d22176d passes.c (init_optimization_passes): Exchange store_copy_prop with copy_prop.
2007-10-29  Richard Guenther  <rguenther@suse.de>

	* passes.c (init_optimization_passes): Exchange store_copy_prop
	with copy_prop.
	* tree-pass.h (pass_store_copy_prop): Remove.
	* tree-ssa-copy.c (do_store_copy_prop): Remove.
	(stmt_may_generate-copy): Do not handle store_copy_prop.
	(get_copy_of_val): Likewise.
	(set_copy_of_val): Likewise.
	(copy_prop_visit_assignment): Likewise.
	(copy_prop_visit_stmt): Likewise.
	(copy_prop_visit_phi_node): Likewise.
	(init_copy_prop): Likewise.
	(execute_copy_prop): Likewise.
	(do_copy_prop): Remove.
	(gate_store_copy_prop): Likewise.
	(store_copy_prop): Likewise.
	(pass_store_copy_prop): Likewise.
	(pass_copy_prop): Call execute_copy_prop.
	* opts.c (decode_options): Do not set flag_tree_store_copy_prop.
	* common.opt (ftree-store-copy-prop): Mark obsolete.
	* doc/invoke.texi (ftree-store-copy-prop): Remove documentation.

	* gcc.dg/tree-ssa/ssa-copyprop-1.c: Scan optimized dump.

From-SVN: r129734
2007-10-29 21:16:45 +00:00
Ian Lance Taylor
0ba227b5a4 ifcvt.c (noce_can_store_speculate_p): New static function.
* ifcvt.c (noce_can_store_speculate_p): New static function.
	(noce_process_if_block): Call it.
	(if_convert): Remove recompute_dominance parameter.  Change all
	callers.

From-SVN: r129729
2007-10-29 20:41:17 +00:00
Richard Guenther
8ad6aff303 tree-flow-inline.h (get_subvar_at): Use binary search.
2007-10-29  Richard Guenther  <rguenther@suse.de>

	* tree-flow-inline.h (get_subvar_at): Use binary search.
	(get_first_overlapping_subvar): New function to binary search
	for the first overlapping subvar.
	* tree-ssa-operands.c (add_vars_for_offset): Strip down to
	just handle adding subvars for a pointed-to subvar.  Optimize
	and use get_first_overlapping_subvar.
	(add_vars_for_bitmap): Fold into single caller.
	(add_virtual_operand): Streamline, inherit add_vars_for_bitmap
	and non pointed-to bits of add_vars_for_offset.

From-SVN: r129727
2007-10-29 18:27:38 +00:00
Uros Bizjak
bcf49b9e57 ChangeLog: Fix formatting.
* ChangeLog: Fix formatting.
	* testsuite/ChangeLog: Ditto.

From-SVN: r129723
2007-10-29 16:28:55 +01:00
Revital Eres
22c7e1461a SMS: Add use-def chain problem
From-SVN: r129721
2007-10-29 14:45:56 +00:00
Paul Thomas
640670c7f4 [multiple changes]
2007-10-29  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/31217
        PR fortran/33811
        PR fortran/33686
        * trans-array.c (gfc_conv_loop_setup): Send a complete type to
        gfc_trans_create_temp_array if the temporary is character.
        * trans-stmt.c (gfc_trans_assign_need_temp): Do likewise for
        allocate_temp_for_forall_nest.
        (forall_replace): New function.
        (forall_replace_symtree): New function.
        (forall_restore): New function.
        (forall_restore_symtree): New function.
        (forall_make_variable_temp): New function.
        (check_forall_dependencies): New function.
        (cleanup_forall_symtrees): New function.
        gfc_trans_forall_1): Add and initialize pre and post blocks.
        Call check_forall_dependencies to check for all dependencies
        and either trigger second forall block to copy temporary or
        copy lval, outside the forall construct and replace all
        dependent references. After assignment clean-up and coalesce
        the blocks at the end of the function.
        * gfortran.h : Add prototypes for gfc_traverse_expr and
        find_forall_index.
        expr.c (gfc_traverse_expr): New function to traverse expression
        and visit all subexpressions, under control of a logical flag,
        a symbol and an integer pointer. The slave function is caller
        defined and is only called on EXPR_VARIABLE.
        (expr_set_symbols_referenced): Called by above to set symbols
        referenced.
        (gfc_expr_set_symbols_referenced): Rework of this function to
        use two new functions above.
        * resolve.c (find_forall_index): Rework with gfc_traverse_expr,
        using forall_index.
        (forall_index): New function used by previous.
        * dependency.c (gfc_check_dependency): Use gfc_dep_resolver for
        all references, not just REF_ARRAY.
        (gfc_dep_resolver): Correct the logic for substrings so that
        overlapping arrays are handled correctly.

2007-10-29 Paul Thomas <pault@gcc.gnu.org>

        PR fortran/31217
        PR fortran/33811
        * gfortran.dg/forall_12.f90: New test.

        PR fortran/33686
        * gfortran.dg/forall_13.f90: New test.

From-SVN: r129720
2007-10-29 15:13:44 +01:00
Razya Ladelsky
a270181e40 2007-10-29 Razya Ladelsky
Automatic parallelization reduction tests.

        * testsuite/gcc.dg/tree-ssa/reduc-1.c: New test.
        * testsuite/gcc.dg/tree-ssa/reduc-1char.c: New test.
        * testsuite/gcc.dg/tree-ssa/reduc-1short.c: New test.
        * testsuite/gcc.dg/tree-ssa/reduc-2.c: New test.
        * testsuite/gcc.dg/tree-ssa/reduc-2char.c: New test.
        * testsuite/gcc.dg/tree-ssa/reduc-2short.c: New test.
        * testsuite/gcc.dg/tree-ssa/reduc-3.c: New test.
        * testsuite/gcc.dg/tree-ssa/reduc-6.c: New test.
        * testsuite/gcc.dg/tree-ssa/reduc-7.c: New test.
        * testsuite/gcc.dg/tree-ssa/reduc-8.c: New test.
        * testsuite/gcc.dg/tree-ssa/reduc-9.c: New test.

From-SVN: r129718
2007-10-29 11:57:39 +00:00
Razya Ladelsky
e19149bfb0 2007-09-23 Razya Ladelsky
Zdenek Dvorak

	OMP_ATOMIC expand testsuite related changes.

	* testsuite/gcc.dg/gomp/atomic-3.c: Search for string on
	ompexp dump instead of gimple dump.
	* testsuite/gcc.dg/gomp/atomic-9.c: Same.
	* testsuite/gcc.dg/gomp/atomic-10.c: Same.
	* testsuite/g++.dg/gomp/atomic-3.C: Same.
	* testsuite/g++.dg/gomp/atomic-9.C: Same.
	* testsuite/g++.dg/gomp/atomic-10.C: Same.

From-SVN: r129717
2007-10-29 11:09:09 +00:00
Razya Ladelsky
a509ebb5a1 2007-09-23 Razya Ladelsky
Zdenek Dvorak

        OMP_ATOMIC Changes,
        Reduction support for automatic parallelization.

        * expr.c (expand_expr_real_1): Add cases for OMP_ATOMIC_LOAD,
        OMP_ATOMIC_STORE.
        * Makefile.in: Add dependencies to expr.o, tree-parloops.o, omp-low.o
        * tree-pretty-print.c (dump_generic_node): Add OMP_ATOMIC_LOAD
        and OMP_ATOMIC_STORE.
        * tree.h (OMP_DIRECTIVE_P): Add OMP_ATOMIC_LOAD,
        OMP_ATOMIC_STORE.
        * gimple-low.c (lower_stmt): Same.
        * gimplify.c (gimplify_expr): Same.
        (gimplify_omp_atomic_fetch_op, gimplify_omp_atomic_pipeline,
        gimplify_omp_atomic_mutex): Remove.
        (gimplify_omp_atomic): Change it to simply gimplify the
        statement instead of expanding it.
        * omp-low.c: Add includes to optabs.h, cfgloop.h.
        (expand_omp_atomic, expand_omp_atomic_pipeline,
        goa_stabilize_expr, expand_omp_atomic_mutex,
        expand_omp_atomic_fetch_op): New functions to implement
        expansion of OMP_ATOMIC.
        (expand_omp, build_omp_regions_1): Add support for
        OMP_ATOMIC_LOAD/OMP_ATOMIC_STORE.
        * tree-cfg.c (make_edges): add case for OMP_ATOMIC_LOAD,
        OMP_ATOMIC_STORE.
        * tree-gimple.c (is_gimple_stmt): Add OMP_ATOMIC_LOAD,
        OMP_ATOMIC_STORE.
        * tree-parloops.c: add include to tree-vectorizer.h.
        (reduction_info): New structure for reduction.
        (reduction_list): New list to represent list of reductions
        per loop.
        (struct data_arg): New helper structure for reduction.
        (reduction_info_hash, reduction_info_eq, reduction_phi,
        initialize_reductions,
        create_call_for_reduction, create_phi_for_local_result,
        create_call_for_reduction_1, create_loads_for_reductions,
        create_final_loads_for_reduction): New functions.
        (loop_parallel_p): Identify reductions, add reduction_list parameter.
        (separate_decls_in_loop_name): Support reduction variables.
        (separate_decls_in_loop): Add reduction_list and ld_st_data arguments,
        call create_loads_for_reduction for each reduction.
        (canonicalize_loop_ivs): Identify reductions, add reduction_list
        parameter.
        (transform_to_exit_first_loop): Add reduction support, add
        reduction_list parameter.
        (gen_parallel_loop): Add reduction_list parameter. Add call
        separate_decls_in_loop with
        the new argument. Traverse reductions and call
        initialize_reductions, create_call_for_reduction.
        (parallelize_loops): Create and delete the reduction list.
        (add_field_for_name): Change use of data parameter. Add fields for
        reductions.
        * tree-vectorizer.h (vect_analyze_loop_form): Add declaration.
        * tree-vect-analyze.c (vect_analyze_loop_form): export it.
        * tree.def: Add definitions for OMP_ATOMIC_LOAD,
        OMP_ATOMIC_STORE.
        * tree-inline.c (estimate_num_insns_1): add cases for
        OMP_ATOMIC_LOAD, OMP_ATOMIC_STORE.
        * tree-cfg.c (make_edges): Add OMP_ATOMIC_LOAD,
        OMP_ATOMIC_STORE.
        * tree-ssa-operands.c (get_addr_dereference_operands):
        New function. Subroutine of get_indirect_ref_operands.
        (get_indirect_ref_operands): Call get_addr_dereference_operands.
        (get_expr_operands): Support OMP_ATOMIC_LOAD, OMP_ATOMIC_STORE.

From-SVN: r129716
2007-10-29 11:05:04 +00:00
Hans-Peter Nilsson
a3ef23490a cris.c: Include df.h.
* config/cris/cris.c: Include df.h.
	(cris_address_cost): Add gcc_assert for canonicalization
	assumptions.  For PLUS with MULT or register, correct
	test for register in other arm.  Tweak comments.

From-SVN: r129713
2007-10-29 00:26:20 +00:00
GCC Administrator
f153d30ada Daily bump.
From-SVN: r129711
2007-10-29 00:17:34 +00:00
Paolo Carlini
8259e4f5bd re PR c++/30659 (ICE in undefined template)
cp/
2007-10-28  Paolo Carlini  <pcarlini@suse.de>
	    Mark Mitchell  <mark@codesourcery.com>

	PR c++/30659
	* pt.c (do_decl_instantiation): If the VAR_DECL is not a
	class member error out and return.

testsuite/
2007-10-28  Paolo Carlini  <pcarlini@suse.de>
	    Mark Mitchell  <mark@codesourcery.com>

	PR c++/30659
	* g++.dg/template/crash71.C: New.

Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r129710
2007-10-29 00:17:10 +00:00
Richard Guenther
a9077d27da tree-ssa-operands.c (add_vars_for_offset): Add parameter telling if the var is to be treated as points-to location.
2007-10-28  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.c (add_vars_for_offset): Add parameter
	telling if the var is to be treated as points-to location.
	(add_vars_for_bitmap): Pass true to add_vars_for_offset.
	(add_virtual_operand): Only recurse into MPTs if aliases
	is from a NMT.

From-SVN: r129704
2007-10-28 21:39:15 +00:00
Richard Guenther
07bd622793 tree-ssa-operands.c (add_vars_for_offset): Clean and speed up.
2007-10-28  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.c (add_vars_for_offset): Clean and speed up.
	(add_vars_for_bitmap): Do not recurse further.  Only add vars
	for pointed-to SFTs.
	(add_virtual_operand): Re-instantiate loop to add operands for
	aliases.  Recurse into MPTs.
	(get_indirect_ref_operands): If we fall back to use a pointers
	SMT, make sure to not prune based on the access offset and size.

From-SVN: r129702
2007-10-28 19:03:05 +00:00
Tobias Schlüter
5cb4180570 re PR fortran/32147 (Module file change due to order of writting out changes)
fortran/
PR fortran/32147
* module.c (write_symbol): Fix whitespace.
(write_symbol0): Walk symtree from left-to-right instead
breadth-first.
(write_symbol1): Similarly change walk of pointer info tree.
(write_module): Insert linebreak.
* symbol.c (gfc_traverse_symtree): Change to left-to-right order.
(traverse_ns): Likewise.

testsuite/
PR fortran/32147
* gfortran.dg/module_md5_1.f90: Update hash-value.

From-SVN: r129701
2007-10-28 19:53:27 +01:00
Andrew Pinski
6f17d116b7 re PR middle-end/33589 (ICE on valid code at -O2: verify_flow_info failed)
2007-10-28  Andrew Pinski  <pinskia@gmail.com>

        PR tree-opt/33589
        * tree-outof-ssa.c (rewrite_trees): If the statement changed, cleanup
        the eh information on the statement.
2007-10-28  Andrew Pinski  <pinskia@gmail.com>

        PR tree-opt/33589
        * g++.dg/torture/pr33589-1.C: New testcase.
        * g++.dg/torture/pr33589-2.C: New testcase.

From-SVN: r129700
2007-10-28 10:00:54 -07:00
Richard Guenther
eee717aa54 tree-flow.h (subvar_t): Make it a VEC.
2007-10-28  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (subvar_t): Make it a VEC.
	(struct subvar): Remove.
	(struct var_ann_d): Use VEC(tree,gc) to store subvars.
	* tree-flow-inline.h (get_subvar_at): Adjust iterators over
	variable subvars.
	* tree-into-ssa.c (mark_sym_for_renaming): Likewise.
	* tree-nrv.c (dest_safe_for_nrv_p): Likewise.
	* tree-ssa-alias.c (mark_aliases_call_clobbered): Likewise.
	(set_initial_properties): Likewise.
	(setup_pointers_and_addressables): Likewise.
	(new_type_alias): Likewise.
	(create_overlap_variables_for): Likewise.
	* tree-dfa.c (dump_subvars_for): Likewise.
	* tree-ssa-operands.c (add_vars_for_offset): Likewise.
	(get_expr_operands): Likewise.
	(add_to_addressable_set): Likewise.
	* tree-ssa-structalias.c (set_uids_in_ptset): Likewise.

	* gcc.dg/tree-ssa/alias-15.c: Adjust pattern.

From-SVN: r129699
2007-10-28 16:14:44 +00:00
Uros Bizjak
77bd31de7e re PR tree-optimization/33920 (Segfault in combine_blocks/tree-if-conv.c)
PR tree-optimization/33920
        * tree-if-conv.c (tree_if_conversion): Force predicate of single
        successor bb to true when predecessor bb has NULL predicate.
        (find_phi_replacement_condition): Assert that tmp_cond is non-null.

testsuite/ChangeLog:

        PR tree-optimization/33920
        * gcc.dg/tree-ssa/pr33290.c: New test.

From-SVN: r129696
2007-10-28 15:57:50 +01:00
Richard Sandiford
c8d6f9e7e5 mips.md: Add combiner patterns for DImode extensions of HImode and QImode truncations.
gcc/
	* config/mips/mips.md: Add combiner patterns for DImode extensions
	of HImode and QImode truncations.  Reformat HImode <- QImode pattern
	for consistency.

From-SVN: r129695
2007-10-28 11:37:50 +00:00
Richard Sandiford
9a4a025a01 re PR target/33895 (mips.c:6868: error: 'mips_output_dwarf_dtprel' defined but not used)
gcc/
	PR target/33895
	* config/mips/mips.c (mips_output_dwarf_dtprel): Add ATTRIBUTE_UNUSED.

From-SVN: r129694
2007-10-28 11:19:49 +00:00
Andreas Krebbel
137e9a70b7 dce.c (delete_unmarked_insns): Just delete the RETVAL and LIBCALL notes if...
2007-10-28  Andreas Krebbel  <krebbel1@de.ibm.com>

	* dce.c (delete_unmarked_insns): Just delete the RETVAL and
	LIBCALL notes if they are about to be moved to the same insn.

From-SVN: r129693
2007-10-28 10:14:21 +00:00
GCC Administrator
c7a7567d52 Daily bump.
From-SVN: r129690
2007-10-28 00:17:15 +00:00
Jerry DeLisle
19e8402866 re PR fortran/31306 (ICE with implicit character variables)
2007-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>

	PR fortran/31306
	* gfortran.dg/argument_check_7.f90: New test.
	* gfortran.dg/argument_check_8.f90: New test.

From-SVN: r129686
2007-10-27 18:25:43 +00:00
Jerry DeLisle
cba28dad93 re PR fortran/31306 (ICE with implicit character variables)
2007-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>

	PR fortran/31306
	* decl.c (char_len_param_value): Add check for conflicting attributes of
	function argument.

From-SVN: r129685
2007-10-27 17:59:59 +00:00
Uros Bizjak
735da29ae3 i386-2.C: Include bmmintrin.h.
* g++.dg/other/i386-2.C: Include bmmintrin.h. Add -msse5 to dg-options.
        * gcc.target/i386/sse-13.c: Also include mm3dnow.h.  Add
        "-march=k8 -m3dnow" to check 3dnow and 3dnowA intrinsics.
        * gcc.target/i386/sse-14.c: Ditto.

From-SVN: r129684
2007-10-27 18:17:49 +02:00
Jakub Jelinek
d5aa2cf0de error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope to current_function_decl rather than 0.
* error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
	to current_function_decl rather than 0.

From-SVN: r129683
2007-10-27 17:56:49 +02:00
Jakub Jelinek
1e3eacc7cb re PR c++/33844 (Broken diagnostic: 'dotstar_expr/member_ref' not supported by pp_cxx_unqualified_id)
PR c++/33844
	* cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
	->* rather than .*.
	* error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.

	* g++.dg/other/ptrmem8.C: New test.

From-SVN: r129682
2007-10-27 17:55:34 +02:00
Jason Merrill
d02dbde6c7 re PR c++/5247 (Memory eating infinite loop on default parameter in constructor which is reference to class)
PR c++/5247
        * call.c (convert_default_arg): Detect recursion.

From-SVN: r129681
2007-10-27 11:19:45 -04:00
Tobias Burnus
1200489c46 re PR fortran/33862 (Support .FTN file extension for Fortran fixed-format source files)
2007-10-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/33862
        * lang-specs.h: Support .ftn and .FTN extension, use CPP for .FOR.
        * options.c (form_from_filename): Support .ftn extension.
        * gfortran.texi: Document support of .for and .ftn file extension.

From-SVN: r129680
2007-10-27 16:43:53 +02:00
Jakub Jelinek
094a5fe265 re PR c++/33842 (Broken diagnostic: 'offsetof_expr' not supported by dump_expr)
PR c++/33842
	* cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
	* cxx-pretty-print.c (pp_cxx_primary_expression): Handle
	OFFSETOF_EXPR.
	(pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
	functions.
	* error.c (dump_expr): Handle OFFSETOF_EXPR.

	* g++.dg/template/error34.C: New test.

From-SVN: r129677
2007-10-27 13:58:26 +02:00
Uros Bizjak
d449b45833 ivopts-1.C: Also search for "offset: 4294967292".
* g++.dg/tree-ssa/ivopts-1.C: Also search for "offset: 4294967292".

From-SVN: r129676
2007-10-27 13:54:19 +02:00
Richard Guenther
03c4c2e0c7 re PR tree-optimization/33870 (miscompiles sqlite)
2007-10-27  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/33870
	* tree-ssa-operands.c (add_vars_for_offset): Reduce code
	duplication.  Remove redundant call to access_can_touch_variable.
	(add_vars_for_bitmap): New helper for recursing over MPT contents.
	(add_virtual_operand): Use it.

	* gcc.dg/tree-ssa/alias-15.c: New testcase.
	* gcc.c-torture/execute/pr33870.c: Likewise.

From-SVN: r129675
2007-10-27 11:10:09 +00:00
Jerry DeLisle
2bd1ffcd4a re PR fortran/33162 (INTRINSIC functions as ACTUAL argument)
2007-10-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/33162
	* gfortran.dg/argument_checking_9.f90: New test.

From-SVN: r129674
2007-10-27 00:57:26 +00:00
Jerry DeLisle
15ead8598a re PR fortran/33162 (INTRINSIC functions as ACTUAL argument)
2007-10-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/33162
	* intrinsic.h: Add prototypes for four new functions, gfc_check_datan2,
	gfc_check_dprod, gfc_check_fn_d, and gfc_check_x_yd.
	* intrinsic.c (add_functions): Add double precision checks for dabs,
	dacos, dacosh, dasin, dasinh, datan, datanh, datan2, dbesj0, dbesj1,
	dbesy0, dbesy1, dcos, dcosh, ddim, derf, derfc, dexp, dgamma,
	dlgama, dlog, dlog10, dmod, dsign, dsin, dsinh, dsqrt, dtan, and dtanh.
	Add real check dprod.
	* check.c (gfc_check_datan2): New function to check for double precision
	argumants. (gfc_check_dprod, gfc_check_fn_d, and gfc_check_x_yd): Ditto.

From-SVN: r129673
2007-10-27 00:54:20 +00:00
John David Anglin
00e65cfa89 re PR fortran/31608 (wrong types in character array/scalar binop)
PR fortran/31608
	* pa.h (ASM_PN_FORMAT): Delete define.

From-SVN: r129671
2007-10-27 00:21:02 +00:00
GCC Administrator
02c99cd052 Daily bump.
From-SVN: r129669
2007-10-27 00:17:28 +00:00
Janis Johnson
d228aace97 invoke.texi (Option Summary, [...]): Remove -fbounds-check.
* doc/invoke.texi (Option Summary, optimizations): Remove
	-fbounds-check.  Add -fassociative-math, -freciprocal-math,
	-ftree-vrp and -funit-at-a-time.  Change -fno-split-wide-types to
	-fsplit-wide-types to match later entry.  Break up a long line.
	(Option Summary, code gen options)  Add -fno-stack-limit.  Add
	missing @gol to the end of a line.
	(Optimization Options): Remove -fbounds-check, which is also
	documented under Code Generation Options.  Remove =n from
	index entry for -ftree-parallelize-loops.  Change -fno-cprop-registers
	to -fcprop-registers to match other options, and say when it is
	enabled rather than disabled.  Remove extra index entry for
	-fno-cx-limited-range.  Add index entries for -fstack-protector
	and -fstack-protector-all.
	(Code Gen Options): Add index entry for -ftls-model.

From-SVN: r129664
2007-10-26 22:03:57 +00:00
Jerry DeLisle
efb6658632 invoke.texi: Fix typo in -fmax-errors=.
2007-10-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* invoke.texi: Fix typo in -fmax-errors=.

From-SVN: r129663
2007-10-26 21:59:07 +00:00
Anatoly Sokolov
96ac4c9bbd avr.c (avr_OS_task_function_p): Add new function.
* config/avr/avr.c (avr_OS_task_function_p): Add new function.
	(avr_regs_to_save): Handle functions with 'OS_task' attribute.
	(avr_simple_epilogue, expand_prologue, avr_asm_function_end_prologue,
	expand_epilogue, output_movhi): Don't handle 'main' function.
	(avr_attribute_table): Add 'OS_task' function attribute.
	* config/avr/avr.h (machine_function): Remove 'is_main' field, add
	'is_OS_task' field.
	* config/avr/avr.md (return_from_main_epilogue): Remove insn.
	(return_from_epilogue, return_from_interrupt_epilogue): Don't handle
	'main' function.
	* config/avr/avr.opt (minit-stack): Remove.

From-SVN: r129662
2007-10-27 01:36:25 +04:00
Eric Botcazou
bc4c8d897f tree-nested.c (get_trampoline_type): Fix thinko.
* tree-nested.c (get_trampoline_type): Fix thinko.

From-SVN: r129661
2007-10-26 21:20:36 +00:00
Jason Merrill
91a77d68e7 re PR c++/24791 (ICE on invalid instantiation of template's static member)
PR c++/24791
        * pt.c (get_template_info): New fn.
        (template_class_depth): Use it.
        (push_template_decl_real): Check that the template args of the
        definition match the args of the previous declaration.

From-SVN: r129660
2007-10-26 15:54:10 -04:00
Douglas Gregor
4552f5a2c8 re PR c++/33601 (ICE with pointers to members using "const C" as the class identifier)
2007-10-26  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/33601
	* tree.c (build_offset_type): Build canonical type based on the
	TYPE_MAIN_VARIANT of the base type.

2007-10-26  Douglas Gregor  <doug.gregor@gmail.com>

	* g++.dg/other/pr33601.C: New.

From-SVN: r129659
2007-10-26 19:34:03 +00:00
Paolo Carlini
07021f8c63 re PR c++/31988 (new operator should not permit default first parameter)
cp/
2007-10-26  Paolo Carlini  <pcarlini@suse.de>

	PR c++/31988
	* decl2.c (coerce_new_type): Do not allow a default argument for
	the first parameter.

testsuite/
2007-10-26  Paolo Carlini  <pcarlini@suse.de>

	PR c++/31988
	* g++.dg/init/new25.C: New.

From-SVN: r129657
2007-10-26 18:32:41 +00:00
Douglas Gregor
2b536806af re PR c++/33839 (ICE with decltype)
2007-10-26  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/33839
	* parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
	don't see the leading '('. Only lookup names if we get an
	IDENTIFIER_NODE.

2007-10-26  Douglas Gregor  <doug.gregor@gmail.com>

	* g++.dg/cpp0x/pr33839.C: New.

From-SVN: r129656
2007-10-26 17:53:56 +00:00
Daniel Jacobowitz
90a1c3cea3 reorg.c (emit_delay_sequence): Move insn locator from the first insn to the sequence.
* reorg.c (emit_delay_sequence): Move insn locator from the
	first insn to the sequence.

From-SVN: r129651
2007-10-26 12:19:34 +00:00
Jakub Jelinek
0f1e332126 re PR c++/33744 (function-style cast and '>' not allowed in template argument)
PR c++/33744
	* parser.c (cp_parser_parenthesized_expression_list): Set
	greater_than_is_operator_p to true in between the parens.

	* g++.dg/template/arg6.C: New test.

From-SVN: r129648
2007-10-26 13:57:46 +02:00
Paolo Carlini
9b70c6b078 re PR c++/31747 (ICE combining static and extern)
cp/
2007-10-26  Paolo Carlini  <pcarlini@suse.de>

	PR c++/31747
	* decl.c (grokdeclarator): In case of conflicting specifiers
	just return error_mark_node.

testsuite/
2007-10-26  Paolo Carlini  <pcarlini@suse.de>

	PR c++/31747
	* g++.dg/parse/crash39.C: New.

From-SVN: r129647
2007-10-26 09:57:12 +00:00
Uros Bizjak
0f095169ae ivopts-1.C: Remove xfail on the search for "&x\\\[5\\\]" pattern.
* g++.dg/tree-ssa/ivopts-1.C: Remove xfail on the search for
	"&x\\\[5\\\]" pattern.  Search for "offset: 0x0f+fc" insetad of
	"offset: -4B".

From-SVN: r129646
2007-10-26 10:33:39 +02:00
Ollie Wild
3459ca230e expr.c (cxx_expand_expr): Removed.
gcc/cp/
	* expr.c (cxx_expand_expr): Removed.
	* cp-tree.h (exx_expand_expr): Removed.
	* cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
	with c_expand_expr.

From-SVN: r129645
2007-10-26 08:19:14 +00:00
Samuel Tardieu
eb80272af1 ipa-pure-const.c (check_decl): Return immediately when pure_const_state has been set to IPA_NEITHER.
* ipa-pure-const.c (check_decl): Return immediately when
        pure_const_state has been set to IPA_NEITHER.

From-SVN: r129644
2007-10-26 09:08:05 +02:00
GCC Administrator
70c0cfc9e5 Daily bump.
From-SVN: r129642
2007-10-26 00:17:11 +00:00
David Daney
ccbf3d066f * g++.dg/tree-ssa/copyprop-1.C: Remove xfail.
From-SVN: r129639
2007-10-26 00:06:51 +00:00
Paolo Carlini
6735e374b2 re PR c++/33843 (Broken diagnostic: 'bit_not_expr' not supported by pp_cxx_unqualified_id)
2007-10-25  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33843
	* cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.

2007-10-25  Paolo Carlini  <pcarlini@suse.de>

	PR c++/33843
	* g++.dg/template/error32.C: New.

From-SVN: r129637
2007-10-25 23:42:49 +00:00
Francois-Xavier Coudert
691307546e re PR fortran/29784 ([doc] No I/O conversion of logical/integer)
PR fortran/29784
	* gfortran.texi: Document that there is no logical/integer
	conversion performed during I/O operations.

From-SVN: r129635
2007-10-25 23:27:12 +00:00
Ira Rosen
8d358a4aae re PR tree-optimization/33833 (ICE in build2_stat, at tree.c:3110 at -O3, tree-vectorizer)
PR tree-optimization/33833
	* tree-vect-analyze.c (vect_analyze_data_refs): Use POINTER_PLUS_EXPR
	and convert init to sizetype in inner_base construction.

From-SVN: r129628
2007-10-25 16:41:45 +00:00
David Daney
7f1d67caa7 * gcc.dg/tree-ssa/20040204-1.c: Un-xfail for mips*-*-*.
From-SVN: r129627
2007-10-25 16:11:27 +00:00
Richard Guenther
cfff829fc6 tree-flow.h (mem_sym_stats): Remove.
2007-10-25  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (mem_sym_stats): Remove.
	(dump_mem_sym_stats_for_var): Declare.
	* tree-dfa.c (dump_variable): Call dump_mem_sym_stats_for_var.
	(mem_sym_stats): Move ...
	* tree-ssa-alias.c (mem_sym_stats): ... here and make it static.
	(mem_sym_score): Rename from ...
	(pscore): ... this.  Remove.
	(dump_mem_sym_stats_for_var): New function.  Dump the score, but
	not the frequencies.
	(compare_mp_info_entries): Make sort stable by disambiguating
	on DECL_UID.

From-SVN: r129625
2007-10-25 12:38:38 +00:00
Ira Rosen
0bf2cf8907 re PR tree-optimization/33866 (ICE in vect_get_vec_def_for_stmt_copy, at tree-vect-transform.c:1937)
PR tree-optimization/33866
	* tree-vect-transform.c (vectorizable_store): Check operands of all the
	stmts in the group of strided accesses. Get def stmt type for each store
	in the group and pass it to vect_get_vec_def_for_stmt_copy ().

From-SVN: r129623
2007-10-25 07:25:55 +00:00
Uros Bizjak
e2520c41ed constraints.md (Y0): Rename register constraint to Yz.
* config/i386/constraints.md (Y0): Rename register constraint to Yz.
        (Yt): Rename register constraint to Y2.
        * config/i386/sse.md: Use renamed register constraints.
        * config/i386/mmx.md: Ditto.
        * config/i386/i386.md: Ditto.

        * config/i386/i386.md (*dummy_extendsfdf2): Fix operand 1 constraint.

From-SVN: r129622
2007-10-25 07:41:37 +02:00
Chao-ying Fu
9a9f6b5266 dwarf2out.c (base_type_die): Use DW_ATE_unsigned_fixed or DW_ATE_signed_fixed to describe FIXED_POINT_TYPE.
* dwarf2out.c (base_type_die): Use DW_ATE_unsigned_fixed or
	DW_ATE_signed_fixed to describe FIXED_POINT_TYPE.

From-SVN: r129620
2007-10-25 01:02:35 +00:00
GCC Administrator
7790f79410 Daily bump.
From-SVN: r129618
2007-10-25 00:17:27 +00:00
Samuel Tardieu
8d66f74218 ipa-struct-reorg.c (replace_field_acc): Make it clear to the compiler that wr.wrap and wr.domain are initialized in any...
2007-10-24  Samuel Tardieu  <sam@rfc1149.net>
            Olga Golovanevsky <olga@il.ibm.com>

	* ipa-struct-reorg.c (replace_field_acc): Make it clear to
	the compiler that wr.wrap and wr.domain are initialized in
	any case.

2007-10-24  Samuel Tardieu  <sam@rfc1149.net>

	* ipa-struct-reorg.c (sum_counts): Use HOST_WIDEST_PRINT_DEC
	to print gcov_type values.

Co-Authored-By: Olga Golovanevsky <olga@il.ibm.com>

From-SVN: r129615
2007-10-24 21:49:27 +00:00
Eric B. Weddington
1de59a139b avr.h: Do not include progmem_section definition when building with IN_TARGET_LIBS.
* config/avr/avr.h: Do not include progmem_section definition when
	building with IN_TARGET_LIBS.

From-SVN: r129614
2007-10-25 01:00:41 +04:00
Uros Bizjak
1e88911415 Forgot one file from my previous commit.
From-SVN: r129613
2007-10-24 22:57:14 +02:00
Uros Bizjak
1e204b2bf1 pr11001-*.c: Remove -m32 from compile flags.
* gcc.target/i386/pr11001-*.c: Remove -m32 from compile flags.
        Add -w to compile flags to suppress "call-clobbered register" warnings
        and remove dg-warning directives.

From-SVN: r129612
2007-10-24 22:55:28 +02:00
Uros Bizjak
6580453213 sms-2.c: Cleanup sms dump file.
* gcc.dg/sms-2.c: Cleanup sms dump file.
        * gcc.dg/tree-prof/tracer-1.c: Cleanup tracer dump file after the
        profile-use step.

From-SVN: r129611
2007-10-24 22:23:35 +02:00
Jason Merrill
7179604fa7 comment typo
From-SVN: r129610
2007-10-24 15:58:57 -04:00
David Daney
876fa8ec87 * gcc.dg/tree-ssa/update-threading.c: Remove xfail.
From-SVN: r129608
2007-10-24 18:02:34 +00:00
Richard Sandiford
a35de34276 re PR target/33755 (Gcc 4.2.2 broken for mips linux kernel builds)
gcc/
	PR target/33755
	* config/mips/mips.c (mips_lo_sum_offset): New structure.
	(mips_hash_base, mips_lo_sum_offset_hash, mips_lo_sum_offset_eq)
	(mips_lo_sum_offset_lookup, mips_record_lo_sum)
	(mips_orphaned_high_part_p: New functions.
	(mips_avoid_hazard): Don't check INSN_P here.
	(mips_avoid_hazards): Rename to...
	(mips_reorg_process_insns): ...this.  Cope with
	!TARGET_EXPLICIT_RELOCS.  Delete orphaned high-part relocations,
	or turn them into nops.
	(mips_reorg): Remove TARGET_EXPLICIT_RELOCS check from calls to
	dbr_schedule and mips_avoid_hazards/mips_reorg_process_insns.
	(mips_set_mips16_mode): Don't set flag_delayed_branch here.
	(mips_override_options): Set flag_delayed_branch to 0.

gcc/testsuite/
	PR target/33755
	* gcc.target/mips/pr33755.c: New test.

From-SVN: r129606
2007-10-24 17:52:16 +00:00
Richard Sandiford
a1c6b246b5 mips.h (MOVE_MAX): Use UNITS_PER_WORD and describe MIPS-specific implementation details.
gcc/
	* config/mips/mips.h (MOVE_MAX): Use UNITS_PER_WORD and describe
	MIPS-specific implementation details.
	(MIPS_MAX_MOVE_BYTES_PER_LOOP_ITER): New macro.
	(MIPS_MAX_MOVE_BYTES_STRAIGHT): Likewise.
	(MOVE_RATIO): Define to MIPS_MAX_MOVE_BYTES_STRAIGHT / UNITS_PER_WORD
	for targets with movmemsi.
	(MOVE_BY_PIECES_P): Define.
	* config/mips/mips.c (MAX_MOVE_REGS, MAX_MOVE_BYTES): Delete.
	(mips_block_move_loop): Add a bytes_per_iter argument.
	(mips_expand_block_move): Use MIPS_MAX_MOVE_BYTES_STRAIGHT.
	Update call to mips_block_move_loop.

From-SVN: r129605
2007-10-24 17:46:39 +00:00
Jason Merrill
510359760e comment typo
From-SVN: r129603
2007-10-24 10:58:49 -04:00
Michael Matz
e56f915286 re PR debug/33868 (Gross memory usage of var-tracking)
PR debug/33868
        * var-tracking.c (variable_union): Don't break after one loop
        * iteration
        but only when a difference is found.
        (dump_variable): Also print DECL_UID.

From-SVN: r129602
2007-10-24 12:54:24 +00:00
Olga Golovanevsky
32154c8905 Fogot to commit ipa-struct-reorg.c ipa-struct-reorg.h.
From-SVN: r129601
2007-10-24 12:48:41 +00:00
Olga Golovanevsky
e1dc98b235 ipa-type-escape.h: Expose function is_array_access_through_pointer_and_index.
2007-10-24  Olga Golovanevsky  <olga@il.ibm.com>

      * ipa-type-escape.h: Expose function
      is_array_access_through_pointer_and_index.
      * ipa-type-escape.c
      (is_array_access_through_pointer_and_index):
      Add three new parameters. Add support of
      POINTER_PLUS_EXPR tree code.

2007-10-24  Olga Golovanevsky  <olga@il.ibm.com>

      * ipa-struct-reorg.c, ipa-struct-reorg.h: New files.
      * tree-pass.h: Add pass_ipa_struct_reorg.
      * common.opt: Add ipa-struct-reorg flag.
      * Makefile.in: Add ipa-strcut-reorg.o compilation.
      * passes.c: Add pass pass_ipa_struct_reorg.
      * params.h:  Add STRUCT_REORG_COLD_STRUCT_RATIO.
      * params.def: Add PARAM_STRUCT_REORG_COLD_STRUCT_RATIO.

From-SVN: r129600
2007-10-24 10:36:30 +00:00
Ira Rosen
712f117220 re PR tree-optimization/33804 (ICE in vect_transform_stmt, at tree-vect-transform.c:6131 with -ftree-vectorize)
PR tree-optimization/33804
	* tree-vect-transform.c (vectorizable_operation): Remove the
	checks that the vectorization is worthwhile from the transformation
	phase.

From-SVN: r129599
2007-10-24 09:35:00 +00:00
Ira Rosen
20e545c381 tree-vect-analyze.c (vect_build_slp_tree): Return false if vectype cannot be determined for the scalar type.
* tree-vect-analyze.c (vect_build_slp_tree): Return false if
	vectype cannot be determined for the scalar type.
	(vect_analyze_slp_instance): Likewise.
	* tree-vect-transform.c (vect_model_reduction_cost): Change the
	return type to bool. Return false if vectype cannot be determined 
	for the scalar type.
	(vect_get_constant_vectors): Return false if vectype cannot be
	determined for the scalar type.
	(get_initial_def_for_induction, vect_get_vec_def_for_operand,
	get_initial_def_for_reduction, vect_create_epilog_for_reduction,
	vectorizable_reduction): Likewise.

From-SVN: r129598
2007-10-24 07:51:09 +00:00
Jason Merrill
6f4fd5362d PR c++/25950 (DR 391)
PR c++/25950 (DR 391)
        * call.c (struct conversion): Remove check_copy_constructor_p.
        (reference_binding): Always bind a reference directly to a
        compatible class rvalue.  Pass down LOOKUP_NO_TEMP_BIND during
        temporary creation.
        (check_constructor_callable): Remove.
        (convert_like_real): Don't call it.
        (initialize_reference): Don't call check_constructor_callable.
        (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
        LOOKUP_CONSTRUCTOR_CALLABLE.  Don't require a temporary for base
        conversions if LOOKUP_NO_TEMP_BIND.
        (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
        (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
        second conversion.
        * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.

From-SVN: r129596
2007-10-23 23:45:37 -04:00
Jerry DeLisle
d72702e2cb re PR fortran/33849 (Fix misleading error message "GENERIC non-INTRINSIC procedure not allowed as an actual argument")
2007-10-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR forrtran/33849
	gfortran.dg/generic_actual_arg.f90: Fix dg-error message.

From-SVN: r129595
2007-10-24 03:39:03 +00:00
GCC Administrator
6a8204bbe1 Daily bump.
From-SVN: r129593
2007-10-24 00:17:28 +00:00
Craig Rodrigues
b2449d40f0 config.gcc: For a FreeBSD target...
* config.gcc: For a FreeBSD target, parse the value of ${target}
	to determine the value of FBSD_MAJOR, instead of adding an
	explicit check for every possible FreeBSD major version.

From-SVN: r129590
2007-10-23 23:53:31 +00:00
Uros Bizjak
881ef7be46 re PR rtl-optimization/33846 (ICE in trunc_int_for_mode, at explow.c:55)
PR rtl-optimization/33846
        * combine.c (simplify_shift_const_1) [NOT]: Skip vector modes.

testsuite/ChangeLog:

        PR rtl-optimization/33846
        * gcc.dg/vect/pr33846.c: New testcase.

From-SVN: r129589
2007-10-23 22:15:04 +02:00
Dorit Nuzman
68cba9eee7 re PR tree-optimization/33860 (ICE in vectorizable_load, at tree-vect-transform.c:5503)
PR tree-optimization/33860
        * tree-vect-transform.c (vect_analyze_data_ref_access): Don't allow
        interleaved accesses in case the dr is inside the inner-loop during
        outer-loop vectorization.

From-SVN: r129587
2007-10-23 19:50:18 +00:00
Eric Botcazou
d1ed933d78 rtl.texi (Flags): Fix MEM_SCALAR_P entry.
* doc/rtl.texi (Flags): Fix MEM_SCALAR_P entry.
	Document MEM_POINTER.  Replace mentions of "integrated"
	field with "return_val".  Delete outdated stuff.

From-SVN: r129584
2007-10-23 19:24:13 +00:00
Eric Botcazou
6d1e8bff96 misc.c (gnat_handle_option): Replace call to abort with call to gcc_unreachable.
* misc.c (gnat_handle_option): Replace call to abort with
	call to gcc_unreachable.
	(gnat_init): Likewise.
	(gnat_expand_expr): Likewise.
	(fp_prec_to_size): Likewise.
	(fp_size_to_prec): Likewise.

From-SVN: r129583
2007-10-23 17:36:51 +00:00
David Edelsohn
0db747be5b rs6000.c (rs6000_override_options): Set rs6000_altivec_abi on AIX.
* config/rs6000/rs6000.c (rs6000_override_options): Set
        rs6000_altivec_abi on AIX.
        (conditional_register_usage): Set VR20:31 fixed on AIX.

From-SVN: r129582
2007-10-23 13:12:01 -04:00
Richard Guenther
90310d368f alias.c (get_alias_set): For INDIRECT_REFs, deal with SSA_NAME pointers.
2007-10-23  Richard Guenther  <rguenther@suse.de>

	* alias.c (get_alias_set): For INDIRECT_REFs, deal with
	SSA_NAME pointers.

From-SVN: r129577
2007-10-23 11:20:56 +00:00
Richard Guenther
262e7125e7 re PR bootstrap/33608 (Bootstrap with ada fails linking gnatbind with 4.3 host compiler)
2007-10-23  Richard Guenther  <rguenther@suse.de>

        PR bootstrap/33608
        * tracebak.c: #undef abort after including system.h.

From-SVN: r129576
2007-10-23 08:54:56 +00:00
Tehila Meyzels
1be3290eae SMS: Add new testcase
Co-Authored-By: Revital Eres <eres@il.ibm.com>

From-SVN: r129575
2007-10-23 07:53:42 +00:00
David S. Miller
f168817602 df-scan.c (df_get_call_refs): Mark global registers as both a DF_REF_REG_USE and a non-clobber DF_REF_REG_DEF.
gcc/:

2007-10-22  Seongbae Park <seongbae.park@gmail.com>
	David S. Miller  <davem@davemloft.net>

	* df-scan.c (df_get_call_refs): Mark global registers as both a
	DF_REF_REG_USE and a non-clobber DF_REF_REG_DEF.


gcc/testsuite/:

2007-10-22  David S. Miller  <davem@davemloft.net>

	* gcc.dg/globalreg-1.c: New test.

From-SVN: r129572
2007-10-22 21:33:26 -07:00
Dorit Nuzman
7de5c6a447 re PR tree-optimization/33834 (ICE in vect_get_vec_def_for_operand, at tree-vect-transform.c:1829)
PR tree-optimization/33834
        PR tree-optimization/33835
        * tree-vect-analyze.c (vect_analyze_operations): RELEVANT and LIVE stmts
        need to be checked for success seperately.
        * tree-vect-transform.c (vectorizable_call, vectorizable_conversion):
        Remove the check that stmt is not LIVE.
        (vectorizable_assignment, vectorizable_induction): Likewise.
        (vectorizable_operation, vectorizable_type_demotion): Likewise.
        (vectorizable_type_promotion, vectorizable_load, vectorizable_store):
        Likewise.
        (vectorizable_live_operation): Check that op is not NULL.

From-SVN: r129571
2007-10-23 03:24:06 +00:00
GCC Administrator
fc629e9660 Daily bump.
From-SVN: r129568
2007-10-23 00:17:13 +00:00
Janis Johnson
7d95b692ea invoke.texi (Optimization Options): In the summary...
* doc/invoke.texi (Optimization Options): In the summary, show
	that the value for options -falign-jumps, -falign-labels,
	-falign-loops, -falign-functions, -fsched-stalled-insns, and
	-fsched-stalled-insns-dep is optional.  In the summary, show that
	-fsched-stalled-insns takes an optional argument and that
	-fparallelize-loops takes an argument.  Add opindex for several
	optimization options, and fix typos in the opindex commands for
	several others.  In the descriptions for -fsched-stalled-insns
	and -fsched-stalled-insns-dep, show the options with and without
	values.

From-SVN: r129565
2007-10-22 23:21:49 +00:00
Jerry DeLisle
8d6d0e8e0a re PR fortran/33849 (Fix misleading error message "GENERIC non-INTRINSIC procedure not allowed as an actual argument")
2007-10-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/33849
	* resolve.c (resolve_actual_arglist): Fix error message text.

From-SVN: r129564
2007-10-22 23:08:16 +00:00
Steven G. Kargl
f2112868c6 re PR fortran/31244 (data initialization with more than 2**32 elements)
2007-10-22  Steven G. Kargl  <kargl@gcc.gnu.org>

        PR fortran/31244
        * gfortran.h (gfc_data_value): Change repeat from unsigned int
        to mpz_t.
        * decl.c(top_val_list): Remove msg variable.  Use mpz_t for
        repeat count.
        * resolve.c (values):  Change left from unsigned int to mpz_t.
        (next_data_value): Change for mpz_t.
        (check_data_variable): Change ??? to FIXME in a comment.  Use
        "mpz_t left".
        (resolve_data ): Use "mpz_t left".

From-SVN: r129561
2007-10-22 22:10:42 +00:00
Eric B. Weddington
0c71b4541a avr.c (avr_mcu_types): Remove ATmega603 which was never produced.
* config/avr/avr.c (avr_mcu_types): Remove ATmega603 which was never
	produced.
	* config/avr/avr.h (LINK_SPEC): Likewise.
	(CRT_BINUTILS_SPECS): Likewsie.
	* config/avr/t-avr (MULTILIB_MATCHES): Likewise.

From-SVN: r129557
2007-10-22 23:58:16 +04:00
Eric Botcazou
9ed7b22165 re PR rtl-optimization/33644 (ICE in local_cprop_pass with -ftrapv for crafty)
PR rtl-optimization/33644
	* cfgcleanup.c: Do not include dce.h.
	* cfgrtl.c (delete_insn_chain_and_edges): Resurrect.
	* combine.c (distribute_notes): Delete REG_LIBCALL_ID case.
	* dce.c (something_changed): Delete.
	(libcall_dead_p): New predicate.
	(delete_unmarked_insns): Use it to delete dead libcalls.
	Deal with REG_LIBCALL and REG_RETVAL notes.
	(prescan_libcall_for_dce): New function.
	(prescan_insns_for_dce): Use it to deal with libcalls.
	(mark_reg_dependencies): Do nothing special for libcalls.
	(dce_process_block): Likewise.
	(fast_dce): Delete unused local variable.
	(run_fast_dce): Do not return a value.
	* dce.h (struct df): Delete.
	(run_fast_dce): Adjust prototype.
	* optabs.c (libcall_id): Delete.
	(maybe_encapsulate_block): Do not emit REG_LIBCALL_ID notes.
	(emit_no_conflict_block): Do not look for REG_LIBCALL_ID notes.
	* reload1.c (reload): Delete REG_LIBCALL_ID case.
	* rtl.h (delete_insn_chain_and_edges): Resurrect prototype.
	* see.c (see_update_relevancy): Look for REG_LIBCALL and REG_RETVAL
	notes instead of REG_LIBCALL_ID notes.
	* reg-notes.def (LIBCALL_ID): Delete.
	* Makefile.in (see.o): Add dce.h dependency.
	(cfgcleanup.o): Remove dce.h dependency.

From-SVN: r129556
2007-10-22 19:28:23 +00:00
Jakub Jelinek
6e684eee8d re PR c++/33372 (segfault on incomplete code in openmp mode)
PR c++/33372
	* semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
	before checking if its type is integral.

	* g++.dg/gomp/pr33372-1.C: New test.
	* g++.dg/gomp/pr33372-2.C: New test.
	* g++.dg/gomp/pr33372-3.C: New test.

From-SVN: r129555
2007-10-22 21:11:36 +02:00
Jason Merrill
5818c8e436 re PR c++/33620 (internal compiler error: canonical types differ for identical types const QList<QStringList> and const QList<QStringList>)
PR c++/33620
        * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
        * pt.c (apply_late_template_attributes): Splice out dependent
        attributes from DECL_ATTRIBUTES.

        * decl.c (cxx_maybe_build_cleanup): Use build_address.

From-SVN: r129553
2007-10-22 14:03:10 -04:00
Michael Matz
22a5d0133d re PR tree-optimization/33855 (Segfault in verify_ssa/execute_function_todo with -O)
PR tree-optimization/33855

        * tree-ssa-phiopt.c (cond_store_replacement): Handle
        * COMPLEX_TYPE
        and VECTOR_TYPE.

        * gcc.c-torture/compile/pr33855.c: New testcase.

From-SVN: r129551
2007-10-22 15:29:17 +00:00
Ira Rosen
174f8765a8 re PR tree-optimization/33854 (ICE in vectorizable_conversion, at tree-vect-transform.c:3374)
PR tree-optimization/33854
	* tree-vect-analyze.c (vect_determine_vectorization_factor): Add
	FLOAT_EXPR to the list of promotion operations.

From-SVN: r129549
2007-10-22 12:05:36 +00:00
Rask Ingemann Lambertsen
9ad5e54f95 re PR target/29473 (-masm=intel combined with -march=athlon64 has some issues.)
PR target/29473
	PR target/29493
	* config/i386/i386.c (output_pic_addr_const): Support Intel asm syntax.
	(print_reg): Print register prefix only with AT&T asm syntax. 
	Support pc_rtx for RIP register.
	(print_operand_address): Use print_reg()'s pc_rtx support for RIP
	relative addressing.  Always print segment register prefix with AT&T
	asm syntax and never with Intel asm syntax.
	(print_operand): Suppress 'XXX PTR' prefix for BLKmode operands. 
	Fix prefix for 16-byte XFmode operands.
	(output_addr_const_extra): Support Intel asm syntax.
	(x86_file_start): Don't use register prefix with Intel asm syntax.
	* config/i386/i386.md ("*zero_extendqihi2_movzbl"): Fix typo.
	("return_internal_long"): Fix Intel asm syntax output.
	("set_got_rex64"): Support Intel asm syntax.
	("set_rip_rex64"): Likewise.
	("set_got_offset_rex64"): Likewise.
	("*sibcall_1_rex64_v"): Print register prefix only with AT&T asm
	syntax.
	("*tls_global_dynamic_64"): Likewise.
	("*tls_local_dynamic_base_64"): Likewise.
	("*load_tp_si")("*load_tp_di"): Likewise.
	("*add_tp_si")("*add_tp_di"): Likewise.
	("*tls_dynamic_lea_64"): Likewise.
	("*sibcall_value_1_rex64_v"): Likewise.
	("stack_tls_protect_set_si"): Likewise.
	("stack_tls_protect_set_di"): Likewise.
	("stack_tls_protect_test_si"): Likewise.
	("stack_tls_protect_test_di"): Likewise.
	* config/i386/mmx.md ("*mov<mode>_internal_rex64"): Fix Intel asm
	syntax output.
	("*movv2sf_internal_rex64"): Likewise.
	* config/i386/cpuid.h (__cpuid): Support Intel asm syntax.
	(__get_cpuid_max): Likewise.

From-SVN: r129548
2007-10-22 11:50:56 +00:00
GCC Administrator
cc6c53a3f7 Daily bump.
From-SVN: r129545
2007-10-22 00:17:11 +00:00
David Edelsohn
2e880904b4 unwind-1.c: Disable on AIX.
* gcc.dg/unwind-1.c: Disable on AIX.
        * gcc.dg/cpp/_Pragma6.c: Disable on AIX.

From-SVN: r129540
2007-10-21 16:48:51 -04:00
Paul Thomas
c54224622d re PR fortran/33749 (Wrong evaluation of expressions in lhs of assignment statements)
2007-10-21  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/33749
	* resolve.c (resolve_ordinary_assign): New function that takes
	the code to resolve an assignment from resolve_code. In
	addition, it makes a temporary of any vector index, on the
	lhs, using gfc_get_parentheses.
	(resolve_code): On EXEC_ASSIGN call the new function.

2007-10-21  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/33749
	* gfortran.dg/assign_9.f90: New test.

From-SVN: r129539
2007-10-21 18:10:00 +00:00
Joseph Myers
1c5aeb0f49 * de.po, es.po, zh_CN.po: Update.
From-SVN: r129535
2007-10-21 18:56:29 +01:00
Richard Sandiford
65239d2068 mips-protos.h (mips_regno_mode_ok_for_base_p): Give the STRICT_P argument type "bool" rather than "int".
gcc/
	* config/mips/mips-protos.h (mips_regno_mode_ok_for_base_p): Give
	the STRICT_P argument type "bool" rather than "int".
	(mips_legitimate_address_p): Likewise.
	(fp_register_operand, lo_operand): Delete.
	(mips_subword): Give the HIGH_P argument type "bool" rather than "int".
	(mips_emit_scc): Rename to...
	(mips_expand_scc): ...this.
	(gen_conditional_branch): Rename to...
	(mips_expand_conditional_branch): ...this.
	(gen_conditional_move): Rename to...
	(mips_expand_conditional_move): ...this.
	(mips_gen_conditional_trap): Rename to...
	(mips_expand_conditional_trap): ...this and take an rtx code instead
	of an operands array.
	(mips_expand_call): Give the SIBCALL_P argument type "bool"
	rather than "int".
	(mips_emit_fcc_reload): Rename to...
	(mips_expand_fcc_reload): ...this.
	(init_cumulative_args): Rename to...
	(mips_init_cumulative_args): ...this and remove the libname argument.
	(function_arg_advance): Rename to...
	(mips_function_arg_advance): ...this.
	(function_arg): Rename to...
	(mips_function_arg): ...this and use "rtx" instead of
	"struct rtx_def *".
	(function_arg_boundary): Rename to...
	(mips_function_arg_boundary): ...this.
	(mips_expand_unaligned_load): Rename to...
	(mips_expand_ext_as_unaligned_load): ...this and give the WIDTH
	and BITPOS arguments type "HOST_WIDE_INT".
	(mips_expand_unaligned_store): Rename to...
	(mips_expand_ins_as_unaligned_store): ...this and give the WIDTH
	and BITPOS arguments type "HOST_WIDE_INT".
	(override_options): Rename to...
	(mips_override_options): ...this.
	(print_operand): Rename to...
	(mips_print_operand): ...this.
	(print_operand_address): Rename to...
	(mips_print_operand_address): ...this.
	(mips_output_ascii): Remove the PREFIX argument.
	(mips_expand_epilogue): Give the SIBCALL_P argument type "bool"
	rather than "int".
	(mips_can_use_return_insn): Return a "bool" rather than an "int".
	(mips_function_value): Remove the FUNC argument.  Use "rtx" instead
	of "struct rtx_def *".
	(mips_secondary_reload_class): Give the IN_P argument type "bool"
	rather than "int".
	(build_mips16_call_stub): Delete.
	(mips_store_data_bypass_p): Return a "bool" rather than an "int".
	(mips_use_ins_ext_p): Give the second and third arguments type
	"HOST_WIDE_INT" rather than "rtx".
	* config/mips/mips.h: Update after the above changes.  Tweak comments
	and formatting.
	(SECONDARY_INPUT_RELOAD_CLASS): Pass a boolean IN_P argument.
	(SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
	(mips_print_operand_punct, mips_hard_regno_mode_ok): Change the
	element type from "char" to "bool".
	(mips_section_threshold, sym_lineno, set_noat, mips_branch_likely)
	(mips_cpu_info_table): Delete.
	* config/mips/mips.md: Update after the above changes.  Tweak some
	formatting.
	* config/mips/mips-ps-3d.md: Likewise.
	* config/mips/mips.c: Tweak comments and formatting.
	Use NULL-like macros rather than 0 in various places.
	(mips_section_threshold): Rename to...
	(mips_small_data_threshold): ...this and give it an unsigned type.
	(num_source_filenames): Remove explicit initialization.
	(sdb_label_count): Likewise.
	(sym_lineno): Delete.
	(set_noat): Make static.
	(mips_branch_likely): Likewise, and give it type "bool".
	(mips_isa_info): Rename to...
	(mips_isa_option_info): ...this.
	(mips_flag_delayed_branch): Rename to...
	(mips_base_delayed_branch): ...this.
	(mips_split_addresses): Delete.
	(mips_print_operand_punct, mips_hard_regno_mode_ok): Change the
	element type from "char" to "bool".
	(mips_regno_to_class): Add an explicit array size.
	(mips16_flipper): Change from type "int" to type "bool".
	(mips_comp_type_attributes): Remove redundant FUNCTION_TYPE check.
	(mips_tls_operand_p): Rename to...
	(mips_tls_symbol_p): ...this.
	(mips_global_symbol_p): Remove redundant "const".
	(mips_offset_within_alignment_p): Simplify.
	(mips_regno_mode_ok_for_base_p): Change the name of the last argument
	to STRICT_P and give it type bool.
	(mips_valid_base_register_p): Likewise.
	(mips_classify_address): Likewise.
	(mips_legitimate_address_p): Likewise.
	(mips16_unextended_reference_p): Take the offset as an
	"unsigned HOST_WIDE_INT" rather than an "rtx".  Simplify.
	(mips_const_insns): Use IN_RANGE.
	(mips_force_temporary): Remove an unnecessary copy_rtx.
	(mips16_gp_pseudo_reg): Simplify.
	(mips_split_symbol): Remove an unnecessary copy_rtx.
	(mips_legitimize_tls_address): Only create registers if we need them.
	(mips_legitimize_address): Use mips_split_plus.
	(mips_move_integer): Swap DEST and TEMP arguments.  Rename local
	variable COST to NUM_OPS.
	(mips_legitimize_move): Use gen_lowpart.
	(mips_rewrite_small_data): Rename the OP parameter to PATTERN.
	(m16_check_op): Use IN_RANGE.
	(mips_subword): Give the HIGH_P argument type "bool" rather than "int".
	(mips_split_doubleword_move): Pass booleans to mips_subword.
	(mips_output_move): Store the mode in a local variable.
	Explicitly assert that this function does not deal with
	MFLO and MFHI.  Use SMALL_OPERAND_UNSIGNED.  Make order of
	cases more consistent.
	(mips_relational_operand_ok_p): Rename to...
	(mips_int_order_operand_ok_p): ...this.
	(mips_canonicalize_comparison): Rename to...
	(mips_canonicalize_int_order_test): ...this.
	(mips_emit_int_relational): Rename to...
	(mips_emit_int_order_test): ...this.  Store the mode in a local
	variable.
	(mips_reverse_fp_cond_p): Rename to...
	(mips_reversed_fp_cond): ...this.
	(mips_emit_compare): Make the order of the statements more consistent.
	(mips_emit_scc): Rename to...
	(mips_expand_scc): ...this.
	(gen_conditional_branch): Rename to...
	(mips_expand_conditional_branch): ...this.
	(gen_conditional_move): Rename to...
	(mips_expand_conditional_move): ...this.  Build the condition
	separately from the main pattern.
	(mips_gen_conditional_trap): Rename to...
	(mips_expand_conditional_trap): ...this and take an rtx code instead
	of an operands array.  Simplify.
	(init_cumulative_args): Rename to...
	(mips_init_cumulative_args): ...this.  Use memset rather than a
	copy from a zeroed static.  Use prototype_p and stdarg_p.
	(mips_arg_info): Rename to...
	(mips_get_arg_info): ...this and put the INFO argument first.
	(function_arg): Rename to...
	(mips_function_arg): ...this and use "rtx" instead of
	"struct rtx_def *".  Only split structures into chunks if 
	TARGET_HARD_FLOAT, rather than checking !TARGET_SOFT_FLOAT on
	a chunk-by-chunk basis.  Use SCALAR_FLOAT_TYPE_P instead of a
	comparison with REAL_TYPE.  Rename local variable REG to REGNO
	and make it unsigned.
	(function_arg_advance): Rename to...
	(mips_function_arg_advance): ...this.
	(function_arg_boundary): Rename to...
	(mips_function_arg_boundary): ...this.
	(mips_pad_arg_upward): Use SCALAR_INT_MODE_P instead of a comparison
	with MODE_INT.
	(mips_fpr_return_fields): Use SCALAR_FLOAT_TYPE_P instead of a
	comparison with REAL_TYPE.
	(mips_function_value): Remove the FUNC argument.  Rename local
	variable UNSIGNEDP to UNSIGNED_P.
	(mips_return_in_memory): Use IN_RANGE.
	(mips_setup_incoming_varargs): Pass a boolean rather than an int
	to FUNCTION_ARG_ADVANCE.
	(mips_gimplify_va_arg_expr): Rename local variable INDIRECT
	to INDIRECT_P.  Remove a redundant mips_abi check.  Only calculate
	SIZE and RSIZE if needed.
	(mips16_stub): Rename FPRET to FP_RET_P and give it type "bool"
	rather than "int".
	(build_mips16_function_stub): Rename to...
	(mips16_build_function_stub): ...this.
	(build_mips16_call_stub): Rename to...
	(mips16_build_call_stub): ...this.  Make static, and return a
	"bool" rather than an "int".  Rename the ARG_SIZE argument to
	ARGS_SIZE.  Rename the local variable FPRET to FP_RET_P and give
	it type "bool".  Use "jr" rather than "j".  Use XNEW.  Simplify.
	(mips_load_call_address): Give the SIBCALL_P argument type "bool"
	rather than "int".
	(mips_expand_call): Likewise.  Assert that MIPS16 calls via stubs
	are not sibling ones.
	(mips_emit_fcc_reload): Rename to...
	(mips_expand_fcc_reload): ...this.
	(mips_get_unaligned_mem): Give the WIDTH and BITPOS arguments type
	"HOST_WIDE_INT".
	(mips_expand_unaligned_load): Rename to...
	(mips_expand_ext_as_unaligned_load): ...this and give the WIDTH
	and BITPOS arguments type "HOST_WIDE_INT".  Remove redundant
	SUBREG_BYTE check.
	(mips_expand_unaligned_store): Rename to...
	(mips_expand_ins_as_unaligned_store): ...this and give the WIDTH
	and BITPOS arguments type "HOST_WIDE_INT".
	(mips_use_ins_ext_p): Rename second and third arguments to WIDTH
	and BITPOS and give them type "HOST_WIDE_INT" rather than "rtx".
	Use IN_RANGE.
	(mips_init_split_addresses): Replace with...
	(mips_split_addresses_p): ...this new function.
	(mips_init_relocs): Check mips_split_addresses_p () rather than
	mips_split_addresses.  Always initialize mips_split_p with booleans.
	(print_operand_reloc): Rename to...
	(mips_print_operand_reloc): ...this.  Use a gcc_assert rather than
	a fatal_error.
	(print_operand): Rename to...
	(mips_print_operand): ...this.
	(print_operand_address): Rename to...
	(mips_print_operand_address): ...this.  Use GP_REG_FIRST.
	(mips_in_small_data_p): Simplify.
	(mips_output_ascii): Remove the PREFIX argument and "register"
	keywords.  Use the STRING parameter directly and cast to
	"unsigned char".
	(mips16e_collect_argument_save_p): Use IN_RANGE.
	(mips_function_has_gp_insn): Simplify.
	(mips_set_return_address): Use BITSET_P.
	(mips_restore_gp): Use a separate statement to pick the base
	register.
	(mips_output_function_prologue): Use a local FRAME variable.
	(mips_save_reg): Pass booleans to mips_subword.
	(mips_expand_prologue): Use a local FRAME variable.  Use
	cprestore_size to detect when .cprestore is needed.
	(mips_restore_reg): Use GP_REG_FIRST.
	(mips_expand_epilogue): Give the SIBCALL_P argument type "bool"
	rather than "int".  Use local FRAME and REGNO variables.
	(mips_can_use_return_insn): Return a "bool" rather than an "int".
	(mips_secondary_reload_class): Give the IN_P argument type "bool"
	rather than "int".
	(mips_linked_madd_p): Rename arguments to OUT_INSN and IN_INSN.
	(mips_store_data_bypass_p): Return a "bool" rather than an "int".
	(vr4130_swap_insns_p): Rename local variables to DEP1_P and DEP2_P.
	(mips_74k_agen_init): Assume INSN satisfies USEFUL_INSN_P.
	(mips_variable_issue): Do nothing unless INSN satisfies USEFUL_INSN_P.
	(builtin_description): Rename to...
	(mips_builtin_description): ...this.
	(mips_bdesc): Rename to...
	(mips_ps_bdesc): ...this.
	(sb1_bdesc): Rename to...
	(mips_sb1_bdesc): ...this.
	(dsp_bdesc): Rename to...
	(mips_dsp_bdesc): ...this.
	(dsp_32only_bdesc): Rename to...
	(mips_dsp_32only_bdesc): ...this.
	(bdesc_map): Rename to...
	(mips_bdesc_map): ...this.
	(bdesc_arrays): Rename to...
	(mips_bdesc_arrays): ...this.
	(mips_prepare_builtin_arg): Rename OP to OPNO and ARGNUM to ARGNO.
	Tweak error message.
	(mips_expand_builtin_direct): Rename HAS_TARGET to HAS_TARGET_P.
	Rename local variables I and J to OPNO and ARGNO respectively.
	Assert that the number of arguments is no more than the number of
	input operands.
	(mips_expand_builtin_compare): Use an array of arguments rather
	than an array of operands.  Assert that the number of operands is
	as expected.
	(add_constant): Rename to...
	(mips16_add_constant): ...this.  Use XNEW.
	(dump_constants_1): Rename to...
	(mips16_emit_constants_1): ...this.  Use ALL_SCALAR_FIXED_POINT_MODE_P.
	(dump_constants): Rename to...
	(mips16_emit_constants): ...this.
	(mips_sim_wait_reg, mips_sim_record_set): Use END_REGNO.
	(mips_set_mips16_mode): Don't call mips_init_split_addresses.
	Assign mips16_p to was_mips16_p.
	(mips_parse_cpu): Tweak warning message.
	(override_options): Rename to...
	(mips_override_options): ...this.  Move the mips_cost initialization
	out of the "shared with GAS" block.  Quote option names in error
	messages.
	(mips_conditional_register_usage): Make local variable REGNO unsigned.
	(mips_order_regs_for_local_alloc): Remove register keyword.

From-SVN: r129532
2007-10-21 11:19:40 +00:00
Richard Sandiford
b5edaa2ca1 system.h (IN_RANGE): Cast each argument individually.
gcc/
	* system.h (IN_RANGE): Cast each argument individually.

From-SVN: r129531
2007-10-21 10:47:22 +00:00
Richard Sandiford
d375fd5e62 gcc/
* config/mips/mips.c (mips_set_mips16_mode) Say sorry for hard-float
	MIPS16 code unless using o32 or o64.  

gcc/testsuite/
	* gcc.target/mips/mips.exp (setup_mips_tests): Set mips_mips16.
	(dg-mips-options): Skip tests that specify an ABI other than o32
	and o64 if generating MIPS16 hard-float code.

From-SVN: r129530
2007-10-21 10:05:43 +00:00
Ira Rosen
8d0e5316e7 vect-ifcvt-5.c: Require vect_int.
* gcc.dg/vect/vect-ifcvt-5.c: Require vect_int.
	* gcc.dg/vect/vect-16.c: Fix comment.
	* gcc.dg/vect/pr33369.c: Require vect_int.
	* gcc.dg/vect/slp-33.c: Add spaces.
	* gcc.dg/vect/no-scevccp-outer-18.c: Enable only for vect_interleave
	targets.
	* gcc.dg/vect/vect-ifcvt-6.c: Require vect_int.
	* gcc.dg/vect/no-scevccp-outer-19.c: Enable only for vect_unpack
	targets.
	* gcc.dg/vect/vect-ifcvt-7.c: Require vect_int.
	* gcc.dg/vect/vect-strided-store-u16-i4.c: Add vect_unpack to
	targets.
	* gcc.dg/vect/slp-10.c: Add spaces.
	* gcc.dg/vect/no-scevccp-outer-21.c: Enable only for vect_pack_trunc
	targets.
	* gcc.dg/vect/slp-36.c: Require vect_int.
	* gcc.dg/vect/vect-ifcvt-9.c, gcc.dg/vect/vect-strided-store-u32-i2.c,
	gcc.dg/vect/vect-ifcvt-2.c, gcc.dg/vect/vect-ifcvt-3.c,
	gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Likewise.
	* gcc.dg/vect/no-scevccp-outer-16.c: Enable only for vect_unpack
	targets.
	* gcc.dg/vect/no-scevccp-outer-17.c: Likewise.
	* gcc.dg/vect/pr25413.c: Use vector alignment_reachable_for_64bit
	instead of vector_alignment_reachable_for_double.
	* lib/target-supports.exp (vect_aligned_arrays): Add spu-*-*.
	(natural_alignment): Split into...
	(natural_alignment_32, natural_alignment_64): New.
	(vector_alignment_reachable): Depend on natural_alignment_32.
	(vector_alignment_reachable_for_double): Rename to ...
	(vector_alignment_reachable_for_64bit): And depend on
	natural_alignment_64.


Co-Authored-By: Revital Eres <eres@il.ibm.com>

From-SVN: r129529
2007-10-21 10:01:16 +00:00
Richard Sandiford
43029c1033 mips.c (mips_cannot_change_mode_class): Don't check for modes smaller than 4 bytes.
gcc/
	* config/mips/mips.c (mips_cannot_change_mode_class): Don't check
	for modes smaller than 4 bytes.
	* config/mips/mips.md (*movhi_internal, *movqi_internal): Remove
	FPR alternatives.

From-SVN: r129528
2007-10-21 09:24:16 +00:00