This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: LTO and C99 inline functions broken (was: Type-generic macros with C)
- From: Ian Lance Taylor <iant at google dot com>
- To: JÃrg Leis <joerg at joergleis dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 11 Jul 2010 11:29:14 -0700
- Subject: Re: LTO and C99 inline functions broken (was: Type-generic macros with C)
- References: <1272643259.4438.39.camel@maria> <mcrljc4onal.fsf@dhcp-172-17-9-151.mtv.corp.google.com> <1272657309.4438.50.camel@maria> <mcr4oisod3q.fsf@dhcp-172-17-9-151.mtv.corp.google.com> <1272701167.4212.8.camel@maria> <mcr39ybmu81.fsf@dhcp-172-17-9-151.mtv.corp.google.com> <1278759244.6984.39.camel@maria>
JÃrg Leis <joerg@joergleis.com> writes:
> The problem seemed to have gone for a while, but I have a test case now:
>
> inline int f()
> {
> return 5;
> }
>
> extern inline int f();
>
> With
>
> gcc -std=c99 -c test.c
>
> it compiles just fine and emits the an externally callable definition
> of f. However, with LTO,
>
> gcc -std=c99 -flto -c test.c
>
> the function f is not emitted. The GCC version is "gcc (GCC) 4.5.0
> 20100610 (prerelease)".
This looks like a bug. Can you report it as described at
http://gcc.gnu.org/bugs ? Thanks.
Ian