gcc/fortran/
[official-gcc.git] / gcc / testsuite / gfortran.dg / intrinsic_char_1.f90
blob845493cb649cd5d052954dc8516d2bed41feec86
1 ! { dg-do run }
2 ! Tests the fix for PR35932, in which the KIND argument of CHAR
3 ! was not converted and this screwed up the scalarizer.
5 ! Contributed by Dick Hendrickson <dick.hendrickson@gmail.com>
7 program FA0005
9 CHARACTER(1) CDA1(10)
10 character(10) CDA10
11 INTEGER :: IDA(10) = [(i, i = 97,106)]
13 CDA1 = CHAR ( IDA, KIND("A" )) !failed
14 if (transfer (CDA1, CDA10) /= "abcdefghij") call abort ()
15 CDA1 = CHAR ( IDA ) !worked
16 if (transfer (CDA1, CDA10) /= "abcdefghij") call abort ()
17 END