https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89887
--- Comment #8 from vfdff ---
an static variable out put in assemble is decided by an special option
flag_toplevel_reorder ?
/* Traditionally we do not eliminate static variables when not
optimizing and when not doing toplevel
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89887
Richard Biener changed:
What|Removed |Added
Status|WAITING |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89887
--- Comment #6 from vfdff ---
Yes, I agree with your point, it is not a bug.
I doubt there is something prevent us finding the array not be touched with the
option -fno-toplevel-reorder -O2 (based on gcc 7.3), and we may get better
performance
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89887
--- Comment #5 from Andrew Pinski ---
(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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89887
--- Comment #4 from vfdff ---
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 ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89887
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |WAITING
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89887
--- Comment #2 from vfdff ---
Add option -fno-toplevel-reorder for O2, then aucSubFrmType.1820 will also be
placed in section data.
/opt/buildtools/gcc-7.3.0/bin/gcc dd.c -O2 -S -fno-toplevel-reorder
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89887
vfdff changed:
What|Removed |Added
CC||zhongyunde at huawei dot com
--- Comment #1