This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch fortran] PR32957 - C/Fortran interoperability and -fdefault-integer-8
- From: Dominique d'Humières <dominiq at lps dot ens dot fr>
- To: Thomas Koenig <tkoenig at netcologne dot de>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 26 Feb 2018 12:00:18 +0100
- Subject: Re: [Patch fortran] PR32957 - C/Fortran interoperability and -fdefault-integer-8
- Authentication-results: sourceware.org; auth=none
- References: <EAFCBA37-06B2-44ED-AB2F-BCB7AC166E96@lps.ens.fr> <7b6cd454-9cc9-6161-270e-39568cbd6f6d@netcologne.de>
Thanks for the quick review, committed as r257985. I have spotted a few similar issues in my recent testing and I have problem with gfortran.dg/bind_c_usage_10.f03 when using -fdefault-integer-8:
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/bind_c_usage_10.f03:66:31:
integer(c_int) function func4()
1
Error: FUNCTION result func4 can't be of type INTEGER(4) in FUNCTION func4 at (1)
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/bind_c_usage_10.f03:59:31:
integer(c_int) function func3() bind(c, name="myFunc3")
1
Error: FUNCTION result func3 can't be of type INTEGER(4) in FUNCTION func3 at (1)
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/bind_c_usage_10.f03:52:31:
integer(c_int) function func2()
1
Error: FUNCTION result func2 can't be of type INTEGER(4) in FUNCTION func2 at (1)
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/bind_c_usage_10.f03:45:31:
integer(c_int) function func1() bind(c, name="myFunc1")
1
Error: FUNCTION result func1 can't be of type INTEGER(4) in FUNCTION func1 at (1)
AFAIU the code func* are integer(c_int), then why these errors?
TIA
Dominique
> Le 26 févr. 2018 à 00:34, Thomas Koenig <tkoenig@netcologne.de> a écrit :
>
> Hi Dominique,
>
>> OK for trunk? back port?
>
> OK for trunk.
>
> The tests were non-conforming before, so this is also a
> step in making our testsuite better.
>
> For gcc-7, I'm not sure I would bother, but OK if
> you want to do it.
>
> Regards
>
> Thomas