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