------- Comment #1 from rguenth at gcc dot gnu dot org  2010-07-04 14:38 -------
Confirmed.

The value-expr is odd:

;; Function virtual Halfedge_handle Ovl_visitor::insert_at_vertices() (null)
;; enabled by -tree-original


{
  struct Halfedge_handle res [value-expr: <retval>];
  struct Halfedge_handle he;

  (void) 0;
    struct Halfedge_handle he;
  <<cleanup_point <<< Unknown tree: expr_stmt
  (void) (he = TARGET_EXPR <D.1722, <retval>>) >>>
>>;
  <<cleanup_point return <retval>>>;
}

so are assignments from <retval> anyway.  Because <retval> has DECL_IGNORED_P
set we try to

  /* Try to alleviate the effects of the gimplification creating artificial
     temporaries (see for example is_gimple_reg_rhs) on the debug info.  */
  if (!gimplify_ctxp->into_ssa
      && DECL_P (*from_p)
      && DECL_IGNORED_P (*from_p)
      && DECL_P (*to_p)
      && !DECL_IGNORED_P (*to_p))
    {
      if (!DECL_NAME (*from_p) && DECL_NAME (*to_p))
        DECL_NAME (*from_p)
          = create_tmp_var_name (IDENTIFIER_POINTER (DECL_NAME (*to_p)));
      DECL_DEBUG_EXPR_IS_FROM (*from_p) = 1;
      SET_DECL_DEBUG_EXPR (*from_p, *to_p);

which requires a VAR_DECL as *from_p.


-- 

rguenth 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         |2010-07-04 14:38:16
               date|                            |
            Summary|ICE: tree check: expected   |[4.6 Regression] ICE: tree
                   |var_decl, have result_decl  |check: expected var_decl,
                   |in gimplify_modify_expr     |have result_decl in
                   |                            |gimplify_modify_expr
   Target Milestone|---                         |4.6.0


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

Reply via email to