URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [assumed_charlen_function_3.f90] - Rev 694
Compare with Previous | Blame | View Log
! { dg-do compile }! Tests the patch for PRs 25084, 20852, 25085 and 25086, all of! which involve assumed character length functions.! This test checks the things that should not emit errors.!! Contributed by Paul Thomas <pault@gcc.gnu.org>!function is_OK (ch) ! { dg-warning "Obsolescent feature" }character(*) is_OK, ch ! OK in an external functionis_OK = chend function is_OK! The warning occurs twice for the next line; for 'more_OK' and for 'fcn';function more_OK (ch, fcn) ! { dg-warning "Obsolescent feature" }character(*) more_OK, chcharacter (*), external :: fcn ! OK as a dummy argumentmore_OK = fcn (ch)end function more_OKcharacter(4) :: answercharacter(4), external :: is_OK, more_OKanswer = is_OK ("isOK") ! LEN defined in calling scopeprint *, answeranswer = more_OK ("okay", is_OK) ! Actual arg has defined LENprint *, answeranswer = also_OK ("OKOK")print *, answercontainsfunction also_OK (ch)character(4) also_OKcharacter(*) chalso_OK = is_OK (ch) ! LEN obtained by host associationend function also_OKEND
