Commit Graph

72981 Commits

Author SHA1 Message Date
Carlos O'Donell
8d1c7aef72 c-typeck.c (build_c_cast): Always warn when casting from a pointer to an integer of different size...
gcc/

2006-01-05  Carlos O'Donell  <carlos@codesourcery.com>

	* c-typeck.c (build_c_cast): Always warn when casting
	from a pointer to an integer of different size, even if
	the node was constant.

gcc/testsuite

2006-01-05  Carlos O'Donell  <carlos@codesourcery.com>

	* gcc.dg/cast-1.c: Add new warning.
	* gcc.dg/cast-2.c: Likewise.
	* gcc.dg/cast-3.c: Likewise.
	* gcc.dg/format/cast-1.c: Likewise.
	* gcc.dg/cast-4.c: New testcase.

From-SVN: r109386
2006-01-05 19:07:16 +00:00
Alexandre Oliva
32ce4048fb Makefile.tpl (clean-stage[+id+]-[+prefix+][+module+]): Remove @ from continuation.
* Makefile.tpl (clean-stage[+id+]-[+prefix+][+module+]): Remove
@ from continuation.
* Makefile.in: Rebuilt.

From-SVN: r109385
2006-01-05 17:42:53 +00:00
Tom Tromey
3e595be57a * java/lang/natPosixProcess.cc (reap): Ignore unknown children.
From-SVN: r109383
2006-01-05 17:35:20 +00:00
Richard Guenther
758cf3f28a re PR tree-optimization/22555 (array in struct disables salias subvars for other fields)
2006-01-05  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/22555
	* tree-ssa-alias.c (create_overlap_variables_for): Do not give up,
	if one structure field is an array.
	* tree-ssa-operands.c (get_expr_operands): Continue scanning
	operands even if we found a subvar, but ignore VOPs in this
	case.
	* tree-ssa-loop-ivopts.c (rewrite_use): Mark new vars in stmt
	for renaming.
	* tree-ssa-loop.c (pass_iv_optimize): Schedule TODO_update_ssa.

	* gcc.dg/tree-ssa/alias-3.c: New testcase.

From-SVN: r109381
2006-01-05 15:30:44 +00:00
Richard Earnshaw
ad0926324d re PR target/24998 (Build failure: undefined symbol __floatunsitf)
PR middle-end/24998
	* arm/t-netbsd (LIB2FUNCS_EXTRA): Define.

From-SVN: r109380
2006-01-05 15:06:09 +00:00
Richard Guenther
3f519b3517 tree-pass.h (TODO_remove_unused_locals): Define.
2006-01-05  Richard Guenther  <rguenther@suse.de>
	    Diego Novillo  <dnovillo@redhat.com>

	* tree-pass.h (TODO_remove_unused_locals): Define.
	* gimple-low.c (expand_var_p, remove_useless_vars,
	pass_remove_useless_vars): Remove.  Update all users.
	* tree-ssa-live.c (mark_all_vars_used_1): Handle SSA names.
	(remove_unused_locals): New function.
	* tree-flow.h (remove_unused_locals): Declare.
	* passes.c (execute_todo): Call remove_unused_locals if
	TODO_remove_unused_locals is set.
	* tree-into-ssa.c (pass_build_ssa): Add TODO_remove_unused_locals.
	* tree-ssa-dce.c (pass_dce): Likewise.
	* tree-outof-ssa.c (pass_del_ssa): Likewise.

	* gcc.dg/tree-ssa/loop-11.c: Deal with removed vars pass.
	* gcc.dg/tree-ssa/loop-8.c: Likewise.
	* gcc.dg/tree-ssa/loop-1.c: Likewise.
	* gcc.dg/tree-ssa/pr23294.c: Likewise.
	* gcc.dg/tree-ssa/pr21985.c: Likewise.
	* gcc.dg/tree-ssa/loop-14.c: Likewise.
	* gcc.dg/tree-ssa/loop-2.c: Likewise.
	* gcc.dg/tree-ssa/loop-3.c: Likewise.
	* gcc.dg/tree-ssa/loop-4.c: Likewise.
	* gcc.dg/tree-ssa/pr21171.c: Likewise.
	* gcc.dg/tree-ssa/loop-5.c: Likewise.
	* gcc.dg/tree-ssa/loop-10.c: Likewise.
	* gcc.dg/tree-ssa/loop-6.c: Likewise.
	* treelang/compile/extravar.tree: Likewise.
	* g++.dg/tree-ssa/ssa-cast-1.C: Likewise.
	* g++.dg/tree-ssa/pointer-reference-alias.C: Likewise.
	* g++.dg/tree-ssa/ssa-sra-1.C: Likewise.
	* g++.dg/tree-ssa/ssa-sra-2.C: Likewise.
	* gcc.dg/tree-ssa/20031106-6.c: Disable SRA.

Co-Authored-By: Diego Novillo <dnovillo@redhat.com>

From-SVN: r109379
2006-01-05 13:53:54 +00:00
Bernhard Reutner-Fischer
db55bccb01 MAINTAINERS (Write after approval): Add myself.
2006-01-05  Bernhard Fischer  <rep.nop@aon.at>

	* MAINTAINERS (Write after approval): Add myself.

From-SVN: r109377
2006-01-05 13:47:33 +01:00
Richard Guenther
35ed859b0d tree-flow.h (struct fieldoff): Decompose field to type, size and decl.
2006-01-05  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (struct fieldoff): Decompose field to
	type, size and decl.
	* tree-ssa-alias.c (create_sft): Take type as parameter.
	(create_overlap_variables_for): Store type, size and decl
	in the fieldoff structure.
	* tree-ssa-structalias.c (fieldoff_compare): Adjust users
	of struct fieldoff.
	(push_fields_onto_fieldstack): Likewise.
	(create_variable_info_for): Likewise.  Use offset for the
	SFT name if the decl is not available.

From-SVN: r109376
2006-01-05 09:58:57 +00:00
Paolo Bonzini
9220c30c89 Makefile.in: Use -MMD instead of -MD.
2006-02-05  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.in: Use -MMD instead of -MD.

From-SVN: r109373
2006-01-05 08:35:23 +00:00
Hans-Peter Nilsson
0d6be133aa thunk3.C, thunk4.C: Revert unnecessary fix for 64-bit fix.
* g++.dg/abi/thunk3.C, g++.dg/abi/thunk4.C: Revert unnecessary fix
	for 64-bit fix.

From-SVN: r109371
2006-01-05 01:53:44 +00:00
Kenneth Zadeck
cc78827541 fixed missing changelog entry for r109153
From-SVN: r109370
2006-01-05 00:53:41 +00:00
Erik Edelmann
47992a4ad3 re PR fortran/23675 (ICE in gfc_finish_var_decl (string manipulation))
2006-01-05  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/23675
        * expr.c (gfc_expr_set_symbols_referenced): New function.
        * gfortran.h: Add a function prototype for it.
        * resolve.c (resolve_function): Use it for
        use associated character functions lengths.
        * expr.c, gfortran.h, resolve.c: Updated copyright years.


testsuite/
2006-01-05  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/23675
        gfortran.dg/char_result_11.f90: New.

From-SVN: r109368
2006-01-05 00:22:39 +00:00
GCC Administrator
2653b241f2 Daily bump.
From-SVN: r109365
2006-01-05 00:18:02 +00:00
Zdenek Dvorak
57b37fe381 re PR c++/25632 (ICE with const int copied into two different functions)
PR c++/25632
	* init.c (constant_value_1): Unshare use of DECL_INITIAL.  Fix a typo
	in condition.

From-SVN: r109354
2006-01-04 22:46:09 +00:00
Roger Sayle
7a6d30ce0d decNumber.c (__NO_STRING_INLINES): Define to prevent glibc macro definition of strcpy from generating compilation...
* decNumber.c (__NO_STRING_INLINES): Define to prevent glibc macro
	definition of strcpy from generating compilation warnings.


Co-Authored-By: Kaveh R. Ghazi <ghazi@caip.rutgers.edu>

From-SVN: r109351
2006-01-04 21:22:34 +00:00
Krister Walfridsson
1916e588f3 posix-threads.cc (_Jv_InitThreads): #ifdef PTHREAD_STACK_MIN
2006-01-04  Krister Walfridsson  <cato@df.lth.se>

	* posix-threads.cc (_Jv_InitThreads): #ifdef PTHREAD_STACK_MIN

From-SVN: r109350
2006-01-04 21:11:51 +00:00
Chris Lattner
b7af94d8b2 typeck2.c: update copyright to 2006
2006-01-04  Chris Lattner  <sabre@gnu.org>

        * typeck2.c: update copyright to 2006
        (split_nonconstant_init_1):  Set TREE_CONSTANT to true.

From-SVN: r109348
2006-01-04 19:59:44 +00:00
Chris Lattner
a9210574e2 another trivial tweak for consistency
From-SVN: r109347
2006-01-04 19:57:06 +00:00
Chris Lattner
0eaf8e1708 obvious typo fix
From-SVN: r109346
2006-01-04 19:49:59 +00:00
Chris Lattner
c76c0c831d Add myself.
From-SVN: r109345
2006-01-04 19:47:45 +00:00
Mark Mitchell
19e65f304b re PR c++/24782 (wrongly accepted nested private typedef)
PR c++/24782
	* parser.c (cp_parser_nested_name_specifier_opt): Preserve access
	checks, even when parsing tentatively.
	PR c++/24782
	* g++.dg/parse/access9.C: New test.
	* g++.dg/tc1/dr52.C: Tweak error markers.

From-SVN: r109342
2006-01-04 18:48:38 +00:00
Tom Tromey
2fb1388876 Class.h (_Jv_CopyClassesToSystemLoader): Updated.
* java/lang/Class.h (_Jv_CopyClassesToSystemLoader): Updated.
	* java/lang/natClassLoader.cc (_Jv_CopyClassesToSystemLoader):
	Changed argument type.  Use SystemClassLoader.addClass.
	* gnu/gcj/runtime/SystemClassLoader.java (addClass): New method.

From-SVN: r109340
2006-01-04 17:59:40 +00:00
Paul Brook
a8c253d020 m68k.c (m68k_output_mi_thunk): Use jmp, not jsr.
2006-01-04  Paul Brook  <paul@codesourcery.com>

	* config/m68k/m68k.c (m68k_output_mi_thunk): Use jmp, not jsr.

From-SVN: r109338
2006-01-04 16:38:00 +00:00
Daniel Berlin
dc006c709d lambda-code.c (can_put_in_inner_loop): Relax restrictions.
2006-01-04  Daniel Berlin  <dberlin@dberlin.org>

	* lambda-code.c (can_put_in_inner_loop): Relax
	restrictions.
	(can_put_after_inner_loop): New function.
	(can_convert_to_perfect_nest): Use can_put_after_inner_loop as well.
	(perfect_nestify): Change to make copies and modify uses.

From-SVN: r109337
2006-01-04 16:34:52 +00:00
Richard Henderson
bc4071dd66 directives.c (struct pragma_entry): Add is_deferred.
libcpp/
	* directives.c (struct pragma_entry): Add is_deferred.  Add ident
	entry to value union.
	(end_directive): Don't eat the line if in_deferred_pragma.
	(run_directive): Remove pragma hacks.
	(insert_pragma_entry): Remove.
	(new_pragma_entry): New.
	(register_pragma_1): Split out of register_pragma.  Only handle
	the lookup tree and return the new entry.
	(cpp_register_pragma): Fill in the pragma entry here.
	(cpp_register_deferred_pragma): New.
	(register_pragma_internal): New.
	(_cpp_init_internal_pragmas): Use register_pragma_internal.
	(do_pragma): Allow pragma expansion after namespace.  For deferred
	pragmas, don't slurp the line into a string.
	(destringize_and_run): Save tokens for deferred pragmas.
	(cpp_handle_deferred_pragma): Remove.
	* macro.c (builtin_macro): Remove pragma token hack.
	(_cpp_push_token_context): Rename from push_token_context and export.
	* internal.h (struct lexer_state): Add pragma_allow_expansion.
	(_cpp_push_token_context): Declare.
	* lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
	a token.  Update the line number correctly if so.
	(_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
	(cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
	* include/cpplib.h (PRAGMA_EOL): New.
	(CPP_TOKEN_FLD_PRAGMA): New.
	(struct cpp_token): Add val.pragma.
	(struct cpp_options): Remove defer_pragmas.
	(cpp_handle_deferred_pragma): Remove.
	(cpp_register_deferred_pragma): Declare.

gcc/
	* c-lex.c (c_lex_with_flags) <CPP_PRAGMA>: Smuggle pragma id
	via integer constant.
	(pragma_lex): Remove.
	* c-pch.c (c_common_pch_pragma): Accept the name as an argument,
	rather than parsing it.
	* c-pragma.c (handle_pragma_weak, handle_pragma_redefine_extname,
	handle_pragma_extern_prefix): Add %< %> quotes.
	(registered_pragmas): New.
	(c_register_pragma_1): New.
	(c_register_pragma): Use it.
	(c_register_pragma_with_expansion): Likewise.
	(c_invoke_pragma_handler): New.
	(init_pragma): Use cpp_register_deferred_pragma directly for
	pch_preprocess.
	* c-pragma.h (enum pragma_kind): New.
	(pragma_handler): New.
	(c_invoke_pragma_handler): Declare.
	* c-common.c (c_parse_error): Pretty print CPP_PRAGMA and
	CPP_PRAGMA_EOL.
	* c-common.h (c_common_pch_pragma): Update decl.
	* Makefile.in (c-parser.o): Update dependencies.
	(GTFILES): Add c-pragma.h.
	* c-parser.c (struct c_token): Add pragma_kind.
	(struct c_parser): Add in_pragma.
	(c_lex_one_token): Always initialize keyword and pragma_kind.
	Extract data for CPP_PRAGMA.
	(c_parser_peek_2nd_token): Deny CPP_PRAGMA_EOL.
	(c_parser_consume_token): Don't allow CPP_PRAGMA unless errors.
	Don't allow CPP_PRAGMA_EOL if in_pragma.
	(c_parser_consume_pragma): New.
	(c_parser_skip_until_found): Stop on CPP_PRAGMA_EOL.
	(c_parser_skip_to_end_of_parameter): Likewise.
	(c_parser_skip_to_end_of_block_or_statement): Likewise.
	(c_parser_skip_to_pragma_eol): New.
	(c_parser_external_declaration): Handle CPP_PRAGMA.
	(c_parser_compound_statement_nostart): Likewise.
	(c_parser_statement_after_labels): Likewise.
	(c_parser_pragma): New.
	(pragma_lex): Likewise.
	(c_parser_pragma_pch_preprocess): New.
	(c_parser_new): Merge into ...
	(c_parse_file): ... here.  Call c_parser_pragma_pch_preprocess.

gcc/cp/
	* lex.c (handle_pragma_java_exceptions): Fix whitespace.
	* parser.c (struct cp_token): Add pragma_kind.
	(eof_token): Update to match.
	(struct cp_lexer): Add in_pragma; rearrange next for better packing.
	(cp_parser_initial_pragma): New.
	(cp_lexer_new_main): Use it.  Don't bother clearing
	c_lex_return_raw_strings.
	(cp_lexer_get_preprocessor_token): Always initialize keyword
	and pragma_kind fields.  Handle CPP_PRAGMA.
	(cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when 
	in_pragma is set.
	(cp_lexer_handle_pragma): Remove.  Update callers to cp_parser_pragma.
	(cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string.
	(cp_parser_skip_to_pragma_eol): New.
	(cp_parser_error): Use it.
	(cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL;
	rearrange with switch statement.
	(cp_parser_skip_to_end_of_statement): Likewise.
	(cp_parser_skip_to_end_of_block_or_statement): Likewise.
	(cp_parser_skip_to_closing_brace): Likewise.
	(cp_parser_skip_until_found): Likewise.
	(cp_parser_statement): Add in_compound argument; update callers.
	Use it to decide how to handle pragma parsing.
	(cp_parser_labeled_statement): Add in_compound argument; pass
	it on to cp_parser_statement.
	(cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL.
	(cp_parser_declaration_seq_opt): Likewise.
	(cp_parser_parameter_declaration): Likewise.
	(cp_parser_member_specification_opt): Likewise.
	(cp_parser_function_definition_after_decl): Likewise.
	(cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs.
	(cp_parser_pragma): New.
	(pragma_lex): New.

gcc/testsuite/
	* g++.dg/parse/pragma2.C: Update expected error lines.

From-SVN: r109336
2006-01-04 08:33:38 -08:00
Jeff Law
59bb84ef39 re PR ada/24994 (raised STORAGE_ERROR : stack overflow or erroneous memory access)
PR ada/24994
        * tree-cfg.c (bsi_replace): Remove the original statement
        from the EH throw statement table.

From-SVN: r109335
2006-01-04 09:29:32 -07:00
Dirk Mueller
ebfd9521b5 decl.c (finish_constructor_body): create simple compound stmt instead of a if(1) { } construct.
2002-01-04  Dirk Mueller <dmueller@suse.com>

	* decl.c (finish_constructor_body): create simple
	compound stmt instead of a if(1) { } construct.

From-SVN: r109331
2006-01-04 15:26:15 +00:00
Daniel Berlin
d8701f023e Fix "node B dominates node B" to "node B dominates node A"
From-SVN: r109330
2006-01-04 15:07:54 +00:00
Paolo Bonzini
2d309510df re PR middle-end/24252 (Missing "warning: control reaches end of non-void function" in static function)
2006-01-04  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/24252

	* Makefile.def (flags_to_pass): Add STAGE1_CFLAGS and STAGE1_LANGUAGES.
	* Makefile.tpl (OBJDUMP): New.
	(EXTRA_HOST_FLAGS): Add it.
	(EXTRA_GCC_FLAGS): Remove flags already specified in flags_to_pass.

        * Makefile.tpl (stage[+id+]-start, stage[+id+]-end): Do not try
        to use symbolic links between directories.  Avoid race conditions
        or make them harmless.
        * configure.in: Do not try to use symbolic links between directories.

	* Makefile.def (LEAN): Pass.
	* Makefile.tpl (LEAN): Define.
	(stage[+id+]-start): Accept that the previous directory does not
	exist, if the bootstrap is lean.
	(stage[+id+]-bubble): Invoke lean bootstrap commands after
	stage[+id+]-start.  Use a makefile variable and an `if' instead of a
	configure substitution.
	([+compare-target+]): Likewise.
	([+bootstrap-target+]-lean): New.
	* configure.in: Remove lean bootstrap support from here.

        * Makefile.in: Regenerate.
        * configure: Regenerate.

From-SVN: r109325
2006-01-04 12:21:27 +00:00
Paolo Carlini
f7ace77f1f sso_string_base.h (__sso_string_base<>::_M_dataplus): Use _CharT_alloc_type as base class.
2006-01-04  Paolo Carlini  <pcarlini@suse.de>

        * include/ext/sso_string_base.h (__sso_string_base<>::_M_dataplus):
        Use _CharT_alloc_type as base class.
        (_M_get_allocator, _M_swap, _M_create, _M_destroy): Adjust.
        * include/ext/vstring.h (get_allocator): Tidy.

2006-01-04  Paolo Carlini  <pcarlini@suse.de>

	Implement Option 3 of DR 431 for all the containers.
	* include/bits/allocator.h (struct __alloc_swap): Add, swaps
	allocators, optimized to nothing in case they are empty.
	* include/bits/stl_deque.h (deque<>::swap): Use it.
	* include/bits/stl_list.h (list<>::swap): Likewise.
	* include/bits/stl_tree.h (_Rb_tree<>::swap): Likewise.
	* include/bits/stl_vector.h (vector<>::swap): Likewise.
	* include/tr1/hashtable (hashtable<>::swap): Likewise.
	* include/ext/rc_string_base.h (__rc_string_base<>::_M_swap):
	Likewise.
	* include/ext/sso_string_base.h (__sso_string_base<>::_M_swap):
	Likewise.
	* include/ext/vstring_util.h (__vstring_utility<>::_Alloc_hider):
	Clean-up (now vstring uses the generic __alloc_swap facility).
	* include/tr1/unordered_map: Adjust includes.
	* include/tr1/unordered_set: Likewise.
	* docs/html/ext/howto.html: Add an entry for DR 431.
	* testsuite/23_containers/deque/modifiers/swap.cc: Move to...
	* testsuite/23_containers/deque/modifiers/swap/1.cc: ... here.		
	* testsuite/23_containers/deque/modifiers/swap/2.cc: New.
	* testsuite/23_containers/deque/modifiers/swap/3.cc: New.
	* testsuite/23_containers/list/modifiers/swap.cc: Move to...
	* testsuite/23_containers/list/modifiers/swap/1.cc: ... here.		
	* testsuite/23_containers/list/modifiers/swap/2.cc: New.
	* testsuite/23_containers/list/modifiers/swap/3.cc: New.
	* testsuite/23_containers/vector/modifiers/swap.cc: Move to...
	* testsuite/23_containers/vector/modifiers/swap/1.cc: ... here.		
	* testsuite/23_containers/vector/modifiers/swap/2.cc: New.
	* testsuite/23_containers/vector/modifiers/swap/3.cc: New.
	* testsuite/23_containers/set/modifiers/swap.cc: Move to...
	* testsuite/23_containers/set/modifiers/swap/1.cc: ... here.		
	* testsuite/23_containers/set/modifiers/swap/2.cc: New.
	* testsuite/23_containers/set/modifiers/swap/3.cc: New.
	* testsuite/23_containers/map/modifiers/swap.cc: Move to...
	* testsuite/23_containers/map/modifiers/swap/1.cc: ... here.		
	* testsuite/23_containers/map/modifiers/swap/2.cc: New.
	* testsuite/23_containers/map/modifiers/swap/3.cc: New.
	* testsuite/23_containers/multiset/modifiers/swap.cc: Move to...
	* testsuite/23_containers/multiset/modifiers/swap/1.cc: ... here.		
	* testsuite/23_containers/multiset/modifiers/swap/2.cc: New.
	* testsuite/23_containers/multiset/modifiers/swap/3.cc: New.
	* testsuite/23_containers/multimap/modifiers/swap.cc: Move to...
	* testsuite/23_containers/multimap/modifiers/swap/1.cc: ... here.		
	* testsuite/23_containers/multimap/modifiers/swap/2.cc: New.
	* testsuite/23_containers/multimap/modifiers/swap/3.cc: New.
	* testsuite/tr1/6_containers/unordered/swap/unordered_set/1.cc: New.	
	* testsuite/tr1/6_containers/unordered/swap/unordered_set/2.cc: New.
	* testsuite/tr1/6_containers/unordered/swap/unordered_map/1.cc: New.	
	* testsuite/tr1/6_containers/unordered/swap/unordered_map/2.cc: New.
	* testsuite/tr1/6_containers/unordered/swap/unordered_multiset/1.cc: New.	
	* testsuite/tr1/6_containers/unordered/swap/unordered_multiset/2.cc: New.
	* testsuite/tr1/6_containers/unordered/swap/unordered_multimap/1.cc: New.	
	* testsuite/tr1/6_containers/unordered/swap/unordered_multimap/2.cc: New.

From-SVN: r109324
2006-01-04 11:34:45 +00:00
Paolo Carlini
db5d99e8b1 sso_string_base.h (__sso_string_base<>::_M_dataplus): Use _CharT_alloc_type as base class.
2006-01-04  Paolo Carlini  <pcarlini@suse.de>

        * include/ext/sso_string_base.h (__sso_string_base<>::_M_dataplus):
        Use _CharT_alloc_type as base class.
        (_M_get_allocator, _M_swap, _M_create, _M_destroy): Adjust.
        * include/ext/vstring.h (get_allocator): Tidy.

2006-01-04  Paolo Carlini  <pcarlini@suse.de>

	Implement Option 3 of DR 431 for all the containers.
	* include/bits/allocator.h (struct __alloc_swap): Add, swaps
	allocators, optimized to nothing in case they are empty.
	* include/bits/stl_deque.h (deque<>::swap): Use it.
	* include/bits/stl_list.h (list<>::swap): Likewise.
	* include/bits/stl_tree.h (_Rb_tree<>::swap): Likewise.
	* include/bits/stl_vector.h (vector<>::swap): Likewise.
	* include/tr1/hashtable (hashtable<>::swap): Likewise.
	* include/ext/rc_string_base.h (__rc_string_base<>::_M_swap):
	Likewise.
	* include/ext/sso_string_base.h (__sso_string_base<>::_M_swap):
	Likewise.
	* include/ext/vstring_util.h (__vstring_utility<>::_Alloc_hider):
	Clean-up (now vstring uses the generic __alloc_swap facility).
	* include/tr1/unordered_map: Adjust includes.
	* include/tr1/unordered_set: Likewise.
	* docs/html/ext/howto.html: Add an entry for DR 431.
	* testsuite/23_containers/deque/modifiers/swap.cc: Move to...
	* testsuite/23_containers/deque/modifiers/swap/1.cc: ... here.		
	* testsuite/23_containers/deque/modifiers/swap/2.cc: New.
	* testsuite/23_containers/deque/modifiers/swap/3.cc: New.
	* testsuite/23_containers/list/modifiers/swap.cc: Move to...
	* testsuite/23_containers/list/modifiers/swap/1.cc: ... here.		
	* testsuite/23_containers/list/modifiers/swap/2.cc: New.
	* testsuite/23_containers/list/modifiers/swap/3.cc: New.
	* testsuite/23_containers/vector/modifiers/swap.cc: Move to...
	* testsuite/23_containers/vector/modifiers/swap/1.cc: ... here.		
	* testsuite/23_containers/vector/modifiers/swap/2.cc: New.
	* testsuite/23_containers/vector/modifiers/swap/3.cc: New.
	* testsuite/23_containers/set/modifiers/swap.cc: Move to...
	* testsuite/23_containers/set/modifiers/swap/1.cc: ... here.		
	* testsuite/23_containers/set/modifiers/swap/2.cc: New.
	* testsuite/23_containers/set/modifiers/swap/3.cc: New.
	* testsuite/23_containers/map/modifiers/swap.cc: Move to...
	* testsuite/23_containers/map/modifiers/swap/1.cc: ... here.		
	* testsuite/23_containers/map/modifiers/swap/2.cc: New.
	* testsuite/23_containers/map/modifiers/swap/3.cc: New.
	* testsuite/23_containers/multiset/modifiers/swap.cc: Move to...
	* testsuite/23_containers/multiset/modifiers/swap/1.cc: ... here.		
	* testsuite/23_containers/multiset/modifiers/swap/2.cc: New.
	* testsuite/23_containers/multiset/modifiers/swap/3.cc: New.
	* testsuite/23_containers/multimap/modifiers/swap.cc: Move to...
	* testsuite/23_containers/multimap/modifiers/swap/1.cc: ... here.		
	* testsuite/23_containers/multimap/modifiers/swap/2.cc: New.
	* testsuite/23_containers/multimap/modifiers/swap/3.cc: New.
	* testsuite/tr1/6_containers/unordered/swap/unordered_set/1.cc: New.	
	* testsuite/tr1/6_containers/unordered/swap/unordered_set/2.cc: New.
	* testsuite/tr1/6_containers/unordered/swap/unordered_map/1.cc: New.	
	* testsuite/tr1/6_containers/unordered/swap/unordered_map/2.cc: New.
	* testsuite/tr1/6_containers/unordered/swap/unordered_multiset/1.cc: New.	
	* testsuite/tr1/6_containers/unordered/swap/unordered_multiset/2.cc: New.
	* testsuite/tr1/6_containers/unordered/swap/unordered_multimap/1.cc: New.	
	* testsuite/tr1/6_containers/unordered/swap/unordered_multimap/2.cc: New.

From-SVN: r109323
2006-01-04 11:34:24 +00:00
Jakub Jelinek
1f0e2ace93 pmm_malloc.h (posix_memalign): If __cplusplus, make the prototype extern "C" and add throw ().
* config/i386/pmm_malloc.h (posix_memalign): If __cplusplus,
	make the prototype extern "C" and add throw ().

	* g++.dg/other/i386-2.C: New test.

From-SVN: r109318
2006-01-04 09:17:15 +01:00
Jakub Jelinek
d90ee6be66 re PR target/25554 (unrecognizable insn on x86_64 with -O2 -ftracer ( -fno-tree-dominator-opts on the mainline))
PR target/25554
	* config/i386/i386.md (testqi_ext_3): Ensure len is positive
	and pos non-negative and pos + len <= 32.
	(testqi_ext_3_rex64): Ensure len is positive and pos non-negative,
	drop pos + len < HOST_BITS_PER_WIDE_INT test.
	(testqi_ext_3* splitter): Handle pos + len == HOST_BITS_PER_WIDE_INT.

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

From-SVN: r109317
2006-01-04 09:15:06 +01:00
Jakub Jelinek
ee8960e558 re PR c/25559 (Internal compiler error when specifying vector_size(2) of int)
PR c/25559
	* c-common.c (handle_vector_size_attribute): Reject zero vector size
	as well as sizes not multiple of component size.

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

From-SVN: r109316
2006-01-04 09:07:09 +01:00
Jakub Jelinek
434eba35c0 re PR debug/25562 (cannot debug VLA local)
PR debug/25562
	* function.c (instantiate_expr): New function.
	(instantiate_decls_1, instantiate_decls): If DECL_HAS_VALUE_EXPR_P,
	walk its DECL_VALUE_EXPR with instantiate_expr.

	* dwarf2out.c (loc_descriptor_from_tree_1): Don't add
	DW_OP_deref{,_size} if address isn't going to be added.

From-SVN: r109315
2006-01-04 09:05:29 +01:00
Ben Elliston
9c3b204ab8 fp-bit.h: Use top-of-file comment from libgcc2.c.
* config/fp-bit.h: Use top-of-file comment from libgcc2.c.
	* config/fp-bit.c: Likewise.

From-SVN: r109309
2006-01-04 14:42:02 +11:00
Daniel Berlin
b629276a48 dominance.c: Add comment about why we use DFS numbering of dominance tree.
2006-01-03  Daniel Berlin  <dberlin@dberlin.org>

	* dominance.c: Add comment about why we use DFS numbering
	of dominance tree.

From-SVN: r109308
2006-01-04 02:03:19 +00:00
Mark Mitchell
862e1e62fc re PR c++/25492 (friend class nested in derived class problem)
PR c++/25492
	* name-lookup.c (push_class_level_binding): When a derived class
	provides a type binding, eliminate any type binding from a base
	class. 
	PR c++/25625
	* repo.c (repo_emit_p): Always instantiate static data members
	initialized by constant expressions, so that there values are
	available.
	PR c++/25492
	* g++.dg/lookup/friend9.C: New test.
	PR c++/25625
	* g++.dg/template/repo5.C: New test.

From-SVN: r109307
2006-01-04 01:04:51 +00:00
GCC Administrator
8f9f2d0f2b Daily bump.
From-SVN: r109301
2006-01-04 00:17:23 +00:00
David Daney
8ceb88d4cd PR libgcj/9715, PR libgcj/19132:
* java/nio/charset/Charset.java (charsetForName): Try default
	provider first.
	(availableCharsets): Re-merged.
	(providers2): Likewise.
	(defaultCharset): Likewise.
	* sources.am, Makefile.in: Rebuilt.
	* gnu/java/nio/charset/Provider.java: Removed.
	* java/io/OutputStreamWriter.java
	(OutputStreamWriter(OutputStream,Charset)): New constructor.
	(OutputStreamWriter(OutputStream,CharsetEncoder)): Likewise.
	* java/io/InputStreamReader.java
	(InputStreamReader(InputStream,CharsetDecoder)): New constructor.
	(InputStreamReader(InputStream,Charset)): Likewise.
	* gnu/gcj/convert/BytesToUnicode.java (getDecoder): Try a
	BytesToCharsetAdaptor.
	* gnu/gcj/convert/UnicodeToBytes.java (getEncoder): Try a
	CharsetToBytesAdaptor.
	* gnu/gcj/convert/CharsetToBytesAdaptor.java: New file.
	* gnu/gcj/convert/BytesToCharsetAdaptor.java: New file.
	* mauve-libgcj: Remove getEncoding exclusion.

Co-Authored-By: Tom Tromey <tromey@redhat.com>

From-SVN: r109294
2006-01-03 22:58:31 +00:00
Ben Elliston
368872c315 * MAINTAINERS (libdecnumber): Add myself.
From-SVN: r109293
2006-01-04 09:52:08 +11:00
Steven G. Kargl
1c54741a0e re PR fortran/25101 ([4.1] Zero stride allowed in FORALL:s)
2006-01-03  Steven G. Kargl  <kargls@comcast.net>

	PR fortran/25101
	* resolve.c (resolve_forall_iterators):  Check for scalar variables;
	Check stride is nonzero.

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

From-SVN: r109288
2006-01-03 22:01:10 +00:00
Hans-Peter Nilsson
6b2acaad34 Correct last commit
From-SVN: r109287
2006-01-03 20:42:55 +00:00
Hans-Peter Nilsson
103ac22259 thunk3.C, thunk4.C: Gate on dg-require-weak.
* g++.dg/abi/thunk3.C, g++.dg/abi/thunk4.C: Gate on
	dg-require-weak.  Adjust regexp to handle leading-underscore
	targets, NO_DOT_IN_LABEL targets and space as well as TAB after
	.weak.

From-SVN: r109286
2006-01-03 20:24:53 +00:00
Jakub Jelinek
a13e882c79 varasm.c (assemble_variable): Handle thread-local COMMON data.
* varasm.c (assemble_variable): Handle thread-local COMMON data.
        * defaults.h (ASM_OUTPUT_TLS_COMMON): Define.

Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r109282
2006-01-03 08:19:21 -08:00
Paolo Bonzini
13991abbfc re PR rtl-optimization/25578 (gfortran version 4.2.0 20051227 - 144 new testsuite failures since 2005121)
gcc:
2006-01-03  Paolo Bonzini  <bonzini@gnu.org>

	PR rtl-optimization/25578
	* combine.c (combine_simplify_rtx, force_to_mode): Don't
	pass a parameter to simplify_shift_const if changing ASHIFTRT
	to LSHIFTRT.

gcc/testsuite:
2006-01-03  Paolo Bonzini  <bonzini@gnu.org>

	PR rtl-optimization/25578
	* gcc.c-torture/execute/20060102-1.c: New testcase.

From-SVN: r109281
2006-01-03 14:58:05 +00:00
Paolo Carlini
31905f3498 stl_list.h (_List_base<>::_M_get_Node_allocator): Add.
2006-01-03  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_list.h (_List_base<>::_M_get_Node_allocator): Add.
	(_M_get_Tp_allocator, get_allocator): Tidy.
	(list<>::list(const list&), insert(iterator, size_type, const
	value_type&), insert(iterator, _InputIterator, _InputIterator)):
	Use _M_get_Node_allocator.
	* include/bits/stl_tree.h (_Rb_tree<>::_M_get_Node_allocator()): Add.
	(_Rb_tree(const _Rb_tree<>&): Use it.
	* include/bits/stl_deque.h (_Deque_base<>::_M_get_map_allocator,
	get_allocator): Tidy.
	* include/bits/stl_vector.h (_Vector_base<>::get_allocator): Tidy.
	* testsuite/23_containers/map/operators/1_neg.cc: Adjust dg-error
	line numbers.
	* testsuite/23_containers/set/operators/1_neg.cc: Likewise.
	
	* testsuite/testsuite_allocator.h (uneq_allocator<>::swap): Fix.

	* testsuite/testsuite_allocator.h (class uneq_allocator): A simple
	non-empty testing allocator which can be endowed of a "personality"
	at construction time.

From-SVN: r109280
2006-01-03 13:19:23 +00:00
Adrian Straetling
1387fef3fb builtins.c (get_builtin_sync_mem): New function.
2006-01-03  Adrian Straetling  <straetling@de.ibm.com>

	* gcc/builtins.c (get_builtin_sync_mem): New function.
	(expand_builtin_sync_operation, expand_builtin_compare_and_swap,
	expand_builtin_lock_test_and_set, expand_builtin_lock_release):
	Call get_builtin_sync_mem to generate mem rtx.

From-SVN: r109279
2006-01-03 11:52:29 +00:00
Paolo Carlini
9c5093d1a6 1.cc: Initialize vars.
2006-01-03  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/27_io/basic_stringstream/str/char/1.cc: Initialize vars.
	* testsuite/27_io/basic_stringstream/str/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_istringstream/str/char/1.cc: Likewise, tidy.
	* testsuite/27_io/basic_istringstream/str/wchar_t/1.cc: Likewise.

From-SVN: r109275
2006-01-03 10:29:25 +00:00
Richard Guenther
b2ecb7a8e6 re PR c/25183 (internal compiler error triggered by overflow in constant expression)
2006-01-03  Richard Guenther  <rguenther@suse.de>

        PR c/25183
	* stmt.c (add_case_node): Make sure to clear overflow flags
	from ranges.

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

From-SVN: r109272
2006-01-03 09:15:08 +00:00