public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35476]  New: Accepts invalid: USE/host association of generics with same specifics
@ 2008-03-05 17:46 burnus at gcc dot gnu dot org
  2008-03-05 22:06 ` [Bug fortran/35476] " pault at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-03-05 17:46 UTC (permalink / raw)
  To: gcc-bugs

Found the following on the J3 Fortran list. I think the program below is
invalid for the reasons given by Bill Long, but it has not finally decided yet
(on J3). (The question/program comes from Sun)

Current status:
- openf95 and sunf95 reject it
- ifort, gfortran, NAG f95, and g95 accept it
Bill Long writes that he tested two non-Sun compilers, of which two gave an
error and two did not.

Craig diged up from the standard:
| Use association is defined in section 11.2.1.  Host association is
| covered in section 16.4.1.3.  The second paragraph starts with this sentence
| [411:9-10]:  "If an entity that is accessed by use association has the same
| nongeneric name as a host entity, the host entity is inaccessible by that
| name."

However, as Bill notes:
| I think that issuing the error is valid.  Generic interfaces merge 
| together their lists of specifics when more than one with the same 
| generic name is visible.  Whether that visibility comes through host 
| association or use association should not matter.  Craig's citation from 
| f03 explicitly says "nongeneric" intentionally, and does not apply in 
| this case.

       MODULE M1
         INTERFACE SUBR
           MODULE PROCEDURE SUBR1
         END INTERFACE
       CONTAINS
         SUBROUTINE SUBR1
         END SUBROUTINE
       END

       MODULE M2
         INTERFACE SUBR
           MODULE PROCEDURE SUBR2
         END INTERFACE
       CONTAINS
         SUBROUTINE SUBR2
         END SUBROUTINE
       END

       PROGRAM MAIN
         USE M1
         CALL S
       CONTAINS
         SUBROUTINE S
           USE M2
           CALL SUBR
         END SUBROUTINE
       END


-- 
           Summary: Accepts invalid: USE/host association of generics with
                    same specifics
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35476


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-01-28 22:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-35476-4@http.gcc.gnu.org/bugzilla/>
2012-01-28 22:33 ` [Bug fortran/35476] Accepts invalid: USE/host association of generics with same specifics dominiq at lps dot ens.fr
2012-01-28 23:09 ` burnus at gcc dot gnu.org
2008-03-05 17:46 [Bug fortran/35476] New: " burnus at gcc dot gnu dot org
2008-03-05 22:06 ` [Bug fortran/35476] " pault at gcc dot gnu dot org
2008-03-06  7:01 ` burnus at gcc dot gnu dot org
2008-03-07 12:04 ` fxcoudert at gcc dot gnu dot org
2008-03-15 22:41 ` pault at gcc dot gnu dot org
2008-04-12 10:34 ` burnus at gcc dot gnu dot org
2009-02-11 15:11 ` pault at gcc dot gnu dot org
2009-02-11 15:36 ` burnus at gcc dot gnu dot org
2009-12-17 22:50 ` burnus at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).