open64-compiler / open64

open64 compiler
78 stars 29 forks source link

[SPEC2006] error: value doesn't match function result type '%x_struct = type { i32, i32 }' #40

Open zqb-all opened 1 year ago

zqb-all commented 1 year ago

spec2k6 462.libquantum build fail. one of the errors can be reproduce by the following code:

struct x_struct {
  int y;
  int z;
};

typedef struct x_struct x;

x foo(int a)
{
    x m;
    if (a)
        exit(1);
    return m;
}

cmd

xcalcc -c a.c

error:

2023-10-28 15:56:45,554 - xcalcc - ERROR - /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/llc: error: /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/llc: a.O.ll:18:7: error: value doesn't match function result type '%x_struct = type { i32, i32 }'
  ret void
      ^ (xcalcc:630)