https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65463
Bug ID: 65463 Summary: ICE initializing struct member with long value casted from a pointer Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rajat.b at samsung dot com Created attachment 35060 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35060&action=edit Preprocessed source The attached code crashes the compiler with ICE --- cmd line --- $ g++ -v -Wall -Wextra -std=c++11 ~/gccbug.c -o ~/gccbug.elf -save-temps Using built-in specs. --- output --- COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/sarc/spa/tools/gcc-470/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-4.7.0/configure --prefix=/sarc/spa/tools/gcc-470/ --with-mpc=/sarc/spa/tools/gcc-470/ --with-mpfr=/sarc/spa/tools/gcc-470/ --with-gmp=/sarc/spa/tools/gcc-470/ : (reconfigured) ../gcc-4.7.0/configure --prefix=/sarc/spa/tools/gcc-470/ --with-mpc=/sarc/spa/tools/gcc-470/ --with-mpfr=/sarc/spa/tools/gcc-470/ --with-gmp=/sarc/spa/tools/gcc-470/ : (reconfigured) ../gcc-4.7.0/configure --enable-languates=c,c++ --prefix=/sarc/spa/tools/gcc-470/ --with-mpc=/sarc/spa/tools/gcc-470/ --with-mpfr=/sarc/spa/tools/gcc-470/ --with-gmp=/sarc/spa/tools/gcc-470/ : (reconfigured) ../gcc-4.7.0/configure --enable-languages=c,c++ --prefix=/sarc/spa/tools/gcc-470/ --with-mpc=/sarc/spa/tools/gcc-470/ --with-mpfr=/sarc/spa/tools/gcc-470/ --with-gmp=/sarc/spa/tools/gcc-470/ Thread model: posix gcc version 4.7.0 (GCC) COLLECT_GCC_OPTIONS='-v' '-Wall' '-Wextra' '-std=c++11' '-o' '/sarc/spa/users/rbhatia/gccbug.elf' '-save-temps' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /sarc/spa/tools/gcc-470/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/cc1plus -E -quiet -v -D_GNU_SOURCE /sarc/spa/users/rbhatia/gccbug.c -mtune=generic -march=x86-64 -std=c++11 -Wall -Wextra -fpch-preprocess -o gccbug.ii ignoring nonexistent directory "/sarc/spa/tools/gcc-470/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../x86_64-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /sarc/spa/tools/gcc-470/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0 /sarc/spa/tools/gcc-470/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-unknown-linux-gnu /sarc/spa/tools/gcc-470/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward /sarc/spa/tools/gcc-470/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/include /usr/local/include /sarc/spa/tools/gcc-470/include /sarc/spa/tools/gcc-470/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/include-fixed /usr/include End of search list. COLLECT_GCC_OPTIONS='-v' '-Wall' '-Wextra' '-std=c++11' '-o' '/sarc/spa/users/rbhatia/gccbug.elf' '-save-temps' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /sarc/spa/tools/gcc-470/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/cc1plus -fpreprocessed gccbug.ii -quiet -dumpbase gccbug.c -mtune=generic -march=x86-64 -auxbase gccbug -Wall -Wextra -std=c++11 -version -o gccbug.s GNU C++ (GCC) version 4.7.0 (x86_64-unknown-linux-gnu) compiled by GNU C version 4.7.0, GMP version 5.0.4, MPFR version 2.4.2, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C++ (GCC) version 4.7.0 (x86_64-unknown-linux-gnu) compiled by GNU C version 4.7.0, GMP version 5.0.4, MPFR version 2.4.2, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: dc3dff120279c6d81f9102372c6feffa /sarc/spa/users/rbhatia/gccbug.c: In constructor ‘constexpr main()::host_type::host_type()’: /sarc/spa/users/rbhatia/gccbug.c:3:12: internal compiler error: in make_decl_rtl, at varasm.c:1141 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.