https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80171
Bug ID: 80171 Summary: ICE (Segmentation fault) with optimization Product: gcc Version: 6.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: D.Bahadir at GMX dot de Target Milestone: --- Created attachment 41041 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41041&action=edit Testcase that yields segmentation fault when optimizing. Compiling the attached (and reduced) test-case with any optimization yields a segmentation fault. Note however, that the original (non-reduced) test-case only segfault-ed with "-O3" enabled. The error: ---------- $ LANG=C /usr/bin/g++-6 -fpermissive -m64 -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++14 -O3 -DNDEBUG -fPIC -c -w testcase.i -o /dev/null testcase.i: In function 'void padis::isislistener::test()': testcase.i:858:6: internal compiler error: Segmentation fault void test() { ^~~~ 0xad48ef crash_signal ../../src/gcc/toplev.c:333 0xde8f98 generic_simplify_VIEW_CONVERT_EXPR /build/gcc-6-_9B9T1/gcc-6-6.2.0/build/gcc/generic-match.c:7580 0xde8f98 generic_simplify(unsigned int, tree_code, tree_node*, tree_node*) /build/gcc-6-_9B9T1/gcc-6-6.2.0/build/gcc/generic-match.c:9055 0x89a9cb fold_unary_loc(unsigned int, tree_code, tree_node*, tree_node*) ../../src/gcc/fold-const.c:7704 0x8cd81c fold_ctor_reference(tree_node*, tree_node*, unsigned long, unsigned long, tree_node*) ../../src/gcc/gimple-fold.c:5508 0x8cdafa fold_array_ctor_reference ../../src/gcc/gimple-fold.c:5415 0x8cdafa fold_ctor_reference(tree_node*, tree_node*, unsigned long, unsigned long, tree_node*) ../../src/gcc/gimple-fold.c:5533 0x8cde81 fold_const_aggregate_ref_1(tree_node*, tree_node* (*)(tree_node*)) ../../src/gcc/gimple-fold.c:5641 0x8ce94d gimple_fold_stmt_to_constant_1(gimple*, tree_node* (*)(tree_node*), tree_node* (*)(tree_node*)) ../../src/gcc/gimple-fold.c:5119 0xc16396 try_to_simplify ../../src/gcc/tree-ssa-sccvn.c:3634 0xc16396 visit_use ../../src/gcc/tree-ssa-sccvn.c:3687 0xc184b5 process_scc ../../src/gcc/tree-ssa-sccvn.c:3975 0xc184b5 extract_and_process_scc_for_name ../../src/gcc/tree-ssa-sccvn.c:4062 0xc184b5 DFS ../../src/gcc/tree-ssa-sccvn.c:4114 0xc18d17 sccvn_dom_walker::before_dom_children(basic_block_def*) ../../src/gcc/tree-ssa-sccvn.c:4596 0x1059e02 dom_walker::walk(basic_block_def*) ../../src/gcc/domwalk.c:265 0xc19b02 run_scc_vn(vn_lookup_kind) ../../src/gcc/tree-ssa-sccvn.c:4707 0xbf2d24 execute ../../src/gcc/tree-ssa-pre.c:4910 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions. The test-system: ---------------- $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial $ uname -a Linux My-Notebook 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux The compiler-version: --------------------- $ /usr/bin/g++-6 --version g++-6 (Ubuntu 6.2.0-3ubuntu11~16.04) 6.2.0 20160901 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.