diff options
author | Joseph Myers <joseph@codesourcery.com> | 2007-02-14 23:38:01 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2007-02-14 23:38:01 +0000 |
commit | 07cb6e8c67e1a2d18e44a6efac90bfffd6f60181 (patch) | |
tree | 0b1be463b155b65ac7791e3f21009cc72f326b92 /gcc/emit-rtl.c | |
parent | 702f9d782f241a8192e3cd2e10caa6ccb70bcbe6 (diff) | |
download | gcc-07cb6e8c67e1a2d18e44a6efac90bfffd6f60181.zip gcc-07cb6e8c67e1a2d18e44a6efac90bfffd6f60181.tar.gz gcc-07cb6e8c67e1a2d18e44a6efac90bfffd6f60181.tar.bz2 |
emit-rtl.c (set_mem_attributes_minus_bitpos): Treat complex types as aggregates not scalars.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Treat complex
types as aggregates not scalars.
* function.c (assign_stack_temp_for_type): Likewise.
testsuite:
* gcc.dg/torture/complex-alias-1.c: New test.
From-SVN: r121968
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 1faa57f..9a5db43 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1481,12 +1481,15 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp, alias = get_alias_set (t); MEM_VOLATILE_P (ref) |= TYPE_VOLATILE (type); - MEM_IN_STRUCT_P (ref) = AGGREGATE_TYPE_P (type); + MEM_IN_STRUCT_P (ref) + = AGGREGATE_TYPE_P (type) || TREE_CODE (type) == COMPLEX_TYPE; MEM_POINTER (ref) = POINTER_TYPE_P (type); /* If we are making an object of this type, or if this is a DECL, we know that it is a scalar if the type is not an aggregate. */ - if ((objectp || DECL_P (t)) && ! AGGREGATE_TYPE_P (type)) + if ((objectp || DECL_P (t)) + && ! AGGREGATE_TYPE_P (type) + && TREE_CODE (type) != COMPLEX_TYPE) MEM_SCALAR_P (ref) = 1; /* We can set the alignment from the type if we are making an object, |