public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "wilson at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/18566] Can vary constants (undefined fortran) Date: Wed, 05 Jan 2005 03:44:00 -0000 [thread overview] Message-ID: <20050105034419.9507.qmail@sourceware.org> (raw) In-Reply-To: <20041119132256.18566.Thomas.Koenig@online.de> ------- Additional Comments From wilson at gcc dot gnu dot org 2005-01-05 03:44 ------- This question was asked and mostly answered on the gcc mailing list. http://gcc.gnu.org/ml/gcc/2004-12/msg00231.html http://gcc.gnu.org/ml/gcc/2004-12/msg00234.html As per the ABI, small local data ("own" data) is placed in the small data section in the GOT, where it can be accessed with a single memory reference. If we put it in the read-only data section, it would require two memory references to access it, resulting in slower code. Since the C testcase is invalid, this is not a good enough reason to disable an optimization by default. However, as Richard Henderson mentioned, we could optionally put the variable in a read-only data section if the user requested it via an option, or if the Fortran standard requires it. I don't know if the Fortran standard requires this, I doubt that it does. Incidentally, this issue is not unique to the IA-64 port. There are other targets that behave the same way, mips-elf for instance. So you may still have this problem when porting code to other systems even if the IA-64 port was fixed. There is an option that will make your testcase work as you expect, the -mno-sdata option. This is overkill for your purposes though, as this prevents any variable from going in sdata, whereas you only want to prevent putting const variables in sdata. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |wilson at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18566
next prev parent reply other threads:[~2005-01-05 3:44 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-11-19 13:23 [Bug fortran/18566] New: Can vary constants Thomas dot Koenig at online dot de 2004-11-19 15:13 ` [Bug fortran/18566] " pinskia at gcc dot gnu dot org 2004-11-25 20:29 ` Thomas dot Koenig at online dot de 2004-11-29 14:13 ` [Bug target/18566] Can vary constants (undefined fortran) pinskia at gcc dot gnu dot org 2004-11-30 8:29 ` Thomas dot Koenig at online dot de 2004-12-07 18:48 ` pinskia at gcc dot gnu dot org 2005-01-05 3:44 ` wilson at gcc dot gnu dot org [this message] [not found] <bug-18566-4@http.gcc.gnu.org/bugzilla/> 2013-03-17 17:08 ` tkoenig at gcc dot gnu.org
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=20050105034419.9507.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).