gcc/testsuite/gfortran.dg/forall_char_dependencies_1.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! Tests fix for PR29211, in which an ICE would be produced by FORALL assignments |
| 3 | ! with dependencies. |
| 4 | ! |
| 5 | ! Contributed by Paul Thomas <[email protected]> |
| 6 | ! |
| 7 | character(12), dimension(2) :: a, b |
| 8 | a= (/"abcdefghijkl","mnopqrstuvwx"/) |
| 9 | ! OK because it uses gfc_trans_assignment |
| 10 | forall (i=1:2) b(i) = a(i) |
| 11 | ! Was broken - gfc_trans_assign_need_temp had no handling of string lengths |
| 12 | forall (i=1:2) a(3-i) = a(i) |
| 13 | end |