re PR middle-end/52314 (gimplifier produces volatile)
authorRichard Guenther <rguenther@suse.de>
Tue, 21 Feb 2012 14:10:31 +0000 (14:10 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 21 Feb 2012 14:10:31 +0000 (14:10 +0000)
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

gcc/ChangeLog
gcc/gimplify.c

index 4388b686717150623a995ce021b940fe5ec52aaf..489befa393f3c11df8b653cce1c7c98b985cec85 100644 (file)
@@ -1,3 +1,9 @@
+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
index a214134c554160fac3e67973a37074fef87fdcb1..07eb8fd81df08b76a007c5725568fc4a42367f4d 100644 (file)
@@ -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