News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

pocc 13 rc2 internal error

Started by TimoVJL, April 06, 2025, 01:13:12 PM

Previous topic - Next topic

TimoVJL

With compiling SharedData.c from Zydis 4
C:\code\PellesC\v13\Test\src\Generated\OperandDefinitions.inc(5): fatal error: Internal error: emit_static_initializer().
Test project is just collection of files for testing error.

Zydis project is difficult case.
Definitions like ZYDIS_SHOULD_EXPORT isn't really done right way in headers and in source files.
Needs a lot of editing to fix that situation and add ZYDIS_EXPORT for functions definitions in source files.

With define ZYDIS_MINIMAL_MODE is possible to create small dll for testing
May the source be with you

Pelle

Tough to find the root cause. Boils down to something like this:

#pragma pack(1)
typedef union U {
    unsigned short reg: 9;
    unsigned char id: 6;
} u;
_Static_assert(sizeof(u) == 2, "compiler is buggy");
The compiler function responsible for struct/union member layout is painful to work with. Too many conditions to consider: bit-field sequences, old any new alignment specifications, etc. etc.
/Pelle