https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101694
Bug ID: 101694 Summary: [12 regression] g++.dg/warn/Wstringop-overflow-4.C fails after r12-2591 for 32 bits Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: seurer at gcc dot gnu.org Target Milestone: --- g:2e96b5f14e4025691b57d2301d71aa6092ed44bc, r12-2591 make -k check-gcc RUNTESTFLAGS="--target_board=unix'{-m32}' dg.exp=g++.dg/warn/Wstringop-overflow-4.C" FAIL: g++.dg/warn/Wstringop-overflow-4.C -std=gnu++98 (test for excess errors) FAIL: g++.dg/warn/Wstringop-overflow-4.C -std=gnu++14 (test for excess errors) FAIL: g++.dg/warn/Wstringop-overflow-4.C -std=gnu++17 (test for excess errors) FAIL: g++.dg/warn/Wstringop-overflow-4.C -std=gnu++2a (test for excess errors) # of expected passes 56 # of unexpected failures 4 This appears to be a 32 bit only problem. spawn -ignore SIGHUP /home/seurer/gcc/git/build/gcc-test/gcc/testsuite/g++/../../xg++ -B/home/seurer/gcc/git/build/gcc-test/gcc/testsuite/g++/../../ /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C -m64 -fdiagnostics-plain-output -nostdinc++ -I/home/seurer/gcc/git/build/gcc-test/powerpc64-unknown-linux-gnu/libstdc++-v3/include/powerpc64-unknown-linux-gnu -I/home/seurer/gcc/git/build/gcc-test/powerpc64-unknown-linux-gnu/libstdc++-v3/include -I/home/seurer/gcc/git/gcc-test/libstdc++-v3/libsupc++ -I/home/seurer/gcc/git/gcc-test/libstdc++-v3/include/backward -I/home/seurer/gcc/git/gcc-test/libstdc++-v3/testsuite/util -fmessage-length=0 -std=gnu++2a -O2 -Wall -Wno-array-bounds -ftrack-macro-expansion=0 -S -o Wstringop-overflow-4.s /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C: In function 'void test_strcpy_new_char(size_t)': /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:32:3: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing 2 bytes into a region of size between 0 and 1 [-Wstringop-overflow=] /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:32:3: note: destination object of size [0, 1] allocated by 'operator new []' /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:36:3: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing 3 bytes into a region of size between 1 and 2 [-Wstringop-overflow=] /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:36:3: note: destination object of size [1, 2] allocated by 'operator new []' /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:40:3: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing 4 bytes into a region of size between 2 and 3 [-Wstringop-overflow=] /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:40:3: note: destination object of size [2, 3] allocated by 'operator new []' /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:41:3: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing 10 bytes into a region of size between 2 and 3 [-Wstringop-overflow=] /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:41:3: note: destination object of size [2, 3] allocated by 'operator new []' /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C: In function 'void test_strcpy_new_char_array(size_t)': /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:81:3: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing 2 bytes into a region of size between 0 and 1 [-Wstringop-overflow=] /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:81:3: note: destination object of size [0, 1] allocated by 'operator new []' /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:83:3: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing 3 bytes into a region of size between 0 and 2 [-Wstringop-overflow=] /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:83:3: note: destination object of size [0, 2] allocated by 'operator new []' /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:86:3: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing 1 byte into a region of size 0 [-Wstringop-overflow=] /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:86:3: note: destination object of size 0 allocated by 'operator new []' /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:89:3: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing 3 bytes into a region of size between 1 and 2 [-Wstringop-overflow=] /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:89:3: note: destination object of size [1, 2] allocated by 'operator new []' /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:91:3: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing 1 byte into a region of size 0 [-Wstringop-overflow=] /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:91:3: note: destination object of size 0 allocated by 'operator new []' /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:95:3: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing 5 bytes into a region of size between 2 and 4 [-Wstringop-overflow=] /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:95:3: note: destination object of size [2, 4] allocated by 'operator new []' /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C: In function 'void test_strcpy_new_int16_t(size_t, const size_t*)': /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:117:3: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing 3 bytes into a region of size between 0 and 2 [-Wstringop-overflow=] /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:117:3: note: destination object of size [0, 2] allocated by 'operator new []' /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:123:3: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing 5 bytes into a region of size between 2 and 4 [-Wstringop-overflow=] /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:123:3: note: destination object of size [2, 4] allocated by 'operator new []' /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:128:3: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing 7 bytes into a region of size between 4 and 6 [-Wstringop-overflow=] /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:128:3: note: destination object of size [4, 6] allocated by 'operator new []' /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:129:3: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing 10 bytes into a region of size between 4 and 6 [-Wstringop-overflow=] /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C:129:3: note: destination object of size [4, 6] allocated by 'operator new []' commit 2e96b5f14e4025691b57d2301d71aa6092ed44bc Author: Aldy Hernandez <al...@redhat.com> Date: Tue Jun 15 12:32:51 2021 +0200 Backwards jump threader rewrite with ranger.