[Bug ada/91169] [10 regression] cd2a31a FAILs

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 30 17:13:00 GMT 2019


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

--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
The compiler doesn't correct deal with index -1 in a CONSTRUCTOR after:

2019-07-12  Richard Biener  <rguenther@suse.de>

        * fold-const.h (get_array_ctor_element_at_index): Adjust.
        * fold-const.c (get_array_ctor_element_at_index): Add
        ctor_idx output parameter informing the caller where in
        the constructor the element was (not) found.  Add early exit
        for when the ctor is sorted.
        * gimple-fold.c (fold_array_ctor_reference): Support constant
        folding across multiple array elements.


More information about the Gcc-bugs mailing list