[aesop] #34: Initialization + declaration: invalid reorder
#34: Initialization + declaration: invalid reorder ---------------------------+------------------------------------------------ Reporter: dkimpe | Owner: Type: defect | Status: new Priority: major | Component: code generator Version: git repository | Keywords: ---------------------------+------------------------------------------------ In the following (accepted by the compiler): {{{ ... init_a (); int my_var = call_b (); ... }}} my_var gets moved to the context structure (correct); However, it gets initialized at the beginning of the function, effectively moving {{{call_b}}} before {{{init_a}}} in the example. This can be a very hard to track down bug... Possible solution: disallow behavior in source translator or fix. -- Ticket URL: <https://trac.mcs.anl.gov/projects/aesop/ticket/34> aesop <https://trac.mcs.anl.gov/projects/aesop> The Aesop Language
#34: Initialization + declaration: invalid reorder ---------------------------+------------------------------------------------ Reporter: dkimpe | Owner: Type: defect | Status: new Priority: major | Component: code generator Version: git repository | Keywords: ---------------------------+------------------------------------------------ Comment(by dkimpe): Actually, cfr. ticket #31, {{{call_b}}} is actually called twice: the sequence of calls becomes: in post function: {{{ call_b /* in post function */ call_b /* in worker */ init_a /* in worker */ }}} -- Ticket URL: <https://trac.mcs.anl.gov/projects/aesop/ticket/34#comment:1> aesop <https://trac.mcs.anl.gov/projects/aesop> The Aesop Language
#34: Initialization + declaration: invalid reorder ---------------------------+------------------------------------------------ Reporter: dkimpe | Owner: Type: defect | Status: new Priority: major | Component: code generator Version: git repository | Keywords: ---------------------------+------------------------------------------------ Comment(by jenkins): Added a test case, toolchain/tests/parser/local-var-def.ae. I should note that the reorder doesn't require a function call to occur. -- Ticket URL: <https://trac.mcs.anl.gov/projects/aesop/ticket/34#comment:2> aesop <https://trac.mcs.anl.gov/projects/aesop> The Aesop Language
participants (1)
-
aesop