aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-02-21 14:10:31 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-02-21 14:10:31 +0000
commit0c2ad2033ddf097af0532290887bc93eefe186cb (patch)
treea8e47ac85ceadd0ed8fb21c78c35071866b0da4c /gcc/gimplify.c
parent01718e96e798e62564e8aa3e4496e78441811c71 (diff)
downloadgcc-0c2ad2033ddf097af0532290887bc93eefe186cb.zip
gcc-0c2ad2033ddf097af0532290887bc93eefe186cb.tar.gz
gcc-0c2ad2033ddf097af0532290887bc93eefe186cb.tar.bz2
re PR middle-end/52314 (gimplifier produces volatile)
2012-02-21 Richard Guenther <rguenther@suse.de> PR middle-end/52314 * gimplify.c (create_tmp_from_val): Use the main variant type for the type of the temporary we create. From-SVN: r184436
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index a214134..07eb8fd 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -504,7 +504,8 @@ create_tmp_reg (tree type, const char *prefix)
static inline tree
create_tmp_from_val (tree val)
{
- return create_tmp_var (TREE_TYPE (val), get_name (val));
+ /* Drop all qualifiers and address-space information from the value type. */
+ return create_tmp_var (TYPE_MAIN_VARIANT (TREE_TYPE (val)), get_name (val));
}
/* Create a temporary to hold the value of VAL. If IS_FORMAL, try to reuse