From: drh Date: Sun, 1 Jul 2007 21:18:40 +0000 (+0000) Subject: Remove an unnecessary temporary variable for clarity of presentation in X-Git-Tag: version-3.4.1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12e8dcfbf6e1a68765176eb816bf7152420291d6;p=thirdparty%2Fsqlite.git Remove an unnecessary temporary variable for clarity of presentation in 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 --- diff --git a/manifest b/manifest index f397f06c11..3b079d1bee 100644 --- 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 diff --git a/manifest.uuid b/manifest.uuid index c1f24154f0..1302818867 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -cc2105176563c352a6dccef89a429a76b6f3adf5 \ No newline at end of file +35ae398bd37e4abbe362b0b780fc51153145b43d \ No newline at end of file diff --git a/src/vdbe.c b/src/vdbe.c index a090b22eba..7efc80365f 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -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; ju.i; + aRoot[j] = pTos[-j].u.i; } aRoot[j] = 0; popStack(&pTos, nRoot);