[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr68379-1.f90
blob2deaca03219d2b7e2113bb5d65bd71f5729f0191
1 ! { dg-do compile }
2 ! { dg-options "-O3" }
3 MODULE qs_efield_berry
4 TYPE cp_error_type
5 END TYPE
6 INTEGER, PARAMETER :: dp=8
7 TYPE qs_energy_type
8 REAL(KIND=dp), POINTER :: efield
9 END TYPE
10 TYPE qs_environment_type
11 END TYPE
12 INTERFACE
13 SUBROUTINE foo(qs_env,energy,error)
14 IMPORT
15 TYPE(qs_environment_type), POINTER :: qs_env
16 TYPE(cp_error_type) :: error
17 TYPE(qs_energy_type), POINTER :: energy
18 END SUBROUTINE
19 END INTERFACE
20 CONTAINS
21 SUBROUTINE qs_efield_mo_derivatives()
22 TYPE(qs_environment_type), POINTER :: qs_env
23 TYPE(cp_error_type) :: error
24 COMPLEX(dp) :: zi(3), zphase(3)
25 REAL(dp) :: ci(3)
26 TYPE(qs_energy_type), POINTER :: energy
27 CALL foo(qs_env, energy, error)
28 zi = zi * zphase
29 ci = AIMAG(LOG(zi))
30 DO idir=1,3
31 ener_field=ener_field+ci(idir)*fieldfac(idir)
32 END DO
33 energy%efield=ener_field
34 END SUBROUTINE qs_efield_mo_derivatives
35 END MODULE qs_efield_berry