https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70630
Bug ID: 70630 Summary: [6 regression] sparc bootstrap failure: sparc.c:4919:6: error: suggest explicit braces to avoid ambiguous 'else' Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: mikpelinux at gmail dot com Target Milestone: --- Attempting to bootstrap gcc-6-20160410 on sparc-linux fails with: /mnt/scratch/gcc-6-20160410/gcc/config/sparc/sparc.c: In function 'long long int sparc_compute_frame_size(long long int, int)': /mnt/scratch/gcc-6-20160410/gcc/config/sparc/sparc.c:4919:6: error: suggest explicit braces to avoid ambiguous 'else' [-Werror=parentheses] if (TARGET_ARCH64) ^ cc1plus: all warnings being treated as errors make[3]: *** [sparc.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/mnt/scratch/objdir6/gcc' make[2]: *** [all-stage2-gcc] Error 2 make[2]: Leaving directory `/mnt/scratch/objdir6' make[1]: *** [stage2-bubble] Error 2 make[1]: Leaving directory `/mnt/scratch/objdir6' make: *** [bootstrap] Error 2 What it's complaining about is: if (TARGET_ARCH64) for (i = 0; i < 8; i++) if (save_global_or_fp_reg_p (i, 0)) n_global_fp_regs += 2; else for (i = 0; i < 8; i += 2) if (save_global_or_fp_reg_p (i, 0) || save_global_or_fp_reg_p (i + 1, 0)) n_global_fp_regs += 2; which seems highly dubious to me (the else should probably go with the outer not the inner if). gcc-6-20160403 bootstrapped fine. Strangely enough, it contains the exact same code here, so I don't know why gcc didn't complain before. Configured as: /mnt/scratch/gcc-6-20160410/configure --prefix=/mnt/scratch/install6 --with-gmp=/home/mikpe/pkgs/linux-sparc64/gmp-6.1.0 --with-mpfr=/home/mikpe/pkgs/linux-sparc64/mpfr-3.1.4 --with-mpc=/home/mikpe/pkgs/linux-sparc64/mpc-1.0.3 --enable-multilib --disable-plugin --disable-lto --disable-nls --enable-threads=posix --enable-checking=release --disable-libmudflap --enable-languages=c,ada,c++ --build=sparc-unknown-linux --target=sparc-unknown-linux --with-cpu=ultrasparc --enable-targets=all