[Bug tree-optimization/30911] VRP fails to eliminate range checks in Ada code
ebotcazou at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Mar 30 15:46:00 GMT 2008
------- Comment #62 from ebotcazou at gcc dot gnu dot org 2008-03-30 15:45 -------
> Yes, even with -gnato. With -gnato it checks that the
> addition doesn't overflow.
Oh, sorry, I thought we were talking about the overflow check...
> But there are no checks on the array access. It looks like the f-e
> doesn't generate them in the first place (as opposed to fold or gigi
> making a mistake).
This is as documented in the GNAT manual, section 3.2.4 Validity Checking.
You need to pass -gnatVs to have them.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30911
More information about the Gcc-bugs
mailing list