PR libstdc++/70940 make pmr::resource_adaptor return aligned memory
[official-gcc.git] / gcc / testsuite / gcc.dg / vla-15.c
blob800163bc1844c178f3fc6fa8b217121a258b6a5b
1 /* Test for VLA size evaluation in sizeof typeof. */
2 /* Origin: Joseph Myers <joseph@codesourcery.com> */
3 /* { dg-do run } */
4 /* { dg-options "-std=gnu99" } */
6 #include <stdarg.h>
8 extern void exit (int);
9 extern void abort (void);
11 char a[1];
13 void
14 f1 (void)
16 int i = 0;
17 int j = sizeof (typeof (*(++i, (char (*)[i])a)));
18 if (i != 1 || j != 1)
19 abort ();
22 int
23 main (void)
25 f1 ();
26 exit (0);