This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/34585] [4.3 Regression] ICE in remove_useless_stmts_1, at tree-cfg.c:1863



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-01-04 12:51 -------
(gdb) up
#1  0x00000000008a11f9 in remove_useless_stmts_1 (tp=0x2b18581cea30, 
    data=0x7fff53ff9920) at /space/rguenther/src/svn/trunk/gcc/tree-cfg.c:1863
1863          gcc_unreachable ();
(gdb) call debug_generic_expr (*tp)
self->bounds = {}

is a MODIFY_EXPR.  Gimple looks like

  self->bounds = {};
  self->coordBounds = self->bounds;
  self->D.30021.dirty = 1;

gimplified from

  self->coordBounds = self->bounds = NSZeroRect;
  self->D.30021.dirty = 1;

I don't think this is a dup.

Gimplifying the rhs with fb_rvalue creates self->bounds = {}; w/o converting
that to tuples.  It dispatches to gimplify_modify_expr_rhs which generates
it but returns GS_UNHANDLED right away, which looks bogus:

      case VAR_DECL:
        /* If we're assigning from a constant constructor, move the
           constructor expression to the RHS of the MODIFY_EXPR.  */
        if (DECL_INITIAL (*from_p)
            && TYPE_READONLY (TREE_TYPE (*from_p))
            && TREE_CODE (DECL_INITIAL (*from_p)) == CONSTRUCTOR)
          {
            *from_p = DECL_INITIAL (*from_p);
            ret = GS_OK;
          }
        ret = GS_UNHANDLED;
        break;

So yes - it's a dup in that its caused by the same patch.

Even if you fix the above to return GS_OK, the modified initialization will
not get tuplified.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aldyh at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]