public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "eggert at gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/52904] -Wstrict-overflow false alarm with bounded loop Date: Thu, 12 Dec 2013 19:34:00 -0000 [thread overview] Message-ID: <bug-52904-4-aqT6YemXdA@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-52904-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52904 --- Comment #8 from eggert at gnu dot org --- On 12/12/2013 10:19 AM, Laurent.Rineau__gcc at normalesup dot org wrote: > The developer has two solutions: > - remove that test, > - or compile with -fno-strict-overflow. Sure, and because of this problem, GNU Emacs has chosen #2, that is, Emacs doesn't use -Wstrict-overflow any more. (Removing the test would unnecessarily complicate Emacs, since the test is needed on some platforms that are conditionally compiled away in this stripped-down example.) A goal of -Wstrict-overflow, at least at the 1 level, is to not generate false alarms, so that it's generally useful in real programs. This bug report gives one example where the goal is not being met. Emacs currently has a half dozen or so such examples of this (please see below for what the current Emacs bzr trunk would output, if we enabled this warning) and I thought that the GCC developers would find it useful to see one of them. If you're not interested, that's OK too; Emacs will continue to not use -Wstrict-overflow. In file included from dispnew.c:26:0: dispnew.c: In function ‘update_window’: lisp.h:749:30: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow] return num < lower ? lower : num <= upper ? num : upper; dispnew.c: In function ‘update_frame_1’: dispnew.c:4490:19: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow] pause_p = 0 < i && i < FRAME_LINES (f) - 1; fileio.c: In function ‘Finsert_file_contents’: fileio.c:3630:11: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow] if (nread < 0) ^ fileio.c:3632:16: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow] else if (nread > 0) ^ eval.c: In function ‘backtrace_eval_unrewind’: eval.c:3496:3: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow] for (; distance > 0; distance--) ^ intervals.c: In function ‘offset_intervals’: intervals.c:1364:6: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow] if (length == TOTAL_LENGTH (tree)) ^ intervals.c:1379:9: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow] while (left_to_delete > 0) ^ >From gcc-bugs-return-437439-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Dec 12 19:41:17 2013 Return-Path: <gcc-bugs-return-437439-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 8690 invoked by alias); 12 Dec 2013 19:41:17 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 8647 invoked by uid 55); 12 Dec 2013 19:41:13 -0000 From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/59440] [4.9 Regression] ICE in force_decl_die, at dwarf2out.c:20111 with -g Date: Thu, 12 Dec 2013 19:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: burnus at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: <bug-59440-4-WvMX03k0wz@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-59440-4@http.gcc.gnu.org/bugzilla/> References: <bug-59440-4@http.gcc.gnu.org/bugzilla/> 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: 2013-12/txt/msg01094.txt.bz2 Content-length: 828 http://gcc.gnu.org/bugzilla/show_bug.cgi?idY440 --- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> --- Author: burnus Date: Thu Dec 12 19:41:11 2013 New Revision: 205939 URL: http://gcc.gnu.org/viewcvs?rev 5939&root=gcc&view=rev Log: 2013-12-12 Tobias Burnus <burnus@net-b.de> PR fortran/59440 * trans-decl.c (generate_namelist_decl): Ensure debug DIE is created by setting DECL_IGNORED_P to 0. 2013-12-12 Tobias Burnus <burnus@net-b.de> PR fortran/59440 * gfortran.dg/namelist_83.f90: New. * gfortran.dg/namelist_83_2.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/namelist_83.f90 trunk/gcc/testsuite/gfortran.dg/namelist_83_2.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-decl.c trunk/gcc/testsuite/ChangeLog
next prev parent reply other threads:[~2013-12-12 19:34 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-04-08 8:59 [Bug c/52904] New: " eggert at gnu dot org 2012-04-08 8:59 ` [Bug c/52904] " eggert at gnu dot org 2012-04-08 9:02 ` eggert at gnu dot org 2012-04-08 10:05 ` [Bug tree-optimization/52904] " pinskia at gcc dot gnu.org 2012-04-10 12:18 ` rguenth at gcc dot gnu.org 2013-12-12 17:12 ` Laurent.Rineau__gcc at normalesup dot org 2013-12-12 18:19 ` Laurent.Rineau__gcc at normalesup dot org 2013-12-12 19:34 ` eggert at gnu dot org [this message] 2014-08-08 10:21 ` kugan at gcc dot gnu.org 2014-08-08 22:16 ` kugan at gcc dot gnu.org 2014-08-18 6:29 ` kugan at gcc dot gnu.org 2021-09-14 7:09 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-52904-4-aqT6YemXdA@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).