view gcc/testsuite/gfortran.dg/impure_actual_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 }
! Tests the fix for PR25056 in which a non-PURE procedure could be
! passed as the actual argument to a PURE procedure.
!
! Contributed by Joost VandeVondele  <jv244@cam.ac.uk>
!
MODULE M1
CONTAINS
 FUNCTION L()
  L=1
 END FUNCTION L
 PURE FUNCTION J(K)
   INTERFACE
     PURE FUNCTION K()
     END FUNCTION K
   END INTERFACE
   J=K()
 END FUNCTION J
END MODULE M1
USE M1
 write(6,*) J(L) ! { dg-error "Mismatch in PURE attribute" }
END