From: Paolo Carlini Date: Wed, 12 Aug 2015 17:18:14 +0000 (+0000) Subject: re PR c++/52742 (Initializing an array using brace initializer and template parameters) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c3d3b30a9ab56e4bf2462bcdff76722ce5a3fa5e;p=gcc.git re PR c++/52742 (Initializing an array using brace initializer and template parameters) 2015-08-12 Paolo Carlini PR c++/52742 * g++.dg/cpp0x/pr52742.C: New. From-SVN: r226824 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4d053d2bf10..d18a406ba11 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-08-12 Paolo Carlini + + PR c++/52742 + * g++.dg/cpp0x/pr52742.C: New. + 2015-08-12 H.J. Lu * gcc.target/i386/builtin_target.c (check_intel_cpu_model): diff --git a/gcc/testsuite/g++.dg/cpp0x/pr52742.C b/gcc/testsuite/g++.dg/cpp0x/pr52742.C new file mode 100644 index 00000000000..f4d3dec9689 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr52742.C @@ -0,0 +1,16 @@ +// PR c++/52742 +// { dg-do compile { target c++11 } } + +void foo() { + new int[1] {1}; +} + +template +void goo() { + new int[1] {1}; +} + +int main() { + foo(); + goo<1>(); +}