| 1 |
// { dg-do assemble } |
| 2 |
// GROUPS passed constructors |
| 3 |
// ctor file |
| 4 |
// Message-Id: <[email protected]> |
| 5 |
// From: [email protected] (Robert R. Henry) |
| 6 |
// Date: Mon, 8 Feb 93 08:31:39 PST |
| 7 |
extern "C" int printf (const char *, ...); |
| 8 |
class A{ |
| 9 |
public: |
| 10 |
inline A(int x){printf("constructing A with %d\n", x);} |
| 11 |
}; |
| 12 |
|
| 13 |
class B:public A{ // { dg-message "note" "" { target c++17_down } } non-default constructor |
| 14 |
private: |
| 15 |
public: |
| 16 |
}; |
| 17 |
|
| 18 |
int main() |
| 19 |
{ |
| 20 |
B(10);// { dg-error "match" "" { target c++17_down } } B doesn't have a constructor taking int |
| 21 |
} |