public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0
@ 2012-02-02 20:02 zsojka at seznam dot cz
  2012-02-03 10:10 ` [Bug middle-end/52097] " rguenth at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: zsojka at seznam dot cz @ 2012-02-02 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52097
           Summary: ICE: in get_bit_range, at expr.c:4535 with -O -flto
                    -fexceptions -fnon-call-exceptions --param
                    allow-store-data-races=0
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 26556
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26556
reduced testcase (from gcc.c-torture/execute/20031201-1.c)

Compiler output:
$ gcc -O -flto -fexceptions -fnon-call-exceptions --param
allow-store-data-races=0 testcase.c 
In file included from testcase.c:5:0,
                 from :0:
testcase.c: In function 'main':
testcase.c:10:9: internal compiler error: in get_bit_range, at expr.c:4535
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /mnt/svn/gcc-trunk/binary-latest/bin/gcc returned 1 exit status
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status

Tested revisions:
r183741 - crash


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

* [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
  2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 zsojka at seznam dot cz
@ 2012-02-03 10:10 ` rguenth at gcc dot gnu.org
  2012-02-14  1:11 ` aldyh at gcc dot gnu.org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-03 10:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-02-03
                 CC|                            |aldyh at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-03 10:10:09 UTC ---
Confirmed.


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

* [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
  2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 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
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: aldyh at gcc dot gnu.org @ 2012-02-14  1:11 UTC (permalink / raw)
  To: gcc-bugs

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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

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

--- Comment #2 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2012-02-14 01:10:43 UTC ---
In get_bit_range() we get the following COMPONENT_REF:

(gdb) call debug_generic_stmt(exp)
MEM[(struct io *)0B].e0;

Then we extract the field so we can search for it in the original
record/structure:

  field = TREE_OPERAND (exp, 1);
  record_type = DECL_FIELD_CONTEXT (field);

But when we iterate through TYPE_FIELDS(record_type), "field" is not found
because the COMPONENT_REF's field "e0" has a different pointer than the "e0" in
the record itself:

(gdb) call debug_generic_stmt (fld)
e0

(gdb) call debug_generic_stmt (field)
e0

(gdb) p fld == field
$12 = 0

I'm not very LTO savvy.  Is this supposed to happen?  Should we have been
comparing something else than pointer equality here, or is there something else
broken?


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

* [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
  2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 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
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenther at suse dot de @ 2012-02-14  9:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from rguenther at suse dot de <rguenther at suse dot de> 2012-02-14 09:02:58 UTC ---
On Tue, 14 Feb 2012, aldyh at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52097
> 
> Aldy Hernandez <aldyh at gcc dot gnu.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |rguenth at gcc dot gnu.org
> 
> --- Comment #2 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2012-02-14 01:10:43 UTC ---
> In get_bit_range() we get the following COMPONENT_REF:
> 
> (gdb) call debug_generic_stmt(exp)
> MEM[(struct io *)0B].e0;
> 
> Then we extract the field so we can search for it in the original
> record/structure:
> 
>   field = TREE_OPERAND (exp, 1);
>   record_type = DECL_FIELD_CONTEXT (field);
> 
> But when we iterate through TYPE_FIELDS(record_type), "field" is not found
> because the COMPONENT_REF's field "e0" has a different pointer than the "e0" in
> the record itself:
> 
> (gdb) call debug_generic_stmt (fld)
> e0
> 
> (gdb) call debug_generic_stmt (field)
> e0
> 
> (gdb) p fld == field
> $12 = 0
> 
> I'm not very LTO savvy.  Is this supposed to happen?  Should we have been
> comparing something else than pointer equality here, or is there something else
> broken?

Comparing the FIELD_DECL by pointer equality is indeed broken (but
it happens to work without LTO).  The type/IL checkers allow any
FIELD_DECL that is type/position compatible with the one in the record.
Now - in this simple testcase we merge the unnamed main variants of

typedef struct { unsigned int e0 : 16; } s1;

and

typedef struct { unsigned int e0 : 16; } s2;

because they are the same, which causes the variant lists (that contain
s1 for one case and s2 for the other case) to be merged.  Now, those
variants still point to the original FIELD_DECL lists - for one
variant it happens to be the "correct" one, for the other it's "wrong"
(well, "wrong" if you assume that TYPE_FIELDs is shared amongst all
type variants).  I suppose we _can_ fix this in the type merging
process (and that would even save some memory which is good).
So I'll poke at this from the LTO side.

Btw, my C++ memory model bitfield handling rewrite also fixes this bug.

Richard.


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

* [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
  2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  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
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-14 10:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-14 10:09:02 UTC ---
Created attachment 26657
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26657
patch

Patch I am going to test.


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

* [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
  2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  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
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-14 13:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-14 13:23:15 UTC ---
It works apart from introducing

FAIL: gfortran.dg/lto/pr45586-2 f_lto_pr45586-2_0.o-f_lto_pr45586-2_0.o link,
-O
0 -flto -flto-partition=none -fuse-linker-plugin (internal compiler error)

again (see PR45586).  Let's queue this for 4.8 instead.


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

* [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
  2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  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
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-14 14:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-14 14:00:34 UTC ---
Would be interesting to see what the attached patch does to memory usage
with Mozilla though (the Fortran issue is really latent, still changing this
during stage4 seems risky at least - SPEC 2k6 survived a LTO build/run though).


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

* [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
  2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  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
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: markus at trippelsdorf dot de @ 2012-02-14 15:52 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus at trippelsdorf dot
                   |                            |de

--- Comment #7 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-02-14 15:50:12 UTC ---
(In reply to comment #6)
> Would be interesting to see what the attached patch does to memory usage
> with Mozilla though (the Fortran issue is really latent, still changing this
> during stage4 seems risky at least - SPEC 2k6 survived a LTO build/run though).

Not much difference in my testing (PGO+LTO Firefox built):
without patch: 
2.5 GB written out
~4.5 GB memory usage (5GB peak)

with your patch:
2.4 GB written out
memory usage roughly the same as before.


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

* [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
  2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-06  9:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-06 09:54:11 UTC ---
Author: rguenth
Date: Tue Mar  6 09:54:06 2012
New Revision: 184981

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184981
Log:
2012-03-06  Richard Guenther  <rguenther@suse.de>

    PR lto/52097
    * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.

    * gcc.dg/lto/pr52097_0.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/lto/pr52097_0.c
Modified:
    trunk/gcc/lto/ChangeLog
    trunk/gcc/lto/lto.c
    trunk/gcc/testsuite/ChangeLog


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

* [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
  2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-06  9:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.8.0

--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-06 09:56:32 UTC ---
Fixed, for 4.8.


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

* [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
  2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 zsojka at seznam dot cz
                   ` (8 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: krebbel at gcc dot gnu.org @ 2012-03-08  7:56 UTC (permalink / raw)
  To: gcc-bugs

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

Andreas Krebbel <krebbel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |krebbel at gcc dot gnu.org
         Resolution|FIXED                       |

--- Comment #10 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2012-03-08 07:56:14 UTC ---
(In reply to comment #8)
> Author: rguenth
> Date: Tue Mar  6 09:54:06 2012
> New Revision: 184981

This patch seems to have introduced the following testsuite fails on s390x:

                === gfortran tests ===


Running target unix
FAIL: gfortran.dg/lto/pr45586-2 f_lto_pr45586-2_0.o-f_lto_pr45586-2_0.o link,
-O0 -flto -flto-partition=none  (internal compiler error)
UNRESOLVED: gfortran.dg/lto/pr45586-2 f_lto_pr45586-2_0.o-f_lto_pr45586-2_0.o
execute -O0 -flto -flto-partition=none 
FAIL: gfortran.dg/lto/pr45586-2 f_lto_pr45586-2_0.o-f_lto_pr45586-2_0.o link,
-O0 -flto -flto-partition=1to1  (internal compiler error)
UNRESOLVED: gfortran.dg/lto/pr45586-2 f_lto_pr45586-2_0.o-f_lto_pr45586-2_0.o
execute -O0 -flto -flto-partition=1to1 
FAIL: gfortran.dg/lto/pr45586-2 f_lto_pr45586-2_0.o-f_lto_pr45586-2_0.o link,
-O0 -flto  (internal compiler error)
UNRESOLVED: gfortran.dg/lto/pr45586-2 f_lto_pr45586-2_0.o-f_lto_pr45586-2_0.o
execute -O0 -flto 
FAIL: gfortran.dg/lto/pr45586 f_lto_pr45586_0.o-f_lto_pr45586_0.o link, -O0
-flto -flto-partition=none  (internal compiler error)
UNRESOLVED: gfortran.dg/lto/pr45586 f_lto_pr45586_0.o-f_lto_pr45586_0.o execute
-O0 -flto -flto-partition=none 
FAIL: gfortran.dg/lto/pr45586 f_lto_pr45586_0.o-f_lto_pr45586_0.o link, -O0
-flto -flto-partition=1to1  (internal compiler error)
UNRESOLVED: gfortran.dg/lto/pr45586 f_lto_pr45586_0.o-f_lto_pr45586_0.o execute
-O0 -flto -flto-partition=1to1 
FAIL: gfortran.dg/lto/pr45586 f_lto_pr45586_0.o-f_lto_pr45586_0.o link, -O0
-flto  (internal compiler error)
UNRESOLVED: gfortran.dg/lto/pr45586 f_lto_pr45586_0.o-f_lto_pr45586_0.o execute
-O0 -flto


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

* [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
  2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 zsojka at seznam dot cz
                   ` (9 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-03-08  8:27 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-03-08 08:24:56 UTC ---
(In reply to comment #10)
> (In reply to comment #8)
> > Author: rguenth
> > Date: Tue Mar  6 09:54:06 2012
> > New Revision: 184981
> 
> This patch seems to have introduced the following testsuite fails on s390x:

The PR for that testcase was reopened.


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

* [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
  2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 zsojka at seznam dot cz
                   ` (10 preceding siblings ...)
  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
  2013-02-19 20:38 ` LpSolit at netscape dot net
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-14 11:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-14 10:55:17 UTC ---
Author: rguenth
Date: Wed Mar 14 10:55:09 2012
New Revision: 185379

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185379
Log:
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.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr48124-1.c
    trunk/gcc/testsuite/gcc.dg/torture/pr48124-2.c
    trunk/gcc/testsuite/gcc.dg/torture/pr48124-3.c
    trunk/gcc/testsuite/gcc.dg/torture/pr48124-4.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/expr.c
    trunk/gcc/stor-layout.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-streamer-in.c
    trunk/gcc/tree-streamer-out.c
    trunk/gcc/tree.c
    trunk/gcc/tree.h


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

* [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
  2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 zsojka at seznam dot cz
                   ` (11 preceding siblings ...)
  2012-03-14 11:03 ` rguenth at gcc dot gnu.org
@ 2012-06-04  8:43 ` rguenth at gcc dot gnu.org
  2013-02-19 20:38 ` LpSolit at netscape dot net
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-06-04  8:43 UTC (permalink / raw)
  To: gcc-bugs

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


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

* [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
  2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 zsojka at seznam dot cz
                   ` (12 preceding siblings ...)
  2012-06-04  8:43 ` rguenth at gcc dot gnu.org
@ 2013-02-19 20:38 ` LpSolit at netscape dot net
  13 siblings, 0 replies; 15+ messages in thread
From: LpSolit at netscape dot net @ 2013-02-19 20:38 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #13 from Richard Biener <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


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

end of thread, other threads:[~2013-02-19 20:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-02 20:02 [Bug middle-end/52097] New: ICE: in get_bit_range, at expr.c:4535 with -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 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
2013-02-19 20:38 ` LpSolit at netscape dot net

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