Opened 2 years ago

#5428 assigned defect

Record type for index

Reported by: Jonathan Kämpe Owned by: Jonathan Kämpe
Priority: minor Milestone:
Component: Modelica/FrontEnd Version: trunk
Keywords: Cc:

Description

When using a record array as for index the loops are unrolled as size zero loops. Using an unknown size array leads to c-code compilation failures. This is due to the type not being calculated correctly.

        record R
            Real x = 1;
        end R;
        
        parameter R[2] r1;
        R r2;
    equation
        for i in r1 loop
            r2 = i;
        end for;
    algorithm
        for i in r1 loop
            r2 := i;
        end for;

Change History (0)

Note: See TracTickets for help on using tickets.