public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/59941] New: ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4]
@ 2014-01-25 11:07 juergen.reuter at desy dot de
2014-01-25 11:08 ` [Bug fortran/59941] " juergen.reuter at desy dot de
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: juergen.reuter at desy dot de @ 2014-01-25 11:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941
Bug ID: 59941
Summary: ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4]
Product: gcc
Version: 4.7.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: juergen.reuter at desy dot de
This is the code that triggers the ICE:
$ gfortran -c ICE.f90
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Here is the code (also attached, 147 lines):
module tao_random_numbers
integer, parameter, private :: tao_i32 = selected_int_kind (9)
integer, parameter, private :: DEFAULT_BUFFER_SIZE = 1009
integer(kind=tao_i32), dimension(DEFAULT_BUFFER_SIZE), save, private ::
s_buffer
integer, save, private :: s_buffer_end = size (s_buffer)
end module tao_random_numbers
!!!!
module interactions
public :: interaction_t
type :: external_link_t
type(interaction_t), pointer :: int => null ()
end type external_link_t
type :: interaction_t
type(external_link_t), dimension(:), allocatable :: source
end type interaction_t
end module interactions
!!!!!
module polarizations
public :: smatrix_t
public :: pmatrix_t
type :: smatrix_t
integer :: dim = 0
integer, dimension(:,:), allocatable :: index
end type smatrix_t
type, extends (smatrix_t) :: pmatrix_t
contains
procedure :: p_from_s => pmatrix_assign_from_smatrix
end type pmatrix_t
contains
subroutine pmatrix_assign_from_smatrix (pmatrix, smatrix)
class(pmatrix_t), intent(out) :: pmatrix
type(smatrix_t), intent(in) :: smatrix
pmatrix%smatrix_t = smatrix
end subroutine pmatrix_assign_from_smatrix
end module polarizations
!!!!!
module beam_structures
use polarizations
public :: beam_structure_t
type :: beam_structure_entry_t
logical :: is_valid = .false.
end type beam_structure_entry_t
type :: beam_structure_record_t
type(beam_structure_entry_t), dimension(:), allocatable :: entry
end type beam_structure_record_t
type :: beam_structure_t
private
integer :: n_beam = 0
type(beam_structure_record_t), dimension(:), allocatable :: record
type(smatrix_t), dimension(:), allocatable :: smatrix
contains
procedure :: get_smatrix => beam_structure_get_smatrix
end type beam_structure_t
contains
function beam_structure_get_smatrix (beam_structure) result (smatrix)
class(beam_structure_t), intent(in) :: beam_structure
type(smatrix_t), dimension (size (beam_structure%smatrix)) :: smatrix
smatrix = beam_structure%smatrix
end function beam_structure_get_smatrix
end module beam_structures
!!!!
module beams
use polarizations
use beam_structures
public :: beam_data_t
type :: beam_data_t
type(pmatrix_t), dimension(:), allocatable :: pmatrix
end type beam_data_t
end module beams
!!!!!
module sf_base
use interactions
use beams
public :: sf_data_t
public :: sf_int_t
type, abstract :: sf_data_t
end type sf_data_t
type, abstract, extends (interaction_t) :: sf_int_t
contains
procedure (sf_int_init), deferred :: init
end type sf_int_t
abstract interface
subroutine sf_int_init (sf_int, data)
import
class(sf_int_t), intent(out) :: sf_int
class(sf_data_t), intent(in), target :: data
end subroutine sf_int_init
end interface
end module sf_base
!!!!!
module sf_circe1
use tao_random_numbers !NODEP!
use sf_base
type, extends (sf_data_t) :: circe1_data_t
private
contains
procedure :: init => circe1_data_init
end type circe1_data_t
type, extends (sf_int_t) :: circe1_t
type(circe1_data_t), pointer :: data => null ()
contains
procedure :: init => circe1_init
end type circe1_t
contains
subroutine circe1_data_init (data)
class(circe1_data_t), intent(out) :: data
end subroutine circe1_data_init
subroutine circe1_init (sf_int, data)
class(circe1_t), intent(out) :: sf_int
class(sf_data_t), intent(in), target :: data
end subroutine circe1_init
end module sf_circe1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/59941] ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4]
2014-01-25 11:07 [Bug fortran/59941] New: ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4] juergen.reuter at desy dot de
@ 2014-01-25 11:08 ` juergen.reuter at desy dot de
2014-01-25 12:56 ` [Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types janus at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: juergen.reuter at desy dot de @ 2014-01-25 11:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941
--- Comment #1 from Jürgen Reuter <juergen.reuter at desy dot de> ---
Created attachment 31951
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31951&action=edit
Code triggering the ICE
>From gcc-bugs-return-441526-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jan 25 11:09:37 2014
Return-Path: <gcc-bugs-return-441526-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29491 invoked by alias); 25 Jan 2014 11:09:37 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 29478 invoked by uid 48); 25 Jan 2014 11:09:34 -0000
From: "juergen.reuter at desy dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/59941] ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4]
Date: Sat, 25 Jan 2014 11:09:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.7.4
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: juergen.reuter at desy dot de
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-59941-4-0qTeV3KZ6p@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59941-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59941-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-01/txt/msg02668.txt.bz2
Content-length: 193
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941
--- Comment #2 from Jürgen Reuter <juergen.reuter at desy dot de> ---
The bug appears only with 4.7.x, with 4.8 and 4.9 it is working.
>From gcc-bugs-return-441527-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jan 25 12:43:36 2014
Return-Path: <gcc-bugs-return-441527-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29523 invoked by alias); 25 Jan 2014 12:43:35 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 29503 invoked by uid 48); 25 Jan 2014 12:43:31 -0000
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/59941] [OOP] ICE with polymorphic types in 4.7.x
Date: Sat, 25 Jan 2014 12:43:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.7.4
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: janus at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: keywords bug_status cf_reconfirmed_on cc short_desc everconfirmed
Message-ID: <bug-59941-4-7ZwL8Cl7GP@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59941-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59941-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-01/txt/msg02669.txt.bz2
Content-length: 761
http://gcc.gnu.org/bugzilla/show_bug.cgi?idY941
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-01-25
CC| |janus at gcc dot gnu.org
Summary|ICE with polymorphic types |[OOP] ICE with polymorphic
|in [4.7.0|4.7.1|4.73|4.7.4] |types in 4.7.x
Ever confirmed|0 |1
--- Comment #3 from janus at gcc dot gnu.org ---
Confirmed. Also seems to work with 4.6.4 here.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types
2014-01-25 11:07 [Bug fortran/59941] New: ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4] juergen.reuter at desy dot de
2014-01-25 11:08 ` [Bug fortran/59941] " juergen.reuter at desy dot de
@ 2014-01-25 12:56 ` janus at gcc dot gnu.org
2014-01-25 13:15 ` janus at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-25 12:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[OOP] ICE with polymorphic |[4.7 Regression] [OOP] ICE
|types in 4.7.x |with polymorphic types
--- Comment #4 from janus at gcc dot gnu.org ---
The current bug list shows three 4.7-only regressions, two of which are
OOP-related:
* PR 53718
* PR 56731
At first sight the problem here seems to be different, though.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types
2014-01-25 11:07 [Bug fortran/59941] New: ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4] juergen.reuter at desy dot de
2014-01-25 11:08 ` [Bug fortran/59941] " juergen.reuter at desy dot de
2014-01-25 12:56 ` [Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types janus at gcc dot gnu.org
@ 2014-01-25 13:15 ` janus at gcc dot gnu.org
2014-01-25 13:19 ` janus at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-25 13:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941
--- Comment #5 from janus at gcc dot gnu.org ---
Reduced test case:
module tao_random_numbers
integer, dimension(10), private :: s_buffer
integer, private :: s_buffer_end = size (s_buffer)
end module
module beam_structures
type :: smatrix_t
end type
type :: beam_structure_t
type(smatrix_t), dimension(:), allocatable :: smatrix
contains
procedure :: get_smatrix
end type
contains
function get_smatrix (beam_structure) result (smatrix)
class(beam_structure_t), intent(in) :: beam_structure
type(smatrix_t), dimension (size (beam_structure%smatrix)) :: smatrix
end function
end module
module sf_circe1
use tao_random_numbers
use beam_structures
end module
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types
2014-01-25 11:07 [Bug fortran/59941] New: ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4] juergen.reuter at desy dot de
` (2 preceding siblings ...)
2014-01-25 13:15 ` janus at gcc dot gnu.org
@ 2014-01-25 13:19 ` janus at gcc dot gnu.org
2014-01-25 13:29 ` janus at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-25 13:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #6 from janus at gcc dot gnu.org ---
Definitely some kind of module madness is at work here. Somewhat reminds me of
PR 58007.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types
2014-01-25 11:07 [Bug fortran/59941] New: ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4] juergen.reuter at desy dot de
` (3 preceding siblings ...)
2014-01-25 13:19 ` janus at gcc dot gnu.org
@ 2014-01-25 13:29 ` janus at gcc dot gnu.org
2014-01-25 13:50 ` janus at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-25 13:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941
--- Comment #7 from janus at gcc dot gnu.org ---
Another variant with the same behavior (ICEs only with 4.7):
module tao_random_numbers
integer, dimension(10), private :: s_buffer
integer, private :: s_buffer_end = size (s_buffer)
end module
module beam_structures
private
type :: beam_structure_t
integer, dimension(:), allocatable :: smatrix
contains
procedure :: get_smatrix
end type
contains
function get_smatrix (beam_structure) result (matrix)
class(beam_structure_t), intent(in) :: beam_structure
integer, dimension (size (beam_structure%smatrix)) :: matrix
end function
end module
program p
use tao_random_numbers
use beam_structures
end
Everything in the modules is private, so the USE statements should not have any
effect in principle.
Btw, maybe a warning for all-private modules would be appropriate? A module
without any public entities is not very useful, I guess ...
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types
2014-01-25 11:07 [Bug fortran/59941] New: ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4] juergen.reuter at desy dot de
` (4 preceding siblings ...)
2014-01-25 13:29 ` janus at gcc dot gnu.org
@ 2014-01-25 13:50 ` janus at gcc dot gnu.org
2014-01-27 13:26 ` janus at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-25 13:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941
--- Comment #8 from janus at gcc dot gnu.org ---
Backtrace from gdb:
Program received signal SIGSEGV, Segmentation fault.
0x00000000004d19d6 in replace_comp (expr=expr@entry=0x146cc10,
sym=sym@entry=0x146f7a0, i=i@entry=0x7fffffffdc6c)
at /home/jweil/gcc47/branch/gcc/fortran/expr.c:4199
4199 && !gfc_is_intrinsic (expr->symtree->n.sym, 0, expr->where)))
(gdb) bt
#0 0x00000000004d19d6 in replace_comp (expr=expr@entry=0x146cc10,
sym=sym@entry=0x146f7a0, i=i@entry=0x7fffffffdc6c)
at /home/jweil/gcc47/branch/gcc/fortran/expr.c:4199
#1 0x00000000004d46ba in gfc_traverse_expr (expr=0x146cc10,
sym=sym@entry=0x146f7a0,
func=func@entry=0x4d19a0 <replace_comp>, f=f@entry=0) at
/home/jweil/gcc47/branch/gcc/fortran/expr.c:3929
#2 0x00000000004d6c9c in gfc_expr_replace_comp (expr=<optimized out>,
dest=dest@entry=0x146f7a0)
at /home/jweil/gcc47/branch/gcc/fortran/expr.c:4218
#3 0x0000000000524615 in resolve_fl_derived0 (sym=sym@entry=0x146e590)
at /home/jweil/gcc47/branch/gcc/fortran/resolve.c:11724
#4 0x000000000052c80d in resolve_fl_derived (sym=sym@entry=0x146e590)
at /home/jweil/gcc47/branch/gcc/fortran/resolve.c:12046
#5 0x0000000000522238 in resolve_symbol (sym=0x146e590) at
/home/jweil/gcc47/branch/gcc/fortran/resolve.c:12308
#6 0x0000000000540a84 in do_traverse_symtree (st=0x146ca50,
st_func=st_func@entry=0x0,
sym_func=sym_func@entry=0x521ac0 <resolve_symbol>) at
/home/jweil/gcc47/branch/gcc/fortran/symbol.c:3387
#7 0x000000000054440d in gfc_traverse_ns (ns=ns@entry=0x146bf80,
sym_func=sym_func@entry=0x521ac0 <resolve_symbol>)
at /home/jweil/gcc47/branch/gcc/fortran/symbol.c:3412
#8 0x00000000005209d1 in resolve_types (ns=ns@entry=0x146bf80) at
/home/jweil/gcc47/branch/gcc/fortran/resolve.c:13885
#9 0x00000000005213c1 in gfc_resolve (ns=0x146bf80) at
/home/jweil/gcc47/branch/gcc/fortran/resolve.c:13985
#10 0x000000000052f7a5 in gfc_resolve (ns=<optimized out>) at
/home/jweil/gcc47/branch/gcc/fortran/resolve.c:13978
#11 0x0000000000516153 in resolve_all_program_units
(gfc_global_ns_list=0x145ab60)
at /home/jweil/gcc47/branch/gcc/fortran/parse.c:4392
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types
2014-01-25 11:07 [Bug fortran/59941] New: ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4] juergen.reuter at desy dot de
` (5 preceding siblings ...)
2014-01-25 13:50 ` janus at gcc dot gnu.org
@ 2014-01-27 13:26 ` janus at gcc dot gnu.org
2014-01-28 17:49 ` janus at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-27 13:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941
--- Comment #9 from janus at gcc dot gnu.org ---
(In reply to janus from comment #6)
> Somewhat reminds me of PR 58007.
Unfortunately r207119 does not seem to fix it on the 4.7 branch. Apparently
it's a different problem after all ...
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types
2014-01-25 11:07 [Bug fortran/59941] New: ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4] juergen.reuter at desy dot de
` (6 preceding siblings ...)
2014-01-27 13:26 ` janus at gcc dot gnu.org
@ 2014-01-28 17:49 ` janus at gcc dot gnu.org
2014-01-28 17:58 ` janus at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-28 17:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941
--- Comment #11 from janus at gcc dot gnu.org ---
The reason why the ICE is gone in 4.8 is that 'replace_comp' was completely
removed in r195562 (for PR 54107). However this commit is a bit too heavy for a
backport, I guess.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types
2014-01-25 11:07 [Bug fortran/59941] New: ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4] juergen.reuter at desy dot de
` (7 preceding siblings ...)
2014-01-28 17:49 ` janus at gcc dot gnu.org
@ 2014-01-28 17:58 ` janus at gcc dot gnu.org
2014-02-03 8:16 ` janus at gcc dot gnu.org
2014-02-03 8:22 ` janus at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-28 17:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |janus at gcc dot gnu.org
--- Comment #12 from janus at gcc dot gnu.org ---
Here is a more lightweight fix (pretty much straightforward):
Index: gcc/fortran/expr.c
===================================================================
--- gcc/fortran/expr.c (revision 207198)
+++ gcc/fortran/expr.c (working copy)
@@ -4195,7 +4195,7 @@ replace_comp (gfc_expr *expr, gfc_symbol *sym, int
gfc_component *comp;
comp = (gfc_component *)sym;
if ((expr->expr_type == EXPR_VARIABLE
- || (expr->expr_type == EXPR_FUNCTION
+ || (expr->expr_type == EXPR_FUNCTION && !expr->value.function.isym
&& !gfc_is_intrinsic (expr->symtree->n.sym, 0, expr->where)))
&& expr->symtree->n.sym->ns == comp->ts.interface->formal_ns)
{
Removes the ICE on comment 0, comment 5 and comment 7.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types
2014-01-25 11:07 [Bug fortran/59941] New: ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4] juergen.reuter at desy dot de
` (8 preceding siblings ...)
2014-01-28 17:58 ` janus at gcc dot gnu.org
@ 2014-02-03 8:16 ` janus at gcc dot gnu.org
2014-02-03 8:22 ` janus at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: janus at gcc dot gnu.org @ 2014-02-03 8:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941
--- Comment #14 from janus at gcc dot gnu.org ---
Author: janus
Date: Mon Feb 3 08:16:06 2014
New Revision: 207417
URL: http://gcc.gnu.org/viewcvs?rev=207417&root=gcc&view=rev
Log:
2014-02-03 Janus Weil <janus@gcc.gnu.org>
PR fortran/59941
* expr.c (replace_comp): Check for isym to avoid ICE.
2014-02-03 Janus Weil <janus@gcc.gnu.org>
PR fortran/59941
* gfortran.dg/typebound_proc_26.f90: New.
Added:
branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/typebound_proc_26.f90
Modified:
branches/gcc-4_7-branch/gcc/fortran/ChangeLog
branches/gcc-4_7-branch/gcc/fortran/expr.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types
2014-01-25 11:07 [Bug fortran/59941] New: ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4] juergen.reuter at desy dot de
` (9 preceding siblings ...)
2014-02-03 8:16 ` janus at gcc dot gnu.org
@ 2014-02-03 8:22 ` janus at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: janus at gcc dot gnu.org @ 2014-02-03 8:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #15 from janus at gcc dot gnu.org ---
Fixed on the 4.7 branch with r207417 (for a future release 4.7.4).
Closing. Thanks for the report!
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-02-03 8:22 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-25 11:07 [Bug fortran/59941] New: ICE with polymorphic types in [4.7.0|4.7.1|4.73|4.7.4] juergen.reuter at desy dot de
2014-01-25 11:08 ` [Bug fortran/59941] " juergen.reuter at desy dot de
2014-01-25 12:56 ` [Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types janus at gcc dot gnu.org
2014-01-25 13:15 ` janus at gcc dot gnu.org
2014-01-25 13:19 ` janus at gcc dot gnu.org
2014-01-25 13:29 ` janus at gcc dot gnu.org
2014-01-25 13:50 ` janus at gcc dot gnu.org
2014-01-27 13:26 ` janus at gcc dot gnu.org
2014-01-28 17:49 ` janus at gcc dot gnu.org
2014-01-28 17:58 ` janus at gcc dot gnu.org
2014-02-03 8:16 ` janus at gcc dot gnu.org
2014-02-03 8:22 ` janus 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).