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

--- Comment #4 from smateo <sergi.mateo at bsc dot es> ---
Hi Jerry,

This code is a simplification of a code that our tool generates to support a
tasking programming model. I know that I don't need a derived type to call a C
function. If I recall correctly, I needed to reproduce this problem.

Of course using the ISO_C_BINDINGS interoperability module and BIND(C) would be
a more appropriate way of doing it, but they were introduced in F2003. I guess
that a code like the one I attached should work in the pre-interoperability era
(we may need to remove the VALUE attributes since this attribute was introduced
also in F2003).

I decided to open this ticket because, as you said, this code works nicely in
x86_64 (I also tried in some ARM machines and also worked), and because
changing the optimization level flags made it work.

I also tried to compile this code with XLF and works nicely.

Best regards,
Sergi

Reply via email to