summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-plugin/pr12760b.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-plugin/pr12760b.c')
-rw-r--r--ld/testsuite/ld-plugin/pr12760b.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ld/testsuite/ld-plugin/pr12760b.c b/ld/testsuite/ld-plugin/pr12760b.c
new file mode 100644
index 00000000000..29a9fd89ef1
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr12760b.c
@@ -0,0 +1,7 @@
+#define linker_warning(x, msg) \
+ static const char __warn_##x[] \
+ __attribute__((used, section(".gnu.warning." #x))) \
+ = msg
+
+void bar (void) {}
+linker_warning(bar, "Bad bar");