This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR38065 Fix checking of contained function
- From: Tobias Burnus <burnus at net-b dot de>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Wed, 12 Nov 2008 19:44:57 +0100
- Subject: Re: [Patch, Fortran] PR38065 Fix checking of contained function
- References: <200811121519.mACFJCoq001797@ignucius.se.axis.com>
Hans-Peter Nilsson wrote:
>> 2008-11-11 Tobias Burnus <burnus@net-b.de>
>>
>> PR fortran/38065
>> * resolve.c (resolve_fntype): Fix private derived type checking.
>>
> It looks like your patch caused a regression on all targets, see
> also gcc-testresults:
>
> FAIL: gfortran.dg/private_type_4.f90 -O (test for errors, line 14)
>
Indeed. I wonder why I did not see it with:
make -j2 check-gfortran//unix/{-m64,-m32}
(One answer could be that I might have misread a part result as final
result.) I have now patched gfortran.dg/private_type_4.f90 and verified
using a simple "make check-gfortran".
The patch itself is OK, the test merely needed a "-std=f95" as the
program is valid in Fortran 2003.
Committed the attached patch as obvious (Rev. 141798).
Thanks for the report.
Tobias
Index: testsuite/ChangeLog
===================================================================
--- testsuite/ChangeLog (Revision 141797)
+++ testsuite/ChangeLog (Arbeitskopie)
@@ -1,3 +1,9 @@
+2008-11-12 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/38065
+ PR fortran/38094
+ * gfortran.dg/private_type_4.f90: Add -std=f95 option.
+
2008-11-12 Andreas Krebbel <krebbel1@de.ibm.com>
* gcc.target/s390/frame-addr1.c: New testcase.
Index: testsuite/gfortran.dg/private_type_4.f90
===================================================================
--- testsuite/gfortran.dg/private_type_4.f90 (Revision 141797)
+++ testsuite/gfortran.dg/private_type_4.f90 (Arbeitskopie)
@@ -1,5 +1,8 @@
! { dg-do compile }
+! { dg-options "-std=f95" }
! PR 25093: Check that a PUBLIC function can't be of PRIVATE type
+! in Fortran 95; in Fortran 2003 it is allowed (cf. PR fortran/38065)
+!
module m1
type :: t1