https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123512
Bug ID: 123512
Summary: bootstrap broken on FreeBSD due to changes in
libgfortran/io/async.h
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: kargl at gcc dot gnu.org
Target Milestone: ---
Created attachment 63306
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63306&action=edit
patch
Bootstrap is broken on FreeBSD with the recent updates to threading
updates in libgfortran. The attached patch should be self explanatory.
The gist is that on a few place one has
(unit)->self = 1;
On FreeBSD, (unit)->self is of type 'struct pthreat_t *'. If one
builds with the -Wint-conversion option (as occurs in my tree),
then one gets
ion 'get_gfc_unit':
../../../gcc/libgfortran/io/async.h:438:22: error: assignment to '__gthread_t'
{aka 'struct pthread *'} from 'int' makes pointer from integer without a cast
[-Wint-conversion]
438 | (unit)->self = 1;
The patch simply sprinkles a few cast into the code.