+2018-12-24 Iain Sandoe <iain@sandoe.co.uk>
+
+ Backport from mainline
+ 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
+
+ * gcc.dg/lto/pr85248_0.c (test_alias):
+ Stringify __USER_LABEL_PREFIX__.
+ (test_noreturn): Likewise.
+
+ 2018-08-16 Iain Sandoe <iain@sandoe.co.uk>
+
+ * gcc.dg/memcmp-1.c (lib_memcmp): Apply __USER_LABEL_PREFIX__.
+ (lib_strncmp): Likewise.
+
+ 2018-08-16 Iain Sandoe <iain@sandoe.co.uk>
+
+ * gcc.dg/asan/pr81923.c: Stringify __USER_LABEL_PREFIX__.
+
2018-12-24 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
/* 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 ()
/* { dg-lto-do run } */
/* { dg-lto-options { { -flto -O2 } } } */
-extern void test_alias (int s, int e) __asm__ (__USER_LABEL_PREFIX__ "test");
-extern void test_noreturn (int s, int e) __asm__ (__USER_LABEL_PREFIX__ "test")
+#define STR1(X) #X
+#define STR2(X) STR1(X)
+
+extern void test_alias (int s, int e)
+ __asm__ (STR2(__USER_LABEL_PREFIX__) "test");
+extern void test_noreturn (int s, int e)
+ __asm__ (STR2(__USER_LABEL_PREFIX__) "test")
__attribute__ ((__noreturn__));
extern inline __attribute__ ((__always_inline__, __gnu_inline__)) void
#include <string.h>
#include <stdint.h>
-int lib_memcmp(const void *a, const void *b, size_t n) asm("memcmp");
-int lib_strncmp(const char *a, const char *b, size_t n) asm("strncmp");
+#define STR1(X) #X
+#define STR2(X) STR1(X)
+
+int lib_memcmp(const void *a, const void *b, size_t n)
+ asm(STR2(__USER_LABEL_PREFIX__) "memcmp");
+int lib_strncmp(const char *a, const char *b, size_t n)
+ asm(STR2(__USER_LABEL_PREFIX__) "strncmp");
#ifndef NRAND
#define NRAND 10000