[llvm-bugs] [Bug 52516] New: [M68k] Code selection failed with string length greater than or equal to 4
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Nov 15 23:14:27 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=52516
Bug ID: 52516
Summary: [M68k] Code selection failed with string length
greater than or equal to 4
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: M68k
Assignee: unassignedbugs at nondot.org
Reporter: t104360003 at ntut.org.tw
CC: glaubitz at physik.fu-berlin.de,
llvm-bugs at lists.llvm.org, minyihh at uci.edu
Created attachment 25450
--> https://bugs.llvm.org/attachment.cgi?id=25450&action=edit
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
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211116/6e45f317/attachment-0001.html>
More information about the llvm-bugs
mailing list