Bug 12008 - ICE on legal code, gcc 3.3.1
Summary: ICE on legal code, gcc 3.3.1
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.3.1
: P3 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2003-08-21 12:38 UTC by rz
Modified: 2003-12-28 03:30 UTC (History)
1 user (show)

See Also:
Host:
Target: m68k-unknown-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-08-25 14:08:51


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rz 2003-08-21 12:38:54 UTC
ICE when compiling ide-cd module of Linux kernel. Also happens
in 3.3.x

Environment:
System: Linux rz 2.4.18-14 #1 Wed Sep 4 11:57:57 EDT 2002 i586 i586 i386 GNU/Linux
Architecture: i586

	<machine, os, target, libraries (multiple lines)>
host: i586-pc-linux-gnu
build: i586-pc-linux-gnu
target: m68k-unknown-linux-gnu
configured with: ../gcc-3.3.1-rz/configure --enable-languages=c --enable-checking=misc,tree,rtl --target=m68k-linux --enable-threads=posix --enable-shared --enable-__cxa_atexit

How-To-Repeat:

Compile as
	 m68k-linux-gcc -da   -O2   test1.c

## test1.c ##

typedef union {
        unsigned all :8;
} x_t;

char test_x (char sv)
{
        x_t error;
	
        if (sv) 
	   error.all = sv;

        return error.all;
}
#############
Comment 1 rz 2003-08-21 12:38:54 UTC
Fix:

no known fix yet.
Comment 2 Dara Hazeghi 2003-08-25 14:08:50 UTC
Confirmed. Occurs only with optimization though (not at -O0) so changing category accordingly.
Comment 3 Bernardo Innocenti 2003-09-27 03:33:47 UTC
Does not happen any more on mainline (20030927).
Comment 4 Andrew Pinski 2003-12-28 03:30:04 UTC
Fixed for 3.4.
Comment 5 rz 2003-12-28 12:14:09 UTC
Subject: Re:  ICE on legal code, gcc 3.3.1

confirmed with 3.4 20031210, compiles and works fine.