Bitshifting bytes to form a long var fails!

I'm trying to think of your specific case, you stated "It is a hardware based solution available to any avr" there is no barrel shifter and you don't expect hardware multiplication. Just to make sure, you aren't thinking of some obscure method using the SPI shift register or port registers in loop back config are you.

Is it something using asm, ( BTW compiler won't change asm MUL operation, inline asm subverts the optimiser. ) Or just c++?