8.1.0 build failure ../accel/tcg/cputlb.c: In function ‘do_ld_mmio_beN’: error: call to ‘qemu_build_not_reached_always’ declared with attribute error: code path is reachable
Host environment
- Operating system: Gentoo Linux
- OS/kernel version: Linux naomi 6.1.46-dist #1 SMP PREEMPT_DYNAMIC Sun Aug 20 14:21:46 EDT 2023 x86_64 AMD Phenom(tm) II X6 1055T Processor AuthenticAMD GNU/Linux
- Architecture: x86-64
- Compiler: GCC 13
- CFLAGS: -Og
Description of problem
Error when building with -Og. Does not occur with -O2.
FAILED: libqemu-i386-softmmu.fa.p/accel_tcg_cputlb.c.o
x86_64-pc-linux-gnu-gcc -m64 -mcx16 -Ilibqemu-i386-softmmu.fa.p -I. -I.. -Itarget/i386 -I../target/i386 -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/spice-server -I/usr/include/spice-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/opus -fdiagnostics-color=auto -Wall -Winvalid-pch -std=gnu11 -O2 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wundef -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wmissing-format-attribute -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -isystem /x/portage/app-emulation/qemu-8.1.0/work/qemu-8.1.0/linux-headers -isystem linux-headers -iquote . -iquote /x/portage/app-emulation/qemu-8.1.0/work/qemu-8.1.0 -iquote /x/portage/app-emulation/qemu-8.1.0/work/qemu-8.1.0/include -iquote /x/portage/app-emulation/qemu-8.1.0/work/qemu-8.1.0/host/include/x86_64 -iquote /x/portage/app-emulation/qemu-8.1.0/work/qemu-8.1.0/host/include/generic -iquote /x/portage/app-emulation/qemu-8.1.0/work/qemu-8.1.0/tcg/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -march=amdfam10 -Og -g -fPIE -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="i386-softmmu-config-target.h"' '-DCONFIG_DEVICES="i386-softmmu-config-devices.h"' -MD -MQ libqemu-i386-softmmu.fa.p/accel_tcg_cputlb.c.o -MF libqemu-i386-softmmu.fa.p/accel_tcg_cputlb.c.o.d -o libqemu-i386-softmmu.fa.p/accel_tcg_cputlb.c.o -c ../accel/tcg/cputlb.c
In file included from ../accel/tcg/cputlb.c:20:
../accel/tcg/cputlb.c: In function ‘do_ld_mmio_beN’:
/x/portage/app-emulation/qemu-8.1.0/work/qemu-8.1.0/include/qemu/osdep.h:244:35: error: call to ‘qemu_build_not_reached_always’ declared with attribute error: code path is reachable
244 | #define qemu_build_not_reached() qemu_build_not_reached_always()
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../accel/tcg/cputlb.c:2121:13: note: in expansion of macro ‘qemu_build_not_reached’
2121 | qemu_build_not_reached();
| ^~~~~~~~~~~~~~~~~~~~~~
../accel/tcg/cputlb.c: In function ‘do_st_mmio_leN’:
/x/portage/app-emulation/qemu-8.1.0/work/qemu-8.1.0/include/qemu/osdep.h:244:35: error: call to ‘qemu_build_not_reached_always’ declared with attribute error: code path is reachable
244 | #define qemu_build_not_reached() qemu_build_not_reached_always()
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../accel/tcg/cputlb.c:2764:13: note: in expansion of macro ‘qemu_build_not_reached’
2764 | qemu_build_not_reached();
| ^~~~~~~~~~~~~~~~~~~~~~
Downstream bug: https://bugs.gentoo.org/913083
Edited by Mike Gilbert