public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14764] [lno] ice-on-valid-code, tree check: expected ssa_name, have var_decl in register_definitions_for_stmt, at tree-ssa-dom.c:3172
       [not found] <20040328223625.14764.belyshev@lubercy.com>
@ 2004-05-02  3:09 ` pinskia at gcc dot gnu dot org
  2004-05-02 17:18 ` [Bug optimization/14764] [lno] tree check: expected ssa_name, have var_decl in register_new_def, at tree-into-ssa.c:1259 belyshev at lubercy dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-02  3:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-02 03:09 -------
Do you know if this happen anymore?

-- 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug optimization/14764] [lno] tree check: expected ssa_name, have var_decl in register_new_def, at tree-into-ssa.c:1259
       [not found] <20040328223625.14764.belyshev@lubercy.com>
  2004-05-02  3:09 ` [Bug optimization/14764] [lno] ice-on-valid-code, tree check: expected ssa_name, have var_decl in register_definitions_for_stmt, at tree-ssa-dom.c:3172 pinskia at gcc dot gnu dot org
@ 2004-05-02 17:18 ` belyshev at lubercy dot com
  2004-05-03 13:11 ` rakdver at gcc dot gnu dot org
  2004-08-29 19:43 ` [Bug tree-optimization/14764] " pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 4+ messages in thread
From: belyshev at lubercy dot com @ 2004-05-02 17:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From belyshev at lubercy dot com  2004-05-02 17:18 -------
>Do you know if this happen anymore?

Yes, this still happens:

$ /usr/local/gcc-lno/bin/gcc -O1 bug.i 
bug.i: In function `fun':
bug.i:5: internal compiler error: tree check: expected ssa_name, have var_decl
in register_new_def, at tree-into-ssa.c:1259
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$ /usr/local/gcc-lno/bin/gcc --version | grep gcc
gcc (GCC) 3.5-tree-ssa-lno 20040502 (merged 20040425)

Note that 

     __asm__ ("neg\t%0" 

should be

     __asm__ ("negl\t%0"

but it doesn't matter because IMO this bug is not x86-specific.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[lno] ice-on-valid-code,    |[lno] tree check: expected
                   |tree check: expected        |ssa_name, have var_decl in
                   |ssa_name, have var_decl in  |register_new_def, at tree-
                   |register_definitions_for_stm|into-ssa.c:1259
                   |t, at tree-ssa-dom.c:3172   |


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug optimization/14764] [lno] tree check: expected ssa_name, have var_decl in register_new_def, at tree-into-ssa.c:1259
       [not found] <20040328223625.14764.belyshev@lubercy.com>
  2004-05-02  3:09 ` [Bug optimization/14764] [lno] ice-on-valid-code, tree check: expected ssa_name, have var_decl in register_definitions_for_stmt, at tree-ssa-dom.c:3172 pinskia at gcc dot gnu dot org
  2004-05-02 17:18 ` [Bug optimization/14764] [lno] tree check: expected ssa_name, have var_decl in register_new_def, at tree-into-ssa.c:1259 belyshev at lubercy dot com
@ 2004-05-03 13:11 ` rakdver at gcc dot gnu dot org
  2004-08-29 19:43 ` [Bug tree-optimization/14764] " pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 4+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2004-05-03 13:11 UTC (permalink / raw)
  To: gcc-bugs


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug tree-optimization/14764] [lno] tree check: expected ssa_name, have var_decl in register_new_def, at tree-into-ssa.c:1259
       [not found] <20040328223625.14764.belyshev@lubercy.com>
                   ` (2 preceding siblings ...)
  2004-05-03 13:11 ` rakdver at gcc dot gnu dot org
@ 2004-08-29 19:43 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-29 19:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-29 19:43 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-08-29 19:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20040328223625.14764.belyshev@lubercy.com>
2004-05-02  3:09 ` [Bug optimization/14764] [lno] ice-on-valid-code, tree check: expected ssa_name, have var_decl in register_definitions_for_stmt, at tree-ssa-dom.c:3172 pinskia at gcc dot gnu dot org
2004-05-02 17:18 ` [Bug optimization/14764] [lno] tree check: expected ssa_name, have var_decl in register_new_def, at tree-into-ssa.c:1259 belyshev at lubercy dot com
2004-05-03 13:11 ` rakdver at gcc dot gnu dot org
2004-08-29 19:43 ` [Bug tree-optimization/14764] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).