summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/complit11.C
blob: 0662543d941b8659e5c2316a572e6afdb8c037af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do compile }
// { dg-options "" }

struct A { int i; };

template<int t>
void foo()
{
    ((struct A) { 0 }).i += 1;	// { dg-error "temporary" }
}

void g(void)
{
  foo<0>();
}