This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34972] New: ICE in write_type, at cp/mangle.c:1648
- From: "marcin-konarski at o2 dot pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jan 2008 15:11:07 -0000
- Subject: [Bug c++/34972] New: ICE in write_type, at cp/mangle.c:1648
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Presented test case produces following output:
g++ ice.cxx
ice.cxx: In member function '__typeof__ (ice<function_t>::tp(tType()))
ice<function_t>::foo(const tType&) const [with tType = int, function_t = bool
(*)(long int)]':
ice.cxx:9: internal compiler error: in write_type, at cp/mangle.c:1648
The test case:
ice.cxx:
template<typename function_t>
struct ice
{
function_t const& CALLER;
static function_t tp;
ice( function_t const& func ) : CALLER( func ) { }
template<typename tType>
typeof( tp( tType() ) ) foo( tType const& value ) const
{ return ( CALLER( value ) ); }
};
bool iceh( int long a )
{
return ( a > 1 );
}
int main( int, char** )
{
return ( ice<typeof(&iceh)>( &iceh ).foo( 3 ) ? 7 : 13 ) ;
}
--
Summary: ICE in write_type, at cp/mangle.c:1648
Product: gcc
Version: 4.2.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: marcin-konarski at o2 dot pl
GCC build triplet: i486-linux-gnu
GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34972