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

uintfloat(void)1*c85f09ccSJohn Levon double uintfloat(void)
2*c85f09ccSJohn Levon {
3*c85f09ccSJohn Levon 	union {
4*c85f09ccSJohn Levon 		int a;
5*c85f09ccSJohn Levon 		double f;
6*c85f09ccSJohn Levon 	} s;
7*c85f09ccSJohn Levon 
8*c85f09ccSJohn Levon 	s.a = 1;
9*c85f09ccSJohn Levon 	return s.f;
10*c85f09ccSJohn Levon }
11*c85f09ccSJohn Levon 
12*c85f09ccSJohn Levon /*
13*c85f09ccSJohn Levon  * check-name: init-local union 0
14*c85f09ccSJohn Levon  * check-command: test-linearize -Wno-decl -fdump-ir=mem2reg $file
15*c85f09ccSJohn Levon  * check-output-ignore
16*c85f09ccSJohn Levon  * check-output-pattern(1): store\\.32
17*c85f09ccSJohn Levon  * check-output-pattern(1): load\\.64
18*c85f09ccSJohn Levon  */
19