[Bug fortran/87946] New: [7/8/9 Regression] ICE in gfc_walk_array_ref, at fortran/trans-array.c:10506

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug fortran/87946] New: [7/8/9 Regression] ICE in gfc_walk_array_ref, at fortran/trans-array.c:10506

asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87946

            Bug ID: 87946
           Summary: [7/8/9 Regression] ICE in gfc_walk_array_ref, at
                    fortran/trans-array.c:10506
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: [hidden email]
  Target Milestone: ---

Affects versions 7 to 9.
Compiles with "type(t), allocatable :: u(:)" instead of class...


$ cat z1.f90
module m
   type t
   contains
      generic :: h => g
      procedure, private :: g
   end type
contains
   function g(x, y) result(z)
      class(t), intent(in) :: x
      real, intent(in) :: y(:, :)
      real :: z(size(y, 2))
   end
end
module m2
   use m
   type t2
      class(t), allocatable :: u(:)
   end type
end
function f(x, y) result(z)
   use m2
   type(t2) :: x
   real :: y(:, :)
   real :: z(size(y, 2))
   z = x%u(1)%h(y)
end


$ gfortran-6 -c z1.f90
$
$ gfortran-9-20181104 -c z1.f90
z1.f90:25:0:

   25 |    z = x%u(1)%h(y)
      |
internal compiler error: Segmentation fault
0xb205df crash_signal
        ../../gcc/toplev.c:325
0x6ce11f gfc_walk_array_ref(gfc_ss*, gfc_expr*, gfc_ref*)
        ../../gcc/fortran/trans-array.c:10506
0x6cfda9 gfc_walk_expr(gfc_expr*)
        ../../gcc/fortran/trans-array.c:10886
0x6cfda9 gfc_conv_expr_descriptor(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-array.c:7087
0x6ffb41 gfc_conv_intrinsic_size
        ../../gcc/fortran/trans-intrinsic.c:7144
0x71549b gfc_conv_intrinsic_function(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-intrinsic.c:9754
0x6f9a54 gfc_conv_function_expr
        ../../gcc/fortran/trans-expr.c:6905
0x6ee0aa gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-expr.c:8039
0x6f010a gfc_apply_interface_mapping(gfc_interface_mapping*, gfc_se*,
gfc_expr*)
        ../../gcc/fortran/trans-expr.c:4451
0x6c5d07 gfc_set_loop_bounds_from_array_spec(gfc_interface_mapping*, gfc_se*,
gfc_array_spec*)
        ../../gcc/fortran/trans-array.c:932
0x6f84a5 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
        ../../gcc/fortran/trans-expr.c:6147
0x6f9a3c gfc_conv_function_expr
        ../../gcc/fortran/trans-expr.c:6928
0x6ee0aa gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-expr.c:8039
0x6cf080 gfc_add_loop_ss_code
        ../../gcc/fortran/trans-array.c:2815
0x6cfc25 gfc_conv_loop_setup(gfc_loopinfo*, locus*)
        ../../gcc/fortran/trans-array.c:5129
0x6fc69b gfc_trans_assignment_1
        ../../gcc/fortran/trans-expr.c:10208
0x6bf54f trans_code
        ../../gcc/fortran/trans.c:1822
0x6e6e14 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6509
0x6740a6 translate_all_program_units
        ../../gcc/fortran/parse.c:6125
0x6740a6 gfc_parse_file()
        ../../gcc/fortran/parse.c:6328
Reply | Threaded
Open this post in threaded view
|

[Bug fortran/87946] [7/8/9 Regression] ICE in gfc_walk_array_ref, at fortran/trans-array.c:10506

asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87946

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
   Target Milestone|---                         |7.4
Reply | Threaded
Open this post in threaded view
|

[Bug fortran/87946] [7/8/9 Regression] ICE in gfc_walk_array_ref, at fortran/trans-array.c:10506

asolokha at gmx dot com
In reply to this post by asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87946

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-11-14
                 CC|                            |pault at gcc dot gnu.org
      Known to work|                            |6.4.0
     Ever confirmed|0                           |1
      Known to fail|                            |7.3.0, 8.2.0, 9.0

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Could be caused by r241450 (pr69834).
Reply | Threaded
Open this post in threaded view
|

[Bug fortran/87946] [7/8/9 Regression] ICE in gfc_walk_array_ref, at fortran/trans-array.c:10506

asolokha at gmx dot com
In reply to this post by asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87946

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|7.4                         |7.5