https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69368

--- Comment #14 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> But I guess even this doesn't help, while it will help poor man's flexible
> array members in C/C++, in this Fortran case the problem is that there is
> COMMON /FMCOM/ X(1)
> in this TU, while
> COMMON /FMCOM / X(1000000)
> in some other TU, and get_ref_base_and_extent caps maxsize at
> DECL_SIZE - bit_offset (which is generally right, but Fortran COMMON
> is just weird).

This invalid Fortran.

> So, perhaps we want some flag on the Fortran COMMON decls that would be
> set on COMMON that ends with an array and would tell get_ref_base_and_extent
> (and other spots?) that accesses can be beyond end of the decl?

Related to/ duplicate of pr44882?

Reply via email to