Opened 13 years ago
Closed 12 years ago
#1701 closed defect (fixed)
error with Modelica.Utilities.Streams.error
Reported by: | mohamed | Owned by: | Willi Braun |
---|---|---|---|
Priority: | critical | Milestone: | 1.9.0 |
Component: | Run-time | Version: | |
Keywords: | Cc: | mohamed, Lennart Ochel |
Description (last modified by )
Dear all,
Using the function Modelica.Utilities.Streams.error in this simple example with OMShell 1.8.1 generates some
errors:
model err parameter Real a=1; parameter Real b=1; Real x; equation x=a+b; if (x>1) then Modelica.Utilities.Streams.error("\n %% Error (Modelization)\n"); end if; end err;
Error: Error building simulator. Buildlog: gcc -I"C:/OpenModelica1.8.1//include/omc" -O0 -falign-functions -msse2 -mfpmath=sse -c -o Modelica_Utilities_Streams_error.o Modelica_Utilities_Streams_error.c \\Modelica_Utilities_Streams_error.c:3:1: warning: "MODELICA_ASSERT" redefined \\In file included from C:/OpenModelica1.8.1//include/omc/modelica_string.h:35, \\ from C:/OpenModelica1.8.1//include/omc/modelica.h:82, \\ from Modelica_Utilities_Streams_error.h:4, \\ from Modelica_Utilities_Streams_error.c:1: \\C:/OpenModelica1.8.1//include/omc/openmodelica.h:267:1: warning: this is the location of the previous definition \\Modelica_Utilities_Streams_error.c:4:1: warning: "MODELICA_TERMINATE" redefined \\C:/OpenModelica1.8.1//include/omc/openmodelica.h:270:1: warning: this is the location of the previous definition \\Modelica_Utilities_Streams_error.c: In function 'in_Modelica_Utilities_Streams_error': \\Modelica_Utilities_Streams_error.c:24: error: variable or field 'out' declared void \\Modelica_Utilities_Streams_error.c:27: error: void value not ignored as it ought to be \\mingw32-make: *** [Modelica_Utilities_Streams_error] Error 1 \\
Is something wrong?
Best regards,
mohamed
Change History (4)
comment:1 by , 13 years ago
comment:2 by , 12 years ago
Cc: | mohamed, → mohamed |
---|---|
Component: | → Backend |
Description: | modified (diff) |
comment:3 by , 12 years ago
Cc: | added |
---|---|
Component: | Backend → Run-time |
Milestone: | → 1.9.0 |
Owner: | changed from | to
Status: | new → assigned |
This generates correct code. But the simulation returns success even though the assertions in error are triggered.
Note:
See TracTickets
for help on using tickets.
Fixed the code-generation issue, but not the issue with if-equations