[petsc-dev] GCC8 Fortran length changes from int to size_t

Jed Brown jed at jedbrown.org
Wed May 2 08:45:26 CDT 2018


On x86-64 Linux, the first six integer arguments are passed in registers
(rdi, rsi, rdx, rcx, r8, r9).  Multiple smaller integers are not packed
into these registers, but they are accessed as 32-bit (edi, ...).

Satish Balay <balay at mcs.anl.gov> writes:

> Well it should atleast bite for functions that have 2 char arguments. Perhaps
> none of the tests are using these routines..
>
> Satish
>
> On Wed, 2 May 2018, Jed Brown wrote:
>
>> Is the length passed in registers and incorrectly using the lower half
>> of the register provides the int part?
>> 
>> Satish Balay <balay at mcs.anl.gov> writes:
>> 
>> > hm - I have gfortran-8 on my laptop - but haven't seen any testsuite regressions due to this change.
>> >
>> > Satish
>> >
>> > On Wed, 2 May 2018, Jed Brown wrote:
>> >
>> >> See Fortran Language Issues.
>> >> 
>> >>   https://gcc.gnu.org/gcc-8/porting_to.html
>> >> 
>> >> We'll have to test for this (probably compiler version) and change the
>> >> PETSC_MIXED_LEN / PETSC_END_LEN to use size_t instead of int.
>> >> 
>> 


More information about the petsc-dev mailing list