This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/60028] TIC6X: B3 register (return address) is saved on stack when real call is replaced with sibling call in a leaf function
- From: "wojtek.golf at interia dot pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 09 Feb 2014 00:24:26 +0000
- Subject: [Bug target/60028] TIC6X: B3 register (return address) is saved on stack when real call is replaced with sibling call in a leaf function
- Auto-submitted: auto-generated
- References: <bug-60028-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60028
Wojciech Migda <wojtek.golf at interia dot pl> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |tic6x-none-elf
Host| |Linux wmigda-desktop
| |3.11.0-13-generic
| |#20-Ubuntu SMP Wed Oct 23
| |17:26:33 UTC 2013 i686 i686
| |i686 GNU/Linux
Version|4.8.2 |4.9.0
Build| |tic6x-none-elf-gcc (GCC)
| |4.9.0 20140208
| |(experimental)
--- Comment #1 from Wojciech Migda <wojtek.golf at interia dot pl> ---
I have recreated the scenario on the latest 4.9.0 shanpshot, hence the changes
in the headline/description.
=================================================================================
Exact version of gcc:
tic6x-none-elf-gcc (GCC) 4.9.0 20140208 (experimental)
================================================================================
System type:
Linux wmigda-desktop 3.11.0-13-generic #20-Ubuntu SMP Wed Oct 23 17:26:33 UTC
2013 i686 i686 i686 GNU/Linux
================================================================================
Options given when gcc was built:
export TRIPLET=tic6x-none-elf
mkdir -pv ${X_BUILD_DIR}/gcc-${GCC_VER}-build-pass-1/
pushd ${X_BUILD_DIR}gcc-${GCC_VER}-build-pass-1/ && \
RANLIB_FOR_TARGET=${CXTOOLS}bin/${TRIPLET}-ranlib
AS_FOR_TARGET=${CXTOOLS}bin/${TRIPLET}-as
AR_FOR_TARGET=${CXTOOLS}bin/${TRIPLET}-ar \
AS=as AR=ar LDFLAGS='-lstdc++ -lm' ../../../../gcc/configure \
--prefix=${C_TOOLS} \
--build=$(gcc -dumpmachine) \
--host=$(gcc -dumpmachine) \
--target=${TRIPLET} \
--with-local-prefix=${CXTOOLS}${TRIPLET}/sysroot \
--with-sysroot=${CXTOOLS}${TRIPLET}/sysroot \
--disable-nls \
--disable-shared \
--without-headers \
--with-newlib \
--disable-decimal-float \
--disable-libgomp \
--disable-libmudflap \
--disable-libssp \
--disable-libatomic \
--disable-libquadmath \
--disable-threads \
--enable-languages=c \
--disable-multilib \
--with-mpfr=${C_TOOLS} \
--with-gmp=${C_TOOLS} \
--disable-__cxa_atexit \
--disable-sjlj-exceptions \
--enable-target-optspace \
--disable-libstdcxx-pch \
; popd
================================================================================
Commandline:
tic6x-none-elf-gcc -fleading-underscore -march=c674x -O2 -g0 -S main.c
================================================================================
Compiler output:
nothing one the console
================================================================================
Preprocessed file:
# 1 "main.c"
# 1 "<command-line>"
# 1 "main.c"
int e_fun(int arg);
extern int e_int;
void g_fun(void)
{
e_fun(e_int);
}
================================================================================