diff mbox

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

Message ID 4D694C37.6040205@net-b.de
State New
Headers show

Commit Message

Tobias Burnus Feb. 26, 2011, 6:53 p.m. UTC
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

Comments

Steve Kargl Feb. 26, 2011, 6:56 p.m. UTC | #1
On Sat, Feb 26, 2011 at 07:53:43PM +0100, Tobias Burnus wrote:
> 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?
> 

Unless Jakub has some objection, I think the patch
can be committed to all three.
Jakub Jelinek Feb. 26, 2011, 7:11 p.m. UTC | #2
On Sat, Feb 26, 2011 at 10:56:21AM -0800, Steve Kargl wrote:
> On Sat, Feb 26, 2011 at 07:53:43PM +0100, Tobias Burnus wrote:
> > 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?
> > 
> 
> Unless Jakub has some objection, I think the patch
> can be committed to all three.

Yeah.  Thanks.

	Jakub
diff mbox

Patch

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;