FRE - SCCVN problem with initialized global variables

Andreas Krebbel
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:

Thanks for the pointer.



More information about the Gcc mailing list