Ticket #486 (new bug)

Opened 5 years ago

Last modified 4 years ago

When using struct array of size 1 get "Non existent array element in struct: count = 1 max=1"

Reported by: bsdz Owned by:
Priority: minor Milestone:
Component: core Version: trunk
Severity: medium Keywords:
Cc: Language:
Patch status: Platform: all

Description

When creating an array of structs with only one element char_offset_key does not recognize the pmc as an array. This looks like it is because it uses an internal var called max and assumes arrays always have size greater than 1.

A workaround is to force an array of size 1 to be of size 2.

An example test.pir to be attached.

Attachments

test.pir Download (0.9 KB) - added by bsdz 5 years ago.

Change History

Changed 5 years ago by bsdz

Changed 4 years ago by jkeenan

For the record, this is what I tried tonight:

./parrot /home/user/tt486_test.pir 
Non existent array element in struct: count = 1 max=1
current instr.: 'main' pc 56 (/home/user/tt486_test.pir:30)
Note: See TracTickets for help on using tickets.