From 9664b52aeb3db9ae35bba1766d677790c8a461ef Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Sun, 26 Jan 2020 21:30:49 +0100 Subject: [PATCH] testsuite: xfail gcc.target/i386/pr91298-?.c on Solaris/x86 with as The new gcc.target/i386/pr91298-?.c testcases FAIL on Solaris/x86 with the native assembler: FAIL: gcc.target/i386/pr91298-1.c (test for excess errors) Excess errors: Assembler: pr91298-1.c "/var/tmp//ccE6r3xb.s", line 5 : Syntax error Near line: " .globl $quux" "/var/tmp//ccE6r3xb.s", line 6 : Syntax error Near line: " .type $quux, @function" "/var/tmp//ccE6r3xb.s", line 7 : Syntax error Near line: "$quux:" "/var/tmp//ccE6r3xb.s", line 15 : Syntax error Near line: " .size $quux, .-$quux" "/var/tmp//ccE6r3xb.s", line 24 : Syntax error Near line: " movl $($a), %eax" "/var/tmp//ccE6r3xb.s", line 38 : Syntax error Near line: " leal ($a)(,%eax,4), %eax" "/var/tmp//ccE6r3xb.s", line 51 : Syntax error Near line: " movl ($a), %eax" "/var/tmp//ccE6r3xb.s", line 63 : Syntax error Near line: " movl ($a)+16, %eax" "/var/tmp//ccE6r3xb.s", line 97 : Syntax error Near line: " movl $($quux), %eax" "/var/tmp//ccE6r3xb.s", line 101 : Syntax error Near line: " .globl $a" "/var/tmp//ccE6r3xb.s", line 104 : Syntax error Near line: " .type $a, @object" "/var/tmp//ccE6r3xb.s", line 105 : Syntax error Near line: " .size $a, 72" "/var/tmp//ccE6r3xb.s", line 106 : Syntax error Near line: "$a:" "/var/tmp//ccE6r3xb.s", line 228 : Syntax error Near line: " .long ($a)" FAIL: gcc.target/i386/pr91298-2.c (test for excess errors) It only allows letters, digits, '_' and '.' in identifiers: https://docs.oracle.com/cd/E37838_01/html/E61064/eqbsx.html#XALRMeoqjw For lack of an effective-target keyword matching -fdollars-in-identifiers, this patch fixes this by xfailing them on *-*-solaris2.* && !gas. Tested on i386-pc-solaris2.11 with as and gas and x86_64-pc-linux-gnu. * gcc.target/i386/pr91298-1.c: xfail on Solaris/x86 with native assembler. * gcc.target/i386/pr91298-2.c: Likewise. --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.target/i386/pr91298-1.c | 1 + gcc/testsuite/gcc.target/i386/pr91298-2.c | 1 + 3 files changed, 8 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0cbd0482a8c..f2af1ebac15 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2020-01-26 Rainer Orth + + * gcc.target/i386/pr91298-1.c: xfail on Solaris/x86 with native + assembler. + * gcc.target/i386/pr91298-2.c: Likewise. + 2020-01-26 Jakub Jelinek PR target/93412 diff --git a/gcc/testsuite/gcc.target/i386/pr91298-1.c b/gcc/testsuite/gcc.target/i386/pr91298-1.c index 45ef553fcf1..fc7950ca8ed 100644 --- a/gcc/testsuite/gcc.target/i386/pr91298-1.c +++ b/gcc/testsuite/gcc.target/i386/pr91298-1.c @@ -1,6 +1,7 @@ /* PR target/91298 */ /* { dg-do assemble } */ /* { dg-options "-O2 -g -fdollars-in-identifiers" } */ +/* { dg-xfail-if "No support for $ in identifiers" { *-*-solaris2.* && { ! gas } } } */ int $a[18]; int *foo (void) { return &$a[0]; } diff --git a/gcc/testsuite/gcc.target/i386/pr91298-2.c b/gcc/testsuite/gcc.target/i386/pr91298-2.c index 20e47ab6c83..f2d7d3a2907 100644 --- a/gcc/testsuite/gcc.target/i386/pr91298-2.c +++ b/gcc/testsuite/gcc.target/i386/pr91298-2.c @@ -1,5 +1,6 @@ /* PR target/91298 */ /* { dg-do assemble { target fpic } } */ /* { dg-options "-O2 -g -fdollars-in-identifiers -fpic" } */ +/* { dg-xfail-if "No support for $ in identifiers" { *-*-solaris2.* && { ! gas } } } */ #include "pr91298-1.c" -- 2.30.2