This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug regression/69838] New: [regression] Lra deletes EH_REGION
- From: "vogt at linux dot vnet.ibm.com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 16 Feb 2016 13:44:42 +0000
- Subject: [Bug regression/69838] New: [regression] Lra deletes EH_REGION
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69838
Bug ID: 69838
Summary: [regression] Lra deletes EH_REGION
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: regression
Assignee: unassigned at gcc dot gnu.org
Reporter: vogt at linux dot vnet.ibm.com
Target Milestone: ---
Host: s390x
Target: s390x
Created attachment 37704
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37704&action=edit
Ira dump (ok)
It looks like Lra does not handle EH_REGION notes correctly. There is at least
one Gnat testcase where Lra wrongly deletes all exception handling code
(gcc/testsuite/gnat.dg/null_pointer_deref1.adb):
-- snip --
procedure Null_Pointer_Deref1 is
type Int_Ptr is access all Integer;
function Ident return Int_Ptr is
begin
return null;
end;
Data : Int_Ptr := Ident;
begin
Data.all := 1;
exception
when Constraint_Error | Storage_Error => null;
end;
-- snip --
The exception handling code vanishes in the reload pass (see attached rtl
dumps). As a consequence, the exception is not caugt by the function and the
program terminates with an error. With -mno-lra the test case works fine, and
the code in reload1.c seems to have special treatment for EH_REGION notes that
is missing in ira.c.