This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fortran-experiments: patch for more error checking


> On Tue, Jan 23, 2007 at 04:29:35PM -0700, Christopher D. Rickett wrote:
>> i did an svn update, and i am at revision 121090 it says.  i then did
>> the
>> svn diff as you requested.  it is attached.
>>
>> Index: gcc/testsuite/gfortran.dg/bind_c_usage_3.f03
>> ===================================================================
>> --- gcc/testsuite/gfortran.dg/bind_c_usage_3.f03	(revision 0)
>> +++ gcc/testsuite/gfortran.dg/bind_c_usage_3.f03	(revision 0)
>> @@ -0,0 +1,16 @@
>> +! { dg-do compile }
>> +module test
>> +  use, intrinsic :: iso_c_binding
>> +
>> +  type, bind(c) :: my_c_type
>> +     integer(c_int), pointer :: ptr ! { dg-error "cannot have the
>> POINTER attribute" }
>> +  end type my_c_type ! { dg-error "BIND.C. derived type" }
>> +
>> +  type foo ! { dg-error "must have the BIND attribute" }
>> +    integer(c_int) :: p
>> +  end type foo
>> +
>> +  type(foo), bind(c) :: cp ! { dg-error "is not C interoperable" }
>> +  real(c_double), pointer,bind(c) :: p ! { dg-error "cannot have both
>> the POINTER and BIND.C." }
>> +end module test
>> +
>
> Hi Chris,
>
> For whatever reason, my version of patch created 3 copies of the
> bodies of the two testcases.  When I manually edited those file
> back to your intended tests everything worked out.  I commit the
> patch tonight.
>

thanks for getting this done so fast Steve.

Chris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]