public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52143] New: [OOP] ICE with polymorphic function result in gfc_class_vptr_get
@ 2012-02-06 21:34 burnus at gcc dot gnu.org
  2012-10-12 11:41 ` [Bug fortran/52143] " janus at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-02-06 21:34 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52143
           Summary: [OOP] ICE with polymorphic function result in
                    gfc_class_vptr_get
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: pault@gcc.gnu.org


Found when creating a test case for PR 51514.

The following code causes an

test.f90:8:0: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have function_type in gfc_class_vptr_get, at
fortran/trans-expr.c:78

which is at

  vptr = gfc_advance_chain (TYPE_FIELDS (TREE_TYPE (decl)),
                            CLASS_VPTR_FIELD);

Backtrace:

#0  gfc_class_vptr_get (decl=0x2aaaacce2600)
    at trans-expr.c:78
#1  0x00000000005d3f0d in gfc_vtable_field_get (decl=<optimized out>, field=1)
    at trans-expr.c:91
#2  0x00000000005b1fa5 in build_class_array_ref (index=0x2aaaacbc3c90,
                              base=0x2aaaacced2a8, se=<optimized out>)
    at trans-array.c:2984
#3  gfc_conv_scalarized_array_ref (se=0x7fffffffce20, ar=<optimized out>)
    at trans-array.c:3037
#4  0x00000000005b2852 in gfc_conv_array_ref (se=0x7fffffffce20, ar=0x174a888,
                              sym=<optimized out>, where=<optimized out>)
    at trans-array.c:3112
#5  0x00000000005db098 in gfc_conv_variable (se=0x7fffffffce20, expr=0x174a620)
    at trans-expr.c:1333
#6  0x00000000005da874 in gfc_conv_expr_reference (se=0x7fffffffce20,
                                                   expr=<optimized out>)
    at trans-expr.c:5610
#7  0x00000000005de0b0 in gfc_conv_procedure_call (se=0x7fffffffcff0,
          sym=0x173e1f0, args=0x1746b50, expr=0x174aa10, append_args=0x0)
    at trans-expr.c:3540
#8  0x00000000006020c5 in gfc_trans_call (code=0x174af90,
         dependency_check=<optimized out>, mask=0x0, count1=0x0, invert=false)
    at trans-stmt.c:468



module mod_subpr
  type :: foo
    integer :: i = 2
  end type
contains
  function g ()
    class(foo), allocatable :: g(:)
    allocate (g(3)) 
  end function g
end module


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

* [Bug fortran/52143] [OOP] ICE with polymorphic function result in gfc_class_vptr_get
  2012-02-06 21:34 [Bug fortran/52143] New: [OOP] ICE with polymorphic function result in gfc_class_vptr_get burnus at gcc dot gnu.org
@ 2012-10-12 11:41 ` janus at gcc dot gnu.org
  2013-06-11 15:36 ` dominiq at lps dot ens.fr
  2013-06-11 17:42 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: janus at gcc dot gnu.org @ 2012-10-12 11:41 UTC (permalink / raw)
  To: gcc-bugs


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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-12
                 CC|                            |janus at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from janus at gcc dot gnu.org 2012-10-12 11:40:49 UTC ---
Note: It works when making g a scalar.


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

* [Bug fortran/52143] [OOP] ICE with polymorphic function result in gfc_class_vptr_get
  2012-02-06 21:34 [Bug fortran/52143] New: [OOP] ICE with polymorphic function result in gfc_class_vptr_get burnus at gcc dot gnu.org
  2012-10-12 11:41 ` [Bug fortran/52143] " janus at gcc dot gnu.org
@ 2013-06-11 15:36 ` dominiq at lps dot ens.fr
  2013-06-11 17:42 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-11 15:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
It looks like a duplicate of pr57535.


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

* [Bug fortran/52143] [OOP] ICE with polymorphic function result in gfc_class_vptr_get
  2012-02-06 21:34 [Bug fortran/52143] New: [OOP] ICE with polymorphic function result in gfc_class_vptr_get burnus at gcc dot gnu.org
  2012-10-12 11:41 ` [Bug fortran/52143] " janus at gcc dot gnu.org
  2013-06-11 15:36 ` dominiq at lps dot ens.fr
@ 2013-06-11 17:42 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-11 17:42 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

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

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The test compiles at revision 199960. Marking as duplicate of pr57535.

*** This bug has been marked as a duplicate of bug 57535 ***


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

end of thread, other threads:[~2013-06-11 17:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-06 21:34 [Bug fortran/52143] New: [OOP] ICE with polymorphic function result in gfc_class_vptr_get burnus at gcc dot gnu.org
2012-10-12 11:41 ` [Bug fortran/52143] " janus at gcc dot gnu.org
2013-06-11 15:36 ` dominiq at lps dot ens.fr
2013-06-11 17:42 ` dominiq at lps dot ens.fr

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