public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/57535] New: [OOP] ICE when allocating a CLASS function-result variable
@ 2013-06-05 17:53 burnus at gcc dot gnu.org
  2013-06-07 22:06 ` [Bug fortran/57535] " burnus at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-06-05 17:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57535
           Summary: [OOP] ICE when allocating a CLASS function-result
                    variable
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: janus at gcc dot gnu.org

The following program fails with an ICE (with GCC 4.5 to 4.9):

test.f90: In function 'func2':
test.f90:13: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:137
     allocate(func2(3))
 ^
0xba654a tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/tree.c:9061
0x6332dc tree_check3
        ../../gcc/tree.h:3735
0x6332dc gfc_class_vptr_get(tree_node*)
        ../../gcc/fortran/trans-expr.c:137
0x6333cc gfc_vtable_field_get
        ../../gcc/fortran/trans-expr.c:150



program test
  implicit none
  type t
    integer :: ii = 55
  end type t
contains
  function func2()
    class(t), allocatable :: func2(:)
    allocate(func2(3))
    func2%ii = [111,222,333]
  end function func2
end program test


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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-05 17:53 [Bug fortran/57535] New: [OOP] ICE when allocating a CLASS function-result variable burnus at gcc dot gnu.org
2013-06-07 22:06 ` [Bug fortran/57535] " burnus at gcc dot gnu.org
2013-06-11 15:26 ` burnus at gcc dot gnu.org
2013-06-11 15:27 ` burnus at gcc dot gnu.org
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).