Commit Graph

76339 Commits

Author SHA1 Message Date
GCC Administrator
6b039c7bae Daily bump.
From-SVN: r116548
2006-08-29 00:17:28 +00:00
Volker Reichelt
9ce387d9cf re PR c++/28860 (Trouble with bound template template parameter in specialization)
PR c++/28860
	* cp-tree.h (maybe_process_partial_specialization): Return
	tree instead of void.
	* parser.c (cp_parser_class_head): Use return value of
	maybe_process_partial_specialization.
	* pt.c (maybe_process_partial_specialization): Return error_mark_node
	for broken specializations, TYPE otherwise.  Check for template
	template parameters.

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

From-SVN: r116541
2006-08-28 22:34:55 +00:00
Zdenek Dvorak
f414f2f35e re PR tree-optimization/28411 ("Illegal instruction" error with -ftrapv)
PR tree-optimization/28411
	* double-int.c (double_int_div): Use double_int_divmod.
	(double_int_divmod, double_int_sdivmod, double_int_udivmod,
	double_int_mod, double_int_smod, double_int_umod): New functions.
	* double-int.h (double_int_divmod, double_int_sdivmod,
	double_int_udivmod, double_int_mod, double_int_smod, double_int_umod):
	Declare.
	* tree-ssa-loop-ivopts.c (constant_multiple_of): Returns the result
	in double_int.
	(get_computation_aff, get_computation_cost_at): Handle double_int
	return type of constant_multiple_of.

From-SVN: r116529
2006-08-28 21:15:19 +00:00
Benjamin Kosnik
689e7ddada PR libstdc++/23773 partial
2006-08-28  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/23773 partial
	* docs/html/abi.html: Update.

From-SVN: r116527
2006-08-28 20:18:22 +00:00
Roger Sayle
8c093661a3 stl_algo.h (__heap_select, [...]): New.
2006-08-28  Roger Sayle  <roger@eyesopen.com>
	    Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_algo.h (__heap_select, __introselect): New.
	(nth_element): New implementation.
	(partial_copy): Use __heap_select.
	* testsuite/performance/25_algorithms/nth_element_worst_case.cc: New.

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

From-SVN: r116520
2006-08-28 18:32:35 +00:00
Kazu Hirata
03a569a38c re PR middle-end/26632 (spurious warning: value computed is not used)
gcc/
	PR middle-end/26632
	* convert.c (convert_to_integer): Set TREE_NO_WARNING to 1 on
	an implicit conversion.

gcc/testsuite/
	PR middle-end/26632
	* gcc.dg/pr26632.c: New.

From-SVN: r116510
2006-08-28 17:18:29 +00:00
Prafulla Thakare
1aeceea452 * config/h8300/h8300.c (TARGET_DEFAULT_TARGET_FLAGS): New.
From-SVN: r116509
2006-08-28 13:51:04 +00:00
Paolo Carlini
da8c0ebea2 2.cc: New.
2006-08-28  Paolo Carlini  <pcarlini@suse.de>
	    Roger Sayle  <roger@eyesopen.com>

	* testsuite/25_algorithms/nth_element/2.cc: New.

Co-Authored-By: Roger Sayle <roger@eyesopen.com>

From-SVN: r116508
2006-08-28 13:26:22 +00:00
Jerry DeLisle
8d8e3aa02c re PR libfortran/28354 ([4.1 Only] 0.99999 printed as 0. instead of 1. by format(f3.0))
2006-08-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/28354
	* gfortran.dg/fmt_zero_precision.f90: New test.

From-SVN: r116503
2006-08-28 05:17:09 +00:00
Jerry DeLisle
20e1580fad re PR libfortran/28354 ([4.1 Only] 0.99999 printed as 0. instead of 1. by format(f3.0))
2006-08-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/28354
	* io/write.c: Check for special case of zero precision in format
	and pre-round the real value.

From-SVN: r116502
2006-08-28 05:14:05 +00:00
Roger Sayle
7f22b9fca4 ifcvt.c (cheap_bb_rtx_cost_p): Don't speculatively execute x87 instructions.
* ifcvt.c (cheap_bb_rtx_cost_p): Don't speculatively execute
	x87 instructions.

From-SVN: r116501
2006-08-28 00:58:47 +00:00
GCC Administrator
b27788aa43 Daily bump.
From-SVN: r116499
2006-08-28 00:17:25 +00:00
Ian Lance Taylor
5317e1c7a9 re PR driver/27622 (gcc hang when compiling with -pipe)
PR driver/27622
	* pex-common.h (struct pex_funcs): Add toclose parameter to
	exec_child field.
	* pex-common.c (pex_run_in_environment): Pass toclose to
	exec_child.
	* pex-djgpp.c (pex_djgpp_exec_child): Add toclose parameter.
	* pex-unix.c (pex_unix_exec_child): Likewise.
	* pex-msdos.c (pex_msdos_exec_child): Likewise.
	* pex-win32.c (pex_win32_exec_child): Likewise.

From-SVN: r116494
2006-08-27 23:50:30 +00:00
Ian Lance Taylor
022d41663d re PR other/28797 (Problems with demangling (__cxa_demangle()))
PR other/28797
	* cp-demangle.c (d_pointer_to_member_type): Do add a substitution
	for a qualified member which is not a function.
	* testsuite/demangle-expected: Add test case.

From-SVN: r116493
2006-08-27 21:42:55 +00:00
Mark Mitchell
99f4234aa7 re PR c++/28058 (ICE in inline_forbidden_p)
PR c++/28058
	* pt.c (register_specialization): Return error_mark_node for
	specialization-after-instantiation.
	* decl2.c (mark_used): Mark the main function used when one of its
	clones is used.
	
	PR c++/28058
	* g++.dg/template/spec31.C: New test.

From-SVN: r116491
2006-08-27 17:45:25 +00:00
Lee Millward
bf87e098ae re PR c++/26573 (Duplicate message for static member in local class)
PR c++/26573
        * class.c (check_field_decls): Don't issue error about
        local classes containing static data members.

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

From-SVN: r116490
2006-08-27 15:22:05 +00:00
Paolo Carlini
0370f61a54 re PR libstdc++/28830 (FAIL: tr1/2_general_utilities/memory/shared_ptr/thread/lockfree_weaktoshared.cc)
2006-08-27  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/28830
	* testsuite/tr1/2_general_utilities/memory/shared_ptr/thread/
	lockfree_weaktoshared.cc: Rename to...
	* testsuite/tr1/2_general_utilities/memory/shared_ptr/thread/
	default_weaktoshared.cc: ... this; test the default base class.
	* testsuite/tr1/2_general_utilities/memory/shared_ptr/thread/
	mutex_weaktoshared.cc: Run like the other thread tests.

From-SVN: r116489
2006-08-27 15:19:23 +00:00
Kazu Hirata
69b3f75b43 * config/i386/crtfastmath.c: Fix a comment typo.
From-SVN: r116487
2006-08-27 06:46:38 +00:00
GCC Administrator
0ab2e94917 Daily bump.
From-SVN: r116485
2006-08-27 00:17:22 +00:00
Roger Sayle
c782c2fed8 tree.h (CASE_LOW_SEEN, [...]): New macros for manipulating temporary visit flags on CASE_LABEL_EXPRs.
* tree.h (CASE_LOW_SEEN, CASE_HIGH_SEEN): New macros for manipulating
	temporary visit flags on CASE_LABEL_EXPRs.
	* c-common.c (match_case_to_enum): Add function comment.  Avoid
	O(N) loop, by looking up both CASE_LOW_SEEN and CASE_HIGH_SEEN.
	(c_do_switch_warnings):  Reorganize to record CASE_LOW_SEEN and
	CASE_HIGH_SEEN for enumerated types.  If the switch expression is
	a constant, only warn if that constant value isn't handled.

	* gcc.dg/Wswitch-enum-2.c: New test case.
	* gcc.dg/Wswitch-enum-3.c: Likewise.

From-SVN: r116481
2006-08-26 23:51:14 +00:00
Steven G. Kargl
52ccd5770a arith.h: Update Copyright dates.
2006-08-26  Steven G. Kargl  <kargls@comcast.net>

	* arith.h: Update Copyright dates.  Fix whitespace.
	* arith.c: Update Copyright dates.  Fix whitespace.  Fix comments.
	(gfc_arith_done_1): Clean up pedantic_min_int and subnormal.

From-SVN: r116480
2006-08-26 21:55:28 +00:00
Joseph Myers
02ec74b9d2 re PR c++/24009 (C++ fails to print #include stack)
PR c++/24009
	* input.h (restore_input_file_stack): Declare.
	(INPUT_FILE_STACK_BITS): Define.
	* toplev.c (fs_p, input_file_stack_history,
	input_file_stack_restored, restore_input_file_stack): New.
	(push_srcloc, pop_srcloc): Check for input_file_stack_tick
	overflowing INPUT_FILE_STACK_BITS bits.  Save new state of stack.
	(pop_srcloc): Don't free old state of stack.

cp:
	* parser.c (struct cp_token): Add input_file_stack_index.
	(eof_token): Update.
	(cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
	(cp_lexer_set_source_position_from_token): Restore input file
	stack.

From-SVN: r116479
2006-08-26 22:38:46 +01:00
David Edelsohn
63d0dca480 re PR target/27544 (attribute altivec is not documented)
PR target/27544
        * doc/extend.texi (PowerPC Variable Attributes): Mention altivec.
        (PowerPC Type Attributes): New.

From-SVN: r116478
2006-08-26 17:36:39 -04:00
Richard Guenther
ec6aa5008e 20060826-1.c: New testcase.
2006-08-26  Richard Guenther  <rguenther@suse.de>

	* gcc.c-torture/compile/20060826-1.c: New testcase.

From-SVN: r116477
2006-08-26 19:27:17 +00:00
Joseph Myers
571d5ac5e9 re PR libgomp/25938 (libgomp installs header files in version and target independent location)
PR libgomp/25938
	* Makefile.am (libsubincludedir): New.
	(nodist_include_HEADERS): Rename to nodist_libsubinclude_HEADERS.
	* Makefile.in: Regenerate.

From-SVN: r116475
2006-08-26 19:30:44 +01:00
Lee Millward
0f67a82f74 re PR c++/28736 (ICE with friend of invalid template class)
PR c++/28736
        PR c++/28737
        PR c++/28738
        * pt.c (process_template_parm): Store invalid template
        parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
        (push_inline_template_parms_recursive): Check for template
        parameters having a TREE_VALUE of error_mark_node rather than
        check the parameter itself.
        (mangle_class_name_for_template): Likewise.
        (comp_template_parms): When comparing the individual template
        parameters, return 1 if either is error_mark_node.
        (current_template_args): Robustify.
        (redeclare_class_template): Likewise.

        * g++.dg/template/void10.C: New test.
        * g++.dg/template/void8.C: New test.
        * g++.dg/template/void9.C: New test.

        * g++.dg/template/void3.C: Adjust error markers.
        * g++.dg/template/void4.C: Likewise.
        * g++.dg/template/crash55.C: Likewise.
        * g++.dg/template/void7.C: Likewise.

From-SVN: r116473
2006-08-26 17:41:18 +00:00
Steven G. Kargl
9618502bff gfortran.texi: Note variable initialization causes SAVE attribute.
2006-08-26  Tobias Burnus  <burnus@net-b.de>

    * gfortran.texi: Note variable initialization causes SAVE attribute.   
    * intrinsic.texi: Clarify support for KIND=16 and KIND=10.
    Mention -std=f2003.  Cross reference INQUIRE from ACCESS intrinsic.
    Add missing ) in ACOS.

From-SVN: r116472
2006-08-26 17:28:09 +00:00
Daniel Franke
fe2842665e intrinsic.texi: Update Copyright date.
2006-08-26  Daniel Franke <franke.daniel@gmail.com>

        * intrinsic.texi: Update Copyright date.  Added documentation
        for ACOSH, AND, ASINH, ATANH, CHDIR, FGET, FGETC, FPUT, FPUTC,
        GETCWD, OR and XOR intrinsics, removed inadvertently introduced
        doc-stubs for EQV and NEQV, corrected some typographical errors.

From-SVN: r116470
2006-08-26 17:13:42 +00:00
Bob Wilson
d234898598 xtensa.c (function_arg_boundary): New.
* config/xtensa/xtensa.c (function_arg_boundary): New.
	(function_arg, xtensa_gimplify_va_arg_expr): Limit alignment to 
	STACK_BOUNDARY.
	* config/xtensa/xtensa.h (FUNCTION_ARG_BOUNDARY): Move code to new
	function_arg_boundary function that limits alignment to STACK_BOUNDARY.

From-SVN: r116469
2006-08-26 17:03:22 +00:00
Mark Mitchell
eff3a27644 re PR c++/28588 (static private function)
PR c++/28588
	* class.c (resolve_address_of_overloaded_function): Add
	access_path parameter.  Perform access checks.
	(instantiate_type): Adjust call to
	resolve_address_of_overloaded_function.  Remove unnecessary code.
	* tree.c (is_overloaded_fn): Document.  Return 2 when there are
	acutally multiple functions.
	(really_overloaded_fn): Use is_overloaded_fn.
	* mangle.c (write_expression): Handle BASELINKs.
	* cp-tree.h (really_overloaded_fn): Return bool.
	(baselink_for_fns): Declare.
	* search.c (lookup_member): Check access for single static
	functions here.
	* pt.c (convert_nontype_argument_function): Handle BASELINKs.
	(tsubst_copy_and_build): Generate BASELINKs for template-ids.
	* semantics.c (finish_call_expr): Use baselink_for_fns.
	(baselink_for_fns): New function.
	(finish_id_expression): Use it.
	* parser.c (cp_parser_template_argument): Don't strip BASELINKs.
	PR c++/28595
	* pt.c (tsubst): Issue errors about attempts to create VLAs at
	template-instantiation time.
	PR c++/28588
	* g++.dg/inherit/access6.C: New test.
	* g++.dg/inherit/access7.C: Likewise.
	PR c++/28595
	* g++.dg/template/array15.C: New test.
	* g++.dg/template/crash2.C: Tweak error markers.

From-SVN: r116468
2006-08-26 16:23:33 +00:00
Jakub Jelinek
fa1ff4eb8c re PR middle-end/28683 (ICE (segfault in add_reg_br_prob_note) when comparing pointers with -O (and higher))
PR middle-end/28683
	* cfgexpand.c (add_reg_br_prob_note): Check if last has exactly
	3 following insns.

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

From-SVN: r116467
2006-08-26 09:31:30 +02:00
Volker Reichelt
7acf7efa89 re PR c++/28853 (ICE on invalid declaration with template template parameter)
PR c++/28853
	* typeck2.c (cxx_incomplete_type_diagnostic): Handle template
	template parameters.  Improve error message for template type
	parameters.

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

From-SVN: r116464
2006-08-26 00:37:48 +00:00
Volker Reichelt
398cd19904 re PR c++/28852 (ICE on invalid conversion operator)
PR c++/28852
	* cp-tree.h (grok_op_properties): Return bool instead of void.
	* decl.c (grokfndecl): Discard invalid operator declarations.
	(copy_fn_p): Revert change for PR 27547.
	(grok_op_properties): Return error status (true on success).
	* pt.c (tsubst_decl): Discard invalid operator declarations.

	* g++.dg/other/operator1.C: Add error-marker.
	* g++.dg/other/operator2.C: New test.

From-SVN: r116463
2006-08-26 00:25:59 +00:00
GCC Administrator
b30409daca Daily bump.
From-SVN: r116460
2006-08-26 00:23:22 +00:00
Volker Reichelt
75a83c65c0 flow.c (verify_wide_reg): Use internal_error for consistency failure.
* flow.c (verify_wide_reg): Use internal_error for consistency failure.
	(verify_local_live_at_start): Likewise.

From-SVN: r116455
2006-08-26 00:17:10 +00:00
Joseph Myers
4c923c2847 re PR c/27893 (ICE with TREE_CONSTANT VLA sizes inside functions)
PR c/27893
	* gimplify.c (gimplify_decl_expr, gimplify_init_ctor_preeval,
	omp_add_variable): Treat sizes as variable whenever not
	INTEGER_CST.

testsuite:
	* gcc.c-torture/compile/vla-const-1.c,
	gcc.c-torture/compile/vla-const-2.c: New tests.

From-SVN: r116450
2006-08-26 00:01:16 +01:00
Richard Guenther
459881189a re PR middle-end/28814 (in compare_values, at tree-vrp.c:415)
2006-08-26  Richard Guenther  <rguenther@suse.de>

	PR middle-end/28814
	* fold-const.c (fold_binary): Fold temporary to correct
	type before constructing new comparison.

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

From-SVN: r116439
2006-08-25 22:01:28 +00:00
Joseph Myers
a942cc86f8 [multiple changes]
2006-08-25  Fariborz Jahanian  <fjahanian@apple.com>

	PR c/28418
	* c-gimplify.c (gimplify_compound_literal_expr): Don't add
	variable again if DECL_SEEN_IN_BIND_EXPR_P.

2006-08-25  Joseph S. Myers  <joseph@codesourcery.com>

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

From-SVN: r116436
2006-08-25 22:14:24 +01:00
Joseph Myers
d8890adf28 re PR c/28299 (ICE with -Wmissing-prototypes)
PR c/28299
	* c-decl.c (start_function): Don't try to process prototype
	information from old declaration that isn't a function.

testsuite:
	* gcc.dg/funcdef-var-1.c, gcc.dg/funcdef-var-2.c: New tests.
	* gcc.dg/pr20368-1.c, gcc.dg/pr20368-2.c, gcc.dg/pr20368-3.c:
	Expect extra diagnostics.

From-SVN: r116435
2006-08-25 22:11:46 +01:00
Jan Hubicka
02709c7f68 re PR target/28621 (SIGSEGV in set_fast_math () at -Os)
2006-08-25  Jan Hubicka  <jh@suse.cz>

	PR target/28621
	* config/i386/crtfastmath.c (set_fast_math): Force stack alignment.

From-SVN: r116431
2006-08-25 20:39:48 +00:00
Alan Modra
90d3ff1c72 re PR target/27075 (Compiler generate incorrect assembler for __sync_fetch-* builtins on e500 aka SPE)
PR target/27075
        * config/rs6000/rs6000.c (print_operand): Only use e500 %y syntax
        for 8 byte objects.

From-SVN: r116425
2006-08-25 14:56:08 -04:00
J"orn Rennecke
e88e0907bd re PR tree-optimization/16876 (ICE on testcase with -O3 in fold-const)
gcc:
	PR tree-optimization/16876
	* c-typeck.c (c_convert_parm_for_inlining): Don't take early
	exit if PARM doesn't match VALUE.

testsuite:
	gcc.dg/noncompile/pr16876.c: New test.

From-SVN: r116424
2006-08-25 19:51:57 +01:00
Paolo Carlini
d718b7aae7 tr1.html: Update.
2006-08-25  Paolo Carlini  <pcarlini@suse.de>

	* docs/html/ext/tr1.html: Update.

From-SVN: r116415
2006-08-25 17:11:10 +00:00
Mark Mitchell
c054c3642a re PR c++/28056 (enum accepted as scope)
PR c++/28056
	* g++.dg/parse/local1.C: New test.
	* g++.dg/other/qual1.C: Tweak error marker.

From-SVN: r116411
2006-08-25 17:04:35 +00:00
Mark Mitchell
2884e22c4b re PR c++/28056 (enum accepted as scope)
PR c++/28056
	* decl.c (grokdeclarator): Disallow declarations with qualified
	names in local scopes.
	PR c++/28056
	* g++.dg/parse/local1.C: New test.

From-SVN: r116410
2006-08-25 17:03:50 +00:00
Nathan Sidwell
7d3bec9db5 re PR c++/27787 (Qualified lookup fails to find inherited class template)
cp/
	PR c++/27787
	* decl.c (make_typename_type): Only try and resolve it when
	context is not dependent.  Refactor.
	* decl2.c (check_classfn): Push to class scope before looking for
	the function.
testsuite/
	PR c++/27787
	* g++.dg/template/typename10.C: New.
	* g++.dg/template/lookup4.C: Remove bogus error marker.

From-SVN: r116409
2006-08-25 16:56:07 +00:00
Bob Wilson
9eb8a531c0 xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Do not emit a literal_prefix directive.
* config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Do not emit a
	literal_prefix directive.
	(XTENSA_DECLARE_FUNCTION_SIZE): Delete.
	* config/xtensa/linux.h (ASM_DECLARE_FUNCTION_SIZE): Delete.
	* config/xtensa/elf.h (ASM_DECLARE_FUNCTION_SIZE): Delete.

From-SVN: r116403
2006-08-25 16:13:54 +00:00
Paolo Carlini
7849b3de89 random (bernoulli_distribution::operator()): Fix wrt generators returning integers.
2006-08-25  Paolo Carlini  <pcarlini@suse.de>

        * include/tr1/random (bernoulli_distribution::operator()): Fix
        wrt generators returning integers.
	(uniform_int<>::_M_call): Add.
	(uniform_int<>::operator()): Use it.

	* include/tr1/random (_Adaptor<>::min, _Adaptor<>::max): Add.
	(_Adaptor<>::operator()): Allow for nonzero _M_g.min().

	* include/tr1/random.tcc (linear_congruential<>::min, max):
	Move inline...
	(__mod): Move ...
	* include/tr1/random: ... here.
	(struct _Mod): Declare.

	* include/tr1/random (struct _To_Unsigned_Type): Only declare,
	move...
	* include/tr1/random.tcc: ... here.

From-SVN: r116402
2006-08-25 16:02:23 +00:00
David Edelsohn
4eb585a473 re PR middle-end/28753 (ICE in extract_insn, at recog.c:2075 on powerpc)
PR target/28753
        * config/rs6000/rs6000.md (movcc_internal1): Change operand 1
        predicate to general_operand.  Add 0->y and I->r alternatives.

From-SVN: r116400
2006-08-25 09:53:39 -04:00
Kazu Hirata
86c33cd0fb tm.texi: Fix a typo.
* doc/tm.texi: Fix a typo.
	* predict.c: Fix comment typos.

From-SVN: r116399
2006-08-25 13:39:02 +00:00