Bug 20854 - dummy argument of public procedure may not be of private type
Summary: dummy argument of public procedure may not be of private type
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2005-04-08 15:54 UTC by Joost VandeVondele
Modified: 2005-12-31 20:11 UTC (History)
1 user (show)

See Also:
Host:
Target: i686-pc-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-09-30 17:07:34


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joost VandeVondele 2005-04-08 15:54:01 UTC
The following is non-standard and the compiler should probably generate a
warning/error with '-pedantic -std=f95'


MODULE TEST
TYPE tt
INTEGER :: I
END TYPE tt
PUBLIC  :: try
PRIVATE :: tt
CONTAINS
SUBROUTINE try(A)
  TYPE(tt) :: A
END SUBROUTINE try
END MODULE TEST
END
Comment 1 Francois-Xavier Coudert 2005-04-10 08:42:02 UTC
Confirmed. Intel says: "Dummy argument A of procedure TRY cannot have a type
that is PRIVATE".
Comment 2 Andrew Pinski 2005-12-31 20:11:02 UTC
Error: 'a' is a PRIVATE type and cannot be a dummy argument of 'try', which is PUBLIC at (1)


Fixed in 4.1.0.