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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

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
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to