This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/9536] [3.3/3.4 regression] Constraint error on valid Ada.Calendar.Time_Of
- From: "Alexander dot Kuenz at dlr dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jul 2003 09:06:07 -0000
- Subject: [Bug ada/9536] [3.3/3.4 regression] Constraint error on valid Ada.Calendar.Time_Of
- References: <20030201181601.9536.simon@pushface.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.