I have confirmed this bug against 4.1.1 and 4.1.2 (4.1-20070115).
The attached program incorrectly sees h->b as 0x1000, instead of 0x0010 as it
should. I'm not sure if this is an endianness issue, but it only happens if
the stack is fairly complex. If I uncomment the align attribute, the program
outputs the correct value. My target CPU is a Marvell Feroceon, but any
arm926ejs should see this problem.
The toolchain was built using crosstool, using gcc-4.1.x and glibc 2.5. I can
supply anything necessary to build the toolchain.
arm-soft-oabi.dat:
KERNELCONFIG=`pwd`/arm-tls-oabi.config
TARGET=arm-926ejs-linux-gnu
GCC_EXTRA_CONFIG='--with-cpu=arm926ej-s --with-float=soft
"--enable-cxx-flags=-mcpu=arm926ej-s -msoft-float"'
GLIBC_EXTRA_CONFIG='--without-fp'
TARGET_CFLAGS=-O
gcc-4.1.x-glibc-2.5-nptl.dat:
BINUTILS_DIR=binutils-2.17.50.0.9
GCC_DIR=gcc-4.1-20070115
GLIBC_DIR=glibc-2.5
GLIBCPORTS_FILENAME=glibc-ports-2.5
GLIBC_ADDON_OPTIONS=ports,nptl
GDB_DIR=gdb-6.5
LINUX_DIR=linux-2.6.19.2
--
Summary: Deeply inlined static functions break stack creation
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sqrammi at hotmail dot com
GCC build triplet: arm-linux-gnu
GCC host triplet: i686-linux-gnu
GCC target triplet: arm-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30581