--- include/dwarf2.h.jj	2010-06-09 13:42:16.000000000 +0200
+++ include/dwarf2.h	2010-06-17 08:33:07.000000000 +0200
@@ -654,6 +654,8 @@ enum dwarf_type
     DW_ATE_signed_fixed = 0xd,
     DW_ATE_unsigned_fixed = 0xe,
     DW_ATE_decimal_float = 0xf,
+    /* DWARF 4.  */
+    DW_ATE_UTF = 0x10,
 
     DW_ATE_lo_user = 0x80,
     DW_ATE_hi_user = 0xff,
--- gcc/dwarf2out.c.jj	2010-06-17 08:17:11.000000000 +0200
+++ gcc/dwarf2out.c	2010-06-17 09:17:12.000000000 +0200
@@ -12377,6 +12377,21 @@ base_type_die (tree type)
   switch (TREE_CODE (type))
     {
     case INTEGER_TYPE:
+      if ((dwarf_version >= 4 || !dwarf_strict)
+	  && is_cxx ()
+	  && TYPE_NAME (type)
+	  && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
+	  && DECL_SOURCE_LOCATION (TYPE_NAME (type)) == BUILTINS_LOCATION
+	  && DECL_NAME (TYPE_NAME (type)))
+	{
+	  const char *name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
+	  if (strcmp (name, "char16_t") == 0
+	      || strcmp (name, "char32_t") == 0)
+	    {
+	      encoding = DW_ATE_UTF;
+	      break;
+	    }
+	}
       if (TYPE_STRING_FLAG (type))
 	{
 	  if (TYPE_UNSIGNED (type))
