diff options
Diffstat (limited to 'validation/expand/compound-literal.c')
| -rw-r--r-- | validation/expand/compound-literal.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/validation/expand/compound-literal.c b/validation/expand/compound-literal.c new file mode 100644 index 00000000..034164bc --- /dev/null +++ b/validation/expand/compound-literal.c @@ -0,0 +1,26 @@ +#define SAME_TYPE(A, B) \ + __builtin_types_compatible_p(A, B) + +struct s { + int i; +}; + +static void foo(struct s *p) +{ + *p = (struct s) { .i = SAME_TYPE(int, int), }; +} + +/* + * check-name: compound-literal + * check-command: test-linearize $file + * + * check-output-start +foo: +.L0: + <entry-point> + store.32 $1 -> 0[%arg1] + ret + + + * check-output-end + */ |
