public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/36107] New: weak constructor product unvalid asm @ 2008-05-02 11:56 william dot fink at gmail dot com 2008-05-05 5:11 ` [Bug c++/36107] " pinskia at gcc dot gnu dot org 0 siblings, 1 reply; 4+ messages in thread From: william dot fink at gmail dot com @ 2008-05-02 11:56 UTC (permalink / raw) To: gcc-bugs When using __attribute__((weak)) on a constructor, the produced assembly file contains an extra *INTERNAL* on the constructor declaration line. - Here is my test code: class Test { public: Test() __attribute__((weak)); }; int test() { Test test; } - The compilation output: $ g++ test.cc /tmp/cchKRpYD.s: Assembler messages: /tmp/cchKRpYD.s:22: Error: junk at end of line, first unrecognized character is `*' - The corresponding asm line 22: .weak _ZN4TestC1Ev *INTERNAL* I have tried this with and it does not work for: - gcc (GCC) 4.3.0 (compiled from sources) - gcc-4.2 (GCC) 4.2.1 (Ubuntu 4.2.1-5ubuntu4) - gcc-4.1 (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) It works without problems with: - gcc-3.4 (GCC) 3.4.6 (Ubuntu 3.4.6-6ubuntu2) If I manually remove the '*INTERNAL*' from the asm file, it compiles correctly. I found a similar old bug (6418) from the GCC3.04 version -- Summary: weak constructor product unvalid asm Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: william dot fink at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36107 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/36107] weak constructor product unvalid asm 2008-05-02 11:56 [Bug c++/36107] New: weak constructor product unvalid asm william dot fink at gmail dot com @ 2008-05-05 5:11 ` pinskia at gcc dot gnu dot org 0 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2008-05-05 5:11 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from pinskia at gcc dot gnu dot org 2008-05-05 05:10 ------- Even if the code assembled for 3.3.6 or 3.4.x, the weak reference was not being emitted. So this is not a regression really. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2008-05-05 05:10:15 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36107 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <bug-36107-4@http.gcc.gnu.org/bugzilla/>]
* [Bug c++/36107] weak constructor product unvalid asm [not found] <bug-36107-4@http.gcc.gnu.org/bugzilla/> @ 2012-10-11 14:14 ` paolo.carlini at oracle dot com 2012-10-11 14:38 ` paolo at gcc dot gnu.org 1 sibling, 0 replies; 4+ messages in thread From: paolo.carlini at oracle dot com @ 2012-10-11 14:14 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36107 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|gcc-bugs at gcc dot gnu.org | Known to work| |4.5.4, 4.7.0, 4.8.0 Known to fail| | --- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-11 14:14:11 UTC --- Fixed a looong time ago, 4_5-branch is fine. I'm adding the testcase and closing the PR. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/36107] weak constructor product unvalid asm [not found] <bug-36107-4@http.gcc.gnu.org/bugzilla/> 2012-10-11 14:14 ` paolo.carlini at oracle dot com @ 2012-10-11 14:38 ` paolo at gcc dot gnu.org 1 sibling, 0 replies; 4+ messages in thread From: paolo at gcc dot gnu.org @ 2012-10-11 14:38 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36107 --- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-10-11 14:38:00 UTC --- Author: paolo Date: Thu Oct 11 14:37:44 2012 New Revision: 192361 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192361 Log: 2012-10-11 Paolo Carlini <paolo.carlini@oracle.com> PR c++/36107 * g++.dg/ext/weak5.C: New. Added: trunk/gcc/testsuite/g++.dg/ext/weak5.C Modified: trunk/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-10-11 14:38 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-05-02 11:56 [Bug c++/36107] New: weak constructor product unvalid asm william dot fink at gmail dot com 2008-05-05 5:11 ` [Bug c++/36107] " pinskia at gcc dot gnu dot org [not found] <bug-36107-4@http.gcc.gnu.org/bugzilla/> 2012-10-11 14:14 ` paolo.carlini at oracle dot com 2012-10-11 14:38 ` paolo at gcc dot gnu.org
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).