public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/32575]  New: GCC 4.3.0 with -ftree-vrp miscompiles a single line of code in SQLite
@ 2007-07-01 22:07 drh at sqlite dot org
  2007-07-01 22:16 ` [Bug tree-optimization/32575] " pinskia at gcc dot gnu dot org
                   ` (23 more replies)
  0 siblings, 24 replies; 27+ messages in thread
From: drh at sqlite dot org @ 2007-07-01 22:07 UTC (permalink / raw)
  To: gcc-bugs

A bug reported against SQLite appears to be a case of GCC 4.3.0
miscompiling a single line of code within SQLite.  The problem only
appears with -O2 or -Os.  The problem goes away if we add the
-fno-tree-vrp option.  The original bug report can be found at

   http://www.sqlite.org/cvstrac/tktview?tn=2469

The line of code that is miscompiled is found in the source file
named vdbe.c (version 1.635) on line 4309.

  4308  for(j=0; j<nRoot; j++){
  4309    aRoot[j] = pTos[-j].u.i;
  4310  }
  4311  aRoot[j] = 0;

By setting a breakpoint on line 4311 and examining the values
of aRoot[] one finds that all nRoot entries of aRoot[] are being
filled from pTos[0].u.i instead of being filled from pTos[0].u.i,
pTos[-1].u.i, pTos[-2].u.i, and so forth as the loop intends.

I will be happy to supply any additional debugging information
that might help in fixing this problem (such as vdbe.s files 
compiled both with and without -fno-tree-vrp).  I regret that 
I have so far been unable to replicate this problem in a small 
test program.


-- 
           Summary: GCC 4.3.0 with -ftree-vrp miscompiles a single line of
                    code in SQLite
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drh at sqlite dot org


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


^ permalink raw reply	[flat|nested] 27+ messages in thread
[parent not found: <bug-32575-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2014-02-16 13:12 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-01 22:07 [Bug c/32575] New: GCC 4.3.0 with -ftree-vrp miscompiles a single line of code in SQLite drh at sqlite dot org
2007-07-01 22:16 ` [Bug tree-optimization/32575] " pinskia at gcc dot gnu dot org
2007-07-01 22:52 ` [Bug c/32575] " drh at sqlite dot org
2007-07-01 23:01 ` [Bug c/32575] GCC 4.2.0 " pinskia at gcc dot gnu dot org
2007-07-22 11:43 ` drh at sqlite dot org
2007-08-28 14:55 ` [Bug c/32575] [4.2/4.3 regression] With " jakub at gcc dot gnu dot org
2007-08-28 15:16 ` jakub at gcc dot gnu dot org
2007-08-28 15:58 ` jakub at gcc dot gnu dot org
2007-09-05 11:50   ` Daniel Berlin
2007-08-30 21:19 ` [Bug middle-end/32575] " pinskia at gcc dot gnu dot org
2007-09-05  0:56 ` mmitchel at gcc dot gnu dot org
2007-09-05 11:51 ` dberlin at dberlin dot org
2007-09-07 14:14 ` rguenth at gcc dot gnu dot org
2007-09-10 18:39 ` [Bug tree-optimization/32575] " jakub at gcc dot gnu dot org
2007-10-09 19:30 ` mmitchel at gcc dot gnu dot org
2007-11-01 14:03 ` nickc at redhat dot com
2007-11-01 14:06 ` nickc at redhat dot com
2007-11-01 14:34 ` jakub at gcc dot gnu dot org
2007-11-01 14:57 ` nickc at redhat dot com
2007-11-01 15:05 ` rguenth at gcc dot gnu dot org
2007-11-08 12:54 ` jakub at gcc dot gnu dot org
2007-11-08 13:08 ` jakub at gcc dot gnu dot org
2007-11-08 13:12 ` [Bug tree-optimization/32575] [4.2 " jakub at gcc dot gnu dot org
2008-02-01 17:05 ` jsm28 at gcc dot gnu dot org
2008-05-19 20:30 ` jsm28 at gcc dot gnu dot org
2009-03-30 22:11 ` jsm28 at gcc dot gnu dot org
     [not found] <bug-32575-4@http.gcc.gnu.org/bugzilla/>
2014-02-16 13:12 ` jackie.rosen at hushmail dot com

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