public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/38007] [4.2/4.3/4.4 Regression] g++ instantiate same operator twice due to bitfield in -O0 mode, causing symbol already defined assembler error Date: Tue, 04 Nov 2008 10:41:00 -0000 [thread overview] Message-ID: <20081104103942.32021.qmail@sourceware.org> (raw) In-Reply-To: <bug-38007-15718@http.gcc.gnu.org/bugzilla/> ------- Comment #2 from rguenth at gcc dot gnu dot org 2008-11-04 10:39 ------- The following also fails the same way with optimization: class foo { public: template <typename T> __attribute__((noinline)) operator T () { return (T)0; } }; struct bar { unsigned int _bar : 24; }; int main() { foo a; unsigned int b = a; bar c; c._bar = a; return 0; } we instantiate the operator for unsigned int and unsigned int : 24 what we probably should do is treat c._bar = a; as c._bar = (unsigned int : 24)(unsigned int)a; instead. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38007
next prev parent reply other threads:[~2008-11-04 10:41 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-11-03 19:24 [Bug c++/38007] New: " jengliang at gmail dot com 2008-11-03 20:08 ` [Bug c++/38007] [4.2/4.3/4.4 Regression] " pinskia at gcc dot gnu dot org 2008-11-04 10:41 ` rguenth at gcc dot gnu dot org [this message] 2008-11-06 15:16 ` jakub at gcc dot gnu dot org 2008-11-07 22:25 ` jason at gcc dot gnu dot org 2008-11-12 20:53 ` jason at gcc dot gnu dot org 2008-11-12 22:11 ` [Bug c++/38007] [4.2/4.3 " jason at gcc dot gnu dot org 2008-11-12 22:16 ` jason at gcc dot gnu dot org 2008-11-12 22:17 ` jason at gcc dot gnu dot org 2009-04-29 15:20 ` 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=20081104103942.32021.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).