https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81336

--- Comment #3 from bburgerm at googlemail dot com ---
Yes, I'm using this option because the gfortran code should be included in a
larger project with a mixture of C, C++, gfortran and partially intel fortran
code with several libraries only available in binary form. Due to the lack of
gfortran function attributes to define the symbol explicitly, using
-fno-underscoring was the most successfull solution. Using bind(C) did not work
for all functions because gfortran is quite picky regarding variable types
(like it is not possible to pass a fortran user defined type with an
allocatable variable to a C function which only passes it to a fortran function
without reading or touching it. For example a dlopen-wrapper).

As mentioned above I have read the warnings about -fno-underscoring and only
filed a bug report because the bug is already visible for the small attached
program only using libraries that are also part of gcc.

If it would have happened for our large project only, then I would accept it as
the described incompatibilities.

Btw: The same problem appears for omp_set_num_threads using the pointer value
as number of threads if -fno-underscoring is used from fortran which usually
leads to a crash.

Reply via email to