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

Subversion Repositories openrisc

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! PR42684 (42680) Ice with Interface.
3
MODULE mod1
4
  IMPLICIT NONE
5
  TYPE ta
6
    INTEGER i
7
  END TYPE ta
8
  INTERFACE OPERATOR(+)
9
    MODULE PROCEDURE add_a
10
  END INTERFACE OPERATOR(+)
11
CONTAINS
12
  FUNCTION add_a(lhs, rhs) RESULT(r)
13
    TYPE(ta), INTENT(IN) :: lhs
14
    TYPE(ta), INTENT(IN) :: rhs
15
    TYPE(ta) :: r
16
    !****
17
    r%i = lhs%i + rhs%i
18
  END FUNCTION add_a
19
END MODULE mod1
20
 
21
MODULE mod2
22
  IMPLICIT NONE
23
  TYPE tb
24
    INTEGER j
25
  END TYPE tb
26
  INTERFACE OPERATOR(+)
27
    MODULE PROCEDURE add_b
28
  END INTERFACE OPERATOR(+)
29
CONTAINS
30
  SUBROUTINE other_proc()
31
    USE mod1    ! Causes ICE
32
  END SUBROUTINE other_proc
33
  FUNCTION add_b(lhs, rhs) RESULT(r)
34
    TYPE(tb), INTENT(IN) :: lhs
35
    TYPE(tb), INTENT(IN) :: rhs
36
    TYPE(tb) :: r
37
    !****
38
    r%j = lhs%j + rhs%j
39
  END FUNCTION add_b
40
END MODULE mod2
41
! { dg-final { cleanup-modules "mod1 mod2" } }

powered by: WebSVN 2.1.0

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