[Bug middle-end/91606] [9/10 regression] Optimization leads to invalid code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91606 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #4 from Richard Biener --- Mine.
[Bug middle-end/91606] [9/10 regression] Optimization leads to invalid code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91606 --- Comment #3 from Jakub Jelinek --- Note, both D.10649.f1 and *_31 types are the pointer-to-member structs created by C++ FE, while they aren't the same type, get_alias_set returns 0 for both of them, both have a pointer __pfn field followed by ssize __delta field.
[Bug middle-end/91606] [9/10 regression] Optimization leads to invalid code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91606 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org, ||rguenth at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- This is miscompiled during dse1 (or the IL is already wrong earlier). Before dse1 we have in bb2 : D.10827._M_elems[0].D.10649.f1.__pfn = fun1; D.10827._M_elems[0].D.10649.f1.__delta = 0; D.10827._M_elems[0].index = 0; D.10827._M_elems[1].D.10649.f2.__pfn = fun2; D.10827._M_elems[1].D.10649.f2.__delta = 0; D.10827._M_elems[1].index = 1; : # idx_6 = PHI <0(2), idx_27(9)> # __for_begin_7 = PHI < [(void *)](2), __for_begin_28(9)> if ( [(void *) + 48B] == __for_begin_7) goto ; [INV] else goto ; [INV] : _18 = MEM[(const struct variant *)__for_begin_7].index; if (_18 != 0) goto ; [17.38%] else goto ; [82.62%] : _31 = [(const struct variant *)__for_begin_7].D.10649.f1; _1 = _31->__pfn; _2 = memFuncPtr.__pfn; if (_1 == _2) and so in the first iteration it goes bb2, bb3, bb4 and bb5 and bb5 reads _31->__pfn and thus D.10827._M_elems[0].D.10649.f1, but DSE1 removes the D.10827._M_elems[0].D.10649.f1.__pfn = fun1; D.10827._M_elems[0].D.10649.f1.__delta = 0; and D.10827._M_elems[1].D.10649.f2.__pfn = fun2; D.10827._M_elems[1].D.10649.f2.__delta = 0; stores.
[Bug middle-end/91606] [9/10 regression] Optimization leads to invalid code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91606 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2019-08-30 CC||mpolacek at gcc dot gnu.org Component|c++ |middle-end Ever confirmed|0 |1 --- Comment #1 from Marek Polacek --- Started with commit f38039b2e78510bed9e7574dbc609bed735b4a8a Author: rguenth Date: Tue Nov 20 09:31:06 2018 + 2018-11-20 Richard Biener PR middle-end/83215 * alias.c (component_uses_parent_alias_set_from): Remove alias-set zero and TYPE_TYPELESS_STORAGE case both already handled in other ways. * g++.dg/tree-ssa/pr83215.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266305 138bc75d-0d04-0410-961f-82ee72b054a4