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/82979] New: [PDT] [F2003] [ice-on-invalid] ICE (segfault) on invalid type-param-name-list in PDT declaration


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

            Bug ID: 82979
           Summary: [PDT] [F2003] [ice-on-invalid] ICE (segfault) on
                    invalid type-param-name-list in PDT declaration
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: foreese at gcc dot gnu.org
  Target Milestone: ---

Created attachment 42597
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42597&action=edit
test case which causes the ICE

Currently the compiler ICEs due to a segmentation fault when given an invalid
type-param-name-list, such as in the attached file (and shown here):

$ gfortran --version | head -n1
GNU Fortran (GCC) 8.0.0 20171114 (experimental)
$ cat ./test.f03
type :: pdt_t(k=4)
  integer, kind :: k
end type
end
$ gfortran ./test.f03
./test.f03:1:15:

 type :: pdt_t(k=4)
               1
Error: Expected parameter list in type declaration at (1)
f951: internal compiler error: Segmentation fault
0xca9a9f crash_signal
        /data/midas/foreese/src/gcc-dev/gcc/toplev.c:325
0x6d260a delete_root
        /data/midas/foreese/src/gcc-dev/gcc/fortran/bbt.c:150
0x6d27be gfc_delete_bbt(void*, void*, int (*)(void*, void*))
        /data/midas/foreese/src/gcc-dev/gcc/fortran/bbt.c:197
0x789128 gfc_delete_symtree(gfc_symtree**, char const*)
        /data/midas/foreese/src/gcc-dev/gcc/fortran/symbol.c:2925
0x78a8bf gfc_restore_last_undo_checkpoint()
        /data/midas/foreese/src/gcc-dev/gcc/fortran/symbol.c:3694
0x74af47 reject_statement
        /data/midas/foreese/src/gcc-dev/gcc/fortran/parse.c:2546
0x74afa4 match_word
        /data/midas/foreese/src/gcc-dev/gcc/fortran/parse.c:70
0x74e30f decode_statement
        /data/midas/foreese/src/gcc-dev/gcc/fortran/parse.c:565
0x74f32c next_free
        /data/midas/foreese/src/gcc-dev/gcc/fortran/parse.c:1225
0x74f32c next_statement
        /data/midas/foreese/src/gcc-dev/gcc/fortran/parse.c:1457
0x7545f1 gfc_parse_file()
        /data/midas/foreese/src/gcc-dev/gcc/fortran/parse.c:6160
0x7987bf gfc_be_parse_file
        /data/midas/foreese/src/gcc-dev/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]