summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/defarg12.C
blob: 2d2d7e7a06ad118d606ba920757a960c7f8e5294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* PR28266 This used to ICE in gimple_add_tmp_var */
/* { dg-do compile } */

struct A
{
  int i;
  A(int = X); /* { dg-error "was not declared in this scope" }*/
};

void foo()
{
  A().i; /* { dg-error "default argument" } */
}