This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug tree-optimization/21712] missed optimization due withconst function and pulling out of loops
On Sun, 2005-05-22 at 19:36 +0000, rakdver at gcc dot gnu dot org wrote:
> ------- Additional Comments From rakdver at gcc dot gnu dot org 2005-05-22 19:36 -------
> Because do_something does not have to return, therefore
> get_type2 does not necessarily have to be executed.
> In this case we cannot move the call to get_type2 from
> the loop (since do_something could for example initialize
> some table used internally by get_type2).
>
This is wrong.
do_something can't write.
it's const.