From: Jason Merrill Date: Wed, 23 Jan 2002 12:49:48 +0000 (-0500) Subject: re PR c++/5453 (Compiled program crash - inheritance/template/friend class problem) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=152d6a868dd45d8da9887fd548f221585c682862;p=gcc.git 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 --- diff --git a/gcc/testsuite/g++.dg/inherit/null1.C b/gcc/testsuite/g++.dg/inherit/null1.C new file mode 100644 index 00000000000..0908a01b91c --- /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; +}