Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

-Wsign-compare complains on #pragma omp taskloop #50633

Open Quuxplusone opened 3 years ago

Quuxplusone commented 3 years ago
Bugzilla Link PR51666
Status NEW
Importance P enhancement
Reported by Roman Lebedev (lebedev.ri@gmail.com)
Reported on 2021-08-29 11:45:06 -0700
Last modified on 2021-08-29 11:54:09 -0700
Version unspecified
Hardware PC Linux
CC a.bataev@hotmail.com, jdoerfert@anl.gov, johannes@jdoerfert.de, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also

https://godbolt.org/z/77z1r6WKP

void callee(int);

void entry(int width) {

pragma omp taskloop

for(int i = 0; i < width; ++i) callee(i); }

:5:5: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare] for(int i = 0; i < width; ++i)


1 warning generated.
Compiler returned: 

There is no `unsigned long` in the source code, but presumably
there is something OMP-internal there.
I don't see why this is being diagnosed,
nor am i seeing how to nicely workaround that.
Quuxplusone commented 3 years ago

@Alexey, do we even need to extend the size even if we have no collapse clause?

Regardless, we should not emit warnings.