Skip to content

Incorrect loop unrolling in presence of switch

ID0000861: This issue was created automatically from Mantis Issue 861. Further discussion may take place here.


Id Project Category View Due Date Updated
ID0000861 Frama-C Kernel public 2011-06-09 2014-02-12
Reporter yakobowski Assigned To yakobowski Resolution fixed
Priority high Severity crash Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C Carbon-20110201 Target Version - Fixed in Version Frama-C Nitrogen-20111001

Description :

Syntactic loop unrolling of loops containing while is completely wrong. Can be checked with -print or -check on the code below.

void main () { /*@ loop pragma UNROLL_LOOP 4; */ for (int i=0;i<4;i++) { switch (i) { case 1: break; case 2: break; case 3: break; case 4: break; default: } } }

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information