Skip to content

17514, -unspecified-access and if (*p = (*p < 3)) (csmith)

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


Id Project Category View Due Date Updated
ID0001114 Frama-C Kernel public 2012-03-10 2014-02-12
Reporter pascal Assigned To virgile Resolution fixed
Priority normal Severity minor Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C GIT, precise the release id Target Version - Fixed in Version Frama-C Oxygen-20120901

Description :

In the program below, line 6 is as innocuous as line 5, but:

$ bin/toplevel.opt -val -unspecified-access t.c [kernel] preprocessing with "gcc -C -E -I. t.c" t.c:6:[kernel] warning: Unspecified sequence with side effect: /* <- *p p */ tmp = p < 3; / *p <- tmp p */ *p = tmp; ... t.c:6:[kernel] warning: undefined multiple accesses in expression. assert \separated(p, p);;

int x, *p;

main(){ p = &x; *p = (*p < 3); if (*p = (*p < 3)) x = 4; }

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