public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/64244] New: internal compiler error at class.c:236 when using non_overridable
@ 2014-12-09 22:06 ondrej.certik at gmail dot com
  2014-12-09 22:32 ` [Bug fortran/64244] [4.8/4.9/5 Regression] " dominiq at lps dot ens.fr
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: ondrej.certik at gmail dot com @ 2014-12-09 22:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64244

            Bug ID: 64244
           Summary: internal compiler error at class.c:236 when using
                    non_overridable
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ondrej.certik at gmail dot com

Created attachment 34235
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34235&action=edit
Test program to trigger ICE

This test file (also attached) produces ICE:

$ cat test_non_overridable.f90 
module m
implicit none

type :: A
contains
    generic :: f => g
    procedure, non_overridable :: g
end type

contains

subroutine g(this)
class(A), intent(in) :: this
end subroutine

end module


program test_non_overridable
use m, only: A
implicit none
class(A), allocatable :: h
call h%f()
end program


$ gfortran test_non_overridable.f90 
f951: internal compiler error: in gfc_add_component_ref, at fortran/class.c:236
0x543cf7 gfc_add_component_ref(gfc_expr*, char const*)
    ../.././gcc/fortran/class.c:236
0x5b4c07 resolve_typebound_subroutine
    ../.././gcc/fortran/resolve.c:5942
0x5b4c07 gfc_resolve_code(gfc_code*, gfc_namespace*)
    ../.././gcc/fortran/resolve.c:9966
0x5b72aa resolve_codes
    ../.././gcc/fortran/resolve.c:14719
0x5b7392 gfc_resolve
    ../.././gcc/fortran/resolve.c:14747
0x5a2e5a resolve_all_program_units
    ../.././gcc/fortran/parse.c:4886
0x5a2e5a gfc_parse_file()
    ../.././gcc/fortran/parse.c:5135
0x5e00f5 gfc_be_parse_file
    ../.././gcc/fortran/f95-lang.c:212
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

This affects gfortran 4.9.2, I also tried gfortran 4.7.2 which gives:

$ gfortran test_non_overridable.f90 
f951: internal compiler error: in gfc_add_component_ref, at fortran/class.c:209
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


When you remove the "non_overridable" keyword, it compiles. I wasn't able to
simplify the test case further.


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

end of thread, other threads:[~2014-12-23 19:37 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-09 22:06 [Bug fortran/64244] New: internal compiler error at class.c:236 when using non_overridable ondrej.certik at gmail dot com
2014-12-09 22:32 ` [Bug fortran/64244] [4.8/4.9/5 Regression] " dominiq at lps dot ens.fr
2014-12-15 13:28 ` [Bug fortran/64244] [4.8/4.9/5 Regression] ICE " janus at gcc dot gnu.org
2014-12-15 13:54 ` janus at gcc dot gnu.org
2014-12-15 15:30 ` janus at gcc dot gnu.org
2014-12-15 15:56 ` janus at gcc dot gnu.org
2014-12-15 20:14 ` janus at gcc dot gnu.org
2014-12-16  8:16 ` janus at gcc dot gnu.org
2014-12-16  8:23 ` janus at gcc dot gnu.org
2014-12-16 16:41 ` ondrej.certik at gmail dot com
2014-12-16 16:47 ` janus at gcc dot gnu.org
2014-12-16 17:24 ` ondrej.certik at gmail dot com
2014-12-16 20:46 ` janus at gcc dot gnu.org
2014-12-16 23:57 ` ondrej.certik at gmail dot com
2014-12-23 10:52 ` janus at gcc dot gnu.org
2014-12-23 19:07 ` janus at gcc dot gnu.org
2014-12-23 19:37 ` janus 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).