This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/32575] GCC 4.2.0 with -ftree-vrp miscompiles a single line of code in SQLite
- From: "drh at sqlite dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jul 2007 11:43:35 -0000
- Subject: [Bug c/32575] GCC 4.2.0 with -ftree-vrp miscompiles a single line of code in SQLite
- References: <bug-32575-14787@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from drh at sqlite dot org 2007-07-22 11:43 -------
Follow-up comments to the original bug report in SQLite
(see the link shown above) report that the same problem
exists in GCC 4.2.1. A work-around for SQLite was
devised, which was to change a single line of code:
- aRoot[j] = pTos[-j].u.i;
+ aRoot[j] = (pTos-j)->u.i;
There are many other places in the SQLite code that
have similar constructs, but this one instance seems
to be the only one that gives GCC trouble.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32575