public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: xtrochu@yahoo.com
To: gcc-gnats@gcc.gnu.org
Subject: target/10431: improper __attribute__((dllimport)) handling
Date: Fri, 18 Apr 2003 09:47:00 -0000	[thread overview]
Message-ID: <20030418094324.29257.qmail@sources.redhat.com> (raw)


>Number:         10431
>Category:       target
>Synopsis:       improper __attribute__((dllimport)) handling
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 18 09:46:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     xtrochu@yahoo.com
>Release:        mainline, 3.3
>Organization:
>Environment:
i686-pc-mingw32
>Description:
When using the __attribute__((dllimport)) on a extern variable, the compiler generate a invalid opcode.

See rtest.ori.s for the correct output, given by gcc 3.2.2
and rtest.new.s for the invalid output generated by mainline gcc.

commandline used: 
gcc -S -s -O0 -o rtest.ori.s rtest.i
gcc/stage1/xgcc -Bgcc/stage1 -S -s -O0 -o rtest.new.s rtest.i
(note: Because of the bug, the mainline does not bootstrap, that's why I used stage1)

The same behaviour can be observed when building GCC as a cross-compiler to mingw32.

>How-To-Repeat:

>Fix:
The problem seems to come from the latest modification to winnt.c by mmitchell. (FIX PR c++/7910).

Reverting to version 1.42 of winnt.c fix the behaviour.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test"

PT09PT09PT09PT09PT09PT0gcnRlc3QuaSA9PT09PT09PT09PT09DQoNCmV4dGVybiBfX2F0dHJp
YnV0ZV9fKChkbGxpbXBvcnQpKSBpbnQgZm9vOw0KZXh0ZXJuIF9fYXR0cmlidXRlX18oKGRsbGlt
cG9ydCkpIGludCBmb28yW107DQoNCmludCBiYXIoKSB7DQoJcmV0dXJuIGZvbzsNCn0NCg0KaW50
IGJhcjIoaW50IGkpICB7DQoJaW50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NCwgJWVzcA0KCW1vdmwJOCglZWJwKSwgJWVheA0KCWxl
YWwJMCgsJWVheCw0KSwgJWVkeA0KCW1vdmwJJF9faW1wX19mb28yLCAlZWF4DQoJYWRkbAklZWR4
LCAlZWF4DQoJbW92bAklZWF4LCAtNCglZWJwKQ0KCW1vdmwJLTQoJWVicCksICVlYXgNCgltb3Zs
CSglZWF4KSwgJWVheA0KCWxlYXZlDQoJcmV0DQo=


             reply	other threads:[~2003-04-18  9:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-18  9:47 xtrochu [this message]
2003-04-18 10:02 ebotcazou
2003-04-21 20:59 mmitchel
2003-04-21 22:26 TROCHU Xavier

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=20030418094324.29257.qmail@sources.redhat.com \
    --to=xtrochu@yahoo.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).