public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/55959] New: [OOP] ICE in in gfc_simplify_expr, at fortran/expr.c:1920
@ 2013-01-13  9:51 janus at gcc dot gnu.org
  2013-01-13  9:59 ` [Bug fortran/55959] " janus at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: janus at gcc dot gnu.org @ 2013-01-13  9:51 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55959
           Summary: [OOP] ICE in in gfc_simplify_expr, at
                    fortran/expr.c:1920
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: janus@gcc.gnu.org


Reported at http://gcc.gnu.org/ml/fortran/2013-01/msg00108.html.

Corrected test case:

module pdfs
    type, abstract :: pdf
        integer dims
    contains
        procedure(getx), deferred :: getx
    end type pdf

    abstract interface
    function getx(this)
        import pdf
        class(pdf), intent(in) :: this
        real getx(this%dims)
    end function getx
    end interface

    type point
        real x, y
    end type point

    type, extends(pdf) :: pdf_point
        type(point) p
    contains
        procedure :: getx => pdf_point_getx
    end type pdf_point

contains

    function pdf_point_getx(this)
        class(pdf_point), intent(in) :: this
        real pdf_point_getx(this%dims)
        pdf_point_getx(1) = this%p%x
        pdf_point_getx(2) = this%p%y
    end function pdf_point_getx

end module pdfs


program abstract
    use pdfs
    type(pdf_point) pp
    namelist /nml_pp/ pp

    print nml_pp
    print pp%getx()

end program abstract 



This produces the following ICE:

f951: internal compiler error: in gfc_simplify_expr, at fortran/expr.c:1920
0x5751ca gfc_simplify_expr(gfc_expr*, int)
        /home/jweil/gcc48/trunk/gcc/fortran/expr.c:1920
0x59ef2a check_io_constraints
        /home/jweil/gcc48/trunk/gcc/fortran/io.c:3560
0x59f50e match_io
        /home/jweil/gcc48/trunk/gcc/fortran/io.c:3758
0x59f60c gfc_match_print()
        /home/jweil/gcc48/trunk/gcc/fortran/io.c:3802
0x5c6c83 match_word
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:65
0x5c8287 decode_statement
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:466
0x5c91d6 next_free
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:777
0x5c9632 next_statement
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:970
0x5cd343 parse_executable
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:3914
0x5cda67 parse_progunit
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:4144
0x5ce590 gfc_parse_file()
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:4548
0x61b4c1 gfc_be_parse_file
        /home/jweil/gcc48/trunk/gcc/fortran/f95-lang.c:189


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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-13  9:51 [Bug fortran/55959] New: [OOP] ICE in in gfc_simplify_expr, at fortran/expr.c:1920 janus at gcc dot gnu.org
2013-01-13  9:59 ` [Bug fortran/55959] " janus at gcc dot gnu.org
2013-01-13 13:01 ` dominiq at lps dot ens.fr
2013-01-13 13:07 ` janus at gcc dot gnu.org
2013-01-30 13:29 ` dominiq at lps dot ens.fr
2013-04-12 19:10 ` janus at gcc dot gnu.org
2013-04-13 11:06 ` 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).