diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/scoping15.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/scoping15.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping15.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping15.C new file mode 100644 index 000000000..cc34c5f57 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.jason/scoping15.C @@ -0,0 +1,21 @@ +// { dg-do assemble } +// { dg-options "-ffriend-injection" } +// Bug: g++ ignores the :: qualification and dies trying to treat an integer +// variable as a list of functions. + +class DComplex { +public: + friend double imag(const DComplex& a); +}; + +class FComplex { +public: + friend float imag(const FComplex& a); +}; + +void +scnrm2(FComplex cx[]) +{ + int imag; + ::imag( cx[0] ); +} |