https://bugs.llvm.org/show_bug.cgi?id=45143

            Bug ID: 45143
           Summary: __builtin_dump_struct doesn't handle float fields
                    correctly
           Product: clang
           Version: 7.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: ndkrem...@gmail.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

The following program:

#include <cstdio>
struct Foo {
    float a;
};
int main() {
    Foo f = {1.2f};
    __builtin_dump_struct(&f, &std::printf);
}

prints out:

struct Foo {
float a : 0.000000
}

Rather than the correct value 1.2.

Reproduced in clang 7.0.0, 8.0.0, 9.0.0, and trunk.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to