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