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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! Tests the fix for PR30554, the USE statements in potential_energy
3
! would cause a segfault because the pointer_info for nfree coming
4
! from constraint would not find the existing symtree coming directly
5
! from atom.
6
!
7
! The last two modules came up subsequently to the original fix.  The
8
! PRIVATE statement caused a revival of the original problem.  This
9
! was tracked down to an interaction between the symbols being set
10
! referenced during module read and the application of the access
11
! attribute.
12
!
13
! Contributed by Tobias Burnus 
14
 
15
MODULE ATOMS
16
INTEGER :: NFREE = 0
17
END MODULE ATOMS
18
 
19
MODULE CONSTRAINT
20
USE ATOMS, ONLY: NFREE
21
CONTAINS
22
   SUBROUTINE ENERGY_CONSTRAINT ( HESSIAN )
23
   REAL , DIMENSION(1:(3*NFREE*(3*NFREE+1))/2):: HESSIAN
24
   END SUBROUTINE ENERGY_CONSTRAINT
25
END MODULE CONSTRAINT
26
 
27
MODULE POTENTIAL_ENERGY
28
USE ATOMS
29
USE CONSTRAINT,         ONLY : ENERGY_CONSTRAINT
30
END MODULE POTENTIAL_ENERGY
31
 
32
MODULE P_CONSTRAINT
33
USE ATOMS, ONLY: NFREE
34
PRIVATE
35
PUBLIC :: ENERGY_CONSTRAINT
36
CONTAINS
37
   SUBROUTINE ENERGY_CONSTRAINT ( HESSIAN )
38
   REAL , DIMENSION(1:(3*NFREE*(3*NFREE+1))/2):: HESSIAN
39
   END SUBROUTINE ENERGY_CONSTRAINT
40
END MODULE P_CONSTRAINT
41
 
42
MODULE P_POTENTIAL_ENERGY
43
USE ATOMS
44
USE CONSTRAINT,         ONLY : ENERGY_CONSTRAINT
45
END MODULE P_POTENTIAL_ENERGY
46
 
47
! { dg-final { cleanup-modules "atoms constraint potential_energy p_constraint p_potential_energy" } }

powered by: WebSVN 2.1.0

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