Summary: | Generic interfaces & derived types cannot share names | ||
---|---|---|---|
Product: | gcc | Reporter: | Rich Townsend <townsend> |
Component: | fortran | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | janus |
Priority: | P3 | ||
Version: | 4.6.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | ||
Attachments: | Test case demonstrating issue |
Created attachment 23677 [details] Test case demonstrating issue There seems to be a problem when a generic interface and a derived type share the same name. Compiling the attached code with 4.6.0 (20110312) on OS X 10.6.6, I get the following error: test_name_conflict.f90:7.18: interface mytype 1 Error: DERIVED attribute of 'mytype' conflicts with PROCEDURE attribute at (1) test_name_conflict.f90:8.22: module procedure new_mytype 1 Error: MODULE PROCEDURE at (1) must be in a generic module interface test_name_conflict.f90:9.5: end interface 1 Error: Expecting END MODULE statement at (1) This conflict is bogus, since the F2003 standard allows derived types to share names with generic interfaces (see, e.g., Appendix C.1.6 of the standard).