#3315 closed defect (fixed)
ParModelica generating broken code for minimal testcase
Reported by: | gustaf | Owned by: | mahge930 |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | ParModelica | Version: | trunk |
Keywords: | regression | Cc: | adrpo |
Description
class null end null;
build$ omc -g=ParModelica ../null.mo -s class null end null;
build$ make -f null.makefile g++ -fPIC -O0 -falign-functions -march=native -I"/home/gustaf/src/OpenModelica/build/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o null.o null.c In file included from /home/gustaf/src/OpenModelica/build/include/omc/c/openmodelica_func.h:44:0, from null.c:5: /home/gustaf/src/OpenModelica/build/include/omc/c/simulation_data.h:48:71: error: invalid conversion from ‘const void*’ to ‘modelica_string {aka void*}’ [-fpermissive] #define omc_dummyRealAttribute {"","","",DBL_MAX,DBL_MIN,0,0,1.0,0,0.0} ^ null_12jac.h:2:51: note: in expansion of macro ‘omc_dummyRealAttribute’ static const REAL_ATTRIBUTE dummyREAL_ATTRIBUTE = omc_dummyRealAttribute; ^ /home/gustaf/src/OpenModelica/build/include/omc/c/simulation_data.h:48:71: error: invalid conversion from ‘const void*’ to ‘modelica_string {aka void*}’ [-fpermissive] #define omc_dummyRealAttribute {"","","",DBL_MAX,DBL_MIN,0,0,1.0,0,0.0} ^ null_12jac.h:2:51: note: in expansion of macro ‘omc_dummyRealAttribute’ static const REAL_ATTRIBUTE dummyREAL_ATTRIBUTE = omc_dummyRealAttribute; ^ /home/gustaf/src/OpenModelica/build/include/omc/c/simulation_data.h:48:71: error: invalid conversion from ‘const void*’ to ‘modelica_string {aka void*}’ [-fpermissive] #define omc_dummyRealAttribute {"","","",DBL_MAX,DBL_MIN,0,0,1.0,0,0.0} ^ null_12jac.h:2:51: note: in expansion of macro ‘omc_dummyRealAttribute’ static const REAL_ATTRIBUTE dummyREAL_ATTRIBUTE = omc_dummyRealAttribute; ^ <builtin>: recipe for target 'null.o' failed make: *** [null.o] Error 1
Test case same as closed #3190, while error appears to be same/similar to #3198.
Some kind of minimal regression tests for ParModelica would really be useful, to avoid bugs like this one...
Change History (7)
comment:1 Changed 9 years ago by adrpo
- Owner set to mahge930
- Status changed from new to assigned
comment:2 Changed 9 years ago by gustaf
- Priority changed from blocker to high
comment:3 Changed 9 years ago by mahge930
comment:4 Changed 9 years ago by mahge930
- Resolution set to fixed
- Status changed from assigned to closed
comment:5 Changed 9 years ago by dietmarw
- Milestone changed from Future to 1.9.4
Sorting these closed tickets away from "Future". Since they were closed after the last 1.9.3 release, it's very likely that they should have been part of the 1.9.4 release.
comment:6 Changed 8 years ago by sjoelund.se
- Milestone changed from 1.9.4 to 1.9.4-1.9.x
Milestone renamed
comment:7 Changed 8 years ago by sjoelund.se
- Milestone changed from 1.9.4-1.9.x to 1.9.4
Milestone renamed
For the record, I've been told this is due to the simulation runtime being compiled as C++-code, since that's what's what's used in ParModelica, while it's only valid C-code. The workaround is to not do simulations from ParModelica, or to patch the simulation runtime.
I've changed priority from blocker to high.