Open Quuxplusone opened 3 years ago
tmp-01b44b.c
tmp-01b44b.sh
Created attachment 25450 Preprocessed source
This is the code that triggered this error:
void test(char *s) { }
int main() { char s[] = "123"; test(s); return 0; }
This is the error message: $ clang -ccc-gcc-name linux-gnu-gcc --target=m68k tmp.c -o tmp fatal error: error in backend: Cannot select: t47: i32,ch = load<(dereferenceable load (s8) from i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__const.main.s, i32 0, i32 0) + 1), zext from i8> t4, t46, undef:i32 t46: i32 = add nuw t34, Constant:i32<1> t34: i32 = M68kISD::WrapperPC TargetGlobalAddress:i32<[4 x i8] @__const.main.s> 0 t33: i32 = TargetGlobalAddress<[4 x i8] @__const.main.s> 0 t36: i32 = Constant<1> t3: i32 = undef In function: main clang-14: error: clang frontend command failed with exit code 70 (use -v to see invocation) clang version 14.0.0 (https://github.com/llvm/llvm-project.git 7f7cab6bb1d48b53e1fa9ab5a4fd7bcf7f00f19b) Target: m68k Thread model: posix InstalledDir: /home/sheng/project/compiler/llvm_m68k/build/bin clang-14: note: diagnostic msg:
i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__const.main.s, i32 0, i32 0)
Here's my environment:
$ clang-v clang version 14.0.0 (https://github.com/llvm/llvm-project.git 7f7cab6bb1d48b53e1fa9ab5a4fd7bcf7f00f19b) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/sheng/project/compiler/llvm_m68k/build/bin Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9 Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10 Candidate multilib: .;@m64 Selected multilib: .;@m64
Attached tmp-01b44b.c (111 bytes, text/x-csrc): Preprocessed source
Attached tmp-01b44b.sh (1478 bytes, application/x-shellscript): Associated run script
tmp-01b44b.c
(111 bytes, text/x-csrc)tmp-01b44b.sh
(1478 bytes, application/x-shellscript)Created attachment 25450 Preprocessed source
This is the code that triggered this error:
void test(char *s) { }
int main() { char s[] = "123"; test(s); return 0; }
This is the error message: $ clang -ccc-gcc-name linux-gnu-gcc --target=m68k tmp.c -o tmp fatal error: error in backend: Cannot select: t47: i32,ch = load<(dereferenceable load (s8) from
i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__const.main.s, i32 0, i32 0)
+ 1), zext from i8> t4, t46, undef:i32 t46: i32 = add nuw t34, Constant:i32<1> t34: i32 = M68kISD::WrapperPC TargetGlobalAddress:i32<[4 x i8] @__const.main.s> 0 t33: i32 = TargetGlobalAddress<[4 x i8] @__const.main.s> 0 t36: i32 = Constant<1> t3: i32 = undef In function: main clang-14: error: clang frontend command failed with exit code 70 (use -v to see invocation) clang version 14.0.0 (https://github.com/llvm/llvm-project.git 7f7cab6bb1d48b53e1fa9ab5a4fd7bcf7f00f19b) Target: m68k Thread model: posix InstalledDir: /home/sheng/project/compiler/llvm_m68k/build/bin clang-14: note: diagnostic msg:Here's my environment:
$ clang-v clang version 14.0.0 (https://github.com/llvm/llvm-project.git 7f7cab6bb1d48b53e1fa9ab5a4fd7bcf7f00f19b) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/sheng/project/compiler/llvm_m68k/build/bin Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9 Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10 Candidate multilib: .;@m64 Selected multilib: .;@m64