aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear/degen-array.c
blob: 32230dde3fd06885763d05faef2bb1babb22fea0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
extern int a[3];

int (*fa(int i))[] { return &a; }
int *f0(int i) { return &a[0]; }
int *fd(int i) { return  a; }

/*
 * check-name: degen-array
 * check-command: test-linearize -m64 -Wno-decl $file
 * check-assert: sizeof(void *) == 8
 *
 * check-output-start
fa:
.L0:
	<entry-point>
	ret.64      a


f0:
.L2:
	<entry-point>
	ret.64      a


fd:
.L4:
	<entry-point>
	ret.64      a


 * check-output-end
 */