ewlu / gcc-precommit-ci

1 stars 0 forks source link

Output diff for fails-to-apply #527

Closed patrick-rivos closed 7 months ago

patrick-rivos commented 7 months ago

This produced outputs like this:

diff --cc gcc/testsuite/lib/target-supports.exp
index 81330c4ba55,af0bf0c48d7..00000000000
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@@ -2111,16 -2063,16 +2122,29 @@@ proc add_options_for_riscv_zfh { flags 
      return "$flags -march=[riscv_get_arch]_zfh"
  }

++<<<<<<< HEAD
 +proc add_options_for_riscv_zvfh { flags } {
 +    if { [lsearch $flags -march=*] >= 0 } {
 +  # If there are multiple -march flags, we have to adjust all of them.
 +  set flags [regsub -all -- {(?:^|[[:space:]])-march=[[:alnum:]_.]*} $flags &_zvfh ]
 +  return [regsub -all -- {((?:^|[[:space:]])-march=[[:alnum:]_.]*_zvfh[[:alnum:]_.]*)_zvfh} $flags \\1 ]
 +    }
 +    if { [check_effective_target_riscv_zvfh] } {
 +  return "$flags"
 +    }
 +    return "$flags -march=[riscv_get_arch]_zvfh"
++=======
+ proc add_options_for_riscv_ztso { flags } {
+     if { [lsearch $flags -march=*] >= 0 } {
+   # If there are multiple -march flags, we have to adjust all of them.
+   set flags [regsub -all -- {(?:^|[[:space:]])-march=[[:alnum:]_.]*} $flags &_ztso ]
+   return [regsub -all -- {((?:^|[[:space:]])-march=[[:alnum:]_.]*_ztso[[:alnum:]_.]*)_ztso} $flags \\1 ]
+     }
+     if { [check_effective_target_riscv_ztso] } {
+   return "$flags"
+     }
+     return "$flags -march=[riscv_get_arch]_ztso"
++>>>>>>> RISC-V: Enable ztso tests on rv32
  }

  # Return 1 if the target OS supports running SSE executables, 0

Much more helpful when debugging why a patch doesn't apply IMO.

patrick-rivos commented 7 months ago

https://github.com/ewlu/gcc-precommit-ci/actions/runs/6713037367

patrick-rivos commented 7 months ago

Cancelled it since it had 3 patches - I was only trying to test with one :-/

patrick-rivos commented 7 months ago

https://github.com/ewlu/gcc-precommit-ci/actions/runs/6713295878

patrick-rivos commented 7 months ago

https://github.com/ewlu/gcc-precommit-ci/actions/runs/6713763455

patrick-rivos commented 7 months ago

https://github.com/ewlu/gcc-precommit-ci/issues/533

patrick-rivos commented 7 months ago

Using --reject shows hunks like:

> git am --reject ../../patrick/0001-RISC-V-Use-riscv_subword_address-for-atomic_test_and.patch
Applying: RISC-V: Use riscv_subword_address for atomic_test_and_set
Checking patch gcc/config/riscv/sync.md...
error: while searching for:

  emit_insn (gen_atomic_fetch_orsi (old, aligned_mem, shifted_set, model));

  emit_move_insn (old, gen_rtx_ASHIFTRT (SImode, old,
                                        gen_lowpart (QImode, shift)));

  emit_move_insn (operands[0], gen_lowpart (QImode, old));

  DONE;
})

error: patch failed: gcc/config/riscv/sync.md:530
Checking patch gcc/config/riscv/sync.md...
Applying patch gcc/config/riscv/sync.md with 1 reject...
Rejected hunk #1.
Applied patch gcc/config/riscv/sync.md cleanly.
Patch failed at 0001 RISC-V: Use riscv_subword_address for atomic_test_and_set
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
patrick-rivos commented 7 months ago

https://github.com/ewlu/gcc-precommit-ci/actions/runs/6722861165