Commit 41ba8a20 by Richard Henderson Committed by Richard Henderson

elf.h (ASM_OUTPUT_DEF): Tidy.

        * config/alpha/elf.h (ASM_OUTPUT_DEF): Tidy.
        (ASM_OUTPUT_DEF_FROM_DECLS): New.

        * gcc.dg/special/alias-2.c: New.
        * gcc.dg/special/ecos.exp: Run it.

From-SVN: r51650
parent a7648399
2002-03-31 Richard Henderson <rth@redhat.com> 2002-03-31 Richard Henderson <rth@redhat.com>
PR target/3997
* config/alpha/elf.h (ASM_OUTPUT_DEF): Tidy.
(ASM_OUTPUT_DEF_FROM_DECLS): New.
2002-03-31 Richard Henderson <rth@redhat.com>
* libgcc2.c (__bb_exit_func): Make static. * libgcc2.c (__bb_exit_func): Make static.
* config/alpha/alpha.md (trap): New. * config/alpha/alpha.md (trap): New.
......
...@@ -483,11 +483,32 @@ do { \ ...@@ -483,11 +483,32 @@ do { \
/* This is how we tell the assembler that two symbols have the same value. */ /* This is how we tell the assembler that two symbols have the same value. */
#undef ASM_OUTPUT_DEF #undef ASM_OUTPUT_DEF
#define ASM_OUTPUT_DEF(FILE, NAME1, NAME2) \ #define ASM_OUTPUT_DEF(FILE, ALIAS, NAME) \
do { assemble_name(FILE, NAME1); \ do { \
fputs(" = ", FILE); \ assemble_name(FILE, ALIAS); \
assemble_name(FILE, NAME2); \ fputs(" = ", FILE); \
fputc('\n', FILE); } while (0) assemble_name(FILE, NAME); \
fputc('\n', FILE); \
} while (0)
#undef ASM_OUTPUT_DEF_FROM_DECLS
#define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET) \
do { \
const char *alias = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
const char *name = IDENTIFIER_POINTER (TARGET); \
if (TREE_CODE (DECL) == FUNCTION_DECL) \
{ \
fputc ('$', FILE); \
assemble_name (FILE, alias); \
fputs ("..ng = $", FILE); \
assemble_name (FILE, name); \
fputs ("..ng\n", FILE); \
} \
assemble_name(FILE, alias); \
fputs(" = ", FILE); \
assemble_name(FILE, name); \
fputc('\n', FILE); \
} while (0)
/* The following macro defines the format used to output the second /* The following macro defines the format used to output the second
operand of the .type assembler directive. Different svr4 assemblers operand of the .type assembler directive. Different svr4 assemblers
......
2002-03-31 Richard Henderson <rth@redhat.com> 2002-03-31 Richard Henderson <rth@redhat.com>
* gcc.dg/special/alias-2.c: New.
* gcc.dg/special/ecos.exp: Run it.
2002-03-31 Richard Henderson <rth@redhat.com>
* gcc.dg/va-arg-1.c: Expect warnings, not errors. * gcc.dg/va-arg-1.c: Expect warnings, not errors.
2002-03-31 Kazu Hirata <kazu@hxi.com> 2002-03-31 Kazu Hirata <kazu@hxi.com>
......
/* PR 3997 */
/* { dg-do run } */
extern void abort (void);
extern void exit (int);
void foo(void)
{
exit(0);
}
static void bar(void) __attribute__((alias("foo")));
int main()
{
bar();
abort ();
}
...@@ -94,6 +94,18 @@ switch [check_alias_available "$srcdir/$subdir/alias-1.c"] { ...@@ -94,6 +94,18 @@ switch [check_alias_available "$srcdir/$subdir/alias-1.c"] {
dg-finish dg-finish
########### ###########
# alias-2.c
###########
dg-init
switch [check_alias_available "$srcdir/$subdir/alias-2.c"] {
yes { dg-runtest "$srcdir/$subdir/alias-2.c" "" "" }
no { unsupported "alias-2.c" }
default { fail "alias-2.c" }
}
dg-finish
###########
# wkali-1.c # wkali-1.c
########### ###########
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment