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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-Wreturn-type" }
3
!
4
! PR fortran/31463 - inconsistent warnings if function return value is not set
5
! PR fortran/33950 - Warning missing for function result not set
6
! PR fortran/34296 - Intent(out) and character functions with RESULT: Value-not-set warning
7
!
8
FUNCTION f1()            ! { dg-warning "not set" }
9
REAL :: f1
10
END FUNCTION
11
 
12
FUNCTION f2()            ! { dg-warning "not set" }
13
REAL, DIMENSION(1) :: f2
14
END FUNCTION
15
 
16
FUNCTION f3()            ! { dg-warning "not set" }
17
REAL, POINTER :: f3
18
END FUNCTION
19
 
20
FUNCTION f4()            ! { dg-warning "not set" }
21
REAL, DIMENSION(:), POINTER :: f4
22
END FUNCTION
23
 
24
FUNCTION f5()            ! { dg-warning "not set" }
25
REAL, DIMENSION(:), ALLOCATABLE :: f5
26
END FUNCTION
27
 
28
FUNCTION f6()            ! { dg-warning "not set" }
29
CHARACTER(2) :: f6
30
END FUNCTION
31
 
32
 
33
 
34
FUNCTION g1() RESULT(h)  ! { dg-warning "not set" }
35
REAL :: h
36
END FUNCTION
37
 
38
FUNCTION g2() RESULT(h)  ! { dg-warning "not set" }
39
REAL, DIMENSION(1) :: h
40
END FUNCTION
41
 
42
FUNCTION g3() RESULT(h)  ! { dg-warning "not set" }
43
REAL, POINTER :: h
44
END FUNCTION
45
 
46
FUNCTION g4() RESULT(h)  ! { dg-warning "not set" }
47
REAL, DIMENSION(:), POINTER :: h
48
END FUNCTION
49
 
50
FUNCTION g5() RESULT(h)  ! { dg-warning "not set" }
51
REAL, DIMENSION(:), ALLOCATABLE :: h
52
END FUNCTION
53
 
54
FUNCTION g6() RESULT(h)  ! { dg-warning "not set" }
55
CHARACTER(2) :: h
56
END FUNCTION
57
 

powered by: WebSVN 2.1.0

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