From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85737 invoked by alias); 2 Mar 2015 22:05:53 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 85619 invoked by uid 48); 2 Mar 2015 22:05:49 -0000 From: "doko at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65284] New: [5 Regression] ICE (segfault) on arm-linux-gnueabihf Date: Mon, 02 Mar 2015 22:05:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: doko at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg00207.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65284 Bug ID: 65284 Summary: [5 Regression] ICE (segfault) on arm-linux-gnueabihf Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: doko at gcc dot gnu.org r221115 on arm-linux-gnueabihf $ g++ -std=c++11 -c -O2 schema-parser.ii schema-parser.ii: In member function 'Maybe ParsedSchema::findNested() const': schema-parser.ii:45:21: internal compiler error: Segmentation fault Maybe ParsedSchema::findNested() const { ^ Please submit a full bug report, with preprocessed source if appropriate. $ gdb --args /usr/lib/gcc/arm-linux-gnueabihf/5/cc1plus -fpreprocessed schema-parser.ii -quiet -dumpbase schema-parser.ii -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -mtls-dialect=gnu -auxbase schema-parser -O2 -std=c++11 -version -fstack-protector-strong -Wformat -Wformat-security -o /tmp/ccABpp5w.s (gdb) bt #0 0x00346d52 in maybe_canonicalize_mem_ref_addr(tree_node**) () #1 0x0034ee4c in fold_stmt_1(gimple_stmt_iterator*, bool, tree_node* (*)(tree_node*)) () #2 0x0053bb56 in (anonymous namespace)::pass_forwprop::execute(function*) () #3 0x00434e5e in execute_one_pass(opt_pass*) () #4 0x00435148 in execute_pass_list_1(opt_pass*) [clone .constprop.59] () #5 0x00435152 in execute_pass_list_1(opt_pass*) [clone .constprop.59] () #6 0x00435180 in execute_pass_list(function*, opt_pass*) () #7 0x00298eb6 in cgraph_node::expand() () #8 0x0029a93c in symbol_table::compile() [clone .part.42] () #9 0x0029ab78 in symbol_table::finalize_compilation_unit() () #10 0x001a34e4 in cp_write_global_declarations() () #11 0x004aa082 in compile_file() () #12 0x001571a6 in toplev::main(int, char**) () #13 0x00157bf4 in main () $ cat schema-parser.ii namespace _ { template class NullableValue { public: T operator*(); NullableValue(T); }; } template class Maybe { public: Maybe(T t) : ptr(t) {} template auto map(Func f) -> Maybe { return f(*ptr); } _::NullableValue ptr; }; template class A { public: T *operator->(); }; typedef int uint64_t; class B { public: long getId(); }; class C { struct D; A impl; friend class ParsedSchema; }; class ParsedSchema { Maybe findNested() const; ParsedSchema(ParsedSchema, C); C *parser; B getProto() const; int raw; }; class F { public: Maybe lookup(uint64_t, int); ParsedSchema get(uint64_t); }; struct C::D { F compiler; }; Maybe ParsedSchema::findNested() const { int name; parser->impl->compiler.lookup(getProto().getId(), name) .map([this](uint64_t childId) { return ParsedSchema(parser->impl->compiler.get(childId), *parser); }); }