Closed Quuxplusone closed 4 years ago
Bugzilla Link | PR47041 |
Status | RESOLVED FIXED |
Importance | P normal |
Reported by | Dimitry Andric (dimitry@andric.com) |
Reported on | 2020-08-07 13:27:40 -0700 |
Last modified on | 2020-08-18 02:53:33 -0700 |
Version | 11.0 |
Hardware | Other All |
CC | czhengsz@cn.ibm.com, hans@chromium.org, htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, qshanz@cn.ibm.com |
Fixed by commit(s) | |
Attachments | |
Blocks | PR46725 |
Blocked by | |
See also |
Minimized test case:
// clang -cc1 -triple powerpc-- -S -O2 ASTReader-min.cpp
class a {
public:
using b = int;
int operator[](b) const;
};
struct c {
int e : 32;
int d : 31;
int g : 1;
int : 31;
int f;
c() : e(f), d(), g(1) {}
c(int p1) : e(p1) {}
};
struct h {
using i = a;
c j(const i &, unsigned &);
};
c h::j(const i &p1, unsigned &k) {
int l = p1[1];
if (l)
return c();
return k;
}
https://reviews.llvm.org/D83365 should resolve this issue. I verified with the latest clang code base, there is no assertions. What can I do to solve this on release branch V11.0? Thanks
(In reply to Chen Zheng (陈 正) from comment #2)
> https://reviews.llvm.org/D83365 should resolve this issue. I verified with
> the latest clang code base, there is no assertions. What can I do to solve
> this on release branch V11.0? Thanks
opps, this is a wrong comment. This issue asserts at a different place.
(In reply to Chen Zheng (陈 正) from comment #2)
> https://reviews.llvm.org/D83365 should resolve this issue. I verified with
> the latest clang code base, there is no assertions. What can I do to solve
> this on release branch V11.0? Thanks
I tried with 36f9fe2d349, but it still asserts for me, both with the minimized
test case, and the original test case:
$ ~/ins/llvmorg-12-init-00698-g36f9fe2d349/bin/clang -cc1 -triple powerpc-- -S -
O2 ASTReader-min.cpp
ASTReader-min.cpp:13:11: warning: field 'f' is uninitialized when used here [-
Wuninitialized]
c() : e(f), d(), g(1) {}
^
Assertion failed: (&*It == &StartMI && "No new def between StartMI and
EndMI."), function fixupIsDeadOrKill, file /home/dim/src/llvm/llvm-
project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp, line 2737.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /home/dim/ins/llvmorg-12-init-00698-
g36f9fe2d349/bin/clang -cc1 -triple powerpc-- -S -O2 ASTReader-min.cpp
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'ASTReader-min.cpp'.
4. Running pass 'PowerPC MI Peephole Optimization' on function
'@_ZN1h1jERK1aRj'
#0 0x00000000030e7e58 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/dim/ins/llvmorg-12-init-00698-g36f9fe2d349/bin/clang+0x30e7e58)
#1 0x00000000030e5cb8 llvm::sys::RunSignalHandlers() (/home/dim/ins/llvmorg-12-
init-00698-g36f9fe2d349/bin/clang+0x30e5cb8)
#2 0x00000000030e85b6 SignalHandler(int) (/home/dim/ins/llvmorg-12-init-00698-
g36f9fe2d349/bin/clang+0x30e85b6)
#3 0x0000000805825a30 handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
Abort trap
I'll see what happens with the very latest git master as of today (2020-08-10).
(In reply to Dimitry Andric from comment #4)
> I'll see what happens with the very latest git master as of today
> (2020-08-10).
It still asserts with 4f9f4b21e07 (aka llvmorg-12-init-02663-g4f9f4b21e07).
Yes, I found the same assertion like yours.
I am working on a fix now
https://reviews.llvm.org/D85659 is created for this issue.
(In reply to Chen Zheng (陈 正) from comment #7)
> https://reviews.llvm.org/D85659 is created for this issue.
That landed, and I've also pushed it to 11.x as
8cf2c031632f88a44eea68b48235496cf1c5d6ec. Please let me know if there are any
follow-ups.