summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/ref1.C
blob: df4ff470d09605764711d086ed398a93a6ac66f1 (plain)
1
2
3
4
5
6
7
8
9
10
// { dg-do assemble  }

int f();

void g()
{
  const int& i = f(); // OK
  int& j = f(); // { dg-error "" } initialization of non-const reference 
  const volatile int& k = f(); // { dg-error "" } initialization of volatile ref
}