public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/44027] Segfault on internal read with -malign-double Date: Fri, 07 May 2010 15:43:00 -0000 [thread overview] Message-ID: <20100507154258.15026.qmail@sourceware.org> (raw) In-Reply-To: <bug-44027-19146@http.gcc.gnu.org/bugzilla/> ------- 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
prev parent reply other threads:[~2010-05-07 15:43 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-05-07 14:42 [Bug fortran/44027] New: " Igor dot Katchaev at cern dot ch 2010-05-07 15:43 ` burnus at gcc dot gnu dot org [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20100507154258.15026.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).