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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [used_dummy_types_3.f90] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! This checks the fix for PR20864 in which same name, USE associated
3
! derived types from different modules, with private components were
4
! not recognised to be different.
5
!
6
! Contributed by Joost VandVondele  
7
!==============
8
  MODULE T1
9
    TYPE data_type
10
      SEQUENCE
11
  ! private causes the types in T1 and T2 to be different 4.4.2
12
      PRIVATE
13
      INTEGER :: I
14
    END TYPE
15
  END MODULE
16
 
17
  MODULE T2
18
    TYPE data_type
19
      SEQUENCE
20
      PRIVATE
21
      INTEGER :: I
22
    END TYPE
23
 
24
  CONTAINS
25
 
26
    SUBROUTINE TEST(x)
27
      TYPE(data_type) :: x
28
    END SUBROUTINE TEST
29
  END MODULE
30
 
31
    USE T1
32
    USE T2 , ONLY : TEST
33
    TYPE(data_type) :: x
34
    CALL TEST(x)         ! { dg-error "Type/rank mismatch in argument" }
35
  END
36
 
37
! { dg-final { cleanup-modules "T1 T2" } }

powered by: WebSVN 2.1.0

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