This is the mail archive of the gcc-patches@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]

[PATCH] m68k testsuite TLC



'twas about to post a fix for an old m68k bug when I noticed the m68k target tests weren't clean. Two minor issues.

First, 20090709-1.c. It's expecting a definition and two references to a string in the constant pool. However, one reference to that string was eliminated in favor of using an integer constant. This patch adjusts the expected output.

Second, pr63347 includes <stdlib>, but doesn't really need it. Removed the #include and added "-w" to the options to keep it quiet about missing prototypes and such.

Those two changes make m68k.exp run cleanly.  Committing to the trunk.

Jeff
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9c37176..38d1dbe 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2015-12-13  Jeff Law  <law@redhat.com>
+
+	* gcc.target/m68k/pr63347.c: Remove #include <stdlib> add -w to
+	command line options.
+	* gcc.target/m68k/20090709-1.c: Adjust expected output.
+
 2015-12-12  David Edelsohn  <dje.gcc@gmail.com>
 
 	* g++.dg/opt/pr48549.C: XFAIL AIX.
diff --git a/gcc/testsuite/gcc.target/m68k/20090709-1.c b/gcc/testsuite/gcc.target/m68k/20090709-1.c
index fda05b7..ce835a1 100644
--- a/gcc/testsuite/gcc.target/m68k/20090709-1.c
+++ b/gcc/testsuite/gcc.target/m68k/20090709-1.c
@@ -1,11 +1,11 @@
 /* { dg-do compile } */
 /* There should be 3 occurrences of .LC0 in the code:
    one for the definition of "0",
-   one for use in test1() and
    one for use in test2().
+   The occurrence in test1 is collapsed to an integer constant
    FIXME: At the moment m68k GCC does not optimize test1() to nop
    for some reason.  */
-/* { dg-final { scan-assembler-times ".LC0" 3 } } */
+/* { dg-final { scan-assembler-times ".LC0" 2 } } */
 
 void dummy(char *arg);
 
diff --git a/gcc/testsuite/gcc.target/m68k/pr63347.c b/gcc/testsuite/gcc.target/m68k/pr63347.c
index 1d23e9a..6396476 100644
--- a/gcc/testsuite/gcc.target/m68k/pr63347.c
+++ b/gcc/testsuite/gcc.target/m68k/pr63347.c
@@ -1,7 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=5208" } */
-
-#include <stdlib.h>
+/* { dg-options "-O2 -mcpu=5208 -w" } */
 
 void __attribute__ ((noinline))
 oof()

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