__attribute__((dllimport)) on func defn gives internal error

Olly Betts olly@muscat.co.uk
Thu Jul 1 04:19:00 GMT 1999


If I try to compile this one line C source file:

__attribute__((dllimport)) int foo(int x) { return 0; }

with egcs 1.1.2 (built as a linux->mingw cross compiler) I get:

../../gcc/toplev.c:3859: Internal compiler error in function rest_of_compilation

My example code is clearly nonsense - dllimport only makes sense on a
declaration, not a definition (I encountered this when I had dllexport and
dllimport switched in my header file).  But this shouldn't result in an
internal compiler error.

Cheers,
Olly


More information about the Gcc-bugs mailing list