From 2bd49e6b64a450c9da88b13a338b0d194008f5bd Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 24 Apr 2019 10:13:29 +0200 Subject: re PR tree-optimization/90211 (ICE: tree check: expected ssa_name, have real_cst in first_readonly_imm_use, at ssa-iterators.h:351) PR tree-optimization/90211 * tree-parloops.c (try_create_reduction_list): Ignore phi arguments which are not SSA_NAMEs. * gcc.dg/autopar/pr90211.c: New test. From-SVN: r270533 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/autopar/pr90211.c | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/autopar/pr90211.c (limited to 'gcc/testsuite') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 66d0b6f..b301146 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-04-24 Jakub Jelinek + + PR tree-optimization/90211 + * gcc.dg/autopar/pr90211.c: New test. + 2019-04-23 Iain Buclaw Robin Dapp diff --git a/gcc/testsuite/gcc.dg/autopar/pr90211.c b/gcc/testsuite/gcc.dg/autopar/pr90211.c new file mode 100644 index 0000000..ba314eb --- /dev/null +++ b/gcc/testsuite/gcc.dg/autopar/pr90211.c @@ -0,0 +1,24 @@ +/* PR tree-optimization/90211 */ +/* { dg-do compile } */ +/* { dg-require-effective-target pthread } */ +/* { dg-options "-O3 -fassociative-math -ftree-parallelize-loops=2 -fno-signed-zeros -fno-trapping-math -fno-tree-copy-prop" } */ + +double +foo (int x) +{ + double a, b = 0.0; + while (x < 3) + { + int c; + a = 0.0; + c = 0; + while (c < x) + { + a += 1.0; + ++c; + } + b += 1.0; + ++x; + } + return a + b; +} -- cgit v1.1