public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/40725]  New: [LTO] ICE in size_binop, at fold-const.c:2072
@ 2009-07-12 10:14 rguenth at gcc dot gnu dot org
  2009-07-13  5:49 ` [Bug lto/40725] " bje at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-12 10:14 UTC (permalink / raw)
  To: gcc-bugs

Reduced from gfortran.dg/bind_c_dts_2.f03.

bind_c_dts_2.f03:
module bind_c_dts_2
use, intrinsic :: iso_c_binding
implicit none
type, bind(c) :: my_c_type_1
   integer(c_int) :: j
end type my_c_type_1
contains
  subroutine sub0(my_type, expected_j) bind(c)
    type(my_c_type_1) :: my_type
    integer(c_int), value :: expected_j
    if (my_type%j .ne. expected_j) then
       call abort ()
    end if
  end subroutine sub0
end module bind_c_dts_2

bind_c_dts_2_driver.c:
typedef struct c_type_1
{
  int j;
} c_type_1_t;
void sub0(c_type_1_t *c_type, int expected_j);
int main(int argc, char **argv)
{
  c_type_1_t c_type;
  c_type.j = 11;
  sub0(&c_type, c_type.j);
  return 0;
}

ICEs like

$ gfortran -o t bind_c_dts_2.f03 bind_c_dts_2_driver.c -flto
In file included from bind_c_dts_2_driver.c:20:0,
                 from bind_c_dts_2.f03:13,
                 from :5:
bind_c_dts_2.f03: In function 'sub0':
bind_c_dts_2.f03:11:0: internal compiler error: in size_binop, at
fold-const.c:2072
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


This is because when we stream FIELD_DECLs DECL_FIELD_BIT_OFFSET it is
of type bitsizetype but when reading it back in it becomes sizetype.
bitsizetype is DImode for both C and Fortran and sizetype is SImode
(for a 32bit target).  DECL_FIELD_BIT_OFFSET is just bitsize_zero_node
here.

I have no idea what goes wrong here...


-- 
           Summary: [LTO] ICE in size_binop, at fold-const.c:2072
           Product: gcc
           Version: lto
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org
GCC target triplet: i?86-*-*


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


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

* [Bug lto/40725] [LTO] ICE in size_binop, at fold-const.c:2072
  2009-07-12 10:14 [Bug lto/40725] New: [LTO] ICE in size_binop, at fold-const.c:2072 rguenth at gcc dot gnu dot org
@ 2009-07-13  5:49 ` bje at gcc dot gnu dot org
  2009-07-15  0:20 ` bje at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bje at gcc dot gnu dot org @ 2009-07-13  5:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from bje at gcc dot gnu dot org  2009-07-13 05:48 -------
Confirmed.


-- 

bje at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-07-13 05:48:50
               date|                            |


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


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

* [Bug lto/40725] [LTO] ICE in size_binop, at fold-const.c:2072
  2009-07-12 10:14 [Bug lto/40725] New: [LTO] ICE in size_binop, at fold-const.c:2072 rguenth at gcc dot gnu dot org
  2009-07-13  5:49 ` [Bug lto/40725] " bje at gcc dot gnu dot org
@ 2009-07-15  0:20 ` bje at gcc dot gnu dot org
  2009-07-19  8:51 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bje at gcc dot gnu dot org @ 2009-07-15  0:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bje at gcc dot gnu dot org  2009-07-15 00:20 -------
Subject: Bug 40725

Author: bje
Date: Wed Jul 15 00:20:11 2009
New Revision: 149654

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149654
Log:
        PR lto/40725
        * gfortran.dg/lto/pr40725_0.f03: New.
        * gfortran.dg/lto/pr40725_1.c: Likewise.

Added:
    branches/lto/gcc/testsuite/gfortran.dg/lto/pr40725_0.f03
    branches/lto/gcc/testsuite/gfortran.dg/lto/pr40725_1.c
Modified:
    branches/lto/gcc/testsuite/ChangeLog.lto


-- 


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


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

* [Bug lto/40725] [LTO] ICE in size_binop, at fold-const.c:2072
  2009-07-12 10:14 [Bug lto/40725] New: [LTO] ICE in size_binop, at fold-const.c:2072 rguenth at gcc dot gnu dot org
  2009-07-13  5:49 ` [Bug lto/40725] " bje at gcc dot gnu dot org
  2009-07-15  0:20 ` bje at gcc dot gnu dot org
@ 2009-07-19  8:51 ` rguenth at gcc dot gnu dot org
  2009-07-19  8:51 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-19  8:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2009-07-19 08:50 -------
Subject: Bug 40725

Author: rguenth
Date: Sun Jul 19 08:50:32 2009
New Revision: 149788

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149788
Log:
2009-07-19  Richard Guenther  <rguenther@suse.de>

        PR lto/40724
        PR lto/40725
        * lto-streamer.c (lto_get_common_nodes): Initialize
        main_identifier_node if it is not initialized already.

Modified:
    branches/lto/gcc/ChangeLog.lto
    branches/lto/gcc/lto-streamer.c


-- 


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


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

* [Bug lto/40725] [LTO] ICE in size_binop, at fold-const.c:2072
  2009-07-12 10:14 [Bug lto/40725] New: [LTO] ICE in size_binop, at fold-const.c:2072 rguenth at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-07-19  8:51 ` rguenth at gcc dot gnu dot org
@ 2009-07-19  8:51 ` rguenth at gcc dot gnu dot org
  2009-10-05  2:54 ` jvdelisle at gcc dot gnu dot org
  2009-10-05  8:33 ` rguenth at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-19  8:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2009-07-19 08:51 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

* [Bug lto/40725] [LTO] ICE in size_binop, at fold-const.c:2072
  2009-07-12 10:14 [Bug lto/40725] New: [LTO] ICE in size_binop, at fold-const.c:2072 rguenth at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-07-19  8:51 ` rguenth at gcc dot gnu dot org
@ 2009-10-05  2:54 ` jvdelisle at gcc dot gnu dot org
  2009-10-05  8:33 ` rguenth at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-10-05  2:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jvdelisle at gcc dot gnu dot org  2009-10-05 02:54 -------
Reopening:

FAIL: gfortran.dg/lto/pr40725 f_lto_pr40725_0.o-f_lto_pr40725_1.o execute -O2
-fwhopr

I think LTO folks already know about this.


-- 

jvdelisle at gcc dot gnu dot org changed:

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


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


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

* [Bug lto/40725] [LTO] ICE in size_binop, at fold-const.c:2072
  2009-07-12 10:14 [Bug lto/40725] New: [LTO] ICE in size_binop, at fold-const.c:2072 rguenth at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-10-05  2:54 ` jvdelisle at gcc dot gnu dot org
@ 2009-10-05  8:33 ` rguenth at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-05  8:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2009-10-05 08:32 -------
Fixed.  The ICE is really fixed.  The new thing is sth else and thus for a new
PR please.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2009-10-05  8:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-12 10:14 [Bug lto/40725] New: [LTO] ICE in size_binop, at fold-const.c:2072 rguenth at gcc dot gnu dot org
2009-07-13  5:49 ` [Bug lto/40725] " bje at gcc dot gnu dot org
2009-07-15  0:20 ` bje at gcc dot gnu dot org
2009-07-19  8:51 ` rguenth at gcc dot gnu dot org
2009-07-19  8:51 ` rguenth at gcc dot gnu dot org
2009-10-05  2:54 ` jvdelisle at gcc dot gnu dot org
2009-10-05  8:33 ` rguenth at gcc dot gnu dot 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).