public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux Date: Mon, 02 Jan 2012 13:53:00 -0000 [thread overview] Message-ID: <bug-51725-4-lWeWTiPxKS@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-51725-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725 --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-02 13:52:14 UTC --- Seems that canonical vs. non-canonical VALUEs are mixed up. In cselib_invalidate_mem, we don't terminate the loop: addr = cselib_lookup (XEXP (x, 0), VOIDmode, 0, GET_MODE (x)); mem_chain = &addr->addr_list; for (;;) { if ((*mem_chain)->elt == v) { unchain_one_elt_list (mem_chain); break; } mem_chain = &(*mem_chain)->next; } because v is here a canonical_cselib_val of (*mem_chain)->elt. We could perhaps compare here canonical_cselib_val ((*mem_chain)->elt) == v instead, or just canonicalizing the mem_elt value early when inserting it into addr_list/*_containing_mem fixes this too: --- gcc/cselib.c.jj 2012-01-01 19:54:46.000000000 +0100 +++ gcc/cselib.c 2012-01-02 14:46:51.180804640 +0100 @@ -1264,6 +1264,8 @@ add_mem_for_addr (cselib_val *addr_elt, { struct elt_loc_list *l; + mem_elt = canonical_cselib_val (mem_elt); + /* Avoid duplicates. */ for (l = mem_elt->locs; l; l = l->next) if (MEM_P (l->loc) ALex?
next prev parent reply other threads:[~2012-01-02 13:53 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-01-01 16:59 [Bug bootstrap/51725] New: " mikpe at it dot uu.se 2012-01-01 17:07 ` [Bug bootstrap/51725] " mikpe at it dot uu.se 2012-01-01 18:04 ` mikpe at it dot uu.se 2012-01-01 21:54 ` schwab@linux-m68k.org 2012-01-02 11:21 ` rguenth at gcc dot gnu.org 2012-01-02 13:48 ` jakub at gcc dot gnu.org 2012-01-02 13:53 ` jakub at gcc dot gnu.org [this message] 2012-01-02 14:59 ` jakub at gcc dot gnu.org 2012-01-02 22:17 ` jakub at gcc dot gnu.org 2012-01-02 22:20 ` jakub at gcc dot gnu.org 2012-01-03 8:56 ` krebbel at gcc dot gnu.org 2012-01-03 14:46 ` schwab@linux-m68k.org 2012-01-03 16:25 ` jakub at gcc dot gnu.org 2012-01-03 16:39 ` jakub at gcc dot gnu.org 2012-01-03 18:46 ` ubizjak at gmail dot com 2012-01-03 18:59 ` ro at gcc dot gnu.org 2012-01-03 20:56 ` rmansfield at qnx dot com 2012-01-03 20:58 ` jakub at gcc dot gnu.org 2012-01-03 21:02 ` jakub at gcc dot gnu.org 2012-01-03 21:25 ` rmansfield at qnx dot com 2012-01-03 21:46 ` mikpe at it dot uu.se 2012-01-07 21:38 ` aoliva 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-51725-4-lWeWTiPxKS@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).