[3.3/mainline] Re: New ICE on i386
Jan Hubicka
jh@suse.cz
Sun Mar 9 13:37:00 GMT 2003
> >
> > On current hammer-branch I get this failure on i486 while building the
> > package garlic.
> >
> > Please look into this,
> > Andreas
> >
> >
> > # gcc -c -ansi -pedantic -O -Wall -Wstrict-prototypes -g3 resize_complex.c -save-temps -v
> > Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.3/specs
> > Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --disable-checking --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i486-suse-linux
> > Thread model: posix
> > gcc version 3.3 20030304 (prerelease) (SuSE Linux)
> > /usr/lib/gcc-lib/i486-suse-linux/3.3/cc1 -E -quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -dD resize_complex.c -ansi -pedantic -Wall -Wstrict-prototypes -O resize_complex.i
> > #include "..." search starts here:
> > #include <...> search starts here:
> > /usr/local/include
> > /usr/lib/gcc-lib/i486-suse-linux/3.3/include
> > /usr/i486-suse-linux/include
> > /usr/include
> > End of search list.
> > /usr/lib/gcc-lib/i486-suse-linux/3.3/cc1 -fpreprocessed resize_complex.i -quiet -dumpbase resize_complex.c -ansi -auxbase resize_complex -g3 -O -pedantic -Wall -Wstrict-prototypes -ansi -version -o resize_complex.s
> > GNU C version 3.3 20030304 (prerelease) (SuSE Linux) (i486-suse-linux)
> > compiled by GNU C version 3.3 20030304 (prerelease) (SuSE Linux).
> > GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
> > resize_complex.c: In function `ResizeComplex_':
> > resize_complex.c:165: internal compiler error: in final_scan_insn, at final.c:2497
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>
> Hi,
> the problem is that splitting is done before post-reload copy
> propagation. Copy propagation turns reg->mem move into load of imm->mem
> that needs to be split. Since I've removed the other splittings as
> redundant when reg-stack is present, this get caught in final.c. I am
> re-enabling splitting on reg-stack compilation path. I didn't suceeded
> to create simplified testcase - when I do remove something the problem
> goes away...
>
> Bootstrap on 3.3 branch in progress... OK if it passes?
>
> Sun Mar 9 11:44:34 CET 2003 Jan Hubicka <jh@suse.cz>
> * toplev.c (rest_of_compilation): re-enable insn splitting after
> reg-stack.
Hi,
on the deeper tought I think it was bad idea to do splitting post-reload
as similar bugs won't get caught as ICEs and will turn into
misscompilations instead. I've bootstrapped/regtested updated patch
Sun Mar 9 11:44:34 CET 2003 Jan Hubicka <jh@suse.cz>
* toplev.c (rest_of_compilation): Do split insns after post-reload
copy propagation.
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.688.2.14
diff -c -3 -p -r1.688.2.14 toplev.c
*** toplev.c 9 Mar 2003 11:11:14 -0000 1.688.2.14
--- toplev.c 9 Mar 2003 13:34:08 -0000
*************** rest_of_compilation (decl)
*** 3578,3583 ****
--- 3578,3596 ----
timevar_pop (TV_IFCVT2);
}
+ /* Copy propagation and if conversion possibly introduced new splittable
+ instructions. When scheduling it is profitable to split then now.
+ When doing reg-stack it is a must as we can't split after the stack
+ registers are converted. */
+ #if defined (INSN_SCHEDULING) || defined (STACK_REGS)
+ if ((flag_if_conversion2 || flag_rename_registers || flag_cprop_registers)
+ #ifndef STACK_REGS
+ && optimize > 0 && flag_schedule_insns_after_reload
+ #endif
+ )
+ split_all_insns (1);
+ #endif
+
#ifdef INSN_SCHEDULING
if (optimize > 0 && flag_schedule_insns_after_reload)
{
*************** rest_of_compilation (decl)
*** 3587,3594 ****
/* Do control and data sched analysis again,
and write some more of the results to dump file. */
- split_all_insns (1);
-
schedule_insns (rtl_dump_file);
close_dump_file (DFI_sched2, print_rtl_with_bb, insns);
--- 3600,3605 ----
More information about the Gcc-patches
mailing list