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 <ja...@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);
       break;
 
+    case STRING_CST:
+      sorry ("string literal in function template signature");
+      break;
+
     default:
       gcc_unreachable ();
     }

Reply via email to