view gcc/testsuite/g++.dg/other/redecl2.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

// 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-message "defined here" }
int S::foo() { return 0; } // { dg-error "redefinition" }