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

            Bug ID: 104576
           Summary: False positive from
                    -Wanalyzer-use-of-uninitialized-value from PR 63311
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

The reproducers for PR 63311, both Fortran and C (attachment 33852) currently
generate false positives from -Wanalyzer-use-of-uninitialized-value when
optimization is off (and they are silent when optimization is on).

It seems to be an issue with -fanalyzer thinking that __builtin_sinf could
clobber *flag (which presumably it can't, being pure or const), thus allowing
for the "flag is false" branch to skip initialization of t and tt, and then
later executing the "flag is true" branch.

Reply via email to