public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/103211] New: [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
@ 2021-11-12 13:15 marxin at gcc dot gnu.org
2021-11-12 13:15 ` [Bug ipa/103211] " marxin at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-12 13:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211
Bug ID: 103211
Summary: [12 Regression] 416.gamess crashes after
r12-5177-g494bdadf28d0fb35
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: hubicka at gcc dot gnu.org, marxin at gcc dot gnu.org
Blocks: 26163
Target Milestone: ---
Crashes with -Ofast -march=skylake -g:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x7ffff799c79f in ???
at
/usr/src/debug/glibc-2.34-2.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
#1 0x77606d in huckel_
at
/home/marxin/Programming/cpu2006/benchspec/CPU2006/416.gamess/build/build_peak_amd64-m64-mine.0004/guess.fppized.f:1270
#2 0x777894 in hucklm_
at
/home/marxin/Programming/cpu2006/benchspec/CPU2006/416.gamess/build/build_peak_amd64-m64-mine.0004/guess.fppized.f:1727
#3 0x7782c8 in gesmem_
at
/home/marxin/Programming/cpu2006/benchspec/CPU2006/416.gamess/build/build_peak_amd64-m64-mine.0004/guess.fppized.f:842
#4 0x778df3 in guesmo_
at
/home/marxin/Programming/cpu2006/benchspec/CPU2006/416.gamess/build/build_peak_amd64-m64-mine.0004/guess.fppized.f:1022
#5 0x700921 in energx_
at
/home/marxin/Programming/cpu2006/benchspec/CPU2006/416.gamess/build/build_peak_amd64-m64-mine.0004/gamess.fppized.f:913
#6 0x701894 in brnchx_
at
/home/marxin/Programming/cpu2006/benchspec/CPU2006/416.gamess/build/build_peak_amd64-m64-mine.0004/gamess.fppized.f:769
#7 0xc7b420 in srftwo_
at
/home/marxin/Programming/cpu2006/benchspec/CPU2006/416.gamess/build/build_peak_amd64-m64-mine.0004/surf.fppized.f:311
#8 0xc7ccfa in surfx_
at
/home/marxin/Programming/cpu2006/benchspec/CPU2006/416.gamess/build/build_peak_amd64-m64-mine.0004/surf.fppized.f:52
#9 0x70206b in gamess
at
/home/marxin/Programming/cpu2006/benchspec/CPU2006/416.gamess/build/build_peak_amd64-m64-mine.0004/gamess.fppized.f:570
#10 0x4080dc in main
at
/home/marxin/Programming/cpu2006/benchspec/CPU2006/416.gamess/build/build_peak_amd64-m64-mine.0004/gamess.fppized.f:677
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
2021-11-12 13:15 [Bug ipa/103211] New: [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35 marxin at gcc dot gnu.org
@ 2021-11-12 13:15 ` marxin at gcc dot gnu.org
2021-11-12 13:16 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-12 13:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Last reconfirmed| |2021-11-12
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
2021-11-12 13:15 [Bug ipa/103211] New: [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35 marxin at gcc dot gnu.org
2021-11-12 13:15 ` [Bug ipa/103211] " marxin at gcc dot gnu.org
@ 2021-11-12 13:16 ` rguenth at gcc dot gnu.org
2021-11-12 16:40 ` marxin at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-12 13:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
2021-11-12 13:15 [Bug ipa/103211] New: [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35 marxin at gcc dot gnu.org
2021-11-12 13:15 ` [Bug ipa/103211] " marxin at gcc dot gnu.org
2021-11-12 13:16 ` rguenth at gcc dot gnu.org
@ 2021-11-12 16:40 ` marxin at gcc dot gnu.org
2021-11-12 16:44 ` marxin at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-12 16:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
2021-11-12 13:15 [Bug ipa/103211] New: [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35 marxin at gcc dot gnu.org
` (2 preceding siblings ...)
2021-11-12 16:40 ` marxin at gcc dot gnu.org
@ 2021-11-12 16:44 ` marxin at gcc dot gnu.org
2021-11-12 16:52 ` Jan Hubicka
2021-11-12 16:52 ` hubicka at kam dot mff.cuni.cz
` (4 subsequent siblings)
8 siblings, 1 reply; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-12 16:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Optimized dump differs for couple of functions in the same way:
diff -u good bad
--- good 2021-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)
{
<bb 2> [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)
{
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
2021-11-12 16:44 ` marxin at gcc dot gnu.org
@ 2021-11-12 16:52 ` Jan Hubicka
0 siblings, 0 replies; 11+ messages in thread
From: Jan Hubicka @ 2021-11-12 16:52 UTC (permalink / raw)
To: marxin at gcc dot gnu.org; +Cc: gcc-bugs
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211
>
> --- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
> Optimized dump differs for couple of functions in the same way:
>
> diff -u good bad
> --- good 2021-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)
> {
> <bb 2> [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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
2021-11-12 13:15 [Bug ipa/103211] New: [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35 marxin at gcc dot gnu.org
` (3 preceding siblings ...)
2021-11-12 16:44 ` marxin at gcc dot gnu.org
@ 2021-11-12 16:52 ` hubicka at kam dot mff.cuni.cz
2021-11-12 16:57 ` marxin at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: hubicka at kam dot mff.cuni.cz @ 2021-11-12 16:52 UTC (permalink / raw)
To: gcc-bugs
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 <marxin at gcc dot gnu.org> ---
> Optimized dump differs for couple of functions in the same way:
>
> diff -u good bad
> --- good 2021-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)
> {
> <bb 2> [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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
2021-11-12 13:15 [Bug ipa/103211] New: [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35 marxin at gcc dot gnu.org
` (4 preceding siblings ...)
2021-11-12 16:52 ` hubicka at kam dot mff.cuni.cz
@ 2021-11-12 16:57 ` marxin at gcc dot gnu.org
2021-11-12 17:02 ` hubicka at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-12 16:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
2021-11-12 13:15 [Bug ipa/103211] New: [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35 marxin at gcc dot gnu.org
` (5 preceding siblings ...)
2021-11-12 16:57 ` marxin at gcc dot gnu.org
@ 2021-11-12 17:02 ` hubicka at gcc dot gnu.org
2021-11-13 23:49 ` cvs-commit at gcc dot gnu.org
2021-11-13 23:50 ` hubicka at gcc dot gnu.org
8 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-11-12 17:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211
--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
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:
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
2021-11-12 13:15 [Bug ipa/103211] New: [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35 marxin at gcc dot gnu.org
` (6 preceding siblings ...)
2021-11-12 17:02 ` hubicka at gcc dot gnu.org
@ 2021-11-13 23:49 ` cvs-commit at gcc dot gnu.org
2021-11-13 23:50 ` hubicka at gcc dot gnu.org
8 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-13 23:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jan Hubicka <hubicka@gcc.gnu.org>:
https://gcc.gnu.org/g:6471396dec0cfc30e30e64a70b0d0e6a02de2de7
commit r12-5238-g6471396dec0cfc30e30e64a70b0d0e6a02de2de7
Author: Jan Hubicka <jh@suse.cz>
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35
2021-11-12 13:15 [Bug ipa/103211] New: [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35 marxin at gcc dot gnu.org
` (7 preceding siblings ...)
2021-11-13 23:49 ` cvs-commit at gcc dot gnu.org
@ 2021-11-13 23:50 ` hubicka at gcc dot gnu.org
8 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-11-13 23:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-11-13 23:50 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 13:15 [Bug ipa/103211] New: [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35 marxin at gcc dot gnu.org
2021-11-12 13:15 ` [Bug ipa/103211] " marxin at gcc dot gnu.org
2021-11-12 13:16 ` rguenth at gcc dot gnu.org
2021-11-12 16:40 ` marxin at gcc dot gnu.org
2021-11-12 16:44 ` marxin at gcc dot gnu.org
2021-11-12 16:52 ` Jan Hubicka
2021-11-12 16:52 ` hubicka at kam dot mff.cuni.cz
2021-11-12 16:57 ` marxin at gcc dot gnu.org
2021-11-12 17:02 ` hubicka at gcc dot gnu.org
2021-11-13 23:49 ` cvs-commit at gcc dot gnu.org
2021-11-13 23:50 ` hubicka at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).