------- Comment #71 from rguenther at suse dot de 2009-11-17 15:07 ------- Subject: Re: VRP fails to eliminate range checks in Ada code
On Tue, 17 Nov 2009, baldrick at free dot fr wrote: > ------- Comment #69 from baldrick at free dot fr 2009-11-17 11:04 ------- > It seems that variables produced by the Ada front-end no longer have any > non-trivial range information associated with them. Without knowing the > range information > type S is range 0 .. 100; > type T is range 10 .. 20; > it is impossible for the optimizers to eliminate most of the range checks > in this testcase. With the range information all of the checks can in theory > be removed. This is an example of how range information is potentially very > helpful for optimizing Ada programs. > > Is there anyway for the optimizers to get at this range information still? > Or was range information removed because it is essentially impossible to use > it correctly (if so this bug report should be closed as unfixable)? It was removed because it was impossible to use it correctly. The "fix" is to derive range information from existing range checks, possibly inter-procedurally. Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30911