Opened 10 years ago

Last modified 10 years ago

#2979 new defect

Underscores in function pointer names causes invalid generated code — at Version 1

Reported by: Per Östlund Owned by: Martin Sjölund
Priority: normal Milestone: Future
Component: Code Generation Version: trunk
Keywords: Cc:

Description (last modified by Per Östlund)

This model fails to compile, because in the generated code a variable called _func_ptr is declared and assigned, but _func__ptr is instead used when trying to call the function.

function f
  output Real x := 3;
end f;

function test
  output Real x;
protected
  partial function FuncType
    output Real x;
  end FuncType;

  FuncType func_ptr := f;
algorithm
  x := func_ptr();
end test;

Change History (1)

comment:1 by Per Östlund, 10 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.