Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • F frama-c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 168
    • Issues 168
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • pub
  • frama-c
  • Issues
  • #602
Closed
Open
Issue created Aug 21, 2015 by Pascal Cuoq@pascal

With struct containing arrays, option -unspecified-access is too strict

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


Id Project Category View Due Date Updated
ID0002152 Frama-C Kernel public 2015-08-21 2015-08-21
Reporter pascal Assigned To virgile Resolution open
Priority normal Severity minor Reproducibility always
Platform - OS - OS Version -
Product Version - Target Version - Fixed in Version -

Description :

The program given below is correct, but:

$ frama-c -val t.c -unspecified-access ... t.c:4:[kernel] warning: Unspecified sequence with side effect: /* s.t[1] <- s.t / s.t[1] = (char)0; / s.t[2] <- s.t */ s.t[2] = s.t[1]; [value] Analyzing a complete application starting at main ... t.c:4:[kernel] warning: undefined multiple accesses in expression. assert \separated(&s.t[1], &s.t); [value] Recording results for main [value] done for function main t.c:4:[value] Assertion 'Value,separation' got final status invalid. ...

I expected this program would be accepted without a warning about multiple accesses in expressions.

Additional Information :

The struct is necessary for the bug to appear. With a toplevel array t, the assignment t[2] = t[1] = 0; does not cause a warning.

Steps To Reproduce :

struct s { char t[3]; } s;

int main() {
  s.t[2] = s.t[1] = 0;
  return 0;
}
Edited Apr 28, 2021 by Virgile Prevosto
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking