[Bug c/15526] New: -ftrapv aborts on 0 * (-1)
schnetter at aei dot mpg dot de
gcc-bugzilla@gcc.gnu.org
Wed May 19 13:01:00 GMT 2004
My version of gcc
$ ~/gcc/bin/gcc --version
gcc (GCC) 3.5.0 20040517 (experimental)
produces code that aborts when it encounters the expression "0 * (-1)" when
compiled with -ftrapv. The failing programme is
int test (int a)
{
return a * (a-1);
}
int main (int argc, char ** argv)
{
test (0);
return 0;
}
which I compile with
$ ~/gcc/bin/gcc -o mul-trapv mul-trapv.c -ftrapv
--
Summary: -ftrapv aborts on 0 * (-1)
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schnetter at aei dot mpg dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15526
More information about the Gcc-bugs
mailing list