Skip to content

GitLab

  • Menu
Projects Groups 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
    • Contributors
    • Graph
    • Compare
  • Issues 209
    • Issues 209
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • pub
  • frama-c
  • Issues
  • #581

Closed
Open
Created Mar 25, 2014 by Pascal Cuoq@pascal

Nested VLA are not supported

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


Id Project Category View Due Date Updated
ID0001718 Frama-C Kernel public 2014-03-25 2015-11-04
Reporter pascal Assigned To virgile Resolution open
Priority normal Severity feature Reproducibility always
Platform - OS - OS Version -
Product Version - Target Version - Fixed in Version -

Description :

Note that I have never seen this feature actually used, but it appears to be supported by GCC and Clang.

To reiterate, I have never seen code that does int t[a][a];

This report is only for the sake of completeness.

Steps To Reproduce :

~/gitlab/frama-c $ bin/toplevel.opt -print t.c
[kernel] warning: cannot load plug-in `Aorai' (incompatible with Neon-20140301+dev).
[kernel] warning: cannot load plug-in `Obfuscator' (incompatible with Neon-20140301+dev).
[kernel] warning: cannot load plug-in `Report' (incompatible with Neon-20140301+dev).
[kernel] warning: cannot load plug-in `Security_slicing' (incompatible with Neon-20140301+dev).
[kernel] warning: cannot load plug-in `Wp' (incompatible with Neon-20140301+dev).
[kernel] preprocessing with "gcc -C -E -I.  t.c"
t.c:4:[kernel] user error: Length of array is not a constant: a
t.c:4:[kernel] warning: Variable-sized local variable t
[kernel] user error: skipping file "t.c" that has errors.
[kernel] Frama-C aborted: invalid user input.
~/gitlab/frama-c $ cat t.c
int main(int c, char **v)
{
  int a = 3;
  int t[a][a];
  t[a-1][a-1] = 1;
}
~/gitlab/frama-c $ gcc -pedantic -std=c99 t.c
~/gitlab/frama-c $
Edited Mar 29, 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