Getting spurious FAILS in testsuite?
Hi, when I am running the gcc testsuite in $builddir/gcc then $ make check-gcc RUNTESTFLAGS='ubsan.exp' comes up with spurious fails. Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/gcc.dg/ubsan/ubsan.exp ... FAIL: c-c++-common/ubsan/float-cast-overflow-8.c -O2 output pattern test FAIL: c-c++-common/ubsan/overflow-mul-4.c -O0 output pattern test ... when I am running the 1st test alone, then it works: $ make check-gcc RUNTESTFLAGS='ubsan.exp=float-cast-overflow-8.c' In an older log file I found for a different test from the same folder: /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h:149:1: runtime error: value is outside the range of representable values of type 'unsigned int' /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h:149:1: runtime error: value is outside the range of representable values of type 'long int' /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h:149:1: runtime error: PASS: c-c++-common/ubsan BANG: "PASS" output from previous test run shreds this one? /float-cast-overflow-10.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test FAIL: c-c++-common/ubsan/float-cast-overflow-10.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects output pattern test Output was: c-c++-common/ubsan/float-cast-overflow-7.h:147:1: runtime error: value is outside the range of representable values of type 'signed char' ... c-c++-common/ubsan/float-cast-overflow-7.h:149:1: runtime error: Should match: The last output line stops after "runtime error: ", i.e. at the place where the "PASS" appears. Any ideas? Johann
Re: Getting spurious FAILS in testsuite?
On 01.06.2017 14:59, Georg-Johann Lay wrote: Hi, when I am running the gcc testsuite in $builddir/gcc then FYI, I found the following thread which reports a similar problem, but without and solution :-( CC'ing Diego, maybe he remembers the solution from back then... https://gcc.gnu.org/ml/libstdc++/2011-03/msg00083.html $ make check-gcc RUNTESTFLAGS='ubsan.exp' comes up with spurious fails. Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/gcc.dg/ubsan/ubsan.exp ... FAIL: c-c++-common/ubsan/float-cast-overflow-8.c -O2 output pattern test FAIL: c-c++-common/ubsan/overflow-mul-4.c -O0 output pattern test ... when I am running the 1st test alone, then it works: $ make check-gcc RUNTESTFLAGS='ubsan.exp=float-cast-overflow-8.c' In an older log file I found for a different test from the same folder: /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h:149:1: runtime error: value is outside the range of representable values of type 'unsigned int' /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h:149:1: runtime error: value is outside the range of representable values of type 'long int' /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h:149:1: runtime error: PASS: c-c++-common/ubsan BANG: "PASS" output from previous test run shreds this one? /float-cast-overflow-10.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test FAIL: c-c++-common/ubsan/float-cast-overflow-10.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects output pattern test Output was: c-c++-common/ubsan/float-cast-overflow-7.h:147:1: runtime error: value is outside the range of representable values of type 'signed char' ... c-c++-common/ubsan/float-cast-overflow-7.h:149:1: runtime error: Should match: The last output line stops after "runtime error: ", i.e. at the place where the "PASS" appears. Any ideas? Johann
Re: Getting spurious FAILS in testsuite?
On Thu, Jun 01, 2017 at 02:59:37PM +0200, Georg-Johann Lay wrote: > Hi, when I am running the gcc testsuite in $builddir/gcc then > > $ make check-gcc RUNTESTFLAGS='ubsan.exp' > > comes up with spurious fails. > > Running target unix > Using /usr/share/dejagnu/baseboards/unix.exp as board description file for > target. > Using /usr/share/dejagnu/config/unix.exp as generic interface file for > target. > Using /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/config/default.exp as > tool-and-target-specific interface file. > Running > /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/gcc.dg/ubsan/ubsan.exp ... > FAIL: c-c++-common/ubsan/float-cast-overflow-8.c -O2 output pattern test > FAIL: c-c++-common/ubsan/overflow-mul-4.c -O0 output pattern test > > ... > > when I am running the 1st test alone, then it works: > > $ make check-gcc RUNTESTFLAGS='ubsan.exp=float-cast-overflow-8.c' > > In an older log file I found for a different test from the same folder: > > /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h:149:1: > runtime error: value is outside the range of representable values > of type 'unsigned int' > /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h:149:1: > runtime error: value is outside the range of representable values > of type 'long int' > /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h:149:1: > runtime error: PASS: c-c++-common/ubsan > > BANG: "PASS" output from previous test run shreds this one? > > /float-cast-overflow-10.c -O2 -flto -fuse-linker-plugin > -fno-fat-lto-objects execution test > FAIL: c-c++-common/ubsan/float-cast-overflow-10.c -O2 -flto > -fuse-linker-plugin -fno-fat-lto-objects output pattern test > Output was: > c-c++-common/ubsan/float-cast-overflow-7.h:147:1: runtime error: value > is outside the range of representable values of type 'signed char' > ... > c-c++-common/ubsan/float-cast-overflow-7.h:149:1: runtime error: > Should match: > > The last output line stops after "runtime error: ", i.e. at the place > where the "PASS" appears. > > Any ideas? Does this help? diff --git gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-8.c gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-8.c index 4adb22a..746fe20 100644 --- gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-8.c +++ gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-8.c @@ -140,4 +140,4 @@ main () /* { dg-output "\[^\n\r]*value \[0-9.e+-]* is outside the range of representable values of type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */ /* { dg-output "\[^\n\r]*value -1 is outside the range of representable values of type 'long long unsigned int'\[^\n\r]*(\n|\r\n|\r)" } */ /* { dg-output "\[^\n\r]*value \[0-9.e+-]* is outside the range of representable values of type '__int128'\[^\n\r]*(\n|\r\n|\r)" { target { int128 } } } */ -/* { dg-output "\[^\n\r]*value -1 is outside the range of representable values of type '__int128 unsigned'\[^\n\r]*(\n|\r\n|\r)" { target { int128 } } } */ +/* { dg-output "\[^\n\r]*value -1 is outside the range of representable values of type '__int128 unsigned'" { target { int128 } } } */ Marek
Problem with "" vs <> headers and fixincludes
This is a reproducer for a problem we have with fixincludes on vxworks6.6. The desired output is FOO= 1 The problem is the rules for handling headers enclosed in quotes can cause gcc to #include the original header not the patched header. It seems like a problem that could theoretically occur on any target, so what is the solution (other than copying each and every header into include-fixed)? --Douglas Rupp AdaCore === test1.c: - #include #include void main () { printf ("FOO= %d\n", FOO); } Header subdirs: h/foo.h: #include "arch/x86.h" h/arch/x86.h #define FOO 0 include-fixed/h/ include-fixed/h/arch/x86.h #define FOO 1 Execution -- $ gcc -c -Iinclude-fixed/h -Ih test1.c $ gcc -o test1 test1.o $ ./test1 FOO= 0
Re: Getting spurious FAILS in testsuite?
On 01.06.2017 16:16, Marek Polacek wrote: On Thu, Jun 01, 2017 at 02:59:37PM +0200, Georg-Johann Lay wrote: Hi, when I am running the gcc testsuite in $builddir/gcc then $ make check-gcc RUNTESTFLAGS='ubsan.exp' comes up with spurious fails. Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/gcc.dg/ubsan/ubsan.exp ... FAIL: c-c++-common/ubsan/float-cast-overflow-8.c -O2 output pattern test FAIL: c-c++-common/ubsan/overflow-mul-4.c -O0 output pattern test ... when I am running the 1st test alone, then it works: $ make check-gcc RUNTESTFLAGS='ubsan.exp=float-cast-overflow-8.c' In an older log file I found for a different test from the same folder: /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h:149:1: runtime error: value is outside the range of representable values of type 'unsigned int' /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h:149:1: runtime error: value is outside the range of representable values of type 'long int' /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h:149:1: runtime error: PASS: c-c++-common/ubsan BANG: "PASS" output from previous test run shreds this one? /float-cast-overflow-10.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test FAIL: c-c++-common/ubsan/float-cast-overflow-10.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects output pattern test Output was: c-c++-common/ubsan/float-cast-overflow-7.h:147:1: runtime error: value is outside the range of representable values of type 'signed char' ... c-c++-common/ubsan/float-cast-overflow-7.h:149:1: runtime error: Should match: The last output line stops after "runtime error: ", i.e. at the place where the "PASS" appears. Any ideas? Does this help? diff --git gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-8.c gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-8.c index 4adb22a..746fe20 100644 --- gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-8.c +++ gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-8.c @@ -140,4 +140,4 @@ main () /* { dg-output "\[^\n\r]*value \[0-9.e+-]* is outside the range of representable values of type 'long long int'\[^\n\r]*(\n|\r\n|\r)" } */ /* { dg-output "\[^\n\r]*value -1 is outside the range of representable values of type 'long long unsigned int'\[^\n\r]*(\n|\r\n|\r)" } */ /* { dg-output "\[^\n\r]*value \[0-9.e+-]* is outside the range of representable values of type '__int128'\[^\n\r]*(\n|\r\n|\r)" { target { int128 } } } */ -/* { dg-output "\[^\n\r]*value -1 is outside the range of representable values of type '__int128 unsigned'\[^\n\r]*(\n|\r\n|\r)" { target { int128 } } } */ +/* { dg-output "\[^\n\r]*value -1 is outside the range of representable values of type '__int128 unsigned'" { target { int128 } } } */ Marek No, still switching back and forth (for a different set of options this time): $ make check-gcc RUNTESTFLAGS='-all ubsan.exp=float-cast-overflow-8.c' ... PASS: c-c++-common/ubsan/float-cast-overflow-8.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects output pattern test $ make check-gcc RUNTESTFLAGS='-all ubsan.exp=float-cast-overflow-8.c' ... FAIL: c-c++-common/ubsan/float-cast-overflow-8.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects output pattern test In the last case, gcc.log reads (notice the "testsuiPASS" and the "trunk/gcc/testsui" at the end): /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h:95:1: runtime error: val/home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuite/c-c++-common/ubsan/float-cast-overflow-7.h:95:1: runtime error: value -1 is outside the range of representable values of type 'short unsigned int' /home/georg/gnu/gcc.gnu.org/trunk/gcc/testsuiPASS: c-c++-common/ubsan/float-cast-overflow-8.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test FAIL: c-c++-common/ubsan/float-cast-overflow-8.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects output pattern test Output was: c-c++-common/ubsan/float-cast-overflow-7.h:93:1: runtime error: value -129 is outside the range of representable values of type 'signed char' ... c-c++-common/ubsan/float-cast-overflow-7.h:95:1: runtime error: value -32769 is outside the range of representable values of type 'short int' c-c++-common/ubsan/float-cast-overflow-7.h:95:1: runtime error: value -1 is outside the range of representable values of type 'short unsigned int' trunk/gcc/testsui Should match:
Re: Getting spurious FAILS in testsuite?
On Thu, Jun 1, 2017 at 10:10 AM, Georg-Johann Lay wrote: > FYI, I found the following thread which reports a similar problem, > but without and solution :-( > > CC'ing Diego, maybe he remembers the solution from back then... > > https://gcc.gnu.org/ml/libstdc++/2011-03/msg00083.html Oh, wow. No, sorry. I would have to do some serious archaeology to even remember what problem I was having. Diego.
gcc-7-20170601 is now available
Snapshot gcc-7-20170601 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/7-20170601/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 7 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-7-branch revision 248805 You'll find: gcc-7-20170601.tar.xzComplete GCC SHA256=2286d2e1731c220506ca59f77d65ad73ea158548dd43bb06bde6044b6a93343b SHA1=76eaef5b38c21d695eec73eb49628b401021b43d Diffs from 7-20170525 are available in the diffs/ subdirectory. When a particular snapshot is ready for public consumption the LATEST-7 link is updated and a message is sent to the gcc list. Please do not use a snapshot before it has been announced that way.