This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71748] ICE on valid (?) C++ template code invoking a base destructor: in build_base_path, at cp/class.c:304
- From: "su at cs dot ucdavis.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 04 Jul 2016 01:27:38 +0000
- Subject: [Bug c++/71748] ICE on valid (?) C++ template code invoking a base destructor: in build_base_path, at cp/class.c:304
- Auto-submitted: auto-generated
- References: <bug-71748-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71748
--- Comment #1 from Zhendong Su <su at cs dot ucdavis.edu> ---
If we remove the template from the code, it'll be accepted:
$ g++-trunk -c -Wall -Wextra -std=c++11 good.cpp
$
$ cat good.cpp
struct A
{
virtual ~A () {}
};
struct B : public A
{
virtual ~B () {}
};
void foo ()
{
B *b = new B;
b->~A ();
// also accepted: b->A::~A();
}
int main ()
{
foo ();
return 0;
}