diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 67e390a623b4de7df4f4da7ae39725fe1e47d454..077e118b51d8e2a562c3b423bf3fb2bd28edcfb6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,7 @@
 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
 
+	* gfortran.dg/openmp_stack.f90: Removed.
+
 	PR c++/31434
 	* g++.dg/cpp0x/variadic80.C: New test.
 
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 22d936b84ced1c7b3d17f85925664974b92dd80e..b11a5a0510411d1f8ab7631d1739aa3edcdc792b 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,7 @@
+2007-09-28  Jakub Jelinek  <jakub@redhat.com>
+
+	* testsuite/libgomp.fortran/stack.f90: New test.
+
 2007-09-10  Danny Smith  <dannysmith@users.sourceforge.net>
 
 	* config/mingw32/proc.c: New file.
diff --git a/gcc/testsuite/gfortran.dg/openmp_stack.f90 b/libgomp/testsuite/libgomp.fortran/stack.f90
similarity index 85%
rename from gcc/testsuite/gfortran.dg/openmp_stack.f90
rename to libgomp/testsuite/libgomp.fortran/stack.f90
index 6ec1d786fc355a1b1ecf9b381f806a7ba163472c..b27673d01fdac54f64a945ad34cca1ba220407ce 100644
--- a/gcc/testsuite/gfortran.dg/openmp_stack.f90
+++ b/libgomp/testsuite/libgomp.fortran/stack.f90
@@ -1,6 +1,5 @@
 ! { dg-do run }
-! { dg-options "-fopenmp" }
-program openmp_stack
+program stack
   implicit none
   integer id
   integer ilocs(2)
@@ -13,7 +12,7 @@ program openmp_stack
   ! Check that the two threads are not sharing a location for
   ! the array x in foo()
   if (ilocs(1) .eq. ilocs(2)) call abort
-end program openmp_stack
+end program stack
 
 integer function foo ()
   implicit none