public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/99798] New: ICE when compiling a variant of pr87907
@ 2021-03-27 15:59 dominiq at lps dot ens.fr
  2021-03-27 20:00 ` [Bug fortran/99798] " anlauf at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dominiq at lps dot ens.fr @ 2021-03-27 15:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99798
           Summary: ICE when compiling a variant of pr87907
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dominiq at lps dot ens.fr
  Target Milestone: ---

Compiling the following variant of pr87907

module m
   interface
      module integer function g(x)
         integer, intent(in) :: x
      end
   end interface
end
submodule(m) m2
contains
   subroutine g(x)      ! { dg-error "mismatch in argument" }
     integer, intent(in) :: x
   end
end

gives

% gfc pr87907_db_2.f90
pr87907_db_2.f90:10:15:

   10 |    subroutine g(x)      ! { dg-error "mismatch in argument" }
      |               1
Error: FUNCTION attribute conflicts with SUBROUTINE attribute in 'g' at (1)
pr87907_db_2.f90:11:29:

   11 |      integer, intent(in) :: x
      |                             1
Error: Unexpected data declaration statement in CONTAINS section at (1)
f951: internal compiler error: Segmentation fault: 11

The backtrace is

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x106)
  * frame #0: 0x00000001000ec2b9 f951`gfc_free_statements(p=0x00000000000000f6)
at st.c:295:9
    frame #1: 0x00000001000f53f7 f951`gfc_free_namespace(ns=0x000000014500be00)
at symbol.c:4039:23
    frame #2: 0x00000001000f5a29 f951`gfc_free_symbol(gfc_symbol*) at
symbol.c:4037:3
    frame #3: 0x00000001000f59fc f951`gfc_free_symbol(sym=0x0000000142f0ba50)
    frame #4: 0x00000001000f53b2
f951`::free_sym_tree(sym_tree=0x0000000142f0ba20) at symbol.c:3902:22
    frame #5: 0x00000001000f5400 f951`gfc_free_namespace(ns=0x000000014500a200)
at symbol.c:4041:17
    frame #6: 0x00000001000f7034 f951`gfc_symbol_done_2() at symbol.c:4037:3
    frame #7: 0x00000001000f7016 f951`gfc_symbol_done_2()
    frame #8: 0x0000000100084689 f951`gfc_done_2() at misc.c:380:21
    frame #9: 0x00000001000a422a
f951`::clean_up_modules(gsym=0x0000000142f0b600) at parse.c:6311:14
    frame #10: 0x00000001000b2e17 f951`gfc_parse_file() at parse.c:6374:20
    frame #11: 0x000000010010d987 f951`::gfc_be_parse_file() at
f95-lang.c:212:18
    frame #12: 0x0000000100d1a294 f951`::compile_file() at toplev.c:457:25
    frame #13: 0x000000010120dd9f f951`toplev::main(int, char**) at
toplev.c:2201:24
    frame #14: 0x000000010120da5e f951`toplev::main(this=0x00007ffeefbff09e,
argc=<unavailable>, argv=<unavailable>)
    frame #15: 0x000000010120ffb1 f951`main(argc=2, argv=0x00007ffeefbff0d0) at
main.c:39:22
    frame #16: 0x00007fff2066d621 libdyld.dylib`start + 1

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

end of thread, other threads:[~2024-05-20 20:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-27 15:59 [Bug fortran/99798] New: ICE when compiling a variant of pr87907 dominiq at lps dot ens.fr
2021-03-27 20:00 ` [Bug fortran/99798] " anlauf at gcc dot gnu.org
2023-05-28  5:11 ` kargl at gcc dot gnu.org
2023-07-11 14:56 ` mikael at gcc dot gnu.org
2024-05-11 11:27 ` mikael at gcc dot gnu.org
2024-05-20 20:44 ` cvs-commit 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).