This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/28835] New: Incorrect numeric result in multiplication of user-defined type with universal integer
- From: "S dot Sangwine at IEEE dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Aug 2006 11:37:51 -0000
- Subject: [Bug ada/28835] New: Incorrect numeric result in multiplication of user-defined type with universal integer
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Multiplication of a variable of a user-defined integer type with range 0 .. 2
by an integer literal causes incorrect result in the case when the variable has
value 2. A negative result is given even though the variable and literal are
positive.
Found this error with Gnat 3.4.6 (AdaCore Libre version, 2006), but reproduced
the same problem with the latest development code (4.2.0).
The problem is demonstrated by the short stand-alone program code provided with
this report.
Compiler configuration details (but see also above about 3.4.6):
Configured with: /Users/drew/Developer/Compiler/gcc-head/configure
--prefix=/usr/local/ada-4.2 --disable-libssp --disable-libgomp
--enable-languages=c,ada
--
Summary: Incorrect numeric result in multiplication of user-
defined type with universal integer
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: S dot Sangwine at IEEE dot org
GCC build triplet: gcc version 4.2.0 20060429 (experimental)
GCC host triplet: powerpc-apple-darwin8.6.0
GCC target triplet: powerpc-apple-darwin8.6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28835