This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29225] [4.0/4.1/4.2 regression] ICE in gimplify_expr, at gimplify.c:4513
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Sep 2006 07:00:10 -0000
- Subject: [Bug c++/29225] [4.0/4.1/4.2 regression] ICE in gimplify_expr, at gimplify.c:4513
- References: <bug-29225-5724@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-09-26 07:00 -------
Reduced testcase:
struct ComputedAttribute {
int descriptor();
};
class AttributeDescriptor {};
template <typename T, typename R>
struct less_member_2_m
{
typedef R ( T::*T_mem_ptr );
T_mem_ptr mem_ptr;
template <typename R_alt>
bool operator()(R_alt & rhs )
{
T *a;
return ( a->*mem_ptr ) < rhs ;
}
};
template <typename T, typename R> less_member_2_m<T,R> make_less_member_2( R(
T::*mem_ptr ) ) {}
template <typename LHS, typename RHS>bool operator<( LHS lhs, RHS rhs );
void computedAttribute( AttributeDescriptor & desc )
{
make_less_member_2( &ComputedAttribute::descriptor ) (desc) ;
}
----
This is invalid as a->*mem_ptr cannot be used outside of a function. I don't
know if the orginal code is invalid though.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-09-26 07:00:10
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29225