https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115712

--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 58541
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58541&action=edit
A testcase

[hjl@gnu-tgl-3 tmp]$ g++ -c -O2 x.cc -ansi
[hjl@gnu-tgl-3 tmp]$ readelf -rW x.o | c++filt | grep -E "(new|delete)"
000000000000000a  0000000c00000004 R_X86_64_PLT32         0000000000000000
operator new[](unsigned long) - 4
0000000000000019  0000000d00000004 R_X86_64_PLT32         0000000000000000
operator delete[](void*) - 4
0000000000000028  0000000f00000004 R_X86_64_PLT32         0000000000000000
operator new[](unsigned long, std::nothrow_t const&) - 4
000000000000003c  0000000d00000004 R_X86_64_PLT32         0000000000000000
operator delete[](void*) - 4
[hjl@gnu-tgl-3 tmp]$ /usr/gcc-15.0.0-x86-64/bin/g++ -c -O2 x.cc -ansi
[hjl@gnu-tgl-3 tmp]$ readelf -rW x.o | c++filt | grep -E "(new|delete)"
000000000000000f  0000000d00000004 R_X86_64_PLT32         0000000000000000
operator new[](unsigned long, std::nothrow_t const&) - 4
000000000000001c  0000000e00000004 R_X86_64_PLT32         0000000000000000
operator delete[](void*) - 4
[hjl@gnu-tgl-3 tmp]$ 

new and delete update "pass".  They can't be folded without updating "pass".

Reply via email to