Bug 15761 - [3.4 Regression] internal compiler error: in do_SUBST, at combine.c:446
Summary: [3.4 Regression] internal compiler error: in do_SUBST, at combine.c:446
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.4.0
: P2 critical
Target Milestone: 3.4.1
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, monitored, patch
Depends on:
Blocks:
 
Reported: 2004-06-01 10:36 UTC by Ashu Tiwary
Modified: 2004-09-09 23:40 UTC (History)
5 users (show)

See Also:
Host:
Target: i486-slackware-linux
Build:
Known to work: 4.0 3.3.3
Known to fail: 3.4.0
Last reconfirmed: 2004-06-01 15:49:55


Attachments
bzip2'd preprocessed source (from ethereal v 0.10.4:packet-isup.c) (14.86 KB, text/gcc-preprocessed-source)
2004-06-01 10:39 UTC, Ashu Tiwary
Details
corrected preprocessed file... (54.99 KB, text/gcc-preprocessed-file)
2004-06-01 10:42 UTC, Ashu Tiwary
Details
small testcase (63 bytes) (67 bytes, text/plain)
2004-06-01 13:10 UTC, Serge Belyshev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ashu Tiwary 2004-06-01 10:36:05 UTC
ashu@shooze:/usr/src/ashu/net/ethereal-0.10.4/epan$ gcc -v -save-temps
-DHAVE_CONFIG_H -I. -I. -I.. -I./.. -I/usr/local/include -DINET6 -O3
-mtune=pentium4 -march=pentium4 -mfpmath=sse -msse2 -minline-all-stringops
-ffast-math -funroll-all-loops -fomit-frame-pointer -Dlinux -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/lib/perl5/5.8.4/i486-linux/CORE -I. -I/usr/local/include
-I/usr/local/include -DINET6 "-D_U_=__attribute__((unused))" -Wall -W -O3
-mtune=pentium4 -march=pentium4 -mfpmath=sse -msse2 -minline-all-stringops
-ffast-math -funroll-all-loops -fomit-frame-pointer -I/usr/local/include
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include
-I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-DINET6 -O3 -mtune=pentium4 -march=pentium4 -mfpmath=sse -msse2
-minline-all-stringops -ffast-math -funroll-all-loops -fomit-frame-pointer
-Dlinux -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/lib/perl5/5.8.4/i486-linux/CORE -I.
-I/usr/local/include -I/usr/local/include -c ../packet-isup.c -MT packet-isup.lo
-MD -MP -MF .deps/packet-isup.TPlo  -fPIC -DPIC -o packet-isup.lo
Reading specs from /usr/lib/gcc/i486-slackware-linux/3.4.0/specs
Configured with: ../gcc-3.4.0/configure --prefix=/usr --enable-shared
--enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld
--verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.4.0
 /usr/libexec/gcc/i486-slackware-linux/3.4.0/cc1 -E -quiet -v -I. -I. -I..
-I./.. -I/usr/local/include -I/usr/local/include
-I/usr/lib/perl5/5.8.4/i486-linux/CORE -I. -I/usr/local/include
-I/usr/local/include -I/usr/local/include -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0
-I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/local/include
-I/usr/lib/perl5/5.8.4/i486-linux/CORE -I. -I/usr/local/include
-I/usr/local/include -MD packet-isup.d -MF .deps/packet-isup.TPlo -MP -MT
packet-isup.lo -MQ packet-isup.lo -D_REENTRANT -DHAVE_CONFIG_H -DINET6 -Dlinux
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DINET6 -D_U_=__attribute__((unused))
-DINET6 -Dlinux -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPIC
../packet-isup.c -mtune=pentium4 -march=pentium4 -mfpmath=sse -msse2
-minline-all-stringops -mtune=pentium4 -march=pentium4 -mfpmath=sse -msse2
-minline-all-stringops -mtune=pentium4 -march=pentium4 -mfpmath=sse -msse2
-minline-all-stringops -Wall -W -ffast-math -funroll-all-loops
-fomit-frame-pointer -fno-strict-aliasing -ffast-math -funroll-all-loops
-fomit-frame-pointer -ffast-math -funroll-all-loops -fomit-frame-pointer
-fno-strict-aliasing -fPIC -O3 -O3 -O3 -o packet-isup.i
ignoring nonexistent directory
"/usr/lib/gcc/i486-slackware-linux/3.4.0/../../../../i486-slackware-linux/include"
ignoring duplicate directory "."
ignoring duplicate directory "./.."
ignoring duplicate directory "/usr/local/include"
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "/usr/local/include"
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "."
ignoring duplicate directory "/usr/local/include"
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "/usr/local/include"
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "/usr/local/include"
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "/usr/local/include"
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "/usr/lib/perl5/5.8.4/i486-linux/CORE"
ignoring duplicate directory "."
ignoring duplicate directory "/usr/local/include"
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "/usr/local/include"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 .
 ..
 /usr/lib/perl5/5.8.4/i486-linux/CORE
 /usr/include/gtk-2.0
 /usr/lib/gtk-2.0/include
 /usr/include/atk-1.0
 /usr/include/pango-1.0
 /usr/X11R6/include
 /usr/include/freetype2
 /usr/include/glib-2.0
 /usr/lib/glib-2.0/include
 /usr/local/include
 /usr/lib/gcc/i486-slackware-linux/3.4.0/include
 /usr/include
End of search list.
 /usr/libexec/gcc/i486-slackware-linux/3.4.0/cc1 -fpreprocessed packet-isup.i
-quiet -dumpbase packet-isup.c -mtune=pentium4 -march=pentium4 -mfpmath=sse
-msse2 -minline-all-stringops -mtune=pentium4 -march=pentium4 -mfpmath=sse
-msse2 -minline-all-stringops -mtune=pentium4 -march=pentium4 -mfpmath=sse
-msse2 -minline-all-stringops -auxbase-strip packet-isup.lo -O3 -O3 -O3 -Wall -W
-version -ffast-math -funroll-all-loops -fomit-frame-pointer
-fno-strict-aliasing -ffast-math -funroll-all-loops -fomit-frame-pointer
-ffast-math -funroll-all-loops -fomit-frame-pointer -fno-strict-aliasing -fPIC
-o packet-isup.s
GNU C version 3.4.0 (i486-slackware-linux)
        compiled by GNU C version 3.4.0.
GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=113015
../packet-isup.c: In function `dissect_isup_application_transport_parameter':
../packet-isup.c:2859: internal compiler error: in do_SUBST, at combine.c:446
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

system: ibm thinkpad t30 model 2366-qu5 (intel pentium 4 mobile 2.4 ghz, 1gb ram)
        slackware gnu/linux (from "slackware-current" tree as of 30 may 2004)
        linux kernel version: 2.4.26
        glibc v 2.3.2

this bugzilla form doesn't seem to have a place for me to attach the "*.i" file
- i'm hoping that after i press "commit" i'll be presented with an opportunity
to attach the preprocessed file....
Comment 1 Ashu Tiwary 2004-06-01 10:39:46 UTC
Created attachment 6444 [details]
bzip2'd preprocessed source (from ethereal v 0.10.4:packet-isup.c)

this is the preprocessed source of the file "packet-isup.c" from the ethereal v
0.10.4 package; the file was created by descending into the "epan" dir in the
ethereal source.
Comment 2 Ashu Tiwary 2004-06-01 10:42:17 UTC
Created attachment 6445 [details]
corrected preprocessed file...

corrected bzip2'd preprocessed source (from ethereal v 0.10.4:packet-isup.c)
generated from "gcc -v -save-temps ..."; incorrectly sent assembly output
previously
Comment 3 Serge Belyshev 2004-06-01 13:10:20 UTC
Created attachment 6447 [details]
small testcase (63 bytes)

small testcase:

cat > bug.i << EOF
void foo (unsigned char bar)
{
	while (bar > 0) 
		bar -= 3;
}
EOF
gcc bug.i -O1 -funroll-all-loops -march=pentium4
Comment 4 Andrew Pinski 2004-06-01 15:49:54 UTC
Confirmed.
I think this was fixed on the mainline by:
        PR c++/15463
        * loop-iv.c (iv_number_of_iterations):  Use trunc_int_for_mode on
        result of inverse.
Comment 5 Ashu Tiwary 2004-06-01 20:08:44 UTC
i was able to successfully compile ethereal after removing the
"-funroll-all-loops" option - just to confirmed serge's/andrew's comments above
Comment 6 Mark Mitchell 2004-06-05 20:24:08 UTC
Andrew --

Would you please backport the patch to 3.4.1 and attach it here?

-- Mark
Comment 7 Andrew Pinski 2004-06-05 20:38:48 UTC
Mark, there is no loop-iv.c on the 3.4.0 branch and the function does not exist either so I cannot even 
try to backport the fix.
Comment 8 Zdenek Dvorak 2004-06-07 23:14:27 UTC
Patch:

 http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00390.html
Comment 9 GCC Commits 2004-06-09 02:05:44 UTC
Subject: Bug 15761

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	rakdver@gcc.gnu.org	2004-06-09 02:05:27

Modified files:
	gcc            : ChangeLog cfgloopanal.c 

Log message:
	PR rtl-optimization/15761
	* cfgloopanal.c (count_strange_loop_iterations,
	count_loop_iterations): Use gen_int_mode instead
	of GEN_INT.

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.483&r2=2.2326.2.484
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cfgloopanal.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.18.4.1&r2=1.18.4.2

Comment 10 Andrew Pinski 2004-06-09 03:12:07 UTC
Fixed.