------- Additional Comments From hjl at lucon dot org  2004-11-24 21:31 -------
I am not sure why it shouldn't work. Given

static void
foo_internal ()
{
}

extern void (*foo) ();
void
xxx ()
{
  foo = &foo_internal;
}

void
bar ()
{
  foo_internal ();
}

Gcc 4.0 has no problems inlining foo_internal and emitting its body at the
same time. The only difference here is the address of foo_internal vs. an
external alias of foo_internal. In fact, gcc 4.0 does the right thing for

static void
foo_internal ()
{
}

extern void (*foo) ();
void
xxx ()
{
  foo = &foo_internal;
}

extern __typeof (foo_internal) work __attribute__ ((alias ("foo_internal")));

void
bar ()
{
  foo_internal ();
}

Gcc 4.0 has to do inlining and emitting body of a static functon anyway. How
to make it to work with external alias?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15700

Reply via email to