This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/12499] New: [tree-ssa] static variables in inline functions not emitted
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Oct 2003 09:51:29 -0000
- Subject: [Bug optimization/12499] New: [tree-ssa] static variables in inline functions not emitted
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12499
Summary: [tree-ssa] static variables in inline functions not
emitted
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: falk at debian dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: alphaev68-unknown-linux-gnu
GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu
falk@juist:/tmp% cat test.i
static inline int f() { static int r; return r++; }
int g() { return f(); }
int main() { }
falk@juist:/tmp% gcc -O2 -v test.i
Reading specs from
/usr/local/stow/gcc-tree-ssa-2003.10.01/bin/../lib/gcc/alphaev68-unknown-linux-gnu/3.5-tree-ssa/specs
Configured with: ../configure --disable-nls --enable-languages=c++
Thread model: posix
gcc version 3.5-tree-ssa 20030930 (merged 20030923)
/usr/local/stow/gcc-tree-ssa-2003.10.01/bin/../libexec/gcc/alphaev68-unknown-linux-gnu/3.5-tree-ssa/cc1 -fpreprocessed test.i -quiet -dumpbase test.i -mcpu=ev67 -auxbase test -O2 -version -o /tmp/ccKpbcUh.s
GNU C version 3.5-tree-ssa 20030930 (merged 20030923) (alphaev68-unknown-linux-gnu)
compiled by GNU C version 3.4 20030923 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
as -no-mdebug -o /tmp/ccth2Hci.o /tmp/ccKpbcUh.s
/usr/local/stow/gcc-tree-ssa-2003.10.01/bin/../libexec/gcc/alphaev68-unknown-linux-gnu/3.5-tree-ssa/collect2 --eh-frame-hdr -m elf64alpha -O3 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /usr/local/stow/gcc-tree-ssa-2003.10.01/bin/../lib/gcc/alphaev68-unknown-linux-gnu/3.5-tree-ssa/crtbegin.o -L/usr/local/stow/gcc-tree-ssa-2003.10.01/bin/../lib/gcc/alphaev68-unknown-linux-gnu/3.5-tree-ssa -L/usr/local/stow/gcc-tree-ssa-2003.10.01/bin/../lib/gcc -L/usr/local/lib/gcc/alphaev68-unknown-linux-gnu/3.5-tree-ssa -L/usr/local/stow/gcc-tree-ssa-2003.10.01/bin/../lib/gcc/alphaev68-unknown-linux-gnu/3.5-tree-ssa/../../.. -L/usr/local/lib/gcc/alphaev68-unknown-linux-gnu/3.5-tree-ssa/../../.. /tmp/ccth2Hci.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /usr/local/stow/gcc-tree-ssa-2003.10.01/bin/../lib/gcc/alphaev68-unknown-linux-gnu/3.5-tree-ssa/crtend.o /usr/lib/crtn.o
/tmp/ccth2Hci.o(.text+0x8): In function `g':
: undefined reference to `r.0'
/tmp/ccth2Hci.o(.text+0xc): In function `g':
: undefined reference to `r.0'
/tmp/ccth2Hci.o(.text+0x14): In function `g':
: undefined reference to `r.0'
collect2: ld returned 1 exit status