Menu

#2760 mcs51 link-time failure on new test case.

open
nobody
None
MCS51
1
2018-08-14
2018-06-13
No

The recently introduced regression test bug-2756.c fails to link for mcs51 in the large and huge models.

To reproduce, enable the test case for these targets.

Philipp

Discussion

  • Maarten Brock

    Maarten Brock - 2018-08-14
    • Priority: 5 --> 1
     
  • Maarten Brock

    Maarten Brock - 2018-08-14

    Even though the source code is valid C, its effect is undefined with all those uninitilized locals. And when 'foundfiles' is initialized the problem goes away.

    int m()
    {
        int foundfiles /* = 0 */ ;
        if (...)
            foundfiles++;
        if (!foundfiles)
            ....
    }
    

    Lowering priority as it only occurs for flawd code.

     

Log in to post a comment.

Auth0 Logo