diff options
author | Jason Merrill <jason@redhat.com> | 2010-05-05 15:46:41 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-05-05 15:46:41 -0400 |
commit | 0f559c16ead64e7e85f21a6e99a50d8785b7f63b (patch) | |
tree | 3e008fc52371de3acf84489f91bb02abe802cc4d /gcc/c-common.c | |
parent | 147a19a945773dcb0532d4d925b7b8b98e94a1fd (diff) | |
download | gcc-0f559c16ead64e7e85f21a6e99a50d8785b7f63b.tar.gz |
re PR debug/43370 (ICE gen_type_die_with_usage, at dwarf2out.c:14745)
PR debug/43370
* c-common.c (handle_aligned_attribute): Respect
ATTR_FLAG_TYPE_IN_PLACE.
From-SVN: r159081
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 6fa577c293a..b3254b2386e 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -6695,10 +6695,12 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args, } else if (is_type) { + if ((flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) + /* OK, modify the type in place. */; /* 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) + else if (decl && TREE_TYPE (decl) != error_mark_node + && DECL_ORIGINAL_TYPE (decl) == NULL_TREE) { tree tt = TREE_TYPE (decl); *type = build_variant_type_copy (*type); @@ -6707,7 +6709,7 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args, TREE_USED (*type) = TREE_USED (decl); TREE_TYPE (decl) = *type; } - else if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) + else *type = build_variant_type_copy (*type); TYPE_ALIGN (*type) = (1U << i) * BITS_PER_UNIT; |