diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/mangle.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b31014f..cdb376d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2014-01-07 Jason Merrill <jason@redhat.com> + + PR c++/58965 + * mangle.c (write_guarded_var_name): Handle null DECL_NAME. + 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com> * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 6f32a43..dc7d4ea 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -3775,7 +3775,8 @@ mangle_conv_op_name_for_type (const tree type) static void write_guarded_var_name (const tree variable) { - if (strncmp (IDENTIFIER_POINTER (DECL_NAME (variable)), "_ZGR", 4) == 0) + if (DECL_NAME (variable) + && strncmp (IDENTIFIER_POINTER (DECL_NAME (variable)), "_ZGR", 4) == 0) /* The name of a guard variable for a reference temporary should refer to the reference, not the temporary. */ write_string (IDENTIFIER_POINTER (DECL_NAME (variable)) + 4); |