aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorPan Li <pan2.li@intel.com>2024-04-12 16:38:18 +0800
committerPan Li <pan2.li@intel.com>2024-04-12 18:51:51 +0800
commit6e7e5943619a2c20d93fc7089c885483786558bc (patch)
treea462d0ba05649dc9704617bcf44dee06b4fae8ab /libgfortran
parent67e1433a94f8ca82e2c36b79af44256430c73c38 (diff)
downloadgcc-6e7e5943619a2c20d93fc7089c885483786558bc.zip
gcc-6e7e5943619a2c20d93fc7089c885483786558bc.tar.gz
gcc-6e7e5943619a2c20d93fc7089c885483786558bc.tar.bz2
RISC-V: Fix Werror=sign-compare in riscv_validate_vector_type
This patch would like to fix the Werror=sign-compare similar to below: gcc/config/riscv/riscv.cc: In function ‘void riscv_validate_vector_type(const_tree, const char*)’: gcc/config/riscv/riscv.cc:5614:23: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Werror=sign-compare] 5614 | if (TARGET_MIN_VLEN < required_min_vlen) The TARGET_MIN_VLEN is *int* by default but the required_min_vlen returned from riscv_vector_required_min_vlen is **unsigned**. Thus, adjust the related function and reference variable(s) to int type to avoid such kind of Werror. The below test suite is passed for this patch. * The rv64gcv fully regression tests. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_vector_float_type_p): Take int as the return value instead of unsigned. (riscv_vector_element_bitsize): Ditto. (riscv_vector_required_min_vlen): Ditto. (riscv_validate_vector_type): Take int type for local variable(s). Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'libgfortran')
0 files changed, 0 insertions, 0 deletions