mirror of git://gcc.gnu.org/git/gcc.git
mangle.c (mangle_decl): Give name collision error even without ASM_OUTPUT_DEF.
* mangle.c (mangle_decl): Give name collision error even without ASM_OUTPUT_DEF. * g++.dg/abi/mangle40.C: Require weak and alias. From-SVN: r157245
This commit is contained in:
parent
ccc5b64063
commit
1b88f240b9
|
@ -1,3 +1,8 @@
|
||||||
|
2010-03-05 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* mangle.c (mangle_decl): Give name collision error even without
|
||||||
|
ASM_OUTPUT_DEF.
|
||||||
|
|
||||||
2010-03-04 Marco Poletti <poletti.marco@gmail.com>
|
2010-03-04 Marco Poletti <poletti.marco@gmail.com>
|
||||||
|
|
||||||
* pt.c (process_partial_specialization): Use error_n instead of
|
* pt.c (process_partial_specialization): Use error_n instead of
|
||||||
|
|
|
@ -3057,19 +3057,21 @@ mangle_decl (const tree decl)
|
||||||
id = targetm.mangle_decl_assembler_name (decl, id);
|
id = targetm.mangle_decl_assembler_name (decl, id);
|
||||||
SET_DECL_ASSEMBLER_NAME (decl, id);
|
SET_DECL_ASSEMBLER_NAME (decl, id);
|
||||||
|
|
||||||
#ifdef ASM_OUTPUT_DEF
|
|
||||||
if (G.need_abi_warning)
|
if (G.need_abi_warning)
|
||||||
{
|
{
|
||||||
|
#ifdef ASM_OUTPUT_DEF
|
||||||
/* If the mangling will change in the future, emit an alias with the
|
/* If the mangling will change in the future, emit an alias with the
|
||||||
future mangled name for forward-compatibility. */
|
future mangled name for forward-compatibility. */
|
||||||
int save_ver;
|
int save_ver;
|
||||||
tree id2, alias;
|
tree id2, alias;
|
||||||
|
#endif
|
||||||
|
|
||||||
SET_IDENTIFIER_GLOBAL_VALUE (id, decl);
|
SET_IDENTIFIER_GLOBAL_VALUE (id, decl);
|
||||||
if (IDENTIFIER_GLOBAL_VALUE (id) != decl)
|
if (IDENTIFIER_GLOBAL_VALUE (id) != decl)
|
||||||
inform (DECL_SOURCE_LOCATION (decl), "-fabi-version=4 (or =0) "
|
inform (DECL_SOURCE_LOCATION (decl), "-fabi-version=4 (or =0) "
|
||||||
"avoids this error with a change in vector mangling");
|
"avoids this error with a change in vector mangling");
|
||||||
|
|
||||||
|
#ifdef ASM_OUTPUT_DEF
|
||||||
save_ver = flag_abi_version;
|
save_ver = flag_abi_version;
|
||||||
flag_abi_version = 0;
|
flag_abi_version = 0;
|
||||||
id2 = mangle_decl_string (decl);
|
id2 = mangle_decl_string (decl);
|
||||||
|
@ -3086,8 +3088,8 @@ mangle_decl (const tree decl)
|
||||||
cgraph_same_body_alias (alias, decl);
|
cgraph_same_body_alias (alias, decl);
|
||||||
else
|
else
|
||||||
varpool_extra_name_alias (alias, decl);
|
varpool_extra_name_alias (alias, decl);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generate the mangled representation of TYPE. */
|
/* Generate the mangled representation of TYPE. */
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2010-03-05 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* g++.dg/abi/mangle40.C: Require weak and alias.
|
||||||
|
|
||||||
2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
|
2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
|
||||||
|
|
||||||
PR middle-end/42326
|
PR middle-end/42326
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
// PR c++/12909
|
// PR c++/12909
|
||||||
// { dg-do compile { target i?86-*-* x86_64-*-* } }
|
// { dg-do compile { target i?86-*-* x86_64-*-* } }
|
||||||
|
// { dg-require-weak }
|
||||||
|
// { dg-require-alias }
|
||||||
// { dg-options "-mavx -Wabi -fabi-version=2" }
|
// { dg-options "-mavx -Wabi -fabi-version=2" }
|
||||||
// { dg-final { scan-assembler "weak\[^\n\]*_Z1fIDv4_fEvT_" } }
|
// { dg-final { scan-assembler "weak\[^\n\]*_Z1fIDv4_fEvT_" } }
|
||||||
// { dg-final { scan-assembler "weak\[^\n\]*_Z1fIU8__vectorfEvT_" } }
|
// { dg-final { scan-assembler "weak\[^\n\]*_Z1fIU8__vectorfEvT_" } }
|
||||||
|
|
Loading…
Reference in New Issue