public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/104333] New: [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug
@ 2022-02-01 18:28 jakub at gcc dot gnu.org
2022-02-01 18:28 ` [Bug lto/104333] " jakub at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-01 18:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104333
Bug ID: 104333
Summary: [11/12 Regression] ICE with -flto
-Wl,-plugin-opt=debug
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
CC: marxin at gcc dot gnu.org
Target Milestone: ---
extern int printf (const char *, ...);
int foo (int arg) { return printf ("hello %d\n", arg); }
int main (int argc) { return foo (argc); }
./xgcc -B ./ -flto -Wl,-plugin-opt=debug rh2048551.c
ICEs
lto1: internal compiler error: in read_cgraph_and_symbols, at
lto/lto-common.cc:2740
0xab4035 read_cgraph_and_symbols(unsigned int, char const**)
../../gcc/lto/lto-common.cc:2740
0xa88d99 lto_main()
../../gcc/lto/lto.cc:625
in GCC 11 and 12, while it correctly complains:
xgcc: error: debug: No such file or directory
in GCC 10.
The reporter meant -Wl,-plugin-opt=-debug which works in all cases, but we
shouldn't ICE even on bad arguments.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/104333] [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug
2022-02-01 18:28 [Bug lto/104333] New: [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug jakub at gcc dot gnu.org
@ 2022-02-01 18:28 ` jakub at gcc dot gnu.org
2022-02-02 9:41 ` marxin at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-01 18:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104333
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Target Milestone|--- |11.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/104333] [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug
2022-02-01 18:28 [Bug lto/104333] New: [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug jakub at gcc dot gnu.org
2022-02-01 18:28 ` [Bug lto/104333] " jakub at gcc dot gnu.org
@ 2022-02-02 9:41 ` marxin at gcc dot gnu.org
2022-02-02 10:01 ` marxin at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-02-02 9:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104333
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
Last reconfirmed| |2022-02-02
Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-6855-g4804de453e7f5f90. I can work on that.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/104333] [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug
2022-02-01 18:28 [Bug lto/104333] New: [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug jakub at gcc dot gnu.org
2022-02-01 18:28 ` [Bug lto/104333] " jakub at gcc dot gnu.org
2022-02-02 9:41 ` marxin at gcc dot gnu.org
@ 2022-02-02 10:01 ` marxin at gcc dot gnu.org
2022-02-02 10:01 ` marxin at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-02-02 10:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104333
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
I think the proper fix is reversion of the commit.
What do you think Nathan?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/104333] [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug
2022-02-01 18:28 [Bug lto/104333] New: [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug jakub at gcc dot gnu.org
` (2 preceding siblings ...)
2022-02-02 10:01 ` marxin at gcc dot gnu.org
@ 2022-02-02 10:01 ` marxin at gcc dot gnu.org
2022-02-02 13:11 ` marxin at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-02-02 10:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104333
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
CC| |nathan at gcc dot gnu.org
Assignee|marxin at gcc dot gnu.org |unassigned at gcc dot gnu.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/104333] [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug
2022-02-01 18:28 [Bug lto/104333] New: [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug jakub at gcc dot gnu.org
` (3 preceding siblings ...)
2022-02-02 10:01 ` marxin at gcc dot gnu.org
@ 2022-02-02 13:11 ` marxin at gcc dot gnu.org
2022-02-02 15:06 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-02-02 13:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104333
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Oh, the commit is needed in order to prevent:
g++ hello.cc -fmodules-ts -std=c++20 -x c++-system-header string_view
g++: error: string_view: No such file or directory
Let me prepare a patch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/104333] [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug
2022-02-01 18:28 [Bug lto/104333] New: [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug jakub at gcc dot gnu.org
` (4 preceding siblings ...)
2022-02-02 13:11 ` marxin at gcc dot gnu.org
@ 2022-02-02 15:06 ` cvs-commit at gcc dot gnu.org
2022-02-02 15:10 ` cvs-commit at gcc dot gnu.org
2022-02-02 15:10 ` marxin at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-02 15:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104333
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:
https://gcc.gnu.org/g:9a92e46c0e9a75cd14125493b8826d3e33dd0f67
commit r12-7002-g9a92e46c0e9a75cd14125493b8826d3e33dd0f67
Author: Martin Liska <mliska@suse.cz>
Date: Wed Feb 2 14:21:51 2022 +0100
lto: fix error handling for -Wl,-plugin-opt=debug
When one uses something like: -Wl,-plugin-opt=debug,
we end up with lto1 WPA invocation that has 'debug'
on command line. We interpret that as input filename.
The patch moves resolution checking later so that we end up with
a reasonable error message:
lto1: fatal error: open debug failed: No such file or directory
compilation terminated.
PR lto/104333
gcc/lto/ChangeLog:
* lto-common.cc (read_cgraph_and_symbols): Move resolution
checking for number of files later and report a reasonable
error message.
* lto-object.cc (lto_obj_file_open): Make error fatal.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/104333] [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug
2022-02-01 18:28 [Bug lto/104333] New: [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug jakub at gcc dot gnu.org
` (5 preceding siblings ...)
2022-02-02 15:06 ` cvs-commit at gcc dot gnu.org
@ 2022-02-02 15:10 ` cvs-commit at gcc dot gnu.org
2022-02-02 15:10 ` marxin at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-02 15:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104333
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Martin Liska
<marxin@gcc.gnu.org>:
https://gcc.gnu.org/g:fb812e0417adc20cac72986df3bf422ed007743c
commit r11-9533-gfb812e0417adc20cac72986df3bf422ed007743c
Author: Martin Liska <mliska@suse.cz>
Date: Wed Feb 2 14:21:51 2022 +0100
lto: fix error handling for -Wl,-plugin-opt=debug
When one uses something like: -Wl,-plugin-opt=debug,
we end up with lto1 WPA invocation that has 'debug'
on command line. We interpret that as input filename.
The patch moves resolution checking later so that we end up with
a reasonable error message:
lto1: fatal error: open debug failed: No such file or directory
compilation terminated.
PR lto/104333
gcc/lto/ChangeLog:
* lto-common.c (read_cgraph_and_symbols): Move resolution
checking for number of files later and report a reasonable
error message.
* lto-object.c (lto_obj_file_open): Make error fatal.
(cherry picked from commit 9a92e46c0e9a75cd14125493b8826d3e33dd0f67)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/104333] [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug
2022-02-01 18:28 [Bug lto/104333] New: [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug jakub at gcc dot gnu.org
` (6 preceding siblings ...)
2022-02-02 15:10 ` cvs-commit at gcc dot gnu.org
@ 2022-02-02 15:10 ` marxin at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-02-02 15:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104333
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-02-02 15:10 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-01 18:28 [Bug lto/104333] New: [11/12 Regression] ICE with -flto -Wl,-plugin-opt=debug jakub at gcc dot gnu.org
2022-02-01 18:28 ` [Bug lto/104333] " jakub at gcc dot gnu.org
2022-02-02 9:41 ` marxin at gcc dot gnu.org
2022-02-02 10:01 ` marxin at gcc dot gnu.org
2022-02-02 10:01 ` marxin at gcc dot gnu.org
2022-02-02 13:11 ` marxin at gcc dot gnu.org
2022-02-02 15:06 ` cvs-commit at gcc dot gnu.org
2022-02-02 15:10 ` cvs-commit at gcc dot gnu.org
2022-02-02 15:10 ` marxin 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).