public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/58906] [OOP] SELECT TYPE with CLASS IS generates ICE
[not found] <bug-58906-4@http.gcc.gnu.org/bugzilla/>
@ 2013-10-28 17:24 ` burnus at gcc dot gnu.org
2014-12-29 11:33 ` janus at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-10-28 17:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58906
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-10-28
CC| |burnus at gcc dot gnu.org
Summary|SELECT TYPE with CLASS IS |[OOP] SELECT TYPE with
|generates ICE |CLASS IS generates ICE
Ever confirmed|0 |1
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Confirmed.
ICEs in resolve_select_type for:
SELECT TYPE( iarr=>r%arr )
where "r%arr" is CLASS(*). Hence,
(gdb) p code->expr2->ts.u.derived->attr.unlimited_polymorphic
$6 = 1
(gdb) p code->expr2->ts.u.derived->ts.u.derived
$7 = (gfc_symbol *) 0x0
but the code does the following (last line derefs a NULL pointer).
7914 if (code->expr2)
7915 {
7916 if (code->expr1->symtree->n.sym->attr.untyped)
7917 code->expr1->symtree->n.sym->ts = code->expr2->ts;
7918 selector_type = CLASS_DATA (code->expr2)->ts.u.derived;
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug fortran/58906] [OOP] SELECT TYPE with CLASS IS generates ICE
[not found] <bug-58906-4@http.gcc.gnu.org/bugzilla/>
2013-10-28 17:24 ` [Bug fortran/58906] [OOP] SELECT TYPE with CLASS IS generates ICE burnus at gcc dot gnu.org
@ 2014-12-29 11:33 ` janus at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: janus at gcc dot gnu.org @ 2014-12-29 11:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58906
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janus at gcc dot gnu.org
--- Comment #2 from janus at gcc dot gnu.org ---
Segfaults with 4.8, 4.9 and trunk.
Slightly reduced test case:
TYPE :: child
CLASS(*), DIMENSION(:), POINTER :: arr
END TYPE
CONTAINS
SUBROUTINE f(r)
CLASS(child) :: r
SELECT TYPE ( r )
CLASS IS ( child )
SELECT TYPE( iarr=>r%arr )
TYPE IS ( INTEGER )
CALL func( iarr )
END SELECT
END SELECT
END SUBROUTINE
END
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-29 11:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-58906-4@http.gcc.gnu.org/bugzilla/>
2013-10-28 17:24 ` [Bug fortran/58906] [OOP] SELECT TYPE with CLASS IS generates ICE burnus at gcc dot gnu.org
2014-12-29 11:33 ` 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).