Fix ia64-linux setjmp failures due to attribute aligned on typedef bug.
* c-common.c (decl_attributes, case A_ALIGN): Revert last change. Copy type in a TYPE_DECL, just like pushdecl does. From-SVN: r35966
This commit is contained in:
parent
a1066c99f7
commit
aee3c6b038
2 changed files with 19 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
|||
2000-08-24 Jim Wilson <wilson@cygnus.com>
|
||||
|
||||
* c-common.c (decl_attributes, case A_ALIGN): Revert last change.
|
||||
Copy type in a TYPE_DECL, just like pushdecl does.
|
||||
|
||||
2000-08-24 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* toplev.c (main): Enable flag_reorder_blocks at -O2.
|
||||
|
|
|
@ -788,16 +788,22 @@ decl_attributes (node, attributes, prefix_attributes)
|
|||
error ("requested alignment is too large");
|
||||
else if (is_type)
|
||||
{
|
||||
if (decl)
|
||||
/* If we have a TYPE_DECL, then copy the type, so that we
|
||||
don't accidentally modify a builtin type. See pushdecl. */
|
||||
if (decl && TREE_TYPE (decl) != error_mark_node
|
||||
&& DECL_ORIGINAL_TYPE (decl) == NULL_TREE)
|
||||
{
|
||||
DECL_ALIGN (decl) = (1 << i) * BITS_PER_UNIT;
|
||||
DECL_USER_ALIGN (decl) = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
TYPE_ALIGN (type) = (1 << i) * BITS_PER_UNIT;
|
||||
TYPE_USER_ALIGN (type) = 1;
|
||||
tree tt = TREE_TYPE (decl);
|
||||
DECL_ORIGINAL_TYPE (decl) = tt;
|
||||
tt = build_type_copy (tt);
|
||||
TYPE_NAME (tt) = decl;
|
||||
TREE_USED (tt) = TREE_USED (decl);
|
||||
TREE_TYPE (decl) = tt;
|
||||
type = tt;
|
||||
}
|
||||
|
||||
TYPE_ALIGN (type) = (1 << i) * BITS_PER_UNIT;
|
||||
TYPE_USER_ALIGN (type) = 1;
|
||||
}
|
||||
else if (TREE_CODE (decl) != VAR_DECL
|
||||
&& TREE_CODE (decl) != FIELD_DECL)
|
||||
|
|
Loading…
Add table
Reference in a new issue