https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122044
Bug ID: 122044 Summary: Analyzer doesn't handle .DEFERRED_INIT calls correctly Product: gcc Version: 16.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org Target Milestone: --- With make check-g++ RUNTESTFLAGS="--target_board=unix\{,-ftrivial-auto-var-init=zero\} analyzer.exp='invalid-shift-1.c exception-value-2.C'" everything passes in the tests without -ftrivial-auto-var-init=zero (or =pattern), but with it FAIL: g++.dg/analyzer/exception-value-2.C -std=c++17 (test for warnings, line 34) FAIL: g++.dg/analyzer/exception-value-2.C -std=c++17 (test for warnings, line 35) FAIL: g++.dg/analyzer/exception-value-2.C -std=c++17 (test for excess errors) FAIL: g++.dg/analyzer/exception-value-2.C -std=c++98 (test for warnings, line 34) FAIL: g++.dg/analyzer/exception-value-2.C -std=c++98 (test for warnings, line 35) FAIL: g++.dg/analyzer/exception-value-2.C -std=c++98 (test for excess errors) FAIL: g++.dg/analyzer/exception-value-2.C -std=c++26 (test for warnings, line 34) FAIL: g++.dg/analyzer/exception-value-2.C -std=c++26 (test for warnings, line 35) FAIL: g++.dg/analyzer/exception-value-2.C -std=c++26 (test for excess errors) FAIL: c-c++-common/analyzer/invalid-shift-1.c -std=c++17 (test for warnings, line 15) FAIL: c-c++-common/analyzer/invalid-shift-1.c -std=c++17 (test for warnings, line 18) FAIL: c-c++-common/analyzer/invalid-shift-1.c -std=c++98 (test for warnings, line 15) FAIL: c-c++-common/analyzer/invalid-shift-1.c -std=c++98 (test for warnings, line 18) FAIL: c-c++-common/analyzer/invalid-shift-1.c -std=c++26 (test for warnings, line 15) FAIL: c-c++-common/analyzer/invalid-shift-1.c -std=c++26 (test for warnings, line 18) E.g. in invalid-shift-1.c testcase the only difference is mask_10 = .DEFERRED_INIT (4, 3, &"mask"[0]); addition (and mask_10 isn't even used). Given that we'd like to (and need) turn something like -ftrivial-auto-var-init=zero by default for -std=c++26/-std=gnu++26, this becomes more important problem. I'm going to xfail these for now for c++26, but it should be fixed soon.