summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/redecl2.C
blob: 591c258b8911ed1cb386e7f12461125bebde9166 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/17816
// We failed to report duplicate definitions of pure virtual ns.

// { dg-do compile }

struct S {
  virtual int foo() = 0;
};
 
int S::foo() { return 0; } // { dg-error "defined here" }
int S::foo() { return 0; } // { dg-error "redefinition" }