On Thu, May 15, 2014 at 2:37 AM, Richard Sandiford <rdsandif...@googlemail.com> wrote:
> get_pool_constant can return general constants, not just SYMBOL_REFs, > so the code does look wrong. In the particular case of CONST flagged up > in the message, SYMBOL_REF_TLS_MODEL would read beyond the end of the rtx. > I think you would have seen the same failure before the patch with > --enable-checking=yes,rtl. > > The reason my patch broke the bootstrap is that SYMBOL_REF_FLAGS now > checks based on ENABLE_RTL_FLAG_CHECKING rather than ENABLE_RTL_CHECKING. > I'd done that because u2 is part of the header and so checking it felt > more like checking a flag than the format. Perhaps that was a bad > idea though, since it will slow down --enable-checking=yes (but not > --enable-checking=release) compilers. OTOH it will catch things like > this. I can switch it back if that seems better. > > Does the patch below fix things? > > Thanks, > Richard > > > gcc/ > * config/rs6000/rs600.c (rs6000_real_tls_symbol_ref_p): New function. > (rs6000_delegitimize_address): Use it. The patch allows me to get past the failure. I wasn't certain if the check was too strict or not. I'm bootstrapping and running the testsuite now. Thanks, David