This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Power of the G++ test suite
- To: egcs at cygnus dot com
- Subject: Re: Power of the G++ test suite
- From: Nathan Myers <ncm at cantrip dot org>
- Date: Wed, 22 Jul 1998 15:49:07 -0700
- Newsgroups: cygnus.egcs
- Organization: http://www.cantrip.org/
- References: <199807210505.WAA28901@atrus.synopsys.com>, <199807221309.PAA02601.cygnus.egcs@jolan.ppro>
Carlo Wood wrote:
> I am sorry to bring this up again, but what is wrong with the
> test I contributed for the g++ test suite? ...
> If the reason is that the "official guys" who should make
> the decision and/or comment want me to leave this project
> then please just say so - preferably in public with the reason
> for it - and I will do so.
I tried http://www.cygnus.com/ml/egcs-patches/1998-Jul/0330.html
and got an internal compiler error because my browser mangled it.
(It may be worth fixing that, but we know we have serious parser
problems.)
After I grabbed the original text from the html source, I got the
same error message as Carlo. Interestingly, the compiler _should_
have reported that the name A<>::reversed_t is not accessible to
members of B<>. Another bug.
After a bit of experimentation, I found that the following is
sufficient to exercise the bug:
struct V { virtual ~V() {} };
template <class T> struct A : virtual V { };
template <class T> struct B {
virtual void f() { T foo; }
};
int main() { B< A<int> > bar; }
$ egcs-2.91.50 -O -fnew-abi virtbug.cc
...
*.o(.B<A<int> >::gnu.linkonce.t.f(void)+0xf): undefined reference
to `A<int>::V virtual table'
[twice]
Interestingly, if we replace B<>::f with an equivalent B<>::~B,
it fails to tickle the bug.
FWIW, the EDG compiler accepts this code.
This seems to me worth adding to the list of test cases
if it doesn't duplicate what's already there, but I'm not
an "official guy".
Nathan Myers
ncm@cantrip.org