Menu

#3394 Test gte/pr58365.c fails to compile

closed-fixed
None
Front-end
5
2023-01-27
2022-05-21
No

The new regression test gte/pr58365.c fails to compile (at least for stm8 and z80) when enabled in cases/Makefile.in. At first, this looks like a plain struct return test that should just work. But it triggers assertions in codegen.

Related

Bugs: #3540
Wiki: NGI0-Entrust-SDCC

Discussion

  • Philipp Klaus Krause

    Looks like somehow the static ends up at the return type instead of the function:

    static struct S
    bar (void)
    {
      if (foo ())
        return f;
      return g;
    }
    

    Then, in main, at the call to bar, iCode generation creates a type that is both auto and static, which results in the error.

     

    Last edit: Philipp Klaus Krause 2023-01-27
  • Philipp Klaus Krause

    • status: open --> closed-fixed
    • assigned_to: Philipp Klaus Krause
    • Category: other --> Front-end
     
  • Philipp Klaus Krause

    Fixed in [r13831].

     

    Related

    Commit: [r13831]


Log in to post a comment.

MongoDB Logo MongoDB