From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18863 invoked by alias); 14 Sep 2014 15:42:57 -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 18821 invoked by uid 48); 14 Sep 2014 15:42:53 -0000 From: "trippels at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/62026] [4.9/5 Regression] Crash in lto_get_decl_name_mapping Date: Sun, 14 Sep 2014 15:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: ice-on-valid-code, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: trippels at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-09/txt/msg01627.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D62026 --- Comment #11 from Markus Trippelsdorf --- Thanks for the testcase. Reduced: markus@x4 /tmp % cat ErrorTry.ii template class B { public: T values; T operator[](int); }; class C; class D { public: int m_fn2(); virtual C *m_fn1(); }; class C : public D { public: virtual B *m_fn3(int); }; class F : D, C { B *offsets; B *m_fn3(int); }; B *F::m_fn3(int) { if (offsets) return 0; } void fn1(B &p1) { for (int i;;) { C *a =3D p1[0]->m_fn1(); a->m_fn2() && a->m_fn3(0); } } markus@x4 /tmp % g++ -flto -O3 -r -nostdlib ErrorTry.ii ErrorTry.ii:17:7: warning: direct base =E2=80=98D=E2=80=99 inaccessible in = =E2=80=98F=E2=80=99 due to ambiguity class F : D, C { ^ lto1: internal compiler error: Segmentation fault 0x943f9f crash_signal ../../gcc/gcc/toplev.c:340 0x843af8 lto_get_decl_name_mapping(lto_file_decl_data*, char const*) ../../gcc/gcc/lto-section-in.c:340 0x83ce96 copy_function_or_variable ../../gcc/gcc/lto-streamer-out.c:2163 0x83dae1 lto_output() ../../gcc/gcc/lto-streamer-out.c:2255 0x889701 write_lto ../../gcc/gcc/passes.c:2228 0x88cccb ipa_write_optimization_summaries(lto_symtab_encoder_d*) ../../gcc/gcc/passes.c:2425 0x55db6a do_stream_out ../../gcc/gcc/lto/lto.c:2463 0x55f849 stream_out ../../gcc/gcc/lto/lto.c:2505 0x55f849 lto_wpa_write_files ../../gcc/gcc/lto/lto.c:2642 0x568a94 do_whole_program_analysis ../../gcc/gcc/lto/lto.c:3310 0x568a94 lto_main() ../../gcc/gcc/lto/lto.c:3430 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. >>From gcc-bugs-return-461794-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Sep 14 15:57:09 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 22515 invoked by alias); 14 Sep 2014 15:57:09 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 22473 invoked by uid 48); 14 Sep 2014 15:57:04 -0000 From: "danglin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/61853] [4.9/5 Regression] ICE: SIGSEGV in store_field Date: Sun, 14 Sep 2014 15:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: danglin at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: 2014-09/txt/msg01628.txt.bz2 Content-length: 627 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61853 --- Comment #12 from John David Anglin --- I have a patch to pa_function_value that avoids the issue but I tend to think there is a bug in expand. This code typedef struct { double x; } sd_t; sd_t foo1 (double d) { sd_t s; s.x = d; return s; } results in the following gimple foo1 (double d) { struct sd_t D.1360; ;; basic block 2, loop depth 0 ;; pred: ENTRY MEM[(struct *)&D.1360] = d_2(D); return D.1360; ;; succ: EXIT } This gimple seems similar to that in comment #10 but it doesn't trigger the ICE.