Re: [Patch fortran] PR32957 - C/Fortran interoperability and -fdefault-integer-8

2018-02-26 Thread Dominique d'Humières
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  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



Re: [Patch fortran] PR32957 - C/Fortran interoperability and -fdefault-integer-8

2018-02-25 Thread Thomas Koenig

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


[Patch fortran] PR32957 - C/Fortran interoperability and -fdefault-integer-8

2018-02-25 Thread Dominique d'Humières
Hi all,

I have noticed a recent interest to fix problems with -fdefault-integer-8. 
Please don’t forget to mark new PRs as blocking pr32770. I have also posted new 
results for the test suite.

I think it is a good time to submit the updated attached patch fixing some 
C/Fortran interoperability in the test suite (the variables exchanged between 
Fortran and C must not be changed by -fdefault-integer-8).

I have this patch in my working tree since a very long time and it has been 
applied before the new tests in pr32770.

OK for trunk? back port?

TIA

Dominique




patch-rega3
Description: Binary data