gcc/testsuite/gfortran.dg/char_result_19.f90
raw| 1 | ! { dg-do preprocess } |
| 2 | ! { dg-additional-options "-cpp" } |
| 3 | ! |
| 4 | ! Test the fix for PR86248 |
| 5 | ! |
| 6 | ! Contributed by Bill Long <[email protected]> |
| 7 | ! |
| 8 | program test |
| 9 | use test_module |
| 10 | implicit none |
| 11 | integer :: i |
| 12 | character(:), allocatable :: chr |
| 13 | do i = 0, 2 |
| 14 | chr = func_1 (i) |
| 15 | select case (i) |
| 16 | case (0) |
| 17 | if (chr .ne. 'el0') stop i |
| 18 | case (1) |
| 19 | if (chr .ne. 'el11') stop i |
| 20 | case (2) |
| 21 | if (chr .ne. 'el2') stop i |
| 22 | end select |
| 23 | end do |
| 24 | end program test |