[Bug fortran/31696] -malign-double trashes fortran format
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31696 --- Comment #8 from Drew gnu.0kn at gishpuppy dot com 2012-10-31 03:55:13 UTC --- After some googling I have found that ABI means application binary interface and how this affects the problem, thank you. I would be happy if someone could direct me to a tutorial on how to maintain two different ABIs on the same machine (so as not to break unaligned code elsewhere) and how to obtain it precompiled from a package maintainer. As another workaround, it has been indicated that $LD_PRELOAD may be used to link to an aligned malloc http://gcc.gnu.org/ml/fortran/2007-08/msg00320.html For information on how to do either I, and I'm sure many others attempting to call SSE functions or DMA transfers from 32 bit gfortran, would be very thankful.
[Bug fortran/31696] -malign-double trashes fortran format
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31696 Dominique d'Humieres dominiq at lps dot ens.fr changed: What|Removed |Added CC||gnu.0kn at gishpuppy dot ||com --- Comment #7 from Dominique d'Humieres dominiq at lps dot ens.fr 2012-10-14 04:35:34 UTC --- *** Bug 54923 has been marked as a duplicate of this bug. ***
[Bug fortran/31696] -malign-double trashes fortran format
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-04-25 16:34 --- what do you expect from an abi changing option? -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31696
[Bug fortran/31696] -malign-double trashes fortran format
--- Comment #2 from KnowlesPJ at Cardiff dot ac dot uk 2007-04-25 16:47 --- I don't understand your response, or the assumptions that might be behind it. The program is standard fortran that compiles without warning, and I cannot see why I would not want doubles aligned at 64 bits on x86 hardware, just like all the other compilers, including the other free one, do. Is it written down somewhere that there is no intention to support this mode of operation in the foreseeable future? Google sends me to, for example, http://gcc.gnu.org/ml/fortran/2007-02/msg00026.html which does not undermine my assumptions as unreasonable. If you speak on behalf of the gfortran community in saying you will not address this, then we will simply once again for a while walk away from attempting support of gfortran in our large and widely-used code. -- KnowlesPJ at Cardiff dot ac dot uk changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|WONTFIX | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31696
[Bug fortran/31696] -malign-double trashes fortran format
--- Comment #3 from pinskia at gcc dot gnu dot org 2007-04-25 18:12 --- Does not matter, this option changes the ABI, it is like any other ABI changing option, you should not use it unless you understand what you are doing which is clearly not the case. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31696
[Bug fortran/31696] -malign-double trashes fortran format
--- Comment #4 from burnus at gcc dot gnu dot org 2007-04-25 19:58 --- From the man page: -malign-double -mno-align-double Control whether GCC aligns double, long double, and long long variables on a two word boundary or a one word boundary. Aligning double variables on a two word boundary will produce code that runs somewhat faster on a Pentium at the expense of more memory. On x86-64, -malign-double is enabled by default. NOW COMES THE IMPORTANT PART: Warning: if you use the -malign-double switch, structures containing the above types will be aligned differently than the published application binary interface specifications for the 386 and will not be binary compatible with structures in code compiled without that switch. Thus if you want to use -malign-double, you need to compile at least also the gfortran library with that option. (Maybe other libraries as well.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31696
[Bug fortran/31696] -malign-double trashes fortran format
--- Comment #5 from KnowlesPJ at Cardiff dot ac dot uk 2007-04-25 22:46 --- I guess I walk away from you guys at this point. You need to think carefully about the fortran standard, which does not define any abi whatsoever (unfortunately). The fortran programmer is not supposed to think about this, but instead write within the language. It is just different to C and CPP. If you can not think about the overall system (compiler and supporting libraries that aim to implement the standard) as a single entity instead of just the compiler, then you will not win friends in the application code development community. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31696
[Bug fortran/31696] -malign-double trashes fortran format
--- Comment #6 from pinskia at gcc dot gnu dot org 2007-04-25 22:58 --- Yes the fortran standard does not define the ABI, the target which you are compiling for does and if you change it in any way (which is what options like -malign-double does) you are going to run into problems like this. GCC is more than a fortran compiler and more than a C compiler, if you use options in general that warn that they change the ABI (this is documented as shown by comment #4 ), you should be expected to understand what you are trying to do might not always work. There are so many options which change the ABI (argument passing, struct layout) that it is not the correct thing to warn about all of them, though maybe we should not supply them as options in the first place but that is up to the target maintainers to decide if they want to have these options. Also note -malign-double is just an example of the ABI changing options and it just happens to be the most reported one that breaks code. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31696