Opened 11 years ago
Last modified 7 years ago
#2609 new defect
BackendDAE modules "removedUnusedFunction" hides other bugs. — at Initial Version
Reported by: | Willi Braun | Owned by: | probably noone |
---|---|---|---|
Priority: | normal | Milestone: | Future |
Component: | Backend | Version: | trunk |
Keywords: | Cc: | Niklas Worschech, Lennart Ochel |
Description
The module postOptModule "removedUnusedFunction" should be neutral in terms of functionality to our testsuite, but it isn't.
Following results when it's deactivated:
Failed tests: ./openmodelica/cppruntime/libraries/msl32/Modelica.Electrical.QuasiStationary.SinglePhase.Examples.ParallelResonance.mos ./openmodelica/cppruntime/libraries/msl32/Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum.mos ./openmodelica/cppruntime/libraries/msl32/Modelica.Mechanics.MultiBody.Examples.Elementary.RollingWheelSetDriving.mos ./openmodelica/debugDumps/optdaedump.mos // doesn't matter ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.Air.DryAirNasa.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.IdealGases.Air.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.IdealGases.Nitrogen.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.IdealGases.SimpleNaturalGas.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.IdealGases.SimpleNaturalGasFixedComposition.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.Water.IdealSteam.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.Water.WaterIF97OnePhase_ph.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.Water.WaterIF97_pT.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.Water.WaterIF97_ph.mos ./simulation/libraries/msl32/Modelica.Fluid.Examples.AST_BatchPlant.Test.TankWithEmptyingPipe1.mos ./simulation/libraries/msl32/Modelica.Fluid.Examples.AST_BatchPlant.Test.TankWithEmptyingPipe2.mos ./simulation/libraries/msl32/Modelica.Fluid.Examples.AST_BatchPlant.Test.TanksWithEmptyingPipe1.mos ./simulation/libraries/msl32/Modelica.Fluid.Examples.AST_BatchPlant.Test.TanksWithEmptyingPipe2.mos ./simulation/libraries/msl32/Modelica.Fluid.Examples.AST_BatchPlant.Test.TwoTanks.mos ./simulation/libraries/msl32/Modelica.Fluid.Examples.BranchingDynamicPipes.mos ./simulation/libraries/msl32/Modelica.Fluid.Examples.TraceSubstances.RoomCO2.mos ./simulation/libraries/msl32/Modelica.Fluid.Examples.TraceSubstances.RoomCO2WithControls.mos ./simulation/modelica/algorithms_functions/ForIterator2.mos ./simulation/modelica/hpcom/Modelica.Fluid.Examples.BranchingDynamicPipes.mos // duplicated 24 of 2508 failed
So actually this are only 22 failing test, but as far as I see this are only 4 different issues. So will create a separated ticket for them.
For:
./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.Air.DryAirNasa.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.IdealGases.Air.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.IdealGases.Nitrogen.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.IdealGases.SimpleNaturalGas.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.IdealGases.SimpleNaturalGasFixedComposition.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.Water.IdealSteam.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.Water.WaterIF97OnePhase_ph.mos ./simulation/libraries/msl31/media/Modelica.Media.Examples.Tests.MediaTestModels.Water.WaterIF97_pT.mos ./simulation/libraries/msl31/media
the issue seems to be a missing functions, for example:
Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir_functions.c: In function ‘omc_Modelica_Media_Interfaces_PartialMedium_specificEnthalpy__pTX’: Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir_functions.c:4883: error: ‘Modelica_Media_Interfaces_PartialMedium_setState__pTX_rettype’ undeclared (first use in this function) Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir_functions.c:4883: error: expected ‘;’ before ‘tmp2’ Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir_functions.c:4884: error: ‘Modelica_Media_Interfaces_PartialMedium_specificEnthalpy_rettype’ undeclared (first use in this function) Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir_functions.c:4884: error: expected ‘;’ before ‘tmp3’ Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir_functions.c:4889: error: ‘tmp2’ undeclared (first use in this function) Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir_functions.c:4890: error: ‘tmp3’ undeclared (first use in this function) Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir_functions.c: In function ‘omc_Modelica_Media_Interfaces_PartialMixtureMedium_specificEnthalpy__pTX’: Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir_functions.c:4908: error: ‘Modelica_Media_Interfaces_PartialMixtureMedium_setState__pTX_rettype’ undeclared (first use in this function) Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir_functions.c:4908: error: expected ‘;’ before ‘tmp2’ Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir_functions.c:4909: error: ‘Modelica_Media_Interfaces_PartialMixtureMedium_specificEnthalpy_rettype’ undeclared (first use in this function) Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir_functions.c:4909: error: expected ‘;’ before ‘tmp3’ Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir_functions.c:4914: error: ‘tmp2’ undeclared (first use in this function) Modelica.Media.Examples.Tests.MediaTestModels.Air.MoistAir_functions.c:4915: error: ‘tmp3’ undeclared (first use in this function)
For:
./simulation/libraries/msl32/Modelica.Fluid.Examples.BranchingDynamicPipes.mos ./simulation/libraries/msl32/Modelica.Fluid.Examples.TraceSubstances.RoomCO2.mos ./simulation/libraries/msl32/Modelica.Fluid.Examples.TraceSubstances.RoomCO2WithControls.mos
it seems that something in instantiation of function with constants is going wrong, since "_TinK", "_poly_Cp" and "_poly_rho" are constants in package.
Modelica.Fluid.Examples.BranchingDynamicPipes_functions.c: In function 'omc_Modelica_Media_Incompressible_TableBased_h__T__der': Modelica.Fluid.Examples.BranchingDynamicPipes_functions.c:8790: error: '_TinK' undeclared (first use in this function) Modelica.Fluid.Examples.BranchingDynamicPipes_functions.c:8790: error: (Each undeclared identifier is reported only once Modelica.Fluid.Examples.BranchingDynamicPipes_functions.c:8790: error: for each function it appears in.) Modelica.Fluid.Examples.BranchingDynamicPipes_functions.c:8800: error: '_poly_Cp' undeclared (first use in this function) Modelica.Fluid.Examples.BranchingDynamicPipes_functions.c: In function 'omc_Modelica_Media_Incompressible_TableBased_h__T': Modelica.Fluid.Examples.BranchingDynamicPipes_functions.c:8829: error: '_TinK' undeclared (first use in this function) Modelica.Fluid.Examples.BranchingDynamicPipes_functions.c:8849: error: '_poly_Cp' undeclared (first use in this function) Modelica.Fluid.Examples.BranchingDynamicPipes_functions.c: In function 'omc_Modelica_Media_Incompressible_TableBased_h__pT': Modelica.Fluid.Examples.BranchingDynamicPipes_functions.c:8892: error: '_TinK' undeclared (first use in this function) Modelica.Fluid.Examples.BranchingDynamicPipes_functions.c:8912: error: '_poly_Cp' undeclared (first use in this function) Modelica.Fluid.Examples.BranchingDynamicPipes_functions.c:8926: error: '_poly_rho' undeclared (first use in this function)
For ./simulation/modelica/algorithms_functions/ForIterator2.mos we have some code generation issues with arrays. But I have no idea what kind of issue the cppruntime tests have.
Does anybody something about that issue?
I hope it was not the propose of this module to fix this issue;)