This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix noreturn related LTO ICE
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, rguenther at suse dot de
- Date: Wed, 2 Jun 2010 12:58:14 +0200
- Subject: Re: Fix noreturn related LTO ICE
- References: <20100531170449.GD6703@kam.mff.cuni.cz>
> * tree-cfgcleanup.c (fixup_noreturn_call): Break out from ...;
> remove return value.
> (split_bbs_on_noreturn_calls) .... here.
> * tree-optimize.c (execute_fixup_cfg): Fixup noreturn calls too.
> * tree-flow.h (fixup_noreturn_call): New.
> * tree-cfg.c (verify_call, verify_control_flow): Allow nonfixed
> noreturns during IPA passes.
This has introduced an ACATS regression at -O2 on x86:
FAIL: cxg1004
Reduced testcase attached.
eric@atlantis:~/build/gcc/native32> gcc/xgcc -Bgcc -S cxg1004.adb -O2
unhandled expression in get_expr_operands():
<error_mark 0xf7cc2680>
+===========================GNAT BUG DETECTED==============================+
| 4.6.0 20100602 (experimental) [trunk revision 160140] (i586-suse-linux-gnu)
GCC error:|
| in get_expr_operands, at tree-ssa-operands.c:1019 |
| Error detected around cxg1004.adb:4:1
Old value = (tree) 0xf757d480
New value = (tree) 0xf7cc2680
set_ssa_use_from_ptr (use=0xf794b254, val=0xf7cc2680)
at /home/eric/svn/gcc/gcc/tree-flow-inline.h:237
237 link_imm_use (use, val);
(gdb) p debug_tree(0xf7cc2680)
<error_mark 0xf7cc2680>
$24 = void
(gdb) bt
#0 set_ssa_use_from_ptr (use=0xf794b254, val=0xf7cc2680)
at /home/eric/svn/gcc/gcc/tree-flow-inline.h:237
#1 0x096c5f77 in fixup_noreturn_call (stmt=0xf791d984)
at /home/eric/svn/gcc/gcc/tree-cfgcleanup.c:573
#2 0x09916a14 in execute_fixup_cfg ()
at /home/eric/svn/gcc/gcc/tree-optimize.c:282
--
Eric Botcazou
with Ada.Numerics.Generic_Complex_Types;
with Ada.Numerics.Generic_Complex_Elementary_Functions;
procedure CXG1004 is
type Real_Type is new Float;
package Complex_Pack is
new Ada.Numerics.Generic_Complex_Types(Real_Type);
package CEF is
new Ada.Numerics.Generic_Complex_Elementary_Functions(Complex_Pack);
use Ada.Numerics, Complex_Pack, CEF;
Complex_Zero : constant Complex := Compose_From_Cartesian(0.0, 0.0);
TC_Complex : Complex;
begin
begin
TC_Complex := "**"(Left => Complex_Zero, Right => Complex_Zero);
exception
when Argument_Error => null;
end;
begin
TC_Complex := Complex_Zero**0.0;
exception
when Argument_Error => null;
end;
end;