https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110756
Bug ID: 110756 Summary: [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: thiago.bauermann at linaro dot org CC: ppalka at gcc dot gnu.org Target Milestone: --- Our CI detected that commit g:92d1425ca780 "c++: redundant targ coercion for var/alias tmpls" caused these testsuite failures: Running g++:g++.dg/gomp/gomp.exp ... FAIL: g++.dg/gomp/pr58567.C -std=c++14 (test for excess errors) FAIL: g++.dg/gomp/pr58567.C -std=c++17 (test for excess errors) FAIL: g++.dg/gomp/pr58567.C -std=c++20 (test for excess errors) FAIL: g++.dg/gomp/pr58567.C -std=c++98 (test for excess errors) I confirmed that the problem is still present in trunk as of commit g:b50a851eef4b "i386: Double-word sign-extension missed-optimization [PR110717]" from today. I also confirmed that reverting the mentioned commit from trunk fixes the test failures. Reproduced the problem on Ubuntu 22.04, on both aarch64-linux and x86_64-linux. The relevant part of g++.log is: Executing on host: /home/thiago.bauermann/.cache/builds/gcc-native/gcc/testsuite/g++/../../xg++ -B/home/thiago.bauermann/.cache/builds/gcc-native/gcc/testsuite/g++/../../ /home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C -fdiagnostics-plain-output -nostdinc++ -I/home/thiago.bauermann/.cache/builds/gcc-native/aarch64-unknown-linux-gnu/libstdc++-v3/include/aarch64-unknown-linux-gnu -I/home/thiago.bauermann/.cache/builds/gcc-native/aarch64-unknown-linux-gnu/libstdc++-v3/include -I/home/thiago.bauermann/src/gcc/libstdc++-v3/libsupc++ -I/home/thiago.bauermann/src/gcc/libstdc++-v3/include/backward -I/home/thiago.bauermann/src/gcc/libstdc++-v3/testsuite/util -fmessage-length=0 -std=c++20 -fopenmp -S -o pr58567.s (timeout = 300) spawn -ignore SIGHUP /home/thiago.bauermann/.cache/builds/gcc-native/gcc/testsuite/g++/../../xg++ -B/home/thiago.bauermann/.cache/builds/gcc-native/gcc/testsuite/g++/../../ /home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C -fdiagnostics-plain-output -nostdinc++ -I/home/thiago.bauermann/.cache/builds/gcc-native/aarch64-unknown-linux-gnu/libstdc++-v3/include/aarch64-unknown-linux-gnu -I/home/thiago.bauermann/.cache/builds/gcc-native/aarch64-unknown-linux-gnu/libstdc++-v3/include -I/home/thiago.bauermann/src/gcc/libstdc++-v3/libsupc++ -I/home/thiago.bauermann/src/gcc/libstdc++-v3/include/backward -I/home/thiago.bauermann/src/gcc/libstdc++-v3/testsuite/util -fmessage-length=0 -std=c++20 -fopenmp -S -o pr58567.s /home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C: In instantiation of 'void foo() [with T = int]': /home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C:14:11: required from here /home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C:8:22: error: 'int' is not a class, struct, or union type /home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C:8:3: error: invalid type for iteration variable 'i' compiler exited with status 1 PASS: g++.dg/gomp/pr58567.C -std=c++20 (test for errors, line 8) FAIL: g++.dg/gomp/pr58567.C -std=c++20 (test for excess errors) Excess errors: /home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C:8:3: error: invalid type for iteration variable 'i' Tested with: $ ~/src/gcc/configure \ --disable-bootstrap \ --disable-multilib \ && make -j 8 \ && make -C gcc check-c++ RUNTESTFLAGS=g++.dg/gomp/gomp.exp