This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/20167] New: static inlines discared while needed by alias
- From: "sxanth at ceid dot upatras dot gr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Feb 2005 15:04:54 -0000
- Subject: [Bug c/20167] New: static inlines discared while needed by alias
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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