libfirm / cparser

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

cparser aborts on initialization of structure with negative left shift #26

Open GabrielRavier opened 4 years ago

GabrielRavier commented 4 years ago
struct S
{
  int i;
};

void f(void)
{
  struct S c1 = { 1 << -1 };
}

This aborts with this message :

cparser: ir/tv/strcalc.c:838: sc_shl: Assertion `shift_count >= 0' failed.
Aborted (core dumped)