The following program doesn't generate a trap AFAICT, even though there is a signed overflow on a multiplication CALL FOO(1000000) END SUBROUTINE FOO(a) INTEGER :: a write(6,*) a*a END SUBROUTINE FOO > gfortran -ftrapv test.f90 > ./a.out -727379968 fails for both gcc version 4.4.0 20090414 (prerelease) [gcc-4_4-branch revision 146034] (GCC) gcc version 4.5.0 20090414 (experimental) [trunk revision 146031] (GCC)
*** This bug has been marked as a duplicate of 35412 ***