Example: call1.c

up: index
prev: align4.c
next: eq1.c

    #include <stdio.h>
    
    int f(int a, int b, int c) {  return a+b+c; }
    
    int main()
    {
        int (*g)(int a, ...) = (int (*)(int, ...)) f;
        fprintf(stderr,"Value %d\n", (*g)(1,10,100)); // call is UB in ISO
    }

Experimental data (what does this mean?)

cerberus-cheri
cerberus-cheri-no-pnvi
cerberus-cheri-revocation
cerberus-cheri-revocation-no-pnvi
cerberus-cheri-cornucopia
cerberus-cheri-cornucopia-no-pnvi
 exit codes: compile 0 / execute 1 Undefined {ub: "UB041_function_not_compatible", loc: "<8:36--8:50>"}
 
clang-riscv-O0-bounds-subobject-safe
clang-riscv-O0-bounds-aggressive
clang-riscv-O0-bounds-very-aggressive
clang-riscv-O0-bounds-everywhere-unsafe
 Value -1042647
 
clang-riscv-O0-bounds-conservative
clang-riscv-O0-bounds-references-only
 Value -1042631
 
clang-morello-O0-bounds-everywhere-unsafe Value -1073152286
 
clang-morello-O0-bounds-conservative
clang-morello-O0-bounds-references-only
clang-morello-O0-bounds-subobject-safe
clang-morello-O0-bounds-aggressive
clang-morello-O0-bounds-very-aggressive
 Value -1073152270
 
gcc-morello-O3
clang-morello-O3-bounds-conservative
clang-morello-O3-bounds-subobject-safe
clang-riscv-O3-bounds-conservative
clang-riscv-O3-bounds-subobject-safe
 Value 111
 
gcc-morello-O0 Value -2143278182