URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [missing_optional_dummy_3.f90] - Rev 694
Compare with Previous | Blame | View Log
! { dg-do compile }! Tests the fix for PR29976, in which the call to CMPLX caused an! ICE with an optional dummy for the imaginary part.!! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>!SUBROUTINE pw_sumup (alpha_im)REAL, INTENT(in), OPTIONAL :: alpha_imCOMPLEX :: my_alpha_cIF (PRESENT(alpha_im)) THENmy_alpha_c = CMPLX(0.,alpha_im)END IFEND SUBROUTINE pw_sumup! Check non-intrinsic functions.SUBROUTINE pw_sumup_2 (alpha_im)REAL, INTENT(in), OPTIONAL :: alpha_imCOMPLEX :: my_alpha_cIF (PRESENT(alpha_im)) THENmy_alpha_c = MY_CMPLX(0.,alpha_im)END IFcontainscomplex function MY_CMPLX (re, im)real, intent(in) :: rereal, intent(in), optional :: imif (present (im)) thenMY_CMPLX = cmplx (re, im)elseMY_CMPLX = cmplx (re, 0.0)end ifend function MY_CMPLXEND SUBROUTINE pw_sumup_2
