public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/53191] New: [OOP] C614 (F2003) or C618 (F2008) not implemented for class expressions
@ 2012-05-02 14:19 pault at gcc dot gnu.org
2012-05-05 8:51 ` [Bug fortran/53191] " pault at gcc dot gnu.org
2012-05-05 8:55 ` pault at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: pault at gcc dot gnu.org @ 2012-05-02 14:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53191
Bug #: 53191
Summary: [OOP] C614 (F2003) or C618 (F2008) not implemented for
class expressions
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pault@gcc.gnu.org
"A part-name to the right of a part-ref with non-zero rank shall not have the
POINTER or ALLOCATABLE attribute" is not implemented for class expressions.
implicit none
type t0
integer :: j = 42
end type t0
type, extends(t0) :: t1
integer :: k = 99
end type t1
type t
integer :: i
class(t0), allocatable :: foo
end type t
type(t) :: m(4)
integer :: n
do n = 1, 2
allocate(m(n)%foo, source = t0(n*99))
end do
do n = 3, 4
allocate(m(n)%foo, source = t1(n*99, n*999))
end do
end
Should not be permitted, according to this constraint. At present, it compiles
and does the intended thing at runtime.
Cheers
Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/53191] [OOP] C614 (F2003) or C618 (F2008) not implemented for class expressions
2012-05-02 14:19 [Bug fortran/53191] New: [OOP] C614 (F2003) or C618 (F2008) not implemented for class expressions pault at gcc dot gnu.org
@ 2012-05-05 8:51 ` pault at gcc dot gnu.org
2012-05-05 8:55 ` pault at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pault at gcc dot gnu.org @ 2012-05-05 8:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53191
--- Comment #1 from Paul Thomas <pault at gcc dot gnu.org> 2012-05-05 08:49:54 UTC ---
Author: pault
Date: Sat May 5 08:49:43 2012
New Revision: 187192
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187192
Log:
2012-05-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/41600
* trans-array.c (build_array_ref): New static function.
(gfc_conv_array_ref, gfc_get_dataptr_offset): Call it.
* trans-expr.c (gfc_get_vptr_from_expr): New function.
(gfc_conv_derived_to_class): Add a new argument for a caller
supplied vptr and use it if it is not NULL.
(gfc_conv_procedure_call): Add NULL to call to above.
symbol.c (gfc_is_associate_pointer): Return true if symbol is
a class object.
* trans-stmt.c (trans_associate_var): Handle class associate-
names.
* expr.c (gfc_get_variable_expr): Supply the array-spec if
possible.
* trans-types.c (gfc_typenode_for_spec): Set GFC_CLASS_TYPE_P
for class types.
* trans.h : Add prototypes for gfc_get_vptr_from_expr and
gfc_conv_derived_to_class. Define GFC_CLASS_TYPE_P.
* resolve.c (resolve_variable): For class arrays, ensure that
the target expression has all the necessary _data references.
(resolve_assoc_var): Throw a "not yet implemented" error for
class array selectors that need a temporary.
* match.c (copy_ts_from_selector_to_associate,
select_derived_set_tmp, select_class_set_tmp): New functions.
(select_type_set_tmp): Call one of last two new functions.
(gfc_match_select_type): Copy_ts_from_selector_to_associate is
called if associate-name is typed.
PR fortran/53191
* resolve.c (resolve_ref): C614 applied to class expressions.
2012-05-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/41600
* gfortran.dg/select_type_26.f03 : New test.
* gfortran.dg/select_type_27.f03 : New test.
PR fortran/53191
* gfortran.dg/select_type_28.f03 : New test.
Added:
trunk/gcc/testsuite/gfortran.dg/select_type_26.f03
trunk/gcc/testsuite/gfortran.dg/select_type_27.f03
trunk/gcc/testsuite/gfortran.dg/select_type_28.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/expr.c
trunk/gcc/fortran/match.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/symbol.c
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/fortran/trans-types.c
trunk/gcc/fortran/trans.h
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/53191] [OOP] C614 (F2003) or C618 (F2008) not implemented for class expressions
2012-05-02 14:19 [Bug fortran/53191] New: [OOP] C614 (F2003) or C618 (F2008) not implemented for class expressions pault at gcc dot gnu.org
2012-05-05 8:51 ` [Bug fortran/53191] " pault at gcc dot gnu.org
@ 2012-05-05 8:55 ` pault at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pault at gcc dot gnu.org @ 2012-05-05 8:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53191
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #2 from Paul Thomas <pault at gcc dot gnu.org> 2012-05-05 08:53:51 UTC ---
Fixed on trunk.
Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-05 8:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-02 14:19 [Bug fortran/53191] New: [OOP] C614 (F2003) or C618 (F2008) not implemented for class expressions pault at gcc dot gnu.org
2012-05-05 8:51 ` [Bug fortran/53191] " pault at gcc dot gnu.org
2012-05-05 8:55 ` 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).