From: Richard Biener Date: Tue, 27 Mar 2018 12:13:55 +0000 (+0000) Subject: re PR tree-optimization/85082 (ICE with -Ofast in vn_reference_insert_pieces, at... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=18f5009ec8e87ada5228ff03f18264e93268e00f;p=gcc.git re PR tree-optimization/85082 (ICE with -Ofast in vn_reference_insert_pieces, at tree-ssa-sccvn.c:2624) 2018-03-27 Richard Biener PR tree-optimization/85082 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces): Valueize the VUSE. * gfortran.dg/pr85082.f90: New testcase. From-SVN: r258877 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e4f0ff515bb..55c1f279d68 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-03-27 Richard Biener + + PR tree-optimization/85082 + * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces): + Valueize the VUSE. + 2018-03-27 Ramana Radhakrishnan * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b6517f45310..06d08aaa538 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-03-27 Richard Biener + + PR tree-optimization/85082 + * gfortran.dg/pr85082.f90: New testcase. + 2018-03-27 Chenghua Xu * gcc.target/mips/umips-stroe16-2.c: Change "length = 2" diff --git a/gcc/testsuite/gfortran.dg/pr85082.f90 b/gcc/testsuite/gfortran.dg/pr85082.f90 new file mode 100644 index 00000000000..13fff37c316 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr85082.f90 @@ -0,0 +1,14 @@ +! { dg-do compile } +! { dg-options "-Ofast" } +program p + real(4) :: a, b + integer(4) :: n, m + equivalence (a, n) + a = 1024.0 + m = 8 + a = 1024.0 + b = set_exponent(a, m) + n = 8 + a = f(a, n) + b = set_exponent(a, m) +end diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 9844bbbbcf3..fea452bd132 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -1631,7 +1631,7 @@ vn_reference_lookup_or_insert_for_pieces (tree vuse, vn_reference_s vr1; vn_reference_t result; unsigned value_id; - vr1.vuse = vuse; + vr1.vuse = vuse ? SSA_VAL (vuse) : NULL_TREE; vr1.operands = operands; vr1.type = type; vr1.set = set;