[Bug fortran/96024] [10/11/12/13 Regression] ICE in mio_name_expr_t, at fortran/module.c:2159

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 9 08:00:36 GMT 2023


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

--- Comment #22 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:7f875e435b23dfb439bc7784cade4aebbd5d4a69

commit r11-10850-g7f875e435b23dfb439bc7784cade4aebbd5d4a69
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Jun 9 09:10:29 2023 +0200

    fortran: Fix ICE on pr96024.f90 on big-endian hosts [PR96024]

    The pr96024.f90 testcase ICEs on big-endian hosts.  The problem is
    that length->val.integer is accessed after checking
    length->expr_type == EXPR_CONSTANT, but it is a CHARACTER constant
    which uses length->val.character union member instead and on big-endian
    we end up reading constant 0x100000000 rather than some small number
    on little-endian and if target doesn't have enough memory for 4 times
    that (i.e. 16GB allocation), it ICEs.

    2023-06-09  Jakub Jelinek  <jakub@redhat.com>

            PR fortran/96024
            * primary.c (gfc_convert_to_structure_constructor): Only do
            constant string ctor length verification and truncation/padding
            if constant length has INTEGER type.

    (cherry picked from commit 4cf6e322adc19f927859e0a5edfa93cec4b8c844)


More information about the Gcc-bugs mailing list