view gcc/testsuite/g++.dg/abi/abi-tag23.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/77379
// { dg-options "-fabi-version=0 -Wabi=10" }

struct __attribute ((abi_tag ("bar"))) string { };

struct Mother
{
  virtual ~Mother() {};
  int bar;
};

struct Father
{
  virtual string get_foo()  = 0;
};

class Derived:
  public Mother,
  public Father
{
public:
  string get_foo();		// { dg-warning "mangled name" }
};

struct Final:
    public Derived
{
};

int main()
{
  Final().get_foo();
}

// { dg-final { scan-assembler "_ZThn\[0-9]+_N7Derived7get_fooB3barEv" } }