diff options
author | Michael Matz <matz@suse.de> | 2009-09-17 11:11:58 +0000 |
---|---|---|
committer | Michael Matz <matz@gcc.gnu.org> | 2009-09-17 11:11:58 +0000 |
commit | 040c6d51daadf242937549fb7bc0e5a375fa1666 (patch) | |
tree | 6faf3b30da5c11513bde779849161da980479ec6 /gcc/tree-inline.c | |
parent | 0714aafa1fd25aa1524869f4284b752e1a0e3161 (diff) | |
download | gcc-040c6d51daadf242937549fb7bc0e5a375fa1666.zip gcc-040c6d51daadf242937549fb7bc0e5a375fa1666.tar.gz gcc-040c6d51daadf242937549fb7bc0e5a375fa1666.tar.bz2 |
re PR middle-end/41347 (ICE with -O3 or '-O2 -finline-functions')
PR middle-end/41347
* tree.c (build_type_attribute_qual_variant): Export.
* tree.h (build_type_attribute_qual_variant): Declare.
* tree-inline.c (remap_type_1): Use it to build variants with
the original qualifiers and attributes.
testsuite/
* gfortran.dg/pr41347.f90: New test.
From-SVN: r151799
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 5ada378..feb7499 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -342,6 +342,10 @@ remap_type_1 (tree type, copy_body_data *id) new_tree = build_pointer_type_for_mode (remap_type (TREE_TYPE (type), id), TYPE_MODE (type), TYPE_REF_CAN_ALIAS_ALL (type)); + if (TYPE_ATTRIBUTES (type) || TYPE_QUALS (type)) + new_tree = build_type_attribute_qual_variant (new_tree, + TYPE_ATTRIBUTES (type), + TYPE_QUALS (type)); insert_decl_map (id, type, new_tree); return new_tree; } @@ -350,6 +354,10 @@ remap_type_1 (tree type, copy_body_data *id) new_tree = build_reference_type_for_mode (remap_type (TREE_TYPE (type), id), TYPE_MODE (type), TYPE_REF_CAN_ALIAS_ALL (type)); + if (TYPE_ATTRIBUTES (type) || TYPE_QUALS (type)) + new_tree = build_type_attribute_qual_variant (new_tree, + TYPE_ATTRIBUTES (type), + TYPE_QUALS (type)); insert_decl_map (id, type, new_tree); return new_tree; } |