From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29951 invoked by alias); 18 Apr 2003 09:47:37 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 29801 invoked by uid 71); 18 Apr 2003 09:46:32 -0000 Resent-Date: 18 Apr 2003 09:46:32 -0000 Resent-Message-ID: <20030418094632.29800.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, xtrochu@yahoo.com Received: (qmail 29258 invoked by uid 48); 18 Apr 2003 09:43:24 -0000 Message-Id: <20030418094324.29257.qmail@sources.redhat.com> Date: Fri, 18 Apr 2003 09:47:00 -0000 From: xtrochu@yahoo.com Reply-To: xtrochu@yahoo.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: target/10431: improper __attribute__((dllimport)) handling X-SW-Source: 2003-04/txt/msg00833.txt.bz2 List-Id: >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 IGJhcjIoaW50IGkpICB7DQoJaW50ICogcCA9ICZmb28yW2ldOw0KCXJldHVybiAqcDsNCn0NCg0K PT09PT09PT09PT09PT09PT0gcnRlc3Qub3JpLnMgPT09PT09PT09DQoJLmZpbGUJInJ0ZXN0Lmki DQoJLnRleHQNCi5nbG9ibCBfYmFyDQoJLmRlZglfYmFyOwkuc2NsCTI7CS50eXBlCTMyOwkuZW5k ZWYNCl9iYXI6DQoJcHVzaGwJJWVicA0KCW1vdmwJJWVzcCwgJWVicA0KCW1vdmwJX19pbXBfX2Zv bywgJWVheA0KCW1vdmwJKCVlYXgpLCAlZWF4DQoJcG9wbAklZWJwDQoJcmV0DQouZ2xvYmwgX2Jh cjINCgkuZGVmCV9iYXIyOwkuc2NsCTI7CS50eXBlCTMyOwkuZW5kZWYNCl9iYXIyOg0KCXB1c2hs CSVlYnANCgltb3ZsCSVlc3AsICVlYnANCglzdWJsCSQ0LCAlZXNwDQoJbW92bAk4KCVlYnApLCAl ZWF4DQoJc2FsbAkkMiwgJWVheA0KCWFkZGwJX19pbXBfX2ZvbzIsICVlYXgNCgltb3ZsCSVlYXgs IC00KCVlYnApDQoJbW92bAktNCglZWJwKSwgJWVheA0KCW1vdmwJKCVlYXgpLCAlZWF4DQoJb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