summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/explicit50.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/explicit50.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit50.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit50.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit50.C
new file mode 100644
index 000000000..4f11eda6e
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit50.C
@@ -0,0 +1,16 @@
+// { dg-do run }
+extern "C" void abort ();
+
+template <class T> int f ()
+{
+ return sizeof(T);
+}
+
+int main ()
+{
+ if (f<long> () != sizeof(long)
+ || f<char> () != sizeof(char)
+ || f<long> () != sizeof(long)
+ || f<long int> () != sizeof(long int))
+ abort ();
+}