Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 15550
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Richard Henderson <rth@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Danny Smith <dannysmith@users.sourceforge.net>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 15550 depends on: Show dependency tree
Show dependency graph
Bug 15550 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2004-05-20 11:26 Opened: 2004-05-20 07:46
The following, compiled with -O1 results in ICE on i386-pc-mingw32,
with GCC-3.4.0.

-O0 and -O2 work fine.

On trunk, the code compiles at all optimisation levels

/* test1.c */
typedef struct _foo
{
  unsigned long _bkgd;
} FOO;

void wbkgdset (FOO* foo, unsigned long ch)
{
  unsigned long bkgdattr;

  if ( (ch & 0xFFFF0000UL) == 0UL )
    bkgdattr = 0x0000000UL;
  else
    bkgdattr = (ch & 0xFFFF0000UL);

  foo->_bkgd = (ch | bkgdattr);
}


>gcc-3.4.0  -O1 -c test1.c 
test1.c: In function `wbkgdset':
test1.c:17: error: unrecognizable insn:
(insn 36 11 23 0 (set (reg/v:SI 60 [ bkgdattr ])
        (and:SI (reg/v:SI 59 [ ch ])
            (const_int -65536 [0xffff0000]))) -1 (nil)
    (nil))
test1.c:17: internal compiler error: in extract_insn, at recog.c:2083
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.

If I simplify the if...else to:
bkgdattr = (ch & 0xFFFF0000UL);
there is no problem.

Danny

------- Comment #1 From Andrew Pinski 2004-05-20 11:26 -------
Confirmed.

------- Comment #2 From Mark Mitchell 2004-06-12 22:10 -------
Richard, this is another IA32 backend issue.

------- Comment #3 From Richard Henderson 2004-06-13 02:20 -------
Testing a patch.

------- Comment #4 From Mark Mitchell 2004-06-19 17:47 -------
How did the patch turn out?

------- Comment #5 From CVS Commits 2004-06-19 19:09 -------
Subject: Bug 15550

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	rth@gcc.gnu.org	2004-06-19 19:08:46

Modified files:
	gcc            : ChangeLog ifcvt.c 

Log message:
	PR target/15550
	* ifcvt.c (noce_try_move): Recognize all generated instructions.

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.513&r2=2.2326.2.514
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ifcvt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.136&r2=1.136.4.1


------- Comment #6 From CVS Commits 2004-06-19 19:13 -------
Subject: Bug 15550

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2004-06-19 19:13:04

Modified files:
	gcc            : ChangeLog ifcvt.c 

Log message:
	PR target/15550
	* ifcvt.c (noce_try_move): Recognize all generated instructions.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4043&r2=2.4044
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ifcvt.c.diff?cvsroot=gcc&r1=1.146&r2=1.147


------- Comment #7 From Mark Mitchell 2004-06-21 21:36 -------
Richard, it looks like you checked in a fix here.  If so, would you please
close
the PR?

------- Comment #8 From Richard Henderson 2004-06-21 21:47 -------
Fixed.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug