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 c++/68045] [concepts] segfault in contains_struct_check ../../gcc/gcc/tree.h:2971


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68045

Vittorio Zecca <zeccav at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zeccav at gmail dot com

--- Comment #1 from Vittorio Zecca <zeccav at gmail dot com> ---
On gfortran 7.0.1 I having the same ICE:

      module abc
      implicit none
      type,abstract::abc_abstract
      contains
      procedure(abc_interface),deferred::abc_function
      end type abc_abstract
      type,extends(abc_abstract)::abc_type
      contains
      procedure::abc_function
      end type abc_type
      abstract interface
      function abc_interface(this)
       import abc_abstract
       class(abc_abstract),intent(in)::this
       character(len=*)::abc_interface
      end function abc_interface
      end interface
      contains
      function abc_function(this)
      class(abc_type),intent(in)::this
      character(len=5)::abc_function
      abc_function="hello"
      end function abc_function
      subroutine do_something(this)
      class(abc_abstract),intent(in)::this
      print *,this%abc_function()
      end subroutine do_something
      end module abc


gfortran gfbug111.f
gfbug111.f:30:0:

       print *,this%abc_function()

internal compiler error: Segmentation fault
0xba9c5f crash_signal
        ../../gcc-7-246252/gcc/toplev.c:337
0x716a88 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc-7-246252/gcc/tree.h:3177
0x716a88 gfc_get_character_type(int, gfc_charlen*)
        ../../gcc-7-246252/gcc/fortran/trans-types.c:1059
0x6c1073 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
        ../../gcc-7-246252/gcc/fortran/trans-expr.c:6007
0x6c212a gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../gcc-7-246252/gcc/fortran/trans-expr.c:7797
0x6ca242 gfc_conv_expr_reference(gfc_se*, gfc_expr*)
        ../../gcc-7-246252/gcc/fortran/trans-expr.c:7897
0x6f15d2 gfc_trans_transfer(gfc_code*)
        ../../gcc-7-246252/gcc/fortran/trans-io.c:2508
0x680de7 trans_code
        ../../gcc-7-246252/gcc/fortran/trans.c:2017
0x6ee252 build_dt
        ../../gcc-7-246252/gcc/fortran/trans-io.c:1986
0x680e07 trans_code
        ../../gcc-7-246252/gcc/fortran/trans.c:1989
0x6b2498 gfc_generate_function_code(gfc_namespace*)
        ../../gcc-7-246252/gcc/fortran/trans-decl.c:6332
0x685d59 gfc_generate_module_code(gfc_namespace*)
        ../../gcc-7-246252/gcc/fortran/trans.c:2195
0x6395fb translate_all_program_units
        ../../gcc-7-246252/gcc/fortran/parse.c:6061
0x6395fb gfc_parse_file()
        ../../gcc-7-246252/gcc/fortran/parse.c:6274
0x67cf6f gfc_be_parse_file
        ../../gcc-7-246252/gcc/fortran/f95-lang.c:204
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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