From: Richard Guenther Date: Tue, 21 Feb 2012 14:10:31 +0000 (+0000) Subject: re PR middle-end/52314 (gimplifier produces volatile) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c2ad2033ddf097af0532290887bc93eefe186cb;p=gcc.git re PR middle-end/52314 (gimplifier produces volatile) 2012-02-21 Richard Guenther 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4388b686717..489befa393f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-02-21 Richard Guenther + + 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 PR tree-optimization/52324 diff --git a/gcc/gimplify.c b/gcc/gimplify.c index a214134c554..07eb8fd81df 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