aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/return1.C
blob: 5b998460ab3160c1a40b8f78a1d9a312b6a11447 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Build don't link:
// Special g++ Option: 

struct C {
    int f() {return 0;}
};

struct D {
    C a[1];
    C* g();
};

C* D::g() {
    int i = 0;
    while (i < 1 && a[i].f() != 1) {}
    return undefined_variable; // ERROR - 
}