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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Mikael Morin <[email protected]>:

https://gcc.gnu.org/g:968c8e7dd702cf0c4d1932393c79d58ea4b84492

commit r17-3311-g968c8e7dd702cf0c4d1932393c79d58ea4b84492
Author: Mikael Morin <[email protected]>
Date:   Sat Aug 15 18:48:01 2026 +0200

    fortran: Dereference descriptor pointer in IS_CONTIGUOUS code [PR126892]

    In the IS_CONTIGUOUS implementation, add the missing dereference to really
    have a descriptor-typed expression, usable with the descriptor accessors.

    Without this change, the pointer resulting from the evaluation of the
    IS_CONTIGUOUS argument was stabilized to a variable and then directly used
    to access the descriptor fields.  This was causing an internal compiler
    error because the descriptor accessors aren't prepared to receive a
pointer.

            PR fortran/126892

    gcc/fortran/ChangeLog:

            * trans-intrinsic.cc (gfc_conv_is_contiguous_expr): Dereference the
            pointer variable before using it as descriptor.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/is_contiguous_6.f90: New test.

Reply via email to