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
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.
--- /dev/null
+! 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'
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 ");