diff mbox

[c++] : Fix pr/58835 [4.7/4.8/4.9 Regression] ICE with __PRETTY_FUNCTION__ in broken function

Message ID CAEwic4Y-pXcOpWndEAv3q3yWkntHyrA2QO2UMLJj3rt9R=jYHQ@mail.gmail.com
State New
Headers show

Commit Message

Kai Tietz Feb. 11, 2014, 2:11 p.m. UTC
Hi,

the following patch adds missing handling of error_mark_node result of
fname_decl within finish_fname.

ChangeLog

2014-02-11  Kai Tietz  <ktietz@redhat.com>

        PR c++/58835
        * semantics.c (finish_fname): Handle error_mark_node.

Regression tested for x86_64-unknown-linux-gnu, i686-w64-mingw32.  Ok for apply?

Regards,
Kai

Comments

Kai Tietz Feb. 13, 2014, 5:40 p.m. UTC | #1
Ping

----- Original Message -----
> Hi,
> 
> the following patch adds missing handling of error_mark_node result of
> fname_decl within finish_fname.
> 
> ChangeLog
> 
> 2014-02-11  Kai Tietz  <ktietz@redhat.com>
> 
>         PR c++/58835
>         * semantics.c (finish_fname): Handle error_mark_node.
> 
> Regression tested for x86_64-unknown-linux-gnu, i686-w64-mingw32.  Ok for
> apply?
> 
> Regards,
> Kai
> 
> Index: semantics.c
> ===================================================================
> --- semantics.c (Revision 207686)
> +++ semantics.c (Arbeitskopie)
> @@ -2630,7 +2630,8 @@ finish_fname (tree id)
>    tree decl;
> 
>    decl = fname_decl (input_location, C_RID_CODE (id), id);
> -  if (processing_template_decl && current_function_decl)
> +  if (processing_template_decl && current_function_decl
> +      && decl != error_mark_node)
>      decl = DECL_NAME (decl);
>    return decl;
>  }
>
Kai Tietz Feb. 19, 2014, 3:50 p.m. UTC | #2
Ping?

2014-02-11 15:11 GMT+01:00 Kai Tietz <ktietz70@googlemail.com>:
> Hi,
>
> the following patch adds missing handling of error_mark_node result of
> fname_decl within finish_fname.
>
> ChangeLog
>
> 2014-02-11  Kai Tietz  <ktietz@redhat.com>
>
>         PR c++/58835
>         * semantics.c (finish_fname): Handle error_mark_node.
>
> Regression tested for x86_64-unknown-linux-gnu, i686-w64-mingw32.  Ok for apply?
>
> Regards,
> Kai
>
> Index: semantics.c
> ===================================================================
> --- semantics.c (Revision 207686)
> +++ semantics.c (Arbeitskopie)
> @@ -2630,7 +2630,8 @@ finish_fname (tree id)
>    tree decl;
>
>    decl = fname_decl (input_location, C_RID_CODE (id), id);
> -  if (processing_template_decl && current_function_decl)
> +  if (processing_template_decl && current_function_decl
> +      && decl != error_mark_node)
>      decl = DECL_NAME (decl);
>    return decl;
>  }
Jason Merrill Feb. 19, 2014, 6 p.m. UTC | #3
OK.

Jason
diff mbox

Patch

Index: semantics.c
===================================================================
--- semantics.c (Revision 207686)
+++ semantics.c (Arbeitskopie)
@@ -2630,7 +2630,8 @@  finish_fname (tree id)
   tree decl;

   decl = fname_decl (input_location, C_RID_CODE (id), id);
-  if (processing_template_decl && current_function_decl)
+  if (processing_template_decl && current_function_decl
+      && decl != error_mark_node)
     decl = DECL_NAME (decl);
   return decl;
 }