Hi,

This is the 6th version of the patches for fixing PR109071.

Adding -fdiagnotics-details into GCC to provide more hints to the
end users on how the warnings come from, in order to help the user
to locate the exact location in source code on the specific warnings
due to compiler optimizations.

compared to the 5th version, the only change is a slightly adjustment
to the new move-history-rich-location.[h|cc] due to an additional
param to simple_diagnostic_path's in r16-413. 

All the other are kept no change.

bootstrapping and regression testing on both x86 and aarch64. No issues.

Kees and Sam have been using this option for a while in linux kernel
and other applications and both found very helpful.

They asked me several times about the status of this work and hope
the functionality can be available in GCC as soon as possible.

The diagnostic part of the patch had been reviewed and approved by
David already.

Please review the middle-end part of the change.

thanks a lot.

Qing

===================

The latest version of(5th version) is:

https://gcc.gnu.org/pipermail/gcc-patches/2025-April/680336.html
https://gcc.gnu.org/pipermail/gcc-patches/2025-April/680337.html
https://gcc.gnu.org/pipermail/gcc-patches/2025-April/680338.html
https://gcc.gnu.org/pipermail/gcc-patches/2025-April/680339.html

The major improvements to this patch compared to version 3 are:

1. Divide the patch into 3 parts:
   Part 1: Add new data structure move_history, record move_history during
           transformation;
   Part 2: In warning analysis, Use the new move_history to form a rich
           location with a sequence of events, to report more context info
           of the warnings.
   Part 3: Add debugging mechanism for move_history.

2. Major change to the above Part 2, completely rewritten based on David's
  new class lazy_diagnostic_path.

3. Fix all issues identied By Sam;
  A. fix PR117375 (Bug in tree-ssa-sink.cc);
  B. documentation clarification;
  C. Add all the duplicated PRs in the commit comments;

4. Bootstrap GCC with the new -fdiagnostics-details on by default (Init (1)).
  exposed some ICE similar as PR117375 in tree-ssa-sink.cc, fixed.

Reply via email to