[LLVMbugs] [Bug 20771] New: Regression: "Stored value type does not match pointer operand type!"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 27 09:29:43 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20771

            Bug ID: 20771
           Summary: Regression: "Stored value type does not match pointer
                    operand type!"
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

hummer:delta thakis$ cat repro.ii
class Heap;
struct Smi {
  inline static Smi *cast();
};
struct StoreBuffer {
  inline void Mark(char *addr);
  Heap *heap_;
};
struct Heap {
  Smi *store_buffer_top() { return Smi::cast(); }
  inline void RecordWrite(char *address, int offset);
  StoreBuffer store_buffer_;
};
void StoreBuffer::Mark(char *addr) {
  char **top = reinterpret_cast<char **>(heap_->store_buffer_top());
  *top++ = addr;
}
void Heap::RecordWrite(char *address, int offset) {
  store_buffer_.Mark(address + offset);
};
class Deserializer {
  void ReadChunk(void **start, void **end, char *object_address);
};
void Deserializer::ReadChunk(void **current, void **limit,
                             char *current_object_address) {
  Heap *const heap = 0;
  while (current < limit) {
    char *current_address = reinterpret_cast<char *>(current);
    heap->RecordWrite(
        current_object_address,
        static_cast<int>(current_address - current_object_address));
  }
}
hummer:delta thakis$ /Users/thakis/src/llvm-build/bin/clang-cl -w -c repro.ii
-O2 -Xclang -triple -Xclang  i686-pc-windows-msvc 
Stored value type does not match pointer operand type!
  store i8** %current, i8** %0, align 4
 i8*fatal error: error in backend: Broken function found, compilation aborted!
clang-3.5: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
clang version 3.6.0 (216461)
Target: x86_64-apple-windows-msvc
Thread model: posix
clang-3.5: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.5: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.


This is with r216461. It used to work with r215365.

-- 
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/20140827/fcf8f6fd/attachment.html>


More information about the llvm-bugs mailing list