blob: f0befcd814c2c8665e169beda2e8f63daffd6f6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* { dg-do run } */
/* { dg-options "-flto -flto-partition=none -fipa-dead-field-eliminate -fdump-ipa-structure-reorg -fipa-typelist-field=nextout -fipa-typelist-struct=arc -o ipa-structreorg-46-static-0.exe " } */
#include <assert.h>
#include <stddef.h>
struct arc
{
_Bool a;
_Bool nextout;
_Bool c;
};
struct arc an_arc;
int
main ()
{
_Bool *a = &(an_arc.a);
_Bool *c = &(an_arc.c);
ptrdiff_t diff = c - a;
assert (diff == 1);
}
|