annotate gcc/testsuite/gcc.dg/torture/pr27184.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Copyright 2006 Free Software Foundation */
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 /* Make sure a and a1 alias each other.
kono
parents:
diff changeset
4 Incomplete array types used to not be unified, which broke aliasing. */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 /* { dg-do run } */
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 typedef long atype[];
kono
parents:
diff changeset
9 typedef long atype1[];
kono
parents:
diff changeset
10 int NumSift (atype *a, atype1 *a1)
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 (*a)[0] = 0;
kono
parents:
diff changeset
13 (*a1)[0] = 1;
kono
parents:
diff changeset
14 return (*a)[0];
kono
parents:
diff changeset
15 }
kono
parents:
diff changeset
16 int main(void)
kono
parents:
diff changeset
17 {
kono
parents:
diff changeset
18 long a[2];
kono
parents:
diff changeset
19 if (!NumSift(&a, &a))
kono
parents:
diff changeset
20 __builtin_abort ();
kono
parents:
diff changeset
21 return 0;
kono
parents:
diff changeset
22 }