summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/module_equivalence_6.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/module_equivalence_6.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/module_equivalence_6.f9022
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/module_equivalence_6.f90 b/gcc/testsuite/gfortran.dg/module_equivalence_6.f90
new file mode 100644
index 000000000..c33a2caa3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/module_equivalence_6.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+!
+! Fixes PR38171 a regression caused by the fix for PR37706.
+!
+! Contributed by Scot Breitenfeld <brtnfld@hdfgroup.org>
+!
+MODULE H5GLOBAL
+ IMPLICIT NONE
+ INTEGER :: H5P_flags
+ INTEGER :: H5P_DEFAULT_F
+ EQUIVALENCE(H5P_flags, H5P_DEFAULT_F)
+END MODULE H5GLOBAL
+MODULE HDF5
+ USE H5GLOBAL
+END MODULE HDF5
+PROGRAM fortranlibtest
+ USE HDF5
+ IMPLICIT NONE
+ INTEGER :: ii
+ ii = H5P_DEFAULT_F
+END PROGRAM fortranlibtest
+! { dg-final { cleanup-modules "H5GLOBAL HDF5" } }