typedef long double real64;
class IBase
{
public:
virtual real64 getReal() = 0;
};
class Bar
: public IBase
{
public:
Bar() :
m_real(0)
{
}
virtual real64 getReal();
private:
real64 m_real;
};
real64 Bar::getReal()
{
return m_real;
}
class Foo
{
public:
Foo()
{
m_bar = new Bar();
}
IBase* m_bar;
};
Foo& getFoo()
{
static Foo foo;
return foo;
}
void test()
{
Foo& foobar = getFoo();;
real64 newReal = 1;
newReal += foobar.m_bar->getReal();
}
The above sample code produces the following compiler output:
**** Build of configuration Debug for project FW ****
"C:\\ti\\ccsv6\\utils\\bin\\gmake" -j 4 error.obj
'Building file: ../error.cpp'
'Invoking: C2000 Compiler'
"C:/ti/ccsv6/tools/compiler/c2000_6.4.11/bin/cl2000" -v28 -mt -ml --tmu_support=tmu0 --float_support=fpu32 --cla_support=cla1 --include_path="C:/ti/ccsv6/tools/compiler/c2000_6.4.11/include" --advice:performance=all -g --define=LARGE_MODEL --define=ARCH28075 --display_error_number --diag_wrap=off --diag_warning=225 --diag_warning=255 --verbose_diagnostics --buffer_diagnostics --gen_func_subsections=on --preproc_with_compile --preproc_dependency="error.pp" --cmd_file="configPkg/compiler.opt" "../error.cpp"
>> ../error.cpp, line 48: INTERNAL ERROR: Decomposition error
This may be a serious problem. Please contact customer support with a
description of this problem and a sample of the source files that caused this
INTERNAL ERROR message to appear.
Cannot continue compilation - ABORTING!
>> Compilation failure
gmake: *** [error.obj] Error 1
**** Build Finished ****
The error occurs in the line:
newReal += foobar.m_bar->getReal();
If I split the line into two lines without the += operator (assign the value to a temporary variable, then add that variable), the code compiles without error.
For me that solves the issue, but I wanted to report it anyway, as the error message suggests.