[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug c++/29225] [4.0/4.1/4.2 regression] ICE in gimplify_expr, at gimplify.c:4513




------- 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

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.



Reply to: