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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [namelist_4.f90] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! This tests the fix for PR25089 in which it was noted that a
3
! NAMELIST member that is an internal(or module) procedure gave
4
! no error if the NAMELIST declaration appeared before the
5
! procedure declaration. Not mentioned in the PR is that any
6
! reference to the NAMELIST object would cause a segfault.
7
!
8
! Based on the contribution from Joost VanderVondele
9
!
10
module M1
11
CONTAINS
12
! This is the original PR
13
  INTEGER FUNCTION G1()
14
    NAMELIST /NML1/ G2 ! { dg-error "PROCEDURE attribute conflicts" }
15
    G1=1
16
  END FUNCTION
17
  INTEGER FUNCTION G2()
18
    G2=1
19
  END FUNCTION
20
! This has always been picked up - namelist after function
21
  INTEGER FUNCTION G3()
22
    NAMELIST /NML2/ G1 ! { dg-error "PROCEDURE attribute conflicts" }
23
    G3=1
24
  END FUNCTION
25
END module M1
26
 
27
program P1
28
CONTAINS
29
! This has the additional wrinkle of a reference to the object.
30
  INTEGER FUNCTION F1()
31
    NAMELIST /NML3/ F2 ! { dg-error "PROCEDURE attribute conflicts" }
32
! Used to ICE here
33
    f2 = 1             ! { dg-error "is not a VALUE" }
34
    F1=1
35
  END FUNCTION
36
  INTEGER FUNCTION F2()
37
    F2=1
38
  END FUNCTION
39
END
40
 
41
! { dg-final { cleanup-modules "M1" } }

powered by: WebSVN 2.1.0

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