cparser icon indicating copy to clipboard operation
cparser copied to clipboard

cparser aborts on initialization of structure with negative left shift

Open GabrielRavier opened this issue 4 years ago • 0 comments

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)

GabrielRavier avatar Jun 04 '20 20:06 GabrielRavier