[Cocci] [cocci-bug] coccinelle 1.0.6: OpenMP #pragma directive leads to function ignore

Michele Martone michelemartone at users.sourceforge.net
Fri May 25 15:56:29 CEST 2018

On 20180502 at 15:16, Michele Martone wrote:
> On 20180430 at 09:44, Peter Senna Tschudin wrote:
> > ... 
> Dear Peter, thanks for the apt-get based recipe,  
> it worked for me on debian buster with ocaml-4.0.5.
> Dear Julia, thanks for the pragma patch which will
> enable coccinelle to support OpenMP-enabled listings
> too (I just tested it on the above setup) :-)
> Michele

Dear Julia,

I have another similar minimal test spatch case failing, attached.
It seems like using
 #pragma omp parallel for private(I)
breaks the semantic patch, while having 
 #pragma omp parallel for 
is still ok.
Please see attachment.

I'm using self-built ocaml (e407ecf11 2018-05-25)
and coccinelle (a4532f08 2018-05-17).

would be very useful to have full #pragma resilience!

-------------- next part --------------
// seems like this example breaks:
// spatch version 1.0.6-00440-ga4532f08 compiled with OCaml version 4.08.0+dev0-2018-04-09
// (a4532f08 2018-05-17)


symbol A,I,J;

void f(void)
// pragma presence breaks semantic patch (remote private(i) to 'fix' it)
// comment it to have A[I] -> A[J]
#pragma omp parallel for private(I)

More information about the Cocci mailing list