This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32241] [4.1/4.2/4.3 regression] ICE trying to call x.~X(); in a template
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2007 22:20:39 -0000
- Subject: [Bug c++/32241] [4.1/4.2/4.3 regression] ICE trying to call x.~X(); in a template
- References: <bug-32241-14668@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from reichelt at gcc dot gnu dot org 2007-06-09 22:20 -------
Even shorter testcase:
=================================
template<typename T> struct A
{
T& foo();
A() { foo.~T(); }
};
A<int> a;
=================================
With checking enabled I get the following crash:
bug.cc: In constructor 'A<T>::A() [with T = int]':
bug.cc:8: instantiated from here
bug.cc:5: internal compiler error: tree check: expected field_decl, have
baselink in component_ref_field_offset, at expr.c:5960
Please submit a full bug report, [etc.]
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Keywords| |monitored
Summary|Compiler segmentation fault |[4.1/4.2/4.3 regression] ICE
|when trying to call x.~X(); |trying to call x.~X(); in a
|(X &x = f();) in a template |template
Target Milestone|--- |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32241