1! { dg-do compile }
2! Tests the fix for PR26976, in which non-compliant elemental
3! intrinsic function results were not detected.  At the same
4! time, the means to tests the compliance of TRANSFER with the
5! optional SIZE parameter was added.
6!
7! Contributed by Dominique Dhumieres  <dominiq@lps.ens.fr>
8!
9real(4) :: pi, a(2), b(3)
10character(26) :: ch
11
12pi = acos(-1.0)
13b = pi
14
15a = cos(b) ! { dg-error "Different shape for array assignment" }
16
17a = -pi
18b = cos(a) ! { dg-error "Different shape for array assignment" }
19
20ch = "abcdefghijklmnopqrstuvwxyz"
21a = transfer (ch, pi, 3) ! { dg-error "Different shape for array assignment" }
22
23! This already generated an error
24b = reshape ((/1.0/),(/1/)) ! { dg-error "Different shape for array assignment" }
25
26end
27