Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/char_cons_len.f90 @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line source
! { dg-do compile } ! Tests the fix for PR24813 in which a character array ! constructor, as an argument for LEN, would cause an ICE. ! character(11) :: chr1, chr2 i = len ((/chr1, chr2, "ggg "/)) j = len ((/"abcdefghijk", chr1, chr2/)) k = len ((/'hello ','goodbye'/)) l = foo ("yes siree, Bob") if (any ((/11,11,7,14/) /= (/i,j,k,l/))) STOP 1 contains integer function foo (arg) character(*) :: arg character(len(arg)) :: ctor foo = len ((/ctor/)) end function foo end