diff options
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r-- | gcc/cp/mangle.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 69fe147f480..548998a086f 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -1339,7 +1339,7 @@ nested_anon_class_index (tree type) /* <unnamed-type-name> ::= Ut [ <nonnegative number> ] _ */ static void -write_unnamed_type_name (const tree type __attribute__ ((__unused__))) +write_unnamed_type_name (const tree type ATTRIBUTE_UNUSED) { int discriminator; MANGLE_TRACE_TREE ("unnamed-type-name", type); @@ -3503,12 +3503,17 @@ mangle_guard_variable (const tree variable) initialize a static reference. This isn't part of the ABI, but we might as well call them something readable. */ +static GTY(()) int temp_count; + tree mangle_ref_init_variable (const tree variable) { start_mangling (variable); write_string ("_ZGR"); write_name (variable, /*ignore_local_scope=*/0); + /* Avoid name clashes with aggregate initialization of multiple + references at once. */ + write_unsigned_number (temp_count++); return finish_mangling_get_identifier (/*warn=*/false); } |