PR69455
Steve Kargl
sgk@troutmask.apl.washington.edu
Fri Oct 18 13:56:00 GMT 2019
On Fri, Oct 18, 2019 at 01:01:18PM +0200, dhumieres.dominique@free.fr wrote:
> The patch fixes the problem for iso_c_binding but not for
> ISO_FORTRAN_ENV (pr69455#c1).
>
> The later is fixed with
>
> --- ../_clean/gcc/fortran/trans-decl.c 2019-10-11 11:28:20.000000000
> +0200
> +++ gcc/fortran/trans-decl.c 2019-10-18 12:52:46.000000000 +0200
> @@ -5987,7 +5987,12 @@ generate_local_decl (gfc_symbol * sym)
>
> if (sym->ns && sym->ns->construct_entities)
> {
> - if (sym->attr.referenced)
> + /* Construction of the ISO_C_BINDING module within a BLOCK
> + construct where ONLY and RENAMED entities are included in
> + seems to be bogus. See PR 69455. */
> + if (sym->attr.referenced
> + && sym->from_intmod != INTMOD_ISO_C_BINDING
> + && sym->from_intmod != INTMOD_ISO_FORTRAN_ENV)
> gfc_get_symbol_decl (sym);
> sym->mark = 1;
> }
>
> Note that I did not updated the comment nor the test.
>
If you don't have test code, then how do you know that your
modification fixes anything? Without a testcase, I'll be
committing my original patch.
--
Steve
20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4
20161221 https://www.youtube.com/watch?v=IbCHE-hONow
More information about the Fortran
mailing list