This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/54881] [OOP] ICE in fold_convert_loc, at fold-const.c:2016


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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |janus at gcc dot gnu.org
            Summary|ICE in fold_convert_loc, at |[OOP] ICE in
                   |fold-const.c:2016           |fold_convert_loc, at
                   |                            |fold-const.c:2016

--- Comment #2 from janus at gcc dot gnu.org 2012-10-10 08:11:59 UTC ---
While trying to reduce it, I found a version which also ICEs with trunk:

  implicit none

  type treeNode
    type(treeNode), pointer    :: right    => null()
  end type

  type(treeNode), pointer :: theNode
  print *, associated( RightOf(theNode) )

contains

  function RightOf( theNode )
    class(treeNode), pointer :: RightOf
    type(treeNode), target, intent(in)    :: theNode
    RightOf => theNode%right
  end function

end


Apparently, the ICE on the original test case was only prevented by the error
message mentioned by Dominique.


With 4.8 trunk one gets the following output:

CompilerBug.f03:10:0: internal compiler error: in fold_convert_loc, at
fold-const.c:1979
   print *, associated( RightOf(theNode) )
 ^
0x8070d4 fold_convert_loc(unsigned int, tree_node*, tree_node*)
        /home/jweil/gcc48/trunk/gcc/fold-const.c:1979
0x654b90 gfc_conv_associated
        /home/jweil/gcc48/trunk/gcc/fortran/trans-intrinsic.c:5768
0x656501 gfc_conv_intrinsic_function(gfc_se*, gfc_expr*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans-intrinsic.c:6303
0x639461 gfc_conv_function_expr
        /home/jweil/gcc48/trunk/gcc/fortran/trans-expr.c:5127
0x63b4e8 gfc_conv_expr(gfc_se*, gfc_expr*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans-expr.c:5834
0x63b99c gfc_conv_expr_reference(gfc_se*, gfc_expr*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans-expr.c:5963
0x65ecb5 gfc_trans_transfer(gfc_code*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans-io.c:2246
0x5f99da trans_code
        /home/jweil/gcc48/trunk/gcc/fortran/trans.c:1510
0x5f9b37 gfc_trans_code_cond(gfc_code*, tree_node*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans.c:1565
0x65dd2e build_dt
        /home/jweil/gcc48/trunk/gcc/fortran/trans-io.c:1831
0x65de0a gfc_trans_write(gfc_code*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans-io.c:1870
0x5f9953 trans_code
        /home/jweil/gcc48/trunk/gcc/fortran/trans.c:1482
0x5f9b56 gfc_trans_code(gfc_code*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans.c:1573
0x628ccb gfc_generate_function_code(gfc_namespace*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans-decl.c:5353
0x5f9b9a gfc_generate_code(gfc_namespace*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans.c:1590
0x59b241 translate_all_program_units
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:4467
0x59b8a7 gfc_parse_file()
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:4681
0x5e67f4 gfc_be_parse_file
        /home/jweil/gcc48/trunk/gcc/fortran/f95-lang.c:191


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]