This is the mail archive of the gcc-patches@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]

Re: [patch, fortran] Implement FINDLOC


Hi Thomas,

With your patch, compiling the following test

program logtest3 
   implicit none 
   logical :: x = .true. 
   integer, parameter :: I_FINDLOC_BACK(1) = findloc([1,1],1, & 
      back=x) 
end program logtest3 

gives an ICE

gfc: internal compiler error: Segmentation fault: 11 signal terminated program f951

I see some kind of "infinite" recursion

…
    frame #899971: 0x0000000100037e44 f951`gfc_check_init_expr(gfc_expr*) [inlined] check_init_expr_arguments(e=0x000000014c34bd80) at expr.c:2374
    frame #899972: 0x0000000100037e24 f951`gfc_check_init_expr(gfc_expr*) [inlined] check_conversion(e=0x000000014c34bd80)
    frame #899973: 0x0000000100037e1d f951`gfc_check_init_expr(e=0x000000014c34bd80)
    frame #899974: 0x0000000100037e44 f951`gfc_check_init_expr(gfc_expr*) [inlined] check_init_expr_arguments(e=0x000000014c34bc40) at expr.c:2374
    frame #899975: 0x0000000100037e24 f951`gfc_check_init_expr(gfc_expr*) [inlined] check_conversion(e=0x000000014c34bc40)
    frame #899976: 0x0000000100037e1d f951`gfc_check_init_expr(e=0x000000014c34bc40)
    frame #899977: 0x0000000100037e44 f951`gfc_check_init_expr(gfc_expr*) [inlined] check_init_expr_arguments(e=0x000000014c34bb00) at expr.c:2374
    frame #899978: 0x0000000100037e24 f951`gfc_check_init_expr(gfc_expr*) [inlined] check_conversion(e=0x000000014c34bb00)
    frame #899979: 0x0000000100037e1d f951`gfc_check_init_expr(e=0x000000014c34bb00)
    frame #899980: 0x0000000100037e44 f951`gfc_check_init_expr(gfc_expr*) [inlined] check_init_expr_arguments(e=0x000000014c34b9c0) at expr.c:2374
    frame #899981: 0x0000000100037e24 f951`gfc_check_init_expr(gfc_expr*) [inlined] check_conversion(e=0x000000014c34b9c0)
    frame #899982: 0x0000000100037e1d f951`gfc_check_init_expr(e=0x000000014c34b9c0)

Also in gfortran.dg/findloc_4.f90 should not the lines

  print *,findloc(a,value=1.5,dim=2,back=.true.)
  print *,findloc(a,value=1,dim=1,mask=lo)

converted to tests?

Thanks for working on the implementation of FINDLOC.

Dominique

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