public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/20409] New: ICE in simplify_subreg with -fprofile-generate
@ 2005-03-10 16:21 jakub at gcc dot gnu dot org
  2005-03-10 16:25 ` [Bug target/20409] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-03-10 16:21 UTC (permalink / raw)
  To: gcc-bugs

/* { dg-do compile } */
/* { dg-options "-O2 -fprofile-generate" } */

struct S
{
  int a;
  void **b;
};

void
foo (struct S *x, int y)
{
  if (!x)
    return;
  if (y >= x->a)
    return;
  x->a--;
  for (; y < x->a; y++)
    x->b[y] = x->b[y + 1];
  x->b[x->a] = (void *) 0;
}

ICEs on IA-64 during combine, but the bug is earlier.
CSE2 creates:
(insn 42 41 87 3 (set (reg/v:SI 344 [ y.8 ])
        (reg:DI 378)) 4 {*movsi_internal} (nil)
    (nil))
which is invalid because the modes don't match.
Before CSE2 there is:
(insn 100 99 101 0 (set (reg:DI 378)
        (reg:DI 113 in1)) -1 (nil)
    (nil))
...
(insn 103 102 104 0 (set (reg:DI 113 in1)
        (reg:DI 378)) -1 (nil)
    (nil))
...
(insn 12 11 13 0 (set (reg/v:SI 350 [ y ])
        (reg:SI 113 in1 [ y ])) 4 {*movsi_internal} (nil)
    (nil))
...
(insn 42 41 87 3 (set (reg/v:SI 344 [ y.8 ])
        (reg/v:SI 350 [ y ])) 4 {*movsi_internal} (nil)
    (nil))
where insns 100 and 103 and code around it are created by .bp pass.

-- 
           Summary: ICE in simplify_subreg with -fprofile-generate
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: critical
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: ia64-linux


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


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

* [Bug target/20409] ICE in simplify_subreg with -fprofile-generate
  2005-03-10 16:21 [Bug target/20409] New: ICE in simplify_subreg with -fprofile-generate jakub at gcc dot gnu dot org
@ 2005-03-10 16:25 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-10 16:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-10 16:24 -------
This is not a target bug but rather a bug in CSE.
This is a dup of bug 20249.

*** This bug has been marked as a duplicate of 20249 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2005-03-10 16:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-10 16:21 [Bug target/20409] New: ICE in simplify_subreg with -fprofile-generate jakub at gcc dot gnu dot org
2005-03-10 16:25 ` [Bug target/20409] " 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).