]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcov: Read the right arc flag in json output
authorJørgen Kvalsvik <j@lambda.is>
Sun, 10 May 2026 11:26:59 +0000 (13:26 +0200)
committerJørgen Kvalsvik <j@lambda.is>
Sun, 10 May 2026 12:59:56 +0000 (14:59 +0200)
It is quite dishonest to check the false_value and output "true", and we
should strive to be honest.

gcc/ChangeLog:

* gcov.cc (json_set_prime_path_coverage): Read arc.true_value.

gcc/gcov.cc

index 6256caa19e9456c8549830049e7b5d6f7144fefa..80acb7986d9482b4b1db5445e57057b92c4c78a1 100644 (file)
@@ -1545,7 +1545,7 @@ json_set_prime_path_coverage (json::object &function, function_info &info)
          if (i + 1 != path.size ())
            {
              const arc_info &arc = find_arc (block, path[i+1]);
-             if (arc.false_value)
+             if (arc.true_value)
                edge_kind = "true";
              else if (arc.false_value)
                edge_kind = "false";