From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 233A23857C7D; Tue, 15 Sep 2020 01:13:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 233A23857C7D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600132401; bh=HyB54rPtjVyFZ9LDlyMoh7RLFYUOJeuQ1yPH1U80/Qc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rwvxv5OUCYs811XmTZ60t8FPnt1CYNiMpffxIYpJZn/Lo11f+puKl6RCIykOAMrO3 fBk718U4qKPuZqlU8dqwn5BCa3ObUeSi/wGKBp1D0OXLVLHPrf1ow/nN6FXY2fNKjf kB5kmIMGWbIHyuOEqidpSa1sZs8VYXzdwYfjJqRo= From: "gilles.gouaillardet at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/97046] Bad interaction between lbound/ubound, allocatable arrays and bind(C) subroutine with dimension(..) parameter Date: Tue, 15 Sep 2020 01:13:21 +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.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gilles.gouaillardet at gmail 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: 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 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: Tue, 15 Sep 2020 01:13:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97046 --- Comment #4 from Gilles Gouaillardet --- I crafted the reproducer based on a previous one that has already been merg= ed, and using a libc subroutine was not an issue back then. https://gcc.gnu.org/git?p=3Dgcc.git;a=3Dblob;f=3Dgcc/testsuite/gfortran.dg/= ISO_Fortran_binding_14.f90;h=3D388c5438252d49342f6bd357850062697fafb7b4;hb= =3D980f185ce3ba6d532530ce0f23bfb6e30320fd8a But I get your point, and you can SUBROUTINE dummyc(x0) BIND(C, name=3D"dummyc") and then in dummyc.c #include "ISO_Fortran_binding.h" void dummyc (CFI_cdesc_t * x){ } This does not change the fact that the test fails with GNU compilers though= .=