From c58e6cc32c4e36032701e3bc5caa136a35231b5d Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 7 Feb 2020 11:05:30 +0100 Subject: [PATCH] Add testcase of PR c++/89404, already fixed in trunk. PR c++/89404 * g++.dg/ext/vla21.C: New. --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/ext/vla21.C | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 gcc/testsuite/g++.dg/ext/vla21.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 32aa39c02a4..bec80b2a94f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-02-07 Paolo Carlini + + PR c++/89404 + * g++.dg/ext/vla21.C: New. + 2020-02-07 Jakub Jelinek PR target/93615 diff --git a/gcc/testsuite/g++.dg/ext/vla21.C b/gcc/testsuite/g++.dg/ext/vla21.C new file mode 100644 index 00000000000..0923cef2ae7 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/vla21.C @@ -0,0 +1,8 @@ +// PR c++/89404 +// { dg-additional-options "-Wno-vla" } + +void +foo (int n) +{ + struct {} a[1][n] (+a[0]); // { dg-error "initialized" } +} -- 2.30.2