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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! Tests the fix for PR25091 and PR25092 in which mismatched array
3
! specifications between entries of the same procedure were not diagnosed.
4
 
5
! Contributed by Joost VandeVondele  
6
 
7
! This was PR25091 - no diagnostic given on error
8
 FUNCTION F1() RESULT(RES_F1) ! { dg-error "mismatched array specifications" }
9
 INTEGER RES_F1(2,2)
10
 INTEGER RES_E1(4)
11
 ENTRY E1() RESULT(RES_E1)
12
 END FUNCTION
13
 
14
! This was PR25092 - no diagnostic given on error
15
 FUNCTION F2() RESULT(RES_F2) ! { dg-error "mismatched array specifications" }
16
 INTEGER :: RES_F2(4)
17
 INTEGER :: RES_E2(3)
18
 ENTRY E2() RESULT(RES_E2)
19
 END FUNCTION
20
 
21
! Check that the versions without explicit results give the error
22
 FUNCTION F3() ! { dg-error "mismatched array specifications" }
23
 INTEGER :: F3(4)
24
 INTEGER :: E3(2,2)
25
 ENTRY E3()
26
 END FUNCTION
27
 
28
 FUNCTION F4() ! { dg-error "mismatched array specifications" }
29
 INTEGER :: F4(4)
30
 INTEGER :: E4(3)
31
 ENTRY E4()
32
 END FUNCTION
33
 
34
! Check that conforming entries are OK.
35
 FUNCTION F5()
36
 INTEGER :: F5(4,5,6)
37
 INTEGER :: E5(4,5,6)
38
 ENTRY E5()
39
 END FUNCTION

powered by: WebSVN 2.1.0

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