Hi.

I'm sending removal of a stupid mistake where I installed a patch that contained
a debugging 'return' statement. Fixed that and added condition to inspect only
functions with SSA.

Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.

Thanks,
Martin

gcc/ChangeLog:

2018-03-20  Martin Liska  <mli...@suse.cz>

        PR ipa/84963
        * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
        not intended return statement.

gcc/testsuite/ChangeLog:

2018-03-20  Martin Liska  <mli...@suse.cz>

        PR ipa/84963
        * gfortran.dg/goacc/pr84963.f90: New test.
---
 gcc/ipa-icf.c                               | 5 +++--
 gcc/testsuite/gfortran.dg/goacc/pr84963.f90 | 7 +++++++
 2 files changed, 10 insertions(+), 2 deletions(-)
 create mode 100644 gcc/testsuite/gfortran.dg/goacc/pr84963.f90


diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 1376a54e95e..f974d9f769f 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -3612,15 +3612,16 @@ void
 sem_item_optimizer::fixup_points_to_sets (void)
 {
   /* TODO: remove in GCC 9 and trigger PTA re-creation after IPA passes.  */
-
   cgraph_node *cnode;
-  return;
 
   FOR_EACH_DEFINED_FUNCTION (cnode)
     {
       tree name;
       unsigned i;
       function *fn = DECL_STRUCT_FUNCTION (cnode->decl);
+      if (!gimple_in_ssa_p (fn))
+	continue;
+
       FOR_EACH_SSA_NAME (i, name, fn)
 	if (POINTER_TYPE_P (TREE_TYPE (name))
 	    && SSA_NAME_PTR_INFO (name))
diff --git a/gcc/testsuite/gfortran.dg/goacc/pr84963.f90 b/gcc/testsuite/gfortran.dg/goacc/pr84963.f90
new file mode 100644
index 00000000000..4548082bee3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goacc/pr84963.f90
@@ -0,0 +1,7 @@
+! PR ipa/84963
+! { dg-options "-O2" }
+
+program p
+   print *, sin([1.0, 2.0])
+   print *, cos([1.0, 2.0])
+end

Reply via email to