Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/missing_optional_dummy_2.f90 @ 118:fd00160c1b76
ifdef TARGET_64BIT
author | mir3636 |
---|---|
date | Tue, 27 Feb 2018 15:01:35 +0900 |
parents | 04ced10e8804 |
children | 84e7813d76e9 |
line wrap: on
line source
! { dg-do compile } ! Tests the fix for PR29321 and PR29322, in which ICEs occurred for the ! lack of proper attention to checking pointers in gfc_conv_function_call. ! ! Contributed by Olav Vahtras <vahtras@pdc.kth.se> ! and Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> ! MODULE myint TYPE NUM INTEGER :: R = 0 END TYPE NUM CONTAINS FUNCTION FUNC(A,B) RESULT(E) IMPLICIT NONE TYPE(NUM) A,B,E INTENT(IN) :: A,B OPTIONAL B E%R=A%R CALL SUB(A,E) END FUNCTION FUNC SUBROUTINE SUB(A,E,B,C) IMPLICIT NONE TYPE(NUM) A,E,B,C INTENT(IN) A,B INTENT(OUT) E,C OPTIONAL B,C E%R=A%R END SUBROUTINE SUB END MODULE myint if (isscan () /= 0) call abort contains integer function isscan (substr) character(*), optional :: substr if (.not.present(substr)) isscan = myscan ("foo", "over") end function isscan end