[patch, fortran] Fix PR 87689, wrong decls / ABI violation on POWER
Thomas Koenig
tkoenig@netcologne.de
Tue Feb 19 22:44:00 GMT 2019
Bob,
> Some of us still use varargs interfaces (in my case, Fortran calling C
> stdarg subroutines).
The problem for us is that that sometimes using varargs made standard-
conforming Fortran code like, in file a.f
subroutine foo(a)
print *,a
end
and in file main.f
programme main
call foo(1.0)
end
depend ABI details: The call to foo used to be called using
the varargs convention, and the subroutine foo was compiled
as a non-varargs function.
This "worked" until PR 87689 showed that this breaks
standard-conforming Fortran code on a primary gcc platform.
I don't know if that makes a difference for the platform you work
on. For the System V AMD64 ABI, I suspect it actually might not
matter (at least from glancing at the corresponding Wikipedia
article), but I am _not_ an expert in this field, so please take this
with a chunk of rock salt of appropriate size.
So, we cannot really keep this as a feature (note that varargs
are also not C interoperable).
Regards
Thomas
More information about the Gcc-patches
mailing list