public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jamborm at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/37861] Bogus array bounds warning Date: Fri, 31 Oct 2008 17:54:00 -0000 [thread overview] Message-ID: <20081031175257.23671.qmail@sourceware.org> (raw) In-Reply-To: <bug-37861-10053@http.gcc.gnu.org/bugzilla/> ------- Comment #3 from jamborm at gcc dot gnu dot org 2008-10-31 17:52 ------- The test-case in the bug description leads to bogus warnings in the second run of the VRP pass. Yesterday me and Richi discussed the possibility of simply not-giving out any warnings in the second runs (as opposed to the first which would still generate the warnings it does). However, I have managed to modify the test case so that bogus warnings are spitted out in the first run and so this workaround would not really solve the problem: extern int printf (__const char *__restrict __format, ...); static int f3(int v) { int i,j = 0; for (i = 0; i <= v; i++) j++; return j; } static int f2(char formatstr[10][100]) { printf( "%d %s\n", 0, formatstr[f3(0)] ); printf( "%d %s\n", 1, formatstr[f3(1)] ); printf( "%d %s\n", 2, formatstr[f3(2)] ); printf( "%d %s\n", 3, formatstr[f3(3)] ); return 3; } static char formatstr[10][100]; int main( void ) { int anz; anz = f2(formatstr); printf( " %d\n",anz); return 0; } -- jamborm at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jamborm at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37861
next prev parent reply other threads:[~2008-10-31 17:54 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-10-17 8:27 [Bug middle-end/37861] New: " rguenth at gcc dot gnu dot org 2008-10-30 17:46 ` [Bug middle-end/37861] " jamborm at gcc dot gnu dot org 2008-10-30 18:45 ` manu at gcc dot gnu dot org 2008-10-31 17:54 ` jamborm at gcc dot gnu dot org [this message] 2008-10-31 18:02 ` jamborm at gcc dot gnu dot org 2008-11-04 15:52 ` jamborm at gcc dot gnu dot org 2008-11-05 9:56 ` [Bug middle-end/37861] [4.3/4.4 Regression] " rguenth at gcc dot gnu dot org 2008-11-05 16:09 ` jamborm at gcc dot gnu dot org 2008-11-05 20:51 ` [Bug middle-end/37861] [4.3 " jakub at gcc dot gnu dot org 2008-11-10 10:07 ` jamborm at gcc dot gnu dot org 2008-11-10 18:41 ` jamborm at gcc dot gnu dot org 2008-11-15 0:01 ` pinskia at gcc dot gnu dot org 2008-11-30 23:02 ` rguenth at gcc dot gnu dot org 2008-12-02 14:34 ` jamborm at gcc dot gnu dot org 2009-01-24 10:26 ` rguenth at gcc dot gnu dot org 2009-02-28 0:31 ` jamborm at gcc dot gnu dot org 2009-02-28 18:33 ` jamborm at gcc dot gnu dot org 2009-02-28 22:46 ` jamborm at gcc dot gnu dot 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=20081031175257.23671.qmail@sourceware.org \ --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).