Remove superfluous return statement (PR ipa/84963).
authorMartin Liska <mliska@suse.cz>
Wed, 21 Mar 2018 08:26:49 +0000 (09:26 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 21 Mar 2018 08:26:49 +0000 (08:26 +0000)
2018-03-21  Martin Liska  <mliska@suse.cz>

PR ipa/84963
* ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
not intended return statement.
2018-03-21  Martin Liska  <mliska@suse.cz>

PR ipa/84963
* gfortran.dg/goacc/pr84963.f90: New test.

From-SVN: r258705

gcc/ChangeLog
gcc/ipa-icf.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/goacc/pr84963.f90 [new file with mode: 0644]

index 62899c0e874379eb439ebe892d620b8eb16b0e30..06adf9c2af8d2a9845a80c9d3664d541ae5fddf1 100644 (file)
@@ -1,3 +1,9 @@
+2018-03-21  Martin Liska  <mliska@suse.cz>
+
+       PR ipa/84963
+       * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
+       not intended return statement.
+
 2018-03-21  Martin Liska  <mliska@suse.cz>
 
        PR target/84988
index 1376a54e95efb7334935acf8d6efd19c1a4826dd..f974d9f769f95b2c8a0001724abe784cb10fcbc6 100644 (file)
@@ -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))
index f3cc7574e9caad14f729b4cc99d32d85b23a67d2..2b47cac8042f3ffd2889d1e65d32e384033f05ab 100644 (file)
@@ -1,3 +1,8 @@
+2018-03-21  Martin Liska  <mliska@suse.cz>
+
+       PR ipa/84963
+       * gfortran.dg/goacc/pr84963.f90: New test.
+
 2018-03-21  Marek Polacek  <polacek@redhat.com>
 
        PR c++/71638, ICE with NSDMI and reference.
diff --git a/gcc/testsuite/gfortran.dg/goacc/pr84963.f90 b/gcc/testsuite/gfortran.dg/goacc/pr84963.f90
new file mode 100644 (file)
index 0000000..4548082
--- /dev/null
@@ -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