------- Comment #2 from jlima at sim dot ul dot pt 2008-04-25 20:56 ------- If this is the expected behavior... then ok. I saw this as a bug because it is not possible to add the register to the clobbered registers list (gcc will complain with: "error: can't find a register in class 'DREG' while reloading 'asm'") and it is not elegant to define the register as an output register when the result is to be disregarded. Even if the optimizing compiler can detect that and suppress the unused code.
It often required to modify/reuse an input register inside the inline assembly statement. In such cases, if I understood well, one must restore the register to its original value if optimization is to be used. But this may imply a suboptimal code since it will always be restored regardless of being required or not. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36048