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

* [Bug rtl-optimization/17825] [3.4/4.0 Regression] ICE in reg_bitfield_target_p
  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 ` giovannibajo at libero dot it
  2004-10-04 12:49 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: giovannibajo at libero dot it @ 2004-10-04 11:04 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
           Keywords|                            |ice-on-valid-code
            Summary|ICE in reg_bitfield_target_p|[3.4/4.0 Regression] ICE in
                   |                            |reg_bitfield_target_p
   Target Milestone|---                         |3.4.3


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


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

* [Bug rtl-optimization/17825] [3.4/4.0 Regression] ICE in reg_bitfield_target_p
  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
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-04 12:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-04 12:49 -------
Confirmed on the mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |4.0.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-04 12:49:30
               date|                            |


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


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

* [Bug rtl-optimization/17825] [3.4/4.0 Regression] ICE in reg_bitfield_target_p
  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
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-11-01  0:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-11-01 00:46 -------
Postponed until GCC 3.4.4.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.3                       |3.4.4


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


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

* [Bug rtl-optimization/17825] [3.4/4.0 Regression] ICE in reg_bitfield_target_p
  2004-10-04  6:59 [Bug rtl-optimization/17825] New: ICE in reg_bitfield_target_p jakub at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-11-24  7:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jakub at gcc dot gnu dot org  2004-11-24 07:16 -------
http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01574.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2004-10-04 12:49:30         |2004-11-24 07:16:35
               date|                            |


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


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

* [Bug rtl-optimization/17825] [3.4/4.0 Regression] ICE in reg_bitfield_target_p
  2004-10-04  6:59 [Bug rtl-optimization/17825] New: ICE in reg_bitfield_target_p jakub at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-11-24 22:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-11-24 22:29 -------
Subject: Bug 17825

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-rhl-branch
Changes by:	jakub@gcc.gnu.org	2004-11-24 22:28:46

Modified files:
	gcc            : ChangeLog combine.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: 20041119-1.c 

Log message:
	PR rtl-optimization/17825
	* combine.c (subst): Ignore STRICT_LOW_PART no matter if REG_P (new)
	or not.
	
	* gcc.c-torture/compile/20041119-1.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=2.2326.2.399.2.58&r2=2.2326.2.399.2.59
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/combine.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.400.4.6.2.3&r2=1.400.4.6.2.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.3389.2.170.2.29&r2=1.3389.2.170.2.30
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/20041119-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug rtl-optimization/17825] [3.4/4.0 Regression] ICE in reg_bitfield_target_p
  2004-10-04  6:59 [Bug rtl-optimization/17825] New: ICE in reg_bitfield_target_p jakub at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-11-27  9:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-11-27 09:39 -------
Subject: Bug 17825

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jakub@gcc.gnu.org	2004-11-27 09:39:01

Modified files:
	gcc            : ChangeLog combine.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: 20041119-1.c 

Log message:
	PR rtl-optimization/17825
	* combine.c (subst): Ignore STRICT_LOW_PART no matter if REG_P (new)
	or not.
	
	* gcc.c-torture/compile/20041119-1.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6580&r2=2.6581
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/combine.c.diff?cvsroot=gcc&r1=1.461&r2=1.462
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4656&r2=1.4657
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/20041119-1.c.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


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


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

* [Bug rtl-optimization/17825] [3.4 Regression] ICE in reg_bitfield_target_p
  2004-10-04  6:59 [Bug rtl-optimization/17825] New: ICE in reg_bitfield_target_p jakub at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-11-27  9:39 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-17  1:36 ` cvs-commit at gcc dot gnu dot org
  2005-03-17  2:04 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-17  1:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-17 01:36 -------
Subject: Bug 17825

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	sayle@gcc.gnu.org	2005-03-17 01:36:15

Modified files:
	gcc            : ChangeLog combine.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: 20041119-1.c 

Log message:
	PR rtl-optimization/17825
	Backport from mainline
	2004-11-27  Jakub Jelinek  <jakub@redhat.com>
	* combine.c (subst): Ignore STRICT_LOW_PART no matter if REG_P (new)
	or not.
	
	PR rtl-optimization/17825
	Backport from mainline
	2004-11-27  Jakub Jelinek  <jakub@redhat.com>
	* gcc.c-torture/compile/20041119-1.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.818&r2=2.2326.2.819
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/combine.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.400.4.13&r2=1.400.4.14
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.370&r2=1.3389.2.371
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/20041119-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.2.28.1



-- 


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


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

* [Bug rtl-optimization/17825] [3.4 Regression] ICE in reg_bitfield_target_p
  2004-10-04  6:59 [Bug rtl-optimization/17825] New: ICE in reg_bitfield_target_p jakub at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-17  2:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-17 02:04 -------
Fixed.

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


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