[2/4] testsuite, jit: Handle whitespace in test-link-section-assembler.c.

Message ID 20240113135718.57643-3-iain@sandoe.co.uk
State Unresolved
Headers
Series [1/4] testsuite, jit: test-alias-attribute.c requires alias support. |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Iain Sandoe Jan. 13, 2024, 1:57 p.m. UTC
  Darwin has a different .section directive that has more fields and
uses different whitespace.  Amend the whitespace in the scan-asm to
be more flexible.

gcc/testsuite/ChangeLog:

	* jit.dg/test-link-section-assembler.c: Accept any whitespace
	between the .section directive and its arguments.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
---
 gcc/testsuite/jit.dg/test-link-section-assembler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

David Malcolm Jan. 16, 2024, 7:40 p.m. UTC | #1
On Sat, 2024-01-13 at 13:57 +0000, Iain Sandoe wrote:
> Darwin has a different .section directive that has more fields and
> uses different whitespace.  Amend the whitespace in the scan-asm to
> be more flexible.

LGTM for trunk, assuming your testing was successful.

Thanks
Dave

> 
> gcc/testsuite/ChangeLog:
> 
>         * jit.dg/test-link-section-assembler.c: Accept any whitespace
>         between the .section directive and its arguments.
> 
> Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
> ---
>  gcc/testsuite/jit.dg/test-link-section-assembler.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gcc/testsuite/jit.dg/test-link-section-assembler.c
> b/gcc/testsuite/jit.dg/test-link-section-assembler.c
> index a90b00e9a82..a78e9fd26ef 100644
> --- a/gcc/testsuite/jit.dg/test-link-section-assembler.c
> +++ b/gcc/testsuite/jit.dg/test-link-section-assembler.c
> @@ -34,4 +34,4 @@ create_code (gcc_jit_context *ctxt, void
> *user_data)
>  }
>  
>  /* { dg-final { jit-verify-output-file-was-created "" } } */
> -/* { dg-final { jit-verify-assembler-output ".section  .my_section"
> } } */
> +/* { dg-final { jit-verify-assembler-output ".section\\s.my_section"
> } } */
  

Patch

diff --git a/gcc/testsuite/jit.dg/test-link-section-assembler.c b/gcc/testsuite/jit.dg/test-link-section-assembler.c
index a90b00e9a82..a78e9fd26ef 100644
--- a/gcc/testsuite/jit.dg/test-link-section-assembler.c
+++ b/gcc/testsuite/jit.dg/test-link-section-assembler.c
@@ -34,4 +34,4 @@  create_code (gcc_jit_context *ctxt, void *user_data)
 }
 
 /* { dg-final { jit-verify-output-file-was-created "" } } */
-/* { dg-final { jit-verify-assembler-output ".section	.my_section" } } */
+/* { dg-final { jit-verify-assembler-output ".section\\s.my_section" } } */