2 ! { dg-options "-std=f2008 -fcheck=bounds" }
3 ! { dg-shouldfail "Bounds check" }
6 ! Check that -fcheck=bounds catches too small target at runtime for
7 ! pointer rank remapping.
9 ! Contributed by Daniel Kraft, d@domob.eu.
13 INTEGER, POINTER :: ptr(:, :)
18 INTEGER, TARGET :: arr(2*n)
22 ptr(1:5, 1:2) => arr(::2)
23 ptr(-5:-1, 11:14) => arr
26 ptr(1:3, 1:5) => arr(::2)
29 ! { dg-output "At line 26 of .*\nFortran runtime error: Target of rank remapping is too small \\(10 < 15\\)" }