view gcc/testsuite/gcc.dg/vla-init-4.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* 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" } */