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 tree-optimization/59779] [4.9 Regression] FAIL: gcc.dg/autopar/outer-1.c scan-tree-dump-times parloops "parallelizing outer loop" Date: Thu, 13 Mar 2014 10:31:00 -0000 [thread overview] Message-ID: <bug-59779-4-ZVNC967IRP@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-59779-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59779 --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The following fixes this for me: --- gcc/tree-dfa.c.jj 2014-01-03 11:40:57.000000000 +0100 +++ gcc/tree-dfa.c 2014-03-13 11:22:20.727848114 +0100 @@ -615,6 +615,15 @@ get_ref_base_and_extent (tree exp, HOST_ maxsize = -1; done: + if (bitsize < 0) + { + *poffset = 0; + *psize = -1; + *pmax_size = -1; + + return exp; + } + if (!bit_offset.fits_shwi ()) { *poffset = 0; @@ -645,6 +654,9 @@ get_ref_base_and_extent (tree exp, HOST_ maxsize = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (exp))) - hbit_offset; } + if (maxsize < 0) + maxsize = -1; + /* ??? Due to negative offsets in ARRAY_REF we can end up with negative bit_offset here. We might want to store a zero offset in this case. */ The problem is that the array is 0xbebc2000 bits long, and most of the places in get_ref_base_and_extent work with maxsize (and bitsize) as uhwi, so we can easily end up with negative, but not -1, maxsize (or bitsize), but callers obviously expect sizes to be positive or -1 (special magic value for unknown).
next prev parent reply other threads:[~2014-03-13 10:31 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-01-12 19:50 [Bug tree-optimization/59779] New: " danglin at gcc dot gnu.org 2014-01-12 19:50 ` [Bug tree-optimization/59779] " danglin at gcc dot gnu.org 2014-01-13 9:55 ` rguenth at gcc dot gnu.org 2014-03-12 13:55 ` jakub at gcc dot gnu.org 2014-03-13 1:39 ` dave.anglin at bell dot net 2014-03-13 8:44 ` jakub at gcc dot gnu.org 2014-03-13 10:31 ` jakub at gcc dot gnu.org [this message] 2014-03-13 11:33 ` jakub at gcc dot gnu.org 2014-03-13 19:10 ` jakub 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-59779-4-ZVNC967IRP@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).