public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/59525] New: Inheritance problems
@ 2013-12-16 12:08 sarantis.pantazis at gmail dot com
2013-12-16 12:08 ` [Bug fortran/59525] " sarantis.pantazis at gmail dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: sarantis.pantazis at gmail dot com @ 2013-12-16 12:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59525
Bug ID: 59525
Summary: Inheritance problems
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: sarantis.pantazis at gmail dot com
I have some problems with inheritance.
In particular, I can not allocate an allocatable class variable to a child type
(the extra components are not recognized by the compiler).
Attached is a minimal working example.
The error message is the following:
testInheritance.f08:25.23:
write(*,*) bla%i, bla%j
Error: 'j' at (1) is not a member of the 'mytype' structure
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/59525] Inheritance problems
2013-12-16 12:08 [Bug fortran/59525] New: Inheritance problems sarantis.pantazis at gmail dot com
@ 2013-12-16 12:08 ` sarantis.pantazis at gmail dot com
2013-12-16 13:01 ` janus at gcc dot gnu.org
2013-12-16 14:24 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: sarantis.pantazis at gmail dot com @ 2013-12-16 12:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59525
--- Comment #1 from Sarantis Pantazis <sarantis.pantazis at gmail dot com> ---
Created attachment 31446
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31446&action=edit
Minimal working example
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/59525] Inheritance problems
2013-12-16 12:08 [Bug fortran/59525] New: Inheritance problems sarantis.pantazis at gmail dot com
2013-12-16 12:08 ` [Bug fortran/59525] " sarantis.pantazis at gmail dot com
@ 2013-12-16 13:01 ` janus at gcc dot gnu.org
2013-12-16 14:24 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: janus at gcc dot gnu.org @ 2013-12-16 13:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59525
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |janus at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #2 from janus at gcc dot gnu.org ---
(In reply to Sarantis Pantazis from comment #0)
> I have some problems with inheritance.
What you describe is not a bug in the gfortran compiler, but in your
understanding of how inheritance works.
> testInheritance.f08:25.23:
> write(*,*) bla%i, bla%j
> Error: 'j' at (1) is not a member of the 'mytype' structure
This error is perfectly fine. Your code is not valid Fortran.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/59525] Inheritance problems
2013-12-16 12:08 [Bug fortran/59525] New: Inheritance problems sarantis.pantazis at gmail dot com
2013-12-16 12:08 ` [Bug fortran/59525] " sarantis.pantazis at gmail dot com
2013-12-16 13:01 ` janus at gcc dot gnu.org
@ 2013-12-16 14:24 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-12-16 14:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59525
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to janus from comment #2)
> (In reply to Sarantis Pantazis from comment #0)
> > I have some problems with inheritance.
>
> What you describe is not a bug in the gfortran compiler, but in your
> understanding of how inheritance works.
To give a hit:
> > write(*,*) bla%i, bla%j
> > Error: 'j' at (1) is not a member of the 'mytype' structure
bla%j is not part of mytype. You need to use "select type" to access it - as
you did in "subroutine setbla"
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-16 14:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-16 12:08 [Bug fortran/59525] New: Inheritance problems sarantis.pantazis at gmail dot com
2013-12-16 12:08 ` [Bug fortran/59525] " sarantis.pantazis at gmail dot com
2013-12-16 13:01 ` janus at gcc dot gnu.org
2013-12-16 14:24 ` burnus 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).