gcc-4.1.0-0.25 on x86_64 produces an ICE when compiling sxemacs. Reproducer: $ wget http://ftp.sxemacs.org/pub/sxemacs/sxemacs-22.1.3.tar.gz $ tar zxf sxemacs-22.1.3.tar.gz $ cd sxemacs-22.1.3 $ ./configure ; make [...] gcc -c -Wall -Wno-switch -Wmissing-prototypes -Wsign-compare -Wno-char-subscripts -Wundef -Wstrict-prototypes -Wpacked -Wshadow -Wmissing-declarations -g -O3 -Demacs -I. -DHAVE_CONFIG_H -I/usr/local/include glyphs.c glyphs.c: In function 'make_image_instance_1': glyphs.c:1448: internal compiler error: in trunc_int_for_mode, at explow.c:54 [...]
Created attachment 124658 [details] preprocessed source
Simplified testcase: extern void fn1 (long int) __attribute__ ((noreturn)); void fn2 (long int); extern long int u, v; struct S { char c; long int d; long int e; }; static inline struct S * fn3 (long int x) { if (*(char *) x != 6) fn1 (0); return (struct S *) x; } static inline int fn4 (long int x) { if (x == u) return 3; fn2 (x); return 0; } int test (long int x) { long int r; int m = 0; for (r = x; r != v; r = (fn3 (r)->d)) if (*(char *) r != 6) fn1 (x); else m |= 1 << (fn4 (fn3 (r)->e) - 1); return m; }
http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01222.html