This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgomp/81752] New: num_gangs(65536) converted to 0
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 07 Aug 2017 15:44:45 +0000
- Subject: [Bug libgomp/81752] New: num_gangs(65536) converted to 0
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81752
Bug ID: 81752
Summary: num_gangs(65536) converted to 0
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgomp
Assignee: unassigned at gcc dot gnu.org
Reporter: vries at gcc dot gnu.org
CC: jakub at gcc dot gnu.org
Target Milestone: ---
num_gangs hits a limit at 65536 for nvptx. For this example:
...
int
main ()
{
#pragma acc parallel num_gangs(65536)
;
return 0;
}
...
we get this warning:
...
/tmp/ccjtQtKi.c:47:21: warning: unsigned conversion from 'int' to 'short
unsigned int' changes value from '65536' to '0' [-Woverflow]
{"main$_omp_fn$0", 0x10000, 0x1, 0x20}
...
The code triggering the warning in more detail:
...
static const struct nvptx_fn {
const char *name;
unsigned short dim[3];
} func_mappings[] = {
{"main$_omp_fn$0", 0x10000, 0x1, 0x20}
};
...