public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/63837] [5 Regression] r217391 causes kernel build errors with GCC_COMPARE_DEBUG=1 Date: Thu, 13 Nov 2014 13:49:00 -0000 [thread overview] Message-ID: <bug-63837-4-n4ddxdluRY@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-63837-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63837 --- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- (In reply to Manuel López-Ibáñez from comment #6) > Thanks for the testcase. It seems that the GCC_COMPARE_DEBUG=0 uses a > temporary file > > ./cc1 -quiet -iprefix > /home/manuel/test1/217394M/build/gcc/../lib/gcc/x86_64-unknown-linux-gnu/5.0. > 0/ -isystem ./include -isystem ./include-fixed /dev/null -quiet -dumpbase > null "-mtune=generic" "-march=x86-64" -auxbase null -Wpointer-sign > "-fcompare-debug=-gtoggle" "-frandom-seed=0x6daada6b94b95048" > "-fdump-final-insns=/tmp/cc3xSGvK.gkd" -o /tmp/cc3L00jg.s > > but the GCC_COMPARE_DEBUG=1 uses /dev/null: > > ./cc1 -quiet -iprefix > /home/manuel/test1/217394M/build/gcc/../lib/gcc/x86_64-unknown-linux-gnu/5.0. > 0/ -isystem ./include -isystem ./include-fixed /dev/null -quiet -dumpbase > null.gk "-mtune=generic" "-march=x86-64" -auxbase null -gtoggle > -Wpointer-sign -w "-fcompare-debug=-gtoggle" -fcompare-debug-second -o > /dev/null "-frandom-seed=0x6daada6b94b95048" > "-fdump-final-insns=/tmp/ccMDEp8L.gk.gkd" > > which triggers the heuristic. I can simply ignore /dev/null when checking > for input==output. I'm testing this patch: > > Index: gcc.c > =================================================================== > --- gcc.c (revision 217457) > +++ gcc.c (working copy) > @@ -4047,11 +4047,12 @@ process_command (unsigned int decoded_op > read_cmdline_option (&global_options, &global_options_set, > decoded_options + j, UNKNOWN_LOCATION, > CL_DRIVER, &handlers, global_dc); > } > > - if (output_file && strcmp (output_file, "-")) > + if (output_file && strcmp (output_file, "-") > + && strcmp (output_file, HOST_BIT_BUCKET)) > { > int i; > for (i = 0; i < n_infiles; i++) > if ((!infiles[i].language || infiles[i].language[0] != '*') > && canonical_filename_eq (infiles[i].name, output_file)) > Index: toplev.c > =================================================================== > --- toplev.c (revision 217457) > +++ toplev.c (working copy) > @@ -940,11 +940,12 @@ init_asm_output (const char *name) > strcat (dumpname, ".s"); > asm_file_name = dumpname; > } > if (!strcmp (asm_file_name, "-")) > asm_out_file = stdout; > - else if (!canonical_filename_eq (asm_file_name, name)) > + else if (!canonical_filename_eq (asm_file_name, name) > + || !strcmp (asm_file_name, HOST_BIT_BUCKET)) > asm_out_file = fopen (asm_file_name, "w"); > else > /* Use fatal_error (UNKOWN_LOCATION) instead of just fatal_error to > prevent gcc from printing the first line in the current file. */ > fatal_error (UNKNOWN_LOCATION, > > If you can test it on your side, it would be helpful. Your patch fixes the issue. Thank you. >From gcc-bugs-return-466645-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 13 13:56:43 2014 Return-Path: <gcc-bugs-return-466645-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 30741 invoked by alias); 13 Nov 2014 13:56:43 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 30708 invoked by uid 48); 13 Nov 2014 13:56:39 -0000 From: "robert.suchanek at imgtec dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/63823] [5.0 Regression] MIPS will not build due to LRA ICE with 64 bit ABI Date: Thu, 13 Nov 2014 13:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: robert.suchanek at imgtec dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: <bug-63823-4-2ACP9HnGhN@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-63823-4@http.gcc.gnu.org/bugzilla/> References: <bug-63823-4@http.gcc.gnu.org/bugzilla/> 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-11/txt/msg01117.txt.bz2 Content-length: 1753 https://gcc.gnu.org/bugzilla/show_bug.cgi?idc823 --- Comment #5 from Robert Suchanek <robert.suchanek at imgtec dot com> --- It appears that enabling the debug info can trigger the ICE. In the testcase, after the patch, an instruction 1136 gets deleted and all references to pseudo 704 meant to be updated. The following change in process_bb_lives () triggers the assertion later in the pass. + EXECUTE_IF_SET_IN_BITMAP + (&lra_reg_info[dst_regno].insn_bitmap, 0, uid, bi) + { + insn = lra_insn_recog_data[uid]->insn; + lra_substitute_pseudo_within_insn (insn, dst_regno, + SET_SRC (set)); + lra_update_insn_regno_info (insn); + } On the first iteration, the list of insns using pseudo 704 is correct: (gdb) call debug_bitmap(&lra_reg_info[704].insn_bitmap) first = 0x188b720 current = 0x188b770 indx = 3 0x188b720 next = 0x188b770 prev = (nil) indx = 2 bits = { 343 } 0x188b770 next = (nil) prev = 0x188b720 indx = 3 bits = { 384 } Insn 343 gets updated, pseudo 704 is replaced with original pseudo 234. However, the call to lra_update_insn_regno_info destroys the remaining references to pseudo 704 via invalidate_insn_data_regno_info so we end up with the following: (gdb) call debug_bitmap(&lra_reg_info[704].insn_bitmap) first = 0x1855770 current = 0x1855770 indx = 3 0x1855770 next = (nil) prev = (nil) indx = 3 bits = { 384 } The next iteration(s) in EXECUTE_IF_SET_IN_BITMAP will not happen as bmp_iter_set () returns false. Insn 384 is left unchanged and the compiler fails later on assertion.
next prev parent reply other threads:[~2014-11-13 13:49 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-11-12 18:07 [Bug driver/63837] New: " trippels at gcc dot gnu.org 2014-11-12 23:56 ` [Bug driver/63837] " manu at gcc dot gnu.org 2014-11-13 2:41 ` trippels at gcc dot gnu.org 2014-11-13 2:47 ` pinskia at gcc dot gnu.org 2014-11-13 9:21 ` rguenth at gcc dot gnu.org 2014-11-13 9:57 ` trippels at gcc dot gnu.org 2014-11-13 13:36 ` manu at gcc dot gnu.org 2014-11-13 13:49 ` trippels at gcc dot gnu.org [this message] 2014-11-15 7:11 ` pinskia at gcc dot gnu.org 2014-11-15 11:16 ` manu at gcc dot gnu.org 2014-11-16 22:03 ` trippels at gcc dot gnu.org 2014-11-17 21:24 ` jakub at gcc dot gnu.org 2014-11-19 15:34 ` manu at gcc dot gnu.org 2014-11-19 15:40 ` trippels at gcc dot gnu.org 2014-11-19 16:38 ` jakub at gcc dot gnu.org 2014-11-19 18:12 ` jakub at gcc dot gnu.org 2014-11-19 18:38 ` trippels at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-63837-4-n4ddxdluRY@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).