Opened 10 years ago

Last modified 10 years ago

#2979 new defect

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

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

Description

This model fails to compile, because in the generated code a variable called _func_ptr is declared and assigned, but _funcptr 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 (0)

Note: See TracTickets for help on using tickets.