public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* strange test failures
@ 2016-12-08 23:47 Martin Sebor
  2016-12-09  0:32 ` Jeff Law
  2016-12-10 13:52 ` Prathamesh Kulkarni
  0 siblings, 2 replies; 7+ messages in thread
From: Martin Sebor @ 2016-12-08 23:47 UTC (permalink / raw)
  To: GCC Mailing List

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:

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: strange test failures
  2016-12-08 23:47 strange test failures Martin Sebor
@ 2016-12-09  0:32 ` Jeff Law
  2016-12-09 21:35   ` Martin Sebor
  2016-12-10 13:52 ` Prathamesh Kulkarni
  1 sibling, 1 reply; 7+ messages in thread
From: Jeff Law @ 2016-12-09  0:32 UTC (permalink / raw)
  To: Martin Sebor, GCC Mailing List

On 12/08/2016 04:47 PM, Martin Sebor 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:
>
> 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?
IIRC the default for a dg test is to compile, but not assemble or run. 
The log shows that it's trying to go through the link step.



>
> 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
This all sounds like you've got a mucked up testsuite/lib directory or 
something like that.  I'd start by verifying the contents of your 
testsuite/lib directory.

I did a testrun on Dec 7 on the trunk and didn't see any of these problems.

jeff

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: strange test failures
  2016-12-09  0:32 ` Jeff Law
@ 2016-12-09 21:35   ` Martin Sebor
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Sebor @ 2016-12-09 21:35 UTC (permalink / raw)
  To: Jeff Law, GCC Mailing List

On 12/08/2016 05:32 PM, Jeff Law wrote:
> On 12/08/2016 04:47 PM, Martin Sebor 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:
>>
>> 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?
> IIRC the default for a dg test is to compile, but not assemble or run.
> The log shows that it's trying to go through the link step.
>
>
>
>>
>> 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
> This all sounds like you've got a mucked up testsuite/lib directory or
> something like that.  I'd start by verifying the contents of your
> testsuite/lib directory.
>
> I did a testrun on Dec 7 on the trunk and didn't see any of these problems.

I've confirmed by recreating the tree and re-running bootstrap
and the C tests (make check-c) that it's the patch that's causing
it.  I just don't know yet how it's possible.

Martin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: strange test failures
  2016-12-08 23:47 strange test failures Martin Sebor
  2016-12-09  0:32 ` Jeff Law
@ 2016-12-10 13:52 ` Prathamesh Kulkarni
  2016-12-10 18:04   ` Martin Sebor
  2016-12-12 11:47   ` Jonathan Wakely
  1 sibling, 2 replies; 7+ messages in thread
From: Prathamesh Kulkarni @ 2016-12-10 13:52 UTC (permalink / raw)
  To: Martin Sebor; +Cc: GCC Mailing List

[-- Attachment #1: Type: text/plain, Size: 2287 bytes --]

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 #2: divmod-tests.txt --]
[-- Type: text/plain, Size: 5052 bytes --]

2016-12-10  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

testsuite/
	* gcc.dg/divmod-1-simode.c: Add dg-do compile.
	* gcc.dg/divmod-1.c: Likewise.
	* gcc.dg/divmod-2-simode.c: Likewise.
	* gcc.dg/divmod-2.c: Likewise.
	* gcc.dg/divmod-3-simode.c: Likewise.
	* gcc.dg/divmod-3.c: Likewise.
	* gcc.dg/divmod-4-simode.c: Likewise.
	* gcc.dg/divmod-4.c: Likewise.
	* gcc.dg/divmod-5-simode.c: Likewise.
	* gcc.dg/divmod-5.c: Likewise.
	* gcc.dg/divmod-6-simode.c: Likewise.
	* gcc.dg/divmod-6.c: Likewise.
	* gcc.dg/divmod-7.c: Likewise.

diff --git a/gcc/testsuite/gcc.dg/divmod-1-simode.c b/gcc/testsuite/gcc.dg/divmod-1-simode.c
index 9e47799..6f9cc14 100644
--- a/gcc/testsuite/gcc.dg/divmod-1-simode.c
+++ b/gcc/testsuite/gcc.dg/divmod-1-simode.c
@@ -1,3 +1,4 @@
+/* { dg-do compile } */
 /* { dg-require-effective-target divmod_simode } */
 /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
 /* div dominates mod.  */
diff --git a/gcc/testsuite/gcc.dg/divmod-1.c b/gcc/testsuite/gcc.dg/divmod-1.c
index edcc2a1..cda6c8d 100644
--- a/gcc/testsuite/gcc.dg/divmod-1.c
+++ b/gcc/testsuite/gcc.dg/divmod-1.c
@@ -1,3 +1,4 @@
+/* { dg-do compile } */
 /* { dg-require-effective-target divmod } */
 /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
 /* div dominates mod.  */
diff --git a/gcc/testsuite/gcc.dg/divmod-2-simode.c b/gcc/testsuite/gcc.dg/divmod-2-simode.c
index fa28beb..1e7108c 100644
--- a/gcc/testsuite/gcc.dg/divmod-2-simode.c
+++ b/gcc/testsuite/gcc.dg/divmod-2-simode.c
@@ -1,3 +1,4 @@
+/* { dg-do compile } */
 /* { dg-require-effective-target divmod_simode } */
 /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
 /* mod dominates div.  */
diff --git a/gcc/testsuite/gcc.dg/divmod-2.c b/gcc/testsuite/gcc.dg/divmod-2.c
index ded732e..2cedca7 100644
--- a/gcc/testsuite/gcc.dg/divmod-2.c
+++ b/gcc/testsuite/gcc.dg/divmod-2.c
@@ -1,3 +1,4 @@
+/* { dg-do compile } */
 /* { dg-require-effective-target divmod } */
 /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
 /* mod dominates div.  */
diff --git a/gcc/testsuite/gcc.dg/divmod-3-simode.c b/gcc/testsuite/gcc.dg/divmod-3-simode.c
index 9dee5bf..56dc9df 100644
--- a/gcc/testsuite/gcc.dg/divmod-3-simode.c
+++ b/gcc/testsuite/gcc.dg/divmod-3-simode.c
@@ -1,3 +1,4 @@
+/* { dg-do compile } */
 /* { dg-require-effective-target divmod_simode } */
 /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
 /* div comes before mod in same bb.  */ 
diff --git a/gcc/testsuite/gcc.dg/divmod-3.c b/gcc/testsuite/gcc.dg/divmod-3.c
index 02aa367..2e65d6a 100644
--- a/gcc/testsuite/gcc.dg/divmod-3.c
+++ b/gcc/testsuite/gcc.dg/divmod-3.c
@@ -1,3 +1,4 @@
+/* { dg-do compile } */
 /* { dg-require-effective-target divmod } */
 /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
 /* div comes before mod in same bb.  */ 
diff --git a/gcc/testsuite/gcc.dg/divmod-4-simode.c b/gcc/testsuite/gcc.dg/divmod-4-simode.c
index dbe29cb..f4b9e96 100644
--- a/gcc/testsuite/gcc.dg/divmod-4-simode.c
+++ b/gcc/testsuite/gcc.dg/divmod-4-simode.c
@@ -1,3 +1,4 @@
+/* { dg-do compile } */
 /* { dg-require-effective-target divmod_simode } */
 /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
 /* mod comes before div in same bb.  */ 
diff --git a/gcc/testsuite/gcc.dg/divmod-4.c b/gcc/testsuite/gcc.dg/divmod-4.c
index 861ecbd..682f010 100644
--- a/gcc/testsuite/gcc.dg/divmod-4.c
+++ b/gcc/testsuite/gcc.dg/divmod-4.c
@@ -1,3 +1,4 @@
+/* { dg-do compile } */
 /* { dg-require-effective-target divmod } */
 /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
 /* mod comes before div in same bb.  */ 
diff --git a/gcc/testsuite/gcc.dg/divmod-5.c b/gcc/testsuite/gcc.dg/divmod-5.c
index 8a8cee5..1dbbfa6 100644
--- a/gcc/testsuite/gcc.dg/divmod-5.c
+++ b/gcc/testsuite/gcc.dg/divmod-5.c
@@ -1,3 +1,4 @@
+/* { dg-do compile } */
 /* { dg-require-effective-target divmod_simode } */
 /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
 /* div and mod are not in same bb and
diff --git a/gcc/testsuite/gcc.dg/divmod-6-simode.c b/gcc/testsuite/gcc.dg/divmod-6-simode.c
index 1107f76..6f2e7fb 100644
--- a/gcc/testsuite/gcc.dg/divmod-6-simode.c
+++ b/gcc/testsuite/gcc.dg/divmod-6-simode.c
@@ -1,3 +1,4 @@
+/* { dg-do compile } */
 /* { dg-require-effective-target divmod_simode } */
 /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
 
diff --git a/gcc/testsuite/gcc.dg/divmod-6.c b/gcc/testsuite/gcc.dg/divmod-6.c
index 495ebaf..dbfcca7 100644
--- a/gcc/testsuite/gcc.dg/divmod-6.c
+++ b/gcc/testsuite/gcc.dg/divmod-6.c
@@ -1,3 +1,4 @@
+/* { dg-do compile } */
 /* { dg-require-effective-target divmod } */
 /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
 
diff --git a/gcc/testsuite/gcc.dg/divmod-7.c b/gcc/testsuite/gcc.dg/divmod-7.c
index faa90b3..f2f6fa6 100644
--- a/gcc/testsuite/gcc.dg/divmod-7.c
+++ b/gcc/testsuite/gcc.dg/divmod-7.c
@@ -1,3 +1,4 @@
+/* { dg-do compile } */
 /* { dg-require-effective-target divmod_simode } */
 /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: strange test failures
  2016-12-10 13:52 ` Prathamesh Kulkarni
@ 2016-12-10 18:04   ` Martin Sebor
  2016-12-10 21:50     ` Martin Sebor
  2016-12-12 11:47   ` Jonathan Wakely
  1 sibling, 1 reply; 7+ messages in thread
From: Martin Sebor @ 2016-12-10 18:04 UTC (permalink / raw)
  To: Prathamesh Kulkarni; +Cc: GCC Mailing List

On 12/10/2016 06:52 AM, Prathamesh Kulkarni wrote:
> 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 ?

Thanks Prathamesh!  I confess I don't know what the default is.
But these tests pass in my other builds, either with other patches
of mine or in a clean pull of the top of trunk. There are others
besides the divmod where I see the same problem, including at least
these:

   pr38338.c
   ipa/inlinehint-1.c
   gcc.dg/params/blocksort-part.c
   tree-ssa/ipa-split-3.c
   Woverlength-strings-pedantic-c89.c
   torture/pr32897.c

There tend to be different sets in different builds.  Those above
are also missing dg-do compile.  So something else must be going
on here to cause these failures only under certain conditions.

> 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.

The GNU ChangeLog style guide recommends against it:
https://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html

Martin

>
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: strange test failures
  2016-12-10 18:04   ` Martin Sebor
@ 2016-12-10 21:50     ` Martin Sebor
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Sebor @ 2016-12-10 21:50 UTC (permalink / raw)
  To: Prathamesh Kulkarni; +Cc: GCC Mailing List

On 12/10/2016 11:03 AM, Martin Sebor wrote:
> On 12/10/2016 06:52 AM, Prathamesh Kulkarni wrote:
>> 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 ?
>
> Thanks Prathamesh!  I confess I don't know what the default is.
> But these tests pass in my other builds, either with other patches
> of mine or in a clean pull of the top of trunk. There are others
> besides the divmod where I see the same problem, including at least
> these:
>
>   pr38338.c
>   ipa/inlinehint-1.c
>   gcc.dg/params/blocksort-part.c
>   tree-ssa/ipa-split-3.c
>   Woverlength-strings-pedantic-c89.c
>   torture/pr32897.c
>
> There tend to be different sets in different builds.  Those above
> are also missing dg-do compile.  So something else must be going
> on here to cause these failures only under certain conditions.

I've narrowed the problem down to a bug in a torture/execute test
added in my patch.  It's caused by an invalid dg-warn directive:

/* { dg-warn "..." "int32plus" { target { int32plus } } */

It's "dg-warn" rather than "dg-warning" and it's missing the final
closing curly brace.

With this fixed all the other strange failures clear up.  So your
patch isn't necessary.  I guess since I run make check with a large
-jN to parallelize the tests a DejaGnu error in one of the tests
can cause cascading failures in tests run later on.

Martin

>
>> 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.
>
> The GNU ChangeLog style guide recommends against it:
> https://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html
>
> Martin
>
>>
>> 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
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: strange test failures
  2016-12-10 13:52 ` Prathamesh Kulkarni
  2016-12-10 18:04   ` Martin Sebor
@ 2016-12-12 11:47   ` Jonathan Wakely
  1 sibling, 0 replies; 7+ messages in thread
From: Jonathan Wakely @ 2016-12-12 11:47 UTC (permalink / raw)
  To: Prathamesh Kulkarni; +Cc: Martin Sebor, GCC Mailing List

On 10 December 2016 at 13:52, Prathamesh Kulkarni wrote:
> I wonder though how I didn't see these failures. Is compile the default ?

Yes, { dg-do compile } is the default.

That can be changed by .exp files, which is done by
libstdc++-v3/testsuite to make { dg-do run } the default.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-12-12 11:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-08 23:47 strange test failures Martin Sebor
2016-12-09  0:32 ` Jeff Law
2016-12-09 21:35   ` Martin Sebor
2016-12-10 13:52 ` Prathamesh Kulkarni
2016-12-10 18:04   ` Martin Sebor
2016-12-10 21:50     ` Martin Sebor
2016-12-12 11:47   ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).