blob: a6f495674321fa99da343f1ba81c8f262f7b9108 [file] [log] [blame]
// Test that transaction_safe_dynamic can only be used on virtual functions.
// { dg-options "-fgnu-tm -std=c++14" }
void f() transaction_safe_dynamic; // { dg-error "virtual" }
auto a = []() transaction_safe_dynamic {}; // { dg-error "virtual" }
struct A {
void f() transaction_safe_dynamic; // { dg-error "virtual" }
virtual void g();
};
struct B: A {
void g() transaction_safe_dynamic;
};