Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

function returning struct by value, assign it to struct, fails with -o3

$
0
0

Hello

Still with RM48L952. Compiler 5.0.1 and 5.0.4 (for tests)

Following example:

In FIQ interrupt isr a subfunction called function1() has a struct variable with 2 float, called myStruct and has following instruction:

myStruct = getResultFromFunction2();

getResultFromFunction2() returns a struct of same type (2 floats) by value. The function is located in another C module and is not inlined.

Running this without optimization runs as expected.

Running with -O3 has the effect, that sometimes myStruct gets other values. Not sure from where yet.

I saw: SDSCM00043229 in defect history. Are there other issues known?

Thank you for any hint!

Best Regards!

Roger


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>