http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54122
--- Comment #2 from Giel de Nijs <giel.de.nijs at actian dot com> 2013-01-30 20:05:52 UTC --- Created attachment 29310 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29310 Another reproduction Minimal test case based on actual code that's compiling correctly with both gcc 4.6.3 as well as Visual Studio. $ /opt/gcc-4.8/bin/g++ -v -save-temps -std=c++11 foo.cpp Using built-in specs. COLLECT_GCC=/opt/gcc-4.8/bin/g++ COLLECT_LTO_WRAPPER=/opt/gcc-4.8/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ./configure --prefix=/opt/gcc-4.8 Thread model: posix gcc version 4.8.0 20130127 (experimental) (GCC) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /opt/gcc-4.8/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus -E -quiet -v -D_GNU_SOURCE foo.cpp -mtune=generic -march=x86-64 -std=c++11 -fpch-preprocess -o foo.ii ignoring nonexistent directory "/opt/gcc-4.8/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../x86_64-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /opt/gcc-4.8/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0 /opt/gcc-4.8/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/x86_64-unknown-linux-gnu /opt/gcc-4.8/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/backward /opt/gcc-4.8/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include /usr/local/include /opt/gcc-4.8/include /opt/gcc-4.8/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include-fixed /usr/include End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /opt/gcc-4.8/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus -fpreprocessed foo.ii -quiet -dumpbase foo.cpp -mtune=generic -march=x86-64 -auxbase foo -std=c++11 -version -o foo.s GNU C++ (GCC) version 4.8.0 20130127 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.8.0 20130127 (experimental), GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU C++ (GCC) version 4.8.0 20130127 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.8.0 20130127 (experimental), GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: e8e88d7616898e4a81392bc45bc1dc95 foo.cpp: In lambda function: foo.cpp:15:12: internal compiler error: Segmentation fault if(e == enum_0) ^ 0xa7db9f crash_signal ../.././gcc/toplev.c:332 0x692c80 lvalue_kind(tree_node const*) ../.././gcc/cp/tree.c:146 0x6932a0 lvalue_kind(tree_node const*) ../.././gcc/cp/tree.c:101 0x693808 lvalue_p(tree_node const*) ../.././gcc/cp/tree.c:267 0x4fd710 standard_conversion ../.././gcc/cp/call.c:1102 0x503cf3 implicit_conversion ../.././gcc/cp/call.c:1694 0x5075d3 build_builtin_candidate ../.././gcc/cp/call.c:2151 0x508b60 add_builtin_candidates ../.././gcc/cp/call.c:2818 0x513e3b build_new_op_1 ../.././gcc/cp/call.c:5177 0x514c57 build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int) ../.././gcc/cp/call.c:5444 0x626962 build_x_binary_op(unsigned int, tree_code, tree_node*, tree_code, tree_node*, tree_code, tree_node**, int) ../.././gcc/cp/typeck.c:3686 0x606b15 cp_parser_binary_expression ../.././gcc/cp/parser.c:7476 0x606e45 cp_parser_assignment_expression ../.././gcc/cp/parser.c:7584 0x608c42 cp_parser_expression ../.././gcc/cp/parser.c:7735 0x617a32 cp_parser_condition ../.././gcc/cp/parser.c:9410 0x5ff4c2 cp_parser_selection_statement ../.././gcc/cp/parser.c:9187 0x5ff4c2 cp_parser_statement ../.././gcc/cp/parser.c:8756 0x60067e cp_parser_statement_seq_opt ../.././gcc/cp/parser.c:9133 0x601bb5 cp_parser_lambda_body ../.././gcc/cp/parser.c:8647 0x601bb5 cp_parser_lambda_expression ../.././gcc/cp/parser.c:8188 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.