This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/45410] constant not optimized / propagated
- From: "reza at parvan dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Aug 2010 17:59:40 -0000
- Subject: [Bug middle-end/45410] constant not optimized / propagated
- References: <bug-45410-16895@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from reza at parvan dot net 2010-08-27 17:59 -------
(In reply to comment #2)
> That's not the main problem here. The problem is that this is an aggregate and
> we SRA only automatic vars, not global vars. And it isn't constant either
Jakub,
Thanks for that insight. Of course, gcc does a pretty good job (and flow
analysis) if we move 'struct s ss' into function scope. That seems like a
reasonable workaround for many situations.
Reza.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45410