testsuite: i386: Fix gcc.target/i386/pr71321.c on Solaris/x86

Message ID ydd34ubqm0q.fsf@CeBiTec.Uni-Bielefeld.DE
State Accepted
Headers
Series testsuite: i386: Fix gcc.target/i386/pr71321.c on Solaris/x86 |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Rainer Orth Feb. 2, 2024, 8:59 a.m. UTC
  gcc.target/i386/pr71321.c FAILs on 64-bit Solaris/x86 with the native
assembler:

FAIL: gcc.target/i386/pr71321.c scan-assembler-not lea.*0

The problem is that /bin/as doesn't fully support cfi directives, so the
.eh_frame section is specified explicitly, which includes ".long 0".
The regular expression above includes ".*", which does multiline
matches.  AFAICS those aren't needed here.

This patch changes the RE not to use multiline patches.

Tested on i386-pc-solaris2.11 (as and gas) and i686-pc-linux-gnu.

Ok for trunk?

	Rainer
  

Comments

Uros Bizjak Feb. 2, 2024, 10:23 a.m. UTC | #1
On Fri, Feb 2, 2024 at 9:59 AM Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>
> gcc.target/i386/pr71321.c FAILs on 64-bit Solaris/x86 with the native
> assembler:
>
> FAIL: gcc.target/i386/pr71321.c scan-assembler-not lea.*0
>
> The problem is that /bin/as doesn't fully support cfi directives, so the
> .eh_frame section is specified explicitly, which includes ".long 0".
> The regular expression above includes ".*", which does multiline
> matches.  AFAICS those aren't needed here.
>
> This patch changes the RE not to use multiline patches.
>
> Tested on i386-pc-solaris2.11 (as and gas) and i686-pc-linux-gnu.
>
> Ok for trunk?

OK.

Thanks,
Uros.

>
>         Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 2024-02-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>
>         gcc/testsuite:
>         * gcc.target/i386/pr71321.c (scan-assembler-not): Avoid multiline
>         matches.
>
  

Patch

# HG changeset patch
# Parent  f2342e77e566f9b5bdb221afd339753dcb4d1723
testsuite: i386: Fix gcc.target/i386/pr71321.c on Solaris/x86

diff --git a/gcc/testsuite/gcc.target/i386/pr71321.c b/gcc/testsuite/gcc.target/i386/pr71321.c
--- a/gcc/testsuite/gcc.target/i386/pr71321.c
+++ b/gcc/testsuite/gcc.target/i386/pr71321.c
@@ -12,4 +12,4 @@  unsigned cvt_to_2digit_ascii(uint8_t i)
 {
   return cvt_to_2digit(i, 10) + 0x0a3030;
 }
-/* { dg-final { scan-assembler-not "lea.*0" } } */
+/* { dg-final { scan-assembler-not "lea\[^\n\r]*0" } } */