blob: c537788eef4d04353e3b43e673553337566e7784 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/* { dg-do run } */
/* { dg-options "-flto -fipa-type-escape-analysis -fdump-ipa-type-escape-analysis" } */
#include <assert.h>
int
main ()
{
struct astruct_s
{
_Bool a;
_Bool b;
_Bool c;
_Bool d;
};
struct astruct_s astruct;
_Bool *a = &astruct.a;
_Bool *d = &astruct.d;
_Bool *c = &astruct.c;
_Bool *c_from_a = a + 1;
_Bool *c_from_d = d - 1;
assert(c == c_from_a);
assert(c == c_from_d);
assert(c_from_a == c_from_d);
return 0;
}
|