diff mbox series

[testsuite] Stringify __USER_LABEL_PREFIX__ for pr81923.c

Message ID 1A5AB2DF-6C8B-4BB4-9B05-82CED480E539@sandoe.co.uk
State New
Headers show
Series [testsuite] Stringify __USER_LABEL_PREFIX__ for pr81923.c | expand

Commit Message

Iain Sandoe Aug. 15, 2018, 2:15 p.m. UTC
Hi,

This test has always failed on Darwin (and presumably the other targets with user __USER_LABEL_PREFIX__  != “” ) since it needs to be stringified.

OK for trunk?
affected branches?

thanks
Iain

2018-08-15  Iain Sandoe <iain@sandoe.co.uk>

gcc/testsuite:

	* gcc.dg/asan/pr81923.c: Stringify __USER_LABEL_PREFIX__.

Comments

Richard Biener Aug. 15, 2018, 3:05 p.m. UTC | #1
On August 15, 2018 4:15:42 PM GMT+02:00, Iain Sandoe <iain@sandoe.co.uk> wrote:
>Hi,
>
>This test has always failed on Darwin (and presumably the other targets
>with user __USER_LABEL_PREFIX__  != “” ) since it needs to be
>stringified.
>
>OK for trunk?

OK. 

>affected branches?

Yes. If you tested on x86_64-linux for example. 

Richard. 
>
>thanks
>Iain
>
>2018-08-15  Iain Sandoe <iain@sandoe.co.uk>
>
>gcc/testsuite:
>
>	* gcc.dg/asan/pr81923.c: Stringify __USER_LABEL_PREFIX__.
>
>diff --git a/gcc/testsuite/gcc.dg/asan/pr81923.c
>b/gcc/testsuite/gcc.dg/asan/pr81923.c
>index f81d512..dd9db72 100644
>--- a/gcc/testsuite/gcc.dg/asan/pr81923.c
>+++ b/gcc/testsuite/gcc.dg/asan/pr81923.c
>@@ -1,7 +1,10 @@
> /* PR sanitizer/81923 */
> /* { dg-do link } */
> 
>-int foobar __asm (__USER_LABEL_PREFIX__ "barbaz") = 34;
>+#define STR1(X) #X
>+#define STR2(X) STR1(X)
>+
>+int foobar __asm (STR2(__USER_LABEL_PREFIX__) "barbaz") = 34;
> 
> int
> main ()
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/asan/pr81923.c b/gcc/testsuite/gcc.dg/asan/pr81923.c
index f81d512..dd9db72 100644
--- a/gcc/testsuite/gcc.dg/asan/pr81923.c
+++ b/gcc/testsuite/gcc.dg/asan/pr81923.c
@@ -1,7 +1,10 @@ 
 /* PR sanitizer/81923 */
 /* { dg-do link } */
 
-int foobar __asm (__USER_LABEL_PREFIX__ "barbaz") = 34;
+#define STR1(X) #X
+#define STR2(X) STR1(X)
+
+int foobar __asm (STR2(__USER_LABEL_PREFIX__) "barbaz") = 34;
 
 int
 main ()