public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "simon at pushface dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/61466] New: Array index check optimized away Date: Tue, 10 Jun 2014 20:11:00 -0000 [thread overview] Message-ID: <bug-61466-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61466 Bug ID: 61466 Summary: Array index check optimized away Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: simon at pushface dot org Created attachment 32916 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32916&action=edit Source code (package spec/body, main procedure) In the attached code, the index check in procedure Violate on the “Output: out Arr” parameter is present with -O0 but is omitted with higher levels. This is clearly visible with -gnatG: -O0: L_1 : for j in input'first .. input'last loop B_2 : declare [constraint_error when not (integer(j) in modifier'first .. modifier'last) "index check failed"] product : constant integer := modifier (j); begin [constraint_error when not (integer(j) in output'first .. output'last) "index check failed"] output (j) := product / 2; end B_2; end loop L_1; -O1: L_1 : for j in input'first .. input'last loop B_2 : declare [constraint_error when not (integer(j) in modifier'first .. modifier'last) "index check failed"] product : constant integer := modifier (j); begin output (j) := product / 2; end B_2; end loop L_1; The bug is present at least in GCC 4.6 on Debian and GCC 4.7 .. 4.9 on Mac OS X, also in GNAT GPL 2012 .. 2014. >From gcc-bugs-return-453637-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 10 20:18:54 2014 Return-Path: <gcc-bugs-return-453637-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 17094 invoked by alias); 10 Jun 2014 20:18:53 -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 17056 invoked by uid 48); 10 Jun 2014 20:18:48 -0000 From: "simon at pushface dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/61027] gnatcmd gets SIGABRT during exception handling Date: Tue, 10 Jun 2014 20:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simon at pushface dot org 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: Message-ID: <bug-61027-4-YQTZNWKzSh@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-61027-4@http.gcc.gnu.org/bugzilla/> References: <bug-61027-4@http.gcc.gnu.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-06/txt/msg00719.txt.bz2 Content-length: 282 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61027 --- Comment #1 from simon at pushface dot org --- Same problem with “gnatchop -h” (which, in this case, exits via an exception): [...] exception when Types.Terminate_Program => null; end Gnatchop; >From gcc-bugs-return-453638-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 10 21:15:39 2014 Return-Path: <gcc-bugs-return-453638-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 20887 invoked by alias); 10 Jun 2014 21:15:38 -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 20825 invoked by uid 48); 10 Jun 2014 21:15:33 -0000 From: "fdumont at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/29988] More stl_tree.h enhancements: improving operatorDate: Tue, 10 Jun 2014 21:15:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: fdumont at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: fdumont at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.10.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc assigned_to target_milestone Message-ID: <bug-29988-4-X2yFVNvWmZ@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-29988-4@http.gcc.gnu.org/bugzilla/> References: <bug-29988-4@http.gcc.gnu.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-06/txt/msg00720.txt.bz2 Content-length: 687 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29988 François Dumont <fdumont at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fdumont at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |fdumont at gcc dot gnu.org Target Milestone|--- |4.10.0 --- Comment #1 from François Dumont <fdumont at gcc dot gnu.org> --- I am working on a patch to reuse nodes. Not only for the copy assignment but also for C++11 move assignment and assignment from initialization list. >From gcc-bugs-return-453639-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 10 23:19:51 2014 Return-Path: <gcc-bugs-return-453639-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 29587 invoked by alias); 10 Jun 2014 23:19:50 -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 29536 invoked by uid 48); 10 Jun 2014 23:19:45 -0000 From: "P at draigBrady dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/53131] -Wlogical-op: ready for prime time in -Wall ? Date: Tue, 10 Jun 2014 23:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: minor X-Bugzilla-Who: P at draigBrady 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_status resolution Message-ID: <bug-53131-4-wPJPJkSqAw@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-53131-4@http.gcc.gnu.org/bugzilla/> References: <bug-53131-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: 2014-06/txt/msg00721.txt.bz2 Content-length: 470 https://gcc.gnu.org/bugzilla/show_bug.cgi?idS131 Bug 53131 depends on bug 43772, which changed state. Bug 43772 Summary: Errant -Wlogical-op warning when testing limits https://gcc.gnu.org/bugzilla/show_bug.cgi?idC772 What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
next reply other threads:[~2014-06-10 20:11 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-06-10 20:11 simon at pushface dot org [this message] 2015-01-09 7:04 ` [Bug ada/61466] " simon at pushface dot org 2015-01-09 12:16 ` [Bug ada/61466] array index check optimized away with optimization ebotcazou at gcc dot gnu.org 2015-02-05 11:41 ` ebotcazou 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-61466-4@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).