http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48346
Summary: ICE when compiling a specific file with both -g and -flto Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassig...@gcc.gnu.org ReportedBy: m...@use.net Created attachment 23807 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23807 pre-processed source of the file that triggers the ICE When compiling the attached pre-processed with both -g and -flto, I get this ICE: /home/matt/src/bluecoat/scorpius/main/src/common/util/fdt/getopt_long.cpp: In function 'FDT::getopt_long(int, char* const*, char const*, FDT::option const*, int*, int&, bool, char*&, int&, int&, FDT::Stream&)': /home/matt/src/bluecoat/scorpius/main/src/common/util/fdt/getopt_long.cpp:119:1: internal compiler error: in lhd_set_decl_assembler_name, at langhooks.c:158 It happens at -O[0-3]. If I remove "-g" or the "-flto", the ICE disappears. here's the commandline I'm using: g++ -pipe -m64 -g -c -fpic -nostdinc -O0 -flto -fno-builtin-abort -fno-builtin-calloc -fno-builtin-exit -fno-builtin-free -fno-builtin-malloc -fno-builtin-realloc -fvisibility=default -fno-threadsafe-statics -Werror -I/home/matt/src/clueboat/porkius/main/src/include/libc -I/home/matt/src/clueboat/porkius/main/src/include/os -I/home/matt/src/clueboat/porkius/main/src/include/hal/x86_64 -I/home/matt/src/clueboat/porkius/main/src/include/hal -I/home/matt/src/clueboat/porkius/main/src/common/include -I/home/matt/src/clueboat/porkius/main/src/common/portability/shared/include -I/home/matt/src/clueboat/porkius/main/src/common/portability/shared/include -I/home/matt/src/clueboat/porkius/main/src/common/include -I/home/matt/src/clueboat/porkius/main/src/include/legacy -I/home/matt/src/clueboat/porkius/main/src/network/stack/sys -I/home/matt/src/clueboat/porkius/main/src/network/stack/local -I/home/matt/src/clueboat/porkius/main/src/network/stack/include -I/home/matt/src/clueboat/porkius/main/src/include/testing -I/home/matt/src/clueboat/porkius/toolchain/linux/x86_64_host/gcc-cross/x86_64_target/v4.6.0/x86_64-bcsi-sgos/include/c++/4.6.0 -I/home/matt/src/clueboat/porkius/toolchain/linux/x86_64_host/gcc-cross/x86_64_target/v4.6.0/x86_64-bcsi-sgos/include/c++/4.6.0/x86_64-bcsi-sgos -DOPENSSL_FIPS -DSGOS_ANY -DSGOS_NATIVE -DSGOS_porkius -DSGOS_SHARED -DSGOS_TARGET_NAME=x86_64 -D_UTIL_DLL -D__STDC_LIMIT_MACROS -DSGOS_SRC_ROOT="\"/home/matt/src/clueboat/porkius/main/src/common/util/\"" -c /home/matt/src/clueboat/porkius/main/src/common/util/fdt/getopt_long.cpp