public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/57445] New: [4.8/4.9 Regression][OOP] ICE in gfc_conv_class_to_class - for OPTIONAL polymorphic array
@ 2013-05-28 20:41 burnus at gcc dot gnu.org
  2013-05-28 20:42 ` [Bug fortran/57445] " burnus at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-05-28 20:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57445
           Summary: [4.8/4.9 Regression][OOP] ICE in
                    gfc_conv_class_to_class - for OPTIONAL polymorphic
                    array
           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

Found when working on FINALization. It compiles with GCC 4.7 but fails with GCC
4.8 and 4.9.


The following ICEs when passing an optional polymorphic array as argument to an
optional dummy argument:


finalize_12.f90:12:0: internal compiler error: in gfc_conv_class_to_class, at
fortran/trans-expr.c:740
     call foo_opt(xca=xca)!, xc, xaa, xca)
 ^
0x63c6f9 gfc_conv_class_to_class(gfc_se*, gfc_expr*, gfc_typespec, bool, bool,
bool, bool)
        ../../gcc/fortran/trans-expr.c:740
0x637b72 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
        ../../gcc/fortran/trans-expr.c:4423


module m
  implicit none
  type t
    integer :: i
  end type t
contains
  subroutine opt(xa, xc, xaa, xca)
    type(t),  allocatable, intent(out), optional :: xa
    class(t), allocatable, intent(out), optional :: xc
    type(t),  allocatable, intent(out), optional :: xaa(:)
    class(t), allocatable, intent(out), optional :: xca(:)
    call foo_opt(xca=xca)!, xc, xaa, xca)
  end subroutine opt
  subroutine foo_opt(xa, xc, xaa, xca)
    type(t),  allocatable, intent(out), optional :: xa
    class(t), allocatable, intent(out), optional :: xc
    type(t),  allocatable, intent(out), optional :: xaa(:)
    class(t), allocatable, intent(out), optional :: xca(:)
  end subroutine foo_opt
end module m


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

end of thread, other threads:[~2013-11-30 10:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-28 20:41 [Bug fortran/57445] New: [4.8/4.9 Regression][OOP] ICE in gfc_conv_class_to_class - for OPTIONAL polymorphic array burnus at gcc dot gnu.org
2013-05-28 20:42 ` [Bug fortran/57445] " burnus at gcc dot gnu.org
2013-05-28 22:04 ` dominiq at lps dot ens.fr
2013-05-29  8:31 ` rguenth at gcc dot gnu.org
2013-10-16  9:49 ` jakub at gcc dot gnu.org
2013-11-04 19:44 ` pault at gcc dot gnu.org
2013-11-30 10:59 ` pault at gcc dot gnu.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).