summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/crash2.C
blob: 5379bb159d1b151224e7547da1f501e53da72c8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/14267
 
class foo {
public: static int& x;
};
int temp;
int& foo::x=temp;

int main() {
  int x = 3;
  &foo::x = x; // { dg-error "" }
  return 0;
}