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 middle-end/58970] [4.7/4.8/4.9 Regression] internal compiler error: in get_bit_range, at expr.c:4562
Date: Mon, 04 Nov 2013 12:15:00 -0000	[thread overview]
Message-ID: <bug-58970-4-FbeIuFq0gI@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58970-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58970

--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Bernd Edlinger from comment #18)
> Well, how about this version?
> Does'nt it look like a much smaller change?
> 
> --- expr.c.jj	2013-10-31 14:57:05.000000000 +0100
> +++ expr.c	2013-11-04 12:51:55.013931114 +0100
> @@ -4582,7 +4582,8 @@ get_bit_range (unsigned HOST_WIDE_INT *b
>        HOST_WIDE_INT adjust = bitoffset - *bitpos;
>  
>        gcc_assert ((adjust % BITS_PER_UNIT) == 0);
> -      gcc_assert (*offset != NULL_TREE);
> +      if (*offset == NULL_TREE)
> +	*offset = size_zero_node;
>  
>        *bitpos += adjust;
>        *offset

But you then have undefined behavior if *bitpos is HOST_WIDE_INT_MIN.  Or could
for very small other *bitpos and not really small bitoffset, etc.  And, while
you save a few characters on the line, it means it is more expensive at
runtime.
>From gcc-bugs-return-433436-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 04 14:07:54 2013
Return-Path: <gcc-bugs-return-433436-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 28948 invoked by alias); 4 Nov 2013 14:07:53 -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 27785 invoked by uid 48); 4 Nov 2013 14:05:50 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/58944] [4.9 Regression] bogus -Wunused-macros warnings when compiling Libreoffice
Date: Mon, 04 Nov 2013 14:07:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: other
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth 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: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: keywords target_milestone
Message-ID: <bug-58944-4-ORN2ZPNnDy@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58944-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58944-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: 2013-11/txt/msg00213.txt.bz2
Content-length: 477

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX944

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
   Target Milestone|---                         |4.9.0

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Looks like a system_header check doesn't work anymore.


  parent reply	other threads:[~2013-11-04 12:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-02 10:16 [Bug middle-end/58970] New: " jan.smets@alcatel-lucent.com
2013-11-02 10:17 ` [Bug middle-end/58970] " jan.smets@alcatel-lucent.com
2013-11-02 13:38 ` [Bug middle-end/58970] [4.7/4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
2013-11-03 19:16 ` bernd.edlinger at hotmail dot de
2013-11-04  0:56 ` jan.smets@alcatel-lucent.com
2013-11-04  8:41 ` jakub at gcc dot gnu.org
2013-11-04  9:00 ` bernd.edlinger at hotmail dot de
2013-11-04  9:31 ` jakub at gcc dot gnu.org
2013-11-04  9:32 ` jakub at gcc dot gnu.org
2013-11-04  9:54 ` bernd.edlinger at hotmail dot de
2013-11-04 10:01 ` jakub at gcc dot gnu.org
2013-11-04 10:07 ` bernd.edlinger at hotmail dot de
2013-11-04 10:12 ` jakub at gcc dot gnu.org
2013-11-04 10:32 ` bernd.edlinger at hotmail dot de
2013-11-04 11:07 ` bernd.edlinger at hotmail dot de
2013-11-04 11:30 ` jakub at gcc dot gnu.org
2013-11-04 11:46 ` bernd.edlinger at hotmail dot de
2013-11-04 12:10 ` bernd.edlinger at hotmail dot de
2013-11-04 12:15 ` jakub at gcc dot gnu.org [this message]
2013-11-04 14:28 ` rguenth at gcc dot gnu.org
2013-11-04 16:02 ` jakub at gcc dot gnu.org
2013-11-04 17:55 ` ebotcazou at gcc dot gnu.org
2013-11-05  8:28 ` bernd.edlinger at hotmail dot de
2013-11-05 19:37 ` bernd.edlinger at hotmail dot de
2013-11-06  7:50 ` jakub at gcc dot gnu.org
2013-11-06 14:11 ` jan.smets@alcatel-lucent.com
2013-11-11  7:57 ` jakub at gcc dot gnu.org
2013-11-11  9:41 ` jan.smets@alcatel-lucent.com
2013-11-19 13:33 ` [Bug middle-end/58970] [4.7 " rguenth at gcc dot gnu.org
2014-04-23 12:39 ` jan.smets@alcatel-lucent.com

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-58970-4-FbeIuFq0gI@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: link
Be 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).