summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/inherit/covariant12.C
blob: 434082abb0daf546d539059587fe9db98e64e201 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (C) 2004 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 27 Feb 2005<nathan@codesourcery.com>

// PR 20232: ICE on invalid

struct T { };

struct S;

struct B
{
  virtual T *Foo (); // { dg-error "overriding" "" }
};

struct D : B
{
  virtual S *Foo (); // { dg-error "invalid covariant" "" }
};