xref: /illumos-gate/usr/src/tools/smatch/src/validation/mem2reg/init-local64.c (revision c85f09cc92abd00c84e58ec9f0f5d942906cb713)

ssimple(void)1*c85f09ccSJohn Levon int ssimple(void)
2*c85f09ccSJohn Levon {
3*c85f09ccSJohn Levon 	struct {
4*c85f09ccSJohn Levon 		int a;
5*c85f09ccSJohn Levon 	} s;
6*c85f09ccSJohn Levon 
7*c85f09ccSJohn Levon 	s.a = 1;
8*c85f09ccSJohn Levon 	return s.a;
9*c85f09ccSJohn Levon }
10*c85f09ccSJohn Levon 
sdouble(void)11*c85f09ccSJohn Levon double sdouble(void)
12*c85f09ccSJohn Levon {
13*c85f09ccSJohn Levon 	struct {
14*c85f09ccSJohn Levon 		double a;
15*c85f09ccSJohn Levon 	} s;
16*c85f09ccSJohn Levon 
17*c85f09ccSJohn Levon 	s.a = 1.23;
18*c85f09ccSJohn Levon 	return s.a;
19*c85f09ccSJohn Levon }
20*c85f09ccSJohn Levon 
21*c85f09ccSJohn Levon /*
22*c85f09ccSJohn Levon  * check-name: init-local64
23*c85f09ccSJohn Levon  * check-command: test-linearize -Wno-decl -m64 -fdump-ir=mem2reg $file
24*c85f09ccSJohn Levon  * check-output-ignore
25*c85f09ccSJohn Levon  * check-output-excludes: load\\.
26*c85f09ccSJohn Levon  * check-output-excludes: store\\.
27*c85f09ccSJohn Levon  */
28