re PR tree-optimization/90385 (ICE: tree check: expected ssa_name, have real_cst in transform_to_exit_first_loop_alt, at tree-parloops.c:1772)

PR tree-optimization/90385
	* tree-parloops.c (try_create_reduction_list): Punt on non-SSA_NAME
	arguments of the exit phis.

	* gfortran.dg/pr90385.f90: New test.

From-SVN: r271059
This commit is contained in:
Jakub Jelinek 2019-05-10 10:20:38 +02:00 committed by Jakub Jelinek
parent b5cbaee240
commit 425f5fd4c4
4 changed files with 22 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2019-05-10 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/90385
* tree-parloops.c (try_create_reduction_list): Punt on non-SSA_NAME
arguments of the exit phis.
PR c++/90383
* tree-inline.h (struct copy_body_data): Add do_not_fold member.
* tree-inline.c (remap_gimple_op_r): Avoid folding expressions if

View File

@ -1,5 +1,8 @@
2019-05-10 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/90385
* gfortran.dg/pr90385.f90: New test.
PR c++/90383
* g++.dg/cpp1y/constexpr-90383-1.C: New test.
* g++.dg/cpp1y/constexpr-90383-2.C: New test.

View File

@ -0,0 +1,6 @@
! PR tree-optimization/90385
! { dg-do compile }
! { dg-require-effective-target pthread }
! { dg-options "-O1 -ftree-parallelize-loops=2 -fno-tree-ccp -fno-tree-ch -fno-tree-copy-prop -fno-tree-forwprop -fno-tree-sink --param parloops-min-per-thread=5" }
include 'array_constructor_47.f90'

View File

@ -2794,8 +2794,16 @@ try_create_reduction_list (loop_p loop,
gimple *reduc_phi;
tree val = PHI_ARG_DEF_FROM_EDGE (phi, exit);
if (TREE_CODE (val) == SSA_NAME && !virtual_operand_p (val))
if (!virtual_operand_p (val))
{
if (TREE_CODE (val) != SSA_NAME)
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file,
" FAILED: exit PHI argument invariant.\n");
return false;
}
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, "phi is ");