https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89887
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to vfdff from comment #4) > I check that base on gcc-431, and find the local array will be placed in > read only section, i.e. gcc-431 can found the array not be touched with the > option -fno-toplevel-reorder. so is it a regression ? > > ~/GCC/gcc-431/binary/bin/gcc dd.c -O2 -fno-toplevel-reorder -S This is not a regression either. It just happens that way. This not toplevel reordering either because the static variable is not at the toplevel. Again you still have not pointed out why you think this is a bug. aucSubFrmType is never written to or have its address taken, so there for it is valid to put it in the read only section.