From: Paolo Carlini Date: Mon, 23 May 2016 19:24:22 +0000 (+0000) Subject: re PR c++/69095 (internal compiler error: in dependent_type_p, at cp/pt.c:19399) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d6c9a06fcfc524fef362795cc40dbdffe1ca8b6c;p=gcc.git re PR c++/69095 (internal compiler error: in dependent_type_p, at cp/pt.c:19399) /cp 2016-05-22 Paolo Carlini PR c++/69095 * parser.c (cp_parser_default_argument): Call check_for_bare_parameter_packs. (cp_parser_late_parsing_default_args): Likewise. /testsuite 2016-05-22 Paolo Carlini PR c++/69095 * g++.dg/cpp0x/variadic168.C: New. From-SVN: r236610 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e6f4ac98f9f..764754d54d1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2016-05-23 Paolo Carlini + + PR c++/69095 + * parser.c (cp_parser_initializer): Use check_for_bare_parameter_packs. + 2016-05-23 Paolo Carlini * pt.c (check_for_bare_parameter_packs): Improve error message diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 076e7f36847..a68a510c660 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -20800,6 +20800,9 @@ cp_parser_initializer (cp_parser* parser, bool* is_direct_init, init = error_mark_node; } + if (check_for_bare_parameter_packs (init)) + init = error_mark_node; + return init; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b4ca509c2e1..80b62ad5225 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-05-23 Paolo Carlini + + PR c++/69095 + * g++.dg/cpp0x/variadic168.C: New. + 2016-05-23 Paolo Carlini * g++.dg/cpp0x/pr31445.C: Test column number too. diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic168.C b/gcc/testsuite/g++.dg/cpp0x/variadic168.C new file mode 100644 index 00000000000..202897e4bc2 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/variadic168.C @@ -0,0 +1,18 @@ +// PR c++/69095 +// { dg-do compile { target c++11 } } + +struct B1 { + template // { dg-error "parameter packs not expanded" } + void insert(Ret); +}; + +struct B2 { + template + void insert(Ret, unsigned = sizeof(Args)); // { dg-error "parameter packs not expanded" } +}; + +template // { dg-error "parameter packs not expanded" } +void insert1(Ret); + +template +void insert2(Ret, unsigned = sizeof(Args)); // { dg-error "parameter packs not expanded" }