This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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] |
pure subroutine assertion(cond) implicit none logical, intent(in) :: cond real, volatile :: r if ( noassert ) return !<=== r = 1.0 if (.not. cond) r = r / 0.0 end subroutine assertion
The parameter noassert should - in principle - enable the compiler to delete the actual call to the subroutine. (I have been unable to verify this from the call tree, as the option -fdump-fortran-optimized did not produce any output.)
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |