[Bug c++/104920] Unreliable results with memset-elt-size

2022-03-14 Thread kouhzadi at rohumm dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104920 Ali Kouhzadi changed: What|Removed |Added Resolution|--- |WORKSFORME Status|UNCONFIRME

[Bug c++/104920] Unreliable results with memset-elt-size

2022-03-14 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104920 --- Comment #4 from Jakub Jelinek --- E.g. in the above #c0 testcase, you can see it in the -fdump-tree-gimple dump: memset (&arr, 0, 10); _1 = std::array::data (&arr2); memset (_1, 0, 10); For the arr case, the FE can se

[Bug c++/104920] Unreliable results with memset-elt-size

2022-03-14 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104920 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #3

[Bug c++/104920] Unreliable results with memset-elt-size

2022-03-14 Thread kouhzadi at rohumm dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104920 --- Comment #2 from Ali Kouhzadi --- Thanks Andrew for the response. Examples bad_03.cpp and bad_04.cpp (attached) show a case where this works as expected on an STL array. I guess the point is that it's somewhat unreliable, and improvements wou

[Bug c++/104920] Unreliable results with memset-elt-size

2022-03-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104920 Andrew Pinski changed: What|Removed |Added Keywords||diagnostic --- Comment #1 from Andrew P