Menu

#3059 [pdk13] Compiler hangs on ternary opertor returning expression that is converted to _Bool

closed-fixed
None
other
5
2020-06-18
2020-06-14
No
#include <stdbool.h>

bool foo(int a, int b)
{
  return a ? b : false;
}

Compiling this with sdcc test.c -mpdk13 yields nothing, the compiler just hangs forever. Tested with commit 11672.

Discussion

  • Philipp Klaus Krause

    Looks like another case of SDCC introducing variables of type __bit that the pdk backend can't handle.
    Maybe the easiest solution is to just make the pdk backend pretend that it can handle __bit and treat it like _Bool?

     
  • Erik Petrich

    Erik Petrich - 2020-06-18
    • status: open --> closed-fixed
    • assigned_to: Erik Petrich
     
  • Erik Petrich

    Erik Petrich - 2020-06-18

    Fixed in [r11680]
    Same root cause as bugs [#3049] and [#3047]

     

    Related

    Bugs: #3047
    Bugs: #3049


Log in to post a comment.

MongoDB Logo MongoDB