public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/55984] New: ICE: gfc_trans_code(): Bad statement code
@ 2013-01-14 23:13 slayoo at staszic dot waw.pl
2013-01-15 9:59 ` [Bug fortran/55984] [4.8 Regression] " dominiq at lps dot ens.fr
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: slayoo at staszic dot waw.pl @ 2013-01-14 23:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55984
Bug #: 55984
Summary: ICE: gfc_trans_code(): Bad statement code
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: slayoo@staszic.waw.pl
First, sorry for not reducing the test case further more.
Second, here's a recipe to reproduce the ICE:
$ cat bug1.f
module bcd_m
type, abstract :: bcd_t
contains
procedure(bcd_fill_halos), deferred :: fill_halos
end type
abstract interface
subroutine bcd_fill_halos(this)
import :: bcd_t
class(bcd_t ) :: this
end subroutine
end interface
end module
module solver_m
use bcd_m
type, abstract :: solver_t
integer :: n, hlo
class(bcd_t), pointer :: bcx, bcy
contains
procedure(solver_advop), deferred :: advop
end type
abstract interface
subroutine solver_advop(this)
import solver_t
class(solver_t) :: this
end subroutine
end interface
contains
end module
module solver_mpdata_m
use solver_m
type :: mpdata_t
class(bcd_t), pointer :: bcx, bcy
contains
procedure :: advop => mpdata_advop
end type
contains
subroutine mpdata_advop(this)
class(mpdata_t) :: this
associate ( bcx => this%bcx, bcy => this%bcy )
call bcx%fill_halos()
end associate
end subroutine
end module
$ /usr/lib/gcc-snapshot/bin/gfortran -ffree-form -std=f2008 bug1.f
bug1.f: In function 'mpdata_advop':
bug1.f:42:0: internal compiler error: gfc_trans_code(): Bad statement code
call bcx%fill_halos()
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-snapshot/README.Bugs> for instructions.
$ /usr/lib/gcc-snapshot/bin/gfortran --version
GNU Fortran (Debian 20130113-1) 4.8.0 20130113 (experimental) [trunk revision
195136]
...
HTH,
Sylwester
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/55984] [4.8 Regression] ICE: gfc_trans_code(): Bad statement code
2013-01-14 23:13 [Bug fortran/55984] New: ICE: gfc_trans_code(): Bad statement code slayoo at staszic dot waw.pl
@ 2013-01-15 9:59 ` dominiq at lps dot ens.fr
2013-01-15 10:04 ` janus at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-01-15 9:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55984
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-01-15
Summary|ICE: gfc_trans_code(): Bad |[4.8 Regression] ICE:
|statement code |gfc_trans_code(): Bad
| |statement code
Ever Confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-01-15 09:59:24 UTC ---
The ICE appeared between revision 190356 (2012-08-13) which OK and revision
190442 (2012-08-16) which gives the ICE.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/55984] [4.8 Regression] ICE: gfc_trans_code(): Bad statement code
2013-01-14 23:13 [Bug fortran/55984] New: ICE: gfc_trans_code(): Bad statement code slayoo at staszic dot waw.pl
2013-01-15 9:59 ` [Bug fortran/55984] [4.8 Regression] " dominiq at lps dot ens.fr
@ 2013-01-15 10:04 ` janus at gcc dot gnu.org
2013-01-15 10:06 ` janus at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: janus at gcc dot gnu.org @ 2013-01-15 10:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55984
--- Comment #2 from janus at gcc dot gnu.org 2013-01-15 10:04:31 UTC ---
Confirmed. Reduced test case:
type, abstract :: bcd_t
contains
procedure(bcd_fill_halos), deferred :: fill_halos
end type
abstract interface
subroutine bcd_fill_halos(this)
import :: bcd_t
class(bcd_t ) :: this
end subroutine
end interface
type :: mpdata_t
class(bcd_t), pointer :: bcx
end type
contains
subroutine mpdata_advop(this)
class(mpdata_t) :: this
associate ( bcx => this%bcx )
call bcx%fill_halos()
end associate
end subroutine
end
4.7 works, i.e. it is a regression in 4.8.
This is the same problem mentioned in PR 55983 comment 2.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/55984] [4.8 Regression] ICE: gfc_trans_code(): Bad statement code
2013-01-14 23:13 [Bug fortran/55984] New: ICE: gfc_trans_code(): Bad statement code slayoo at staszic dot waw.pl
2013-01-15 9:59 ` [Bug fortran/55984] [4.8 Regression] " dominiq at lps dot ens.fr
2013-01-15 10:04 ` janus at gcc dot gnu.org
@ 2013-01-15 10:06 ` janus at gcc dot gnu.org
2013-01-15 22:44 ` janus at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: janus at gcc dot gnu.org @ 2013-01-15 10:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55984
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Priority|P3 |P4
CC| |janus at gcc dot gnu.org
Target Milestone|--- |4.8.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/55984] [4.8 Regression] ICE: gfc_trans_code(): Bad statement code
2013-01-14 23:13 [Bug fortran/55984] New: ICE: gfc_trans_code(): Bad statement code slayoo at staszic dot waw.pl
` (2 preceding siblings ...)
2013-01-15 10:06 ` janus at gcc dot gnu.org
@ 2013-01-15 22:44 ` janus at gcc dot gnu.org
2013-01-15 22:57 ` janus at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: janus at gcc dot gnu.org @ 2013-01-15 22:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55984
--- Comment #3 from janus at gcc dot gnu.org 2013-01-15 22:43:43 UTC ---
> bug1.f: In function 'mpdata_advop':
> bug1.f:42:0: internal compiler error: gfc_trans_code(): Bad statement code
> call bcx%fill_halos()
The ICE is due to an EXEC_COMPCALL making it into trans_code, although it
should have been resolved away before. This apparently does not happen because
the symbol 'bcx' is missing the class_ok attribute.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/55984] [4.8 Regression] ICE: gfc_trans_code(): Bad statement code
2013-01-14 23:13 [Bug fortran/55984] New: ICE: gfc_trans_code(): Bad statement code slayoo at staszic dot waw.pl
` (3 preceding siblings ...)
2013-01-15 22:44 ` janus at gcc dot gnu.org
@ 2013-01-15 22:57 ` janus at gcc dot gnu.org
2013-01-16 8:31 ` janus at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: janus at gcc dot gnu.org @ 2013-01-15 22:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55984
--- Comment #4 from janus at gcc dot gnu.org 2013-01-15 22:57:19 UTC ---
Patch:
Index: gcc/fortran/parse.c
===================================================================
--- gcc/fortran/parse.c (revision 195125)
+++ gcc/fortran/parse.c (working copy)
@@ -3399,6 +3399,8 @@ parse_associate (void)
for parsing component references on the associate-name
in case of association to a derived-type. */
sym->ts = a->target->ts;
+ if (sym->ts.type == BT_CLASS)
+ sym->attr.class_ok = gfc_expr_attr (a->target).class_ok;
}
accept_statement (ST_ASSOCIATE);
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/55984] [4.8 Regression] ICE: gfc_trans_code(): Bad statement code
2013-01-14 23:13 [Bug fortran/55984] New: ICE: gfc_trans_code(): Bad statement code slayoo at staszic dot waw.pl
` (4 preceding siblings ...)
2013-01-15 22:57 ` janus at gcc dot gnu.org
@ 2013-01-16 8:31 ` janus at gcc dot gnu.org
2013-01-26 21:18 ` [Bug fortran/55984] [4.8 Regression] [OOP] " pault at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: janus at gcc dot gnu.org @ 2013-01-16 8:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55984
--- Comment #5 from janus at gcc dot gnu.org 2013-01-16 08:31:21 UTC ---
The patch in comment 4 fails on:
FAIL: gfortran.dg/select_type_24.f90 -O (test for errors, line 48)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/55984] [4.8 Regression] [OOP] ICE: gfc_trans_code(): Bad statement code
2013-01-14 23:13 [Bug fortran/55984] New: ICE: gfc_trans_code(): Bad statement code slayoo at staszic dot waw.pl
` (5 preceding siblings ...)
2013-01-16 8:31 ` janus at gcc dot gnu.org
@ 2013-01-26 21:18 ` pault at gcc dot gnu.org
2013-01-27 7:18 ` pault at gcc dot gnu.org
2013-01-27 7:36 ` pault at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2013-01-26 21:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55984
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot |pault at gcc dot gnu.org
|gnu.org |
--- Comment #6 from Paul Thomas <pault at gcc dot gnu.org> 2013-01-26 21:18:25 UTC ---
Created attachment 29283
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29283
Fix for this PR and 56087.
2013-01-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/55789
PR fortran/56047
* gfortran.h : Add associate_var to symbol_attr.
* resolve.c (resolve_assoc_var): Set associate_var attribute.
If the target class_ok is set, set it for the associate
variable.
* check.c (allocatable_check): Associate variables should not
have the allocatable attribute even if their symbols do.
* class.c (gfc_build_class_symbol): Symbols with associate_var
set will always have a good class container.
2013-01-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/55789
* gfortran.dg/associate_14.f90: New test.
PR fortran/56047
* gfortran.dg/associate_13.f90: New test.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/55984] [4.8 Regression] [OOP] ICE: gfc_trans_code(): Bad statement code
2013-01-14 23:13 [Bug fortran/55984] New: ICE: gfc_trans_code(): Bad statement code slayoo at staszic dot waw.pl
` (6 preceding siblings ...)
2013-01-26 21:18 ` [Bug fortran/55984] [4.8 Regression] [OOP] " pault at gcc dot gnu.org
@ 2013-01-27 7:18 ` pault at gcc dot gnu.org
2013-01-27 7:36 ` pault at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2013-01-27 7:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55984
--- Comment #7 from Paul Thomas <pault at gcc dot gnu.org> 2013-01-27 07:18:29 UTC ---
Author: pault
Date: Sun Jan 27 07:18:22 2013
New Revision: 195493
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195493
Log:
2013-01-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/55984
* ChangeLog : Correct wrong PR number.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/55984] [4.8 Regression] [OOP] ICE: gfc_trans_code(): Bad statement code
2013-01-14 23:13 [Bug fortran/55984] New: ICE: gfc_trans_code(): Bad statement code slayoo at staszic dot waw.pl
` (7 preceding siblings ...)
2013-01-27 7:18 ` pault at gcc dot gnu.org
@ 2013-01-27 7:36 ` pault at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2013-01-27 7:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55984
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #8 from Paul Thomas <pault at gcc dot gnu.org> 2013-01-27 07:35:49 UTC ---
Fixed on trunk.
Thanks for the report.
Sorry, the commit ChangeLog entries were wrong so the commit does not appear
here -> they went to PR55789 instead.
Paul
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-01-27 7:36 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-14 23:13 [Bug fortran/55984] New: ICE: gfc_trans_code(): Bad statement code slayoo at staszic dot waw.pl
2013-01-15 9:59 ` [Bug fortran/55984] [4.8 Regression] " dominiq at lps dot ens.fr
2013-01-15 10:04 ` janus at gcc dot gnu.org
2013-01-15 10:06 ` janus at gcc dot gnu.org
2013-01-15 22:44 ` janus at gcc dot gnu.org
2013-01-15 22:57 ` janus at gcc dot gnu.org
2013-01-16 8:31 ` janus at gcc dot gnu.org
2013-01-26 21:18 ` [Bug fortran/55984] [4.8 Regression] [OOP] " pault at gcc dot gnu.org
2013-01-27 7:18 ` pault at gcc dot gnu.org
2013-01-27 7:36 ` pault at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).