mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-05 20:29:45 +08:00
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
This commit is contained in:
parent
d9e916d988
commit
152d6a868d
15
gcc/testsuite/g++.dg/inherit/null1.C
Normal file
15
gcc/testsuite/g++.dg/inherit/null1.C
Normal file
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user