Hello Thomas, I didn't know that you are now also fixing libmudflap problems and that you work on "Some malloc'd inside libc is not being tracked".
Or did you intent to write PR fortran/51958 rather than PR libmudflap/51858? Changing "else if" into "else; if ... endif; endif" matches what we already do for the middle end and should thus be fine. While I haven't tried the patch, it looks okay. Could you also add a test case for: if () else if () else if () else end if (can be in the same file, but should be additional) just to make sure that multiple "else if" also work? Tobias