public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/57748] [4.8/4.9 Regression] ICE when expanding assignment to unaligned zero-sized array
Date: Sat, 31 Aug 2013 18:13:00 -0000	[thread overview]
Message-ID: <bug-57748-4-hS3AL7ouBK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-57748-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #23 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Martin, one of the errors with strict volatile bitfields
was with a structure like this.

struct S0 {
   signed a : 7;
   unsigned b : 28;
} __attribute__((packed));

here the member b is using SImode but the data are spread over 5 bytes.

This stucture access does not go thru the misalign code path.
But it it did, then I think we could get into trouble.

The code in the misalign code path assumes, that bitpos == 0.
Otherwise the condition if (bitsize != GET_MODE_BITSIZE (mode))
will not do the right thing.

And the misalign code path will break the
-fstrict-volatile-bitfields if the access is volatile.

What I mean is if we could find an example where this code path
is executed for a bit field it will break the strict volatile bitfileds
once again, even with Sandra Loosemore's patch.

Probably there is a reason why this can not happen but I do not see
it. At least there should be some assertions here.


  parent reply	other threads:[~2013-08-31 18:13 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28  3:57 [Bug target/57748] New: ICE on ARM with -mfloat-abi=softfp -mfpu=neo raj.khem at gmail dot com
2013-06-28  3:58 ` [Bug target/57748] " raj.khem at gmail dot com
2013-06-28  4:00 ` raj.khem at gmail dot com
2013-06-28 14:52 ` jamborm at gcc dot gnu.org
2013-07-03 16:34 ` philb at gnu dot org
2013-07-05 13:24 ` [Bug tree-optimization/57748] " ramana at gcc dot gnu.org
2013-07-05 15:54 ` [Bug middle-end/57748] [4.8/4.9 Regression] ICE on ARM with -mfloat-abi=softfp -mfpu=neon pinskia at gcc dot gnu.org
2013-07-26 16:47 ` jamborm at gcc dot gnu.org
2013-07-29 20:49 ` bernd.edlinger at hotmail dot de
2013-07-30 14:53 ` jamborm at gcc dot gnu.org
2013-07-30 22:53 ` bernd.edlinger at hotmail dot de
2013-07-31 14:08 ` jamborm at gcc dot gnu.org
2013-07-31 16:39 ` jamborm at gcc dot gnu.org
2013-07-31 16:42 ` jamborm at gcc dot gnu.org
2013-08-01  2:10 ` bernd.edlinger at hotmail dot de
2013-08-01 14:40 ` [Bug middle-end/57748] [4.8/4.9 Regression] ICE when expanding assignment to unaligned zero-sized array jamborm at gcc dot gnu.org
2013-08-02  7:11 ` bernd.edlinger at hotmail dot de
2013-08-02 12:31 ` jamborm at gcc dot gnu.org
2013-08-02 22:49 ` bernd.edlinger at hotmail dot de
2013-08-03 22:36 ` david.abdurachmanov at gmail dot com
2013-08-06 20:30 ` david.abdurachmanov at gmail dot com
2013-08-28  8:20 ` rguenth at gcc dot gnu.org
2013-08-28  9:00 ` bernd.edlinger at hotmail dot de
2013-08-29 21:29 ` bernd.edlinger at hotmail dot de
2013-08-30 18:21 ` jamborm at gcc dot gnu.org
2013-08-31 18:13 ` bernd.edlinger at hotmail dot de [this message]
2013-09-02 23:35 ` bernd.edlinger at hotmail dot de
2013-09-03 10:12 ` rguenth at gcc dot gnu.org
2013-09-04  9:18 ` bernd.edlinger at hotmail dot de
2013-09-04  9:33 ` bernd.edlinger at hotmail dot de
2013-09-04  9:59 ` rguenth at gcc dot gnu.org
2013-09-04 10:04 ` [Bug middle-end/57748] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org
2013-09-04 10:17 ` bernd.edlinger at hotmail dot de
2013-09-06  7:05 ` bernd.edlinger at hotmail dot de
2013-09-06  8:12 ` rguenth at gcc dot gnu.org
2013-09-09  6:41 ` bernd.edlinger at hotmail dot de
2013-09-09 13:02 ` bernd.edlinger at hotmail dot de
2013-09-10  7:56 ` bernd.edlinger at hotmail dot de
2013-09-18 14:44 ` jamborm at gcc dot gnu.org
2013-09-18 16:32 ` bernd.edlinger at hotmail dot de
2013-09-19  9:03 ` bernd.edlinger at hotmail dot de
2013-09-20  7:38 ` rguenther at suse dot de
2013-09-20 13:50 ` bernd.edlinger at hotmail dot de
2013-09-20 14:10 ` edlinger at gcc dot gnu.org
2013-10-16  9:49 ` jakub at gcc dot gnu.org
2013-10-30 13:07 ` rguenth at gcc dot gnu.org
2013-11-14 15:19 ` bernd.edlinger at hotmail dot de
2013-11-21 14:27 ` paulo@matos-sorge.com
2013-11-21 14:38 ` bernd.edlinger at hotmail dot de
2013-11-21 14:40 ` paulo@matos-sorge.com
2013-11-22 11:38 ` paulo@matos-sorge.com
2013-11-28  9:50 ` paulo@matos-sorge.com
2014-01-08 17:25 ` edlinger at gcc dot gnu.org
2014-02-05 17:54 ` mpolacek at gcc dot gnu.org
2014-05-22  9:05 ` [Bug middle-end/57748] [4.7/4.8 " rguenth at gcc dot gnu.org
2014-12-19 13:36 ` [Bug middle-end/57748] [4.8 " jakub at gcc dot gnu.org
2015-01-16 15:48 ` ramana at gcc dot gnu.org
2015-01-16 16:08 ` bernd.edlinger at hotmail dot de
2015-01-16 16:36 ` ramana at gcc dot gnu.org
2015-01-16 19:45 ` mikpelinux at gmail dot com
2015-01-22  8:28 ` mikpelinux at gmail dot com
2015-01-25 14:28 ` mikpelinux at gmail dot com
2015-01-26 23:40 ` bernd.edlinger at hotmail dot de
2015-01-27  8:47 ` mikpelinux at gmail dot com
2015-01-27 17:08 ` edlinger at gcc dot gnu.org
2015-01-27 17:10 ` edlinger 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-57748-4-hS3AL7ouBK@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).