Opened 4 weeks ago

Closed 4 weeks ago

#5862 closed defect (fixed)

Empty array subscripts after scalarization

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

Description

The following model does not compile

record R
            Real x = 1;
        end R;
        
        function f
            input Integer n;
            Real[n] xs;
            R[n] rs;
            output Real y;
        algorithm
            xs := rs.x;
            y := sum(xs);
            annotation(Inline=false);
        end f;

        Real y = f(integer(time));

Change History (1)

comment:1 Changed 4 weeks ago by Jonathan Kämpe

Resolution: fixed
Status: assignedclosed

r13817: Fixed bug where empty array subscripts added during scalarization lead to c-compilation error.
r13822: Now printing empty array subscripts in order to detect them in tests. Fixed a couple of occurences.
r13845: Minor refactoring
r13846: Merge to trunk. Fixed bug where empty array subscripts added during scalarization lead to c-compilation error.

Note: See TracTickets for help on using tickets.