2 ! Test the fix by HJ Lu for PR23634 and friends. All involve the ICE
3 ! that arose from a character array constructor usedas an actual
6 ! The various parts of this test are taken from the PRs.
14 character(128) :: line = 'abcdefghijklmnopqrstuvwxyz'
17 character(128) :: word
19 call redirect_((/word/))
21 subroutine redirect_ (ch)
23 if (ch(1) /= line) call abort ()
24 end subroutine redirect_
33 type(point), pointer, public :: stdin => NULL()
41 type(point), pointer :: ptr
42 character(128) :: io(:)
43 if (associated (ptr)) call abort ()
44 if (io(1) .ne. line) call abort ()
52 integer :: i(6) = (/1,6,3,4,5,2/)
53 character (6) :: a = 'hello ', t
54 character(len=1) :: s(6) = (/'g','g','d','d','a','o'/)
57 call option_stopwatch_s (a) ! Call test of PR25619
58 call p () ! Call test of PR26491
59 call my_p (line) ! Call test of PR26550
61 ! Test Vivek Rao's bug, as reported in PR25619.
63 call option_stopwatch_a ((/a,'hola! ', t/))
68 subroutine option_stopwatch_s(a)
69 character (*), intent(in) :: a
70 character (len=len(a)) :: b
73 call option_stopwatch_a((/a, b, 'goddag'/))
74 end subroutine option_stopwatch_s
75 subroutine option_stopwatch_a (a)
77 if (any (a .ne. (/'hello ','hola! ','goddag'/))) call abort ()
78 end subroutine option_stopwatch_a
81 ! { dg-final { cleanup-modules "global my_module" } }