In the file in question we see this:
173 pir_error_output_like( <<'CODE', <<'OUTPUT', 'new with a native type, no str ing constant', todo => 'RT #51662 not done yet' );
174 .sub test :main
175 $P1 = new INTVAL
176 print "never\n"
180 /error:imcc:syntax error, unexpected IDENTIFIER \('INTVAL'\)/
[http://rt.perl.org/rt3/Ticket/Display.html?id=51662 RT #51662] was resolved, but the 'todo' reference was left in the test file.
This must be tracked in Trac.
The error messages is currently:
error:imcc:The opcode 'new_p_ic' (new<2>) was not found. Check the type and number of the arguments
Here's how we might improve the situation:
I'm open to suggestions.
Can anyone comment on plobsing's suggestions?
Thank you very much.
From the 4 options:
1. Make label op arguments take a prefix (eg: '&')
2. Make label op arguments represented by a different code in fullnames (eg: 'lbl')
3. Require predeclaration of labels
4. Parse all the way through a sub before selecting instructions
only the forth seems to make sense.
But I am baffled that new can accept a label at all. labels should be restricted in the specs,
since the make only sense for a limited number of ops.
I didn't change the parser to check for labels beforehand, rather fixed the test to check for the current error: error:imcc:wrong .const value and added the name of the unfound .const, here "a".
error:imcc:wrong .const value
[test][imcc] fix GH #335 test todo, parser error on new INTVAL
Since INTVAL is a valid label name, and we do not want to scan down to look for all
existing labels, we just test for the existing error.
[test] fix GH #335 test todo, parser error on new INTVAL