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
  • #884
Closed
Open
Issue created Jan 05, 2015 by Jochen Burghardt@burghardt

contract of template function specialization taken to refer to next plain function below

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


Id Project Category View Due Date Updated
ID0002042 Frama-Clang Plug-in > clang public 2015-01-05 2015-02-15
Reporter Jochen Assigned To virgile Resolution fixed
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 :

Using "frama-c -wp 424.cpp" the attached program can be verified, although e.g. foo(0) yields 2 whereas its contract says it should yield 4.

Apparently, Frama-C thinks the contract belongs to the plain function bar(). That would also be an explanation for issue #2034.

Moving the contract from line 4 down to line 6, or to line 8, keeps that behavior. After moving it up to line 1 (i.e. before the generic template), no obligation at all is generated (which is ok since foo<>() isn't called anywhere).

Attachments

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