https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121763
--- Comment #1 from Sam James <sjames at gcc dot gnu.org> --- Created attachment 62289 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62289&action=edit 0001-gcc-don-t-default-to-gstatement-frontiers-gvariable-.patch This is what I've tested so far. Overall, the results are pretty good. This just needs a tweak: ``` @@ -112,6 +112,9 @@ FAIL: gcc.c-torture/execute/nestfunc-6.c -Os (test for excess errors) UNRESOLVED: gcc.c-torture/execute/nestfunc-6.c -Os compilation failed to produce executable FAIL: gcc.dg/cpp/_Pragma3.c (test for excess errors) +FAIL: gcc.dg/debug/dwarf2/discriminator.c scan-assembler loc [0-9] 11 [0-9]( is_stmt [0-9])? discriminator 1\\n +FAIL: gcc.dg/debug/dwarf2/discriminator.c scan-assembler loc [0-9] 11 [0-9]( is_stmt [0-9])? discriminator 2\\n +FAIL: gcc.dg/debug/dwarf2/discriminator.c scan-assembler loc [0-9] 11 [0-9]( is_stmt [0-9])?\\n ``` I need to check this, but I've seen some flakiness with these tests before: ``` +XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c at line 22 (test for warnings, line 20) +XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c at line 23 (test for warnings, line 20) +XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c at line 24 (test for warnings, line 20) +XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c at line 28 (test for warnings, line 29) +XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c at line 31 (test for warnings, line 32) +XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c at line 33 (test for warnings, line 32) +XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c at line 34 (test for warnings, line 32) +XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c at line 35 (test for warnings, line 32) +XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c at line 36 (test for warnings, line 32) +XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c TODO at line 19 (test for bogus messages, line 20) +FAIL: c-c++-common/goacc/kernels-decompose-pr100400-1-2.c TODO at line 5 (test for warnings, line ) +XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-3.c w/ debug at line 29 (test for bogus messages, line 30) +XPASS: c-c++-common/goacc/kernels-decompose-pr100400-1-4.c w/ debug at line 27 (test for bogus messages, line 28) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-2.c at line 23 (test for warnings, line 18) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-2.c at line 31 (test for warnings, line 30) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-2.c at line 32 (test for warnings, line 30) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-2.c at line 33 (test for warnings, line 30) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-2.c TODO at line 17 (test for bogus messages, line 18) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-2.c w/ debug at line 21 (test for bogus messages, line 18) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-2.c w/ debug at line 22 (test for bogus messages, line 18) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-2.c w/ debug at line 26 (test for bogus messages, line 27) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-3.c TODO at line 4 (test for bogus messages, line ) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-3.c w/ debug at line 22 (test for bogus messages, line 19) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-3.c w/ debug at line 23 (test for bogus messages, line 19) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-3.c w/ debug at line 24 (test for bogus messages, line 19) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-3.c w/ debug at line 28 (test for bogus messages, line 29) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-4.c TODO at line 4 (test for bogus messages, line ) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-4.c w/ debug at line 22 (test for bogus messages, line 19) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-4.c w/ debug at line 23 (test for bogus messages, line 19) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-4.c w/ debug at line 24 (test for bogus messages, line 19) +XPASS: c-c++-common/goacc/kernels-decompose-pr104061-1-4.c w/ debug at line 28 (test for bogus messages, line 29) ``` Expected noise (and an -fcompare-debug issue fixed): ``` @@ -175,7 +209,6 @@ FAIL: gcc.dg/guality/pr36728-2.c -O3 -g -DPREVENT_OPTIMIZATION line 18 arg7 == 30 FAIL: gcc.dg/guality/pr36728-4.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects -DPREVENT_OPTIMIZATION line 14 y == 2 FAIL: gcc.dg/guality/pr36728-4.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects -DPREVENT_OPTIMIZATION line 16 y == 2 -FAIL: gcc.dg/guality/pr36728-4.c -O3 -g -DPREVENT_OPTIMIZATION line 14 y == 2 FAIL: gcc.dg/guality/pr36728-4.c -O3 -g -DPREVENT_OPTIMIZATION line 16 y == 2 XPASS: gcc.dg/guality/pr41353-1.c -O1 -DPREVENT_OPTIMIZATION line 28 j == 28 + 37 XPASS: gcc.dg/guality/pr41353-1.c -O2 -DPREVENT_OPTIMIZATION line 28 j == 28 + 37 @@ -184,8 +217,9 @@ XPASS: gcc.dg/guality/pr41353-1.c -O3 -g -DPREVENT_OPTIMIZATION line 28 j == 28 + 37 XPASS: gcc.dg/guality/pr41353-1.c -Os -DPREVENT_OPTIMIZATION line 28 j == 28 + 37 XPASS: gcc.dg/guality/pr41353-1.c -Og -DPREVENT_OPTIMIZATION line 28 j == 28 + 37 -FAIL: gcc.dg/guality/pr43051-1.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions -DPREVENT_OPTIMIZATION line 34 c == &a[0] FAIL: gcc.dg/guality/pr43051-1.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions -DPREVENT_OPTIMIZATION line 39 c == &a[0] +FAIL: gcc.dg/guality/pr43479.c -O2 -flto -fno-use-linker-plugin -flto-partition=none -DPREVENT_OPTIMIZATION line 18 j == 8 +FAIL: gcc.dg/guality/pr43479.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects -DPREVENT_OPTIMIZATION line 18 j == 8 FAIL: gcc.dg/guality/pr54519-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none -DPREVENT_OPTIMIZATION line 20 y == 25 FAIL: gcc.dg/guality/pr54519-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none -DPREVENT_OPTIMIZATION line 20 z == 6 FAIL: gcc.dg/guality/pr54519-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none -DPREVENT_OPTIMIZATION line 23 y == 117 @@ -261,12 +295,6 @@ FAIL: gcc.dg/plugin/cpython-plugin-test-PyLong_FromLong.c -fplugin=./analyzer_cpython_plugin.so at line 37 (test for warnings, line 36) FAIL: gcc.dg/plugin/cpython-plugin-test-PyLong_FromLong.c -fplugin=./analyzer_cpython_plugin.so (internal compiler error: Segmentation fault) FAIL: gcc.dg/plugin/cpython-plugin-test-PyLong_FromLong.c -fplugin=./analyzer_cpython_plugin.so (test for excess errors) -FAIL: c-c++-common/torture/pr116156-1.c -O1 (test for excess errors) -FAIL: c-c++-common/torture/pr116156-1.c -O2 (test for excess errors) -FAIL: c-c++-common/torture/pr116156-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for excess errors) -FAIL: c-c++-common/torture/pr116156-1.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (test for excess errors) -FAIL: c-c++-common/torture/pr116156-1.c -O3 -g (test for excess errors) -FAIL: c-c++-common/torture/pr116156-1.c -Os (test for excess errors) ``` Another -fcompare-debug fixed: ``` -FAIL: g++.dg/torture/pr58552.C -O1 (test for excess errors) -FAIL: g++.dg/torture/pr58552.C -O2 (test for excess errors) -FAIL: g++.dg/torture/pr58552.C -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for excess errors) -FAIL: g++.dg/torture/pr58552.C -O3 -g (test for excess errors) -FAIL: g++.dg/torture/pr58552.C -Os (test for excess errors) ```