------- Comment #11 from jakub at gcc dot gnu dot org  2009-02-09 20:36 -------
Sure, but in your testcase you do the operation that requires the register
while the register var is still in scope and live.  The compiler doesn't have a
possibility to compile it right.  But, if we say it is ok for the compiler to
move an unrelated 1 << somevar or call, stringop etc. into a block where the
register var is live and ICE because the compiler did it, we'd basically forbid
all uses of register vars.  Automatic register vars are there mainly to support
inline asm hardcoded inputs/outputs for which you don't have special register
classes, programmers using them know very well the limitations and that they
only copy prepared stuff from other variables into the register variables, do
inline asm and copy back the results from local register vars to other vars.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39139

Reply via email to