------- Additional Comments From dberlin at gcc dot gnu dot org 2005-05-22 19:54 ------- Subject: Re: missed optimization due with const 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. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21712