call_graph (Linux, executable version, v2_30_00) shows me functions to be orphaned though they are not.
In the optimizer interlist file one can see that these functions are called with CALLRET, maybe this has something to do with it.
Here is a simple example:
twofuncs.cpp:
#include <assert.h>
static
void called_func1(int *restrict x)
{
int y[4]={0,1,2,3};
x[2]+=y[3];
}
static
void called_func2(int *restrict x)
{
int y[8]={1,2,4,8,16,32,64,128};
x[2]+=y[3];
}
void calling_func(int *restrict x, const int b)
{
switch (b)
{
case 4:
called_func1(x);
break;
case 5:
called_func2(x);
break;
default:
assert(0);
break;
}
}
I compiled it using the following lines (using Code Generation Tools v7.3.2, but the error occurs with other versions as well):
cl6x -c --auto_inline=0 --optimizer_interlist -o0 --symdebug:skeletal -mv6740 --abi=coffabi twofuncs.cpp
ar6x rvu twofuncs.lib twofuncs.obj
A workaround is to hand in a .txt file with indirect function calls (as mentioned in the call_graph documentation). However, this does not make sense in large projects, especially because I do not know what call_graph wrongly considers to be an inderenct function call.
Thanks for any help on this!