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

--- Comment #11 from Haixiao Yan <Haixiao.Yan.CN at windriver dot com> ---
This issue still occurs on RISC-V 64-bit.

$ riscv64-linux-gnu-gcc-13 -O2 -O6 -Werror -Wall -S cpumap_repro.i 
/buildarea5/hyan-cn/project_lts24-world/build-perf-riscv64/tmp-glibc/work/qemuriscv64-wrs-linux/perf/1.0/perf-1.0/tools/lib/perf/cpumap.c:
In function ‘perf_cpu_map__merge’:
/buildarea5/hyan-cn/project_lts24-world/build-perf-riscv64/tmp-glibc/work/qemuriscv64-wrs-linux/perf/1.0/perf-1.0/tools/lib/perf/cpumap.c:422:13:
error: argument 1 range [18446744065119617024, 18446744073709551612] exceeds
maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
In file included from
/buildarea5/hyan-cn/project_lts24-world/build-perf-riscv64/tmp-glibc/work/qemuriscv64-wrs-linux/perf/1.0/perf-1.0/tools/lib/perf/cpumap.c:3:
/buildarea5/hyan-cn/project_lts24-world/build-perf-riscv64/tmp-glibc/work/qemuriscv64-wrs-linux/perf/1.0/recipe-sysroot/usr/include/stdlib.h:672:14:
note: in a call to allocation function ‘malloc’ declared here
cc1: all warnings being treated as errors

Version: 13.4.0
Known to fail: 13.3.0, 13.4.0
Known to work: 11.5.0, 12.5.0, 14.3.0, 15.2.0

Reproduce:
riscv64-linux-gnu-gcc-13 -O2 -O6 -Werror -Wall -S cpumap_repro.i

for cpumap_repro.i, see the attachment reproduce on riscv-64.

Reply via email to