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

--- Comment #31 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(
> this patch makes Fortran logicals to become C unsigned types of
> corresponding size.  I think it is better than making them signed
> because the globbing will affect aliasing within Fortran programs as
> well.

I think you're right there, I was wondering about that problem
as well.

Do I understand correctly that this type merging only happens
if LTO is enabled, and does not affect performance otherwise?

We would then have to redefine the GFC_LOGICAL_* types
in libgfortran to unsigned, but that should be doable.

Regarding the test case: As it is, this will only work if
there is a 16-byte integer. It is probably better to
use only up to 8-byte logicals, and put in a separate
test case with the 16-byte logicals and put in

! { dg-require-effective-target fortran_integer_16 }

This is looking very good, thanks!

Reply via email to