http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47301
Summary: [C++0x] ICE: in fold_convert_loc, at fold-const.c:1906 with -fabi-version=1 and constexpr Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 22969 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22969 reduced testcase (from g++.dg/cpp0x/constexpr-ex4.C) $ gcc -std=c++0x -fabi-version=1 testcase.C testcase.C:12:11: internal compiler error: in fold_convert_loc, at fold-const.c:1906 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. (gdb) bt #0 fancy_abort (file=0x124d888 "/mnt/svn/gcc-trunk/gcc/fold-const.c", line=1906, function=0x124cab0 "fold_convert_loc") at /mnt/svn/gcc-trunk/gcc/diagnostic.c:892 #1 0x000000000084bb9c in fold_convert_loc (loc=0, type=0x7ffff7ed9000, arg=<value optimized out>) at /mnt/svn/gcc-trunk/gcc/fold-const.c:1905 #2 0x00000000008564d9 in associate_trees (loc=0, t1=0x7ffff7ee51e0, t2=<value optimized out>, code=PLUS_EXPR, type=0x7ffff7ed9000) at /mnt/svn/gcc-trunk/gcc/fold-const.c:895 #3 0x00000000008261d8 in fold_binary_loc (loc=0, code=PLUS_EXPR, type=0x7ffff7ed9000, op0=<value optimized out>, op1=0x7ffff7ec34d8) at /mnt/svn/gcc-trunk/gcc/fold-const.c:10025 #4 0x0000000000842641 in fold_build2_stat_loc (loc=0, code=PLUS_EXPR, type=0x7ffff7ed9000, op0=0x7ffff7ff9150, op1=0x7ffff7ec34d8) at /mnt/svn/gcc-trunk/gcc/fold-const.c:13982 #5 0x0000000000825209 in fold_binary_loc (loc=0, code=PLUS_EXPR, type=0x7ffff7ed9000, op0=0x7ffff7ec34d8, op1=0x7ffff7ff9150) at /mnt/svn/gcc-trunk/gcc/fold-const.c:9404 #6 0x0000000000842641 in fold_build2_stat_loc (loc=0, code=PLUS_EXPR, type=0x7ffff7ed9000, op0=0x7ffff7ec34d8, op1=0x7ffff7ff9150) at /mnt/svn/gcc-trunk/gcc/fold-const.c:13982 #7 0x0000000000a17135 in layout_type (type=0x7ffff5d4a540) at /mnt/svn/gcc-trunk/gcc/stor-layout.c:2003 #8 layout_type (type=0x7ffff5d4a540) at /mnt/svn/gcc-trunk/gcc/stor-layout.c:1849 #9 0x00000000005f05f8 in complete_type (type=0x7ffff5d4a540) at /mnt/svn/gcc-trunk/gcc/cp/typeck.c:122 #10 complete_type (type=0x7ffff5d4a540) at /mnt/svn/gcc-trunk/gcc/cp/typeck.c:108 #11 0x00000000005344f5 in grokdeclarator (declarator=0x19088e0, declspecs=<value optimized out>, decl_context=<value optimized out>, initialized=0, attrlist=0x7fffffffd438) at /mnt/svn/gcc-trunk/gcc/cp/decl.c:9651 #12 0x00000000005acff3 in grokfield (declarator=<value optimized out>, declspecs=0x7fffffffd4c0, init=0x0, init_const_expr_p=1 '\001', asmspec_tree=0x0, attrlist=0x0) at /mnt/svn/gcc-trunk/gcc/cp/decl2.c:806 #13 0x00000000005e7b92 in cp_parser_member_declaration (parser=0x7ffff5d47108) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:18010 #14 0x00000000005ccaac in cp_parser_member_specification_opt (parser=0x7ffff5d47108, flags=<value optimized out>, decl_specs=0x7fffffffd780, is_declaration=1 '\001', declares_class_or_enum=0x7fffffffd718, is_cv_qualifier=<value optimized out>) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:17630 #15 cp_parser_class_specifier (parser=0x7ffff5d47108, flags=<value optimized out>, decl_specs=0x7fffffffd780, is_declaration=1 '\001', declares_class_or_enum=0x7fffffffd718, is_cv_qualifier=<value optimized out>) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:16948 #16 cp_parser_type_specifier (parser=0x7ffff5d47108, flags=<value optimized out>, decl_specs=0x7fffffffd780, is_declaration=1 '\001', declares_class_or_enum=0x7fffffffd718, is_cv_qualifier=<value optimized out>) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:12557 #17 0x00000000005ce288 in cp_parser_decl_specifier_seq (parser=0x7ffff5d47108, flags=1, decl_specs=0x7fffffffd780, declares_class_or_enum=0x7fffffffd7e8) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:9990 #18 0x00000000005e4a1b in cp_parser_single_declaration (parser=0x7ffff5d47108, checks=0x0, member_p=0 '\000', explicit_specialization_p=0 '\000', friend_p=0x7fffffffd84f "") at /mnt/svn/gcc-trunk/gcc/cp/parser.c:20042 #19 0x00000000005e4f86 in cp_parser_template_declaration_after_export (parser=0x7ffff5d47108, member_p=0 '\000') at /mnt/svn/gcc-trunk/gcc/cp/parser.c:19955 #20 0x00000000005e99da in cp_parser_declaration (parser=0x7ffff5d47108) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:9453 #21 cp_parser_declaration (parser=0x7ffff5d47108) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:9404 #22 0x00000000005e82da in cp_parser_declaration_seq_opt (parser=0x7ffff5d47108) at /mnt/svn/gcc-trunk/gcc/cp/parser.c:9383 #23 0x00000000005e9e29 in cp_parser_translation_unit () at /mnt/svn/gcc-trunk/gcc/cp/parser.c:3463 #24 c_parse_file () at /mnt/svn/gcc-trunk/gcc/cp/parser.c:25278 #25 0x00000000006be145 in c_common_parse_file () at /mnt/svn/gcc-trunk/gcc/c-family/c-opts.c:1071 #26 0x0000000000a21476 in compile_file (argc=15, argv=0x7fffffffdaa8) at /mnt/svn/gcc-trunk/gcc/toplev.c:579 #27 do_compile (argc=15, argv=0x7fffffffdaa8) at /mnt/svn/gcc-trunk/gcc/toplev.c:1874 #28 toplev_main (argc=15, argv=0x7fffffffdaa8) at /mnt/svn/gcc-trunk/gcc/toplev.c:1937 #29 0x00007ffff65f1bbd in __libc_start_main () from /lib/libc.so.6 #30 0x00000000004fa9d1 in _start () Tested revisions: r168785 - crash