[llvm-bugs] [Bug 24923] New: Broken module (piece is larger than or outside of variable) with -g and -flto
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Sep 24 03:06:24 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24923
Bug ID: 24923
Summary: Broken module (piece is larger than or outside of
variable) with -g and -flto
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: russell_gallop at sn.scee.net
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
The following example has an ODR violation. It compiles okay without -flto or
without -g but with both a broken module is reported.
$ clang --version
clang version 3.8.0 (trunk 248463) (llvm/trunk 248476)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ cat a.cpp
struct P {};
void foo() { P l; }
$ cat b.cpp
struct P {
int a;
int b;
};
P fn1() {
P r;
r.a = 0;
return r;
}
$ cat test.sh
#!/bin/bash -e
clang -O2 -g -flto $1 -c -o a.o
clang -O2 -g -flto $2 -c -o b.o
llvm-lto a.o b.o
$ ./test.sh a.cpp b.cpp
piece is larger than or outside of variable
tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !24, metadata
!32), !dbg !31
!24 = !DILocalVariable(name: "r", scope: !20, file: !12, line: 6, type:
!"_ZTS1P")
!32 = !DIExpression(DW_OP_bit_piece, 0, 32)
LLVM ERROR: Broken module found, compilation aborted!
--
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/20150924/649c00c9/attachment.html>
More information about the llvm-bugs
mailing list