aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/gimplify.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4388b68..489befa 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
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.
+
+2012-02-21 Richard Guenther <rguenther@suse.de>
+
PR tree-optimization/52324
* gimplify.c (gimplify_expr): When re-gimplifying expressions
do not gimplify a MEM_REF address operand if it is already
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