[PATCH] openmp: Add support for omp_get_supported_active_levels

David Edelsohn dje.gcc@gmail.com
Tue Oct 20 13:51:52 GMT 2020


This patch broke bootstrap on AIX.

/nasfarm/edelsohn/src/src/libgomp/target.c: In function
'gomp_target_init.part.':
/nasfarm/edelsohn/src/src/libgomp/target.c:3367:45: error: array
subscript [-19877956975980120, 19877956975980120] is outside array
bounds of 'struct gomp_device_descr[0]' [-Werror=array-bounds]
 3367 |       devices_s[num_devices_after_openmp++] = devices[i];
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/nasfarm/edelsohn/src/src/libgomp/target.c:3353:7: note: referencing
an object of size 0 allocated by 'malloc'
 3353 |     = malloc (num_devices * sizeof (struct gomp_device_descr));
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nasfarm/edelsohn/src/src/libgomp/target.c:3363:39: error: array
subscript [-19877956975980120, 19877956975980120] is outside array
bounds of 'struct gomp_device_descr[0]' [-Werror=array-bounds]
 3363 |       devices_s[num_devices_openmp++] = devices[i];
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/nasfarm/edelsohn/src/src/libgomp/target.c:3353:7: note: referencing
an object of size 0 allocated by 'malloc'
 3353 |     = malloc (num_devices * sizeof (struct gomp_device_descr));
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


More information about the Gcc-patches mailing list