This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: PR fortran/42517: -fcheck=recursion does not work with -fopenmp
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 4 Jan 2010 14:35:04 -0800
- Subject: PATCH: PR fortran/42517: -fcheck=recursion does not work with -fopenmp
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
One gfc_option.flag_openmp check is missing, which leads to
/export/gnu/import/svn/gcc-test/src-trunk/libgomp/testsuite/libgomp.fortran/recursion1.f90
Fortran runtime error: Recursive call to nonrecursive procedure 'sub'
OK for trunk?
Thanks.
H.J.
---
2010-01-04 H.J. Lu <hongjiu.lu@intel.com>
PR fortran/42517
* trans-decl.c (gfc_generate_function_code): Disable
-fcheck=recursion when used with -fopenmp.
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index ce33b2a..e9178f1 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -4322,7 +4322,7 @@ gfc_generate_function_code (gfc_namespace * ns)
|| (sym->attr.entry_master
&& sym->ns->entries->sym->attr.recursive);
if ((gfc_option.rtcheck & GFC_RTCHECK_RECURSION) && !is_recursive
- && !gfc_option.flag_recursive)
+ && !gfc_option.flag_recursive && !gfc_option.flag_openmp)
{
char * msg;