[forwarded from http://bugs.debian.org/194749] works with 3.2.3 and HEAD 20030531. gcc-3.3 fails to build sane-backends 1.0.12-1 on m68k with the following internal error : gcc -c -g -O2 -W -Wall -DHAVE_CONFIG_H -I. -I. -I../include -I../include -DPATH_SANE_CONFIG_DIR=/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/share -DV_MAJOR=1 -DV_MINOR=0 -DBACKEND_NAME=dc25 -DLIBDIR=/usr/lib/sane dc25.c -o dc25.o dc25.c:213: warning: dereferencing type-punned pointer will break strict-aliasing rules dc25.c:310: warning: dereferencing type-punned pointer will break strict-aliasing rules dc25.c:323: warning: dereferencing type-punned pointer will break strict-aliasing rules dc25.c: In function `get_info': dc25.c:616: internal compiler error: in reg_overlap_mentioned_p, at rtlanal.c:1543 Building with -O1 or with gcc-3.2 (3.2.3-2) works fine. The same file compiled with -fPIC gives no error.
Created attachment 4124 [details] preprocessed source
Confirmed on m68k-rtems as well with gcc 3.2.3, 3.3 branch and mainline (20030526). Dara
Confirmed with gcc 3.3 branch (20030620).
Created attachment 4286 [details] Patch from mainline that fixes bug. Here is a patch from mainline that fixes the bug. I don't have access to m68k hardware so I have only tested this on the testcase. Since this is already on mainline there is unlikely to be problems with it, however, I haven't done the bootstrap test which is needed before a checkin, so I haven't checked it in yet.
Subject: Re: [3.3 regression] [m68k] ICE in reg_overlap_mentioned_p wilson at tuliptree dot org writes: > Patch from mainline that fixes bug. > > Here is a patch from mainline that fixes the bug. I don't have > access to m68k hardware so I have only tested this on the testcase. > Since this is already on mainline there is unlikely to be problems > with it, however, I haven't done the bootstrap test which is needed > before a checkin, so I haven't checked it in yet. - the patch fixes the bug on m68k-linux - bootstrap succeeded on m68k-linux, testsuite still running - bootstrap and testsuite succeeded on i386-linux, no new regressions.
Subject: Bug 11054 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: wilson@gcc.gnu.org 2003-06-27 00:50:56 Modified files: gcc : ChangeLog rtlanal.c Log message: PR optimization/11054 * rtlanal.c (reg_overlap_mentioned_p): Handle ZERO_EXTRACT and SIGN_EXTRACT. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.620&r2=1.16114.2.621 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/rtlanal.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.140.4.5&r2=1.140.4.6
I checked in the patch on the 3.3 branch.