1! { dg-do compile }
2!
3! Tests the fix for PR58754
4!
5  type :: char_type
6    character, allocatable :: chr (:)
7  end type
8  character, allocatable :: c(:)
9  type(char_type) :: d
10  character :: t(1) = ["w"]
11
12  allocate (c (1), source = t)
13  if (any (c .ne. t)) call abort
14  c = ["a"]
15  if (any (c .ne. ["a"])) call abort
16  deallocate (c)
17
18! Check allocatable character components, whilst we are about it.
19  allocate (d%chr (2), source = [t, char (ichar (t) + 1)])
20  if (any (d%chr .ne. ["w", "x"])) call abort
21  d%chr = ["a","b","c","d"]
22  if (any (d%chr .ne. ["a","b","c","d"])) call abort
23  deallocate (d%chr)
24end
25