public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/52097] ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0
Date: Mon, 04 Jun 2012 08:43:00 -0000	[thread overview]
Message-ID: <bug-52097-4-nXaRFcDLwQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-52097-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-04 08:43:32 UTC ---
Author: rguenth
Date: Mon Jun  4 08:43:23 2012
New Revision: 188167

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188167
Log:
2012-06-04  Richard Guenther  <rguenther@suse.de>
    Eric Botcazou  <ebotcazou@adacore.com>

    Backport from mainline
    2012-04-03  Eric Botcazou  <ebotcazou@adacore.com>

        * expr.c (get_bit_range): Add OFFSET parameter and adjust BITPOS.
        Change type of BITOFFSET to signed.  Make sure the lower bound of
        the computed range is non-negative by adjusting OFFSET and BITPOS.
        (expand_assignment): Adjust call to get_bit_range.

    2012-03-27  Eric Botcazou  <ebotcazou@adacore.com>

        * expr.c (get_bit_range): Return the null range if the enclosing record
        is part of a larger bit field.

    2012-03-20  Richard Guenther  <rguenther@suse.de>

        * stor-layout.c (finish_bitfield_representative): Fallback
        to conservative maximum size if the padding up to the next
        field cannot be computed as a constant.
        (finish_bitfield_layout): If we cannot compute the distance
        between the start of the bitfield representative and the
        bitfield member start a new representative.
        * expr.c (get_bit_range): The distance between the start of
        the bitfield representative and the bitfield member is zero
        if the field offsets are not constants.

    2012-03-16  Richard Guenther  <rguenther@suse.de>

        * stor-layout.c (finish_bitfield_representative): Fall back
        to the conservative maximum size if we cannot compute the
        size of the tail padding.

    2012-03-14  Richard Guenther  <rguenther@suse.de>

    * tree.h (DECL_BIT_FIELD_REPRESENTATIVE): New define.
    * stor-layout.c (start_bitfield_representative): New function.
    (finish_bitfield_representative): Likewise.
    (finish_bitfield_layout): Likewise.
    (finish_record_layout): Call finish_bitfield_layout.
    * tree.c (free_lang_data_in_decl): Only free DECL_QUALIFIER
    for QUAL_UNION_TYPE fields.
    * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
    Stream DECL_BIT_FIELD_REPRESENTATIVE.
    * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.

    PR middle-end/52080
    PR middle-end/52097
    PR middle-end/48124
    * expr.c (get_bit_range): Unconditionally extract bitrange
    from DECL_BIT_FIELD_REPRESENTATIVE.
    (expand_assignment): Adjust call to get_bit_range.

    * gcc.dg/torture/pr48124-1.c: New testcase.
    * gcc.dg/torture/pr48124-2.c: Likewise.
    * gcc.dg/torture/pr48124-3.c: Likewise.
    * gcc.dg/torture/pr48124-4.c: Likewise.
    * gnat.dg/pack16.adb: Likewise.
    * gnat.dg/pack16_pkg.ads: Likewise.
    * gnat.dg/pack17.adb: Likewise.
    * gnat.dg/specs/pack7.ads: Likewise.
    * gnat.dg/specs/pack8.ads: Likewise.
    * gnat.dg/specs/pack8_pkg.ads: Likewise.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/torture/pr48124-1.c
    branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/torture/pr48124-2.c
    branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/torture/pr48124-3.c
    branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/torture/pr48124-4.c
    branches/gcc-4_7-branch/gcc/testsuite/gnat.dg/pack16.adb
    branches/gcc-4_7-branch/gcc/testsuite/gnat.dg/pack16_pkg.ads
    branches/gcc-4_7-branch/gcc/testsuite/gnat.dg/pack17.adb
    branches/gcc-4_7-branch/gcc/testsuite/gnat.dg/specs/pack7.ads
    branches/gcc-4_7-branch/gcc/testsuite/gnat.dg/specs/pack8.ads
    branches/gcc-4_7-branch/gcc/testsuite/gnat.dg/specs/pack8_pkg.ads
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/expr.c
    branches/gcc-4_7-branch/gcc/stor-layout.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_7-branch/gcc/tree-streamer-in.c
    branches/gcc-4_7-branch/gcc/tree-streamer-out.c
    branches/gcc-4_7-branch/gcc/tree.c
    branches/gcc-4_7-branch/gcc/tree.h


  parent reply	other threads:[~2012-06-04  8:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-02 20:02 [Bug middle-end/52097] New: " zsojka at seznam dot cz
2012-02-03 10:10 ` [Bug middle-end/52097] " rguenth at gcc dot gnu.org
2012-02-14  1:11 ` aldyh at gcc dot gnu.org
2012-02-14  9:04 ` rguenther at suse dot de
2012-02-14 10:09 ` rguenth at gcc dot gnu.org
2012-02-14 13:23 ` rguenth at gcc dot gnu.org
2012-02-14 14:01 ` rguenth at gcc dot gnu.org
2012-02-14 15:52 ` markus at trippelsdorf dot de
2012-03-06  9:54 ` rguenth at gcc dot gnu.org
2012-03-06  9:57 ` rguenth at gcc dot gnu.org
2012-03-08  7:56 ` krebbel at gcc dot gnu.org
2012-03-08  8:27 ` pinskia at gcc dot gnu.org
2012-03-14 11:03 ` rguenth at gcc dot gnu.org
2012-06-04  8:43 ` rguenth at gcc dot gnu.org [this message]
2013-02-19 20:38 ` LpSolit at netscape dot net

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-52097-4-nXaRFcDLwQ@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).