fix pr/45972
[official-gcc.git] / gcc / testsuite / gfortran.dg / redefined_intrinsic_assignment.f90
blob8eb47e19b8113de480f927c4889452300cc50b62
1 ! { dg-do compile }
2 ! Tests the fix for PR25077 in which no diagnostic was produced
3 ! for the redefinition of an intrinsic type assignment.
5 ! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
7 MODULE M1
8 IMPLICIT NONE
9 INTERFACE ASSIGNMENT(=)
10 MODULE PROCEDURE T1
11 END INTERFACE
12 CONTAINS
13 SUBROUTINE T1(I,J) ! { dg-error "redefine an INTRINSIC type assignment" }
14 INTEGER, INTENT(OUT) :: I
15 INTEGER, INTENT(IN) :: J
16 I=-J
17 END SUBROUTINE T1
18 END MODULE M1
19 ! { dg-final { cleanup-modules "m1" } }