[Bug fortran/91715] New: ICE in resolve_fntype, at fortran/resolve.c:16884

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

[Bug fortran/91715] New: ICE in resolve_fntype, at fortran/resolve.c:16884

danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91715

            Bug ID: 91715
           Summary: ICE in resolve_fntype, at fortran/resolve.c:16884
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: [hidden email]
  Target Milestone: ---

With a typo, down to at least gfortran-5.


$ cat z1.f90
character(1function f()
end


$ gfortran-10-20190901 -c z1.f90
f951: internal compiler error: Segmentation fault
0xcb928f crash_signal
        ../../gcc/toplev.c:326
0x6af81c resolve_fntype
        ../../gcc/fortran/resolve.c:16884
0x6af81c resolve_types
        ../../gcc/fortran/resolve.c:17027
0x6b349c gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:17140
0x6a196c resolve_all_program_units
        ../../gcc/fortran/parse.c:6193
0x6a196c gfc_parse_file()
        ../../gcc/fortran/parse.c:6440
0x6eca8f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:204
Reply | Threaded
Open this post in threaded view
|

[Bug fortran/91715] ICE in resolve_fntype, at fortran/resolve.c:16884

danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91715

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-09-16
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
From 4.8 up to 6 I get the following ICE

f951: internal compiler error: gfc_validate_kind(): Got bad kind

I get the reported error starting at gcc7 up to trunk (10.0).
Reply | Threaded
Open this post in threaded view
|

[Bug fortran/91715] ICE in resolve_fntype, at fortran/resolve.c:16884

danglin at gcc dot gnu.org
In reply to this post by danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91715

--- Comment #2 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Fri Oct 11 17:59:09 2019
New Revision: 276899

URL: https://gcc.gnu.org/viewcvs?rev=276899&root=gcc&view=rev
Log:
2019-10-11  Steven G. Kargl  <[hidden email]>

        PR fortran/91715
        * decl.c (gfc_match_prefix): If matching a type-spec returns an error,
        it's an error so re-act correctly.

2019-10-11  Steven G. Kargl  <[hidden email]>

        PR fortran/91715
        * gfortran.dg/function_kinds_5.f90: Prune run-on error.
        * gfortran.dg/pr85543.f90: Ditto.
        * gfortran.dg/pr91715.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/pr91715.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/function_kinds_5.f90
    trunk/gcc/testsuite/gfortran.dg/pr85543.f90
Reply | Threaded
Open this post in threaded view
|

[Bug fortran/91715] ICE in resolve_fntype, at fortran/resolve.c:16884

danglin at gcc dot gnu.org
In reply to this post by danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91715

--- Comment #3 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Fri Oct 11 20:19:28 2019
New Revision: 276905

URL: https://gcc.gnu.org/viewcvs?rev=276905&root=gcc&view=rev
Log:
2019-10-11  Steven G. Kargl  <[hidden email]>

        PR fortran/91715
        * decl.c (gfc_match_prefix): If matching a type-spec returns an error,
        it's an error so re-act correctly.

2019-10-11  Steven G. Kargl  <[hidden email]>

        PR fortran/91715
        * gfortran.dg/function_kinds_5.f90: Prune run-on error.
        * gfortran.dg/pr85543.f90: Ditto.
        * gfortran.dg/pr91715.f90: New test.

Added:
    branches/gcc-9-branch/gcc/testsuite/gfortran.dg/pr91715.f90
Modified:
    branches/gcc-9-branch/gcc/fortran/ChangeLog
    branches/gcc-9-branch/gcc/fortran/decl.c
    branches/gcc-9-branch/gcc/testsuite/ChangeLog
    branches/gcc-9-branch/gcc/testsuite/gfortran.dg/function_kinds_5.f90
    branches/gcc-9-branch/gcc/testsuite/gfortran.dg/pr85543.f90
Reply | Threaded
Open this post in threaded view
|

[Bug fortran/91715] ICE in resolve_fntype, at fortran/resolve.c:16884

danglin at gcc dot gnu.org
In reply to this post by danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91715

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
             Status|NEW                         |RESOLVED
                 CC|                            |kargl at gcc dot gnu.org
         Resolution|---                         |FIXED
   Target Milestone|---                         |9.3

--- Comment #4 from kargl at gcc dot gnu.org ---
Fixed on trunk and 9-branch.  Closing.  Thanks for bug report.