public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
@ 2014-12-17 14:12 dominiq at lps dot ens.fr
2014-12-17 14:18 ` [Bug middle-end/64340] " schwab@linux-m68k.org
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-12-17 14:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
Bug ID: 64340
Summary: [5 Regression] FAIL: gnat.dg/lto8.adb (internal
compiler error)
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: dominiq at lps dot ens.fr
Between revisions r218766 (OK) and r218797 (ICE) the test gnat.dg/lto8.adb has
started to fail. The ICE is
/opt/gcc/p_work/gcc/testsuite/gnat.dg/lto8_pkg.ads: In function
'lto8_pkg___elabs':
/opt/gcc/p_work/gcc/testsuite/gnat.dg/lto8_pkg.ads:4:1: internal compiler
error: in expand_gimple_stmt_1, at cfgexpand.c:3420
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
@ 2014-12-17 14:18 ` schwab@linux-m68k.org
2014-12-17 15:55 ` rguenth at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: schwab@linux-m68k.org @ 2014-12-17 14:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64043#c11
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
2014-12-17 14:18 ` [Bug middle-end/64340] " schwab@linux-m68k.org
@ 2014-12-17 15:55 ` rguenth at gcc dot gnu.org
2014-12-17 17:23 ` hubicka at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-17 15:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |5.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
2014-12-17 14:18 ` [Bug middle-end/64340] " schwab@linux-m68k.org
2014-12-17 15:55 ` rguenth at gcc dot gnu.org
@ 2014-12-17 17:23 ` hubicka at gcc dot gnu.org
2014-12-17 20:29 ` danglin at gcc dot gnu.org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-12-17 17:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Seems more of preloading needs tobe skipped. I will dig into that.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
` (2 preceding siblings ...)
2014-12-17 17:23 ` hubicka at gcc dot gnu.org
@ 2014-12-17 20:29 ` danglin at gcc dot gnu.org
2014-12-19 11:51 ` rguenth at gcc dot gnu.org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: danglin at gcc dot gnu.org @ 2014-12-17 20:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
John David Anglin <danglin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-12-17
CC| |danglin at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from John David Anglin <danglin at gcc dot gnu.org> ---
Also seen on hppa-unknown-linux-gnu.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
` (3 preceding siblings ...)
2014-12-17 20:29 ` danglin at gcc dot gnu.org
@ 2014-12-19 11:51 ` rguenth at gcc dot gnu.org
2015-01-14 15:37 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-19 11:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
` (4 preceding siblings ...)
2014-12-19 11:51 ` rguenth at gcc dot gnu.org
@ 2015-01-14 15:37 ` rguenth at gcc dot gnu.org
2015-01-15 12:35 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-01-14 15:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
ISTR that preloading pid_t was necessary for ada (basically all types required
from some builtins are required to be preloaded).
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
` (5 preceding siblings ...)
2015-01-14 15:37 ` rguenth at gcc dot gnu.org
@ 2015-01-15 12:35 ` rguenth at gcc dot gnu.org
2015-01-23 22:06 ` tbsaunde at gcc dot gnu.org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-01-15 12:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's fixed by dropping all of TI_TARGET_OPTION_DEFAULT,
TI_TARGET_OPTION_CURRENT, TI_CURRENT_TARGET_PRAGMA and
TI_CURRENT_OPTIMIZE_PRAGMA from the special-casing.
We are trying to expand a GIMPLE_RESX stmt which should have been lowered
before.
(gdb) p opts_for_fn (cfun->decl)->x_flag_exceptions
$3 = 0 '\000'
thus somehow -fexceptions is bogus (also in 'Optimization' for some weird
reason).
(gdb) p global_options.x_flag_exceptions
$4 = 0
But certainly -fexceptions -fnon-call-exceptions was specified for both
source TUs and thus via lto-wrapper xgcc should have received them. But
lto1 seems to ignore -fexceptions.
I've reproduced pasting the gnatmake command and then (gnatlink fails)
./lto1 -quiet lto8.o lto8_pkg.o -fexceptions -fnon-call-exceptions
The bogus setting is "restored" via
Hardware watchpoint 5: *$3
Old value = 1
New value = 0
cl_optimization_restore (opts=0x203fc80 <global_options>, ptr=0x7ffff6c344b0)
at options-save.c:476
476 opts->x_flag_expensive_optimizations =
ptr->x_flag_expensive_optimizations;
#0 cl_optimization_restore (opts=0x203fc80 <global_options>,
ptr=0x7ffff6c344b0) at options-save.c:476
#1 0x00000000008f4603 in invoke_set_current_function_hook (fndecl=
<function_decl 0x7ffff6e1a000 lto8___finalizer>)
at /space/rguenther/src/svn/trunk2/gcc/function.c:4665
#2 0x00000000008f4909 in allocate_struct_function (
fndecl=<function_decl 0x7ffff6e1a000 lto8___finalizer>, abstract_p=false)
at /space/rguenther/src/svn/trunk2/gcc/function.c:4777
#3 0x00000000008f4b09 in push_struct_function (
fndecl=<function_decl 0x7ffff6e1a000 lto8___finalizer>)
at /space/rguenther/src/svn/trunk2/gcc/function.c:4819
#4 0x0000000000aed772 in input_function (
fn_decl=<function_decl 0x7ffff6e1a000 lto8___finalizer>,
data_in=0x2062810, ib=0x7fffffffdad0, ib_cfg=0x7fffffffdac0)
at /space/rguenther/src/svn/trunk2/gcc/lto-streamer-in.c:945
#5 0x0000000000aee06d in lto_read_body_or_constructor (
file_data=0x7ffff7ff6000, node=0x7ffff6c347a8, data=0x20a2540 "\004",
section_type=LTO_section_function_body)
at /space/rguenther/src/svn/trunk2/gcc/lto-streamer-in.c:1108
#6 0x0000000000aee311 in lto_input_function_body (file_data=0x7ffff7ff6000,
node=<cgraph_node* 0x7ffff6c347a8 "lto8___finalizer">,
data=0x20a2540 "\004")
at /space/rguenther/src/svn/trunk2/gcc/lto-streamer-in.c:1153
now the question is why there is false for those options in the function
specific optimization nodes. When do we populate these?
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
` (6 preceding siblings ...)
2015-01-15 12:35 ` rguenth at gcc dot gnu.org
@ 2015-01-23 22:06 ` tbsaunde at gcc dot gnu.org
2015-01-25 17:49 ` tbsaunde at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: tbsaunde at gcc dot gnu.org @ 2015-01-23 22:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
tbsaunde at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tbsaunde at gcc dot gnu.org
--- Comment #6 from tbsaunde at gcc dot gnu.org ---
It seems like the right thing to do is make varpool_node::create_alias() set
ref_list.references, does that seem correct?
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
` (7 preceding siblings ...)
2015-01-23 22:06 ` tbsaunde at gcc dot gnu.org
@ 2015-01-25 17:49 ` tbsaunde at gcc dot gnu.org
2015-01-29 7:15 ` hubicka at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: tbsaunde at gcc dot gnu.org @ 2015-01-25 17:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
--- Comment #7 from tbsaunde at gcc dot gnu.org ---
(In reply to tbsaunde from comment #6)
> It seems like the right thing to do is make varpool_node::create_alias() set
> ref_list.references, does that seem correct?
O.O that was for another bug.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
` (8 preceding siblings ...)
2015-01-25 17:49 ` tbsaunde at gcc dot gnu.org
@ 2015-01-29 7:15 ` hubicka at gcc dot gnu.org
2015-02-06 16:12 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-01-29 7:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
--- Comment #8 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Richard, isn't it the streamer being out of sync again - the prevoius problem
(reason I dropped pid_t) is that at the moment we preload something that is
NULL in one FE and not in another, we end up with tree indexes being wrong.
cl_optimization_restore just restore global flags from TARGET node, for
complation with -O2 it seems bogus it would be set to 0.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
` (9 preceding siblings ...)
2015-01-29 7:15 ` hubicka at gcc dot gnu.org
@ 2015-02-06 16:12 ` jakub at gcc dot gnu.org
2015-02-06 17:03 ` ebotcazou at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-06 16:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 34687
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34687&action=edit
gcc5-pr64340.patch
Untested fix (well, tested with make check-gnat).
The problem seems to be that gnat modifies global_options after toplevel.c
(process_options) ends, in this case options like flag_*exceptions*, in other
cases flag_strict_aliasing, or other flags. That means those option changes
aren't visible in optimization_{default,current}_node that is created at the
end of process_options, and if some function doesn't use its own optimization
node, it will get the default one. So, if there are any functions with
non-default optimization node, or when lto streams that node for functions that
didn't have any, those option changes may get lost.
Seems those option changes depend on parsing, so process_options is too early,
so IMHO we need to recreate the optimization_{default,current}_node trees with
the updated options (updating the options in there directly doesn't work, as
the options are hashed).
Eric/Honza, does this look reasonable to you?
flag_ipa_ra change seems to be misplaced too, will fix that in a separate
patch.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
` (10 preceding siblings ...)
2015-02-06 16:12 ` jakub at gcc dot gnu.org
@ 2015-02-06 17:03 ` ebotcazou at gcc dot gnu.org
2015-02-07 14:45 ` jakub at gcc dot gnu.org
2015-02-07 14:46 ` jakub at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2015-02-06 17:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
--- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Seems those option changes depend on parsing, so process_options is too
> early, so IMHO we need to recreate the optimization_{default,current}_node
> trees with the updated options (updating the options in there directly
> doesn't work, as the options are hashed).
Yes, we cannot changes these options earlier.
> Eric/Honza, does this look reasonable to you?
Maybe "Save the current optimization options again after the above changes".
> flag_ipa_ra change seems to be misplaced too, will fix that in a separate
> patch.
Yep, this looks problematic too. Thanks for looking into this.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
` (11 preceding siblings ...)
2015-02-06 17:03 ` ebotcazou at gcc dot gnu.org
@ 2015-02-07 14:45 ` jakub at gcc dot gnu.org
2015-02-07 14:46 ` jakub at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-07 14:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Sat Feb 7 14:44:26 2015
New Revision: 220504
URL: https://gcc.gnu.org/viewcvs?rev=220504&root=gcc&view=rev
Log:
PR middle-end/64340
* gcc-interface/trans.c (gigi): Recreate optimization_default_node
and optimization_current_node after tweaking global_options.
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/gcc-interface/trans.c
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/64340] [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error)
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
` (12 preceding siblings ...)
2015-02-07 14:45 ` jakub at gcc dot gnu.org
@ 2015-02-07 14:46 ` jakub at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-07 14:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64340
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2015-02-07 14:46 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-17 14:12 [Bug middle-end/64340] New: [5 Regression] FAIL: gnat.dg/lto8.adb (internal compiler error) dominiq at lps dot ens.fr
2014-12-17 14:18 ` [Bug middle-end/64340] " schwab@linux-m68k.org
2014-12-17 15:55 ` rguenth at gcc dot gnu.org
2014-12-17 17:23 ` hubicka at gcc dot gnu.org
2014-12-17 20:29 ` danglin at gcc dot gnu.org
2014-12-19 11:51 ` rguenth at gcc dot gnu.org
2015-01-14 15:37 ` rguenth at gcc dot gnu.org
2015-01-15 12:35 ` rguenth at gcc dot gnu.org
2015-01-23 22:06 ` tbsaunde at gcc dot gnu.org
2015-01-25 17:49 ` tbsaunde at gcc dot gnu.org
2015-01-29 7:15 ` hubicka at gcc dot gnu.org
2015-02-06 16:12 ` jakub at gcc dot gnu.org
2015-02-06 17:03 ` ebotcazou at gcc dot gnu.org
2015-02-07 14:45 ` jakub at gcc dot gnu.org
2015-02-07 14:46 ` jakub 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).