varasm.c (do_assemble_alias): Follow transparent alias chain for target.
gcc/ * varasm.c (do_assemble_alias): Follow transparent alias chain for target. (default_assemble_visibility): Follow transparent alias chain for decl name. gcc/testsuite/ * gcc.target/i386/chkp-hidden-def.c: New. From-SVN: r220391
This commit is contained in:
parent
cc9ef6a641
commit
283b44f96a
@ -1,3 +1,10 @@
|
||||
2015-02-04 Ilya Enkovich <ilya.enkovich@intel.com>
|
||||
|
||||
* varasm.c (do_assemble_alias): Follow transparent alias
|
||||
chain for target.
|
||||
(default_assemble_visibility): Follow transparent alias
|
||||
chain for decl name.
|
||||
|
||||
2015-02-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
|
||||
|
||||
PR middle-end/62103
|
||||
|
@ -1,3 +1,7 @@
|
||||
2015-02-04 Ilya Enkovich <ilya.enkovich@intel.com>
|
||||
|
||||
* gcc.target/i386/chkp-hidden-def.c: New.
|
||||
|
||||
2015-02-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
|
||||
|
||||
PR middle-end/62103
|
||||
|
15
gcc/testsuite/gcc.target/i386/chkp-hidden-def.c
Normal file
15
gcc/testsuite/gcc.target/i386/chkp-hidden-def.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target mpx } */
|
||||
/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */
|
||||
/* { dg-final { scan-assembler-not "test.chkp" } } */
|
||||
|
||||
int test (int *p);
|
||||
extern __typeof (test) test __asm__ ("" "__test") __attribute__ ((visibility ("hidden")));
|
||||
|
||||
int test (int *p)
|
||||
{
|
||||
return *p;
|
||||
}
|
||||
|
||||
extern __typeof (test) __test1 __asm__("" "test");
|
||||
extern __typeof (test) __test1 __attribute__((alias ("" "__test")));
|
@ -5601,6 +5601,7 @@ do_assemble_alias (tree decl, tree target)
|
||||
|
||||
id = DECL_ASSEMBLER_NAME (decl);
|
||||
ultimate_transparent_alias_target (&id);
|
||||
ultimate_transparent_alias_target (&target);
|
||||
|
||||
/* We must force creation of DECL_RTL for debug info generation, even though
|
||||
we don't use it here. */
|
||||
@ -5612,8 +5613,6 @@ do_assemble_alias (tree decl, tree target)
|
||||
|
||||
if (lookup_attribute ("weakref", DECL_ATTRIBUTES (decl)))
|
||||
{
|
||||
ultimate_transparent_alias_target (&target);
|
||||
|
||||
if (!TREE_SYMBOL_REFERENCED (target))
|
||||
weakref_targets = tree_cons (decl, target, weakref_targets);
|
||||
|
||||
@ -5944,8 +5943,12 @@ default_assemble_visibility (tree decl ATTRIBUTE_UNUSED,
|
||||
};
|
||||
|
||||
const char *name, *type;
|
||||
tree id;
|
||||
|
||||
id = DECL_ASSEMBLER_NAME (decl);
|
||||
ultimate_transparent_alias_target (&id);
|
||||
name = IDENTIFIER_POINTER (id);
|
||||
|
||||
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
|
||||
type = visibility_types[vis];
|
||||
|
||||
fprintf (asm_out_file, "\t.%s\t", type);
|
||||
|
Loading…
Reference in New Issue
Block a user