diff options
Diffstat (limited to 'validation/expand/constant-union-size.c')
-rw-r--r-- | validation/expand/constant-union-size.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/validation/expand/constant-union-size.c b/validation/expand/constant-union-size.c new file mode 100644 index 00000000..8a16bf3e --- /dev/null +++ b/validation/expand/constant-union-size.c @@ -0,0 +1,20 @@ +union u { + char c; + float f; +}; + +static int foo(void) +{ + union u u = { .f = 0.123 }; + return u.c; +} + +/* + * check-name: constant-union-size + * check description: the size of the initializer doesn't match + * check-command: test-linearize -fdump-ir $file + * + * check-output-ignore + * check-output-contains: load\\. + * check-output-excludes: ret\\..*\\$ + */ |