public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/15181] New: gfc_conv_component_ref: Assertion `c->backend_decl' failed
@ 2004-04-27 22:41 olchansk at panix dot com
  2004-04-27 22:44 ` [Bug fortran/15181] [gfortran] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: olchansk at panix dot com @ 2004-04-27 22:41 UTC (permalink / raw)
  To: gcc-bugs

cvs-head tree-ssa gfortran (gcc version 3.5-tree-ssa 20040423 (merged 20040414))
fails to compile this code. It works fine with Absoft and ICC.

module foo
  implicit none

  type:: wire_type
     integer iwire
  end type wire_type

  type:: tdc_type   
     integer iabc
     type(wire_type), pointer:: wireP
  end type tdc_type

  type(tdc_type):: pctdc(100)

contains

  subroutine bar
    integer ii
    integer itdc

    !! following line causes ICE:
    !! f951: ../../gcc/gcc/fortran/trans-expr.c:219:
    !! gfc_conv_component_ref: Assertion `c->backend_decl' failed.

    ii = PCtdc(iTDC)%WireP%iwire

  end subroutine bar

end module foo


[olchansk@dork gfortran_test]$ make test_gfc_conv_component_ref.o
/triumfcs/trshare/olchansk/gcc-tree-ssa/install/bin/gfortran -x f95 -c  -o
test_gfc_conv_component_ref.o -O2 -g -Wall -Waliasing -Wline-truncation
-Wsurprising -Wunused-labels -fPIC -ffixed-line-length-132
test_gfc_conv_component_ref.f90
f951: ../../gcc/gcc/fortran/trans-expr.c:219: gfc_conv_component_ref: Assertion
`c->backend_decl' failed.
test_gfc_conv_component_ref.f90: In function `bar':
test_gfc_conv_component_ref.f90:25: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make: *** [test_gfc_conv_component_ref.o] Error 1

K.O.

-- 
           Summary: gfc_conv_component_ref: Assertion `c->backend_decl'
                    failed
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: olchansk at panix dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


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

* [Bug fortran/15181] [gfortran] gfc_conv_component_ref: Assertion `c->backend_decl' failed
  2004-04-27 22:41 [Bug fortran/15181] New: gfc_conv_component_ref: Assertion `c->backend_decl' failed olchansk at panix dot com
@ 2004-04-27 22:44 ` pinskia at gcc dot gnu dot org
  2004-05-27  3:10 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-27 22:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-27 22:19 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-27 22:19:44
               date|                            |
            Summary|gfc_conv_component_ref:     |[gfortran]
                   |Assertion `c->backend_decl' |gfc_conv_component_ref:
                   |failed                      |Assertion `c->backend_decl'
                   |                            |failed
   Target Milestone|---                         |tree-ssa


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


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

* [Bug fortran/15181] [gfortran] gfc_conv_component_ref: Assertion `c->backend_decl' failed
  2004-04-27 22:41 [Bug fortran/15181] New: gfc_conv_component_ref: Assertion `c->backend_decl' failed olchansk at panix dot com
  2004-04-27 22:44 ` [Bug fortran/15181] [gfortran] " pinskia at gcc dot gnu dot org
@ 2004-05-27  3:10 ` pinskia at gcc dot gnu dot org
  2004-06-13  9:16 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-27  3:10 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.5.0                       |---


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


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

* [Bug fortran/15181] [gfortran] gfc_conv_component_ref: Assertion `c->backend_decl' failed
  2004-04-27 22:41 [Bug fortran/15181] New: gfc_conv_component_ref: Assertion `c->backend_decl' failed olchansk at panix dot com
  2004-04-27 22:44 ` [Bug fortran/15181] [gfortran] " pinskia at gcc dot gnu dot org
  2004-05-27  3:10 ` pinskia at gcc dot gnu dot org
@ 2004-06-13  9:16 ` pinskia at gcc dot gnu dot org
  2004-07-12  2:30 ` [Bug fortran/15181] " olchansk at panix dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-13  9:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-13 09:16 -------
*** Bug 15970 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Mart dot Rentmeester at nn-
                   |                            |online dot org


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


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

* [Bug fortran/15181] gfc_conv_component_ref: Assertion `c->backend_decl' failed
  2004-04-27 22:41 [Bug fortran/15181] New: gfc_conv_component_ref: Assertion `c->backend_decl' failed olchansk at panix dot com
                   ` (2 preceding siblings ...)
  2004-06-13  9:16 ` pinskia at gcc dot gnu dot org
@ 2004-07-12  2:30 ` olchansk at panix dot com
  2004-09-26 16:16 ` tobi at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: olchansk at panix dot com @ 2004-07-12  2:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From olchansk at panix dot com  2004-07-12 02:30 -------
This change seems to fix the ICE. In my example, gfc_typenode_for_spec() is
never called for "type(wire_type)", so I call to be hand.

[olchansk@send fortran]$ cvs diff -u trans-expr.c
Index: trans-expr.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/fortran/trans-expr.c,v
retrieving revision 1.12
diff -u -r1.12 trans-expr.c
--- trans-expr.c        29 Jun 2004 22:01:35 -0000      1.12
+++ trans-expr.c        12 Jul 2004 02:28:13 -0000
@@ -217,7 +217,9 @@
 
   c = ref->u.c.component;
 
-  assert (c->backend_decl);
+  gfc_typenode_for_spec(&c->ts);
+
+  assert(c->backend_decl);
 
   field = c->backend_decl;
   assert (TREE_CODE (field) == FIELD_DECL);

K.O.


-- 


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


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

* [Bug fortran/15181] gfc_conv_component_ref: Assertion `c->backend_decl' failed
  2004-04-27 22:41 [Bug fortran/15181] New: gfc_conv_component_ref: Assertion `c->backend_decl' failed olchansk at panix dot com
                   ` (3 preceding siblings ...)
  2004-07-12  2:30 ` [Bug fortran/15181] " olchansk at panix dot com
@ 2004-09-26 16:16 ` tobi at gcc dot gnu dot org
  2004-09-30 21:57 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-09-26 16:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-09-26 16:16 -------
The real fix should be in trans-types.c, but I haven't yet figured it out.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tobi at gcc dot gnu dot org


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


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

* [Bug fortran/15181] gfc_conv_component_ref: Assertion `c->backend_decl' failed
  2004-04-27 22:41 [Bug fortran/15181] New: gfc_conv_component_ref: Assertion `c->backend_decl' failed olchansk at panix dot com
                   ` (4 preceding siblings ...)
  2004-09-26 16:16 ` tobi at gcc dot gnu dot org
@ 2004-09-30 21:57 ` pinskia at gcc dot gnu dot org
  2004-10-09 22:29 ` olchansk at panix dot com
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-30 21:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-30 21:57 -------
*** Bug 17760 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dr dot johan at gmail dot
                   |                            |com


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


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

* [Bug fortran/15181] gfc_conv_component_ref: Assertion `c->backend_decl' failed
  2004-04-27 22:41 [Bug fortran/15181] New: gfc_conv_component_ref: Assertion `c->backend_decl' failed olchansk at panix dot com
                   ` (5 preceding siblings ...)
  2004-09-30 21:57 ` pinskia at gcc dot gnu dot org
@ 2004-10-09 22:29 ` olchansk at panix dot com
  2004-10-15 19:59 ` dr dot johan at gmail dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: olchansk at panix dot com @ 2004-10-09 22:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From olchansk at panix dot com  2004-10-09 22:29 -------
FWIW, "gcc version 4.0.0 20041009 (experimental)" error message changed from
"ICE: Aborted" to "ICE: in blah...". Compilation still fails.

My fix of adding "gfc_typenode_for_spec(&c->ts);" right before the assert() in
trans_expr.c:gfc_conv_component_ref() still works and fixes this bug for me. I
suggest that my fix be commited to cvs to close this bug.

/triumfcs/trshare/olchansk/gcc-tree-ssa/install/bin/gfortran -x f95 -c  -o
test_gfc_conv_component_ref.o -O2 -g -Wall -Waliasing -Wline-truncation
-Wsurprising -Wunused-labels -fPIC -ffixed-line-length-132
test_gfc_conv_component_ref.f90
test_gfc_conv_component_ref.f90: In function 'bar':
test_gfc_conv_component_ref.f90:25: internal compiler error: in
gfc_conv_component_ref, at /fortran/trans-expr.c:268
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make: *** [test_gfc_conv_component_ref.o] Error 1

-- 


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


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

* [Bug fortran/15181] gfc_conv_component_ref: Assertion `c->backend_decl' failed
  2004-04-27 22:41 [Bug fortran/15181] New: gfc_conv_component_ref: Assertion `c->backend_decl' failed olchansk at panix dot com
                   ` (6 preceding siblings ...)
  2004-10-09 22:29 ` olchansk at panix dot com
@ 2004-10-15 19:59 ` dr dot johan at gmail dot com
  2004-10-15 20:17 ` tobi at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dr dot johan at gmail dot com @ 2004-10-15 19:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dr dot johan at gmail dot com  2004-10-15 19:59 -------
I second this opinion! I tried the fix suggested below and my code now builds
with gfortran "gcc version 4.0.0 20041015 (experimental)".

/Johan

(In reply to comment #6)
> My fix of adding "gfc_typenode_for_spec(&c->ts);" right before the assert() in
> trans_expr.c:gfc_conv_component_ref() still works and fixes this bug for me. I
> suggest that my fix be commited to cvs to close this bug.

-- 


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


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

* [Bug fortran/15181] gfc_conv_component_ref: Assertion `c->backend_decl' failed
  2004-04-27 22:41 [Bug fortran/15181] New: gfc_conv_component_ref: Assertion `c->backend_decl' failed olchansk at panix dot com
                   ` (7 preceding siblings ...)
  2004-10-15 19:59 ` dr dot johan at gmail dot com
@ 2004-10-15 20:17 ` tobi at gcc dot gnu dot org
  2004-11-11 19:11 ` pinskia at gcc dot gnu dot org
  2005-02-16  9:42 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-10-15 20:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-10-15 20:17 -------
I'm wondering how the call to gfc_typenode_for_spec (&c->ts) changes
c->backend_decl, but since this works you can send the patch (after adding
spaces before '(') to fortran@gcc.gnu.org, and the person who originally wrote
this code will have to look at it.

-- 


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


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

* [Bug fortran/15181] gfc_conv_component_ref: Assertion `c->backend_decl' failed
  2004-04-27 22:41 [Bug fortran/15181] New: gfc_conv_component_ref: Assertion `c->backend_decl' failed olchansk at panix dot com
                   ` (8 preceding siblings ...)
  2004-10-15 20:17 ` tobi at gcc dot gnu dot org
@ 2004-11-11 19:11 ` pinskia at gcc dot gnu dot org
  2005-02-16  9:42 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-11 19:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-11 19:11 -------
*** Bug 18432 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mbkennel at gmail dot com


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


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

* [Bug fortran/15181] gfc_conv_component_ref: Assertion `c->backend_decl' failed
  2004-04-27 22:41 [Bug fortran/15181] New: gfc_conv_component_ref: Assertion `c->backend_decl' failed olchansk at panix dot com
                   ` (9 preceding siblings ...)
  2004-11-11 19:11 ` pinskia at gcc dot gnu dot org
@ 2005-02-16  9:42 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-16  9:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-16 03:50 -------
Fixed.  Most likely for a while now.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


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


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

end of thread, other threads:[~2005-02-16  3:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-27 22:41 [Bug fortran/15181] New: gfc_conv_component_ref: Assertion `c->backend_decl' failed olchansk at panix dot com
2004-04-27 22:44 ` [Bug fortran/15181] [gfortran] " pinskia at gcc dot gnu dot org
2004-05-27  3:10 ` pinskia at gcc dot gnu dot org
2004-06-13  9:16 ` pinskia at gcc dot gnu dot org
2004-07-12  2:30 ` [Bug fortran/15181] " olchansk at panix dot com
2004-09-26 16:16 ` tobi at gcc dot gnu dot org
2004-09-30 21:57 ` pinskia at gcc dot gnu dot org
2004-10-09 22:29 ` olchansk at panix dot com
2004-10-15 19:59 ` dr dot johan at gmail dot com
2004-10-15 20:17 ` tobi at gcc dot gnu dot org
2004-11-11 19:11 ` pinskia at gcc dot gnu dot org
2005-02-16  9:42 ` pinskia 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).