https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97592
Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2021-02-14 --- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- > Workaround: add CONTIGUOUS to the declaration of B_2D. Confirmed for GCC9 up to GCC11. Note that GCC7 and GCC8 give the expected result without the CONTIGUOUS attribute.