﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5577	Translation Error When Export FMU Using -d=newInst	Trista Arinomo <trista.arinomo@…>	Adrian Pop	"
{{{
import load = ModelicaServices.ExternalReferences.loadResource;
  Modelica.Blocks.Sources.CombiTimeTable combiTimeTable1(extrapolation = Modelica.Blocks.Types.Extrapolation.Periodic, fileName = load(""modelica://TestPackage/Folder/TestFile.txt""), smoothness = Modelica.Blocks.Types.Smoothness.ConstantSegments, tableName = ""TestTable"", tableOnFile = true);
}}}

when trying to export above model with uncheck {{{Enable old frontend for code generation}}} option or using {{{-d=newInst}}} with said option enabled, i got following translation error:

{{{
[1] 14:39:48 Translation Error
Error building simulator. Build log: gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test.o Test.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_functions.o Test_functions.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_records.o Test_records.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_01exo.o Test_01exo.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_02nls.o Test_02nls.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_03lsy.o Test_03lsy.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_04set.o Test_04set.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_05evt.o Test_05evt.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_06inz.o Test_06inz.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_07dly.o Test_07dly.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_08bnd.o Test_08bnd.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_09alg.o Test_09alg.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_10asr.o Test_10asr.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_11mix.o Test_11mix.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_12jac.o Test_12jac.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_13opt.o Test_13opt.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_14lnz.o Test_14lnz.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_15syn.o Test_15syn.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_16dae.o Test_16dae.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_17inl.o Test_17inl.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_init_fmu.o Test_init_fmu.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse  -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi   -c -o Test_FMU.o Test_FMU.c
In file included from Test_FMU.c:54:0: 
fmi-export/fmu2_model_interface.c.inc: In function 'omc_assert_fmi_common': 
fmi-export/fmu2_model_interface.c.inc:162:16: warning: passing argument 1 of 'GC_vasprintf' from incompatible pointer type [-Wincompatible-pointer-types] 
   GC_vasprintf(&str, msg, args); 
                ^ 
In file included from openmodelica_func.h:52:0, 
                 from Test_FMU.c:10: 
util/modelica_string.h:71:5: note: expected 'const char **' but argument is of type 'char **' 
 int GC_vasprintf(const char **strp, const char *fmt, va_list ap); 
     ^ 
Test_FMU.c: In function 'setDefaultStartValues': 
Test_FMU.c:81:82: error: incomplete universal character name \U 
   comp->fmuData->modelData->stringParameterData[0].attribute.start = mmc_mk_scon(""C:\Users\trari\Documents\TestPackage\Folder\TestFile.txt""); 
                                                                                  ^ 
Test_FMU.c:81:82: warning: unknown escape sequence: '\D' 
Test_FMU.c:81:82: warning: unknown escape sequence: '\T' 
Test_FMU.c:81:82: warning: unknown escape sequence: '\F' 
Test_FMU.c:81:82: warning: unknown escape sequence: '\T' 
<builtin>: recipe for target 'Test_FMU.o' failed
make: *** [Test_FMU.o] Error 1
make: *** Waiting for unfinished jobs....
}}}"	defect	reopened	blocker	1.19.0	NF API	v1.14.0-dev-nightly		FMU	
