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 optimization/14764] [lno] tree check: expected ssa_name, have var_decl in register_new_def, at tree-into-ssa.c:1259


------- Additional Comments From rakdver at gcc dot gnu dot org  2004-05-03 13:11 -------
This patch fixes the problem, or better said, makes it latent. I believe
the same problem could occur on tree-ssa branch as well.  The way it works
is this:

We have

foo();
asm (... array ...);

Now the first time foo is scanned in get_stmt_operands, array is not yet marked
as call clobbered, and no virtual operand for it is added.  When asm is scanned,
array is marked as call clobbered (*).  When the foo statement is marked as
modified, VDEF for array is added to it; but at that moment we are in the ssa
form and we do not expect this to happen.

The patch below just eliminates the "when the foo statement is marked as
modified" part.  I believe the same bug may be latent on tree-ssa branch as well.

(*) this behavior was added by

2004-02-10  Diego Novillo  <dnovillo@redhat.com>
        ...
        * tree-ssa-operands.c: Include tree-pass.h and timevar.h
        (get_stmt_operands): Push/pop TV_TREE_OPS time var.
        Call mark_call_clobbered for asms that store to memory.
        ...

Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-cfg.c,v
retrieving revision 1.1.4.244.2.16
diff -c -3 -p -r1.1.4.244.2.16 tree-cfg.c
*** tree-cfg.c  25 Apr 2004 20:33:40 -0000      1.1.4.244.2.16
--- tree-cfg.c  3 May 2004 12:58:00 -0000
*************** tree_split_block (basic_block bb, void *
*** 4009,4017 ****
--- 4009,4022 ----
    bsi_tgt = bsi_start (new_bb);
    while (!bsi_end_p (bsi))
      {
+       bool was_modified;
+ 
        act = bsi_stmt (bsi);
+       was_modified = stmt_modified_p (act);
        bsi_remove (&bsi);
        bsi_insert_after (&bsi_tgt, act, BSI_NEW_STMT);
+       if (!was_modified)
+       unmodify_stmt (act);
      }


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dnovillo at redhat dot com
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-05-03 13:11:10
               date|                            |


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


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