* [Bug lto/41756] LTO: -flto -O1 -use-linker-plugin, linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge"
2009-10-19 16:54 [Bug lto/41756] New: LTO: -flto -O1 -use-linker-plugin, linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge" edwintorok at gmail dot com
@ 2009-10-19 16:55 ` edwintorok at gmail dot com
2009-10-19 16:56 ` edwintorok at gmail dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: edwintorok at gmail dot com @ 2009-10-19 16:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from edwintorok at gmail dot com 2009-10-19 16:55 -------
Created an attachment (id=18827)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18827&action=view)
SourceMgr.i
preprocessed SourceMgr.i
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/41756] LTO: -flto -O1 -use-linker-plugin, linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge"
2009-10-19 16:54 [Bug lto/41756] New: LTO: -flto -O1 -use-linker-plugin, linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge" edwintorok at gmail dot com
2009-10-19 16:55 ` [Bug lto/41756] " edwintorok at gmail dot com
@ 2009-10-19 16:56 ` edwintorok at gmail dot com
2009-10-19 16:58 ` edwintorok at gmail dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: edwintorok at gmail dot com @ 2009-10-19 16:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from edwintorok at gmail dot com 2009-10-19 16:56 -------
Created an attachment (id=18828)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18828&action=view)
AsmMatcherEmitter.i.bz2
bzipped preprocessed AsmMatcherEmitter.i
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/41756] LTO: -flto -O1 -use-linker-plugin, linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge"
2009-10-19 16:54 [Bug lto/41756] New: LTO: -flto -O1 -use-linker-plugin, linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge" edwintorok at gmail dot com
2009-10-19 16:55 ` [Bug lto/41756] " edwintorok at gmail dot com
2009-10-19 16:56 ` edwintorok at gmail dot com
@ 2009-10-19 16:58 ` edwintorok at gmail dot com
2009-10-19 17:00 ` edwintorok at gmail dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: edwintorok at gmail dot com @ 2009-10-19 16:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from edwintorok at gmail dot com 2009-10-19 16:58 -------
ld -v
GNU gold (GNU Binutils for Debian 2.20) 1.9
This happens only if I use all of -flto -O1 -use-linker-plugin, not using -O1,
or not using -use-linker-plugin hides the bug (and not using -flto too of
course).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/41756] LTO: -flto -O1 -use-linker-plugin, linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge"
2009-10-19 16:54 [Bug lto/41756] New: LTO: -flto -O1 -use-linker-plugin, linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge" edwintorok at gmail dot com
` (2 preceding siblings ...)
2009-10-19 16:58 ` edwintorok at gmail dot com
@ 2009-10-19 17:00 ` edwintorok at gmail dot com
2009-10-19 17:34 ` steven at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: edwintorok at gmail dot com @ 2009-10-19 17:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from edwintorok at gmail dot com 2009-10-19 16:59 -------
(In reply to comment #3)
> ld -v
> GNU gold (GNU Binutils for Debian 2.20) 1.9
>
> This happens only if I use all of -flto -O1 -use-linker-plugin, not using -O1,
> or not using -use-linker-plugin hides the bug (and not using -flto too of
> course).
>
Actually -use-linker-plugin makes no difference
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/41756] LTO: -flto -O1 -use-linker-plugin, linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge"
2009-10-19 16:54 [Bug lto/41756] New: LTO: -flto -O1 -use-linker-plugin, linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge" edwintorok at gmail dot com
` (3 preceding siblings ...)
2009-10-19 17:00 ` edwintorok at gmail dot com
@ 2009-10-19 17:34 ` steven at gcc dot gnu dot org
2009-10-20 9:35 ` [Bug lto/41756] LTO: -flto -O1 " rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-10-19 17:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from steven at gcc dot gnu dot org 2009-10-19 17:34 -------
You can't merge no-exception and exception code, it seems. Should exceptions
be enabled per-function for LTO?
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dnovillo at gcc dot gnu dot
| |org, hubicka at gcc dot gnu
| |dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-10-19 17:34:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/41756] LTO: -flto -O1 linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge"
2009-10-19 16:54 [Bug lto/41756] New: LTO: -flto -O1 -use-linker-plugin, linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge" edwintorok at gmail dot com
` (4 preceding siblings ...)
2009-10-19 17:34 ` steven at gcc dot gnu dot org
@ 2009-10-20 9:35 ` rguenth at gcc dot gnu dot org
2009-12-11 11:39 ` hubicka at gcc dot gnu dot org
2009-12-11 12:16 ` rguenth at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-20 9:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2009-10-20 09:35 -------
Even that would be difficult - how would you inline between such functions?
I think the only way is to force -fexceptions during the link stage if one
translation unit did have it enabled. The -fno-exception TUs should have
all stmts marked as not throwing.
Sort of, but well - this is a very low priority bug. (Falls into the
class of "different flags used for compiling and linking")
I'll try a very simple hack.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|LTO: -flto -O1 -use-linker- |LTO: -flto -O1 linking files
|plugin, linking files |compiled with -fno-
|compiled with -fno- |exceptions with ones
|exceptions with ones |compiled with exceptions
|compiled with exceptions |yields error "BB 14 can not
|yields error "BB 14 can not |throw but has an EH edge"
|throw but has an EH edge" |
Version|unknown |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/41756] LTO: -flto -O1 linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge"
2009-10-19 16:54 [Bug lto/41756] New: LTO: -flto -O1 -use-linker-plugin, linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge" edwintorok at gmail dot com
` (5 preceding siblings ...)
2009-10-20 9:35 ` [Bug lto/41756] LTO: -flto -O1 " rguenth at gcc dot gnu dot org
@ 2009-12-11 11:39 ` hubicka at gcc dot gnu dot org
2009-12-11 12:16 ` rguenth at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2009-12-11 11:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from hubicka at gcc dot gnu dot org 2009-12-11 11:39 -------
I would vote for LTO frotnend simply sorrying when seeing units with and
without exceptions.
Honza
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/41756] LTO: -flto -O1 linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge"
2009-10-19 16:54 [Bug lto/41756] New: LTO: -flto -O1 -use-linker-plugin, linking files compiled with -fno-exceptions with ones compiled with exceptions yields error "BB 14 can not throw but has an EH edge" edwintorok at gmail dot com
` (6 preceding siblings ...)
2009-12-11 11:39 ` hubicka at gcc dot gnu dot org
@ 2009-12-11 12:16 ` rguenth at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-12-11 12:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2009-12-11 12:16 -------
I wonder if we should simply ignore -fno-exceptions/-fexceptions passed to
lto1 and rely on the automated discovery.
The testcase btw works for me on i?86.
The proposed patch would delete handling of OPT_fexceptions from
register_user_option_p and add flag_exceptions = 0 to lto_init_options
in case you can still reproduce the issue.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41756
^ permalink raw reply [flat|nested] 9+ messages in thread