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

Zdenek Sojka <zsojka at seznam dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zsojka at seznam dot cz

--- Comment #11 from Zdenek Sojka <zsojka at seznam dot cz> ---
A related testcase, failing on R_RISCV_PCREL_HI20 relocation with
-mcmodel=medany :

$ cat al.c 
int a[1];

__UINTPTR_TYPE__ foo(void)
{
        return (__UINTPTR_TYPE__)a + 0x7fffffff;
}

int main() {}
$ riscv64-unknown-linux-gnu-gcc-15 al.c -O -mcmodel=medany -save-temps
a-al.o: in function `foo':
al.c:(.text+0x0): relocation truncated to fit: R_RISCV_PCREL_HI20 against
symbol `a' defined in .sbss section in a-al.o
collect2: error: ld returned 1 exit status

(discussed in https://gcc.gnu.org/pipermail/gcc-help/2025-July/144413.html )

Reply via email to