[Bug c/60515] New: Compiler crash with -g and -mpoke-function-name option combined
eblot.ml at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Mar 13 11:06:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60515
Bug ID: 60515
Summary: Compiler crash with -g and -mpoke-function-name option
combined
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: eblot.ml at gmail dot com
When building XZ 5.0 decoder, GCC pre-4.9.0 crashes with two distinct files
(out of a project with hundreds of files compiled with the very same command
line option).
The error is:
$ /usr/local/opt/arm-eabi-gcc49/bin/arm-eabi-gcc-4.9.0 -mcpu=arm7tdmi-s -g
-mpoke-function-name -o demo.o -c demo.c
demo.c: In function ‘xz_dec_end’:
demo.c:19:1: internal compiler error: in dwarf2out_frame_debug_adjust_cfa, at
dwarf2cfi.c:1090
}
^
demo.c:19:1: internal compiler error: Abort trap: 6
arm-eabi-gcc-4.9.0: internal compiler error: Abort trap: 6 (program cc1)
Abort trap: 6
GCC version:
$ arm-eabi-gcc-4.9.0 --version
arm-eabi-gcc-4.9.0 (SDK2-Legolas) 4.9.0 20140309 (experimental)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Note: It is an EABI target, not the GNUEABI version.
It has been built an executed on OS X 10.9.2, with GCC 4.8 [gcc-4.8 (GCC)
4.8.2]
with newlib 2.0.0 as the target libraries (./newlib and ./libgloss)
and binutils 2.24 for the target binutils.
Configure command line:
../configure --prefix=${prefix}
--target=arm-eabi
--disable-shared
--with-gnu-as
--with-gnu-ld
--with-newlib
--enable-softfloat
--disable-bigendian
--disable-fpu
--disable-underscore
--enable-multilibs
--with-float=soft
--enable-interwork
--enable-lto
--with-multilib
--with-abi=aapcs
--enable-languages=c,c++
--with-gmp=${gmp_prefix}
--with-mpfr=${mpfr_prefix}
--with-mpc=${libmpc_prefix}
--with-cloog=${cloog_prefix}
--enable-cloog-backend=isl
--with-isl=${isl_prefix}
--with-libelf=${libelf_prefix}
--with-gxx-include-dir=${prefix}/arm-eabi/include
--disable-debug
--disable-__cxa_atexit
I've shrunk the content of the source file that triggers the bug to the minimal
possible size.
I also removed all the command line options to the simplest possible options.
demo.c:
struct xz_dec_lzma2;
struct xz_dec_bcj;
struct xz_dec
{
struct xz_dec_lzma2 *lzma2;
struct xz_dec_bcj *bcj;
};
void xz_dec_end(struct xz_dec *s);
void xz_dec_lzma2_end(struct xz_dec_lzma2 *s);
void free(void * p);
void xz_dec_end(struct xz_dec *s)
{
xz_dec_lzma2_end(s->lzma2);
free(s->bcj);
}
command line triggering the crash:
arm-eabi-gcc-4.9.0 -mcpu=arm7tdmi-s -g -mpoke-function-name -o demo.o -c
demo.c
removing "-g" OR "-mpoke-function-name" builds the output file Ok, no crash.
Let me know if you need any other piece of information.
More information about the Gcc-bugs
mailing list