> Any suggestion about how I could avoid generating this zero_extension?
Redundant extensions have been a hot topic for some time. The combiner should catch the local easy cases, we have ree.c for the nonlocal easy cases and Tom recently posted: http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00408.html which should catch more complex cases. I guess someone should gather the various missed optimization cases, draw a global picture of the situation and see how the various approaches could be fitted together. -- Eric Botcazou