[Bug c++/59271] New: a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59271 Bug ID: 59271 Summary: a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: darpeer at hotmail dot com void f(int n) { int a[n]; for (auto& i : a) { i = &i - a; } [&a] (auto m) { for (auto i : a) { cout << i << endl; } return m; }; } g++ -std=c++1y -ggdb3 -o a a.C a.C: In lambda function: a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315 for (auto i : a) ^ 0x74b642 strip_typedefs(tree_node*) ../../trunk/gcc/cp/tree.c:1315 0x74b221 strip_typedefs(tree_node*) ../../trunk/gcc/cp/tree.c:1190 0x5e1b22 canonicalize_type_argument ../../trunk/gcc/cp/pt.c:6231 0x6278f9 unify ../../trunk/gcc/cp/pt.c:17445 0x6301f8 unify_one_argument ../../trunk/gcc/cp/pt.c:16116 0x624fe9 type_unification_real ../../trunk/gcc/cp/pt.c:16188 0x638d02 do_auto_deduction(tree_node*, tree_node*, tree_node*) ../../trunk/gcc/cp/pt.c:21418 0x68e4b3 build_range_temp ../../trunk/gcc/cp/parser.c:10068 0x6c1ddb do_range_for_auto_deduction ../../trunk/gcc/cp/parser.c:10091 0x6c1ddb cp_parser_range_for ../../trunk/gcc/cp/parser.c:10046 0x6c1ddb cp_parser_for ../../trunk/gcc/cp/parser.c:9970 0x6c1ddb cp_parser_iteration_statement ../../trunk/gcc/cp/parser.c:10436 0x6a0259 cp_parser_statement ../../trunk/gcc/cp/parser.c:9297 0x6a1419 cp_parser_statement_seq_opt ../../trunk/gcc/cp/parser.c:9674 0x6a2b18 cp_parser_lambda_body ../../trunk/gcc/cp/parser.c:9178 0x6a2b18 cp_parser_lambda_expression ../../trunk/gcc/cp/parser.c:8693 0x6a2b18 cp_parser_primary_expression ../../trunk/gcc/cp/parser.c:4309 0x6a49e9 cp_parser_postfix_expression ../../trunk/gcc/cp/parser.c:5908 0x6a71c8 cp_parser_unary_expression ../../trunk/gcc/cp/parser.c:7109 0x6a7e5f cp_parser_binary_expression ../../trunk/gcc/cp/parser.c:7813 Please submit a full bug report, with preprocessed source if appropriate.
[Bug c++/59271] a.C:16:21: internal compiler error: in strip_typedefs, at cp/tree.c:1315
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59271 --- Comment #1 from darpeer at hotmail dot com --- #include using namespace std; void f(int n) { int a[n]; for (auto& i : a) { i = &i - a; } [&a] (auto m) { for (auto i : a) { cout << i << endl; } return m; }; } main() { f(12); }
[Bug c++/86099] New: internal compiler error: in cx_check_missing_mem_inits, at cp/constexpr.c:815
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86099 Bug ID: 86099 Summary: internal compiler error: in cx_check_missing_mem_inits, at cp/constexpr.c:815 Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: darpeer at hotmail dot com Target Milestone: ---
[Bug c++/86099] internal compiler error: in cx_check_missing_mem_inits, at cp/constexpr.c:815
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86099 --- Comment #1 from darpeer at hotmail dot com --- Created attachment 44255 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44255&action=edit Compresses source file. /tmp/file.prepro.cpp: In instantiation of ‘constexpr std::pair<_T1, _T2>::pair(std::pair<_T1, _T2>&&) [with _T1 = llvm::StringRef; _T2 = unsigned int]’: /tmp/file.prepro.cpp:3234:12: required from ‘struct std::__is_nt_constructible_impl, std::pair&&>’ /tmp/file.prepro.cpp:2621:12: required from ‘struct std::__and_, std::pair&&>, std::__is_nt_constructible_impl, std::pair&&> >’ /tmp/file.prepro.cpp:3244:12: required from ‘struct std::is_nothrow_constructible, std::pair&&>’ /tmp/file.prepro.cpp:3268:12: required from ‘struct std::__is_nothrow_move_constructible_impl, true>’ /tmp/file.prepro.cpp:3273:12: required from ‘struct std::is_nothrow_move_constructible >’ /tmp/file.prepro.cpp:2630:31: [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] /tmp/file.prepro.cpp:4422:12: required from ‘struct std::__move_if_noexcept_cond >’ /tmp/file.prepro.cpp:8568:26: required by substitution of ‘template _ReturnType std::__make_move_if_noexcept_iterator(_Tp*) [with _Tp = std::pair; _ReturnType = ]’ /tmp/file.prepro.cpp:12864:40: required from ‘_ForwardIterator std::__uninitialized_move_if_noexcept_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = std::pair*; _ForwardIterator = std::pair*; _Allocator = std::allocator >]’ /tmp/file.prepro.cpp:38837:6: required from ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const char*, unsigned int}; _Tp = std::pair; _Alloc = std::allocator >; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator*, std::vector > >; typename std::_Vector_base<_Tp, _Alloc>::pointer = std::pair*]’ /tmp/file.prepro.cpp:38560:4: required from ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {const char*, unsigned int}; _Tp = std::pair; _Alloc = std::allocator >]’ /tmp/file.prepro.cpp:105254:63: required from here /tmp/file.prepro.cpp:6644:12: internal compiler error: in cx_check_missing_mem_inits, at cp/constexpr.c:815 struct pair ^~~~ 0x5e955e cx_check_missing_mem_inits ../../../source/gcc/gcc/cp/constexpr.c:814 0x85af8c register_constexpr_fundef(tree_node*, tree_node*) ../../../source/gcc/gcc/cp/constexpr.c:874 0x899a02 maybe_save_function_definition ../../../source/gcc/gcc/cp/decl.c:15585 0x899a02 finish_function(bool) ../../../source/gcc/gcc/cp/decl.c:15716 0x8f0fea synthesize_method(tree_node*) ../../../source/gcc/gcc/cp/method.c:941 0x965ae3 instantiate_decl(tree_node*, bool, bool) ../../../source/gcc/gcc/cp/pt.c:24008 0x84d23f instantiate_cx_fn_r ../../../source/gcc/gcc/cp/constexpr.c:4833 0x112faab walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*)) ../../../source/gcc/gcc/tree.c:11406 0x11301cf walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*)) ../../../source/gcc/gcc/tree.c:11722 0x112f620 walk_tree_without_duplicates_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*)) ../../../source/gcc/gcc/tree.c:11748 0x85657d instantiate_constexpr_fns ../../../source/gcc/gcc/cp/constexpr.c:4852 0x85657d is_sub_constant_expr(tree_node*) ../../../source/gcc/gcc/cp/constexpr.c:5003 0x8c5397 check_noexcept_r ../../../source/gcc/gcc/cp/except.c:1044 0x112faab walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*)) ../../../source/gcc/gcc/tree.c:11406 0x112fe23 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*)) ../../../source/gcc/gcc/tree.c:11632 0x112f620 walk_tree_without_duplicates_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*)) ../../../source/gcc/gcc/tree.c:11748 0x8c4fdf expr_noexcept_p(tree_node*, int) ../../../source/gcc/gcc/cp/except.c:1122 0x8c5168 finish_noexcept_expr(tree_node*, int) ../../../source/gcc/gcc/cp/except.c
[Bug c++/82198] New: clang compile fails with g++ 8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82198 Bug ID: 82198 Summary: clang compile fails with g++ 8 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: darpeer at hotmail dot com Target Milestone: --- cd /extra/darse/llvm-svn/objects/tools/lld/ELF && /home/darse/ubuntu-17.04/bin/g++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/extra/darse/llvm-svn/objects/tools/lld/ELF -I/extra/darse/llvm-svn/llvm/tools/lld/ELF -I/extra/darse/llvm-svn/llvm/tools/lld/include -I/extra/darse/llvm-svn/objects/tools/lld/include -I/usr/include/libxml2 -I/extra/darse/llvm-svn/objects/include -I/extra/darse/llvm-svn/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections -O3 -DNDEBUG-fno-exceptions -fno-rtti -o CMakeFiles/lldELF.dir/MapFile.cpp.o -c /extra/darse/llvm-svn/llvm/tools/lld/ELF/MapFile.cpp /extra/darse/llvm-svn/llvm/tools/lld/ELF/MapFile.cpp: In lambda function: /extra/darse/llvm-svn/llvm/tools/lld/ELF/MapFile.cpp:99:33: internal compiler error: Segmentation fault OS << indent(2) << toString(*Syms[I]); 0xf4b50f crash_signal ../../../src/gcc/gcc/toplev.c:341 0x946e32 hash_table, tree_node*> >::hash_entry, xcallocator>::find_slot_with_hash(tree_node* const&, unsigned int, insert_option) ../../../src/gcc/gcc/hash-table.h:878 0x946ffc hash_map, tree_node*> >::put(tree_node* const&, tree_node* const&) ../../../src/gcc/gcc/hash-map.h:136 0xa47b29 register_local_specialization(tree_node*, tree_node*) ../../../src/gcc/gcc/cp/pt.c:1898 0xa47b29 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../../src/gcc/gcc/cp/pt.c:18142 0xa45aae tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../../src/gcc/gcc/cp/pt.c:17900 0xa45ee5 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../../src/gcc/gcc/cp/pt.c:17522 0xa46bd5 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../../src/gcc/gcc/cp/pt.c:17059 0xa46bd5 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../../src/gcc/gcc/cp/pt.c:17059 0xa4605d tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../../src/gcc/gcc/cp/pt.c:17538 0x9444eb fold_non_dependent_expr(tree_node*) ../../../src/gcc/gcc/cp/constexpr.c:4955 0xa393b1 build_non_dependent_expr(tree_node*) ../../../src/gcc/gcc/cp/pt.c:24944 0xabd582 build_x_binary_op(unsigned int, tree_code, tree_node*, tree_code, tree_node*, tree_code, tree_node**, int) ../../../src/gcc/gcc/cp/typeck.c:3954 0xa00fde cp_parser_binary_expression ../../../src/gcc/gcc/cp/parser.c:9271 0xa016a4 cp_parser_assignment_expression ../../../src/gcc/gcc/cp/parser.c:9404 0xa03d48 cp_parser_expression ../../../src/gcc/gcc/cp/parser.c:9573 0xa042e8 cp_parser_expression_statement ../../../src/gcc/gcc/cp/parser.c:11071 0xa0a9c3 cp_parser_statement ../../../src/gcc/gcc/cp/parser.c:10887 0xa0ba70 cp_parser_statement_seq_opt ../../../src/gcc/gcc/cp/parser.c:11214 0xa0c26e cp_parser_lambda_body ../../../src/gcc/gcc/cp/parser.c:10624 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.
[Bug c/66060] New: struct member allocation off.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66060 Bug ID: 66060 Summary: struct member allocation off. Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: darpeer at hotmail dot com Target Milestone: --- Using gdb, two struct members end up at the same offset. gcc (GCC) 6.0.0 20150418 (experimental) and older. gcc -c -O0 -ggdb3 struct-example.C cat struct-example.C struct ODD_S { char a[/*0x2000 */ 2097152]; char b[/*0x400 */ 536870912]; char c[/*0x8000 */ 33554432]; } l_; (gdb) p &l_.a $1 = (char (*)[2097152]) 0x0 (gdb) p &l_.b $2 = (char (*)[536870912]) 0x20 (gdb) p &l_.c $3 = (char (*)[33554432]) 0x20