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 | 26 |
1 files changed, 26 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 000000000..a66302b62 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/lookup6.C @@ -0,0 +1,26 @@ +// { dg-do run } +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; +} |