diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr48493.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr48493.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr48493.c b/gcc/testsuite/gcc.dg/torture/pr48493.c new file mode 100644 index 00000000000..ddb61f2e067 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr48493.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ + +typedef long long T __attribute__((may_alias, aligned (1))); + +struct S +{ + _Complex float d __attribute__((aligned (8))); +}; + +void bar (struct S); + +void +f1 (T x) +{ + struct S s; + *(T *) ((char *) &s.d + 1) = x; + bar (s); +} |