URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [real_const_3.f90] - Rev 302
Compare with Previous | Blame | View Log
!{ dg-do run }!{ dg-options "-fno-range-check" }!{ dg-add-options ieee }!{ dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }! PR19310 and PR19904, allow disabling range check during compile.! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>program maincharacter(len=80) strreal, parameter :: zero=0, nan=0/zerocomplex :: z = (-0.1,-2.2)/(0.0,0.0)complex :: z2 = (0.1,1)/0complex :: z3 = (1e35, -2e3)/1.234e-37complex :: z4 = (1e-35, -2e-35)/1234e34real :: aa = exp(1000.0)b = 1/exp(1000.0)write(str,*) aif (trim(adjustl(str)) .ne. '+Infinity') call abortif (b .ne. 0.) call abortwrite(str,*) -1.0/bif (trim(adjustl(str)) .ne. '-Infinity') call abortwrite(str,*) b/0.0if (trim(adjustl(str)) .ne. 'NaN') call abortwrite(str,*) 0.0/0.0if (trim(adjustl(str)) .ne. 'NaN') call abortwrite(str,*) 1.0/(-0.)if (trim(adjustl(str)) .ne. '-Infinity') call abortwrite(str,*) -2.0/0.if (trim(adjustl(str)) .ne. '-Infinity') call abortwrite(str,*) 3.0/0.if (trim(adjustl(str)) .ne. '+Infinity') call abortwrite(str,*) nanif (trim(adjustl(str)) .ne. 'NaN') call abortwrite(str,*) zif (trim(adjustl(str)) .ne. '( NaN, NaN)') call abortwrite(str,*) z2if (trim(adjustl(str)) .ne. '( NaN, NaN)') call abortwrite(str,*) z3if (trim(adjustl(str)) .ne. '( +Infinity, -Infinity)') call abortwrite(str,*) z4if (trim(adjustl(str)) .ne. '( 0.0000000 , -0.0000000 )') call abortend program main
