public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/61346] New: VRP chooses bad bounds for variable
@ 2014-05-28 22:09 ian at airs dot com
  2014-05-28 22:10 ` [Bug tree-optimization/61346] " ian at airs dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ian at airs dot com @ 2014-05-28 22:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61346

            Bug ID: 61346
           Summary: VRP chooses bad bounds for variable
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ian at airs dot com
                CC: cmang at google dot com

The attached file, which is a Go test case converted to C code, should compile
and run without error.  It works with GCC 4.6.3 and GCC 4.9 branch with and
without optimization.  It works with mainline with -O0 and -O1.  It fails with
mainline with -O2.

I think the problem is in the VRP pass.  I see this in 067.vrp1:

i_3: [data$len_58, 9223372036854775806]  EQUIVALENCES: { i_65 } (1 elements)

This is flat out wrong, as inspection of 066.mergephi2 shows that the ideally
correct range of i_3 should be something like [0, data$len_58].  What's
particularly odd is that i_3 is even set to i_1, and the range of i_1 is
VARYING.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-06-02  8:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-28 22:09 [Bug tree-optimization/61346] New: VRP chooses bad bounds for variable ian at airs dot com
2014-05-28 22:10 ` [Bug tree-optimization/61346] " ian at airs dot com
2014-05-28 22:12 ` pinskia at gcc dot gnu.org
2014-05-28 22:16 ` ian at airs dot com
2014-05-28 22:17 ` ian at airs dot com
2014-05-28 22:25 ` ian at airs dot com
2014-06-02  8:08 ` rguenth at gcc dot gnu.org

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).