Commit Graph

84322 Commits

Author SHA1 Message Date
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
Samuel Tardieu
fa3886fe57 * MAINTAINERS (Write After Approval): Add myself.
From-SVN: r129961
2007-11-07 14:36:48 +00:00
Paolo Carlini
1a1b20be14 stl_iterator.h (move_iterator<>::pointer): Adjust typedef per DR 680 [Ready].
2007-11-07  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_iterator.h (move_iterator<>::pointer): Adjust
	typedef per DR 680 [Ready].

From-SVN: r129959
2007-11-07 12:43:35 +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
Jerry DeLisle
31de5c748d re PR libfortran/33985 (access="stream",form="unformatted" doesn't buffer)
2007-11-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/33985
	* io/transfer.c (finalize_transfer): Revert previous patch.

From-SVN: r129955
2007-11-07 02:43:44 +00:00
Paolo Carlini
812e8c79b4 vector.tcc (vector<>::_M_insert_aux<>(iterator, _Args&&...)): In C++0x mode do not use temporary copies.
2007-11-06  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/vector.tcc (vector<>::_M_insert_aux<>(iterator,
	_Args&&...)): In C++0x mode do not use temporary copies.
	(insert(iterator, const value_type&)): Copy to a temporary
	when not reallocating.

	* include/bits/vector.tcc (insert(iterator, value_type&&)):
	Minor tweaks in C++0x mode.

From-SVN: r129954
2007-11-07 00:36:33 +00: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
Doug Kwan
ae75007994 Add myself to MAINTAINERS
From-SVN: r129947
2007-11-06 22:15:09 +00: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
Jonathan Wakely
3de36a09ac boost_shared_ptr.h: Avoid unnecessary memory barriers in _S_atomic case.
2007-11-06  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/tr1_impl/boost_shared_ptr.h: Avoid unnecessary memory
	barriers in _S_atomic case.

From-SVN: r129927
2007-11-06 14:28:28 +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
Chris Jefferson
6eef740212 stl_vector.h (vector<>::push_back<>(_Args...), [...]): Add.
2007-11-05  Chris Jefferson  <chris@bubblescope.net>
	    Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_vector.h (vector<>::push_back<>(_Args...),
	emplace<>(iterator, _Args...), insert(iterator, _Tp&&),
	_M_insert_aux<>(iterator, _Args&&...)): Add.
	* include/bits/vector.tcc (insert(iterator, value_type&&),
	emplace<>(iterator, _Args...), _M_insert_aux<>(iterator, _Args&&...)):
	Define.
	(_M_fill_insert(iterator, size_type, const value_type&),
	_M_range_insert(iterator, _ForwardIterator, _ForwardIterator,
	std::forward_iterator_tag)): Use __uninitialized_move_a,
	_GLIBCXX_MOVE_BACKWARD3 when possible.
	* include/bits/stl_uninitialized.h (__uninitialized_move_a): Add.
	* include/debug/vector (vector<>::push_back<>(_Args...),
	emplace<>(iterator, _Args...), insert(iterator, _Tp&&)): Add.
	* testsuite/23_containers/vector/modifiers/moveable.cc: Enable.
	* testsuite/23_containers/vector/resize/moveable.cc: Likewise.
	* testsuite/23_containers/vector/cons/moveable.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
	Adjust dg-error line numbers.
	* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_2_neg.cc: Likewise.

Co-Authored-By: Paolo Carlini <pcarlini@suse.de>

From-SVN: r129907
2007-11-05 19:46:07 +00: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
H.J. Lu
04e0cb885c configure.ac: Don't run config-ml.in directly.
2007-11-05  H.J. Lu  <hongjiu.lu@intel.com>

	* configure.ac: Don't run config-ml.in directly.
	(multilib_arg): New.
	* configure: Regenerated.

From-SVN: r129902
2007-11-05 08:53:42 -08: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