It is quite dishonest to check the false_value and output "true", and we
should strive to be honest.

Pushed as obvious after testing on x86_64-linux-gnu.

gcc/ChangeLog:

        * gcov.cc (json_set_prime_path_coverage): Read arc.true_value.
---
 gcc/gcov.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/gcov.cc b/gcc/gcov.cc
index 6256caa19e9..80acb7986d9 100644
--- a/gcc/gcov.cc
+++ b/gcc/gcov.cc
@@ -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";
-- 
2.39.5

Reply via email to