https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105325
Bug ID: 105325 Summary: power10: Error: operand out of range Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: joel at jms dot id.au Target Milestone: --- Created attachment 52839 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52839&action=edit prepocessed source When building a C++ application (https://github.com/the-OpenROAD-Project/openROAD/) with -mcpu=power10, the assembler fails: as -v -I /home/joel/dev/OpenROAD/include -I /usr/include/tcl -I /home/joel/dev/OpenROAD/src/rcx/src/../include -I /home/joel/dev/OpenROAD/src/odb/include -I /home/joel/dev/OpenROAD/src/utl/include -I /home/joel/dev/OpenROAD/src/odb/include/odb -I /home/joel/dev/OpenROAD/src/odb/src/def/def -I /home/joel/dev/OpenROAD/src/odb/src/def/defzlib -I /home/joel/dev/OpenROAD/src/odb/src/lef/lef -I /home/joel/dev/OpenROAD/src/odb/src/lef/lefzlib -I /home/joel/dev/OpenROAD/src/sta/include -a64 -mpower10 -many -mlittle -o CMakeFiles/rcx.dir/extmain.cpp.o CMakeFiles/rcx.dir/extmain.cpp.s /tmp/cc5ook6I.s: Assembler messages: /tmp/cc5ook6I.s:15503: Error: operand out of range (0x0000000000031b60 is not between 0xffffffffffff8000 and 0x0000000000007ffc) /tmp/cc5ook6I.s:15585: Error: operand out of range (0x0000000000031b60 is not between 0xffffffffffff8000 and 0x0000000000007ffc) /tmp/cc5ook6I.s:15956: Error: operand out of range (0x0000000000031b60 is not between 0xffffffffffff8000 and 0x0000000000007ffc) The full command line is attached. Building the attached preprocessed source with -O1, 2, 3 shows the issue: c++ -mcpu=power10 -O3 -c extmain.cpp.ii Building at -O0 or with no -O option does not reproduce: c++ -mcpu=power10 -c extmain.cpp.ii Building with -mcpu=power9 does not reproduce: c++ -mcpu=power9 -O3 -c extmain.cpp.ii Versions: GNU C++17 (Ubuntu 11.2.0-7ubuntu2) version 11.2.0 (powerpc64le-linux-gnu) compiled by GNU C version 11.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.24-GMP GNU assembler version 2.37 (powerpc64le-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.37 The distro is Ubuntu 21.10, running on a ppc64le machine.