From: Alexandre Oliva Date: Sun, 1 Feb 2026 07:35:33 +0000 (-0300) Subject: testsuite: riscv: set expected code model for pr113206-2.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f2f78a72ec3f5f94d20e47b88943e6fcde2ddc5;p=thirdparty%2Fgcc.git testsuite: riscv: set expected code model for pr113206-2.c With a compiler that defaults to cmodel medany, pr113206-2.c ends up generating an extra vsetvli insn. Set the code model explicitly to medlow to meet the expectation. This is unfortunately not enough to get the test to a pass on trunk. It is on gcc-15 and the change is an improvement, but trunk still gets an unexpected vsetvli even with the change. for gcc/testsuite/ChangeLog * gcc.target/riscv/rvv/autovec/pr113206-2.c: Set the expected code model explicitly. --- diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr113206-2.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr113206-2.c index a3c61b467da..98b51d7a34b 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr113206-2.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr113206-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -frename-registers -mrvv-max-lmul=m8" } */ +/* { dg-options "-march=rv64gcv -mabi=lp64d -mcmodel=medlow -O3 -frename-registers -mrvv-max-lmul=m8" } */ signed char e; short f = 8;