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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [recursive_check_4.f03] - 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
 
3
! PR fortran/37779
4
! Check that using a non-recursive procedure as "value" is an error.
5
 
6
MODULE m
7
  IMPLICIT NONE
8
 
9
CONTAINS
10
 
11
  SUBROUTINE test ()
12
    IMPLICIT NONE
13
    PROCEDURE(test), POINTER :: procptr
14
 
15
    CALL bar (test) ! { dg-warning "Non-RECURSIVE" }
16
    procptr => test ! { dg-warning "Non-RECURSIVE" }
17
  END SUBROUTINE test
18
 
19
  INTEGER FUNCTION test2 () RESULT (x)
20
    IMPLICIT NONE
21
    PROCEDURE(test2), POINTER :: procptr
22
 
23
    CALL bar (test2) ! { dg-warning "Non-RECURSIVE" }
24
    procptr => test2 ! { dg-warning "Non-RECURSIVE" }
25
 
26
    x = 1812
27
  END FUNCTION test2
28
 
29
  INTEGER FUNCTION func ()
30
    ! Using a result variable is ok of course!
31
    func = 42 ! { dg-bogus "Non-RECURSIVE" }
32
  END FUNCTION func
33
 
34
END MODULE m
35
 
36
! { dg-final { cleanup-modules "m" } }

powered by: WebSVN 2.1.0

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