summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-07-delete-first-field-0.c
blob: a9c40ba0edad84c3706147f36cf349da4bc36f17 (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  "-w -flto -fipa-type-escape-analysis -fdump-ipa-type-escape-analysis " } */

#include <assert.h>
#include <stdio.h>

int
main ()
{
  struct astruct_s
  {
    _Bool b;
    _Bool a;
    _Bool c;
    _Bool d;
  };
  struct astruct_s astruct;

  printf("%d %d %d\n", astruct.a, astruct.c, astruct.d);
  _Bool *a_ptr = &astruct.a;
  struct astruct_s *s_ptr = &astruct;
  assert(a_ptr == s_ptr);
}