public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6404] testsuite: Fix gcc.dg/attr-copy-6.c for user-label-prefixed targets
@ 2023-03-02 1:15 Hans-Peter Nilsson
0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2023-03-02 1:15 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b838a9f65f68f9ebe87d4cbd10ae18911a05b6ea
commit r13-6404-gb838a9f65f68f9ebe87d4cbd10ae18911a05b6ea
Author: Hans-Peter Nilsson <hp@axis.com>
Date: Wed Mar 1 17:30:07 2023 +0100
testsuite: Fix gcc.dg/attr-copy-6.c for user-label-prefixed targets
This fixes:
Running /x/gcc/testsuite/gcc.dg/dg.exp ...
...
FAIL: gcc.dg/attr-copy-6.c (test for excess errors)
for cris-elf, where gcc.log has:
Excess errors:
/x/gcc/testsuite/gcc.dg/attr-copy-6.c:91:3: error: 'fnoreturn_alias' aliased to undefined symbol 'fnoreturn_name'
Asm-declared identifiers need to prepend __USER_LABEL_PREFIX__
to the asm-name, something which is often overlooked because
it's empty for most targets. N.B: attribute-alias does not need
the same treatment. The identical construct added here, is in
several tests.
* gcc.dg/attr-copy-6.c: Prefix asm-declared name with
__USER_LABEL_PREFIX__.
Diff:
---
gcc/testsuite/gcc.dg/attr-copy-6.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.dg/attr-copy-6.c b/gcc/testsuite/gcc.dg/attr-copy-6.c
index cf578bddb1b..30a1317bf92 100644
--- a/gcc/testsuite/gcc.dg/attr-copy-6.c
+++ b/gcc/testsuite/gcc.dg/attr-copy-6.c
@@ -9,6 +9,10 @@
#define ATTR(...) __attribute__ ((__VA_ARGS__))
#define ASRT(expr) _Static_assert (expr, #expr)
+#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+#define ASMNAME2(prefix, cname) STRING (prefix) cname
+#define STRING(x) #x
+
/* Variable that is local to this translation unit but that can
be modified from other units by calling reset_unit_local(). */
static int unit_local;
@@ -79,7 +83,7 @@ extern _Noreturn void fnoreturn (void);
extern __typeof (fnoreturn)
ATTR (visibility ("hidden"))
- fnoreturn __asm__ ("fnoreturn_name");
+ fnoreturn __asm__ (ASMNAME ("fnoreturn_name"));
void fnoreturn (void)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-02 1:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-02 1:15 [gcc r13-6404] testsuite: Fix gcc.dg/attr-copy-6.c for user-label-prefixed targets Hans-Peter Nilsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).