Opened 11 years ago
Closed 11 years ago
#2399 closed defect (fixed)
array assignment does not work properly
Reported by: | adeas31 | Owned by: | wbraun |
---|---|---|---|
Priority: | blocker | Milestone: | 1.9.1 |
Component: | Backend | Version: | trunk |
Keywords: | Cc: | lochel, wbraun |
Description
Create a libmylib.a from mylib.c file,
gcc -c mylib.c -o mylib.o ar rcs libmylib.a mylib.o
Copy the lib to trunk/build/lib/.
Run the attached model.
Check the attached output file. Note that the value of outputs2[1] is zero whereas it should be same as outputs[1].
In the model the equation for getting the values of outputs1 array is,
(outputs1) := calculate1(step, size(outputs1, 1));
and for outputs2 array is,
(outputs2, done) := calculate2(step, size(outputs2, 1));
the only difference is that for outputs2 an additional output done is specified. The code works fine if only one output is used.
There are two functions in the mylib.c file but both are doing the same thing.
Attachments (5)
Change History (11)
Changed 11 years ago by adeas31
Changed 11 years ago by adeas31
Changed 11 years ago by adeas31
comment:1 Changed 11 years ago by adeas31
- Priority changed from high to blocker
comment:2 Changed 11 years ago by sjoelund.se
- Resolution set to duplicate
- Status changed from new to closed
I believe this is a duplicate of #2352
comment:3 Changed 11 years ago by mahge930
- Resolution duplicate deleted
- Status changed from closed to reopened
comment:4 Changed 11 years ago by sjoelund.se
- Milestone changed from 1.9.0 to 1.9.1
Postponed until 1.9.1
comment:5 Changed 11 years ago by lochel
- Owner changed from probably noone to wbraun
- Status changed from reopened to assigned
1: done:DISCRETE() .foo, .Integer type: Integer 2: outputs2[2]:DISCRETE() .foo, .Real type: Real [2] 3: outputs2[1]:VARIABLE() .foo, .Real type: Real [2] 4: outputs1[2]:DISCRETE() .foo, .Real type: Real [2] 5: outputs1[1]:DISCRETE() .foo, .Real type: Real [2] 6: $whenCondition1:DISCRETE(fixed = true ) type: Boolean
output2 gets not marked as discrete variable.
Changed 11 years ago by lochel
comment:6 Changed 11 years ago by wbraun
- Resolution set to fixed
- Status changed from assigned to closed
fixed in r17994.
Model