FRE - SCCVN problem with initialized global variables

Andreas Krebbel Andreas.Krebbel@de.ibm.com
Mon Jul 23 15:58:00 GMT 2007


> We explicitly pull out initializers from variables that are:
>  /* Pull out any truly constant values.  */
>          if (TREE_READONLY (rhs)
>              && TREE_STATIC (rhs)
>              && DECL_INITIAL (rhs)
>              && valid_gimple_expression_p (DECL_INITIAL (rhs)))
>            return DECL_INITIAL (rhs);

It turned out that this check was miscompiled by ifcombine when
merging the TREE_READONLY and the TREE_STATIC bit checks:

http://gcc.gnu.org/ml/gcc-patches/2007-07/msg01668.html

Thanks for the pointer.

Bye,

-Andreas-



More information about the Gcc mailing list