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/78500] New: ICE in gfc_check_vardef_context, at fortran/expr.c:5289


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

            Bug ID: 78500
           Summary: ICE in gfc_check_vardef_context, at
                    fortran/expr.c:5289
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

With invalid code down to at least 4.8 :
(configured with --enable-checking=yes)


$ cat z1.f90
class(t) function f()
   f = 1
end


$ gfortran-7-20161120 -c z1.f90
z1.f90:1:0:

 class(t) function f()

Error: CLASS variable 'f' at (1) must be dummy, allocatable or pointer
f951: internal compiler error: Segmentation fault
0xc4265f crash_signal
        ../../gcc/toplev.c:333
0x69642c gfc_check_vardef_context(gfc_expr*, bool, bool, bool, char const*)
        ../../gcc/fortran/expr.c:5289
0x6f81e6 gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:10915
0x6fab92 resolve_codes
        ../../gcc/fortran/resolve.c:16025
0x6fac8e gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:16060
0x6e520a resolve_all_program_units
        ../../gcc/fortran/parse.c:5977
0x6e520a gfc_parse_file()
        ../../gcc/fortran/parse.c:6224
0x729052 gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:202

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