public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/54851] New: Compiling gfortran.dg/class_array_7.f03 with '-O1 -flto' gives an ICE
@ 2012-10-07 21:40 dominiq at lps dot ens.fr
  2012-10-08  7:12 ` [Bug fortran/54851] " janus at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-10-07 21:40 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54851
           Summary: Compiling gfortran.dg/class_array_7.f03 with '-O1
                    -flto' gives an ICE
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dominiq@lps.ens.fr


Compiling gfortran.dg/class_array_7.f03 with '-O1 -flto' gives

In file included from :0:0:
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/class_array_7.f03: In function
'main':
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/class_array_7.f03:49:0: internal
compiler error: in fold_convert_loc, at fold-const.c:1979
   use realloc
 ^

Reduced test case

module realloc
  implicit none

  type :: base_type
     integer :: i
  end type base_type

contains

  character(20) function print_type (name, a)
    character(*), intent(in) :: name
    class(base_type), dimension(:), intent(in) :: a
    select type (a)
     type is (base_type);      print_type = NAME // " is base_type"
    end select
  end function

end module realloc

program main
  use realloc
  implicit none
  class(base_type), dimension(:), allocatable :: a

  allocate (base_type :: a(10))
  if (trim (print_type ("a", a)) .ne. "a is base_type") call abort
end program main


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

end of thread, other threads:[~2014-01-12 11:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-07 21:40 [Bug fortran/54851] New: Compiling gfortran.dg/class_array_7.f03 with '-O1 -flto' gives an ICE dominiq at lps dot ens.fr
2012-10-08  7:12 ` [Bug fortran/54851] " janus at gcc dot gnu.org
2012-10-08  8:14 ` dominiq at lps dot ens.fr
2014-01-12 11:26 ` 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).