[Bug fortran/79484] Segfault when executing a test in Power8
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 8 07:37:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79484
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |kargl at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #5 from kargl at gcc dot gnu.org ---
(In reply to smateo from comment #4)
>
> 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).
Using ISO C binding is the only appropriate way to interface
Fortran and C All other methods require the user to understand
what they are doing on any particular architecture. It should
be noted that 2017-2003 is 14 years. It's not as-if Fortran
2003 was released 6 month ago.
> 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.
Your code worked because it aligns with a specific target model.
Does power8 have the exact architecture as x86-64?
More information about the Gcc-bugs
mailing list