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
  • #869

side effect of constructor call from global variable initialization ignored

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


Id Project Category View Due Date Updated
ID0002002 Frama-Clang Plug-in > clang public 2014-12-01 2015-02-16
Reporter Jochen Assigned To virgile Resolution duplicate
Priority normal Severity minor Reproducibility always
Platform frama-c-Neon-20140301+dev-stance OS - OS Version xubuntu-cfe13.10
Product Version - Target Version - Fixed in Version -

Description :

The attached program can be verified by "frama-c -wp 177.cpp", although printing x's value after line 11 reveals that the proven assertion there is false.

The reason is that x was set to 42 by the constructor call cls() from the declaration in line 8, but Frama-C doesn't consider the body code of line 5 when determining the value of x in line 11.

On the other hand, it seems that Frama-C is well aware about the declaration in line 8 calling the constructor in line 5: annotating the latter with "requires \false" produces an unproven obligation that vanishes again if line 8 is deleted.

Attachments

  • 177.cpp
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking