* [Bug fortran/60341] ICE compiling Nonmem 6.2.0
[not found] <bug-60341-4@http.gcc.gnu.org/bugzilla/>
@ 2014-02-26 3:23 ` steve.chapel at a2pg dot com
2014-02-26 3:23 ` steve.chapel at a2pg dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: steve.chapel at a2pg dot com @ 2014-02-26 3:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341
--- Comment #2 from Steve Chapel <steve.chapel at a2pg dot com> ---
Created attachment 32216
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32216&action=edit
included source code file
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/60341] ICE compiling Nonmem 6.2.0
[not found] <bug-60341-4@http.gcc.gnu.org/bugzilla/>
2014-02-26 3:23 ` [Bug fortran/60341] ICE compiling Nonmem 6.2.0 steve.chapel at a2pg dot com
@ 2014-02-26 3:23 ` steve.chapel at a2pg dot com
2014-02-26 4:35 ` kargl at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: steve.chapel at a2pg dot com @ 2014-02-26 3:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341
--- Comment #1 from Steve Chapel <steve.chapel at a2pg dot com> ---
Created attachment 32215
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32215&action=edit
source code file
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/60341] ICE compiling Nonmem 6.2.0
[not found] <bug-60341-4@http.gcc.gnu.org/bugzilla/>
2014-02-26 3:23 ` [Bug fortran/60341] ICE compiling Nonmem 6.2.0 steve.chapel at a2pg dot com
2014-02-26 3:23 ` steve.chapel at a2pg dot com
@ 2014-02-26 4:35 ` kargl at gcc dot gnu.org
2014-02-26 9:46 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: kargl at gcc dot gnu.org @ 2014-02-26 4:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/60341] ICE compiling Nonmem 6.2.0
[not found] <bug-60341-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2014-02-26 4:35 ` kargl at gcc dot gnu.org
@ 2014-02-26 9:46 ` rguenth at gcc dot gnu.org
2014-02-26 19:15 ` kargl at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-02-26 9:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341
Richard Biener <rguenth at gcc dot gnu.org> 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 <rguenth at gcc dot gnu.org> ---
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/60341] ICE compiling Nonmem 6.2.0
[not found] <bug-60341-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2014-02-26 9:46 ` rguenth at gcc dot gnu.org
@ 2014-02-26 19:15 ` kargl at gcc dot gnu.org
2014-02-26 19:48 ` sgk at troutmask dot apl.washington.edu
` (6 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: kargl at gcc dot gnu.org @ 2014-02-26 19:15 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/60341] ICE compiling Nonmem 6.2.0
[not found] <bug-60341-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2014-02-26 19:15 ` kargl at gcc dot gnu.org
@ 2014-02-26 19:48 ` sgk at troutmask dot apl.washington.edu
2014-02-26 20:39 ` mikael at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2014-02-26 19:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341
--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, Feb 26, 2014 at 07:15:49PM +0000, 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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/60341] ICE compiling Nonmem 6.2.0
[not found] <bug-60341-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2014-02-26 19:48 ` sgk at troutmask dot apl.washington.edu
@ 2014-02-26 20:39 ` mikael at gcc dot gnu.org
2014-02-27 14:22 ` schapel at umich dot edu
` (4 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: mikael at gcc dot gnu.org @ 2014-02-26 20:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #6 from Mikael Morin <mikael at gcc dot gnu.org> ---
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;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/60341] ICE compiling Nonmem 6.2.0
[not found] <bug-60341-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2014-02-26 20:39 ` mikael at gcc dot gnu.org
@ 2014-02-27 14:22 ` schapel at umich dot edu
2014-03-01 21:01 ` [Bug fortran/60341] [4.7/4.8/4.9 Regression] " mikael at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: schapel at umich dot edu @ 2014-02-27 14:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341
--- Comment #8 from Steve Chapel <schapel at umich dot edu> ---
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/60341] [4.7/4.8/4.9 Regression] ICE compiling Nonmem 6.2.0
[not found] <bug-60341-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2014-02-27 14:22 ` schapel at umich dot edu
@ 2014-03-01 21:01 ` mikael at gcc dot gnu.org
2014-03-01 21:15 ` mikael at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 12+ messages in thread
From: mikael at gcc dot gnu.org @ 2014-03-01 21:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |mikael at gcc dot gnu.org
--- Comment #9 from Mikael Morin <mikael at gcc dot gnu.org> ---
I'm taking care of this.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/60341] [4.7/4.8/4.9 Regression] ICE compiling Nonmem 6.2.0
[not found] <bug-60341-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2014-03-01 21:01 ` [Bug fortran/60341] [4.7/4.8/4.9 Regression] " mikael at gcc dot gnu.org
@ 2014-03-01 21:15 ` mikael at gcc dot gnu.org
2014-03-02 18:49 ` mikael at gcc dot gnu.org
2014-03-02 18:53 ` mikael at gcc dot gnu.org
11 siblings, 0 replies; 12+ messages in thread
From: mikael at gcc dot gnu.org @ 2014-03-01 21:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341
--- Comment #10 from Mikael Morin <mikael at gcc dot gnu.org> ---
Author: mikael
Date: Sat Mar 1 21:14:54 2014
New Revision: 208249
URL: http://gcc.gnu.org/viewcvs?rev=208249&root=gcc&view=rev
Log:
fortran/
PR fortran/60341
* frontend-passes.c (optimize_comparison): Guard two union
accesses with the corresponding tag checks.
testsuite/
PR fortran/60341
* gfortran.dg/str_comp_optimize_1.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/str_comp_optimize_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/frontend-passes.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/60341] [4.7/4.8/4.9 Regression] ICE compiling Nonmem 6.2.0
[not found] <bug-60341-4@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2014-03-01 21:15 ` mikael at gcc dot gnu.org
@ 2014-03-02 18:49 ` mikael at gcc dot gnu.org
2014-03-02 18:53 ` mikael at gcc dot gnu.org
11 siblings, 0 replies; 12+ messages in thread
From: mikael at gcc dot gnu.org @ 2014-03-02 18:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341
--- Comment #12 from Mikael Morin <mikael at gcc dot gnu.org> ---
Author: mikael
Date: Sun Mar 2 18:49:18 2014
New Revision: 208259
URL: http://gcc.gnu.org/viewcvs?rev=208259&root=gcc&view=rev
Log:
fortran/
PR fortran/60341
* frontend-passes.c (optimize_comparison): Guard two union
accesses with the corresponding tag checks.
testsuite/
PR fortran/60341
* gfortran.dg/str_comp_optimize_1.f90: New test.
Added:
branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/str_comp_optimize_1.f90
Modified:
branches/gcc-4_7-branch/gcc/fortran/ChangeLog
branches/gcc-4_7-branch/gcc/fortran/frontend-passes.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/60341] [4.7/4.8/4.9 Regression] ICE compiling Nonmem 6.2.0
[not found] <bug-60341-4@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2014-03-02 18:49 ` mikael at gcc dot gnu.org
@ 2014-03-02 18:53 ` mikael at gcc dot gnu.org
11 siblings, 0 replies; 12+ messages in thread
From: mikael at gcc dot gnu.org @ 2014-03-02 18:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #13 from Mikael Morin <mikael at gcc dot gnu.org> ---
Problem fixed for 4.7.4, 4.8.3 and 4.9.0.
Thanks for reporting it.
^ permalink raw reply [flat|nested] 12+ messages in thread