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: unassig...@gcc.gnu.org

        ReportedBy: ja...@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

Reply via email to