Bug 51947 - [OOP] [F08] Polymorphic coarrays: Bogus errors for dummy arguments
Summary: [OOP] [F08] Polymorphic coarrays: Bogus errors for dummy arguments
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: 4.9.0
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2012-01-22 17:05 UTC by Tobias Burnus
Modified: 2016-11-16 17:02 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
Comment 2 Dominique d'Humieres 2015-10-20 16:14:24 UTC
Fixed between revisions r197920 (2013-04-12, ICE) and r197969 (2013-04-15, compiles), likely r197930 (pr56929). Closing as FIXED.