[Bug ada/9536] [3.3/3.4 regression] Constraint error on valid Ada.Calendar.Time_Of
Alexander dot Kuenz at dlr dot de
gcc-bugzilla@gcc.gnu.org
Wed Jul 16 09:06:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9536
------- Additional Comments From Alexander dot Kuenz at dlr dot de 2003-07-16 09:06 -------
As far as we get, we don't think that the Calendar.Time_Of is the real bug.
We commented the valid-check in the a-calend.adb (in /usr/lib/gcc-lib/i486-suse-
linux/3.3/adainclude)
and replaced the Calendar.Time_Of - call
by the changed code (without the valid-check). And this way, it works. The
strange thing is,
that the date/time we put into the function is correct obviously. The valid-
check should be
positive with our values. We think that there is something wrong with the valid-
check.
Meanwhile, we have another problem we did not have with gnat3.13.
We try to cast a self-defined integer-type (not the full integer range) to a
short_integer.
This does not work unless we first cast the self-defined integer type to a
system integer and then cast
the system integer to a short_integer (overflow check failed).
With other self_defined integer types, the cast to a short_integer works
without problems.
I suppose there is a valid-check within the short_integer casting as well which
is probably
the reason why the casting goes wrong.
All in all, I consider the Calendar.Time_Of-bug to be a valid-check bug.
More information about the Gcc-bugs
mailing list