Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/intrinsic_1.f90 @ 144:8f4e72ab4e11
fix segmentation fault caused by nothing next cur_op to end
author | Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 23 Dec 2018 21:23:56 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
! { dg-do compile } ! ! PR 39861/39864 ! ! Test cases provided by Dominique d'Humieres <dominiq@lps.ens.fr> ! and Michael Richmond <michael.a.richmond@nasa.gov>. module vector_calculus intrinsic :: dot_product, sqrt contains function len(r) real, dimension(:), intent(in) :: r real :: len len = sqrt(dot_product(r,r)) end function len FUNCTION next_state() INTRINSIC :: RESHAPE INTEGER, PARAMETER :: trantb(1,1) = RESHAPE((/1,2/), shape=(/1,1/)) next_state = trantb(1, 1) END FUNCTION next_state end module vector_calculus