This extract from the code of Guglielmo Pasa causes GNU Fortran 95 (GCC 4.1.0 
20050401 (experimental)) to go into an infinite loop.  Reducing the number of 
optional arguments or changing LEN(WHAT) to LEN=10, for example, stop the 
infinite loop.

  SUBROUTINE CQUERY(WHAT,OUI,NON)
    CHARACTER(LEN=*),INTENT(INOUT)       :: WHAT
    CHARACTER(LEN=*),INTENT(IN),OPTIONAL :: OUI,NON
    INTEGER               :: INFO
    CHARACTER(LEN(WHAT))   :: REP,Y0,N0
    
    Y0=OUI
    N0=NON


  END SUBROUTINE CQUERY

-- 
           Summary: Compiler gets stuck in loop on valid code
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: paulthomas2 at wanadoo dot fr
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to