From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8D034385801A; Sat, 27 Mar 2021 15:59:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D034385801A From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/99798] New: ICE when compiling a variant of pr87907 Date: Sat, 27 Mar 2021 15:59:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Mar 2021 15:59:43 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99798 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 =3D 'com.apple.main-thread', stop reason =3D EXC_BAD_ACC= ESS (code=3D1, address=3D0x106) * frame #0: 0x00000001000ec2b9 f951`gfc_free_statements(p=3D0x00000000000= 000f6) at st.c:295:9 frame #1: 0x00000001000f53f7 f951`gfc_free_namespace(ns=3D0x00000001450= 0be00) 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=3D0x0000000142f0b= a50) frame #4: 0x00000001000f53b2 f951`::free_sym_tree(sym_tree=3D0x0000000142f0ba20) at symbol.c:3902:22 frame #5: 0x00000001000f5400 f951`gfc_free_namespace(ns=3D0x00000001450= 0a200) 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=3D0x0000000142f0b600) 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=3D0x00007ffeefbff0= 9e, argc=3D, argv=3D) frame #15: 0x000000010120ffb1 f951`main(argc=3D2, argv=3D0x00007ffeefbf= f0d0) at main.c:39:22 frame #16: 0x00007fff2066d621 libdyld.dylib`start + 1=