This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/57160] New: short-circuit IF only with -ffrontend-optimize


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

             Bug #: 57160
           Summary: short-circuit IF only with -ffrontend-optimize
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: Joost.VandeVondele@mat.ethz.ch


it would be nice to have the short-circuit evaluation of IF statements only if
-ffrontend-optimize is in place. It would help to capture (at -O0) bugs like:

MODULE M1
 TYPE T1
   LOGICAL :: T=.TRUE.
 END TYPE T1
CONTAINS
 SUBROUTINE S1(m)
   TYPE(T1), POINTER :: m
   IF (ASSOCIATED(m) .AND. m%T) THEN
    WRITE(6,*) "X"
   ENDIF
 END SUBROUTINE
END MODULE

USE M1
 TYPE(T1), POINTER :: m=>NULL()
 CALL S1(m)
END

where I would like the code to segfault.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]