This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: strange test failures


On 9 December 2016 at 05:17, Martin Sebor <msebor@gmail.com> wrote:
> I'm seeing failures in a few C tests that I'm not sure what to make
> out of.  The tests fail due to undefined symbols while linking even
> though they're not meant to link.  Among these are a number (but not
> all) of the gcc.dg/divmod-[1-6]{-simode}.c tests.
>
>   FAIL: gcc.dg/divmod-1.c (test for excess errors)
>
> The log shows that they are being built without the -S option:
Oops, I somehow missed adding dg-do compile to the divmod test-cases.
Sorry about that. The attached patch explicitly adds dg-do compile to
the test-cases.
I wonder though how I didn't see these failures. Is compile the default ?
Anyway I suppose explicitly marking the tests to be compile-only is better.
Is the attached patch OK to commit ?

PS: In ChangeLog, is it acceptable to use regex ?
for eg:
testsuite/
    * gcc.dg/divmod-*.c: Add dg-do compile.
instead of listing each divmod test-case explicitly.

Thanks,
Prathamesh
>
> spawn -ignore SIGHUP /opt/notnfs/msebor/build/gcc-78622/gcc/xgcc
> -B/opt/notnfs/msebor/build/gcc-78622/gcc/
> /opt/notnfs/msebor/src/gcc/gcc-78622/gcc/testsuite/gcc.dg/divmod-1.c
> -fno-diagnostics-show-caret -fdiagnostics-color=never -O2
> -fdump-tree-widening_mul-details -lm -o ./divmod-1.exe
> /lib/../lib64/crt1.o: In function `_start':
> (.text+0x20): undefined reference to `main'
> ...
>
> When I run make check-c I get these same failures in different tests.
>
> In successful builds the logs show that the tests are only assembled
> (i.e., compiled with -S), never linked.
>
> I can reproduce this on two different x86_64 machines but so far
> only with my patches to GCC (the middle end but none of these tests
> or the GCC .exp files).  Is it possible that somehow my changes cause
> this?  (The removal of the -S option.)  Am I missing something about
> how GCC tests are run?
>
> Thanks
> Martin
>
> PS I also see other strange errors like
>
> RROR: tcl error sourcing
> /opt/notnfs/msebor/src/gcc/gcc-78622/gcc/testsuite/gcc.c-torture/execute/execute.exp.
> ERROR: unmatched open brace in list
>
> ERROR: tcl error sourcing
> /opt/notnfs/msebor/src/gcc/gcc-78622/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp.
> ERROR: torture-init: torture_without_loops is not empty as expected

Attachment: divmod-tests.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]