This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Determine_Range should ignore generic types


During work on another problem, it was noticed that Determine_Range
returns (bogus) bounds for generic types. Since the bounds of a
generic type are just place holders, they should not be accessed,
and this patch makes sure that Determine_Range indicates that in
this case it cannot determine the range. This may be a latent bug,
attempts to trigger a real bug did not succeed. However, it is
definitely wrong, and in the context of improved circuitry in
Compile_Time_Compare which is now being developed, it would be
a real bug. No test, since as far as we know, no functional
change in the current compiler.

Tested on x86_64-pc-linux-gnu, committed on trunk

2009-06-19  Robert Dewar  <dewar@adacore.com>

	* checks.adb (Determine_Range): Do not attempt to get range of generic
	type.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]