From: rguenth Date: Tue, 21 Feb 2012 14:10:31 +0000 (+0000) Subject: 2012-02-21 Richard Guenther X-Git-Tag: upstream/4.9.2~14238 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2f6d96f08f9ae5137a5c881b5d943e4416f6367;p=platform%2Fupstream%2Flinaro-gcc.git 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184436 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 + 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 * 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