public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/95088] New: ICE in gfc_build_class_symbol, at fortran/class.c:653
@ 2020-05-12 16:37 gscfq@t-online.de
  2020-06-07 13:44 ` [Bug fortran/95088] " anlauf at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gscfq@t-online.de @ 2020-05-12 16:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95088
           Summary: ICE in gfc_build_class_symbol, at fortran/class.c:653
           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: ---

The search for internal restrictions of names has brought to light 
a few critical cases, in the following case the change occurs between 
61 (ok) and 62 (ICE) :


$ cat z1_61.f90
module m234567890123456789012345678901234567890123456789012345678901
   type t234567890123456789012345678901234567890123456789012345678901 &
      (n234567890123456789012345678901234567890123456789012345678901)
      integer, kind ::
n234567890123456789012345678901234567890123456789012345678901
   end type
   type, extends
(t234567890123456789012345678901234567890123456789012345678901) :: &
      a234567890123456789012345678901234567890123456789012345678901
   end type
   interface
      module subroutine
s234567890123456789012345678901234567890123456789012345678901 &
         (x234567890123456789012345678901234567890123456789012345678901)
        
class(a234567890123456789012345678901234567890123456789012345678901(8)) :: &
            x234567890123456789012345678901234567890123456789012345678901
      end
   end interface
end


$ cat z1_62.f90
module m2345678901234567890123456789012345678901234567890123456789012
   type t2345678901234567890123456789012345678901234567890123456789012 &
      (n2345678901234567890123456789012345678901234567890123456789012)
      integer, kind ::
n2345678901234567890123456789012345678901234567890123456789012
   end type
   type, extends
(t2345678901234567890123456789012345678901234567890123456789012) :: &
      a2345678901234567890123456789012345678901234567890123456789012
   end type
   interface
      module subroutine
s2345678901234567890123456789012345678901234567890123456789012 &
         (x2345678901234567890123456789012345678901234567890123456789012)
        
class(a2345678901234567890123456789012345678901234567890123456789012(8)) :: &
            x2345678901234567890123456789012345678901234567890123456789012
      end
   end interface
end


$ cat z1_63.f90
module m23456789012345678901234567890123456789012345678901234567890123
   type t23456789012345678901234567890123456789012345678901234567890123 &
      (n23456789012345678901234567890123456789012345678901234567890123)
      integer, kind ::
n23456789012345678901234567890123456789012345678901234567890123
   end type
   type, extends
(t23456789012345678901234567890123456789012345678901234567890123) :: &
      a23456789012345678901234567890123456789012345678901234567890123
   end type
   interface
      module subroutine
s23456789012345678901234567890123456789012345678901234567890123 &
         (x23456789012345678901234567890123456789012345678901234567890123)
        
class(a23456789012345678901234567890123456789012345678901234567890123(8)) :: &
            x23456789012345678901234567890123456789012345678901234567890123
      end
   end interface
end


$ gfortran-11-20200510 -c z1_61.f90
$
$ gfortran-11-20200510 -c z1_62.f90
f951: internal compiler error: Segmentation fault
0xbb93cf crash_signal
        ../../gcc/toplev.c:328
0x62fcb8 gfc_build_class_symbol(gfc_typespec*, symbol_attribute*,
gfc_array_spec**)
        ../../gcc/fortran/class.c:653
0x6365ac build_sym
        ../../gcc/fortran/decl.c:1746
0x640e09 variable_decl
        ../../gcc/fortran/decl.c:2780
0x640e09 gfc_match_data_decl()
        ../../gcc/fortran/decl.c:6170
0x6a4533 match_word
        ../../gcc/fortran/parse.c:65
0x6a4533 decode_statement
        ../../gcc/fortran/parse.c:376
0x6a5f7a next_free
        ../../gcc/fortran/parse.c:1279
0x6a5f7a next_statement
        ../../gcc/fortran/parse.c:1511
0x6a8324 parse_spec
        ../../gcc/fortran/parse.c:3738
0x6a7cce parse_interface
        ../../gcc/fortran/parse.c:3601
0x6a7cce parse_spec
        ../../gcc/fortran/parse.c:3875
0x6ab59e parse_module
        ../../gcc/fortran/parse.c:6115
0x6ab8e7 gfc_parse_file()
        ../../gcc/fortran/parse.c:6428
0x6f7a7f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:210

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

* [Bug fortran/95088] ICE in gfc_build_class_symbol, at fortran/class.c:653
  2020-05-12 16:37 [Bug fortran/95088] New: ICE in gfc_build_class_symbol, at fortran/class.c:653 gscfq@t-online.de
@ 2020-06-07 13:44 ` anlauf at gcc dot gnu.org
  2020-06-07 14:49 ` anlauf at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-06-07 13:44 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-06-07
           Assignee|unassigned at gcc dot gnu.org      |anlauf at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
           Priority|P3                          |P4
     Ever confirmed|0                           |1
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #1 from anlauf at gcc dot gnu.org ---
I have a patch that is regtesting.

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

* [Bug fortran/95088] ICE in gfc_build_class_symbol, at fortran/class.c:653
  2020-05-12 16:37 [Bug fortran/95088] New: ICE in gfc_build_class_symbol, at fortran/class.c:653 gscfq@t-online.de
  2020-06-07 13:44 ` [Bug fortran/95088] " anlauf at gcc dot gnu.org
@ 2020-06-07 14:49 ` anlauf at gcc dot gnu.org
  2020-06-14 14:13 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-06-07 14:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from anlauf at gcc dot gnu.org ---
Patch submitted for review:

https://gcc.gnu.org/pipermail/fortran/2020-June/054479.html

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

* [Bug fortran/95088] ICE in gfc_build_class_symbol, at fortran/class.c:653
  2020-05-12 16:37 [Bug fortran/95088] New: ICE in gfc_build_class_symbol, at fortran/class.c:653 gscfq@t-online.de
  2020-06-07 13:44 ` [Bug fortran/95088] " anlauf at gcc dot gnu.org
  2020-06-07 14:49 ` anlauf at gcc dot gnu.org
@ 2020-06-14 14:13 ` cvs-commit at gcc dot gnu.org
  2020-06-17 19:47 ` cvs-commit at gcc dot gnu.org
  2020-06-17 19:57 ` anlauf at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-14 14:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:3ee9d82484bdc0ae5b1b21f4a3d8ff46d40e36fd

commit r11-1298-g3ee9d82484bdc0ae5b1b21f4a3d8ff46d40e36fd
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Sun Jun 14 16:12:47 2020 +0200

    PR fortran/95088 - Buffer overflows with PDTs, submodules and long symbols

    With PDTs (parameterized derived types) and submodules, name mangling
    results in variably long internal symbols.  Instead of using a fixed-size
    intermediate buffer, which is actually not really needed, just use a
    pointer to strings.

    2020-06-14  Harald Anlauf  <anlauf@gmx.de>

    gcc/fortran/
            PR fortran/95088
            * class.c (get_unique_type_string): Replace use of fixed size
            buffer by internally passing a pointer to strings.

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

* [Bug fortran/95088] ICE in gfc_build_class_symbol, at fortran/class.c:653
  2020-05-12 16:37 [Bug fortran/95088] New: ICE in gfc_build_class_symbol, at fortran/class.c:653 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2020-06-14 14:13 ` cvs-commit at gcc dot gnu.org
@ 2020-06-17 19:47 ` cvs-commit at gcc dot gnu.org
  2020-06-17 19:57 ` anlauf at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-17 19:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:55838f7fbd6e0131c2cc38e0eb903551c7fd2401

commit r10-8316-g55838f7fbd6e0131c2cc38e0eb903551c7fd2401
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Sun Jun 14 16:12:47 2020 +0200

    PR fortran/95088 - Buffer overflows with PDTs, submodules and long symbols

    With PDTs (parameterized derived types) and submodules, name mangling
    results in variably long internal symbols.  Instead of using a fixed-size
    intermediate buffer, which is actually not really needed, just use a
    pointer to strings.

    2020-06-14  Harald Anlauf  <anlauf@gmx.de>

    gcc/fortran/
            PR fortran/95088
            * class.c (get_unique_type_string): Replace use of fixed size
            buffer by internally passing a pointer to strings.

    (cherry picked from commit 3ee9d82484bdc0ae5b1b21f4a3d8ff46d40e36fd)

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

* [Bug fortran/95088] ICE in gfc_build_class_symbol, at fortran/class.c:653
  2020-05-12 16:37 [Bug fortran/95088] New: ICE in gfc_build_class_symbol, at fortran/class.c:653 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2020-06-17 19:47 ` cvs-commit at gcc dot gnu.org
@ 2020-06-17 19:57 ` anlauf at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-06-17 19:57 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #5 from anlauf at gcc dot gnu.org ---
Fixed on master for GCC-11, and backported to 10-branch.

Backporting further would require backports of other work, so not done.

Thanks for the report!

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

end of thread, other threads:[~2020-06-17 19:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12 16:37 [Bug fortran/95088] New: ICE in gfc_build_class_symbol, at fortran/class.c:653 gscfq@t-online.de
2020-06-07 13:44 ` [Bug fortran/95088] " anlauf at gcc dot gnu.org
2020-06-07 14:49 ` anlauf at gcc dot gnu.org
2020-06-14 14:13 ` cvs-commit at gcc dot gnu.org
2020-06-17 19:47 ` cvs-commit at gcc dot gnu.org
2020-06-17 19:57 ` anlauf 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).