https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102278
--- Comment #3 from Piotr Kubaj <pkubaj at anongoth dot pl> --- Created attachment 51436 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51436&action=edit build log The full build log is attached. The used compilation flags and configuration options are listed there. To make sure it's not misoptimization, I also built now with (FreeBSD by default uses -O2): CFLAGS_FOR_TARGET="-O0" CXXFLAGS_FOR_TARGET="-O0" BOOT_CFLAGS="-O0" It fails with another error: /wrkdirs/usr/ports/lang/gcc12-devel/work/.build/./prev-gcc/xg++ -B/wrkdirs/usr/ports/lang/gcc12-devel/work/.build/./prev-gcc/ -B/usr/local/powerpc-portbld-freebsd13.0/bin/ -nostdinc++ -B/wrkdirs/usr/ports/lang/gcc12-devel/work/.build/prev-powerpc-portbld-freebsd13.0/libstdc++-v3/src/.libs -B/wrkdirs/usr/ports/lang/gcc12-devel/work/.build/prev-powerpc-portbld-freebsd13.0/libstdc++-v3/libsupc++/.libs -isystem /wrkdirs/usr/ports/lang/gcc12-devel/work/.build/prev-powerpc-portbld-freebsd13.0/libstdc++-v3/include/powerpc-portbld-freebsd13.0 -isystem /wrkdirs/usr/ports/lang/gcc12-devel/work/.build/prev-powerpc-portbld-freebsd13.0/libstdc++-v3/include -isystem /wrkdirs/usr/ports/lang/gcc12-devel/work/gcc-12-20210829/libstdc++-v3/libsupc++ -L/wrkdirs/usr/ports/lang/gcc12-devel/work/.build/prev-powerpc-portbld-freebsd13.0/libstdc++-v3/src/.libs -L/wrkdirs/usr/ports/lang/gcc12-devel/work/.build/prev-powerpc-portbld-freebsd13.0/libstdc++-v3/libsupc++/.libs -fno-PIE -c -O0 -fno-checking -gtoggle -DIN_GCC -fPIC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I/wrkdirs/usr/ports/lang/gcc12-devel/work/gcc-12-20210829/gcc -I/wrkdirs/usr/ports/lang/gcc12-devel/work/gcc-12-20210829/gcc/. -I/wrkdirs/usr/ports/lang/gcc12-devel/work/gcc-12-20210829/gcc/../include -I/wrkdirs/usr/ports/lang/gcc12-devel/work/gcc-12-20210829/gcc/../libcpp/include -I/wrkdirs/usr/ports/lang/gcc12-devel/work/gcc-12-20210829/gcc/../libcody -I/usr/local/include -I/wrkdirs/usr/ports/lang/gcc12-devel/work/gcc-12-20210829/gcc/../libdecnumber -I/wrkdirs/usr/ports/lang/gcc12-devel/work/gcc-12-20210829/gcc/../libdecnumber/dpd -I../libdecnumber -I/wrkdirs/usr/ports/lang/gcc12-devel/work/gcc-12-20210829/gcc/../libbacktrace -DLIBICONV_PLUG -o opts.o -MT opts.o -MMD -MP -MF ./.deps/opts.TPo /wrkdirs/usr/ports/lang/gcc12-devel/work/gcc-12-20210829/gcc/opts.c /wrkdirs/usr/ports/lang/gcc12-devel/work/gcc-12-20210829/gcc/opts.c: In function 'void print_filtered_help(unsigned int, unsigned int, unsigned int, unsigned int, gcc_options*, unsigned int)': /wrkdirs/usr/ports/lang/gcc12-devel/work/gcc-12-20210829/gcc/opts.c:1517:26: error: ' ' directive output may be truncated writing 2 bytes into a region of size between 1 and 256 [-Werror=format-truncation=] 1517 | "%s %s", help, _(use_diagnosed_msg)); | ^~ /wrkdirs/usr/ports/lang/gcc12-devel/work/gcc-12-20210829/gcc/opts.c:1516:22: note: 'snprintf' output between 37 and 292 bytes into a destination of size 256 1516 | snprintf (new_help, sizeof new_help, | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ 1517 | "%s %s", help, _(use_diagnosed_msg)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors