summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vla-init-4.c
blob: 06351d04e0341fdb14904e0fe13e3003386259cc (plain)
1
2
3
4
5
6
7
/* Test for ICE on VLA compound literal.  */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
/* { dg-options "" } */

const int i = 1;
void foo() { char *p = (char [i]){ "" }; } /* { dg-error "compound literal has variable size" } */