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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [namelist_4.f90] - Rev 774

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

! { dg-do compile }
! This tests the fix for PR25089 in which it was noted that a
! NAMELIST member that is an internal(or module) procedure gave
! no error if the NAMELIST declaration appeared before the
! procedure declaration. Not mentioned in the PR is that any
! reference to the NAMELIST object would cause a segfault.
!
! Based on the contribution from Joost VanderVondele
!
module M1
CONTAINS
! This is the original PR
  INTEGER FUNCTION G1()
    NAMELIST /NML1/ G2 ! { dg-error "PROCEDURE attribute conflicts" }
    G1=1
  END FUNCTION
  INTEGER FUNCTION G2()
    G2=1
  END FUNCTION
! This has always been picked up - namelist after function
  INTEGER FUNCTION G3()
    NAMELIST /NML2/ G1 ! { dg-error "PROCEDURE attribute conflicts" }
    G3=1
  END FUNCTION
END module M1
 
program P1
CONTAINS
! This has the additional wrinkle of a reference to the object.
  INTEGER FUNCTION F1()
    NAMELIST /NML3/ F2 ! { dg-error "PROCEDURE attribute conflicts" }
! Used to ICE here
    f2 = 1             ! { dg-error "is not a VALUE" }
    F1=1
  END FUNCTION
  INTEGER FUNCTION F2()
    F2=1
  END FUNCTION
END

! { dg-final { cleanup-modules "m1" } }

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

powered by: WebSVN 2.1.0

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