* [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