Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1848 closed defect (fixed)

Tuple assignments containing records in which a component has been aliased are not generated correctly in CodegenC.tpl

Reported by: Adrian Pop Owned by: Adrian Pop
Priority: high Milestone: 1.9.0
Component: Code Generation Version:
Keywords: Cc:

Description

Example:

(GV1.SG_volume.lsat, GV1.SG_volume.vsat) = ThermoSysPro.Properties.WaterSteam.IF97.Water_sat_P(GV1.SG_volume.P);

GV1.SG_volume.lsat.T is replaced during backend analysis with W_GV3.T[1] and we get to:

[CodegenC.tpl:5141:9-5141:9:writable] Error: Template error: writeLhsCref UNHANDLED:
ThermoSysPro.Properties.WaterSteam.Common.PropThermoSat(
 GV3.SG_volume.lsat.P, 
 W_GV3.T[1], 
 GV3.SG_volume.lsat.rho, 
 GV3.SG_volume.lsat.h, 
 GV3.SG_volume.lsat.cp, 
 GV3.SG_volume.lsat.pt, 
 GV3.SG_volume.lsat.cv)
= tmp127.c1

This should be translated to:

GV3.SG_volume.lsat.P = tmp127.c1.P;
W_GV3.T[1] = tmp127.c1.T;
GV3.SG_volume.lsat.rho = tmp127.c1.rho;
GV3.SG_volume.lsat.h = tmp127.c1.h;
GV3.SG_volume.lsat.cp = tmp127.c1.cp;
GV3.SG_volume.lsat.pt = tmp127.c1.pt;
GV3.SG_volume.lsat.cv = tmp127.c1.cv;

Change History (4)

comment:1 by Adrian Pop, 12 years ago

Owner: changed from somebody to Adrian Pop
Status: newaccepted

comment:2 by Martin Sjölund, 12 years ago

Neither are arrays handled, by the way ;)

comment:3 by Adrian Pop, 12 years ago

Resolution: fixed
Status: acceptedclosed

comment:4 by Adrian Pop, 12 years ago

Fixed in revision r13082.

Note: See TracTickets for help on using tickets.