aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900519_04.C
blob: 5074c5a4cd0dedf09887759358afaadc74de16be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-do run  }
// g++ 1.37.1 bug 900519_04

// The following legal code causes g++ to segfault.

// cfront 2.0 passes this test.

// keywords: segfault, references, initialization

int cint_obj = 9;

void take_cint_ref (int& arg) { }

int& cint_ref_0 = cint_obj;
int& cint_ref_1 = cint_obj;

void test_0 ()
{
  take_cint_ref (cint_ref_1);	// causes segfault
}

int main () { return 0; }