public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/100010] New: ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans)
@ 2021-04-10 1:36 alex.miller at gmx dot de
2021-04-11 18:56 ` [Bug lto/100010] [8/9/10/11 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719 marxin at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: alex.miller at gmx dot de @ 2021-04-10 1:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100010
Bug ID: 100010
Summary: ICE in lto_output_node, at lto-cgraph.c:447
(-fdevirtualize-at-ltrans)
Product: gcc
Version: 10.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: alex.miller at gmx dot de
CC: marxin at gcc dot gnu.org
Target Milestone: ---
Building lcdf-typetools-2.108 fails with an ICE while linking the mmafm tool
(with gcc-10 using the flags "-O3 -flto -fdevirtualize-at-ltrans").
Here's a reduced sample that reproduces the issue (even with -O2):
---
struct String {
String(char);
~String();
};
struct ErrorHandler {
virtual String decorate(const String &);
};
String ErrorHandler::decorate(const String &str) {
decorate(str);
return 0;
}
struct LandmarkErrorHandler : ErrorHandler {
String _landmark;
LandmarkErrorHandler();
String decorate(const String &);
};
String LandmarkErrorHandler::decorate(const String &) {
return ErrorHandler::decorate(0);
}
struct Charstring {
virtual ~Charstring();
virtual void process() = 0;
} *interpret_cs;
Charstring::~Charstring() {}
struct : Charstring {
void process() {}
} _cdv;
int main() {
LandmarkErrorHandler();
interpret_cs->process();
}
---
$ g++ -O2 -flto -fdevirtualize-at-ltrans a.cc
during IPA pass: static-var
lto1: internal compiler error: in lto_output_node, at lto-cgraph.c:447
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Reducing the sources seems a bit brittle, like often with LTO:
* Combining all sources in a single file changed the error message to
"lto1: internal compiler error: Segmentation fault", but minimizing made
the error location reappear. The result is very similar to a multi-file
reduction.
* Reduced sample fails with -O2, full sources need -O3.
* With g++-9.3.0 the reduced sample doesn't trigger the ICE, but the original
sources do (at lto-cgraph.c:453).
Let me know if you need another sample.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug lto/100010] [8/9/10/11 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719
2021-04-10 1:36 [Bug lto/100010] New: ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) alex.miller at gmx dot de
@ 2021-04-11 18:56 ` marxin at gcc dot gnu.org
2021-04-12 8:14 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-11 18:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100010
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |8.5
CC| |hubicka at gcc dot gnu.org
Summary|ICE in lto_output_node, at |[8/9/10/11 Regression] ICE
|lto-cgraph.c:447 |in lto_output_node, at
|(-fdevirtualize-at-ltrans) |lto-cgraph.c:447
| |(-fdevirtualize-at-ltrans)
| |since
| |r6-6384-gceda2c69d5219719
Last reconfirmed| |2021-04-11
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r6-6384-gceda2c69d5219719.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug lto/100010] [8/9/10/11 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719
2021-04-10 1:36 [Bug lto/100010] New: ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) alex.miller at gmx dot de
2021-04-11 18:56 ` [Bug lto/100010] [8/9/10/11 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719 marxin at gcc dot gnu.org
@ 2021-04-12 8:14 ` rguenth at gcc dot gnu.org
2021-04-12 9:58 ` hubicka at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-12 8:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100010
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Keywords| |ice-on-valid-code
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug lto/100010] [8/9/10/11 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719
2021-04-10 1:36 [Bug lto/100010] New: ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) alex.miller at gmx dot de
2021-04-11 18:56 ` [Bug lto/100010] [8/9/10/11 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719 marxin at gcc dot gnu.org
2021-04-12 8:14 ` rguenth at gcc dot gnu.org
@ 2021-04-12 9:58 ` hubicka at gcc dot gnu.org
2021-05-14 9:54 ` [Bug lto/100010] [9/10/11/12 " jakub at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-04-12 9:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100010
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |hubicka at gcc dot gnu.org
--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
mine.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug lto/100010] [9/10/11/12 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719
2021-04-10 1:36 [Bug lto/100010] New: ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) alex.miller at gmx dot de
` (2 preceding siblings ...)
2021-04-12 9:58 ` hubicka at gcc dot gnu.org
@ 2021-05-14 9:54 ` jakub at gcc dot gnu.org
2021-06-01 8:20 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14 9:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100010
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|8.5 |9.4
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug lto/100010] [9/10/11/12 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719
2021-04-10 1:36 [Bug lto/100010] New: ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) alex.miller at gmx dot de
` (3 preceding siblings ...)
2021-05-14 9:54 ` [Bug lto/100010] [9/10/11/12 " jakub at gcc dot gnu.org
@ 2021-06-01 8:20 ` rguenth at gcc dot gnu.org
2022-02-11 7:07 ` xry111 at mengyan1223 dot wang
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01 8:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100010
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.4 |9.5
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug lto/100010] [9/10/11/12 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719
2021-04-10 1:36 [Bug lto/100010] New: ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) alex.miller at gmx dot de
` (4 preceding siblings ...)
2021-06-01 8:20 ` rguenth at gcc dot gnu.org
@ 2022-02-11 7:07 ` xry111 at mengyan1223 dot wang
2022-05-27 9:44 ` [Bug lto/100010] [10/11/12/13 " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: xry111 at mengyan1223 dot wang @ 2022-02-11 7:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100010
Xi Ruoyao <xry111 at mengyan1223 dot wang> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |xry111 at mengyan1223 dot wang
--- Comment #5 from Xi Ruoyao <xry111 at mengyan1223 dot wang> ---
Also breaks building texlive-20210325 with lto.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug lto/100010] [10/11/12/13 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719
2021-04-10 1:36 [Bug lto/100010] New: ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) alex.miller at gmx dot de
` (5 preceding siblings ...)
2022-02-11 7:07 ` xry111 at mengyan1223 dot wang
@ 2022-05-27 9:44 ` rguenth at gcc dot gnu.org
2022-06-28 10:44 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 9:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100010
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.5 |10.4
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug lto/100010] [10/11/12/13 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719
2021-04-10 1:36 [Bug lto/100010] New: ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) alex.miller at gmx dot de
` (6 preceding siblings ...)
2022-05-27 9:44 ` [Bug lto/100010] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:44 ` jakub at gcc dot gnu.org
2022-08-16 8:03 ` yinyuefengyi at gmail dot com
2023-07-07 10:39 ` [Bug lto/100010] [11/12/13/14 " rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100010
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug lto/100010] [10/11/12/13 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719
2021-04-10 1:36 [Bug lto/100010] New: ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) alex.miller at gmx dot de
` (7 preceding siblings ...)
2022-06-28 10:44 ` jakub at gcc dot gnu.org
@ 2022-08-16 8:03 ` yinyuefengyi at gmail dot com
2023-07-07 10:39 ` [Bug lto/100010] [11/12/13/14 " rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: yinyuefengyi at gmail dot com @ 2022-08-16 8:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100010
--- Comment #8 from Xionghu Luo (luoxhu at gcc dot gnu.org) <yinyuefengyi at gmail dot com> ---
At the ICE point, node->clone_of has value, but clone_of is NULL:
(gdb) p clone_of
$114 = (cgraph_node *) 0x0
(gdb) p node->clone_of
$115 = (cgraph_node *) 0x7ffff6664bb0
(gdb) pnode node->clone_of
_ZN12ErrorHandler8decorateERK6String/0 (decorate)
Type: function
Visibility: semantic_interposition virtual
next sharing asm name: 0
References:
Referring:
Availability: not_available
Function flags:
Called by:
Calls:
(gdb) pnode node
_ZN12ErrorHandler8decorateERK6String/0 (decorate)
Type: function definition analyzed
Visibility: semantic_interposition virtual
previous sharing asm name: 0
References:
Referring:
Read from file: a-pr10010.o
Function decorate/0 is inline copy in decorate/1
Clone of _ZN12ErrorHandler8decorateERK6String/0
Availability: local
Unit id: 1
Function flags: count:1073741824 (estimated locally) local
Called by: _ZN20LandmarkErrorHandler8decorateERK6String/1 (inlined)
(1073741824 (estimated locally),1.00 per call)
Calls: _ZN6StringD1Ev/37 (1073741824 (estimated locally),1.00 per call)
_ZN6StringC1Ec/38 (1073741824 (estimated loca
lly),1.00 per call) (can throw external)
Polymorphic indirect call of type struct ErrorHandler token:0(1073741824
(estimated locally),1.00 per call) (can thr
ow external) of param:0 (vptr maybe changed) num speculative call targets: 0
Outer type (dynamic):struct ErrorHandler (or a derived type) offset 0
This simple change could fix but not sure whether it is correct.
diff --git a/gcc/lto-cgraph.cc b/gcc/lto-cgraph.cc
index 6d9c36ea8b6..44a33a2af23 100644
--- a/gcc/lto-cgraph.cc
+++ b/gcc/lto-cgraph.cc
@@ -448,7 +448,7 @@ lto_output_node (struct lto_simple_output_block *ob, struct
cgraph_node *node,
if (clone_of && !lto_symtab_encoder_encode_body_p (encoder,
ultimate_clone_of))
clone_of = NULL;
- if (tag == LTO_symtab_analyzed_node)
+ if (tag == LTO_symtab_analyzed_node && !flag_ltrans_devirtualize)
gcc_assert (clone_of || !node->clone_of);
if (!clone_of)
streamer_write_hwi_stream (ob->main_stream, LCC_NOT_FOUND);
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug lto/100010] [11/12/13/14 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719
2021-04-10 1:36 [Bug lto/100010] New: ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) alex.miller at gmx dot de
` (8 preceding siblings ...)
2022-08-16 8:03 ` yinyuefengyi at gmail dot com
@ 2023-07-07 10:39 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100010
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-07-07 10:39 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-10 1:36 [Bug lto/100010] New: ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) alex.miller at gmx dot de
2021-04-11 18:56 ` [Bug lto/100010] [8/9/10/11 Regression] ICE in lto_output_node, at lto-cgraph.c:447 (-fdevirtualize-at-ltrans) since r6-6384-gceda2c69d5219719 marxin at gcc dot gnu.org
2021-04-12 8:14 ` rguenth at gcc dot gnu.org
2021-04-12 9:58 ` hubicka at gcc dot gnu.org
2021-05-14 9:54 ` [Bug lto/100010] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01 8:20 ` rguenth at gcc dot gnu.org
2022-02-11 7:07 ` xry111 at mengyan1223 dot wang
2022-05-27 9:44 ` [Bug lto/100010] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:44 ` jakub at gcc dot gnu.org
2022-08-16 8:03 ` yinyuefengyi at gmail dot com
2023-07-07 10:39 ` [Bug lto/100010] [11/12/13/14 " rguenth 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).