public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "reza dot yazdani at amd dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/30153] -fPIC failure
Date: Fri, 05 Feb 2010 23:11:00 -0000	[thread overview]
Message-ID: <20100205231102.15638.qmail@sourceware.org> (raw)
In-Reply-To: <bug-30153-9033@http.gcc.gnu.org/bugzilla/>



------- Comment #4 from reza dot yazdani at amd dot com  2010-02-05 23:11 -------
(In reply to comment #3)
> "The optimization performed is correct because:
> 
> In C++ (not in C) a const modifier in a global variable has internal
> linkage (i.e. it is treated like a static variable) and therefore the
> optimization performed is correct. A global const variable can have
> legally different values in different files.
> 
> In C, it is illegal to initialize a global variable in more than one
> location, and if initialized in more than one place all values must be
> the same, because its initial value is nondeterministic if different.
> 
> This bug is unrelated to PIC, it will behave the same, if the program is
> written according to the C/C++ standards."
> 
> I suggest to be closed and marked as user error.
> 

Sorry, ignore the above comment. I wanted to add the above comment to the bug
35501. It was the first time I was doing this and somehow, it got added to this
bug. Please ignore it.


-- 


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


  parent reply	other threads:[~2010-02-05 23:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-11 19:24 [Bug c/30153] New: " terra at gnome dot org
2006-12-24  4:49 ` [Bug target/30153] " pinskia at gcc dot gnu dot org
2007-05-17  2:19 ` price at ifa dot hawaii dot edu
2010-02-05 21:11 ` reza dot yazdani at amd dot com
2010-02-05 23:11 ` reza dot yazdani at amd dot com [this message]
     [not found] <bug-30153-4@http.gcc.gnu.org/bugzilla/>
2011-12-22  3:24 ` pinskia 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=20100205231102.15638.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: link
Be 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).