------- Comment #2 from pinskia at gcc dot gnu dot org  2006-08-25 06:25 -------
I am thinking this is undefined behavior because 120 is outside the range of
Three.  In fact with -gnato, there is a constraint error:
In the output that follows, the three values of the type Three
are multiplied by 120 and the result should be 0, 120, 240.
The third result obtained with Gnat 3.4.6 or 4.2, is -16 which.
is incorrect.
 0  0
 1  120

raised CONSTRAINT_ERROR : multiplication_bug.adb:16 overflow check failed

so this is not a bug as far as I can tell.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28835

Reply via email to