This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/30911] VRP fails to eliminate range checks in Ada code
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Feb 2007 17:32:50 -0000
- Subject: [Bug tree-optimization/30911] VRP fails to eliminate range checks in Ada code
- References: <bug-30911-13647@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #30 from rguenth at gcc dot gnu dot org 2007-02-23 17:32 -------
Ok, I have too little Ada skills ;) What is missing in the following?
with test;
package test is
type Count is range 0 .. Natural'Last;
subtype Positive_Count is Count range 1 .. Count'Last;
procedure Set_Col (To : Positive_Count);
end test;
procedure Set_Col
(To : Positive_Count)
is
begin
if not To'Valid then
raise Constraint_Error;
end if;
end Set_Col;
$ gnatchop -w Set_Col.adb
splitting Set_Col.adb into:
test.ads
set_col.adb
$ gnatmake set_col.adb
gcc-4.1 -c set_col.adb
set_col.ads:2:25: "Positive_Count" is undefined (more references follow)
gnatmake: "set_col.adb" compilation error
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30911