﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2494	Derivative annotation handling broken	Christoph Höger	Willi Braun	"The following model does not compile with omc 1.9.0:

{{{
#!mo
within ;

model pendulumDer

  function equation1
    input Real x;
    input Real y;
    output Real r = x^2 + y^2 - 1;
    annotation(...);
  end equation1;

  function equation1_der1
    input Real x;
    input Real y;
    input Real dx;
    input Real dy;
    output Real r = 2*(x*dx + y*dy);
    annotation(...);
  end equation1_der1;

  function equation1_der2
    input Real x;
    input Real y;
    input Real dx;
    input Real dy;
    input Real ddx;
    input Real ddy;
    output Real r = 2*(x * ddx + dx^2 + y * ddy + dy^2);
  end equation1_der2;

  Real x(start=0.1),  y(start=-0.9, fixed=true),  vx,  vy,  F;

equation
  equation1(x, y) = 0;
  der(x) = vx;
  der(y) = vy;
  der(vx) = F*x;
  der(vy) = F*y - 9.81;

end pendulumDer;
}}}

output:

{{{
2 choeger@gimli ~/test % make -f pendulumDer.makefile                                                                                                                                                                                      :(
gcc   -falign-functions -march=native -mfpmath=sse -fPIC   -I""/usr/include/omc"" -I. -L""/home/choeger/test""  -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME  -c -o pendulumDer.o pendulumDer.c
pendulumDer.c: In function ‘eqFunction_2’:
pendulumDer.c:1228:3: error: too many arguments to function ‘omc_pendulumDer_equation1__der2’
pendulumDer_functions.c:74:37: note: declared here
pendulumDer.c:1237:3: error: too many arguments to function ‘omc_pendulumDer_equation1__der2’
pendulumDer_functions.c:74:37: note: declared here
make: *** [pendulumDer.o] Error 1
}}}"	defect	accepted	high	Future	Code Generation	trunk			
