http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56234
Bug #: 56234 Summary: Get "internal compiler error in dwarf2out_finish, at dwarf2out.c:18906" with -g option Classification: Unclassified Product: gcc Version: 4.4.3 Status: UNCONFIRMED Severity: major Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: jianjun...@spreadtrum.com the exact version of GCC & the options given when GCC was configured/built: $ ./arm-eabi-gcc -v Using built-in specs. Target: arm-eabi Configured with: /home/jingyu/projects/gcc/android-toolchainsrc/build/../gcc/gcc-4.4.3/configure --prefix=/usr/local --target=arm-eabi --host=x86_64-linux-gnu --build=x86_64-linux-gnu --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/home/jingyu/projects/gcc/toolchain_build/obj/temp-install --with-mpfr=/home/jingyu/projects/gcc/toolchain_build/obj/temp-install --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-shared --disable-tls --with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace --with-abi=aapcs --with-gcc-version=4.4.3 --with-binutils-version=2.19 --with-gmp-version=4.2.4 --with-mpfr-version=2.4.1 --with-gdb-version=7.1.x --with-arch=armv5te --with-multilib-list=mandroid --with-sysroot=/usr/local/google/home/android/cupcake_rel_root --program-transform-name='s&^&arm-eabi-&' Thread model: single gcc version 4.4.3 (GCC) the system type: $ uname -a Linux spreadtrum 2.6.38-16-generic #67-Ubuntu SMP Thu Sep 6 17:58:38 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux the complete command line that triggers the bug: $ arm-eabi-gcc -Wp,-MD,drivers/usb/gadget/.android.o.d -nostdinc -isystem /home/apuser/code/sprdroid4.1_3.4/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/../lib/gcc/arm-eabi/4.6.x-google/include -I/home/apuser/code/sprdroid4.1_3.4/kernel/arch/arm/include -Iarch/arm/include/generated -Iinclude -I/home/apuser/code/sprdroid4.1_3.4/kernel/include -include /home/apuser/code/sprdroid4.1_3.4/kernel/include/linux/kconfig.h -I/home/apuser/code/sprdroid4.1_3.4/kernel/drivers/usb/gadget -Idrivers/usb/gadget -D__KERNEL__ -mlittle-endian -I/home/apuser/code/sprdroid4.1_3.4/kernel/arch/arm/mach-sc/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -marm -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(android)" -D"KBUILD_MODNAME=KBUILD_STR(g_android)" -c -o drivers/usb/gadget/.tmp_android.o /home/apuser/code/sprdroid4.1_3.4/kernel/drivers/usb/gadget/android.c the compiler output (error messages, warnings, etc.): CC drivers/usb/gadget/android.o In file included from /home/apuser/code/sprdroid4.1_3.4/kernel/drivers/usb/gadget/android.c:49: /home/apuser/code/sprdroid4.1_3.4/kernel/drivers/usb/gadget/u_serial.c:141:1: warning: "pr_vdebug" redefined In file included from /home/apuser/code/sprdroid4.1_3.4/kernel/drivers/usb/gadget/android.c:46: /home/apuser/code/sprdroid4.1_3.4/kernel/drivers/usb/gadget/f_fs.c:40:1: warning: this is the location of the previous definition /home/apuser/code/sprdroid4.1_3.4/kernel/drivers/usb/gadget/android.c: In function 'mass_storage_support_luns_store': /home/apuser/code/sprdroid4.1_3.4/kernel/drivers/usb/gadget/android.c:905: warning: comparison between pointer and integer /home/apuser/code/sprdroid4.1_3.4/kernel/drivers/usb/gadget/android.c: At top level: /home/apuser/code/sprdroid4.1_3.4/kernel/drivers/usb/gadget/android.c:1311: warning: function declaration isn't a prototype /home/apuser/code/sprdroid4.1_3.4/kernel/drivers/usb/gadget/android.c:545: warning: 'acm_function' defined but not used /home/apuser/code/sprdroid4.1_3.4/kernel/drivers/usb/gadget/android.c:1684: internal compiler error: in dwarf2out_finish, at dwarf2out.c:18906 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.