OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [where_operator_assign_4.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! PR fortran/34661 ICE on user-defined assignments in where statements
3
! Testcase contributed by Joost VandeVondele
4
 
5
MODULE M1
6
 IMPLICIT NONE
7
 TYPE T1
8
   INTEGER :: I
9
 END TYPE T1
10
 INTERFACE ASSIGNMENT(=)
11
  MODULE PROCEDURE S1
12
 END INTERFACE
13
CONTAINS
14
 SUBROUTINE S1(I,J)
15
   TYPE(T1), INTENT(OUT)  :: I(2)
16
   TYPE(T1), INTENT(IN)  :: J(2)
17
   I%I=-J%I
18
 END SUBROUTINE S1
19
END MODULE M1
20
 
21
USE M1
22
TYPE(T1) :: I(2),J(2)
23
I(:)%I=1
24
WHERE (I(:)%I>0)
25
 J=I                       ! { dg-error "Non-ELEMENTAL user-defined assignment in WHERE" }
26
END WHERE
27
 
28
WHERE (I(:)%I>0) J=I       ! { dg-error "Non-ELEMENTAL user-defined assignment in WHERE" }
29
 
30
END
31
! { dg-final { cleanup-modules "m1" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.