Re: [Patch, fortran] PR fortran/92142 - CFI_setpointer corrupts descriptor

2019-11-11 Thread Tobias Burnus
On 11/11/19 2:58 PM, Mark Eggleston wrote: Unfortunately ISO_Fortran_binding_16.f90 contains a typo resulting in: the cause is that it refers to ISO_Fortran_binding_15.c instead of ISO_Fortran_binding_16.c in the dg-additional-sources directive. I was sure that I tested it and committed the r

Re: [Patch, fortran] PR fortran/92142 - CFI_setpointer corrupts descriptor

2019-11-11 Thread Mark Eggleston
Unfortunately ISO_Fortran_binding_16.f90 contains a typo resulting in: FAIL: gfortran.dg/ISO_Fortran_binding_16.f90   -O0  (test for excess errors) FAIL: gfortran.dg/ISO_Fortran_binding_16.f90   -O1  (test for excess errors) FAIL: gfortran.dg/ISO_Fortran_binding_16.f90   -O2  (test for excess err

Re: [Patch, fortran] PR fortran/92142 - CFI_setpointer corrupts descriptor

2019-11-11 Thread Tobias Burnus
Hi José, On 10/29/19 11:35 AM, José Rui Faustino de Sousa wrote: Added the suggested check and a few touches to comments and the error message. Thanks. that might be a bug in the C code of the test itself I took a look and although there are problems with the code of the test I do not think t

Re: [Patch, fortran] PR fortran/92142 - CFI_setpointer corrupts descriptor

2019-10-29 Thread José Rui Faustino de Sousa
Hi, On 17/10/19 17:29, Tobias Burnus wrote: If you generate to stdout/stderr like in this case, I think it makes sense to also check for this output using "{dg-output …}". Added the suggested check and a few touches to comments and the error message. that might be a bug in the C code of

Re: [Patch, fortran] PR fortran/92142 - CFI_setpointer corrupts descriptor

2019-10-18 Thread Paul Richard Thomas
I will deal with this and various other issues associated with ISO_Fortran_binding tomorrow. Thanks for your help Paul On Thu, 17 Oct 2019 at 18:30, Tobias Burnus wrote: > > Hi, > > + fprintf (stderr, "CFI_setpointer: Result is NULL.\n"); > … > > + return CFI_INVALID_DESCRIPTOR; > > +! { d

Re: [Patch, fortran] PR fortran/92142 - CFI_setpointer corrupts descriptor

2019-10-17 Thread Tobias Burnus
Hi, +  fprintf (stderr, "CFI_setpointer: Result is NULL.\n"); … + return CFI_INVALID_DESCRIPTOR; +! { dg-do run } +! { dg-additional-options "-fbounds-check" } +! { dg-additional-sources ISO_Fortran_binding_15.c } If you generate to stdout/stderr like in this case, I think it makes sense

[Patch, fortran] PR fortran/92142 - CFI_setpointer corrupts descriptor

2019-10-17 Thread José Rui Faustino de Sousa
Hi all! Proposed patch to solve the handling of the attribute value in the descriptor. Patch tested only on x86_64-pc-linux-gnu. CFI_setpointer does not check if it is setting a pointer and will set any type of object to the target. CFI_setpointer will also change the pointer attribute of