public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/49592] New: [OOP] Non-polymorphic ALLOCATE with polymorphic SOURCE= rejected
@ 2011-06-30 12:57 burnus at gcc dot gnu.org
2013-01-08 16:17 ` [Bug fortran/49592] " dominiq at lps dot ens.fr
2021-12-18 1:31 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-06-30 12:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49592
Summary: [OOP] Non-polymorphic ALLOCATE with polymorphic
SOURCE= rejected
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
CC: janus@gcc.gnu.org
http://j3-fortran.org/doc/meeting/195/11-194r1.txt
According to the first round of interpretation requests (namely: J3, WG5 will
follow later), the following program is valid. gfortran rejects it with:
Allocate(y,Source=x) ! (*)
1 2
Error: Type of entity at (1) is type incompatible with source-expr at (2)
Program m195_m1
Type t
Real c
End Type
Type,Extends(t) :: t2
Real d
End Type
Class(t),Allocatable :: x
Type(t),Allocatable :: y
Allocate(x,Source=t2(1.5,-1.5))
Allocate(y,Source=x) ! (*)
! ...
End Program
Proposed edits:
[128:24] In 6.7.1.2p7, before "On successful", insert
"If an <allocate-object> is not polymorphic and the <source-expr> is
polymorphic with a dynamic type that differs from its declared
type, the value provided for that <allocate-object> is the ancestor
component of the <source-expr> that has the type of the
<allocate-object>; otherwise, the value provided is the value of
the <source-expr>."
[128:25-26] Replace "that of <source-expr>" with "the value provided",
twice.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/49592] [OOP] Non-polymorphic ALLOCATE with polymorphic SOURCE= rejected
2011-06-30 12:57 [Bug fortran/49592] New: [OOP] Non-polymorphic ALLOCATE with polymorphic SOURCE= rejected burnus at gcc dot gnu.org
@ 2013-01-08 16:17 ` dominiq at lps dot ens.fr
2021-12-18 1:31 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-01-08 16:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49592
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-01-08
Ever Confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-01-08 16:17:09 UTC ---
Any progress here?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/49592] [OOP] Non-polymorphic ALLOCATE with polymorphic SOURCE= rejected
2011-06-30 12:57 [Bug fortran/49592] New: [OOP] Non-polymorphic ALLOCATE with polymorphic SOURCE= rejected burnus at gcc dot gnu.org
2013-01-08 16:17 ` [Bug fortran/49592] " dominiq at lps dot ens.fr
@ 2021-12-18 1:31 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-18 1:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49592
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |5.5.0
Known to work| |6.3.0
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Seems to be fixed in GCC 6+.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-18 1:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-30 12:57 [Bug fortran/49592] New: [OOP] Non-polymorphic ALLOCATE with polymorphic SOURCE= rejected burnus at gcc dot gnu.org
2013-01-08 16:17 ` [Bug fortran/49592] " dominiq at lps dot ens.fr
2021-12-18 1:31 ` pinskia 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).