commit d13e197a238f2cbcca283e8d2332ea75af00b297
Author: Jason Merrill <jason@redhat.com>
Date: Fri Apr 13 17:34:31 2012 -0400
PR c++/52706
* mangle.c (write_type): nullptr_t is a builtin type.
@@ -788,6 +788,8 @@ Driver Undocumented
; argument.
; First selectable in G++ 4.7.
;
+; 7: The version of the ABI that treats nullptr_t as a builtin type.
+; First selectable in G++ 4.8.
; Additional positive integers will be assigned as new versions of
; the ABI become the default version of the ABI.
fabi-version=
@@ -2023,6 +2023,8 @@ write_type (tree type)
case NULLPTR_TYPE:
write_string ("Dn");
+ if (abi_version_at_least (7))
+ ++is_builtin_type;
break;
case TYPEOF_TYPE:
new file mode 100644
@@ -0,0 +1,8 @@
+// PR c++/52706
+// { dg-options "-std=c++11 -fabi-version=0" }
+// { dg-final { scan-assembler "_Z1fIDnLDn0EEiT_" } }
+
+template<class T, decltype(nullptr) = nullptr>
+int f(T);
+
+int i2 = f(nullptr); // 17