From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A369D3858D1E; Tue, 4 Oct 2022 05:18:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A369D3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664860732; bh=f0gvn25ZAKOUbF+8dcr1em01ecqfs8itxepPVnL/A2A=; h=From:To:Subject:Date:From; b=Ubrw2o3t2+wAMlymNDTF7/LaXhanA7k4CUwv2vcqLOodIBOeBTCVXZTkmMb0JI40P kitgjAw8myIk7suM2//qbw1ADtnLGmuubFexv9tDJ97Da6FhkwSvjfeyMOeZdSm3Q5 GWg3hhkLgOoqG/uvH7sXaL34rGryiBFP3kOO5sPg= From: "asolokha at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107145] New: Indefinite recursion in gfc_check_dummy_characteristics/gfc_compare_interfaces Date: Tue, 04 Oct 2022 05:18:52 +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: 13.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: asolokha at gmx dot com 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 keywords 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107145 Bug ID: 107145 Summary: Indefinite recursion in gfc_check_dummy_characteristics/gfc_compare_interfaces Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- gfortran 13.0.0 20220925 snapshot (g:77bbf69d2981dafc2ef3e59bfbefb645d88bab= 9d) ICEs when compiling the following testcase, extracted from test/Semantics/resolve102.f90 from the flang 15.0.1 test suite: subroutine circular procedure(sub) :: p call p(sub) contains subroutine sub(p2) procedure(p) :: p2 end subroutine end subroutine circular % gfortran-13.0.0 -c ckmbwiwb.f90 gfortran-13.0.0: internal compiler error: Segmentation fault signal termina= ted program f951 Please submit a full bug report, with preprocessed source (by using -freport-bug). See for instructions. zsh: exit 4 gfortran-13.0.0 -c ckmbwiwb.f90 (gdb) where 10 #0 gfc_check_dummy_characteristics (s1=3D0x2e52450, s2=3D0x2e52450, type_must_agree=3Dtype_must_agree@entry=3Dtrue, errmsg=3Derrmsg@entry=3D0x7ffffbfff130 "", err_len=3Derr_len@entry=3D20= 0) at /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fo= rtran/interface.cc:1340 #1 0x00000000008cc6ba in gfc_check_dummy_characteristics (err_len=3D200, errmsg=3D0x7ffffbfff130 "", type_must_agree=3Dtrue, s2=3D, s1=3D) at /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fo= rtran/interface.cc:1334 #2 gfc_compare_interfaces (s1=3D, s2=3D, name2=3D0x7ffff79a90d8 "p2", generic_flag=3D0, strict_flag=3D, errmsg=3D0x7ffffbfff130 "", err_len=3D20= 0, p1=3D0x0, p2=3D0x0, bad_result_characteristics=3D) at /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fo= rtran/interface.cc:1825 #3 0x00000000008cd0a7 in gfc_check_dummy_characteristics (s1=3D0x2e52450, s2=3D0x2e52450, type_must_agree=3Dtype_must_agree@entry=3Dtrue, errmsg=3Derrmsg@entry=3D0x7ffffbfff2c0 "", err_len=3Derr_len@entry=3D20= 0) at /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fo= rtran/interface.cc:1433 #4 0x00000000008cc6ba in gfc_check_dummy_characteristics (err_len=3D200, errmsg=3D0x7ffffbfff2c0 "", type_must_agree=3Dtrue, s2=3D, s1=3D) at /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fo= rtran/interface.cc:1334 #5 gfc_compare_interfaces (s1=3D, s2=3D, name2=3D0x7ffff79a90d8 "p2", generic_flag=3D0, strict_flag=3D, errmsg=3D0x7ffffbfff2c0 "", err_len=3D20= 0, p1=3D0x0, p2=3D0x0, bad_result_characteristics=3D) at /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fo= rtran/interface.cc:1825 #6 0x00000000008cd0a7 in gfc_check_dummy_characteristics (s1=3D0x2e52450, s2=3D0x2e52450, type_must_agree=3Dtype_must_agree@entry=3Dtrue, errmsg=3Derrmsg@entry=3D0x7ffffbfff450 "", err_len=3Derr_len@entry=3D20= 0) at /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fo= rtran/interface.cc:1433 #7 0x00000000008cc6ba in gfc_check_dummy_characteristics (err_len=3D200, errmsg=3D0x7ffffbfff450 "", type_must_agree=3Dtrue, s2=3D, s1=3D) at /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fo= rtran/interface.cc:1334 #8 gfc_compare_interfaces (s1=3D, s2=3D, name2=3D0x7ffff79a90d8 "p2", generic_flag=3D0, strict_flag=3D, errmsg=3D0x7ffffbfff450 "", err_len=3D20= 0, p1=3D0x0, p2=3D0x0, bad_result_characteristics=3D) at /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fo= rtran/interface.cc:1825 #9 0x00000000008cd0a7 in gfc_check_dummy_characteristics (s1=3D0x2e52450, s2=3D0x2e52450, type_must_agree=3Dtype_must_agree@entry=3Dtrue, errmsg=3Derrmsg@entry=3D0x7ffffbfff5e0 "", err_len=3Derr_len@entry=3D20= 0) at /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fo= rtran/interface.cc:1433 (More stack frames follow...) (gdb) where -1 #503274 0x000000000088004b in main (argc=3D14, argv=3D0x7fffffffd9b8) at /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/ma= in.cc:39=