Pelles C > Bug reports

Compiler crash when function declaration for more than 2 dimension VLA's is used

(1/3) > >>

frankie:
The following code crashes the compiler.

--- Code: ---// If function declaration of a function using VLA's with more than 2 dimension
// is used the compiler crash.
int foo(int a, int b, short bar[a][b][100]);  //Comment this to compile code

int foo(int a, int b, short bar[a][b][100])
{
return 0;
}

--- End code ---
Commenting out the declaration of the function the compiler works.

John Z:
Hi frankie,

Maybe there is more involved in the crash?

I dropped your example into an existing program and it compiled fine - no crash,
see screen shot.

Maybe there is a particular optimization, compile mode, setting, or the recurring Add-In complication contributing?

John Z

frankie:
Thanks John,
indeed the bug appears only wen compiling with Debug Information full.
Could you confirm please? :)

John Z:
Hi frankie,

Yes tested.... I tried FULL for Compile as well as Assembler.  With and without some optimizations.
My 'tester' is using C11 with MS extensions BTW, also created dbg and map as well as used verbose.

I could not make it crash - there must be more to it.  Possibly a corrupt Debug section in the prj file?
Maybe use the new copy feature to copy the release mode to a new debug2 mode, set debug flags in
the new debug2 mode and see if still crashes.

John Z

Update: Tried 4 dimensions also, compiled with FULL debug ok

frankie:
Thanks John,
I still have the problem (even after reinstall), and don't see any other problem here.
The problem disappears selecting Debug information to "None" or "Line numbers only" in the compiler configuration.
The compilation fails with internal error.
I am using PellesC V.12.00.02 (Last release).
Please check the project attached.
If someone else could check would be nice thanks.

Navigation

[0] Message Index

[#] Next page

Go to full version