[Bug c/20167] New: static inlines discared while needed by alias

sxanth at ceid dot upatras dot gr gcc-bugzilla@gcc.gnu.org
Wed Feb 23 18:39:00 GMT 2005


typescript of the problem:
######################################
stan@vaxatron:~/wtmp> cat gb2.c

static inline int foo ()
{
	return 123;
}

static inline int bar () __attribute__ ((alias ("foo")));

int main ()
{
	return bar ();
}
stan@vaxatron:~/wtmp> CVSgcc gb2.c
/tmp/ccWI7qQj.o: In function `main':
/tmp/ccWI7qQj.o(.text+0x1d): undefined reference to `foo'
collect2: ld returned 1 exit status
stan@vaxatron:~/wtmp> CVSgcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/home/stan/GCC/gcc-4.0-20050220/bin
--program-prefix=CVS : (reconfigured) ../configure
--prefix=/home/stan/GCC/gcc-4.0-20050220/bin --program-prefix=CVS
Thread model: posix
gcc version 4.0.0 20050220 (experimental)
###########################################

Seems to discard the function because it thinks it's unused.

-- 
           Summary: static inlines discared while needed by alias
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sxanth at ceid dot upatras dot gr
                CC: gcc-bugs at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list