This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Mingw-users] Compiling ACE 5.3 testcase Service_Config_DLL.cpp causes ICE using MinGW under cygwin
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- To: mhcox at bluezoosoftware dot com, ACE Bugs <ace-bugs at cs dot wustl dot edu>
- Cc: GCC Bugs <gcc-bugs at gcc dot gnu dot org>, MinGW Users <mingw-users at lists dot sourceforge dot net>
- Date: Tue, 28 Jan 2003 08:27:16 +1100 (EST)
- Subject: Re: [Mingw-users] Compiling ACE 5.3 testcase Service_Config_DLL.cpp causes ICE using MinGW under cygwin
This is related to PR's 8841 and 9237 (and possibly others) where a function
declared as dllimport is used and, later. defined.
Danny
--- "Michael H. Cox" <mhcox@bluezoosoftware.com> wrote: > Below is an ACE
problem report containing all the pertinent information.
> The distilled code produces an internal compiler error in g++, so I assume
> the bug is primarily in GCC. There is some strangeness in the ACE code that
> *defines* a function as a dllimport when it probably should be a dllexport.
> See below for the details...
>
<snip>
REPEAT BY:
> Compiling the following source distilled from Service_Config_DLL.cpp
> will
> cause an ICE using the command line "g++ ICE.cpp":
> // ICE.cpp: Distilled version of test case Service_Config_DLL.cpp from
> // ACE 5.3 that causes an ICE in g++ 3.2 mingw:
> // ICE.cpp: In function `void _make_Service_Config_DLL(void*)':
> // ICE.cpp:24: Internal compiler error in rest_of_compilation, at
> toplev.c:3491
> // Please submit a full bug report,
> // with preprocessed source if appropriate.
> // See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>
> extern "C"
> {
> __attribute__((dllimport)) void _make_Service_Config_DLL (void *);
> typedef void (*ACE_SERVICE_ALLOCATOR) (void *);
> }
>
> // Commenting out the line of code below changes ICE to a syntax error:
> // ICE.cpp:22: function `void _make_Service_Config_DLL(void*)' definition is
> marked dllimport
> ACE_SERVICE_ALLOCATOR alloc_ = &_make_Service_Config_DLL;
>
> // This should probably be __attribute__((dllexport)), but even changing it
> // still produces ICE.
> extern "C" __attribute__((dllimport))
> void _make_Service_Config_DLL (void *gobbler)
> {
> }
> //EOF
>
> SAMPLE FIX/WORKAROUND:
> N/A.
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> MinGW-users mailing list
> MinGW-users@lists.sourceforge.net
>
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
http://movies.yahoo.com.au - Yahoo! Movies
- What's on at your local cinema?