[llvm-bugs] [Bug 45143] New: __builtin_dump_struct doesn't handle float fields correctly
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Mar 7 11:57:38 PST 2020
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: unassignedclangbugs at nondot.org
Reporter: ndkrempel at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200307/2dd57a33/attachment.html>
More information about the llvm-bugs
mailing list