[Bug tree-optimization/101515] [11/12 Regression] ICE in pp_cxx_unqualified_id, at cp/cxx-pretty-print.c:128 since r11-6729-gadb520606ce3e1e1
qinzhao at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 10 21:58:35 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101515
--- Comment #7 from qinzhao at gcc dot gnu.org ---
for the following IR:
struct sp x;
void (*<T389>) (void) _1;
...
<bb 2> [local count: 1073741824]:
_1 = MEM[(struct ptrmemfunc_U *)&x].ptr;
_7 = _1 != 8B;
***Before commit r11-6729-gadb520606ce3e1e1.
it reported:
t.cc:19:11: warning: ‘x.ptrmemfunc_U::ptr’ is used uninitialized
[-Wuninitialized]
***After commit r11-6729-gadb520606ce3e1e1.
1. without the patch in comment #6:
ICE.
2. with the patch in comment #6:
it reported:
t.cc:19:11: warning: ‘*(ptrmemfunc_U*)((char*)&x + offsetof(void
(S::*)(),<unnamed type>::__pfn)).ptrmemfunc_U::ptr’ is used uninitialized
[-Wuninitialized]
***The major difference between the message before r11-6729-gadb520606ce3e1e1
and after it is:
in the message after this commit, (if resolved the ICE), the type conversion
from "S::ptrmemfunc" to ptrmemfunc_U is emitted in the message, before this
commit, this type conversion is not emitted at all.
So, the question is: shall we expose the type conversion from "S::ptrmemfunc"
to "ptrmemfunc_U" to the user?
More information about the Gcc-bugs
mailing list