[Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211 Jan Hubicka changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #7 from Jan Hubicka --- Fixed.
[Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211 --- Comment #6 from CVS Commits --- The master branch has been updated by Jan Hubicka : https://gcc.gnu.org/g:6471396dec0cfc30e30e64a70b0d0e6a02de2de7 commit r12-5238-g6471396dec0cfc30e30e64a70b0d0e6a02de2de7 Author: Jan Hubicka Date: Sun Nov 14 00:48:32 2021 +0100 Fix bug in ipa-pure-const and add debug counters gcc/ChangeLog: PR lto/103211 * dbgcnt.def (ipa_attr): New counters. * ipa-pure-const.c: Include dbgcnt.c (ipa_make_function_const): Use debug counter. (ipa_make_function_pure): Likewise. (propagate_pure_const): Fix bug in my previous change.
[Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211 --- Comment #5 from Jan Hubicka --- There is wrong change in my patch (I mixed up this_looping variable for looping) diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index b831844afa6..5056850c0a8 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -1611,9 +1611,6 @@ propagate_pure_const (void) enum pure_const_state_e edge_state = IPA_CONST; bool edge_looping = false; - if (e->recursive_p ()) - looping = true; - if (e->recursive_p ()) looping = true; @@ -1800,11 +1797,11 @@ propagate_pure_const (void) switch (this_state) { case IPA_CONST: - remove_p |= ipa_make_function_const (node, looping, false); + remove_p |= ipa_make_function_const (node, this_looping, false); break; case IPA_PURE: - remove_p |= ipa_make_function_pure (node, looping, false); + remove_p |= ipa_make_function_pure (node, this_looping, false); break; default:
[Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211 --- Comment #4 from Martin Liška --- Yes: grep 'found to' * | grep master unport.fppized.f.025t.nothrow:Function found to be nothrow: master.0.setfm unport.fppized.f.084i.pure-const:Function found to be pure: master.0.setfm/8 unport.fppized.f.210t.local-pure-const2:Function found to be pure: master.0.setfm/8
[Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211 --- Comment #3 from hubicka at kam dot mff.cuni.cz --- > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211 > > --- Comment #2 from Martin Liška --- > Optimized dump differs for couple of functions in the same way: > > diff -u good bad > --- good2021-11-12 17:42:36.995947103 +0100 > +++ bad 2021-11-12 17:41:56.728194961 +0100 > @@ -38,7 +38,6 @@ > > ;; Function abrt (abrt_, funcdef_no=10, decl_uid=4338, cgraph_uid=11, > symbol_order=10) (executed once) > > -Removing basic block 5 > __attribute__((fn spec (". "))) > void abrt () > { > @@ -350,7 +349,6 @@ > void setfm (integer(kind=4) * ipar) > { > [local count: 1073741824]: > - master.0.setfm (0, ipar_2(D)); [tail call] >return; > > } > > maybe the fnspec for master.0.setfm is bad? > > __attribute__((fn spec (". R w "))) > void master.0.setfm (integer(kind=8) __entry, integer(kind=4) * ipar) > { It looks more like pure/const discovery. You should be able to use -fdump-ipa-all -fdump-tree-all and grep "function found to be" either pure or const. What is body of master.0.setfm. Does it look like it does nothing? "R" in fnspec means that arg 0 is only read directly and not derefernced. "w" means that it arg 1 is not escaping. Honza
Re: [Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211 > > --- Comment #2 from Martin Liška --- > Optimized dump differs for couple of functions in the same way: > > diff -u good bad > --- good2021-11-12 17:42:36.995947103 +0100 > +++ bad 2021-11-12 17:41:56.728194961 +0100 > @@ -38,7 +38,6 @@ > > ;; Function abrt (abrt_, funcdef_no=10, decl_uid=4338, cgraph_uid=11, > symbol_order=10) (executed once) > > -Removing basic block 5 > __attribute__((fn spec (". "))) > void abrt () > { > @@ -350,7 +349,6 @@ > void setfm (integer(kind=4) * ipar) > { > [local count: 1073741824]: > - master.0.setfm (0, ipar_2(D)); [tail call] >return; > > } > > maybe the fnspec for master.0.setfm is bad? > > __attribute__((fn spec (". R w "))) > void master.0.setfm (integer(kind=8) __entry, integer(kind=4) * ipar) > { It looks more like pure/const discovery. You should be able to use -fdump-ipa-all -fdump-tree-all and grep "function found to be" either pure or const. What is body of master.0.setfm. Does it look like it does nothing? "R" in fnspec means that arg 0 is only read directly and not derefernced. "w" means that it arg 1 is not escaping. Honza
[Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211 --- Comment #2 from Martin Liška --- Optimized dump differs for couple of functions in the same way: diff -u good bad --- good2021-11-12 17:42:36.995947103 +0100 +++ bad 2021-11-12 17:41:56.728194961 +0100 @@ -38,7 +38,6 @@ ;; Function abrt (abrt_, funcdef_no=10, decl_uid=4338, cgraph_uid=11, symbol_order=10) (executed once) -Removing basic block 5 __attribute__((fn spec (". "))) void abrt () { @@ -350,7 +349,6 @@ void setfm (integer(kind=4) * ipar) { [local count: 1073741824]: - master.0.setfm (0, ipar_2(D)); [tail call] return; } maybe the fnspec for master.0.setfm is bad? __attribute__((fn spec (". R w "))) void master.0.setfm (integer(kind=8) __entry, integer(kind=4) * ipar) {
[Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211 --- Comment #1 from Martin Liška --- The following file is miscompiled with: gfortran -c -o unport.fppized.o -O2 -march=skylake -g -std=legacy -fno-aggressive-loop-optimizations unport.fppized.f
[Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211 Richard Biener changed: What|Removed |Added Priority|P3 |P1
[Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211 Martin Liška changed: What|Removed |Added Target Milestone|--- |12.0 Last reconfirmed||2021-11-12 Status|UNCONFIRMED |NEW Ever confirmed|0 |1