From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2315B3858C50; Fri, 14 Oct 2022 18:31:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2315B3858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665772291; bh=IcvPFC+iOapdyKMPOmLsDWeCj3c27XZ6Js3UhoZbrBU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lgSGqES28OObtQliQLlwLSqGqaXfcvILyNE+25PDmlwmnzP8Zd/fxjAqCinF66c0+ ABCJgZ7B1i3yuK3bBgFpqITUSWR1YmZr/lPtYz6wS2dqhV+2sutFr1rIV08kGXxCcU THWFSjLlcy3RwxeNDCmJM/09iqXyG8LHby3yyq00= From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBmb3J0cmFuLzEwNzI2Nl0gUmVqZWN0IGtpbmQ9NCBjaGFy?= =?UTF-8?B?YWN0ZXJzIGZvciBCSU5EKEMpIOKAkyBpdCBpbnZhbGlkIGFuZCBnZW5lcmF0?= =?UTF-8?B?ZXMgd3JvbmcgY29kZQ==?= Date: Fri, 14 Oct 2022 18:31:30 +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: accepts-invalid, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: kargl 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: cc 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=3D107266 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #2 from kargl at gcc dot gnu.org --- (In reply to Tobias Burnus from comment #1) > Better example: >=20 > character(kind=3D4) function f(x) bind(C) > character(kind=3D4), value :: x > end >=20 >=20 > Has the dump: >=20 > __attribute__((fn spec (". w "))) > character(kind=3D1) f (character(kind=3D1) x) > { > (void) 0; > } >=20 >=20 > Note the change to kind=3D1 So, you want gfortran to reject the function. It gets real ugly with function f(x) bind(C) result(a) character(kind=3D4) a character(kind=3D4), value :: x a =3D x end leading to __attribute__((fn spec (". w "))) character(kind=3D1) f (character(kind=3D1) x) { character(kind=3D1) a; *(character(kind=3D4) *) &a =3D *(character(kind=3D4) *) &x; return a; }=