This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52403] New: coarray component gives error with CLASS( ) declaration
- From: "longb at cray dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 27 Feb 2012 15:50:25 +0000
- Subject: [Bug fortran/52403] New: coarray component gives error with CLASS( ) declaration
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52403
Bug #: 52403
Summary: coarray component gives error with CLASS( )
declaration
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: longb@cray.com
Possible another case that needs to be considered in Bug 52052
> cat test.f90
module m_coarray
implicit none
private
type, public :: coarray_t
integer, allocatable, private :: value(:)[:]
contains
procedure :: allocate_myCoarray => allocate_myCoarray_sub
end type
contains
subroutine allocate_myCoarray_sub(this)
class(coarray_t), intent(inout) :: this
allocate( this%value(num_images())[*] )
end subroutine
end module
!===============================================================================
program main
use m_coarray
implicit none
type(coarray_t) :: caf
end program
> ftn -fcoarray=single test.f90
test.f90:14.43:
class(coarray_t), intent(inout) :: this
1
Error: Component '_data' at (1) with coarray component shall be a nonpointer,
nonallocatable scalar
test.f90:14.43:
class(coarray_t), intent(inout) :: this
1
Error: Component '_def_init' at (1) with coarray component shall be a
nonpointer, nonallocatable scalar
test.f90:14.43:
class(coarray_t), intent(inout) :: this
1
Error: Component '_def_init' at (1) with coarray component shall be a
nonpointer, nonallocatable scalar
test.f90:16.14:
allocate( this%value(num_images())[*] )
1
Error: Coindexed allocatable object at (1)
test.f90:21.15:
use m_coarray
1
Fatal Error: Can't open module file 'm_coarray.mod' for reading at (1): No such
file or directory
I suspect the CLASS declaration is triggering come sort of hidden parent
component that fails the requirements.
Also fails with gfortran 4.7.
Compiles without error with Cray and Intel compilers.
I suspect this is just a case of incomplete implementation at this stage.