From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25271 invoked by alias); 14 Apr 2009 19:38:59 -0000 Received: (qmail 25227 invoked by uid 48); 14 Apr 2009 19:38:44 -0000 Date: Tue, 14 Apr 2009 19:38:00 -0000 Subject: [Bug middle-end/39771] New: ftrapv does not work X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jv244 at cam dot ac dot uk" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-04/txt/msg01225.txt.bz2 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) -- Summary: ftrapv does not work Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jv244 at cam dot ac dot uk GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39771