On 21/09/12 03:51, Janis Johnson wrote:
This patch adds test directives to skip 5 tests in gcc.target/arm if the
flags specified for the test would be overridden by or conflict with
flags used for all tests, such as multilib flags.
Tested on arm-none-eabi with a variety of test flags. I'll wait a day
or two before checking it in to give ARM experts a chance to comment.
I plan to backport to the 4.7 branch soon after it's in trunk.
Janis
gcc-20120920-1
2012-09-20 Janis Johnson <jani...@codesourcery.com>
* gcc.target/arm/pr40887.c: Avoid conflicting flags.
* gcc.target/arm/pr51835.c: Likewise.
* gcc.target/arm/pr51915.c: Likewise.
* gcc.target/arm/pr52006.c: Likewise.
* gcc.target/arm/pr53187.c: Likewise.
Index: gcc.target/arm/pr40887.c
===================================================================
--- gcc.target/arm/pr40887.c (revision 191502)
+++ gcc.target/arm/pr40887.c (working copy)
@@ -1,3 +1,4 @@
+/* { dg-skip-if " do not override -march" { *-*-* } { "-march=*" } {
"-march=armv5te" } } */
/* { dg-options "-O2 -march=armv5te" } */
/* { dg-final { scan-assembler "blx" } } */
It looks like this test should be run on ARMv5TE or later, so doesn't
skipping this is weakening our testing?
As a secondary issue, -mcpu will override the -march setting quietly so
we could end up with testsuite failures if the compiler was being tested
with a -mcpu= flag.
Index: gcc.target/arm/pr51835.c
===================================================================
--- gcc.target/arm/pr51835.c (revision 191502)
+++ gcc.target/arm/pr51835.c (working copy)
@@ -1,6 +1,8 @@
/* { dg-do compile } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {
"-mfloat-abi=hard" } } */
+/* { dg-skip-if "do not override -mfpu" { *-*-* } { "-mfpu=*" } {
"-mfpu=fpv4-sp-d16" } } */
/* { dg-options "-O2 -mfloat-abi=hard -mfpu=fpv4-sp-d16" } */
-/* { dg-require-effective-target arm_thumb2_ok } */
Similarly, doesn't this weaken our test coverage?
int func1 (double d)
{
Index: gcc.target/arm/pr51915.c
===================================================================
--- gcc.target/arm/pr51915.c (revision 191502)
+++ gcc.target/arm/pr51915.c (working copy)
@@ -1,5 +1,7 @@
/* PR target/51915 */
/* { dg-do compile } */
+/* { dg-skip-if "do not override -march" { *-*-* } { "-march=*" } {
"-march=armv7-a" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {
"-mfloat-abi=hard" } } */
/* { dg-options "-march=armv7-a -mfloat-abi=hard -O2" } */
struct S { int s1; void *s2; };
Index: gcc.target/arm/pr52006.c
===================================================================
--- gcc.target/arm/pr52006.c (revision 191502)
+++ gcc.target/arm/pr52006.c (working copy)
@@ -1,5 +1,7 @@
/* PR target/52006 */
/* { dg-do compile } */
+/* { dg-skip-if "do not override -march=" { *-*-* } { "-march=*" } {
"-march=armv7-a" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {
"-mfloat-abi=hard" } } */
/* { dg-options "-march=armv7-a -mfloat-abi=hard -O2 -fPIC" } */
unsigned long a;
Index: gcc.target/arm/pr53187.c
===================================================================
--- gcc.target/arm/pr53187.c (revision 191502)
+++ gcc.target/arm/pr53187.c (working copy)
@@ -1,5 +1,6 @@
/* PR target/53187 */
/* { dg-do compile } */
+/* { dg-skip-if "do not override -march" { *-*-* } { "-march=*" } {
"-march=armv7-a" } } */
/* { dg-options "-march=armv7-a -mfloat-abi=hard -O2" } */
void bar (int);
And the same for the rest.
Remind me again, why dg-options are on the command line before the
multilib options.
R.