public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: msk@ignlabs.com
To: gcc-gnats@gcc.gnu.org
Subject: middle-end/6418: mangle.c #2199 (GCC3.04) - Emits *INTERNAL* when handling weak defined templates con- and destructors
Date: Tue, 23 Apr 2002 04:56:00 -0000	[thread overview]
Message-ID: <20020423114935.2300.qmail@sources.redhat.com> (raw)


>Number:         6418
>Category:       middle-end
>Synopsis:       mangle.c #2199 (GCC3.04) - Emits *INTERNAL* when handling weak defined templates con- and destructors
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 23 04:56:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     IGNLabs OSResearch - DK
>Release:        3.00 - 3.04
>Organization:
>Environment:
Linux IA32 RH6.2-
>Description:
mangle.c outputs *INTERNAL* into assembler file weak sections, when handling weak defined template constructors and destructors in line 2199 (3.04) - write_string(" *INTERNAL* "); Only con- and destructors are affected. With no support for the export keyword this flaw is fatal when building libraries which uses common templates defined in headers.
>How-To-Repeat:
Make a derivative of UX2ListNode in a c++ file, and try to compile it. Now examine the assembler output - The weak sections at the end of it will contain: 
.weak "mangled constructorname" *INTERNAL* 
.weak "mangled destructorname" *INTERNAL* 
>Fix:
The comment above line 2199 in mangle.c states that the "*INTERNAL*" information should not be placed in the resulting assembler code, but it manages to end up in the asm code somehow. A quick fix is to change *INTERNAL* to #*INTERNAL* - The "not suppossed to be there statement" will now appear as comment to the assembler - not actually a fix to the problem, but a working for the moment solution.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="temptest.hpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="temptest.hpp"

I2RlZmluZSBGVU5DX1dFQUsoeCkgeCBfX2F0dHJpYnV0ZV9fKCh3ZWFrKSkKCnRlbXBsYXRlPGNs
YXNzIE4+IGNsYXNzIFVYMkxpc3ROb2Rlewpwcml2YXRlOgogIE4qIHByZXZpb3VzTm9kZTsKICBO
KiBuZXh0Tm9kZTsKcHJvdGVjdGVkOgpwdWJsaWM6CiAgRlVOQ19XRUFLKFVYMkxpc3ROb2RlKHZv
aWQpKTsKICBGVU5DX1dFQUsodm9pZCBzZXROZXh0KE4qIE5leHQpKTsKICBGVU5DX1dFQUsodm9p
ZCBzZXRQcmV2KE4qIFByZXYpKTsKICBGVU5DX1dFQUsoTiogZ2V0TmV4dCh2b2lkKSBjb25zdCk7
CiAgRlVOQ19XRUFLKE4qIGdldFByZXYodm9pZCkgY29uc3QpOwogIEZVTkNfV0VBSyh2aXJ0dWFs
IH5VWDJMaXN0Tm9kZSgpKTsKfTs=


             reply	other threads:[~2002-04-23 11:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-23  4:56 msk [this message]
2002-10-25  7:34 bangerth
2002-11-21  6:53 Michael Skriver
2002-11-21  7:10 bangerth

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=20020423114935.2300.qmail@sources.redhat.com \
    --to=msk@ignlabs.com \
    --cc=gcc-gnats@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).