Hi Richard,
> Generally I don't think we want to expand the use of the IMHO broken
> strict_aliasing_warning code.
    If you have read my test code, you must understand it is the
    programmer who responsible for this undefined behavior, instead of
    the compiler. Like PR 60546 concluded.

    And I doubt if limiting the compiler behavior is a good choice.

> We should be able to do better after some constant/forward propagation,
> scanning for MEM_REFs operating on decls and accessing those with
> an alias set that is not a subset of the set of the decl.  Like simply
> warn as part of the tree-ssa-forwprop.c sweep (maybe only for those
> MEM_REFs we simplified to avoid duplicates, but then also watch
> for CCP doing the same).
    That's a more generalize solution. But it have a defection: at that
    point, the compiler have no idea who generates these code. That make
    it difficult to debug.
---
Lin Zuojian

Reply via email to