This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [fortran] Disable use of -malign-double
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "François-Xavier Coudert" <fxcoudert at gmail dot com>
- Cc: "Jerry DeLisle" <jvdelisle at verizon dot net>, "Andrew Pinski" <pinskia at physics dot uc dot edu>, "Steve Kargl" <sgk at troutmask dot apl dot washington dot edu>, fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 Feb 2007 13:01:51 +0100
- Subject: Re: [fortran] Disable use of -malign-double
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=sjFmf9/vboLVhb4OsDKIwG/G+7Kmg+6Hv764lxzldGYeLeoA4QT0Ly4L+9QxJUH6nXufnIfzIjwbmYspCloIStHonG+h4yPGxGAWqbUHAIfX7h3zjJX3dZNH9Q8JCo3wpSkJznkxAyMGirw54lKVDJcdoBoLhy5z48VKQkoxMPc=
- References: <200701311824.l0VIORT3025323@localhost.localdomain> <45C1515A.1070304@verizon.net> <84fc9c000702010148j2edc1315sa0466b784b6ed547@mail.gmail.com> <19c433eb0702010339p3bb65e85kd841a61133e5fc5d@mail.gmail.com>
On 2/1/07, François-Xavier Coudert <fxcoudert@gmail.com> wrote:
> (Note I agree with Andrew that no special action should be required,
> the documentation is quite clear)
I think it might not be clear from the point of view of a Fortran user
(who knows nothing about the compiler actually linking in a library
that the user never required).
Perhaps a section "GCC options that most probably won't work for your
Fortran code" could be added to the gfortran doc? There, we would
explain:
* the reasons why options changing ABI can't be used directly for
Fortran programs, even if there's no library involved (because the
compiler links in a library)
* a list of common such options
* a hint about the way to work around that if you really need it
(ie, building the libraries, including libgfortran, with your
ABi-changing option)
How does that sound?
The problem is that -malign-double is advocated as a useful option outside of
the gcc manual. In the manual it is clearly stated that it will break. So the
solution is to stop advocating use of -malign-double or fix the wording of that
advocation. But I support to amend the existing description
<quote>
@item -malign-double
@itemx -mno-align-double
@opindex malign-double
@opindex mno-align-double
Control whether GCC aligns @code{double}, @code{long double}, and
@code{long long} variables on a two word boundary or a one word
boundary. Aligning @code{double} variables on a two word boundary will
produce code that runs somewhat faster on a @samp{Pentium} at the
expense of more memory.
On x86-64, @option{-malign-double} is enabled by default.
@strong{Warning:} if you use the @option{-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.
</quote>
to explicitly mention libgfortran, libstdc++ and glibc such as via
-without that switch.
+without that switch such as libgfortran, libstdc++ or glibc.
Richard.