public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/31227] [4.3 Regression] -Warray-bounds doesn't play together with loop optimizations
Date: Fri, 16 Mar 2007 21:45:00 -0000	[thread overview]
Message-ID: <20070316214523.29780.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31227-87@http.gcc.gnu.org/bugzilla/>



------- Comment #2 from rguenth at gcc dot gnu dot org  2007-03-16 21:45 -------
  # cnt_67 = PHI <27(13)>
<L22>:;
  D.1796_118 = &time_14(D)->mon[27];
  ivtmp.56_8 = (unsigned int) D.1796_118;
  D.1797_117 = &iov[27];
  ivtmp.59_7 = (unsigned int) D.1797_117;

  # ivtmp.59_76 = PHI <ivtmp.59_112(17), ivtmp.59_7(14)>
  # ivtmp.56_62 = PHI <ivtmp.56_61(17), ivtmp.56_8(14)>
  # cnt_105 = PHI <cnt_60(17), 27(14)>
<L18>:;
  D.1671_51 = MEM[index: ivtmp.56_62, offset: 0x0ffffff98];
  if (D.1671_51 != 0B) goto <L19>; else goto <L21>;

The proper way to warn about &time_14(D)->mon[27] (even if it's invalid C
and arguably invalid IL) is to look at the possible dereference sites.

Of course a MEM without base but using (unsigned int)&time_14(D)->mon[27]
as index and a negative offset doesn't make this easy.

This looks related to PR26726.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rakdver at gcc dot gnu dot
                   |                            |org
  BugsThisDependsOn|                            |26726
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-03-16 21:45:23
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31227


  parent reply	other threads:[~2007-03-16 21:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-16 18:14 [Bug tree-optimization/31227] New: " jakub at gcc dot gnu dot org
2007-03-16 19:17 ` [Bug tree-optimization/31227] " jakub at gcc dot gnu dot org
2007-03-16 21:45 ` rguenth at gcc dot gnu dot org [this message]
2007-03-16 21:47 ` pinskia at gcc dot gnu dot org
2007-03-21  9:05 ` mueller at gcc dot gnu dot org
2007-03-21 14:16 ` mueller at gcc dot gnu dot org
2007-03-21 14:17 ` mueller at gcc dot gnu dot org
2007-03-21 14:53 ` jakub at gcc dot gnu dot org
2007-04-18 20:09 ` mueller at gcc dot gnu dot org
2007-04-18 20:10 ` mueller 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=20070316214523.29780.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: link
Be 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).