test suite file
! pr 15149
! note this is not a test of the random
! number generator, just that "something"
! exists and returns values not always 0
TYPE point_type
SEQUENCE
REAL :: pos(2)
END TYPE
INTEGER, PARAMETER :: N=1000000
TYPE(point_type) :: points(N)
REAL, DIMENSION(2*N) :: scratch
EQUIVALENCE(points,scratch)
CALL RANDOM_NUMBER(scratch)
scratch=2.0*scratch-1.0
count=0
DO i=1,N
IF (SUM(points(i)%pos**2)<1.0) THEN
count=count+1
ENDIF
ENDDO
IF (4.0*REAL(count)/REAL(N).LT.3.14) THEN
CALL ABORT
ENDIF
END