aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDominique d'Humieres <dominiq@lps.ens.fr>2017-06-04 20:44:45 +0200
committerDominique d'Humieres <dominiq@gcc.gnu.org>2017-06-04 20:44:45 +0200
commit82c027e160f351c62ef09a5167a3ad6b680e8017 (patch)
tree0b437f04c0c262919695836b9d35b681476def71 /gcc
parent3de4ac6d80c8ae24b58586003aded178d7ec8453 (diff)
downloadgcc-82c027e160f351c62ef09a5167a3ad6b680e8017.zip
gcc-82c027e160f351c62ef09a5167a3ad6b680e8017.tar.gz
gcc-82c027e160f351c62ef09a5167a3ad6b680e8017.tar.bz2
fortran-modules.exp (igrep): New procedure, case insensitive vesrion of the dejagnu grep.
2017-06-04 Dominique d'Humieres <dominiq@lps.ens.fr> * lib/fortran-modules.exp (igrep): New procedure, case insensitive vesrion of the dejagnu grep. (list-module-names): Use it and adjust the regular expressions for modules and submodules. * gfortran.dg/prof/prof.exp: Cleanup modules. * gfortran.dg/allocate_class_4.f90: Remove cleanup-(sub)?modules directives. * gfortran.dg/altreturn_8.f90: Likewise. * gfortran.dg/associate_12.f90: Likewise. * gfortran.dg/c_f_pointer_shape_test.f90: Likewise. * gfortran.dg/charlen_15.f90: Likewise. * gfortran.dg/class_4a.f03: Likewise. * gfortran.dg/class_54.f90: Likewise. * gfortran.dg/class_dummy_4.f03: Likewise. * gfortran.dg/class_dummy_5.f90: Likewise. * gfortran.dg/constructor_9.f90: Likewise. * gfortran.dg/dec_structure_15.f90: Likewise. * gfortran.dg/do_check_8.f90: Likewise. * gfortran.dg/dtio_26.f03: Likewise. * gfortran.dg/dynamic_dispatch_12.f90: Likewise. * gfortran.dg/equiv_9.f90: Likewise. * gfortran.dg/extends_15.f90: Likewise. * gfortran.dg/finalize_22.f90: Likewise. * gfortran.dg/finalize_23.f90: Likewise. * gfortran.dg/generic_26.f90: Likewise. * gfortran.dg/generic_27.f90: Likewise. * gfortran.dg/namelist_76.f90: Likewise. * gfortran.dg/pointer_init_8.f90: Likewise. * gfortran.dg/pr61318.f90: Likewise. * gfortran.dg/pr77260_1.f90: Likewise. * gfortran.dg/pr77260_2.f90: Likewise. * gfortran.dg/pr77420_3.f90: Likewise. * gfortran.dg/proc_ptr_39.f90: Likewise. * gfortran.dg/proc_ptr_41.f90: Likewise. * gfortran.dg/proc_ptr_42.f90: Likewise. * gfortran.dg/proc_ptr_comp_43.f90: Likewise. * gfortran.dg/submodule_1.f08: Likewise. * gfortran.dg/submodule_10.f08: Likewise. * gfortran.dg/submodule_14.f08: Likewise. * gfortran.dg/submodule_15.f08: Likewise. * gfortran.dg/submodule_2.f08: Likewise. * gfortran.dg/submodule_5.f08: Likewise. * gfortran.dg/submodule_6.f08: Likewise. * gfortran.dg/submodule_7.f08: Likewise. * gfortran.dg/submodule_8.f08: Likewise. * gfortran.dg/submodule_9.f08: Likewise. * gfortran.dg/transfer_class_2.f90: Likewise. * gfortran.dg/typebound_assignment_7.f90: Likewise. * gfortran.dg/typebound_call_24.f03: Likewise. * gfortran.dg/typebound_call_25.f90: Likewise. * gfortran.dg/typebound_deferred_1.f90: Likewise. * gfortran.dg/typebound_generic_12.f03: Likewise. * gfortran.dg/typebound_generic_13.f03: Likewise. * gfortran.dg/typebound_generic_14.f03: Likewise. * gfortran.dg/typebound_generic_15.f90: Likewise. * gfortran.dg/typebound_operator_16.f03: Likewise. * gfortran.dg/typebound_operator_18.f90: Likewise. * gfortran.dg/typebound_operator_20.f90: Likewise. * gfortran.dg/typebound_override_3.f90: Likewise. * gfortran.dg/typebound_override_4.f90: Likewise. * gfortran.dg/typebound_override_5.f90: Likewise. * gfortran.dg/typebound_override_6.f90: Likewise. * gfortran.dg/typebound_override_7.f90: Likewise. * gfortran.dg/typebound_proc_28.f03: Likewise. * gfortran.dg/typebound_proc_29.f90: Likewise. * gfortran.dg/typebound_proc_30.f90: Likewise. * gfortran.dg/typebound_proc_31.f90: Likewise. * gfortran.dg/typebound_proc_32.f90: Likewise. * gfortran.dg/typebound_proc_33.f90: Likewise. * gfortran.dg/unlimited_polymorphic_16.f90: Likewise. * gfortran.dg/unlimited_polymorphic_19.f90: Likewise. * gfortran.dg/unlimited_polymorphic_24.f03: Likewise. * gfortran.dg/use_only_3.f90: Likewise. * gfortran.dg/use_without_only_1.f90: Likewise. * gfortran.dg/warn_unused_function.f90: Likewise. * gfortran.dg/warn_unused_function_2.f90: Likewise. * gfortran.dg/ieee/ieee_8.f90: Likewise. From-SVN: r248861
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog79
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_class_4.f903
-rw-r--r--gcc/testsuite/gfortran.dg/altreturn_8.f9044
-rw-r--r--gcc/testsuite/gfortran.dg/associate_12.f902
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_shape_test.f902
-rw-r--r--gcc/testsuite/gfortran.dg/charlen_15.f902
-rw-r--r--gcc/testsuite/gfortran.dg/class_4a.f031
-rw-r--r--gcc/testsuite/gfortran.dg/class_54.f902
-rw-r--r--gcc/testsuite/gfortran.dg/class_dummy_4.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_dummy_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/constructor_9.f902
-rw-r--r--gcc/testsuite/gfortran.dg/dec_structure_15.f901
-rw-r--r--gcc/testsuite/gfortran.dg/do_check_8.f901
-rw-r--r--gcc/testsuite/gfortran.dg/dtio_26.f032
-rw-r--r--gcc/testsuite/gfortran.dg/dynamic_dispatch_12.f902
-rw-r--r--gcc/testsuite/gfortran.dg/equiv_9.f901
-rw-r--r--gcc/testsuite/gfortran.dg/extends_15.f902
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_22.f902
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_23.f902
-rw-r--r--gcc/testsuite/gfortran.dg/generic_26.f902
-rw-r--r--gcc/testsuite/gfortran.dg/generic_27.f902
-rw-r--r--gcc/testsuite/gfortran.dg/ieee/ieee_8.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_76.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_init_8.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr61318.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr77260_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr77260_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr77420_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_39.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_41.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_42.f902
-rw-r--r--gcc/testsuite/gfortran.dg/prof/prof.exp3
-rw-r--r--gcc/testsuite/gfortran.dg/submodule_1.f083
-rw-r--r--gcc/testsuite/gfortran.dg/submodule_10.f082
-rw-r--r--gcc/testsuite/gfortran.dg/submodule_14.f081
-rw-r--r--gcc/testsuite/gfortran.dg/submodule_15.f081
-rw-r--r--gcc/testsuite/gfortran.dg/submodule_2.f082
-rw-r--r--gcc/testsuite/gfortran.dg/submodule_5.f081
-rw-r--r--gcc/testsuite/gfortran.dg/submodule_6.f083
-rw-r--r--gcc/testsuite/gfortran.dg/submodule_7.f082
-rw-r--r--gcc/testsuite/gfortran.dg/submodule_8.f081
-rw-r--r--gcc/testsuite/gfortran.dg/submodule_9.f081
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_class_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_assignment_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_24.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_25.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_deferred_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_12.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_13.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_14.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_15.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_16.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_18.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_20.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_override_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_override_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_override_5.f9078
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_override_6.f9076
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_override_7.f9076
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_28.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_29.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_30.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_31.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_32.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_33.f902
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_16.f902
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_19.f902
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_24.f032
-rw-r--r--gcc/testsuite/gfortran.dg/use_only_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_without_only_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/warn_unused_function.f902
-rw-r--r--gcc/testsuite/gfortran.dg/warn_unused_function_2.f902
-rw-r--r--gcc/testsuite/lib/fortran-modules.exp69
73 files changed, 280 insertions, 265 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index bfadad5..3c6a47e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,82 @@
+2017-06-04 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ * lib/fortran-modules.exp (igrep): New procedure, case insensitive
+ vesrion of the dejagnu grep.
+ (list-module-names): Use it and adjust the regular expressions for
+ modules and submodules.
+ * gfortran.dg/prof/prof.exp: Cleanup modules.
+ * gfortran.dg/allocate_class_4.f90: Remove cleanup-(sub)?modules
+ directives.
+ * gfortran.dg/altreturn_8.f90: Likewise.
+ * gfortran.dg/associate_12.f90: Likewise.
+ * gfortran.dg/c_f_pointer_shape_test.f90: Likewise.
+ * gfortran.dg/charlen_15.f90: Likewise.
+ * gfortran.dg/class_4a.f03: Likewise.
+ * gfortran.dg/class_54.f90: Likewise.
+ * gfortran.dg/class_dummy_4.f03: Likewise.
+ * gfortran.dg/class_dummy_5.f90: Likewise.
+ * gfortran.dg/constructor_9.f90: Likewise.
+ * gfortran.dg/dec_structure_15.f90: Likewise.
+ * gfortran.dg/do_check_8.f90: Likewise.
+ * gfortran.dg/dtio_26.f03: Likewise.
+ * gfortran.dg/dynamic_dispatch_12.f90: Likewise.
+ * gfortran.dg/equiv_9.f90: Likewise.
+ * gfortran.dg/extends_15.f90: Likewise.
+ * gfortran.dg/finalize_22.f90: Likewise.
+ * gfortran.dg/finalize_23.f90: Likewise.
+ * gfortran.dg/generic_26.f90: Likewise.
+ * gfortran.dg/generic_27.f90: Likewise.
+ * gfortran.dg/namelist_76.f90: Likewise.
+ * gfortran.dg/pointer_init_8.f90: Likewise.
+ * gfortran.dg/pr61318.f90: Likewise.
+ * gfortran.dg/pr77260_1.f90: Likewise.
+ * gfortran.dg/pr77260_2.f90: Likewise.
+ * gfortran.dg/pr77420_3.f90: Likewise.
+ * gfortran.dg/proc_ptr_39.f90: Likewise.
+ * gfortran.dg/proc_ptr_41.f90: Likewise.
+ * gfortran.dg/proc_ptr_42.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_43.f90: Likewise.
+ * gfortran.dg/submodule_1.f08: Likewise.
+ * gfortran.dg/submodule_10.f08: Likewise.
+ * gfortran.dg/submodule_14.f08: Likewise.
+ * gfortran.dg/submodule_15.f08: Likewise.
+ * gfortran.dg/submodule_2.f08: Likewise.
+ * gfortran.dg/submodule_5.f08: Likewise.
+ * gfortran.dg/submodule_6.f08: Likewise.
+ * gfortran.dg/submodule_7.f08: Likewise.
+ * gfortran.dg/submodule_8.f08: Likewise.
+ * gfortran.dg/submodule_9.f08: Likewise.
+ * gfortran.dg/transfer_class_2.f90: Likewise.
+ * gfortran.dg/typebound_assignment_7.f90: Likewise.
+ * gfortran.dg/typebound_call_24.f03: Likewise.
+ * gfortran.dg/typebound_call_25.f90: Likewise.
+ * gfortran.dg/typebound_deferred_1.f90: Likewise.
+ * gfortran.dg/typebound_generic_12.f03: Likewise.
+ * gfortran.dg/typebound_generic_13.f03: Likewise.
+ * gfortran.dg/typebound_generic_14.f03: Likewise.
+ * gfortran.dg/typebound_generic_15.f90: Likewise.
+ * gfortran.dg/typebound_operator_16.f03: Likewise.
+ * gfortran.dg/typebound_operator_18.f90: Likewise.
+ * gfortran.dg/typebound_operator_20.f90: Likewise.
+ * gfortran.dg/typebound_override_3.f90: Likewise.
+ * gfortran.dg/typebound_override_4.f90: Likewise.
+ * gfortran.dg/typebound_override_5.f90: Likewise.
+ * gfortran.dg/typebound_override_6.f90: Likewise.
+ * gfortran.dg/typebound_override_7.f90: Likewise.
+ * gfortran.dg/typebound_proc_28.f03: Likewise.
+ * gfortran.dg/typebound_proc_29.f90: Likewise.
+ * gfortran.dg/typebound_proc_30.f90: Likewise.
+ * gfortran.dg/typebound_proc_31.f90: Likewise.
+ * gfortran.dg/typebound_proc_32.f90: Likewise.
+ * gfortran.dg/typebound_proc_33.f90: Likewise.
+ * gfortran.dg/unlimited_polymorphic_16.f90: Likewise.
+ * gfortran.dg/unlimited_polymorphic_19.f90: Likewise.
+ * gfortran.dg/unlimited_polymorphic_24.f03: Likewise.
+ * gfortran.dg/use_only_3.f90: Likewise.
+ * gfortran.dg/use_without_only_1.f90: Likewise.
+ * gfortran.dg/warn_unused_function.f90: Likewise.
+ * gfortran.dg/warn_unused_function_2.f90: Likewise.
+ * gfortran.dg/ieee/ieee_8.f90: Likewise.
2017-06-04 Marek Polacek <polacek@redhat.com>
PR c/80919
diff --git a/gcc/testsuite/gfortran.dg/allocate_class_4.f90 b/gcc/testsuite/gfortran.dg/allocate_class_4.f90
index 23c9d53..125d99f 100644
--- a/gcc/testsuite/gfortran.dg/allocate_class_4.f90
+++ b/gcc/testsuite/gfortran.dg/allocate_class_4.f90
@@ -31,6 +31,3 @@ module integrable_model_module
end subroutine
end module integrable_model_module
-
-! { dg-final { cleanup-modules "integrable_model_module" } }
-
diff --git a/gcc/testsuite/gfortran.dg/altreturn_8.f90 b/gcc/testsuite/gfortran.dg/altreturn_8.f90
index ccd58a2..63a6ef7 100644
--- a/gcc/testsuite/gfortran.dg/altreturn_8.f90
+++ b/gcc/testsuite/gfortran.dg/altreturn_8.f90
@@ -1,23 +1,21 @@
-! { dg-do compile }
-! { dg-options "-std=gnu" }
-!
-! PR 56284: [OOP] ICE with alternate return in type-bound procedure
-!
-! Contributed by Arjen Markus <arjen.markus@deltares.nl>
-
-module try_this
- implicit none
-
- type :: table_t
- contains
- procedure, nopass :: getRecord
- end type
-
-contains
-
- subroutine getRecord ( * )
- end subroutine
-
-end module
-
-! { dg-final { cleanup-modules "try_this" } }
+! { dg-do compile }
+! { dg-options "-std=gnu" }
+!
+! PR 56284: [OOP] ICE with alternate return in type-bound procedure
+!
+! Contributed by Arjen Markus <arjen.markus@deltares.nl>
+
+module try_this
+ implicit none
+
+ type :: table_t
+ contains
+ procedure, nopass :: getRecord
+ end type
+
+contains
+
+ subroutine getRecord ( * )
+ end subroutine
+
+end module
diff --git a/gcc/testsuite/gfortran.dg/associate_12.f90 b/gcc/testsuite/gfortran.dg/associate_12.f90
index 1ead1e7..8d2abb8 100644
--- a/gcc/testsuite/gfortran.dg/associate_12.f90
+++ b/gcc/testsuite/gfortran.dg/associate_12.f90
@@ -25,5 +25,3 @@ program assoc_err
print *, 1. + b
end associate
end program
-
-! { dg-final { cleanup-modules "assoc_err_m" } }
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_shape_test.f90 b/gcc/testsuite/gfortran.dg/c_f_pointer_shape_test.f90
index 9b130ad..8637712 100644
--- a/gcc/testsuite/gfortran.dg/c_f_pointer_shape_test.f90
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_shape_test.f90
@@ -16,5 +16,3 @@ contains
call c_f_pointer(cPtr, myArrayPtr) ! { dg-error "Expected SHAPE argument to C_F_POINTER with array FPTR" }
end subroutine test_0
end module c_f_pointer_shape_test
-
-! { dg-final { cleanup-modules "c_f_pointer_shape_test" } }
diff --git a/gcc/testsuite/gfortran.dg/charlen_15.f90 b/gcc/testsuite/gfortran.dg/charlen_15.f90
index e141f1e..ed8ff00 100644
--- a/gcc/testsuite/gfortran.dg/charlen_15.f90
+++ b/gcc/testsuite/gfortran.dg/charlen_15.f90
@@ -10,5 +10,3 @@ program foo
use m
if (trim(x%c(1)) /= 'ab') call abort
end program foo
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/class_4a.f03 b/gcc/testsuite/gfortran.dg/class_4a.f03
index 015e53c..a6406a8 100644
--- a/gcc/testsuite/gfortran.dg/class_4a.f03
+++ b/gcc/testsuite/gfortran.dg/class_4a.f03
@@ -13,4 +13,3 @@ module m
type t
end type t
end module m
-! { dg-final { cleanup-modules "m m2" } }
diff --git a/gcc/testsuite/gfortran.dg/class_54.f90 b/gcc/testsuite/gfortran.dg/class_54.f90
index 39c306c..fdcdebc 100644
--- a/gcc/testsuite/gfortran.dg/class_54.f90
+++ b/gcc/testsuite/gfortran.dg/class_54.f90
@@ -18,5 +18,3 @@ subroutine sub2
use m
class(t), pointer :: a2
end subroutine
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/class_dummy_4.f03 b/gcc/testsuite/gfortran.dg/class_dummy_4.f03
index 2484130..6c2abad 100644
--- a/gcc/testsuite/gfortran.dg/class_dummy_4.f03
+++ b/gcc/testsuite/gfortran.dg/class_dummy_4.f03
@@ -40,5 +40,3 @@ contains
type(c_stv), allocatable, intent(out) :: y
end subroutine
end
-
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/class_dummy_5.f90 b/gcc/testsuite/gfortran.dg/class_dummy_5.f90
index 8da19af..78fc4f8 100644
--- a/gcc/testsuite/gfortran.dg/class_dummy_5.f90
+++ b/gcc/testsuite/gfortran.dg/class_dummy_5.f90
@@ -26,5 +26,3 @@ contains
class(t), intent(out) :: x
end subroutine
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/constructor_9.f90 b/gcc/testsuite/gfortran.dg/constructor_9.f90
index 5196703..a8e8821 100644
--- a/gcc/testsuite/gfortran.dg/constructor_9.f90
+++ b/gcc/testsuite/gfortran.dg/constructor_9.f90
@@ -18,5 +18,3 @@ contains
cfd=cfmde() ! { dg-error "Can't convert" }
end subroutine
end module
-
-! { dg-final { cleanup-modules "cf" } }
diff --git a/gcc/testsuite/gfortran.dg/dec_structure_15.f90 b/gcc/testsuite/gfortran.dg/dec_structure_15.f90
index fd06ff9..33f5126 100644
--- a/gcc/testsuite/gfortran.dg/dec_structure_15.f90
+++ b/gcc/testsuite/gfortran.dg/dec_structure_15.f90
@@ -24,4 +24,3 @@ contains
a2 = 0.0
end function
end module
-! { dg-final { cleanup-modules "dec_structure_15" } }
diff --git a/gcc/testsuite/gfortran.dg/do_check_8.f90 b/gcc/testsuite/gfortran.dg/do_check_8.f90
index 458ae40..5b9acc3 100644
--- a/gcc/testsuite/gfortran.dg/do_check_8.f90
+++ b/gcc/testsuite/gfortran.dg/do_check_8.f90
@@ -56,4 +56,3 @@ program main
call sub(undeclared)
end do
end program main
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/dtio_26.f03 b/gcc/testsuite/gfortran.dg/dtio_26.f03
index e947545..ad05da0 100644
--- a/gcc/testsuite/gfortran.dg/dtio_26.f03
+++ b/gcc/testsuite/gfortran.dg/dtio_26.f03
@@ -65,5 +65,3 @@ program p
read( unit=s, fmt=*, iostat=istat, iomsg=imsg) foo
if (imsg.ne."End of record") call abort
end program p
-
-! { dg-final { cleanup-modules "t_m" } }
diff --git a/gcc/testsuite/gfortran.dg/dynamic_dispatch_12.f90 b/gcc/testsuite/gfortran.dg/dynamic_dispatch_12.f90
index d37e1f6..53cc957 100644
--- a/gcc/testsuite/gfortran.dg/dynamic_dispatch_12.f90
+++ b/gcc/testsuite/gfortran.dg/dynamic_dispatch_12.f90
@@ -70,5 +70,3 @@ contains
end subroutine
end
-
-! { dg-final { cleanup-modules "TestResult_mod BaseTestRunner_mod TestRunner_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/equiv_9.f90 b/gcc/testsuite/gfortran.dg/equiv_9.f90
index 28f0bb8..5a22628 100644
--- a/gcc/testsuite/gfortran.dg/equiv_9.f90
+++ b/gcc/testsuite/gfortran.dg/equiv_9.f90
@@ -19,4 +19,3 @@ subroutine another()
implicit none
if (x2 /= 2) call abort
end subroutine
-! { dg-final { cleanup-modules "constant" } }
diff --git a/gcc/testsuite/gfortran.dg/extends_15.f90 b/gcc/testsuite/gfortran.dg/extends_15.f90
index 06c3179..03f1ff1 100644
--- a/gcc/testsuite/gfortran.dg/extends_15.f90
+++ b/gcc/testsuite/gfortran.dg/extends_15.f90
@@ -12,5 +12,3 @@ module ct
type :: t1
end type
end
-
-! { dg-final { cleanup-modules "ct" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_22.f90 b/gcc/testsuite/gfortran.dg/finalize_22.f90
index 57fa6e7..cad4481 100644
--- a/gcc/testsuite/gfortran.dg/finalize_22.f90
+++ b/gcc/testsuite/gfortran.dg/finalize_22.f90
@@ -16,5 +16,3 @@ contains
class(cfml), intent(inout) :: s
end subroutine mld
end module cf
-
-! { dg-final { cleanup-modules "cf" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_23.f90 b/gcc/testsuite/gfortran.dg/finalize_23.f90
index ea39729..9dab53e 100644
--- a/gcc/testsuite/gfortran.dg/finalize_23.f90
+++ b/gcc/testsuite/gfortran.dg/finalize_23.f90
@@ -27,5 +27,3 @@ contains
end function
end module
-
-! { dg-final { cleanup-modules "ObjectLists" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_26.f90 b/gcc/testsuite/gfortran.dg/generic_26.f90
index 22a593b..81a0604 100644
--- a/gcc/testsuite/gfortran.dg/generic_26.f90
+++ b/gcc/testsuite/gfortran.dg/generic_26.f90
@@ -25,5 +25,3 @@ contains
end function
end
-
-! { dg-final { cleanup-modules "a" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_27.f90 b/gcc/testsuite/gfortran.dg/generic_27.f90
index f4f4f5a..6f603ae 100644
--- a/gcc/testsuite/gfortran.dg/generic_27.f90
+++ b/gcc/testsuite/gfortran.dg/generic_27.f90
@@ -30,5 +30,3 @@ program test
if (testIF(cos)/=1.0) call abort()
end program
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/ieee/ieee_8.f90 b/gcc/testsuite/gfortran.dg/ieee/ieee_8.f90
index 7d0cdfd..a47f9c1 100644
--- a/gcc/testsuite/gfortran.dg/ieee/ieee_8.f90
+++ b/gcc/testsuite/gfortran.dg/ieee/ieee_8.f90
@@ -111,5 +111,3 @@ subroutine gee(n, rounding, flag)
if (len(s8) /= x8) call abort
end subroutine
-
-! { dg-final { cleanup-modules "foo bar" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_76.f90 b/gcc/testsuite/gfortran.dg/namelist_76.f90
index acb3b2f..9c233fb 100644
--- a/gcc/testsuite/gfortran.dg/namelist_76.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_76.f90
@@ -24,5 +24,3 @@ subroutine write_data()
write(10, nml=write_data_list)
close(10)
end subroutine write_data
-
-! { dg-final { cleanup-modules "data" } }
diff --git a/gcc/testsuite/gfortran.dg/pointer_init_8.f90 b/gcc/testsuite/gfortran.dg/pointer_init_8.f90
index aacd9a8..8c6bdb2 100644
--- a/gcc/testsuite/gfortran.dg/pointer_init_8.f90
+++ b/gcc/testsuite/gfortran.dg/pointer_init_8.f90
@@ -22,5 +22,3 @@ end module m
if (.not. associated(py, y)) call abort()
if (.not. same_type_as(py, y)) call abort()
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/pr61318.f90 b/gcc/testsuite/gfortran.dg/pr61318.f90
index 4e7e862..57da52d 100644
--- a/gcc/testsuite/gfortran.dg/pr61318.f90
+++ b/gcc/testsuite/gfortran.dg/pr61318.f90
@@ -20,4 +20,3 @@ program test
use gbl_interfaces
call gagout(seve%e,'Some string') ! { dg-error "Type mismatch in argument" }
end program test
-! { dg-final { cleanup-modules "gbl_interfaces gbl_message" } }
diff --git a/gcc/testsuite/gfortran.dg/pr77260_1.f90 b/gcc/testsuite/gfortran.dg/pr77260_1.f90
index 0d2ead6..76ef3cf 100644
--- a/gcc/testsuite/gfortran.dg/pr77260_1.f90
+++ b/gcc/testsuite/gfortran.dg/pr77260_1.f90
@@ -22,4 +22,3 @@ program test
implicit none
print *,f2()
end program
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/pr77260_2.f90 b/gcc/testsuite/gfortran.dg/pr77260_2.f90
index ea8da4f..0c5ebe3 100644
--- a/gcc/testsuite/gfortran.dg/pr77260_2.f90
+++ b/gcc/testsuite/gfortran.dg/pr77260_2.f90
@@ -23,4 +23,3 @@ program test
implicit none
print *,f2()
end program
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/pr77420_3.f90 b/gcc/testsuite/gfortran.dg/pr77420_3.f90
index cf95ac0..c53fce7 100644
--- a/gcc/testsuite/gfortran.dg/pr77420_3.f90
+++ b/gcc/testsuite/gfortran.dg/pr77420_3.f90
@@ -6,4 +6,3 @@ module h5global
integer :: h5p_default_f, h5p_flags
equivalence(h5p_flags, h5p_default_f)
end module h5global
-! { dg-final { cleanup-modules "h5global" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_39.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_39.f90
index 2be5d65..b3e0eb9 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_39.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_39.f90
@@ -17,5 +17,3 @@ program Test
use Module1
use Module2
end program
-
-! { dg-final { cleanup-modules "Module1 Module2" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_41.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_41.f90
index 7f50aba..534ab0f 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_41.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_41.f90
@@ -33,5 +33,3 @@ program crash_test
ptr => generic_name_get_proc_ptr()
end program
-
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_42.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_42.f90
index 8556fdf..c92e537 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_42.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_42.f90
@@ -32,5 +32,3 @@ program p
use m2
call ns_dirdata(f)
end
-
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/prof/prof.exp b/gcc/testsuite/gfortran.dg/prof/prof.exp
index 5b0ed55..dc9a7ba 100644
--- a/gcc/testsuite/gfortran.dg/prof/prof.exp
+++ b/gcc/testsuite/gfortran.dg/prof/prof.exp
@@ -18,6 +18,7 @@
# ordering using -fprofile-generate followed by -fprofile-use.
load_lib target-supports.exp
+load_lib fortran-modules.exp
# Some targets don't support tree profiling.
if { ![check_profiling_available "-fprofile-generate"] } {
@@ -50,7 +51,9 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.f*]] {
if ![runtest_file_p $runtests $src] then {
continue
}
+ list-module-names $src
profopt-execute $src
+ cleanup-modules ""
}
foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.f*]] {
diff --git a/gcc/testsuite/gfortran.dg/submodule_1.f08 b/gcc/testsuite/gfortran.dg/submodule_1.f08
index 578492e..2c5d373 100644
--- a/gcc/testsuite/gfortran.dg/submodule_1.f08
+++ b/gcc/testsuite/gfortran.dg/submodule_1.f08
@@ -170,6 +170,3 @@
message2 = ""
end subroutine
end program
-! { dg-final { cleanup-submodules "foo_interface@foo_interface_son" } }
-! { dg-final { cleanup-submodules "foo_interface@foo_interface_grandson" } }
-! { dg-final { cleanup-submodules "foo_interface@foo_interface_daughter" } }
diff --git a/gcc/testsuite/gfortran.dg/submodule_10.f08 b/gcc/testsuite/gfortran.dg/submodule_10.f08
index e956b29..373b11c 100644
--- a/gcc/testsuite/gfortran.dg/submodule_10.f08
+++ b/gcc/testsuite/gfortran.dg/submodule_10.f08
@@ -167,5 +167,3 @@ program testlk
stop
end program testlk
-! { dg-final { cleanup-submodules "error_mod@error_impl_mod" } }
-
diff --git a/gcc/testsuite/gfortran.dg/submodule_14.f08 b/gcc/testsuite/gfortran.dg/submodule_14.f08
index cbfc3d1..bc8fd80 100644
--- a/gcc/testsuite/gfortran.dg/submodule_14.f08
+++ b/gcc/testsuite/gfortran.dg/submodule_14.f08
@@ -46,4 +46,3 @@ end submodule testson
x = 10
if (fcn1 (x) .ne. 0) call abort
end
-! { dg-final { cleanup-submodules "test@testson" } }
diff --git a/gcc/testsuite/gfortran.dg/submodule_15.f08 b/gcc/testsuite/gfortran.dg/submodule_15.f08
index a09a7e7..499bc66 100644
--- a/gcc/testsuite/gfortran.dg/submodule_15.f08
+++ b/gcc/testsuite/gfortran.dg/submodule_15.f08
@@ -56,4 +56,3 @@ end submodule
incr = 1
if (a3(i) .ne. 11) call abort
end
-! { dg-final { cleanup-submodules "a@a_son" } }
diff --git a/gcc/testsuite/gfortran.dg/submodule_2.f08 b/gcc/testsuite/gfortran.dg/submodule_2.f08
index 60925ec..43456d5 100644
--- a/gcc/testsuite/gfortran.dg/submodule_2.f08
+++ b/gcc/testsuite/gfortran.dg/submodule_2.f08
@@ -98,5 +98,3 @@
if (any (arg%greeting .ne. ["adieu, people!", "adieu, people!"])) call abort
contains
end program
-! { dg-final { cleanup-submodules "foo_interface@foo_interface_son" } }
-! { dg-final { cleanup-submodules "foo_interface@foo_interface_daughter" } }
diff --git a/gcc/testsuite/gfortran.dg/submodule_5.f08 b/gcc/testsuite/gfortran.dg/submodule_5.f08
index 2698000..ed5722e 100644
--- a/gcc/testsuite/gfortran.dg/submodule_5.f08
+++ b/gcc/testsuite/gfortran.dg/submodule_5.f08
@@ -57,4 +57,3 @@ contains
end SUBMODULE foo_interface_daughter
end
-! { dg-final { cleanup-submodules "foo_interface@foo_interface_daughter" } }
diff --git a/gcc/testsuite/gfortran.dg/submodule_6.f08 b/gcc/testsuite/gfortran.dg/submodule_6.f08
index 21b0e0f..ec9dfa9 100644
--- a/gcc/testsuite/gfortran.dg/submodule_6.f08
+++ b/gcc/testsuite/gfortran.dg/submodule_6.f08
@@ -92,6 +92,3 @@ program p
call p_a(a, create_b([3,4,5]))
call print(a)
end program p
-! { dg-final { cleanup-submodules "mod_a@imp_p_a" } }
-! { dg-final { cleanup-submodules "mod_b@imp_create" } }
-
diff --git a/gcc/testsuite/gfortran.dg/submodule_7.f08 b/gcc/testsuite/gfortran.dg/submodule_7.f08
index a183f50..fd1bee6 100644
--- a/gcc/testsuite/gfortran.dg/submodule_7.f08
+++ b/gcc/testsuite/gfortran.dg/submodule_7.f08
@@ -145,5 +145,3 @@ program main
call verify_cleanup (c_1, c_2)
!...
end program main
-! { dg-final { cleanup-submodules "color_points@color_points_a" } }
-! { dg-final { cleanup-submodules "color_points@color_points_b" } }
diff --git a/gcc/testsuite/gfortran.dg/submodule_8.f08 b/gcc/testsuite/gfortran.dg/submodule_8.f08
index 15a38a5..b3c1565 100644
--- a/gcc/testsuite/gfortran.dg/submodule_8.f08
+++ b/gcc/testsuite/gfortran.dg/submodule_8.f08
@@ -41,4 +41,3 @@ program a_s
call abort
end if
end program
-! { dg-final { cleanup-submodules "mod_a@mod_s" } }
diff --git a/gcc/testsuite/gfortran.dg/submodule_9.f08 b/gcc/testsuite/gfortran.dg/submodule_9.f08
index 873979d..4589ebc 100644
--- a/gcc/testsuite/gfortran.dg/submodule_9.f08
+++ b/gcc/testsuite/gfortran.dg/submodule_9.f08
@@ -38,4 +38,3 @@ program a_s
implicit none
call p()
end program
-! { dg-final { cleanup-submodules "mod_a@b" } }
diff --git a/gcc/testsuite/gfortran.dg/transfer_class_2.f90 b/gcc/testsuite/gfortran.dg/transfer_class_2.f90
index d75b640..476eacc 100644
--- a/gcc/testsuite/gfortran.dg/transfer_class_2.f90
+++ b/gcc/testsuite/gfortran.dg/transfer_class_2.f90
@@ -41,5 +41,3 @@ program p
if (c%i /= 4) call abort()
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_assignment_7.f90 b/gcc/testsuite/gfortran.dg/typebound_assignment_7.f90
index 2c5b837..e297d9f8 100644
--- a/gcc/testsuite/gfortran.dg/typebound_assignment_7.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_assignment_7.f90
@@ -62,5 +62,3 @@ program test_assign
end select
end
-
-! { dg-final { cleanup-modules "mod1 mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_24.f03 b/gcc/testsuite/gfortran.dg/typebound_call_24.f03
index 48d63dc..45990ae 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_24.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_24.f03
@@ -20,5 +20,3 @@ program bug2
class(aqq_t) :: aqq ! { dg-error "must be dummy, allocatable or pointer" }
call aqq%aqq_init
end program
-
-! { dg-final { cleanup-modules "aqq_m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_25.f90 b/gcc/testsuite/gfortran.dg/typebound_call_25.f90
index df81c79..7f5fb07 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_25.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_call_25.f90
@@ -34,5 +34,3 @@ CONTAINS
END SUBROUTINE
END MODULE
-
-! { dg-final { cleanup-modules "my_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_deferred_1.f90 b/gcc/testsuite/gfortran.dg/typebound_deferred_1.f90
index 6e6dc52..a08e534 100644
--- a/gcc/testsuite/gfortran.dg/typebound_deferred_1.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_deferred_1.f90
@@ -19,5 +19,3 @@ contains
end subroutine inter
end module m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_12.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_12.f03
index 061a41a..c9d0fe0 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_12.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_12.f03
@@ -22,5 +22,3 @@ contains
class(t) :: this
end subroutine sub2
end module m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_13.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_13.f03
index c2116e9..eff919e 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_13.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_13.f03
@@ -24,5 +24,3 @@ contains
end subroutine
end module
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_14.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_14.f03
index 8515cf4..8fd2a59 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_14.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_14.f03
@@ -23,5 +23,3 @@ contains
end subroutine
end module
-
-! { dg-final { cleanup-modules "a_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_15.f90 b/gcc/testsuite/gfortran.dg/typebound_generic_15.f90
index f71ffd9..2cff16d 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_15.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_15.f90
@@ -14,5 +14,3 @@ module Objects
end Type
end module
-
-! { dg-final { cleanup-modules "Objects" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_16.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_16.f03
index eff43eb..f56301c 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_16.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_16.f03
@@ -45,5 +45,3 @@ contains
myadd = a%x + b
end function MyAdd
end module
-
-! { dg-final { cleanup-modules "M1 M2" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_18.f90 b/gcc/testsuite/gfortran.dg/typebound_operator_18.f90
index d5ac9e9..1288ef5 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_18.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_18.f90
@@ -21,5 +21,3 @@ contains
class(athlete) ,intent(in) :: this
end function
end module
-
-! { dg-final { cleanup-modules "athlete_module" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_20.f90 b/gcc/testsuite/gfortran.dg/typebound_operator_20.f90
index 26c49a1..81fe774 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_20.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_20.f90
@@ -49,5 +49,3 @@ program drive
if (h1%sum(h2) /= 1) call abort()
end
-
-! { dg-final { cleanup-modules "overwrite" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_override_3.f90 b/gcc/testsuite/gfortran.dg/typebound_override_3.f90
index 36d8473..c3ca5e3 100644
--- a/gcc/testsuite/gfortran.dg/typebound_override_3.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_override_3.f90
@@ -30,5 +30,3 @@ contains
name = "name_B"
end function
end module
-
-! { dg-final { cleanup-modules "dtAs dtBs" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_override_4.f90 b/gcc/testsuite/gfortran.dg/typebound_override_4.f90
index 95131de..6346452 100644
--- a/gcc/testsuite/gfortran.dg/typebound_override_4.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_override_4.f90
@@ -30,5 +30,3 @@ contains
class(r_type) :: mapout
end subroutine
end module
-
-! { dg-final { cleanup-modules "base_mod r_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_override_5.f90 b/gcc/testsuite/gfortran.dg/typebound_override_5.f90
index 565dd48..fc48fcc 100644
--- a/gcc/testsuite/gfortran.dg/typebound_override_5.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_override_5.f90
@@ -1,40 +1,38 @@
-! { dg-do compile }
-!
-! PR 54190: TYPE(*)/assumed-rank: Type/rank check too relaxed for dummy procedure
-! PR 57217: [4.7/4.8/4.9 Regression][OOP] Accepts invalid TBP overriding - lacking arguments check
-!
-! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
-
-module base_mod
- implicit none
- type base_type
- integer :: kind
- contains
- procedure, pass(map) :: clone => base_clone
- end type
-contains
- subroutine base_clone(map,mapout,info)
- class(base_type), intent(inout) :: map
- class(base_type), intent(inout) :: mapout
- integer :: info
- end subroutine
-end module
-
-module r_mod
- use base_mod
- implicit none
- type, extends(base_type) :: r_type
- real :: dat
- contains
- procedure, pass(map) :: clone => r_clone ! { dg-error "Type mismatch in argument" }
- end type
-contains
- subroutine r_clone(map,mapout,info)
- class(r_type), intent(inout) :: map
-!gcc$ attributes no_arg_check :: mapout
- integer, intent(inout) :: mapout
- integer :: info
- end subroutine
-end module
-
-! { dg-final { cleanup-modules "base_mod r_mod" } }
+! { dg-do compile }
+!
+! PR 54190: TYPE(*)/assumed-rank: Type/rank check too relaxed for dummy procedure
+! PR 57217: [4.7/4.8/4.9 Regression][OOP] Accepts invalid TBP overriding - lacking arguments check
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+module base_mod
+ implicit none
+ type base_type
+ integer :: kind
+ contains
+ procedure, pass(map) :: clone => base_clone
+ end type
+contains
+ subroutine base_clone(map,mapout,info)
+ class(base_type), intent(inout) :: map
+ class(base_type), intent(inout) :: mapout
+ integer :: info
+ end subroutine
+end module
+
+module r_mod
+ use base_mod
+ implicit none
+ type, extends(base_type) :: r_type
+ real :: dat
+ contains
+ procedure, pass(map) :: clone => r_clone ! { dg-error "Type mismatch in argument" }
+ end type
+contains
+ subroutine r_clone(map,mapout,info)
+ class(r_type), intent(inout) :: map
+!gcc$ attributes no_arg_check :: mapout
+ integer, intent(inout) :: mapout
+ integer :: info
+ end subroutine
+end module
diff --git a/gcc/testsuite/gfortran.dg/typebound_override_6.f90 b/gcc/testsuite/gfortran.dg/typebound_override_6.f90
index 45720fd..55d4002 100644
--- a/gcc/testsuite/gfortran.dg/typebound_override_6.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_override_6.f90
@@ -1,39 +1,37 @@
-! { dg-do compile }
-!
-! PR 54190: TYPE(*)/assumed-rank: Type/rank check too relaxed for dummy procedure
-! PR 57217: [4.7/4.8/4.9 Regression][OOP] Accepts invalid TBP overriding - lacking arguments check
-!
-! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
-
-module base_mod
- implicit none
- type base_type
- integer :: kind
- contains
- procedure, pass(map) :: clone => base_clone
- end type
-contains
- subroutine base_clone(map,mapout,info)
- class(base_type), intent(inout) :: map
- class(base_type), intent(inout) :: mapout
- integer :: info
- end subroutine
-end module
-
-module r_mod
- use base_mod
- implicit none
- type, extends(base_type) :: r_type
- real :: dat
- contains
- procedure, pass(map) :: clone => r_clone ! { dg-error "Rank mismatch in argument" }
- end type
-contains
- subroutine r_clone(map,mapout,info)
- class(r_type), intent(inout) :: map
- class(base_type), intent(inout) :: mapout(..)
- integer :: info
- end subroutine
-end module
-
-! { dg-final { cleanup-modules "base_mod r_mod" } }
+! { dg-do compile }
+!
+! PR 54190: TYPE(*)/assumed-rank: Type/rank check too relaxed for dummy procedure
+! PR 57217: [4.7/4.8/4.9 Regression][OOP] Accepts invalid TBP overriding - lacking arguments check
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+module base_mod
+ implicit none
+ type base_type
+ integer :: kind
+ contains
+ procedure, pass(map) :: clone => base_clone
+ end type
+contains
+ subroutine base_clone(map,mapout,info)
+ class(base_type), intent(inout) :: map
+ class(base_type), intent(inout) :: mapout
+ integer :: info
+ end subroutine
+end module
+
+module r_mod
+ use base_mod
+ implicit none
+ type, extends(base_type) :: r_type
+ real :: dat
+ contains
+ procedure, pass(map) :: clone => r_clone ! { dg-error "Rank mismatch in argument" }
+ end type
+contains
+ subroutine r_clone(map,mapout,info)
+ class(r_type), intent(inout) :: map
+ class(base_type), intent(inout) :: mapout(..)
+ integer :: info
+ end subroutine
+end module
diff --git a/gcc/testsuite/gfortran.dg/typebound_override_7.f90 b/gcc/testsuite/gfortran.dg/typebound_override_7.f90
index 0c7c48a..6f75115 100644
--- a/gcc/testsuite/gfortran.dg/typebound_override_7.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_override_7.f90
@@ -1,39 +1,37 @@
-! { dg-do compile }
-!
-! PR 54190: TYPE(*)/assumed-rank: Type/rank check too relaxed for dummy procedure
-! PR 57217: [4.7/4.8/4.9 Regression][OOP] Accepts invalid TBP overriding - lacking arguments check
-!
-! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
-
-module base_mod
- implicit none
- type base_type
- integer :: kind
- contains
- procedure, pass(map) :: clone => base_clone
- end type
-contains
- subroutine base_clone(map,mapout,info)
- class(base_type), intent(inout) :: map
- class(base_type), intent(inout) :: mapout
- integer :: info
- end subroutine
-end module
-
-module r_mod
- use base_mod
- implicit none
- type, extends(base_type) :: r_type
- real :: dat
- contains
- procedure, pass(map) :: clone => r_clone ! { dg-error "Type mismatch in argument" }
- end type
-contains
- subroutine r_clone(map,mapout,info)
- class(r_type), intent(inout) :: map
- type(*), intent(inout) :: mapout
- integer :: info
- end subroutine
-end module
-
-! { dg-final { cleanup-modules "base_mod r_mod" } }
+! { dg-do compile }
+!
+! PR 54190: TYPE(*)/assumed-rank: Type/rank check too relaxed for dummy procedure
+! PR 57217: [4.7/4.8/4.9 Regression][OOP] Accepts invalid TBP overriding - lacking arguments check
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+module base_mod
+ implicit none
+ type base_type
+ integer :: kind
+ contains
+ procedure, pass(map) :: clone => base_clone
+ end type
+contains
+ subroutine base_clone(map,mapout,info)
+ class(base_type), intent(inout) :: map
+ class(base_type), intent(inout) :: mapout
+ integer :: info
+ end subroutine
+end module
+
+module r_mod
+ use base_mod
+ implicit none
+ type, extends(base_type) :: r_type
+ real :: dat
+ contains
+ procedure, pass(map) :: clone => r_clone ! { dg-error "Type mismatch in argument" }
+ end type
+contains
+ subroutine r_clone(map,mapout,info)
+ class(r_type), intent(inout) :: map
+ type(*), intent(inout) :: mapout
+ integer :: info
+ end subroutine
+end module
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_28.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_28.f03
index 74199c3..04d97f8 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_28.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_28.f03
@@ -26,5 +26,3 @@ contains
end function
end module
-
-! { dg-final { cleanup-modules "t" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_29.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_29.f90
index 2650d14..3e9a9aa 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_29.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_29.f90
@@ -22,5 +22,3 @@ program abstract
type(pdf) pp
print pp%getx() ! { dg-error "must be of type default-kind CHARACTER or of INTEGER" }
end program
-
-! { dg-final { cleanup-modules "pdfs" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_30.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_30.f90
index 09b0726..5fa5a0f 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_30.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_30.f90
@@ -34,5 +34,3 @@ contains
end function
end module
-
-! { dg-final { cleanup-modules "phs_single" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_31.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_31.f90
index d83a9cd..82a67c0 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_31.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_31.f90
@@ -24,5 +24,3 @@ contains
end function
end module
-
-! { dg-final { cleanup-modules "classes" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_32.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_32.f90
index 00ae9c7..035965b 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_32.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_32.f90
@@ -31,5 +31,3 @@ contains
end function
end module
-
-! { dg-final { cleanup-modules "classes" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_33.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_33.f90
index 68ea53f..41aef56 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_33.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_33.f90
@@ -35,5 +35,3 @@ contains
end subroutine
end
-
-! { dg-final { cleanup-modules "ObjectLists" } }
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_16.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_16.f90
index 99e186d..2be8848 100644
--- a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_16.f90
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_16.f90
@@ -20,5 +20,3 @@ contains
end subroutine
end module
-
-! { dg-final { cleanup-modules "IO" } }
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_19.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_19.f90
index 51359d1..a665a38 100644
--- a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_19.f90
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_19.f90
@@ -49,5 +49,3 @@ CONTAINS
END SELECT; END SELECT
END SUBROUTINE copy_int
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_24.f03 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_24.f03
index 2abe99c..3993727 100644
--- a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_24.f03
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_24.f03
@@ -214,5 +214,3 @@ program main
end select
end do
end program main
-
-! { dg-final { cleanup-modules "list_mod link_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/use_only_3.f90 b/gcc/testsuite/gfortran.dg/use_only_3.f90
index ebb3928..b264506 100644
--- a/gcc/testsuite/gfortran.dg/use_only_3.f90
+++ b/gcc/testsuite/gfortran.dg/use_only_3.f90
@@ -32,4 +32,3 @@ subroutine dforceb(c0, i, betae, ipol, bec0, ctabin, gqq, gqqm, qmat, dq2, df)
& dq2, gmes
end subroutine dforceb
-! { dg-final { cleanup-modules "cell_base constants control_flags cvan electrons_base electrons_nose gvecs gvecw ions_base kinds parameters" } }
diff --git a/gcc/testsuite/gfortran.dg/use_without_only_1.f90 b/gcc/testsuite/gfortran.dg/use_without_only_1.f90
index 3fea702..06af985 100644
--- a/gcc/testsuite/gfortran.dg/use_without_only_1.f90
+++ b/gcc/testsuite/gfortran.dg/use_without_only_1.f90
@@ -19,4 +19,3 @@ CONTAINS
USE ISO_C_BINDING ! { dg-warning "9:has no ONLY qualifier" }
END SUBROUTINE S3
END MODULE
-! { dg-final { cleanup-modules "foo testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/warn_unused_function.f90 b/gcc/testsuite/gfortran.dg/warn_unused_function.f90
index 4d0ed9a..209cb7f 100644
--- a/gcc/testsuite/gfortran.dg/warn_unused_function.f90
+++ b/gcc/testsuite/gfortran.dg/warn_unused_function.f90
@@ -17,5 +17,3 @@ contains
print *, "Hello ", a, "!"
end subroutine
end module
-
-! { dg-final { cleanup-modules "mod_say_hello" } }
diff --git a/gcc/testsuite/gfortran.dg/warn_unused_function_2.f90 b/gcc/testsuite/gfortran.dg/warn_unused_function_2.f90
index 958cc96..43b211e 100644
--- a/gcc/testsuite/gfortran.dg/warn_unused_function_2.f90
+++ b/gcc/testsuite/gfortran.dg/warn_unused_function_2.f90
@@ -39,5 +39,3 @@ contains
subroutine s5 ! { dg-warning "defined but not used" }
end subroutine
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/lib/fortran-modules.exp b/gcc/testsuite/lib/fortran-modules.exp
index 7bfc002..a35f7a7 100644
--- a/gcc/testsuite/lib/fortran-modules.exp
+++ b/gcc/testsuite/lib/fortran-modules.exp
@@ -79,10 +79,14 @@ proc list-module-names { files } {
proc list-module-names-1 { file } {
set result {}
- set tmp [grep $file "^\[ \t\]*((#)?\[ \t\]*include|\[mM\]\[oO\]\[dD\]\[uU\]\[lL\]\[eE\](?!\[ \t\]+\[pP\]\[rR\]\[oO\]\[cC\]\[eE\]\[dD\]\[uU\]\[rR\]\[eE\]\[ \t\]+))\[ \t\]+.*" line]
+ if {[file isdirectory $file]} {return}
+ # Find lines containing INCLUDE, MODULE, and SUBMODULE, excluding the lines containing
+ # MODULE [PURE|(IMPURE\s+)?ELEMENTAL|RECURSIVE] (PROCEDURE|FUNCTION|SUBROUTINE)
+ set pat {^\s*((#)?\s*include|(sub)?module(?!\s+((pure|(impure\s+)?elemental|recursive)\s+)?(procedure|function|subroutine)[:\s]+))\s*.*}
+ set tmp [igrep $file $pat line]
if {![string match "" $tmp]} {
foreach i $tmp {
- regexp "(\[0-9\]+)\[ \t\]+(?:(?:#)?\[ \t\]*include\[ \t\]+)\[\"\](\[^\"\]*)\[\"\]" $i dummy lineno include_file
+ regexp -nocase {(\d+)\s+#?\s*include\s+["']([^"']*)["']} $i dummy lineno include_file
if {[info exists include_file]} {
set dir [file dirname $file]
set inc "$dir/$include_file"
@@ -99,10 +103,16 @@ proc list-module-names-1 { file } {
}
continue
}
- regexp "(\[0-9\]+)\[ \t\]+(?:(\[mM\]\[oO\]\[dD\]\[uU\]\[lL\]\[eE\]\[ \t\]+(?!\[pP\]\[rR\]\[oO\]\[cC\]\[eE\]\[dD\]\[uU\]\[rR\]\[eE\]\[ \t\]+)))(\[^ \t;\]*)" $i i lineno keyword mod
- if {![info exists lineno]} {
+ regexp -nocase {(\d+)\s+(module|submodule)\s*([^;]*)} $i i lineno keyword mod
+ if {![info exists mod]} {
continue
}
+ # Generates the file name mod_name@submod_name from
+ # (\s*mod_name[:submod_name]\s*)\s*submod_name\s*[! comment]
+ regsub {\s*!.*} $mod "" mod
+ regsub {:[^)]*} $mod "" mod
+ regsub {\(\s*} $mod "" mod
+ regsub {\s*\)\s*} $mod "@" mod
verbose "Line $lineno mentions module `$mod'" 3
if {[lsearch $result $mod] < 0} {
lappend result $mod
@@ -111,3 +121,54 @@ proc list-module-names-1 { file } {
}
return $result
}
+
+# Looks for case insensitive occurrences of a string in a file.
+# return:list of lines that matched or NULL if none match.
+# args: first arg is the filename,
+# second is the pattern,
+# third are any options.
+# Options: line - puts line numbers of match in list
+#
+proc igrep { args } {
+
+ set file [lindex $args 0]
+ set pattern [lindex $args 1]
+
+ verbose "Grepping $file for the pattern \"$pattern\"" 3
+
+ set argc [llength $args]
+ if { $argc > 2 } {
+ for { set i 2 } { $i < $argc } { incr i } {
+ append options [lindex $args $i]
+ append options " "
+ }
+ } else {
+ set options ""
+ }
+
+ set i 0
+ set fd [open $file r]
+ while { [gets $fd cur_line]>=0 } {
+ incr i
+ if {[regexp -nocase -- "$pattern" $cur_line match]} {
+ if {![string match "" $options]} {
+ foreach opt $options {
+ switch $opt {
+ "line" {
+ lappend grep_out [concat $i $match]
+ }
+ }
+ }
+ } else {
+ lappend grep_out $match
+ }
+ }
+ }
+ close $fd
+ unset fd
+ unset i
+ if {![info exists grep_out]} {
+ set grep_out ""
+ }
+ return $grep_out
+}