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

Tobias Burnus burnus@net-b.de
Thu Oct 17 17:30:00 GMT 2019


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 to also check for this output using "{dg-output …}".

Otherwise, it looks okay at a glance – but I defer the proper review to 
either someone else or to later.

Another question would be: Is it always guaranteed that 
result->attribute  is set? I am asking because it resembles to the 
untrained eye the code at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92027

And there, the result attribute is unset – that might be a bug in the C 
code of the test itself – or in libgomp. But it doesn't harm to quickly 
think about whether that can be an issue here as well or not.

Cheers,

Tobias



More information about the Fortran mailing list