public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/107426] New: [12/13 Regression] ICE in gfc_compare_derived_types, at fortran/interface.cc:636
@ 2022-10-26 18:40 gscfq@t-online.de
  2022-10-26 19:42 ` [Bug fortran/107426] " anlauf at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: gscfq@t-online.de @ 2022-10-26 18:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107426
           Summary: [12/13 Regression] ICE in gfc_compare_derived_types,
                    at fortran/interface.cc:636
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started between 20210905 and 20210919 :


$ cat z1.f90
module m
contains
   subroutine p() bind(c)
      use, intrinsic :: iso_c_binding
      integer, target :: a = 1
      type(c_ptr) :: z
      interface
         subroutine s(x) bind(cc)   !!
            use, intrinsic :: iso_c_binding
            integer(c_int), value :: x
         end
      end interface
      z = c_loc(a)
      call s(z)
   end
end


$ gfortran-13-20221023 -c z0.f90   # corrected cc -> c at marker !!
z0.f90:14:15:

   14 |       call s(z)
      |               1
Error: Type mismatch in argument 'x' at (1); passed TYPE(c_ptr) to INTEGER(4)


$ gfortran-13-20221023 -c z1.f90
z1.f90:8:32:

    8 |          subroutine s(x) bind(cc)   !!
      |                                1
Error: Missing closing paren for binding label at (1)
z1.f90:9:43:

    9 |             use, intrinsic :: iso_c_binding
      |                                           1
Error: Unexpected USE statement in INTERFACE block at (1)
z1.f90:10:38:

   10 |             integer(c_int), value :: x
      |                                      1
Error: Unexpected data declaration statement in INTERFACE block at (1)
z1.f90:11:12:

   11 |          end
      |            1
Error: END INTERFACE statement expected at (1)
f951: internal compiler error: Segmentation fault
0xf43b3f crash_signal
        ../../gcc/toplev.cc:314
0x806bce gfc_compare_derived_types(gfc_symbol*, gfc_symbol*)
        ../../gcc/fortran/interface.cc:636
0x800803 gfc_check_assign(gfc_expr*, gfc_expr*, int, bool)
        ../../gcc/fortran/expr.cc:3830
0x86d655 resolve_ordinary_assign
        ../../gcc/fortran/resolve.cc:11222
0x87628b gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.cc:12123
0x878307 resolve_codes
        ../../gcc/fortran/resolve.cc:17624
0x87823e resolve_codes
        ../../gcc/fortran/resolve.cc:17607
0x8783ce gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.cc:17659
0x85ff92 gfc_parse_file()
        ../../gcc/fortran/parse.cc:6837
0x8aec0f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:229

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

end of thread, other threads:[~2024-04-02 13:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26 18:40 [Bug fortran/107426] New: [12/13 Regression] ICE in gfc_compare_derived_types, at fortran/interface.cc:636 gscfq@t-online.de
2022-10-26 19:42 ` [Bug fortran/107426] " anlauf at gcc dot gnu.org
2022-10-27  0:22 ` kargl at gcc dot gnu.org
2022-10-28 11:35 ` rguenth at gcc dot gnu.org
2023-03-12 12:31 ` mikael at gcc dot gnu.org
2023-03-12 16:45 ` mikael at gcc dot gnu.org
2023-03-12 16:47 ` mikael at gcc dot gnu.org
2023-03-12 17:31 ` mikael at gcc dot gnu.org
2023-05-08 12:25 ` [Bug fortran/107426] [12/13/14 " rguenth at gcc dot gnu.org
2024-03-22 13:33 ` cvs-commit at gcc dot gnu.org
2024-03-30  9:13 ` pault at gcc dot gnu.org
2024-03-30 10:28 ` mikael at gcc dot gnu.org
2024-03-31 14:25 ` cvs-commit at gcc dot gnu.org
2024-04-02 13:08 ` cvs-commit at gcc dot gnu.org
2024-04-02 13:11 ` cvs-commit at gcc dot gnu.org
2024-04-02 13:13 ` mikael 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).