summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elfcomm/common1b.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-elfcomm/common1b.c')
-rw-r--r--ld/testsuite/ld-elfcomm/common1b.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ld/testsuite/ld-elfcomm/common1b.c b/ld/testsuite/ld-elfcomm/common1b.c
index 4ed9e039c0e..a375c902471 100644
--- a/ld/testsuite/ld-elfcomm/common1b.c
+++ b/ld/testsuite/ld-elfcomm/common1b.c
@@ -1,3 +1,7 @@
-static char dummy1 = 'X';
+static
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
+ __attribute__((__used__))
+#endif /* __GNUC__ */
+ char dummy1 = 'X';
char foo1 [] = "Aligned at odd byte.";
char foo2 [4];