https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111937
Bug ID: 111937 Summary: [RISCV][lto][offload] When `NUM_POLY_INT_COEFFS` > 1, the `poly_xxx` made `lto_input_mode_table` unable to parse binary gimple data. Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: mxlol233 at outlook dot com Target Milestone: --- Recently, I wanted to port an open source gpgpu target (a custom modification of RISCV) to GCC/openmp (Following the approach of gcu and nvptx, using offloading (https://gcc.gnu.org/wiki/Offloading)). However, the upstream after this patch (https://github.com/mxlol233-ventus/gcc/commit/3496ca4e6566fc3c5f1093a0290bb88c34d368f8#diff-98b71abedd6e59eb80cb43e75ebb507ffa8bf540ee88aa099c6c7fe7cf90ae3e), NUM_POLY_INT_COEFFS became greater than 1, while for the x86-64-*-* target, NUM_POLY_INT_COEFFS=1. This makes it impossible for a RISC-V*-*-* lto1 to parse the data in the LTO sections (e.g. gnu.offload_lto_*) of the object files generated by x86-64-*-*.