On 9 December 2016 at 05:17, Martin Sebor <mse...@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
2016-12-10  Prathamesh Kulkarni  <prathamesh.kulka...@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" } */
 

Reply via email to