public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/59338] New: error: position plus size exceeds size of referenced object in BIT_FIELD_REF
@ 2013-11-29  9:52 jan.smets@alcatel-lucent.com
  2013-11-29 10:11 ` [Bug middle-end/59338] [4.9 Regression] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jan.smets@alcatel-lucent.com @ 2013-11-29  9:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59338
           Summary: error: position plus size exceeds size of referenced
                    object in BIT_FIELD_REF
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jan.smets@alcatel-lucent.com

minimal.i: In function 'test':
minimal.i:20:6: error: position plus size exceeds size of referenced object in
BIT_FIELD_REF
 void test(void)
      ^
BIT_FIELD_REF <*qResp, 8, 32>
minimal.i:23:28: note: in statement
     if (qResp->u.l[0].More == 0)
                            ^
D.1802 = BIT_FIELD_REF <*qResp, 8, 32>;
minimal.i:20:6: internal compiler error: verify_gimple failed
 void test(void)
      ^


typedef enum
{
    XYZZY,
} enumType;

typedef struct
{
    unsigned char More : 1;
} tResp;

typedef struct
{
    enumType QueryType;
    union
        {
        tResp l[0];
        } u;
} tQResp;

void test(void)
{
    tQResp *qResp = (0);
    if (qResp->u.l[0].More == 0)
        return;
}


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/59338] [4.9 Regression] error: position plus size exceeds size of referenced object in BIT_FIELD_REF
  2013-11-29  9:52 [Bug middle-end/59338] New: error: position plus size exceeds size of referenced object in BIT_FIELD_REF jan.smets@alcatel-lucent.com
@ 2013-11-29 10:11 ` rguenth at gcc dot gnu.org
  2013-11-29 10:35 ` ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-29 10:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2013-11-29
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Target Milestone|---                         |4.9.0
            Summary|error: position plus size   |[4.9 Regression] error:
                   |exceeds size of referenced  |position plus size exceeds
                   |object in BIT_FIELD_REF     |size of referenced object
                   |                            |in BIT_FIELD_REF
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  I'll adjust the checking to be less conservative (trailing array
happening here and fold going nuts in creating BIT_FIELD_REFs).


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/59338] [4.9 Regression] error: position plus size exceeds size of referenced object in BIT_FIELD_REF
  2013-11-29  9:52 [Bug middle-end/59338] New: error: position plus size exceeds size of referenced object in BIT_FIELD_REF jan.smets@alcatel-lucent.com
  2013-11-29 10:11 ` [Bug middle-end/59338] [4.9 Regression] " rguenth at gcc dot gnu.org
@ 2013-11-29 10:35 ` ebotcazou at gcc dot gnu.org
  2013-11-29 12:09 ` rguenth at gcc dot gnu.org
  2013-11-29 12:09 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2013-11-29 10:35 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu.org

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Confirmed.  I'll adjust the checking to be less conservative (trailing array
> happening here and fold going nuts in creating BIT_FIELD_REFs).

I'm interested :-) but I don't know whether this will be sufficient for Ada.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/59338] [4.9 Regression] error: position plus size exceeds size of referenced object in BIT_FIELD_REF
  2013-11-29  9:52 [Bug middle-end/59338] New: error: position plus size exceeds size of referenced object in BIT_FIELD_REF jan.smets@alcatel-lucent.com
                   ` (2 preceding siblings ...)
  2013-11-29 12:09 ` rguenth at gcc dot gnu.org
@ 2013-11-29 12:09 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-29 12:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/59338] [4.9 Regression] error: position plus size exceeds size of referenced object in BIT_FIELD_REF
  2013-11-29  9:52 [Bug middle-end/59338] New: error: position plus size exceeds size of referenced object in BIT_FIELD_REF jan.smets@alcatel-lucent.com
  2013-11-29 10:11 ` [Bug middle-end/59338] [4.9 Regression] " rguenth at gcc dot gnu.org
  2013-11-29 10:35 ` ebotcazou at gcc dot gnu.org
@ 2013-11-29 12:09 ` rguenth at gcc dot gnu.org
  2013-11-29 12:09 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-29 12:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Fri Nov 29 12:09:12 2013
New Revision: 205521

URL: http://gcc.gnu.org/viewcvs?rev=205521&root=gcc&view=rev
Log:
2013-11-29  Richard Biener  <rguenther@suse.de>

    PR middle-end/59338
    * tree-cfg.c (verify_expr): Restrict bounds verification of
    BIT_FIELD_REF arguments to non-aggregate typed base objects.

    * gcc.dg/torture/pr59338.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr59338.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-cfg.c


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-11-29 12:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-29  9:52 [Bug middle-end/59338] New: error: position plus size exceeds size of referenced object in BIT_FIELD_REF jan.smets@alcatel-lucent.com
2013-11-29 10:11 ` [Bug middle-end/59338] [4.9 Regression] " rguenth at gcc dot gnu.org
2013-11-29 10:35 ` ebotcazou at gcc dot gnu.org
2013-11-29 12:09 ` rguenth at gcc dot gnu.org
2013-11-29 12:09 ` rguenth at gcc dot gnu.org

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).