]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/vla-14.c
replace ISL with isl
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / vla-14.c
CommitLineData
928c19bb
JM
1/* Test for VLA size evaluation in va_arg. */
2/* Origin: Joseph Myers <joseph@codesourcery.com> */
3/* { dg-do run } */
4/* { dg-options "-std=gnu99" } */
5
6#include <stdarg.h>
7
8extern void exit (int);
9extern void abort (void);
10
11int a[10];
12int i = 9;
13
14void
15f (int n, ...)
16{
17 va_list ap;
18 void *p;
19 va_start (ap, n);
20 p = va_arg (ap, typeof (int (*)[++i]));
21 if (p != a)
22 abort ();
23 if (i != n)
24 abort ();
25 va_end (ap);
26}
27
28int
29main (void)
30{
31 f (10, &a);
32 exit (0);
33}