public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* egcs-1.0 on mingw32/possibly cygwin32 regression
@ 1998-01-08  1:44 Andrew Zabolotny
  1998-01-09 20:45 ` [patch] " Mumit Khan
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Zabolotny @ 1998-01-08  1:44 UTC (permalink / raw)
  To: egcs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-01-14  4:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-08  1:44 egcs-1.0 on mingw32/possibly cygwin32 regression Andrew Zabolotny
1998-01-09 20:45 ` [patch] " Mumit Khan
1998-01-14  4:17   ` Jeffrey A Law

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).