diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/lookup6.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/lookup6.C | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/lookup6.C b/gcc/testsuite/g++.old-deja/g++.other/lookup6.C new file mode 100644 index 00000000000..08f5ac521ed --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/lookup6.C @@ -0,0 +1,25 @@ +int f(int i) +{ + struct C { + int i; + C () : i(1) {} + int f() { + struct D { + int i; + D () : i(2) {} + int g() { return i; } + } d; + + return d.g(); + } + } c; + + return c.f(); +} + + +int main() +{ + if (f(0) != 2) + return 1; +} |