From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5DA7B3858CDA; Thu, 27 Apr 2023 19:21:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5DA7B3858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682623274; bh=YlUgDdyCSZkFTbGlkxVs8BWIl7Vxh5/TBSy9tKqsnP4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vppCwMqkwTXtlVhE/8YCXCrAXhJiLcGaOJ1WGQl4CMgiLx63jgp9Y4wycIsARXNYq bFW0wgDi4kiAcxZXumhFo6Lyn8cvpo23Y29OAAuJkh326Fmh9qK6BOwKGxS+ePiSyC ln9PBM/wEpXD3hDOy4O/PQOfkRShx36a4xaPk+K4= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/109641] Gfortran fails to overload intrinsic operator (*) if operands are complex. It works with real ones. Date: Thu, 27 Apr 2023 19:21:14 +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: 10.1.0 X-Bugzilla-Keywords: accepts-invalid, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D109641 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid --- Comment #2 from anlauf at gcc dot gnu.org --- Replacing the first argument of FUNCTION MULTc4(v,m) REAL, INTENT(IN) :: v(:) by complex, INTENT(IN) :: v(:) makes the code compile, but should not. And the fortran-dump appears to explain why: we prematurely convert the first argument in the expression r=3Dv*m from real to complex, so we resolve to the wrong specific. This also explains why real*real does not exhibit this problem.=