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 middle-end/39298] Optimize away only set but not used variable Date: Wed, 25 Feb 2009 10:35:00 -0000 [thread overview] Message-ID: <20090225103515.5357.qmail@sourceware.org> (raw) In-Reply-To: <bug-39298-13404@http.gcc.gnu.org/bugzilla/> ------- Comment #4 from burnus at gcc dot gnu dot org 2009-02-25 10:35 ------- I did some testing with sunf95, icc and ifort. sunf95 also puts the variable in .bss as gfortran does, while ifort puts it on the stack (unless explicitly declared as static ["SAVE"]). If the variable is static, neither of the compilers optimizes it away. a) Why are static variables not optimized away? (Not even in main()/MAIN_?) b) Is there something what one could do to get the advantage of not having huge variables on the stack but still allowing to optimize the variable away? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39298
next prev parent reply other threads:[~2009-02-25 10:35 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-02-25 9:12 [Bug middle-end/39298] New: " burnus at gcc dot gnu dot org 2009-02-25 9:43 ` [Bug middle-end/39298] " rguenth at gcc dot gnu dot org 2009-02-25 13:37 ` Andrew Thomas Pinski 2009-02-25 9:52 ` rguenth at gcc dot gnu dot org 2009-02-25 10:21 ` burnus at gcc dot gnu dot org 2009-02-25 10:35 ` burnus at gcc dot gnu dot org [this message] 2009-02-25 11:21 ` rguenth at gcc dot gnu dot org 2009-02-25 13:37 ` pinskia at gmail dot com 2009-02-27 0:01 ` pinskia at gcc dot gnu dot 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=20090225103515.5357.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).