aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>1999-04-27 09:41:33 +0000
committerNathan Sidwell <nathan@acm.org>1999-04-27 09:41:33 +0000
commit223fa6cfd63a10839b4ec7a3155a8bcce71b167d (patch)
tree603a3e01ddc0e6e57f083c0c2010b040059626f9 /gcc/testsuite
parentda95846e8fcd1d49a6de3534ba313399873357c3 (diff)
* rtti.c (build_x_typeid): Check rtti is enabled.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@26675 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/rtti5.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/rtti5.C b/gcc/testsuite/g++.old-deja/g++.other/rtti5.C
new file mode 100644
index 00000000000..38a5146e8c9
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/rtti5.C
@@ -0,0 +1,14 @@
+// Build don't link:
+// Special g++ Options: -fno-rtti
+
+// Copyright (C) 1999 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 9 Apr 1999 <nathan@acm.org>
+// derrived from bug report from Alexander Zvyagin <zvyagin@mx.ihep.su>
+
+// check we don't die with disabled rtti
+
+
+int main(void) {
+ int i;
+ typeid(i); // ERROR - rtti disabled
+}