diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-02 07:52:31 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-02 07:52:31 +0000 |
commit | 8bc09a747fed4c300f335b0bca7723e55fd19091 (patch) | |
tree | 9fcf4185c5360e802ff2cef25c68d1cd2b7178d6 /gcc/testsuite/gcc.dg/attr-alias-2.c | |
parent | c838448c89657e91d35e22ee3b3686410bf32c74 (diff) | |
download | gcc-8bc09a747fed4c300f335b0bca7723e55fd19091.tar.gz |
PR c/19031
* c-decl.c (pop_file_scope): Call maybe_apply_pending_pragma_weaks.
* c-lang.c (finish_file): Don't do it here.
* objc/objc-act.c (objc_finish_file): Likewise.
* cgraph.c (decl_assembler_name_equal): New.
(cgraph_node_for_asm, cgraph_varpool_node_for_asm): New.
(cgraph_varpool_node): Actually link up cgraph_varpool_nodes.
* cgraph.h (struct cgraph_varpool_node): Add next.
(cgraph_node_for_asm, cgraph_varpool_node_for_asm): Declare.
* varasm.c (assemble_alias): Mark the target as needed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92803 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/attr-alias-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/attr-alias-2.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/attr-alias-2.c b/gcc/testsuite/gcc.dg/attr-alias-2.c new file mode 100644 index 00000000000..8a21384cf46 --- /dev/null +++ b/gcc/testsuite/gcc.dg/attr-alias-2.c @@ -0,0 +1,20 @@ +/* PR 19031 */ +/* { dg-do link } */ +/* { dg-require-alias } */ +/* { dg-options "-funit-at-a-time" } */ + +static int f1 (void) { return 0; } +extern int g1 (void) __attribute__((__alias__("f1"))); + +#define STR(x) STR1(__USER_LABEL_PREFIX__, x) +#define STR1(x,y) STR2(x, y) +#define STR2(x,y) #x #y + +static int f2 (void) __asm__(STR(a2)); +static int f2 (void) { return 0; } +extern int g2 (void) __attribute__((__alias__("a2"))); + +int main () +{ + return g1() + g2(); +} |