diff options
author | Richard Guenther <rguenther@suse.de> | 2008-11-05 12:17:10 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-11-05 12:17:10 +0000 |
commit | f7c0ffb441e9f1164809bd3165a614e46680e38e (patch) | |
tree | c33b55ff21ac34fcc6846d0faa6ad347ae2c4bde /gcc/cp/decl.c | |
parent | 08906bf8a2a9d9aa0263e7f183be7315d985b00d (diff) | |
download | gcc-f7c0ffb441e9f1164809bd3165a614e46680e38e.zip gcc-f7c0ffb441e9f1164809bd3165a614e46680e38e.tar.gz gcc-f7c0ffb441e9f1164809bd3165a614e46680e38e.tar.bz2 |
re PR middle-end/37742 (ICE in vectorizer with restrict pointer)
2008-11-05 Richard Guenther <rguenther@suse.de>
PR middle-end/37742
* tree-ssa.c (useless_type_conversion_p_1): Check different restrict
qualified pointer conversion before stripping qualifiers.
* gimplify.c (create_tmp_from_val): Use correctly qualified type.
* tree-flow.h (may_propagate_address_into_dereference): Declare.
* tree-ssa-ccp.c (may_propagate_address_into_dereference): New function.
(ccp_fold): Use it.
* tree-ssa-forwprop.c (rhs_to_tree): Remove useless conversions,
properly canonicalize binary ops.
(forward_propagate_addr_expr_1): Use
may_propagate_address_into_dereference.
cp/
* decl.c (start_preparsed_function): Use the correct type for
building the RESULT_DECL.
* gcc.c-torture/compile/pr37742.c: New testcase.
* g++.dg/pr37742.C: Likewise.
* gcc.dg/tree-ssa/forwprop-7.c: Check for two volatile loads.
From-SVN: r141606
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 754f433..945b947 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -11492,7 +11492,7 @@ start_preparsed_function (tree decl1, tree attrs, int flags) { tree resdecl; - resdecl = build_decl (RESULT_DECL, 0, TYPE_MAIN_VARIANT (restype)); + resdecl = build_decl (RESULT_DECL, 0, restype); DECL_ARTIFICIAL (resdecl) = 1; DECL_IGNORED_P (resdecl) = 1; DECL_RESULT (decl1) = resdecl; |