re PR c++/55323 (ICE in expand_aggr_init_1, at cp/init.c:1718)
/cp 2012-11-14 Paolo Carlini <paolo.carlini@oracle.com> PR c++/55323 * init.c (emit_mem_initializers): Skip arguments == error_mark_node. /testsuite 2012-11-14 Paolo Carlini <paolo.carlini@oracle.com> PR c++/55323 * g++.dg/cpp0x/vt-55323.C: New. From-SVN: r193505
This commit is contained in:
parent
7628dc541e
commit
3b616f08a6
@ -1,3 +1,8 @@
|
||||
2012-11-14 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/55323
|
||||
* init.c (emit_mem_initializers): Skip arguments == error_mark_node.
|
||||
|
||||
2012-11-14 Fabien Chêne <fabien@gcc.gnu.org>
|
||||
|
||||
PR c++/11750
|
||||
|
@ -1047,12 +1047,17 @@ emit_mem_initializers (tree mem_inits)
|
||||
in_base_initializer = 1;
|
||||
|
||||
/* Initialize base classes. */
|
||||
while (mem_inits
|
||||
&& TREE_CODE (TREE_PURPOSE (mem_inits)) != FIELD_DECL)
|
||||
for (; (mem_inits
|
||||
&& TREE_CODE (TREE_PURPOSE (mem_inits)) != FIELD_DECL);
|
||||
mem_inits = TREE_CHAIN (mem_inits))
|
||||
{
|
||||
tree subobject = TREE_PURPOSE (mem_inits);
|
||||
tree arguments = TREE_VALUE (mem_inits);
|
||||
|
||||
/* We already have issued an error message. */
|
||||
if (arguments == error_mark_node)
|
||||
continue;
|
||||
|
||||
if (arguments == NULL_TREE)
|
||||
{
|
||||
/* If these initializations are taking place in a copy constructor,
|
||||
@ -1085,8 +1090,6 @@ emit_mem_initializers (tree mem_inits)
|
||||
tf_warning_or_error);
|
||||
expand_cleanup_for_base (subobject, NULL_TREE);
|
||||
}
|
||||
|
||||
mem_inits = TREE_CHAIN (mem_inits);
|
||||
}
|
||||
in_base_initializer = 0;
|
||||
|
||||
|
@ -1,15 +1,13 @@
|
||||
2012-11-14 Fabien Chêne <fabien@gcc.gnu.org>
|
||||
2012-11-14 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/11750
|
||||
* call.c (build_new_method_call_1): Check that the instance type
|
||||
and the function context are the same before setting the flag
|
||||
LOOKUP_NONVIRTUAL.
|
||||
PR c++/55323
|
||||
* g++.dg/cpp0x/vt-55323.C: New.
|
||||
|
||||
2012-11-13 Sriraman Tallam <tmsriram@google.com>
|
||||
|
||||
* testsuite/g++.dg/mv4.C: Add require ifunc. Change error message.
|
||||
* testsuite/g++.dg/mv5.C: Add require ifunc.
|
||||
* testsuite/g++.dg/mv6.C: Add require ifunc.
|
||||
* g++.dg/mv4.C: Add require ifunc. Change error message.
|
||||
* g++.dg/mv5.C: Add require ifunc.
|
||||
* g++.dg/mv6.C: Add require ifunc.
|
||||
|
||||
2012-11-13 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
|
12
gcc/testsuite/g++.dg/cpp0x/vt-55323.C
Normal file
12
gcc/testsuite/g++.dg/cpp0x/vt-55323.C
Normal file
@ -0,0 +1,12 @@
|
||||
// { dg-options "-std=c++11" }
|
||||
|
||||
struct foo {
|
||||
foo(int a, float b);
|
||||
};
|
||||
|
||||
struct bar : foo {
|
||||
template<typename... Args>
|
||||
bar(Args&&... args) : foo(2, args){} // { dg-error "parameter packs" }
|
||||
};
|
||||
|
||||
bar b(2,1.);
|
Loading…
Reference in New Issue
Block a user