diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-11-20 07:38:48 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2007-11-20 07:38:48 +0100 |
commit | 6da06848ec8206c9824187019a9168b7aa38c94e (patch) | |
tree | 8da710cbd100cbf7f36f3c6050f186eee873e57b /gcc/testsuite/g++.dg | |
parent | 63d34078b671ef7f3666daea632596f0885ee840 (diff) | |
download | gcc-6da06848ec8206c9824187019a9168b7aa38c94e.zip gcc-6da06848ec8206c9824187019a9168b7aa38c94e.tar.gz gcc-6da06848ec8206c9824187019a9168b7aa38c94e.tar.bz2 |
re PR c++/28879 (ICE with VLA in template function)
PR c++/28879
* tree.c (build_cplus_array_type_1): Don't pass any VLA types
when processing_template_decl to build_array_type.
* g++.dg/template/vla2.C: New test.
From-SVN: r130309
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/template/vla2.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/vla2.C b/gcc/testsuite/g++.dg/template/vla2.C new file mode 100644 index 0000000..183f8fa --- /dev/null +++ b/gcc/testsuite/g++.dg/template/vla2.C @@ -0,0 +1,20 @@ +// PR c++/28879 +// { dg-do compile } +// { dg-options "" } + +struct A +{ + static int i; + int j; +}; + +template<int> void foo () +{ + int x[A::i]; +//int y[A().j]; +} + +void bar () +{ + foo<6> (); +} |