This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/57160] New: short-circuit IF only with -ffrontend-optimize
- From: "Joost.VandeVondele at mat dot ethz.ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 May 2013 12:41:42 +0000
- Subject: [Bug fortran/57160] New: short-circuit IF only with -ffrontend-optimize
- Auto-submitted: auto-generated
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.