This should hopefully fix PR24288 even harder.
To be honest, I'm not sure this is the right condition.
Does this look sane? That is, is the zero-size check really necessary (and is the way I'm checking it correct)?
Differential D11900
[GMR] Be a bit smarter about which globals alias when doing recursive lookups mkuper on Aug 10 2015, 5:30 AM. Authored by
Details This should hopefully fix PR24288 even harder. To be honest, I'm not sure this is the right condition.
Diff Detail Event Timeline
Comment Actions Thanks, David! Added the check mayBeOverwritten() check. About the zero-size check, what if you have two consecutive zero-size globals, followed by a third (non-zero-size) global? (That sounds like nonsense, but I don't quite understand the semantics of zero-size globals to begin with.)
|
I guess a zero-sized global can never be "modified" as you would *actually* modify some other global (or commit UB if there was no other global). However, it's possible to have a global variable in one TU and a global alias in another TU with the same name which makes me think that you need to check that the linkage is not mayBeOverridden.