]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/auto-type-1.c
replace ISL with isl
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / auto-type-1.c
CommitLineData
38b7bc7f
JM
1/* Test __auto_type. Test correct uses. */
2/* { dg-do run } */
3/* { dg-options "" } */
e2acc079 4/* { dg-require-effective-target alloca } */
38b7bc7f
JM
5
6extern void abort (void);
7extern void exit (int);
8
9__auto_type i = 1;
10extern int i;
11__auto_type c = (char) 1;
12extern char c;
13static __auto_type u = 10U;
14extern unsigned int u;
15const __auto_type ll = 1LL;
16extern const long long ll;
17
18int
19main (void)
20{
21 if (i != 1 || c != 1 || u != 10U)
22 abort ();
23 __auto_type ai = i;
24 int *aip = &ai;
25 if (ai != 1)
26 abort ();
27 __auto_type p = (int (*) [++i]) 0;
28 if (i != 2)
29 abort ();
30 if (sizeof (*p) != 2 * sizeof (int))
31 abort ();
32 int vla[u][u];
33 int (*vp)[u] = &vla[0];
34 __auto_type vpp = ++vp;
35 if (vp != &vla[1])
36 abort ();
37 exit (0);
38}