[Bug c++/15818] New: [3.5 Regression] ice on werid templates
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Jun 4 05:23:00 GMT 2004
While looking to see if PR 13088 still exist I came accross this ICE:
nested_deduction.cpp: In function `int main()':
nested_deduction.cpp:43: internal compiler error: tree check: expected class 't', have 'x' (tree_vec) in
cp_type_quals, at cp/typeck.c:6207
Please submit a full bug report,with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Reduced a little by removing the dependence on the headers:
struct a_vis{};
struct a_ref{};
struct no_nest
{};
template<typename Referent>
struct non_nested_owner
{
typedef no_nest nester ;
};
template<typename Visitor>
struct curry_visitor_referent
{
template<typename Referent>
struct owner
{
typedef curry_visitor_referent<Visitor> nester;
};
};
template<typename Nester, typename Referent>
struct nester_referent
{
nester_referent(void){}
};
template<typename Visitor, typename Referent>
struct nester_referent<curry_visitor_referent<Visitor>, Referent>
{
nester_referent(void){}
};
template<typename OwnerReferent>
struct nested_deduction
{
nested_deduction(void){}
};
template<template<typename>class OwnerTmpl, typename Referent>
struct nested_deduction<OwnerTmpl<Referent> >
: public nester_referent<typename OwnerTmpl<Referent>::nester, Referent>
{
nested_deduction(void){}
};
int main(void)
{
nested_deduction<non_nested_owner<a_ref> > non_nested;
nested_deduction<curry_visitor_referent<a_vis>::owner<a_ref> > yes_nested;
return 0;
}
--
Summary: [3.5 Regression] ice on werid templates
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 13088
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15818
More information about the Gcc-bugs
mailing list