[Bug middle-end/106776] Unexpected use-after-free warning

2023-05-30 Thread drfiemost at yahoo dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106776 --- Comment #6 from Leandro Nini --- Can't reproduce anymore with gcc 13.1.0 Still there in gcc 12.3.0

[Bug middle-end/106776] Unexpected use-after-free warning

2022-10-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106776 --- Comment #5 from Andrew Pinski --- (In reply to Leandro Nini from comment #2) > Oh, now I see it, it wasn't that obvious in the first test. But why is the > compiler allowed to postpone the store after deleting the pointer? Is there > some un

[Bug middle-end/106776] Unexpected use-after-free warning

2022-10-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106776 --- Comment #4 from Andrew Pinski --- Here is a reduced testcase without any std::map or otherwise: ``` struct matrix_t { int* count; matrix_t() : count(new int(1)) {} matrix_t(const matrix_t& p) : count(p.count) { ++*count; }

[Bug middle-end/106776] Unexpected use-after-free warning

2022-10-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106776 --- Comment #3 from Andrew Pinski --- Before PRE [/opt/compiler-explorer/gcc-12.2.0/include/c++/12.2.0/bits/stl_tree.h:1061:28] __position ={v} {CLOBBER(eol)}; [/app/example.cpp:25:62] _4 = [/app/example.cpp:25:10] &[/app/example.cpp:25:62]

[Bug middle-end/106776] Unexpected use-after-free warning

2022-09-28 Thread drfiemost at email dot it via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106776 --- Comment #2 from Leandro Nini --- Oh, now I see it, it wasn't that obvious in the first test. But why is the compiler allowed to postpone the store after deleting the pointer? Is there some undefined behavior involved here or what?

[Bug middle-end/106776] Unexpected use-after-free warning

2022-08-30 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106776 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #1