aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/900324_02.C
blob: b77cc0375a87ab637869033148c43b63c2e8f255 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do assemble  }
// g++ 1.37.1 bug 900324_02

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

// Cfront 2.0 passes this test.

// keywords: segfault, function pointer, conditional operator ?:

void function_0 (int i) { }

void (*fp)(void);

void function_1 ()
{
  fp = 1 ? function_0 : fp;		// { dg-error "conditional expression|invalid conversion" } 
}

int main () { return 0; }