aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2002-01-23 07:49:48 -0500
committerJason Merrill <jason@gcc.gnu.org>2002-01-23 07:49:48 -0500
commit152d6a868dd45d8da9887fd548f221585c682862 (patch)
tree259fc72646ab8b0285afd99e7d7439d7a9ddc52d /gcc
parentd9e916d988bfa12d3283ea89f5ba9c79e119a83b (diff)
downloadgcc-152d6a868dd45d8da9887fd548f221585c682862.zip
gcc-152d6a868dd45d8da9887fd548f221585c682862.tar.gz
gcc-152d6a868dd45d8da9887fd548f221585c682862.tar.bz2
re PR c++/5453 (Compiled program crash - inheritance/template/friend class problem)
PR c++/5453 * class.c (fixed_type_or_null): Fix thinko. From-SVN: r49135
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/inherit/null1.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/inherit/null1.C b/gcc/testsuite/g++.dg/inherit/null1.C
new file mode 100644
index 0000000..0908a01
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/null1.C
@@ -0,0 +1,15 @@
+// PR c++/5453: Test that we don't assume that the pointer target of a
+// reference is non-null just because we know the reference isn't.
+
+// { dg-do run }
+
+struct V { };
+struct A: virtual public V { };
+
+A* ap;
+A*& apr (ap);
+
+int main ()
+{
+ V* vp = apr;
+}