blob: 0424f4cb6ea7356d6d6de8bdfe741d31f072a3f2 (
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" } */
#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);
}
|