diff options
Diffstat (limited to 'validation/expand/constant-union-int2flt.c')
-rw-r--r-- | validation/expand/constant-union-int2flt.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/validation/expand/constant-union-int2flt.c b/validation/expand/constant-union-int2flt.c new file mode 100644 index 00000000..16ce1c6f --- /dev/null +++ b/validation/expand/constant-union-int2flt.c @@ -0,0 +1,19 @@ +union u { + int i; + float f; +}; + +static float foo(void) +{ + union u u = { .i = 3 }; + return u.f; +} + +/* + * check-name: constant-union-int-to-float + * check description: must not infer the float value from the int + * check-command: test-linearize -fdump-ir $file + * + * check-output-ignore + * check-output-pattern(1): load\\. + */ |