chipsalliance / VeeR-ISS

Apache License 2.0
114 stars 33 forks source link

build error in vector.cpp #33

Closed Moore123 closed 1 year ago

Moore123 commented 1 year ago

[ubuntu-22.10 12.2.0-3ubuntu1 g++-12.2.0 ]

vector.cpp:22140:30: error: cannot convert 'WdRiscv::Float16' to 'ELEM_TYPE2X' {aka 'float'} in initialization 22140 ELEM_TYPE2X e1dw = e1; ^~
WdRiscv::Float16
vector.cpp:22225:30: error: cannot convert 'WdRiscv::Float16' to 'ELEM_TYPE2X' {aka 'float'} in initialization 22225 ELEM_TYPE2X e1dw = e1; ^~
WdRiscv::Float16

Maybe :

ELEM_TYPE2X e1dw = (float)e1;

or ELEM_TYPE2X e1dw = ELEM_TYPE2X {e1};

Will fix these. but I'm not very confident.

mkurc-ant commented 1 year ago

Hi. This looks like an issue with the newer GCC compiler. We will work on adding building using multiple compilers to the CI to catch potential issues like that.

mkurc-ant commented 1 year ago

I fixed the problem in the code plus added testing with different compilers in CI: https://github.com/chipsalliance/VeeR-ISS/pull/34