From 1db1c6f520ef3c2c0f7e2c3b398e1614887cc1e5 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Thu, 31 May 2012 11:06:35 +0000 Subject: [PATCH] re PR middle-end/48493 (ice in expand_expr_addr_expr_1 with complex types and mem_ref) 2012-05-31 Richard Guenther PR middle-end/48493 * gcc.dg/torture/pr48493.c: New testcase. From-SVN: r188058 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/torture/pr48493.c | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/torture/pr48493.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1b5f1395aea..fc1028177f7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-05-31 Richard Guenther + + PR middle-end/48493 + * gcc.dg/torture/pr48493.c: New testcase. + 2012-05-31 Greta Yorsh * lib/target-supports.exp (check_effective_target_vect_char_mult): Add 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); +} -- 2.30.2