From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19086 invoked by alias); 25 Jul 2014 07:42:06 -0000 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 Received: (qmail 18992 invoked by uid 48); 25 Jul 2014 07:42:03 -0000 From: "zeccav at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/61902] New: signed integer overflow in real.c in real_from_integer Date: Fri, 25 Jul 2014 07:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: zeccav at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-07/txt/msg01655.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61902 Bug ID: 61902 Summary: signed integer overflow in real.c in real_from_integer Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com Running sanitized cc1 on testsuite files fp-int-convert-float80-timode.c and fp-int-convert-timode.c and fp-int-convert-float128-timode.c I get the following "../../gcc-4.9.1/gcc/real.c:2136:15: runtime error: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type 'long int' The instruction at real.c:2136 is "high += 1;" It seems high==LONG_MIN on x86-64.