summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ipa/ipa-ea-03-collect-nested-record-0.c
blob: 588e58e49764995054a7859e444509a038075f2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do link } */
/* { dg-options  "-fipa-hello-world -fdump-ipa-hello-world" } */

#include <stddef.h>

struct astruct_s { _Bool a; _Bool b; _Bool c;};
struct astruct_s astruct[2];
struct outer_struct { _Bool d; struct astruct_s a; };
struct outer_struct bstruct;

int
main ()
{
	bstruct.d = 0;
	struct astruct_s another = astruct[0];
}

/* { dg-final { scan-ipa-dump "collected,astruct_s" "hello-world" } } */
/* { dg-final { scan-ipa-dump "collected,outer_struct" "hello-world" } } */
/* { dg-final { scan-ipa-dump "collected,astruct_s[]" "hello-world" } } */