From 591359fae065fb5f86ba957a550503daef727536 Mon Sep 17 00:00:00 2001 From: Jim Stichnoth Date: Mon, 16 Sep 2013 12:26:09 -0700 Subject: Work around a gcc 4.6.3 / 4.7 bug. GCC bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416 causes the bf64-1.c test to fail in the GCC torture test suite. This provides an upstreamable workaround. Inspection of the LLVM code base showed no other instances of the pattern that triggers the gcc bug. This can also be upstreamed as soon as I can get a working x86-32 upstream build working to verify/test against. In the meantime, we can make one pnacl-fyi bot go green again. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3685 R=jfb@chromium.org, jfb@google.com Review URL: https://codereview.chromium.org/23437037 --- include/llvm/MC/MCInst.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/llvm/MC/MCInst.h b/include/llvm/MC/MCInst.h index 4766815da5..0b657bd146 100644 --- a/include/llvm/MC/MCInst.h +++ b/include/llvm/MC/MCInst.h @@ -50,7 +50,11 @@ class MCOperand { }; public: - MCOperand() : Kind(kInvalid), FPImmVal(0.0) {} + // @LOCALMOD-START + // Initialize ImmVal instead of FPImmVal, thanks to + // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416 + MCOperand() : Kind(kInvalid), ImmVal(0) {} + // @LOCALMOD-END bool isValid() const { return Kind != kInvalid; } bool isReg() const { return Kind == kRegister; } -- cgit v1.2.3-18-g5258