public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/17825] New: ICE in reg_bitfield_target_p
@ 2004-10-04  6:59 jakub at gcc dot gnu dot org
  2004-10-04 11:04 ` [Bug rtl-optimization/17825] [3.4/4.0 Regression] " giovannibajo at libero dot it
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-10-04  6:59 UTC (permalink / raw)
  To: gcc-bugs

register struct S *b asm ("rbp");
register unsigned int c asm ("rbx");
register unsigned int f asm ("r14");
extern int a;

void foo (int);

struct S
{
  unsigned int h[8];
};

void
bar (void)
{
  unsigned int j, k, l, m;

  j = (f & 0xffff) | ((b->h[2] & 0xffff) << 16);
  k = c & 0xffff;
  if (k == 0)
    {
      foo (0);
    }
  l = (j / k) & 0xffff;
  m = (j % k) & 0xffff;
  f = (f & 0xffff0000) | l;
  b->h[2] = (b->h[2] & 0xffff0000) | m;
}

on x86_64 causes ICE in reg_bitfield_target_p.
try_combine is called on i3:
(insn 33 32 35 2 (set (strict_low_part (subreg:HI (reg/v:SI 43 r14 [ f ]) 0))
        (subreg:HI (reg:SI 68) 0)) 56 {*movstricthi_1} (insn_list:REG_DEP_TRUE 30
(nil))
    (expr_list:REG_DEAD (reg:SI 68)
        (nil)))
and i2:
(insn 30 29 31 2 (parallel [
            (set (reg:SI 68)
                (and:SI (reg:SI 66)
                    (const_int 65535 [0xffff])))
            (clobber (reg:CC 17 flags))
        ]) 289 {*andsi_1} (insn_list:REG_DEP_TRUE 29 (nil))
    (expr_list:REG_DEAD (reg:SI 66)
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))

but somewhere changes the pattern of i3 into invalid rtl:
(set (strict_low_part (reg:HI 43 r14 [ f ]))
    (subreg:HI (reg:SI 66) 0))

(note missing subreg in the strict_low_part operand).
Works just fine in 3.3, reproduced in 3.4.2 and on HEAD.

-- 
           Summary: ICE in reg_bitfield_target_p
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: rtl-optimization
        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: x86_64-redhat-linux


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


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

end of thread, other threads:[~2005-03-17  2:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-04  6:59 [Bug rtl-optimization/17825] New: ICE in reg_bitfield_target_p jakub at gcc dot gnu dot org
2004-10-04 11:04 ` [Bug rtl-optimization/17825] [3.4/4.0 Regression] " giovannibajo at libero dot it
2004-10-04 12:49 ` pinskia at gcc dot gnu dot org
2004-11-01  0:47 ` mmitchel at gcc dot gnu dot org
2004-11-24  7:16 ` jakub at gcc dot gnu dot org
2004-11-24 22:29 ` cvs-commit at gcc dot gnu dot org
2004-11-27  9:39 ` cvs-commit at gcc dot gnu dot org
2005-03-17  1:36 ` [Bug rtl-optimization/17825] [3.4 " cvs-commit at gcc dot gnu dot org
2005-03-17  2:04 ` 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).