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__.
#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;
extern __typeof (fnoreturn)
ATTR (visibility ("hidden"))
- fnoreturn __asm__ ("fnoreturn_name");
+ fnoreturn __asm__ (ASMNAME ("fnoreturn_name"));
void fnoreturn (void)
{