Bug 51947 - [OOP] [F08] Polymorphic coarrays: Bogus errors for dummy arguments
Summary: [OOP] [F08] Polymorphic coarrays: Bogus errors for dummy arguments
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2012-01-22 17:05 UTC by Tobias Burnus
Modified: 2013-03-17 14:57 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2012-01-22 17:05:08 UTC
For the following program, one gets bogus errors - once for the dummy argument and once for the generated __copy function (src, dst):

$ gfortran -fcoarray=single test.f90
    class(t) :: x
                 1
Error: Component '_def_init' at (1) with coarray component shall be a nonpointer, nonallocatable scalar
    class(t) :: x
                 1
Error: Variable 'dst' at (1) is INTENT(OUT) and can thus not be an allocatable coarray or have coarray components
    class(t) :: x
                 1
Error: Component '_def_init' at (1) with coarray component shall be a nonpointer, nonallocatable scalar



type t
  integer, allocatable :: a[:]
end type t

contains
  subroutine sub(x)
    class(t) :: x
  end subroutine sub
end
Comment 1 Tobias Burnus 2012-01-29 17:36:24 UTC
See also chapter12/burgers_caf_v4 in http://www.cambridge.org/rouson