aboutsummaryrefslogtreecommitdiff
path: root/final/ABI-Testsuite/test/s2_9/builtin_void.xpp
diff options
context:
space:
mode:
Diffstat (limited to 'final/ABI-Testsuite/test/s2_9/builtin_void.xpp')
-rwxr-xr-xfinal/ABI-Testsuite/test/s2_9/builtin_void.xpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/final/ABI-Testsuite/test/s2_9/builtin_void.xpp b/final/ABI-Testsuite/test/s2_9/builtin_void.xpp
new file mode 100755
index 00000000..5a31d548
--- /dev/null
+++ b/final/ABI-Testsuite/test/s2_9/builtin_void.xpp
@@ -0,0 +1,23 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler -c cxx_rtti cxx_exceptions %s -o %t.o
+// RUN: linker %t.o -o %t%exeext
+// RUN: bindump %t.o| FileCheck %s
+
+#include <typeinfo>
+
+// Test run-time library includes support for builtin type "void"
+
+int global_int = 10;
+void const *global_ptr;
+
+// CHECK-DAG: _ZTIv
+const std::type_info &foo1() { const std::type_info &t = typeid(void); return t; }
+// CHECK-DAG: _ZTIPv
+void foo2() { throw (void *)&global_int; }
+// CHECK-DAG: _ZTIPKv
+void foo3() { try { foo2(); } catch(void const *p) { } }
+
+int main(int argc, char *argv[]) {
+ return 0;
+}