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

* [Bug fortran/54851] Compiling gfortran.dg/class_array_7.f03 with '-O1 -flto' gives an ICE
  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 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: janus at gcc dot gnu.org @ 2012-10-08  7:12 UTC (permalink / raw)
  To: gcc-bugs


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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |janus at gcc dot gnu.org

--- Comment #1 from janus at gcc dot gnu.org 2012-10-08 07:12:33 UTC ---
The following variant even ICEs with "-O0 -flto":


module realloc
  implicit none
  type :: base_type
  end type
contains
  character(20) function print_type (a)
    class(base_type), dimension(:), intent(in) :: a
    print_type = " is base_type"
  end function
end module realloc

program main
  use realloc
  implicit none
  type(base_type), dimension(:), allocatable :: a
  allocate (base_type :: a(2))
  print *,print_type (a)
end program main 



c0.f90: In function ‘MAIN__’:
c0.f90:13:0: error: non-trivial conversion at assignment
 program main
 ^
struct array1_base_type
struct array1_base_type
class.2._data = a;

c0.f90:13:0: internal compiler error: verify_gimple failed
0x96a00e verify_gimple_in_cfg(function*)
        /home/jweil/gcc48/trunk/gcc/tree-cfg.c:4727
0x85acfb execute_function_todo
        /home/jweil/gcc48/trunk/gcc/passes.c:1839
0x85a7cf do_per_function
        /home/jweil/gcc48/trunk/gcc/passes.c:1688
0x85ae1f execute_todo
        /home/jweil/gcc48/trunk/gcc/passes.c:1872
0x85b247 execute_one_ipa_transform_pass
        /home/jweil/gcc48/trunk/gcc/passes.c:2046
0x85b2e9 execute_all_ipa_transforms()
        /home/jweil/gcc48/trunk/gcc/passes.c:2074
0x5b7d06 expand_function
        /home/jweil/gcc48/trunk/gcc/cgraphunit.c:1594
0x5b853d output_in_order
        /home/jweil/gcc48/trunk/gcc/cgraphunit.c:1794
0x5b8c5d compile()
        /home/jweil/gcc48/trunk/gcc/cgraphunit.c:1998
0x51e0b7 lto_main()
        /home/jweil/gcc48/trunk/gcc/lto/lto.c:3340


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

* [Bug fortran/54851] Compiling gfortran.dg/class_array_7.f03 with '-O1 -flto' gives an ICE
  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
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-10-08  8:14 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-08
     Ever Confirmed|0                           |1

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-10-08 08:13:52 UTC ---
> The following variant even ICEs with "-O0 -flto": ...


This kind of ICEs disappear when gfortran is configured with
--enable-checking=release, while the one reported in comment #0 does not.


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

* [Bug fortran/54851] Compiling gfortran.dg/class_array_7.f03 with '-O1 -flto' gives an ICE
  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
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-01-12 11:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
This PR has been fixed between r206354 (ICE) and r206560 (OK) (likely r206461).
Closing as FIXED.


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