unfortunately it didn't work for a function with this signature: void foo(int DIM, float *A[DIM][DIM])
it gives the following Bug: Invalid length in array type: DIM Context : 2cil: init Error: Cabs2cil had some errors Fatal error: exception Errormsg.Error Raised at file "ocamlutil/errormsg.ml", line 49, characters 23-28 Called from file "src/main.ml", line 257, characters 6-24 Called from file "src/main.ml", line 290, characters 4-15 Thank you, Zakkak Foivos On 02/11/2011 06:44 PM, Gabriel Kerneis wrote: > Dear Foivos, > > On Wed, Jan 19, 2011 at 09:52:36AM +0200, Foivos Zakkak wrote: >> Subject: [CIL users] Arrays with no constant dimensions as arguments > > It's called variable-sized array in C99, and should be supported by CIL > (ie. compiled away as a regular array using alloca). > > But you are absolutely correct that there is a bug in CIL. Thank you > very much for spotting it. > > I haven't nailed down the root of the cause yet. It would help me a lot > if you could try the following (temporary) fix: > > In ocamlutil/util.ml, replace the line: > let list_map f l = count_map f l 0 > by: > let list_map = List.map > > Does this fix your issue? > > Thanks in advance, ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ CIL-users mailing list CIL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cil-users