public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Danny Smith <dannysmith@clear.net.nz> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c++/7103: Internal compiler error with mingw-gcc-3.1 Date: Thu, 19 Dec 2002 23:16:00 -0000 [thread overview] Message-ID: <20021220071602.666.qmail@sources.redhat.com> (raw) The following reply was made to PR c++/7103; it has been noted by GNATS. From: Danny Smith <dannysmith@clear.net.nz> To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, sym_phon5@hotmail.com, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org Cc: Subject: Re: c++/7103: Internal compiler error with mingw-gcc-3.1 Date: Fri, 20 Dec 2002 07:09:40 +0000 The ICE is still present in 3.2.1 and in 3.3 branch. A definition of a function previously declared as dllimport should override the dllimport attribute. This happened in 2.95 (with Mumit Khan's local patches to mingw distribution) but does not in 3.x. Here is a reduced test case: ================================================ /* dllimport.C */ /* Declare as import from dll */ extern __attribute__((dllimport)) void foo(void); /* Use it */ int bar(void) { foo(); } /* Define it. The definition should override the dllimport attribute */ void foo (void){} /* end dllimport.C */ =============================================== G++ -c dllimport.C D:\develop\bugs>G++ -c dllimport.C dllimport.C: In function `void foo()': dllimport.C:11: internal compiler error: in rest_of_compilation, at toplev.c: 3571 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. Note: If the definition of foo is seen _before_ it is used (as below), the dllimport attribute is lost and compilation is succesful. extern __attribute__((dllimport)) void foo(void); void foo (void){} int bar(void) { foo(); } http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=g cc&pr=7103
next reply other threads:[~2002-12-20 7:16 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-12-19 23:16 Danny Smith [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-12-19 23:56 Danny Smith 2002-12-19 18:48 bangerth 2002-06-23 19:36 sym_phon5
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=20021220071602.666.qmail@sources.redhat.com \ --to=dannysmith@clear.net.nz \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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: linkBe 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).