Message ID | ead44f52-ee30-6b5e-e18a-5dd49d9a2614@suse.cz |
---|---|
State | New |
Headers | show |
Series | Remove superfluous return statement (PR ipa/84963). | expand |
On 03/20/2018 01:40 PM, Martin Liška wrote: > 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 <mliska@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 <mliska@suse.cz> > > PR ipa/84963 > * gfortran.dg/goacc/pr84963.f90: New test. OK. jeff
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