[Bug c++/126310] [16/17 regression] Miscompile due to erroneous value range propagation since r16-5887

"jason at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126310

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Martin Jambor from comment #4)
> The record_type contexts may be bit telling, 0x7ffff75ea498 has
> 0x7ffff75e55e8 as its canonical-type but differs in alias set and,

Hmm, dow can it differ in alias set?  It looks like get_alias_set goes through
TYPE_CANONICAL.

> well, has its own chain of field_decls.

Yes, build_ptrmemfunc_type builds a different RECORD_TYPE for each variant.

> I'm not sure what this means, though.  I suppose the code should then
> (at least for non-unions?) rely on offsets rather than on pointer
> comparison?

Or names.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.