]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove an unnecessary temporary variable for clarity of presentation in
authordrh <drh@noemail.net>
Sun, 1 Jul 2007 21:18:40 +0000 (21:18 +0000)
committerdrh <drh@noemail.net>
Sun, 1 Jul 2007 21:18:40 +0000 (21:18 +0000)
a loop that GCC 4.2.0 is miscompiling.  Ticket #2469.  GCC 4.2.0 miscompiles
this loop regardless of whether or not the temporary variable is used, but
by removing the variable, we hope to make it easier to explain the problem
to GCC maintainers.  The error only appears if -ftree-vrp is used (which
is turned on by -O2). (CVS 4150)

FossilOrigin-Name: 35ae398bd37e4abbe362b0b780fc51153145b43d

manifest
manifest.uuid
src/vdbe.c

index f397f06c11622d59acd1f4b13982c68299053e53..3b079d1bee8be35ae9a4882042b0f6a5bc6a6699 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Change\sOS/2\sversion\sof\ssqlite3Os2FullPathname()\sfor\scross-compiler\scompatibility:\n-\sallocate\szBuff\son\sdemand\s(restricted\sstack\sspace\son\sold\scompilers)\n-\s2\sbytes\sin\szDrive\sin\sinclude\s'\\0'\n-\spass\sdrive\snumber\sto\sDosQueryCurrentDir()\sinstead\sof\s0\sto\smake\sEMX\swork\n-\szFull\sdoes\snot\sneed\sto\sbe\spreallocated\s(CVS\s4149)
-D 2007-07-01T15:41:03
+C Remove\san\sunnecessary\stemporary\svariable\sfor\sclarity\sof\spresentation\sin\na\sloop\sthat\sGCC\s4.2.0\sis\smiscompiling.\s\sTicket\s#2469.\s\sGCC\s4.2.0\smiscompiles\nthis\sloop\sregardless\sof\swhether\sor\snot\sthe\stemporary\svariable\sis\sused,\sbut\nby\sremoving\sthe\svariable,\swe\shope\sto\smake\sit\seasier\sto\sexplain\sthe\sproblem\nto\sGCC\smaintainers.\s\sThe\serror\sonly\sappears\sif\s-ftree-vrp\sis\sused\s(which\nis\sturned\son\sby\s-O2).\s(CVS\s4150)
+D 2007-07-01T21:18:40
 F Makefile.in 0c0e53720f658c7a551046442dd7afba0b72bfbe
 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -138,7 +138,7 @@ F src/update.c 6b10becb6235ea314ed245fbfbf8b38755e3166e
 F src/utf.c 01b2aba02b10d12903e9e1ff897215c9faf6b662
 F src/util.c 9e81d417fc60bd2fe156f8f2317aa4845bc6cc90
 F src/vacuum.c 8bd895d29e7074e78d4e80f948e35ddc9cf2beef
-F src/vdbe.c 32f39e9cab8a6ef64ad392711396d65ae89fc790
+F src/vdbe.c a96ce3799f037b8f4e185a01823072320fd9ccb3
 F src/vdbe.h 001c5b257567c1d3de7feb2203aac71d0d7b16a3
 F src/vdbeInt.h c3514903cad9e36d6b3242be20261351d09db56c
 F src/vdbeapi.c 7930b9a188ab385287ca3eb3840af7225cb43549
@@ -517,7 +517,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 6432bbe1c1db1d31bd0057d99a9d6b6a428d8ffc
-R 2986768553c0040e902823ab3782ee13
-U pweilbacher
-Z f8445765174dacd892cb83b5501c5290
+P cc2105176563c352a6dccef89a429a76b6f3adf5
+R 5ab68d3d21b1ac3447f261afad19b81e
+U drh
+Z cc964195494be17bba33eb2f44687e4f
index c1f24154f0107bdcff8583f2e910dab1b8958dda..13028188677d5ba0cb9879238244024f13df0871 100644 (file)
@@ -1 +1 @@
-cc2105176563c352a6dccef89a429a76b6f3adf5
\ No newline at end of file
+35ae398bd37e4abbe362b0b780fc51153145b43d
\ No newline at end of file
index a090b22eba56a506760e30f2c4c5048e2973d7a2..7efc80365f6a5d5112cd1396d0579f2dfa497fa3 100644 (file)
@@ -43,7 +43,7 @@
 ** in this file for details.  If in doubt, do not deviate from existing
 ** commenting and indentation practices when changing or adding code.
 **
-** $Id: vdbe.c,v 1.635 2007/06/27 15:53:35 danielk1977 Exp $
+** $Id: vdbe.c,v 1.636 2007/07/01 21:18:40 drh Exp $
 */
 #include "sqliteInt.h"
 #include "os.h"
@@ -4306,8 +4306,7 @@ case OP_IntegrityCk: {
   pnErr = &p->aMem[j];
   assert( (pnErr->flags & MEM_Int)!=0 );
   for(j=0; j<nRoot; j++){
-    Mem *pMem = &pTos[-j];
-    aRoot[j] = pMem->u.i;
+    aRoot[j] = pTos[-j].u.i;
   }
   aRoot[j] = 0;
   popStack(&pTos, nRoot);