2024-04-16 23:39 AEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000049mercuryBugpublic2008-03-17 17:21
Reporterjuliensf 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000049: loop invariant hoisting causes MLDS backend to abort
DescriptionThe attached program causes the MLDS backend to abort when compiled in a hl or hlc grade
with:

mmc -C -O0 --common-struct --loop-invariants

The problem seems to be related to the fact that calls to array.init/1 are being incorrectly
hoisted (presumably because they arrays are not unique at the moment.)

The LLDS backend compiles this code down to what is invalid C code (at least on eris).

TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000084

wangp (developer)

I added a second test case which seems like it might be the same bug, only the abort happens with the LLDS backend.

  mmc -O0 --common-struct --inlining --loop-invariants str_loopinv.m

In str_loopinv.loop_inv_0__func__float_to_string_2__40__1 the non-local sets for the calls to str_loopinv.append_iio are wrong.

Also, both cases are fine with rotd-2008-01-19 so something was broken between then and now.

~0000085

juliensf (administrator)

Actually the invalid C code problem on eris is a red herring. It's due to the asm_fast grades
not being supported on that platform.

~0000090

wangp (developer)

Last edited: 2008-03-17 17:22

I think the bug is somewhere in the stm change posted by zs on 25/02. The problem doesn't occur for the version retrieved with "cvs up -D 2008-02-27" but does for the version retrieved with "cvs up -D '2008-02-27 19:00'".

Or at least, that was when some previous problem was exposed.

+Notes

-Issue History
Date Modified Username Field Change
2008-02-28 18:36 juliensf New Issue
2008-02-28 18:36 juliensf File Added: colgen_dw.m
2008-03-05 17:17 wangp File Added: str_loopinv.m
2008-03-05 17:21 wangp Note Added: 0000084
2008-03-05 17:29 juliensf Note Added: 0000085
2008-03-17 17:21 wangp Note Added: 0000090
2008-03-17 17:22 wangp Note Edited: 0000090
+Issue History