public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/59332] New: Segmentation fault in inline_summary with LTO + attribute optimize
@ 2013-11-28 16:43 d.g.gorbachev at gmail dot com
2013-11-29 4:39 ` [Bug lto/59332] " d.g.gorbachev at gmail dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2013-11-28 16:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59332
Bug ID: 59332
Summary: Segmentation fault in inline_summary with LTO +
attribute optimize
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: d.g.gorbachev at gmail dot com
$ echo '__attribute__((optimize("no-lto"))) void foo(void) { }' > 1.c
$ gcc -S -flto 1.c
1.c:1:1: internal compiler error: Segmentation fault
__attribute__((optimize("no-lto"))) void foo(void) { }
^
0x86dfff0 crash_signal
../../gcc-4.9/gcc/toplev.c:336
0x85230d4 vec<inline_summary, va_gc, vl_embed>::operator[](unsigned int)
../../gcc-4.9/gcc/vec.h:718
0x85230d4 inline_summary
../../gcc-4.9/gcc/ipa-inline.h:242
0x85230d4 inline_write_summary()
../../gcc-4.9/gcc/ipa-inline-analysis.c:4079
0x86172ee ipa_write_summaries_2
../../gcc-4.9/gcc/passes.c:2310
0x86173a4 ipa_write_summaries_1
../../gcc-4.9/gcc/passes.c:2340
0x8618148 ipa_write_summaries()
../../gcc-4.9/gcc/passes.c:2399
0x82f22a0 ipa_passes
../../gcc-4.9/gcc/cgraphunit.c:2030
0x82f31b4 compile()
../../gcc-4.9/gcc/cgraphunit.c:2126
0x82f3519 finalize_compilation_unit()
../../gcc-4.9/gcc/cgraphunit.c:2280
0x8143690 c_write_global_declarations()
../../gcc-4.9/gcc/c/c-decl.c:10388
GCC 4.9.0 20131124. Also fails with GCC 4.7, 4.8.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/59332] Segmentation fault in inline_summary with LTO + attribute optimize
2013-11-28 16:43 [Bug lto/59332] New: Segmentation fault in inline_summary with LTO + attribute optimize d.g.gorbachev at gmail dot com
@ 2013-11-29 4:39 ` d.g.gorbachev at gmail dot com
2013-11-29 6:07 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2013-11-29 4:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59332
--- Comment #1 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> ---
In view of LTO shortcomings / bugs, I think that switching LTO *off* on a
per-function basis can be useful.
Perhaps it should be marked as 'enhancement'...
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/59332] Segmentation fault in inline_summary with LTO + attribute optimize
2013-11-28 16:43 [Bug lto/59332] New: Segmentation fault in inline_summary with LTO + attribute optimize d.g.gorbachev at gmail dot com
2013-11-29 4:39 ` [Bug lto/59332] " d.g.gorbachev at gmail dot com
@ 2013-11-29 6:07 ` pinskia at gcc dot gnu.org
2013-11-29 10:01 ` [Bug c/59332] " rguenth at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-11-29 6:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59332
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Dmitry Gorbachev from comment #1)
> In view of LTO shortcomings / bugs, I think that switching LTO *off* on a
> per-function basis can be useful.
>
> Perhaps it should be marked as 'enhancement'...
Can you expand on those shortcomings/bugs?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/59332] Segmentation fault in inline_summary with LTO + attribute optimize
2013-11-28 16:43 [Bug lto/59332] New: Segmentation fault in inline_summary with LTO + attribute optimize d.g.gorbachev at gmail dot com
2013-11-29 4:39 ` [Bug lto/59332] " d.g.gorbachev at gmail dot com
2013-11-29 6:07 ` pinskia at gcc dot gnu.org
@ 2013-11-29 10:01 ` rguenth at gcc dot gnu.org
2013-11-29 13:17 ` d.g.gorbachev at gmail dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-29 10:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59332
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-valid-code, lto |accepts-invalid,
| |ice-on-invalid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-11-29
Component|lto |c
Ever confirmed|0 |1
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
I don't think that will ever work ;) Thus the bug is that we accept no-lto
as argument to optimize().
Thus, confirmed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/59332] Segmentation fault in inline_summary with LTO + attribute optimize
2013-11-28 16:43 [Bug lto/59332] New: Segmentation fault in inline_summary with LTO + attribute optimize d.g.gorbachev at gmail dot com
` (2 preceding siblings ...)
2013-11-29 10:01 ` [Bug c/59332] " rguenth at gcc dot gnu.org
@ 2013-11-29 13:17 ` d.g.gorbachev at gmail dot com
2013-11-29 13:22 ` mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2013-11-29 13:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59332
--- Comment #4 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> ---
> Can you expand on those shortcomings/bugs?
There are LTO-related issues in GCC and LD, such as PR43038, PR56536 and
others. Not all problems will be fixed soon, and more bugs will be discovered
in the future. As a workaround, an attribute (a pragma) to disable LTO would
come in handy.
> I don't think that will ever work ;)
__attribute__((optimize("lto"))) works, surprisingly!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/59332] Segmentation fault in inline_summary with LTO + attribute optimize
2013-11-28 16:43 [Bug lto/59332] New: Segmentation fault in inline_summary with LTO + attribute optimize d.g.gorbachev at gmail dot com
` (3 preceding siblings ...)
2013-11-29 13:17 ` d.g.gorbachev at gmail dot com
@ 2013-11-29 13:22 ` mpolacek at gcc dot gnu.org
2013-11-29 14:09 ` d.g.gorbachev at gmail dot com
2021-08-08 6:32 ` [Bug lto/59332] " pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-11-29 13:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59332
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Dmitry Gorbachev from comment #4)
> __attribute__((optimize("lto"))) works, surprisingly!
I wonder whether that's intentional or just pure luck ;).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/59332] Segmentation fault in inline_summary with LTO + attribute optimize
2013-11-28 16:43 [Bug lto/59332] New: Segmentation fault in inline_summary with LTO + attribute optimize d.g.gorbachev at gmail dot com
` (4 preceding siblings ...)
2013-11-29 13:22 ` mpolacek at gcc dot gnu.org
@ 2013-11-29 14:09 ` d.g.gorbachev at gmail dot com
2021-08-08 6:32 ` [Bug lto/59332] " pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2013-11-29 14:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59332
--- Comment #6 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> ---
It was discovered by accident. However, if it does work, why "no-lto" (which is
so much more useful) should not work?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/59332] Segmentation fault in inline_summary with LTO + attribute optimize
2013-11-28 16:43 [Bug lto/59332] New: Segmentation fault in inline_summary with LTO + attribute optimize d.g.gorbachev at gmail dot com
` (5 preceding siblings ...)
2013-11-29 14:09 ` d.g.gorbachev at gmail dot com
@ 2021-08-08 6:32 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-08 6:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59332
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |7.0
Resolution|--- |DUPLICATE
Status|NEW |RESOLVED
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
in GCC 7+ we warning and ignore the attribute now:
<source>:1:1: warning: bad option '-fno-lto' to attribute 'optimize'
[-Wattributes]
__attribute__((optimize("no-lto"))) void foo(void) { }
Dup of bug 61564.
*** This bug has been marked as a duplicate of bug 61564 ***
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-08-08 6:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-28 16:43 [Bug lto/59332] New: Segmentation fault in inline_summary with LTO + attribute optimize d.g.gorbachev at gmail dot com
2013-11-29 4:39 ` [Bug lto/59332] " d.g.gorbachev at gmail dot com
2013-11-29 6:07 ` pinskia at gcc dot gnu.org
2013-11-29 10:01 ` [Bug c/59332] " rguenth at gcc dot gnu.org
2013-11-29 13:17 ` d.g.gorbachev at gmail dot com
2013-11-29 13:22 ` mpolacek at gcc dot gnu.org
2013-11-29 14:09 ` d.g.gorbachev at gmail dot com
2021-08-08 6:32 ` [Bug lto/59332] " pinskia 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).