[llvm-dev] bug is APFloat assignment (original) (raw)
Friedman, Eli via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 16 11:34:35 PDT 2018
- Previous message: [llvm-dev] bug is APFloat assignment
- Next message: [llvm-dev] [EXTERNAL] Re: bug is APFloat assignment
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 10/16/2018 11:21 AM, Davis, Alan via llvm-dev wrote:
I am getting a segfault when assigning one APFloat to another, as in: APFloat APF1(APFloat::IEEEdouble()); APFloat APF2 = APF1;
Just tried it; seems to work fine.
APFloat is a wrapper class that wraps either an IEEEFloat or a DoubleAPFloat. A union called Storage in APFloat contains the underlying object, which is one of those two types. The assignment APF2 = APF1
What assignment? "APFloat APF2 = APF1;" calls the copy constructor, not the assignment operator.
-Eli
-- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181016/c1f214b6/attachment.html>
- Previous message: [llvm-dev] bug is APFloat assignment
- Next message: [llvm-dev] [EXTERNAL] Re: bug is APFloat assignment
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]