aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2000-10-25 17:23:35 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2000-10-25 17:23:35 +0200
commitdc5041ab711fd5760a0c7fb0a9ae4b3292608eca (patch)
tree0a345c9b3a03c725f874056b490d13d0a38deea0 /gcc/stor-layout.c
parent1ac41449a62c683b6b7399b3737b31029e6621a3 (diff)
downloadgcc-dc5041ab711fd5760a0c7fb0a9ae4b3292608eca.zip
gcc-dc5041ab711fd5760a0c7fb0a9ae4b3292608eca.tar.gz
gcc-dc5041ab711fd5760a0c7fb0a9ae4b3292608eca.tar.bz2
stor-layout.c (layout_type): If TYPE_ALIAS_SET was already set on the incomplete type force it into alias set 0.
* stor-layout.c (layout_type): If TYPE_ALIAS_SET was already set on the incomplete type force it into alias set 0. * gcc.c-torture/execute/20001024-1.c: New test. From-SVN: r37052
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 797b4ce..8d41cd1 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1504,6 +1504,14 @@ layout_type (type)
record it so set_sizetype can fix it up. */
if (! sizetype_set)
early_type_list = tree_cons (NULL_TREE, type, early_type_list);
+
+ /* If an alias set has been set for this aggregate when it was incomplete,
+ force it into alias set 0.
+ This is too conservative, but we cannot call record_component_aliases
+ here because some frontends still change the aggregates after
+ layout_type. */
+ if (AGGREGATE_TYPE_P (type) && TYPE_ALIAS_SET_KNOWN_P (type))
+ TYPE_ALIAS_SET (type) = 0;
}
/* Create and return a type for signed integers of PRECISION bits. */