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

            Bug ID: 101574
           Summary: gcc/sparseset.h:215:20: error: suggest parentheses
                    around assignment used as truth value
                    [-Werror=parentheses]
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
  Target Milestone: ---

This is strange.  In one build of GCC of native x86_64-pc-linux-gnu (standard
bootstrap, no offloading), I'm suddenly (meaning: "it worked yesterday")
running into a bootstrap failure:

    [...]
    In file included from [...]/source-gcc/gcc/lra-lives.c:43:
    [...]/source-gcc/gcc/lra-lives.c: In function ‘void
make_hard_regno_dead(int)’:
    [...]/source-gcc/gcc/sparseset.h:215:20: error: suggest parentheses around
assignment used as truth value [-Werror=parentheses]
      215 |        && (((ITER) = sparseset_iter_elm (SPARSESET)) || 1);        
    \
          |            ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [...]/source-gcc/gcc/lra-lives.c:304:3: note: in expansion of macro
‘EXECUTE_IF_SET_IN_SPARSESET’
      304 |   EXECUTE_IF_SET_IN_SPARSESET (pseudos_live, i)
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    [...]
    cc1plus: all warnings being treated as errors
    make[3]: *** [lra-lives.o] Error 1
    make[3]: *** Waiting for unfinished jobs....
    rm fsf-funding.pod lto-dump.pod gpl.pod cpp.pod gfdl.pod gcc.pod gcov.pod
gdc.pod gcov-dump.pod gfortran.pod gcov-tool.pod gccgo.pod
    make[3]: Leaving directory `[...]/build-gcc/gcc'
    make[2]: *** [all-stage2-gcc] Error 2
    make[2]: Leaving directory `[...]/build-gcc'
    make[1]: *** [stage2-bubble] Error 2
    make[1]: Leaving directory `[...]/build-gcc'
    make: *** [all] Error 2

Reproduced twice.

This is using GCC commit a61f6afbee370785cf091fe46e2e022748528307 sources,
clean.  'gcc/lra-lives.c', 'gcc/sparseset.h' have last been modified months
ago.

I'm not seeing this in a corresponding offloading-enabled build.  (That doesn't
make sense -- the GCC bootstrap is the same?)

Reply via email to