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

--- Comment #5 from anlauf at gcc dot gnu.org ---
(In reply to kargls from comment #4)
> (In reply to Thomas Koenig from comment #3)
> > Resolve as invalid?
> 
> IMHO.  Yes.
> 
> IMNSHO, -fdefault-integer-8 should have been removed from 
> gfortran years ago.  I even submitted a patch to do so,
> which was rejected.  Codes in the testsuite are meant to
> test a patch fixes a real issue.  Running the testsuite
> with -fdefault-integer-8 is simply going to run into
> issues with BIND(C).

Careful.  The -fdefault-integer-8 is just a tip of a difference iceberg.

Omit this option, and replace c_int by c_long.  You'll then get:

bind_c_usage_10.f03:45:32:

   45 |   integer(c_long) function func1() bind(c, name="myFunc1")
      |                                1
Error: FUNCTION result func1 cannot be of type INTEGER(8) in FUNCTION func1 at
(1)

This is a resolution bug in gfortran, and there is IIRC sort of a duplicate.

Reply via email to