summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-50-field-write-delete-0.c
blob: 25c75db4f394afd0a08fcad4fef5f1f1e4e47c16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do run } */
/* { dg-options  "-flto -fipa-type-escape-analysis -fdump-ipa-type-escape-analysis " } */

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

int
main (int argc, char **argv)
{
struct astruct_s { _Bool a; _Bool delete_me; _Bool c;};
struct astruct_s astruct;
printf("%d %d", astruct.a, astruct.c);
astruct.delete_me = false;
return 0;
}

/* { dg-final { scan-ipa-dump "deleting field delete_me 8" "type-escape-analysis" } } */