#3126 closed defect (duplicate)
Compile failure for records with arrays
| Reported by: | Owned by: | somebody | |
|---|---|---|---|
| Priority: | high | Milestone: | never |
| Component: | *unknown* | Version: | trunk |
| Keywords: | Cc: |
Description
The following model fails at compilation using r24357 (1.9.2 beta1). It works in r23420. The issue seems to be related to the calculation of the 3x3 array in the record. Similar functions with 3x1 arrays work fine.
package XSectionBug
model XPropTest
CrossSectionProperty prop;
end XPropTest;
record CrossSectionProperty
parameter Real L = 1;
parameter Real w = 0;
parameter Real h = 0;
parameter Real Itt[3, 3] = IttCalc(w = w, h = h, L = L) "Inertia tensor";
end CrossSectionProperty;
function IttCalc
input Real h = 0.01;
input Real w = 0.01;
input Real L = 2.0;
output Real Itt[3, 3] "Moment of Inertia";
algorithm
Itt := diagonal({w ^ 2 + h ^ 2, L ^ 2 + h ^ 2, L ^ 2 + w ^ 2} / 12);
end IttCalc;
end XSectionBug;
Change History (2)
comment:1 by , 11 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
comment:2 by , 10 years ago
| Milestone: | Future → never |
|---|
Sorting away the closed as invalid, won't fix and duplicate tickets from Future.
Note:
See TracTickets
for help on using tickets.

I am revoking my ticket and marking this as a duplicate of #3134. Can be traced to the same problem.