libfirm / cparser

C99 parser and frontend for libfirm
http://pp.ipd.kit.edu/firm
GNU General Public License v2.0
339 stars 38 forks source link

cparser aborts when using __builtin_offsetof on a VLA type #27

Open GabrielRavier opened 4 years ago

GabrielRavier commented 4 years ago
int f(int n, int i)
{
    typedef int T[n];
    struct S
    {
        int a;
        T b[n];
    };
    return __builtin_offsetof(struct S, b[i]);
}

This results in this :

src/ast/constfold.c:756: panic in fold_expression: invalid expression kind for constant folding
Aborted (core dumped)