public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: TROCHU Xavier <xtrochu@yahoo.com>
To: mmitchel@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: target/10431: improper __attribute__((dllimport)) handling
Date: Mon, 21 Apr 2003 22:26:00 -0000	[thread overview]
Message-ID: <20030421222601.26381.qmail@sources.redhat.com> (raw)

The following reply was made to PR target/10431; it has been noted by GNATS.

From: TROCHU Xavier <xtrochu@yahoo.com>
To: <mmitchel@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>,
  <gcc-gnats@gcc.gnu.org>
Cc:  
Subject: Re: target/10431: improper __attribute__((dllimport)) handling
Date: Mon, 21 Apr 2003 15:17:58 -0700 (PDT)

 I checked your patch and it shows the same behaviour
 as the previous one 
 (i.e. an incorrect behaviour).
 
 mainline can't be bootstrapped under mingw with this
 patch. Notice that
 stdout under mingw is declared really like this :
 extern __attribute__((dllimport)) FILE * _iob[1];
 and obviously,  this bug
 
 This is the test I tried again :
 ================= rtest.i =============
 
 extern __attribute__((dllimport)) int foo;
 extern __attribute__((dllimport)) int foo2[];
 
 int bar() {
     return foo;
 }
 
 int bar2(int i)  {
     int * p = &foo2[i];
     return *p;
 }
 ==================================
 with winnt.c reverted to version 1.42 (but with patch
 from 1.43 to 1.44 
 inserted) I get the following output,
 which is correct and the same as gcc 3.2.2
 ================= rtest.ori.s =========
     .file    "rtest.i"
     .text
 ..globl _bar
     .def    _bar;    .scl    2;    .type    32;   
 .endef
 _bar:
     pushl    %ebp
     movl    %esp, %ebp
     movl    __imp__foo, %eax
     movl    (%eax), %eax
     popl    %ebp
     ret
 ..globl _bar2
     .def    _bar2;    .scl    2;    .type    32;   
 .endef
 _bar2:
     pushl    %ebp
     movl    %esp, %ebp
     subl    $4, %esp
     movl    8(%ebp), %eax
     sall    $2, %eax
     addl    __imp__foo2, %eax
     movl    %eax, -4(%ebp)
     movl    -4(%ebp), %eax
     movl    (%eax), %eax
     leave
     ret
 ====================================
 with winnt.c version 1.45 (current) or 1.44 the output
 is as the following.
 ================== rtest.new.s ==========
     .file    "rtest.i"
     .text
 ..globl _bar
     .def    _bar;    .scl    2;    .type    32;   
 .endef
 _bar:
     pushl    %ebp
     movl    %esp, %ebp
     movl    __imp__foo, %eax
     popl    %ebp
     ret
 ..globl _bar2
     .def    _bar2;    .scl    2;    .type    32;   
 .endef
 _bar2:
     pushl    %ebp
     movl    %esp, %ebp
     subl    $4, %esp
     movl    8(%ebp), %eax
     leal    0(,%eax,4), %edx
     movl    $__imp__foo2, %eax
     addl    %edx, %eax
     movl    %eax, -4(%ebp)
     movl    -4(%ebp), %eax
     movl    (%eax), %eax
     leave
     ret
 ======================================
 
 I really would like to be able to help correcting this
 bug, but I really 
 lack a lot of knowledge of GCC internal for that.
 But if you think I can help you testing thing, don't
 hesitate to ask.
 
 Greetings,
 
 Xavier
 
 mmitchel@gcc.gnu.org wrote:
 
 >Synopsis: improper __attribute__((dllimport))
 handling
 >
 >State-Changed-From-To: open->closed
 >State-Changed-By: mmitchel
 >State-Changed-When: Mon Apr 21 20:59:27 2003
 >State-Changed-Why:
 >    Fixed in GCC 3.3, GCC 3.4.
 >
 >http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10431
 >
 >  
 >
 
 
 __________________________________________________
 Do you Yahoo!?
 The New Yahoo! Search - Faster. Easier. Bingo
 http://search.yahoo.com


             reply	other threads:[~2003-04-21 22:26 UTC|newest]

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

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=20030421222601.26381.qmail@sources.redhat.com \
    --to=xtrochu@yahoo.com \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=mmitchel@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).