------- Comment #1 from burnus at gcc dot gnu dot org  2010-05-07 15:42 -------
As requested in PR 44026: Mark this report as duplicate.

Regarding the error message itself: As the manual state (man gcc or
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html#index-malign_002ddouble-1314
) the option -malign-double does:

"Control whether GCC aligns double, long double, and long long variables on a
two word boundary or a one word boundary" ("On x86-64, -malign-double is
enabled by default.")

But it also states:

"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."

This includes in particular all libraries - and in particular the GNU Fortran
run-time library (libgfortran) but also the system's C library (libc, e.g.
GLIBC) and math library (libm). Depending what your program and what the
library is doing, a program might work, might not work or might more or less
silently fail.

Of course one could recompile all libraries, but the simpler solution is:
Simply avoid the flag -m(no-)align-double.

As this is a somewhat regularly recurring problem, it was suggested to enable a
warning in the front end (i.e. in the Fortran part of GCC). However, as this is
a target-dependent option, getting the warning right (e.g. warn on x86 for
-malign-double and on x86-64 for -mno-align-double while on non-x86 platforms
the flag does not even exist ...) was seen as too cumbersome and convoluted to
be useful and thus no warning was added.

*** This bug has been marked as a duplicate of 44026 ***


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44027

Reply via email to