diff --git a/gcc/testsuite/g++.dg/template/init-list.C b/gcc/testsuite/g++.dg/template/init-list.C new file mode 100644 index 00000000000..6933ef87a17 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/init-list.C @@ -0,0 +1,17 @@ +// Contributed by Gabriel Dos Reis +// { dg-do compile } + +template +struct Base { + Base(int) { } +}; + +template +struct Derived : Base { + Derived(); +}; + +template +Derived::Derived() : Base(4) { } // { dg-error "field" "" } + +