https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119439

            Bug ID: 119439
           Summary: gcc_assert and gcc_checking_assert should use
                    [[assume(x)]];
           Product: gcc
           Version: 14.1.0
            Status: UNCONFIRMED
          Keywords: internal-improvement
          Severity: enhancement
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
        Depends on: 109112, 117287
  Target Milestone: ---

https://inbox.sourceware.org/gcc-patches/ZxtUrgAqnTr5saP8@tucnak/
mentions this was tried for gcc_assert with --disable-checking but ran into
PR117287.  Maybe we can limit it for GCC 15+ .

I noticed this while working on PR 118616 which is about an extra warning and
since gcc_checking_assert is removed fully, we don't see that the length was
non-zero.   But I think that case won't work right now with assume due to PR
109112 .


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109112
[Bug 109112] [[assume(...)]] is not taken into account for structs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117287
[Bug 117287] [13 Regression] assume attribute related miscompilation

Reply via email to