The following trivial program leads to an ICE. t_ice.f90: program main end ------------------ $ i686-w64-mingw32-gfortran.exe -c -o t.o t_ice.f90 t_ice.f90: In function 'main': t_ice.f90:3:0: internal compiler error: in lhd_set_decl_assembler_name, at langhooks.c:158 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
Kai wrote in #gcc that it is due to Rev. 171862. http://gcc.gnu.org/ml/gcc-cvs/2011-04/msg00054.html
> Kai wrote in #gcc that it is due to Rev. 171862. > > http://gcc.gnu.org/ml/gcc-cvs/2011-04/msg00054.html This patch is a no-op except for Ada. You probably didn't rebuild the entire compiler, did you? If no, there are very likely missing dependencies in the Fortran Makefile fragment, namely: fortran/f95-lang.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \ gt-fortran-f95-lang.h gtype-fortran.h $(CGRAPH_H) $(TARGET_H) fortran/cpp.h \ $(BUILTINS_DEF) fortran/types.def \ libfuncs.h expr.h
Yes, a complete rebuild fixed the issue. The following patch to fortran/Make-lang.in should solve this also for a partial rebuild: Index: Make-lang.in =================================================================== --- Make-lang.in (revision 171910) +++ Make-lang.in (working copy) @@ -336,7 +336,7 @@ fortran/f95-lang.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \ gt-fortran-f95-lang.h gtype-fortran.h $(CGRAPH_H) $(TARGET_H) fortran/cpp.h \ $(BUILTINS_DEF) fortran/types.def \ - libfuncs.h expr.h + libfuncs.h expr.h langhooks.h fortran/scanner.o: toplev.h fortran/cpp.h fortran/convert.o: $(GFORTRAN_TRANS_DEPS) fortran/frontend-passes.o: $(GFORTRAN_TRANS_DEPS) Ok for apply?
> Ok for apply? Other languages have langhooks.h $(LANGHOOKS_DEF_H) here. There are other missing dependencies for this file though.
Yes, there are. I added the most obvious one now to my patch. Index: Make-lang.in =================================================================== --- Make-lang.in (revision 171910) +++ Make-lang.in (working copy) @@ -336,7 +336,8 @@ fortran/f95-lang.o: $(GFORTRAN_TRANS_DEPS) fortran/mathbuiltins.def \ gt-fortran-f95-lang.h gtype-fortran.h $(CGRAPH_H) $(TARGET_H) fortran/cpp.h \ $(BUILTINS_DEF) fortran/types.def \ - libfuncs.h expr.h + $(TM_H) debug.h langhooks.h $(FLAGS_H) $(EXPR_H) $(LANGHOOKS_DEF_H) \ + libfuncs.h expr.h $(DIAGNOSTIC_H) fortran/scanner.o: toplev.h fortran/cpp.h fortran/convert.o: $(GFORTRAN_TRANS_DEPS) fortran/frontend-passes.o: $(GFORTRAN_TRANS_DEPS) ok for apply?
(In reply to comment #5) > Yes, there are. I added the most obvious one now to my patch. [...] > ok for apply? OK. I think there are more (esp. for other files), but I think it should cover the most important omissions. Thanks for the patch!
Author: ktietz Date: Sun Apr 3 20:09:46 2011 New Revision: 171916 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171916 Log: 2011-04-03 Kai Tietz <ktietz@redhat.com> PR middle-end/48422 * Make-lang.in (f95-lang.o): Add some missing dependencies. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/Make-lang.in
Fixed.