This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[OpenMP, Patch] PR fortran/47886 fix ICE in OMP task's if() clause


The patch is rather obvious. Without, one gets an ICE as the function is not resolved but BT_UNKNOWN in

!$omp task if(omp_get_num_threads()> 0)


Build and regtested on x86-64-linux. OK for the trunk? What about GCC 4.4 and 4.5?

Tobias

2011-02-26  Tobias Burnus  <burnus@net-b.de>

	PR fortran/47886
	* openmp.c (gfc_resolve_omp_directive): Resolve if()
	condition of OpenMP's task.

diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index 24e32eb..2b70c69 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -1573,6 +1573,7 @@ gfc_resolve_omp_directive (gfc_code *code, gfc_namespace *ns ATTRIBUTE_UNUSED)
     case EXEC_OMP_PARALLEL_SECTIONS:
     case EXEC_OMP_SECTIONS:
     case EXEC_OMP_SINGLE:
+    case EXEC_OMP_TASK:
       if (code->ext.omp_clauses)
 	resolve_omp_clauses (code);
       break;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]