diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/template1.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/template1.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template1.C b/gcc/testsuite/g++.old-deja/g++.jason/template1.C new file mode 100644 index 000000000..359c8f165 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.jason/template1.C @@ -0,0 +1,20 @@ +// { dg-do assemble } +// PRMS Id: 4688 +// Bug: g++ can't deal with templates instantiated within extern "C". + +class Gnaf { +public: + virtual int invariant (); +}; + +template <class T> class Array : public Gnaf { +public: + virtual int invariant(); +}; + +extern "C" +int foo() +{ + Array<int> toConv; + return 0; +} |