8.0.min.ii:15: error: non-trivial conversion at assignment
struct 
{
  X:: * const __pfn;
  long int __delta;
} * const *
struct 
{
  X:: * const __pfn;
  long int __delta;
} * const &
__ptr = __ptr.24

which is gimplified from the INIT_EXPR

__ptr = (struct
  {
    X:: * const __pfn;
    long int __delta;
  } * const *) _M_access ((union _Any_data *) __source)

where __ptrs type is structurally equivalent to the type the _M_access
return value is converted to, but it has no relationship to it.

The backtrace where this INIT_EXPR is created from is

#0  build2_stat (code=INIT_EXPR, tt=0x2b9977879270, arg0=0x2b997792abb0, 
    arg1=0x2b99778c2440)
    at /space/rguenther/src/svn/pointer_plus/gcc/tree.c:3064
#1  0x00000000004faa41 in split_nonconstant_init (dest=0x2b997792abb0, 
    init=0x2b99778c2440)
    at /space/rguenther/src/svn/pointer_plus/gcc/cp/typeck2.c:553
#2  0x00000000004faea8 in store_init_value (decl=0x2b997792abb0, 
    init=0x2b99778c2440)
    at /space/rguenther/src/svn/pointer_plus/gcc/cp/typeck2.c:626
#3  0x0000000000445eaf in check_initializer (decl=0x2b997792abb0, 
    init=0x2b99778c2440, flags=0, cleanup=0x7fff34377270)
    at /space/rguenther/src/svn/pointer_plus/gcc/cp/decl.c:4892
#4  0x0000000000448f10 in cp_finish_decl (decl=0x2b997792abb0, 
    init=0x2b99778c2440, init_const_expr_p=0 '\0', asmspec_tree=0x0, flags=0)
    at /space/rguenther/src/svn/pointer_plus/gcc/cp/decl.c:5291
#5  0x00000000004498e4 in finish_decl (decl=0x2b997792abb0, 
    init=0x2b99778c2440, asmspec_tree=0x0)
    at /space/rguenther/src/svn/pointer_plus/gcc/cp/decl.c:5452
#6  0x00000000004c4289 in tsubst_expr (t=0x2b9977823480, args=0x2b9977717510, 
    complain=tf_warning_or_error, in_decl=0x2b9977815d00, 
    integral_constant_expression_p=0 '\0')
    at /space/rguenther/src/svn/pointer_plus/gcc/cp/pt.c:9850
#7  0x00000000004c3353 in tsubst_expr (t=0x2b997780f930, args=0x2b9977717510, 
) at /space/rguenther/src/svn/pointer_plus/gcc/cp/pt.c:9771
#8  0x00000000004c5877 in tsubst_expr (t=0x2b997780c7d0, args=0x2b9977717510, 
    complain=tf_warning_or_error, in_decl=0x2b9977815d00, 
    integral_constant_expression_p=0 '\0')
    at /space/rguenther/src/svn/pointer_plus/gcc/cp/pt.c:9912
#9  0x00000000004ee15b in instantiate_decl (d=0x2b997791bf00, defer_ok=0, 
    expl_inst_class_mem_p=0 '\0')
    at /space/rguenther/src/svn/pointer_plus/gcc/cp/pt.c:14415
#10 0x00000000004eea19 in instantiate_pending_templates (retries=0)
    at /space/rguenther/src/svn/pointer_plus/gcc/cp/pt.c:14520
#11 0x000000000054d6b0 in cp_write_global_declarations ()
    at /space/rguenther/src/svn/pointer_plus/gcc/cp/decl2.c:3057
#12 0x0000000000a71ed6 in compile_file ()
    at /space/rguenther/src/svn/pointer_plus/gcc/toplev.c:1057
#13 0x0000000000a73aa8 in do_compile ()
    at /space/rguenther/src/svn/pointer_plus/gcc/toplev.c:2151
#14 0x0000000000a73b0c in toplev_main (argc=15, argv=0x7fff3437a0f8)
    at /space/rguenther/src/svn/pointer_plus/gcc/toplev.c:2183
#15 0x00000000006f17f3 in main (argc=15, argv=0x7fff3437a0f8)
    at /space/rguenther/src/svn/pointer_plus/gcc/main.c:35

The strange thing is that w/o -fstrict-aliasing only the trees of
other functions than _M_get_pointer are changed (they get some
change_dynamic_type expressions).


-- 
           Summary: Mismatched types with pointer to member functions and -
                    fstrict-aliasing
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org
OtherBugsDependingO 22368
             nThis:


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32882

Reply via email to