C++ PATCH for c++/47488 (ICE on string literal in function template signature)

Message ID 4D7666E9.6000206@redhat.com
State New
Headers show

Commit Message

Jason Merrill March 8, 2011, 5:27 p.m.
We don't know how to mangle a STRING_CST yet, but we don't need to 
crash.  There is a recently added mangling in the ABI document, but it 
is inadequate, so I'd like to get that fixed before adding it to G++.

Tested x86_64-pc-linux-gnu, applied to trunk.
commit 2dceb38738c4aedc2e64bf8e8aa4c621b15e61dd
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Mar 8 12:07:09 2011 -0500

    	PR c++/47488
    	* mangle.c (write_template_arg_literal) [STRING_CST]: Sorry.


diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index c46ba30..f063d47 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -2764,6 +2764,10 @@  write_template_arg_literal (const tree value)
       write_real_cst (value);
+    case STRING_CST:
+      sorry ("string literal in function template signature");
+      break;
       gcc_unreachable ();