This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

target/10431: improper __attribute__((dllimport)) handling


>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 at yahoo dot 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
IGJhcjIoaW50IGkpICB7DQoJaW50ICogcCA9ICZmb28yW2ldOw0KCX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ZWJwKSwgJWVheA0KCWxl
YWwJMCgsJWVheCw0KSwgJWVkeA0KCW1vdmwJJF9faW1wX19mb28yLCAlZWF4DQoJYWRkbAklZWR4
LCAlZWF4DQoJbW92bAklZWF4LCAtNCglZWJwKQ0KCW1vdmwJLTQoJWVicCksICVlYXgNCgltb3Zs
CSglZWF4KSwgJWVheA0KCWxlYXZlDQoJcmV0DQo=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]