[Bug fortran/60341] ICE compiling Nonmem 6.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341 --- Comment #8 from Steve Chapel --- Yes, it's a regression from earlier versions of gfortran. I have verified that with the workaround, Nonmem 6.2.0 compiles and runs properly with optimization using gfortran 4.8.1 and 4.8.2. Turning optimization off also works.
[Bug fortran/60341] ICE compiling Nonmem 6.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341 --- Comment #7 from Steve Kargl --- On Wed, Feb 26, 2014 at 08:38:57PM +, mikael at gcc dot gnu.org wrote: > > Looks like an unguarded union access. > This is a regression from the time there was now front-end optimization I > guess? Unfortunately, I've deleted versions of gfortran older than 4.6.x. The code fails with all version above 4.6.x. If one adds -fno-frontend-optimize, then the code compiles. So, yes, it is a regression.
[Bug fortran/60341] ICE compiling Nonmem 6.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341 Mikael Morin changed: What|Removed |Added CC||mikael at gcc dot gnu.org --- Comment #6 from Mikael Morin --- Looks like an unguarded union access. This is a regression from the time there was now front-end optimization I guess? diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c index 52bd700..e663868 100644 --- a/gcc/fortran/frontend-passes.c +++ b/gcc/fortran/frontend-passes.c @@ -1391,7 +1391,9 @@ optimize_comparison (gfc_expr *e, gfc_intrinsic_op op) /* Replace A // B < A // C with B < C, and A // B < C // B with A < C. */ if (op1->ts.type == BT_CHARACTER && op2->ts.type == BT_CHARACTER + && op1->expr_type == EXPR_OP && op1->value.op.op == INTRINSIC_CONCAT + && op2->expr_type == EXPR_OP && op2->value.op.op == INTRINSIC_CONCAT) { gfc_expr *op1_left = op1->value.op.op1;
[Bug fortran/60341] ICE compiling Nonmem 6.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341 --- Comment #5 from Steve Kargl --- On Wed, Feb 26, 2014 at 07:15:49PM +, kargl at gcc dot gnu.org wrote: The workaround should be obvious, but just encase > Reduced testcase > > subroutine modelg(ncm) > implicit none > integer, parameter :: pc = 30, pm = pc - 1 > integer i > character*4 catt(pm,2) character(len=7) stmp > integer ncm,iatt(pm,pc) > do i=1,ncm stmp = catt(i,1)//catt(i,2) if (stmp .eq. 'central') exit > if (catt(i,1)//catt(i,2).eq.'central') exit > end do > iatt(i,4)=1 > end A similar temporary should be applicable to the original code.
[Bug fortran/60341] ICE compiling Nonmem 6.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341 kargl at gcc dot gnu.org changed: What|Removed |Added CC||kargl at gcc dot gnu.org --- Comment #4 from kargl at gcc dot gnu.org --- Reduced testcase subroutine modelg(ncm) implicit none integer, parameter :: pc = 30, pm = pc - 1 integer i character*4 catt(pm,2) integer ncm,iatt(pm,pc) do i=1,ncm if (catt(i,1)//catt(i,2).eq.'central') exit end do iatt(i,4)=1 end
[Bug fortran/60341] ICE compiling Nonmem 6.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2014-02-26 Ever confirmed|0 |1 Known to fail||4.7.3, 4.8.2, 4.9.0 --- Comment #3 from Richard Biener --- Confirmed. f951: internal compiler error: Segmentation fault 0xc5fa7a crash_signal /space/rguenther/src/svn/trunk/gcc/toplev.c:337 0x6ec628 gfc_dep_compare_expr(gfc_expr*, gfc_expr*) /space/rguenther/src/svn/trunk/gcc/fortran/dependency.c:345 0x79503e optimize_comparison /space/rguenther/src/svn/trunk/gcc/fortran/frontend-passes.c:1402 0x794af2 optimize_op /space/rguenther/src/svn/trunk/gcc/fortran/frontend-passes.c:1222 0x7929fd optimize_expr /space/rguenther/src/svn/trunk/gcc/fortran/frontend-passes.c:170 0x795b8c gfc_expr_walker(gfc_expr**, int (*)(gfc_expr**, int*, void*), void*) /space/rguenther/src/svn/trunk/gcc/fortran/frontend-passes.c:1787 0x797866 gfc_code_walker(gfc_code**, int (*)(gfc_code**, int*, void*), int (*)(gfc_expr**, int*, void*), void*) /space/rguenther/src/svn/trunk/gcc/fortran/frontend-passes.c:2134
[Bug fortran/60341] ICE compiling Nonmem 6.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341 kargl at gcc dot gnu.org changed: What|Removed |Added Severity|critical|normal
[Bug fortran/60341] ICE compiling Nonmem 6.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341 --- Comment #1 from Steve Chapel --- Created attachment 32215 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32215&action=edit source code file
[Bug fortran/60341] ICE compiling Nonmem 6.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341 --- Comment #2 from Steve Chapel --- Created attachment 32216 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32216&action=edit included source code file