This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/18665] -ftrapv borks up simple integer arithmetic
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Nov 2004 00:22:51 -0000
- Subject: [Bug target/18665] -ftrapv borks up simple integer arithmetic
- References: <20041124222749.18665.skunk@iskunk.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From steven at gcc dot gnu dot org 2004-11-28 00:22 -------
Much simpler test case:
$ cat t.c
extern int printf (__const char *__restrict __format, ...);
int __attribute__ ((__noinline__))
foo (int a, int b)
{
return a - b;
}
int
main (void)
{
printf ("%d\n", foo (2,3));
return 0;
}
$ ../xgcc -B.. t.c
$ ./a.out
-1
$ ../xgcc -B.. t.c -ftrapv
$ ./a.out
1073748906
$
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18665