The function 'foo' is not a valid constant function error occurs only in large builds

In reply to jeromeburke2:

If your code works in one simulator but not another, then you have a tool issue. Since this forum isn’t for tool issues, you need to contact your vendor support team for additional assistance.