public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/95586] New: ICE in gfc_validate_kind, at fortran/trans-types.c:773
@ 2020-06-08 18:49 gscfq@t-online.de
  2020-06-08 22:00 ` [Bug fortran/95586] " dominiq at lps dot ens.fr
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gscfq@t-online.de @ 2020-06-08 18:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95586
           Summary: ICE in gfc_validate_kind, at fortran/trans-types.c:773
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to at least r5 :


$ cat z1.f90
program p
   implicit type(t) (1)
   type t
   end type
end


$ cat z2.f90
program p
   integer n1
   parameter (n1 = 1)
   implicit type(t) (n1)
   type t
   end type
end


$ gfortran-11-20200607 -c z1.f90
f951: internal compiler error: gfc_validate_kind(): Got bad type
0x654af9 gfc_report_diagnostic
        ../../gcc/fortran/error.c:782
0x65621a gfc_internal_error(char const*, ...)
        ../../gcc/fortran/error.c:1402
0x77d9a7 gfc_validate_kind(bt, int, bool)
        ../../gcc/fortran/trans-types.c:773
0x63f621 gfc_match_kind_spec(gfc_typespec*, bool)
        ../../gcc/fortran/decl.c:3191
0x646967 gfc_match_implicit()
        ../../gcc/fortran/decl.c:4832
0x6a8191 match_word
        ../../gcc/fortran/parse.c:65
0x6ac309 decode_statement
        ../../gcc/fortran/parse.c:508
0x6acf5a next_free
        ../../gcc/fortran/parse.c:1279
0x6acf5a next_statement
        ../../gcc/fortran/parse.c:1511
0x6af304 parse_spec
        ../../gcc/fortran/parse.c:3738
0x6b137c parse_progunit
        ../../gcc/fortran/parse.c:5851
0x6b2a59 gfc_parse_file()
        ../../gcc/fortran/parse.c:6392
0x6feb3f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:212

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug fortran/95586] ICE in gfc_validate_kind, at fortran/trans-types.c:773
  2020-06-08 18:49 [Bug fortran/95586] New: ICE in gfc_validate_kind, at fortran/trans-types.c:773 gscfq@t-online.de
@ 2020-06-08 22:00 ` dominiq at lps dot ens.fr
  2020-06-09  1:35 ` kargl at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-06-08 22:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-06-08
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug fortran/95586] ICE in gfc_validate_kind, at fortran/trans-types.c:773
  2020-06-08 18:49 [Bug fortran/95586] New: ICE in gfc_validate_kind, at fortran/trans-types.c:773 gscfq@t-online.de
  2020-06-08 22:00 ` [Bug fortran/95586] " dominiq at lps dot ens.fr
@ 2020-06-09  1:35 ` kargl at gcc dot gnu.org
  2020-06-23  6:07 ` cvs-commit at gcc dot gnu.org
  2020-06-23  8:48 ` markeggleston at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: kargl at gcc dot gnu.org @ 2020-06-09  1:35 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org ---
Index: gcc/fortran/decl.c
===================================================================
--- gcc/fortran/decl.c  (revision 280157)
+++ gcc/fortran/decl.c  (working copy)
@@ -4764,7 +4764,7 @@ gfc_match_implicit (void)
       /* Last chance -- check <TYPE> <SELECTOR> (<RANGE>).  */
       if (ts.type == BT_CHARACTER)
        m = gfc_match_char_spec (&ts);
-      else
+      else if (ts.type != BT_DERIVED)
        {
          m = gfc_match_kind_spec (&ts, false);
          if (m == MATCH_NO)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug fortran/95586] ICE in gfc_validate_kind, at fortran/trans-types.c:773
  2020-06-08 18:49 [Bug fortran/95586] New: ICE in gfc_validate_kind, at fortran/trans-types.c:773 gscfq@t-online.de
  2020-06-08 22:00 ` [Bug fortran/95586] " dominiq at lps dot ens.fr
  2020-06-09  1:35 ` kargl at gcc dot gnu.org
@ 2020-06-23  6:07 ` cvs-commit at gcc dot gnu.org
  2020-06-23  8:48 ` markeggleston at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-23  6:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Mark Eggleston
<markeggleston@gcc.gnu.org>:

https://gcc.gnu.org/g:384aa890255dc01ba6d6529b127975c2c9a49a3c

commit r11-1594-g384aa890255dc01ba6d6529b127975c2c9a49a3c
Author: Mark Eggleston <markeggleston@gcc.gnu.org>
Date:   Wed Jun 10 16:18:23 2020 +0100

    Fortran  :  ICE in gfc_validate_kind PR95586

    Report syntax error for invalid letter-spec in IMPLICIT statements
    for derived types and not an ICE.

    Original patch by Steve Kargl.  Added test cases based on those
    provided by G. Steinmetz  in the PR.

    2020-06-23  Steven G. Kargl  <kargl@gcc.gnu.org>

    gcc/fortran/

            PR fortran/95586
            * decl.c (gfc_match_implicit): Only perform else branch if
            the type spect is not BT_DERIVED.

    2020-06-23  Mark Eggleston  <markeggleston@gcc.gnu.org>

    gcc/testsuite/

            PR fortran/95586
            * gfortran.dg/pr95586_1.f90: New test.
            * gfortran.dg/pr95586_2.f90: New test.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug fortran/95586] ICE in gfc_validate_kind, at fortran/trans-types.c:773
  2020-06-08 18:49 [Bug fortran/95586] New: ICE in gfc_validate_kind, at fortran/trans-types.c:773 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2020-06-23  6:07 ` cvs-commit at gcc dot gnu.org
@ 2020-06-23  8:48 ` markeggleston at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: markeggleston at gcc dot gnu.org @ 2020-06-23  8:48 UTC (permalink / raw)
  To: gcc-bugs

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

markeggleston at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markeggleston at gcc dot gnu.org
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #4 from markeggleston at gcc dot gnu.org ---
Committed to master.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-23  8:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-08 18:49 [Bug fortran/95586] New: ICE in gfc_validate_kind, at fortran/trans-types.c:773 gscfq@t-online.de
2020-06-08 22:00 ` [Bug fortran/95586] " dominiq at lps dot ens.fr
2020-06-09  1:35 ` kargl at gcc dot gnu.org
2020-06-23  6:07 ` cvs-commit at gcc dot gnu.org
2020-06-23  8:48 ` markeggleston at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).