From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DA74F3858C50; Tue, 1 Nov 2022 20:54:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA74F3858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667336080; bh=tJezfdshSGsjrlUTQEXUSawautsCzhfujX9H5tRI+jQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZeGc1jw3GrCLufwGvIO3TAJsrM23GfDSlqxkimXValZQX80RCS+dk6s7dI1xlqBt9 CBuPqhWjqe0MbHZ882xY59cqhBHpSVCoDc+eeEzRgwzufc4fBKHqlxuSmCMtaiLZAL veqs+4zPxXYt0Wtpf100FFSEJTUTiHHel8PI2XKs= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107444] ICE on character, value, optional dummy argument Date: Tue, 01 Nov 2022 20:54:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org 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: keywords Message-ID: In-Reply-To: References: 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=3D107444 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code --- Comment #2 from anlauf at gcc dot gnu.org --- OK, here's a better example of the weird situation: program p call s() call s(i=3D7) call s(c=3D'a') call s(r=3D3.0) contains subroutine s (i,c,r) integer , value, optional :: i character, value, optional :: c real , value, optional :: r print *, "present (i), present (r) =3D", present (i), present (r) end subroutine s end With 12-branch this prints: present (i), present (r) =3D F F present (i), present (r) =3D T F present (i), present (r) =3D F F ! right but for the wrong reason... present (i), present (r) =3D F F ! should be F T With 13-mainline + patch under review for pr107441(v2) I get: present (i), present (r) =3D F F present (i), present (r) =3D T F present (i), present (r) =3D F T ! should be F F present (i), present (r) =3D F T ! right but for the wrong reason... So not a regression... ;-)=