(original) (raw)

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