aboutsummaryrefslogtreecommitdiff
path: root/install-sh
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-10-20 16:38:24 +0200
committerJakub Jelinek <jakub@redhat.com>2020-10-20 16:38:24 +0200
commit35f258f4bbba7fa044f90b4f14d1bc942db58089 (patch)
treea2902ab3016de36a8cef088607d373eb30f9bb1a /install-sh
parent953277ba3fa39a9285cf89f59932b0169e7f6b9d (diff)
downloadgcc-35f258f4bbba7fa044f90b4f14d1bc942db58089.zip
gcc-35f258f4bbba7fa044f90b4f14d1bc942db58089.tar.gz
gcc-35f258f4bbba7fa044f90b4f14d1bc942db58089.tar.bz2
libgomp: Fix up bootstrap in libgomp/target.c due to false positive warning
> On 10/20/20 2:11 PM, Tobias Burnus wrote: > > > Unfortunately, the committed patch > > (r11-4121-g1bfc07d150790fae93184a79a7cce897655cb37b) > > causes build errors. > > > > The error seems to be provoked by function cloning – as the code > > itself looks fine: > > ... > > struct gomp_device_descr *devices_s > > = malloc (num_devices * sizeof (struct gomp_device_descr)); > > ... > > for (i = 0; i < num_devices; i++) > > if (!(devices[i].capabilities & GOMP_OFFLOAD_CAP_OPENMP_400)) > > devices_s[num_devices_after_openmp++] = devices[i]; > > gomp_target_init.part.0 () > { > ... > <bb 2> > devices_s_1 = malloc (0); > ... > num_devices.16_67 = num_devices; > ... > if (num_devices.16_67 > 0) > goto <bb 3>; [89.00%] > else > goto <bb 18>; [11.00%] > > Which seems to have an ordering problem. This patch fixes the warning that breaks the bootstrap. 2020-10-20 Jakub Jelinek <jakub@redhat.com> * target.c (gomp_target_init): Inside of the function, use automatic variables corresponding to num_devices, num_devices_openmp and devices global variables and update the globals only at the end of the function.
Diffstat (limited to 'install-sh')
0 files changed, 0 insertions, 0 deletions