From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0D3D33857C50; Thu, 31 Mar 2022 13:46:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D3D33857C50 From: "ro at CeBiTec dot Uni-Bielefeld.DE" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/102772] [12 regression] g++.dg/torture/pr80334.C FAILs Date: Thu, 31 Mar 2022 13:46:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: testsuite-fail, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at CeBiTec dot Uni-Bielefeld.DE X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2022 13:46:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102772 --- Comment #37 from ro at CeBiTec dot Uni-Bielefeld.DE --- > --- Comment #36 from Jakub Jelinek --- > Created attachment 52719 > --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52719&action=3Dedit > gcc12-pr102772.patch > > So like this? Mostly. There were some issues, though: * Initially, the patch caused the bootstrap to fail: In file included from /var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/= include/i386-pc-solaris2.11/bits/c++allocator.h:33, from /var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/= include/bits/allocator.h:46, from /var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/= include/memory:64, from /vol/gcc/src/hg/master/local/libstdc++-v3/src/c++98/allocator-inst.cc:29: /var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/= include/bits/new_allocator.h: In member function '_Tp* std::__new_allocator<_Tp>::allocate(size_type, con= st void*)': /var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/= include/bits/new_allocator.h:130:24: error: expected primary-expression before ')' token 130 | if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__) | ^ | ^~~~~~~ /var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/= include/bits/new_allocator.h:130:13: note: (if you use '-fpermissive', G++ will accept your code, but allowing t= he use of an undeclared name is deprecated) /var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/= include/bits/new_allocator.h:132:54: error: there are no arguments to 'alignof' that depend on a template parame= ter, so a declaration of 'alignof' must be available [-fpermissive] 132 | std::align_val_t __al =3D std::align_val_t(alignof(_Tp)= ); | ^~~~~~~ /var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/= include/bits/new_allocator.h:132:53: error: expected primary-expression before '(' token 132 | std::align_val_t __al =3D std::align_val_t(alignof(_Tp)= ); | ^ /var/gcc/regression/master/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/= include/bits/new_allocator.h:132:65: error: expected primary-expression before ')' token 132 | std::align_val_t __al =3D std::align_val_t(alignof(_Tp)= ); | ^ and several more, affecting include/ext/bitmap_allocator.h include/ext/mt_allocator.h include/ext/pool_allocator.h AFAICS, alignof is C++ >=3D 11 only. I've used the attached patch to use __alignof__ instead, although I don't know if that's the best fix. * With that, the build completed and g++.dg/torture/pr80334.C PASSes. And yes, my tree did include changeset: 259338:c7f332059508 bookmark: trunk tag: qparent user: Jakub Jelinek date: Wed Mar 30 16:47:10 2022 +0200 summary: Revert "testsuite: Change pr80334.C testcase to dg-do compile [PR102772]" * However, there were quite a number of 32-bit regressions: +FAIL: g++.dg/cpp1z/aligned-new4.C (test for warnings, line 11) +FAIL: g++.dg/cpp1z/aligned-new4a.C (test for warnings, line 11) +FAIL: g++.dg/diagnostic/recur-align.C -std=3Dgnu++14 (test for warnings,= line 13) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 (test for warnings, line 132) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 (test for warnings, line 136) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 (test for warnings, line 140) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 (test for warnings, line 155) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 (test for warnings, line 180) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 (test for warnings, line 210) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 (test for warnings, line 233) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 (test for warnings, line 241) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 (test for warnings, line 41) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 (test for warnings, line 43) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 (test for exc= ess errors) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 note (test for warnings, line 178) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 note (test for warnings, line 208) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 note (test for warnings, line 231) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++14 note (test for warnings, line 238) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 (test for warnings, line 132) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 (test for warnings, line 136) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 (test for warnings, line 140) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 (test for warnings, line 155) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 (test for warnings, line 180) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 (test for warnings, line 210) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 (test for warnings, line 233) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 (test for warnings, line 241) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 (test for warnings, line 41) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 (test for warnings, line 43) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 (test for exc= ess errors) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 note (test for warnings, line 178) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 note (test for warnings, line 208) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 note (test for warnings, line 231) +FAIL: g++.dg/warn/Wmismatched-new-delete-2.C -std=3Dgnu++98 note (test for warnings, line 238) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++14 (test for warnings, line 108) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++14 (test for warnings, line 110) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++14 (test for warnings, line 116) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++14 (test for warnings, line 122) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++14 (test for warnings, line 128) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++14 (test for warnings, line 138) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++14 (test for warnings, line 144) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++14 (test for warnings, line 150) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++14 (test for warnings, line 156) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++14 (test for exc= ess errors) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++98 (test for warnings, line 108) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++98 (test for warnings, line 110) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++98 (test for warnings, line 116) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++98 (test for warnings, line 122) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++98 (test for warnings, line 128) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++98 (test for warnings, line 138) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++98 (test for warnings, line 144) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++98 (test for warnings, line 150) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++98 (test for warnings, line 156) +FAIL: g++.dg/warn/Wmismatched-new-delete-6.C -std=3Dgnu++98 (test for exc= ess errors) +FAIL: g++.dg/warn/Wmismatched-new-delete-7.C -std=3Dgnu++14 (test for exc= ess errors) +FAIL: g++.dg/warn/Wmismatched-new-delete-7.C -std=3Dgnu++98 (test for exc= ess errors) I don't really understand what's going on here. There were two more +FAIL: 17_intro/headers/c++1998/all_attributes.cc (test for excess errors) Excess errors: /var/gcc/regression/master/11.4-gcc-gas/build/i386-pc-solaris2.11/libstdc++= -v3/include/ext/malloc_allocator.h:138: error: expected primary-expression before ')' token /var/gcc/regression/master/11.4-gcc-gas/build/i386-pc-solaris2.11/libstdc++= -v3/include/ext/malloc_allocator.h:138: error: there are no arguments to 'alignof' that depend on a template parame= ter, so a declaration of 'alignof' must be available [-fpermissive] +FAIL: 17_intro/headers/c++1998/profile_mode.cc (test for excess errors) Excess errors: /var/gcc/regression/master/11.4-gcc-gas/build/i386-pc-solaris2.11/libstdc++= -v3/include/ext/malloc_allocator.h:138: error: expected primary-expression before ')' token /var/gcc/regression/master/11.4-gcc-gas/build/i386-pc-solaris2.11/libstdc++= -v3/include/ext/malloc_allocator.h:138: error: there are no arguments to 'alignof' that depend on a template parame= ter, so a declaration of 'alignof' must be available [-fpermissive] Those are other instances of alignof not being present in C++98, so I changed include/ext/malloc_allocator.h to also use __alignof__ instead of alignof, which makes those tests PASS.=