Skip to content

Optimization fail #296

@dadymax

Description

@dadymax

First of all I want to THANK YOU for mindcode! It's awesome! Especially in comparison with plain Mlog =)

I have fun with some straight usages of processors with using mindcode. But on some of my code I can compile mindcode to Mlog only with -O 0. With any other optimization value I have error like

314 instructions before optimizations.
Exception in thread "main" info.teksol.mc.mindcode.compiler.MindcodeInternalError: Internal error: compiler-generated variable '*tmp23' is uninitialized.
at info.teksol.mc.mindcode.compiler.optimization.DataFlowOptimizer.addUninitialized(DataFlowOptimizer.java:1023)

Example script with this issue may be found there
https://github.com/dadymax/mindustrylogicscripts/blob/4392b9607bbe656bf13cd382cb9d453ba7f0df88/stopProductionOnOverflow.mindcode

Compiled with -O 0 code work perfectly trought.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingoptimizerRelated to the code optimizer

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions