Commit Graph

85375 Commits

Author SHA1 Message Date
H.J. Lu 20533ef1f4 MAINTAINERS: Update my email address.
2008-01-17  H.J. Lu  <hjl.tools@gmail.com>

	* MAINTAINERS: Update my email address.

From-SVN: r131612
2008-01-17 15:44:24 -08:00
Janis Johnson 93efb3c45a re PR target/34814 (SDmode function args not passed according to ABI specification)
PR target/34814
	* gcc.target/powerpc/ppc32-abi-dfp-1.c: Enable checks that will fail
	until 34814 is fixed.

From-SVN: r131611
2008-01-17 22:29:46 +00:00
Andrew MacLeod fae25b37f2 Teach SCCVN that throwing expressions are not to be regenerated.
http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00764.html

Teach SCCVN that throwing expressions are not to be regenerated.

2008-01-17  Andrew MacLeod  <amacleod@redhat.com>

	* tree-ssa-sccvn.c (visit_use): Expressions which can throw are varying.	* gcc.c-torture/compile/pr34648.c: New testcase.

From-SVN: r131610
2008-01-17 21:37:14 +00:00
Anatoly Sokolov 2e152e1687 avr.h (LINK_SPEC): Support -mrelax and -mpmem-wrap-around.
* config/avr/avr.h (LINK_SPEC): Support -mrelax and -mpmem-wrap-around.
	* config/avr/avr.opt (mrelax, mpmem-wrap-around): Add.

From-SVN: r131609
2008-01-17 23:52:27 +03:00
Seongbae Park 185082a7b8 re PR middle-end/34400 (bad interaction between DF and SJLJ exceptions)
2008-01-17  Seongbae Park  <seongbae.park@gmail.com>

	PR rtl-optimization/34400
	* df-core.c (df_worklist_dataflow_overeager,
	df_worklist_dataflow_doublequeue): New functions.
	(df_worklist_dataflow): Two different worklist solvers.
	* params.def (PARAM_DF_DOUBLE_QUEUE_THRESHOLD_FACTOR):
	New param.

From-SVN: r131608
2008-01-17 20:02:56 +00:00
Sebastian Pop 01a550c20d re PR testsuite/34821 (new gcc.dg testsuite failures)
2008-01-16  Sebastian Pop  <sebastian.pop@amd.com>

	PR testsuite/34821
	* doc/invoke.texi: Document the dependence on pthread for fopenmp
	and ftree-parallelize-loops.

From-SVN: r131606
2008-01-17 18:00:41 +00:00
Sebastian Pop 86595dba6c re PR testsuite/34821 (new gcc.dg testsuite failures)
2008-01-17  Sebastian Pop  <sebastian.pop@amd.com>

	PR testsuite/34821
	* gcc.dg/autopar/autopar.exp: New.
	* g++.dg/tree-ssa/pr34355.C: Require pthread.
	* lib/target-supports.exp (check_effective_target_pthread): New.

	* gcc.dg/tree-ssa/parallelization-1.c: Moved to gcc.dg/autopar.
	* gcc.dg/tree-ssa/reduc-1short.c: Same.
	* gcc.dg/tree-ssa/reduc-1.c: Same.
	* gcc.dg/tree-ssa/reduc-2short.c: Same.
	* gcc.dg/tree-ssa/reduc-2.c: Same
	* gcc.dg/tree-ssa/reduc-3.c: Same.
	* gcc.dg/tree-ssa/reduc-1char.c: Same.
	* gcc.dg/tree-ssa/reduc-6.c: Same.
	* gcc.dg/tree-ssa/reduc-7.c: Same.
	* gcc.dg/tree-ssa/reduc-2char.c: Same.
	* gcc.dg/tree-ssa/reduc-8.c: Same.
	* gcc.dg/tree-ssa/reduc-9.c: Same.

From-SVN: r131605
2008-01-17 17:54:56 +00:00
Mircea Namolaru 806631075b Fix 34826
From-SVN: r131604
2008-01-17 17:49:32 +00:00
Andreas Krebbel 599824d24a global.c (find_reg): Mark the eh regs as used if necessary.
2008-01-17  Andreas Krebbel  <krebbel1@de.ibm.com>

	* global.c (find_reg): Mark the eh regs as used if necessary.
	* ra-conflict.c (global_conflicts): Set no_eh_reg flag.
	* ra.h (struct allocno): no_eh_reg field added.  Changed
	no_stack_reg type to bitfield.

From-SVN: r131601
2008-01-17 16:18:59 +00:00
Eric Botcazou 9328dd5725 tree.c (substitute_in_expr): Add missing 'break'.
* tree.c (substitute_in_expr): Add missing 'break'.
ada/
        * utils.c (build_function_stub): Properly build the call expression.

From-SVN: r131600
2008-01-17 16:04:10 +00:00
Eric Botcazou 7c1950cdf1 20080114-1.c: Use empty asm statements.
* gcc.c-torture/compile/20080114-1.c: Use empty asm statements.

From-SVN: r131596
2008-01-17 12:42:20 +00:00
Richard Guenther 8a5b57cdfd re PR tree-optimization/34825 (ICE with -funsafe-math-optimizations)
2008-01-17  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/34825
	* tree-ssa-math-opts.c (is_division_by): Do not recognize
	x / x as division to handle.

	* gcc.dg/pr34825.c: New testcase.

From-SVN: r131595
2008-01-17 12:17:24 +00:00
Richard Guenther f779b9aec9 20080117-1.c: New testcase.
2008-01-17  Richard Guenther  <rguenther@suse.de>

        * gcc.c-torture/execute/20080117-1.c: New testcase.

From-SVN: r131594
2008-01-17 12:13:53 +00:00
Revital Eres 57c8cf5d5b Fix pr30957-1.c testcase
From-SVN: r131593
2008-01-17 10:19:58 +00:00
Paul Thomas 1c8bcdf715 re PR fortran/34429 (Fails: character(len=use_associated_const) function foo())
2008-01-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/34429
	PR fortran/34431
	PR fortran/34471
	* decl.c : Remove gfc_function_kind_locus and
	gfc_function_type_locus. Add gfc_matching_function.
	(match_char_length): If matching a function and the length
	does not match, return MATCH_YES and try again later.
	(gfc_match_kind_spec): The same.
	(match_char_kind): The same.
	(gfc_match_type_spec): The same for numeric and derived types.
	(match_prefix): Rename as gfc_match_prefix.
	(gfc_match_function_decl): Except for function valued character
	lengths, defer applying kind, type and charlen info until the
	end of specification block.
	gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
	parse.c (decode_specification_statement): New function.
	(decode_statement): Call it when a function has kind = -1. Set
	and reset gfc_matching function, as function statement is being
	matched.
	(match_deferred_characteristics): Simplify with a single call
	to gfc_match_prefix. Do appropriate error handling. In any
	case, make sure that kind = -1 is reset or corrected.
	(parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
	Throw an error if kind = -1 after last specification statement.
	parse.h : Prototype for gfc_match_prefix.

2008-01-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/34429
	* gfortran.dg/function_charlen_1.f90: New test.

	PR fortran/34431
	* gfortran.dg/function_types_1.f90: New test.
	* gfortran.dg/function_types_2.f90: New test.

	PR fortran/34471
	* gfortran.dg/function_kinds_4.f90: New test.
	* gfortran.dg/function_kinds_5.f90: New test.

	* gfortran.dg/defined_operators_1.f90: Errors now at function
	declarations.
	* gfortran.dg/private_type_4.f90: The same.
	* gfortran.dg/interface_15.f90: The same.
	* gfortran.dg/elemental_args_check_2.f90: The same.
	* gfortran.dg/auto_internal_assumed.f90: The same.

From-SVN: r131592
2008-01-17 07:19:04 +00:00
John David Anglin e7ce29e776 Log entry for last change.
From-SVN: r131591
2008-01-17 04:36:40 +00:00
John David Anglin 4d6f8e561e pa64-hpux.h (LIB_SPEC): Add "-lpthread" in shared links if "-mt" or "-pthread" is specified.
* pa64-hpux.h (LIB_SPEC): Add "-lpthread" in shared links if "-mt" or
	"-pthread" is specified.
	* pa-hpux11.h (LIB_SPEC): Likewise.

From-SVN: r131590
2008-01-17 03:55:34 +00:00
Janis Johnson 37b87a3a8a re PR rtl-optimization/33796 (valgrind error with -O2 for linux kernel code)
PR rtl-optimization/33796
	* sparseset.c (sparseset_alloc): Use xcalloc rather than xmalloc.

Co-Authored-By: Peter Bergner <bergner@vnet.ibm.com>

From-SVN: r131589
2008-01-16 21:21:36 -06:00
John David Anglin 6595ec51c4 re PR libfortran/34699 (FAIL: gfortran.fortran-torture/execute/intrinsic_set_exponent.f90 execution)
PR libgfortran/34699
	* pa-hpux.h (LINK_SPEC): Only search /lib/pa1.1 and /usr/lib/pa1.1 on
	static links.
	* pa-hpux10.h (LINK_SPEC): Likewise.
	* pa-hpux11.h (LINK_SPEC): Don't search /lib/pa1.1 and /usr/lib/pa1.1.

From-SVN: r131586
2008-01-17 02:48:20 +00:00
GCC Administrator 8f90eb9722 Daily bump.
From-SVN: r131584
2008-01-17 00:17:29 +00:00
Eric Botcazou fa5c70d892 sizetype.adb: New test.
* gnat.dg/sizetype.adb: New test.

From-SVN: r131580
2008-01-16 22:14:43 +00:00
Richard Guenther bdb55eae5e re PR middle-end/32628 (bogus integer overflow warning)
2008-01-16  Richard Guenther  <rguenther@suse.de>

	PR middle-end/32628
	* fold-const.c (fold_convert_const_int_from_int): Do not
	set overflow if that occured only because of a sign extension
	change when converting from/to a sizetype with the same
	precision and signedness.

	* gcc.dg/overflow-warn-7.c: New testcase.

From-SVN: r131579
2008-01-16 21:51:57 +00:00
Uros Bizjak 2e2c7ce237 re PR debug/34249 (FAIL: gcc.dg/tree-prof/bb-reorg.c compilation, -fprofile-use -D_PROFILE_USE)
PR debug/34249
        * dwarf2out.c (output_call_frame_info): Move output of FDE initial
        location address to the correct place.  Update copyright year.

From-SVN: r131578
2008-01-16 22:20:39 +01:00
Sebastian Pop d49c149d62 lambda-code.c (lambda_transform_legal_p): Handle the case of no dependences in the dependence_relations vector.
2008-01-16  Sebastian Pop  <sebastian.pop@amd.com>

	* lambda-code.c (lambda_transform_legal_p): Handle the case of
	no dependences in the dependence_relations vector.

From-SVN: r131577
2008-01-16 19:26:26 +00:00
Jan Hubicka a03c6d64f4 re PR rtl-optimization/31396 (Inline code performance much worse than out-of-line)
PR rtl-optimization/31396
	* regstat.c (regstat_bb_compute_ri): Compute FREQ_CALLS_CROSSED.
	* cfg.c (dump_reg_info): Print it.
	* regs.h (struct reg_info_t): add freq_calls_crossed.
	(REG_FREQ_CALLS_CROSSED): New macro.
	* global.c (global_alloc): Compute freq_calls_crossed for allocno.
	(find_reg): Update call of CALLER_SAVE_PROFITABLE.
	* regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2,
	regmove_optimize): Update call crossed frequencies.
	* local-alloc.c (struct qty): Add freq_calls_crossed.
	(alloc_qty): Copute freq_calls_crossed.
	(update_equiv_regs, combine_regs): Update REG_FREQ_CALLS_CROSSED.
	(find_free_reg): Update call of CALLER_SAVE_PROFITABLE.
	* ra.h (struct allocno): Add freq_calls_crossed.

From-SVN: r131576
2008-01-16 16:32:05 +00:00
Kaveh R. Ghazi 58c0b65244 loop-19.c: Require nonpic.
* gcc.dg/tree-ssa/loop-19.c: Require nonpic.

From-SVN: r131575
2008-01-16 16:29:11 +00:00
Sebastian Pop daf4935485 gcc.c (LINK_COMMAND_SPEC): Add includes and link options for libgomp when...
* gcc.c (LINK_COMMAND_SPEC): Add includes and link options for
	libgomp when compiling with ftree-parallelize-loops.
	(GOMP_SELF_SPECS): Add -pthread for ftree-parallelize-loops.

From-SVN: r131574
2008-01-16 16:23:20 +00:00
Richard Guenther a1a5996d9e re PR tree-optimization/34769 (gcc.dg/vect/no-vfa-pr29145.c)
2008-01-16  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/34769
	* tree-data-ref.c (initialize_matrix_A): Revert fix for PR34458.
	* tree.c (int_cst_value): Instead make this function more
	permissive in what it accepts as valid input.  Document this
	function always sign-extends the value.

From-SVN: r131573
2008-01-16 16:00:17 +00:00
Jakub Jelinek de4af523c5 re PR middle-end/34668 (ICE in find_compatible_field with -combine)
2008-01-16  Jakub Jelinek  <jakub@redhat.com>
	Richard Guenther  <rguenther@suse.de>

	PR c/34668
	* gimplify.c (fold_indirect_ref_rhs): Rename to ...
	(gimple_fold_indirect_ref_rhs): ... this.
	(gimple_fold_indirect_ref): New function with foldings
	that preserve lvalueness.
	(gimplify_modify_expr_rhs): Call gimple_fold_indirect_ref_rhs.
	* tree-flow.h (gimple_fold_indirect_ref): Declare.
	* tree-inline.c (copy_body_r): Use gimple_fold_indirect_ref
	to fold an INDIRECT_REF, fall back to the old use of
	fold_indirect_ref_1.

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

Co-Authored-By: Richard Guenther <rguenther@suse.de>

From-SVN: r131572
2008-01-16 13:41:13 +00:00
Sebastian Pop 6935bae779 tree-data-ref.c (subscript_dependence_tester_1): Call free_conflict_function.
2008-01-16  Sebastian Pop  <sebastian.pop@amd.com>

	* tree-data-ref.c (subscript_dependence_tester_1): Call 
	free_conflict_function.
	(compute_self_dependence): Same.

From-SVN: r131571
2008-01-16 13:16:50 +00:00
Uros Bizjak a4b6974e6b re PR debug/34249 (FAIL: gcc.dg/tree-prof/bb-reorg.c compilation, -fprofile-use -D_PROFILE_USE)
PR debug/34249
	* debug.h (dwarf2out_switch_text_section): Move declaration from ...
	* dwarf2out.c (dwarf2out_switch_text_section): ... here.  Make
	function global.
	* final.c (final_scan_insn) [NOTE_INSN_SWITCH_TEXT_SECTIONS]:
	Depending on dwarf2out_do_frame, call dwarf2out_switch_text_section
	for DWARF2_UNWIND_INFO targets.

From-SVN: r131570
2008-01-16 12:10:27 +01:00
Richard Guenther be2b548394 re PR c++/33819 (Miscompiled shift of C++ bitfield)
2008-01-16  Richard Guenther  <rguenther@suse.de>

	PR c++/33819
	* typeck.c (is_bitfield_expr_with_lowered_type): Recurse
	for conversions to type variants.

	* g++.dg/torture/pr33819.C: New testcase.

From-SVN: r131569
2008-01-16 09:46:29 +00:00
Richard Guenther eb1387a051 re PR c/34768 (Wrong code with conditional function invocation)
2008-01-16  Richard Guenther  <rguenther@suse.de>

	PR c/34768
	* c-typeck.c (common_pointer_type): Do not merge inconsistent
	type qualifiers for function types.

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

From-SVN: r131568
2008-01-16 09:44:23 +00:00
Steven Bosscher 4349e29287 re PR libfortran/34669 (libgfortran doesn't build with -pipe)
2008-01-16  Steven Bosscher  <steven@gcc.gnu.org>

        PR libfortran/34669
        * mk-kinds-h.sh: Compile with -S to avoid calling the assembler,
        to avoid piping the -fdump-parse-tree output to the assembler
        when configuring with -pipe.
        * mk-sik-inc.sh: Likewise.
        * mk-srk-inc.sh: Likewise.

From-SVN: r131567
2008-01-16 10:13:39 +01:00
Tobias Burnus 6da0839af3 re PR fortran/34796 (Too strict error checking for assumed-shaped array)
2008-01-16  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34796
        * interface.c (compare_parameter): Allow AS_DEFERRED array
        elements and reject attr.pointer array elemenents.
        (get_expr_storage_size): Return storage size of elements of
        assumed-shape and pointer arrays.

2008-01-16  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34796
        * gfortran.dg/argument_checking_13.f90: New.
        * gfortran.dg/argument_checking_14.f90: New.

From-SVN: r131566
2008-01-16 08:12:00 +01:00
Sebastian Pop e6fbb140ba tree-parloops (gen_parallel_loop): Revert my fix.
2008-01-15  Sebastian Pop  <sebastian.pop@amd.com>

	* tree-parloops (gen_parallel_loop): Revert my fix.

From-SVN: r131565
2008-01-16 04:17:49 +00:00
Sebastian Pop 85734eda1a tree-parloops.c (gen_parallel_loop): Fix previous change, declare li.
2008-01-15  Sebastian Pop  <sebastian.pop@amd.com>

	* tree-parloops.c (gen_parallel_loop): Fix previous change, declare li.

From-SVN: r131564
2008-01-16 04:14:21 +00:00
Jerry DeLisle 9326236d4d tree-parloops.c (gen_parallel_loop): Fix ommision of declaration for loop_iterator li from previous commit.
2008-01-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* tree-parloops.c (gen_parallel_loop): Fix ommision of declaration for
	loop_iterator li from previous commit.

From-SVN: r131563
2008-01-16 04:04:37 +00:00
Sebastian Pop 92a6bdbd10 tree-parloops.c (gen_parallel_loop): Free loop bound estimations.
2008-01-12  Sebastian Pop  <sebastian.pop@amd.com>

	* tree-parloops.c (gen_parallel_loop): Free loop bound estimations.

From-SVN: r131562
2008-01-16 02:46:46 +00:00
Sebastian Pop 1d4af1e827 tree-parloops.c (loop_has_blocks_with_irreducible_flag): New.
2008-01-12  Sebastian Pop  <sebastian.pop@amd.com>

	* tree-parloops.c (loop_has_blocks_with_irreducible_flag): New.
	(parallelize_loops): Don't parallelize irreducible components.

From-SVN: r131561
2008-01-16 02:44:04 +00:00
GCC Administrator 8c87e2452f Daily bump.
From-SVN: r131559
2008-01-16 00:17:28 +00:00
Sebastian Pop e0e8ce7a38 f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins for flag_tree_parallelize_loops.
2008-01-15  Sebastian Pop  <sebastian.pop@amd.com>

	* f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
	for flag_tree_parallelize_loops.

From-SVN: r131556
2008-01-15 23:45:28 +00:00
Andreas Tobler cde7bfee90 parser.c (cp_parser_template_parameter): Fix C90 issue with mixing declaration and code.
2008-01-15  Andreas Tobler  <a.tobler@schweiz.org>

        * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
        declaration and code.  Update copyright year.

From-SVN: r131555
2008-01-15 22:58:02 +00:00
Thomas Koenig 90469382c0 re PR libfortran/34671 (any(kind=1) and all(kind=1))
2008-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/34671
	* gfortran.am: Added _gfortran_all_l1, _gfortran_all_l2,
	_gfortran_any_l1, _gfortran_any_l2, -28,15 _gfortran_count_1_l,
	_gfortran_count_16_l, _gfortran_count_2_l, _gfortran_count_4_l and
	_gfortran_count_8_l Removed _gfortran_count_16_l16,
	_gfortran_count_16_l4, _gfortran_count_16_l8,
	_gfortran_count_4_l16, _gfortran_count_4_l4, _gfortran_count_4_l8,
	_gfortran_count_8_l16, _gfortran_count_8_l4 and
	_gfortran_count_8_l8.
	* Makefile.am: Added generated/any_l1.c and generated/any_l2.c to
	i_any_c.  Added generated/all_l1. and generated/all_l2.c to
	i_all_c.  Removed generated/count_4_l4.c, generated/count_8_l4.c,
	generated/count_16_l4.c, generated/count_4_l8.c,
	generated/count_8_l8.c, generated/count_16_l8.c,
	generated/count_4_l16.c, generated/count_8_l16.c, and
	generated/count_16_l16.c from i_count_c.  Added count_1_l.c,
	count_2_l.c, count_4_l.c, count_8_l.c and count_16_l.c to
	i_count_c.  I_M4_DEPS2 depends on ifunction_logical.m4, for
	any of the files generated from all.m4, any.m4 and count.m4.
	* Makefile.in:  Regenerated.
	* m4/ifunction_logical.m4:  New file.  Use
	GFC_LOGICAL_1 pointer for access to source arrays.
	* m4/any.m4:  Include ifunction_logical.m4 instead of
	ifunction.m4.  Don't check atype_name.
	* m4/all.m4:  Likewise.
	* m4/count.m4:  Likewise.
	* generated/any_l1.c:  New file.
	* generated/any_l2.c:  New file.
	* generated/all_l1.c:  New file.
	* generated/count_1_l.c:  New file.
	* generated/count_2_l.c:  New file.
	* generated/count_4_l.c:  New file.
	* generated/count_8_l.c:  New file.
	* generated/count_16_l.c:  New file.
	* generated/any_l4.c:  Regenerated.
	* generated/any_l8.c:  Regenerated.
	* generated/any_l16.c:  Regenerated.
	* generated/all_l4.c: Regenerated.
	* generated/all_l8.c: Regenerated.
	* generated/all_l16.c: Regenerated.
	* generated/count_4_l4.c:  Removed.
	* generated/count_4_l8.c:  Removed.
	* generated/count_4_l16.c:  Removed.
	* generated/count_8_l4.c:  Removed.
	* generated/count_8_l8.c:  Removed.
	* generated/count_8_l16.c:  Removed.
	* generated/count_16_l4.c:  Removed.
	* generated/count_16_l8.c:  Removed.
	* generated/count_16_l16.c:  Removed.

2008-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/34671
	* iresolve.c (gfc_resolve_all):  Call resolve_mask_arg.
	(gfc_resolve_any):  Likewise.
	(gfc_resolve_count):  Likewise.  Don't append kind of
	argument to function name.

2008-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
	
	PR libfortran/34671
	* gfortran.dg/anyallcount_1.f90:  New test.

From-SVN: r131553
2008-01-15 21:22:07 +00:00
Douglas Gregor ac90ae18fb re PR c++/34399 (ICE on invalid friend declaration of variadic template)
2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/34399
	* friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
	know we have a class type.

2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/34399
	* g++.dg/cpp0x/vt-34399.C: New.
	* g++.dg/template/friend50.C: New.

From-SVN: r131552
2008-01-15 20:56:55 +00:00
Bruce Korb 44b962f21c Clarify the second argument usage for "c-fix"-es.
From-SVN: r131550
2008-01-15 19:44:03 +00:00
Bruce Korb 5af3679c8c Clarify the second argument usage for "c-fix"-es.
From-SVN: r131549
2008-01-15 19:14:28 +00:00
Douglas Gregor cdcae7450e re PR c++/34751 (ICE with pointer to member and variadic templates)
2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/34751
	* pt.c (coerce_template_parameter_pack): When substituting into
	the type of a non-type template parameter pack. use the
	deduced/substituted arguments.
	* parser.c (declarator_can_be_parameter_pack): A pointer-to-member
	can be a parameter pack with the ellipsis following it.  When we
	have an erroneous declaration, allow it to be a parameter pack.
	(cp_parser_template_parameter): Complain about default
	arguments on non-type template parameter packs, and parse them
	using the new cp_parser_default_argument.
	(cp_parser_parameter_declaration): Complain about parameter packs
	with default arguments. Move parsing of default arguments into a
	new function, cp_parser_default_argument.
	(cp_parser_default_argument): New; extracted from
	cp_parser_parameter_declaration.

2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/34751
	* g++.dg/cpp0x/vt-34751.C: New.

From-SVN: r131548
2008-01-15 18:49:47 +00:00
Douglas Gregor 4439d02f0f re PR c++/34051 (ICE in dependent_type_p with variadic templates)
2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/34051
	PR c++/34055
	PR c++/34102
	PR c++/34103
	* typeck.c (check_return_expr): If there are bare parameter packs
	in the return value, set it to error_mark_node.
	* tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
	* pt.c (find_parameter_packs_r): Look at the type of
	IDENTIFIER_NODEs (e.g., for user-defined conversions).
	(check_for_bare_parameter_packs): Flip the result: now returns
	TRUE when there were bare parameter packs, FALSE otherwise.
	(push_template_decl_real): Deal with flipped result of
	check_for_bare_parameter_packs.
	* semantics.c (finish_cond): If there are bare parameter packs in
	the conditional, set it to error_mark_node.
	(finish_expr_stmt): If there are bare parameter packs in the
	expression, set it to error_mark_node.
	(finish_for_expr): Ditto.
	(finish_switch_cond): If there are bare parameter packs in
	the conditional, set it to error_mark_node.
	(finish_mem_initializers): If there are bare parameter packs in
	the member initializer, set it to error_mark_node.
	(finish_member_declaration): Check the attributes of the
	declaration for bare parameter packs, and remove the attributes if
	any have bare parameter packs.
	* parser.c (cp_parser_using_declaration): Check the using
	declaration for bare parameter packs.
	(cp_parser_base_clause): If there are bare parameter packs in a
	base specifier, don't add it to the chain.

2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/34051
	PR c++/34055
	PR c++/34102
	PR c++/34103
	* g++.dg/cpp0x/vt-34051-2.C: New.
	* g++.dg/cpp0x/vt-34102.C: New.
	* g++.dg/cpp0x/vt-34051.C: New.
	* g++.dg/cpp0x/vt-34055.C: New.
	* g++.dg/cpp0x/vt-34103.C: New.

From-SVN: r131547
2008-01-15 18:08:00 +00:00
Douglas Gregor a022041e4c re PR c++/34314 (ICE on invalid code (with variadic templates): tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in template_class_depth)
2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>

       PR c++/34314
       * error.c (dump_simple_decl): Display ellipsis for template
       non-type parameter packs.
       (dump_decl): Display ellipsis for template type parameter packs.
       (dump_template_decl): Display ellipsis for template template
       parameter packs.
       * pt.c (redeclare_class_template): When redeclaring a class
       template, check for collisions between template parameters and
       template parameter packs.

2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>

       PR c++/34314
       * g++.dg/cpp0x/vt-34314.C: New.
       * g++.dg/cpp0x/variadic79.C: Fix the error message to reflect
       reality (the error message was wrong previously).

From-SVN: r131546
2008-01-15 17:59:44 +00:00