From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: (qmail 18050 invoked by alias); 10 May 2018 15:19:48 -0000
Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id:
List-Subscribe:
List-Post:
List-Help: ,
Sender: fortran-owner@gcc.gnu.org
Received: (qmail 17433 invoked by uid 89); 10 May 2018 15:19:47 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=int*, UD:html,v, Sounds, rcs
X-Spam-User: qpsmtpd, 2 recipients
X-HELO: mo4-p01-ob.smtp.rzone.de
Received: from mo4-p01-ob.smtp.rzone.de (HELO mo4-p01-ob.smtp.rzone.de) (85.215.255.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 10 May 2018 15:19:45 +0000
X-RZG-AUTH: ":OGckYUunfvGNVUL0FlRnC4eRM+bOwx0tUtYTrJ/xeZX+ZVZvrbiROUdgPG6Qd0k="
X-RZG-CLASS-ID: mo00
Received: from [192.168.178.68] by smtp.strato.de (RZmta 43.8 DYNA|AUTH) with ESMTPSA id e0b03cu4AFJePAz (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Thu, 10 May 2018 17:19:40 +0200 (CEST)
Subject: Re: Document PR 84073 change in /gcc-8/porting_to.html
To: Jonathan Wakely , "fortran@gcc.gnu.org"
Cc: gcc-patches
References: <20180510103333.GV20930@redhat.com>
From: =?UTF-8?Q?Thomas_K=c3=b6nig?=
Message-ID: <53847172-a278-2605-7f7c-05dd6d79dc45@tkoenig.net>
Date: Thu, 10 May 2018 15:19:00 -0000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
MIME-Version: 1.0
In-Reply-To:
Content-Type: multipart/mixed; boundary="------------2AA9F376044E7294BF434378"
X-SW-Source: 2018-05/txt/msg00029.txt.bz2
This is a multi-part message in MIME format.
--------------2AA9F376044E7294BF434378
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Content-length: 597
Am 10.05.2018 um 14:20 schrieb Thomas Koenig:
> Am 10.05.2018 um 12:33 schrieb Jonathan Wakely:
>> Should the fix for PR 84073 be documented, so that users whose code is
>> now rejected understand why, and how to fix it?
>>
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84073
>> https://gcc.gnu.org/gcc-8/porting_to.html#fortran
>
> Sounds like a good idea.
>
> Since I introduced this, I'll do it within a few days (unless, of
> course, somebody beats me to it, which I won't mind :-)
OK, not a few days, but a few hours :-)
Here is the diff. OK to commit to gcc-docs?
Regards
Thomas
--------------2AA9F376044E7294BF434378
Content-Type: text/x-patch;
name="porting.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="porting.diff"
Content-length: 1159
Index: porting_to.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-8/porting_to.html,v
retrieving revision 1.6
diff -u -r1.6 porting_to.html
--- porting_to.html 4 May 2018 06:35:39 -0000 1.6
+++ porting_to.html 10 May 2018 15:16:57 -0000
@@ -196,7 +196,31 @@
void foo_ (char*, int*, fortran_charlen_t);
+
+ Versions of gfortran prior to 8.1 wrongly accepted CHARACTER
+ variables with a length type parameter other than one as C
+ interoperable. For example, the code
+
+ module mod
+ use iso_c_binding
+ type, bind(C) :: a
+ character(len=2,kind=c_char) :: b ! Wrong
+ end type a
+ character(len=2), bind(C) :: c ! Also wrong
+ end module mod
+
+ was accepted. To achieve similar functionality, an array of
+ LEN=1 characters can be used, for example
+
+ module mod
+ use iso_c_binding
+ type, bind(C) :: a
+ character(kind=c_char) :: b(2)
+ end type a
+ character(kind=c_char), bind(C) :: c(2)
+ end module mod
+
+
Links
-