egcs-1.0 on mingw32/possibly cygwin32 regression
Andrew Zabolotny
bit@freya.etu.ru
Thu Jan 8 01:44:00 GMT 1998
Hello everybody!
The mingw32 egcs-1.0 port and possibly cygnus-win32 egcs-1.0 (since first
is
heavily based on second) has the following problem:
The program:
---------------
#include <stdio.h>
static __attribute__ ((stdcall)) BlackHole(int a);
void doit()
{
BlackHole(1);
}
static __attribute__ ((stdcall)) BlackHole(int a)
{
printf("disappearing function! %d\n", a);
}
int main()
{
doit();
return (0);
}
---------------
does not compile correctly with -O3. However, it compiles okay if the
-fkeep-inline-functions or with -fno-inline-functions switch was
specified.
The problem is that the BlackHole function is for some reason marked
as 'inline' but instead of inlining its code the compiler puts a
'call BlackHole@4' anyway, but the actual function code is totally
missing.
This problem is not present with gcc-2.7.2 from cygwin32.
I've did not tracked the problem, but I think it's related to the
ENCODE_SECTION_INFO macro in cygwin32.h (the name of function changes
and compiler detects by name whenever the function is inline??? nonsense)
Greetings,
_\ndy@teamOS/2
More information about the Gcc
mailing list