The attached program gives an ICE with an older 4.5 gfortran. I try to test it later with today's build as it might well have been fixed in the meanwhile.
$ gfortran -O3 -c test.f90 test.f90: In function 'genpmat': test.f90:1: internal compiler error: in set_ssa_val_to, at tree-ssa-sccvn.c:1702 -- Summary: ICE in set_ssa_val_to, at tree-ssa-sccvn.c:1702 Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41765