2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / pointer_remapping_1.f90
blobd360c4223ccbcaf5568a4d128d440ff4bbab51e5
1 ! { dg-do compile }
2 ! { dg-options "-std=f95" }
4 ! PR fortran/29785
5 ! PR fortran/45016
6 ! Check for F2003 rejection of pointer remappings.
8 ! Contributed by Daniel Kraft, d@domob.eu.
10 PROGRAM main
11 IMPLICIT NONE
12 INTEGER, TARGET :: arr(12)
13 INTEGER, POINTER :: vec(:), mat(:, :)
15 vec => arr ! This is ok.
17 vec(2:) => arr ! { dg-error "Fortran 2003" }
18 mat(1:2, 1:6) => arr ! { dg-error "Fortran 2003" }
19 END PROGRAM main