def check_fortran_dummy_main(conf):
    code_tpl = """\
#ifdef __cplusplus
        extern "C"
#endif
int %(main)s()
{
    return 1;
}

int main()
{
    return 0;
}
"""

    conf.start_message("Checking whether fortran needs dummy main")

    old = copy.deepcopy(conf.env["F77_LINKFLAGS"])
    try:
        conf.env["F77_LINKFLAGS"].extend(conf.env[FC_RUNTIME_LDFLAGS])
        ret = conf.builders["ctasks"].try_program("check_fc_dummy_main",
                {"main": "FC_DUMMY_MAIN"} % code_tpl)
        if ret:
            conf.end_message("none")
            conf.env[FC_DUMMY_MAIN] = None
            return True
        else:
            conf.end_message("failed !")
            return False
    finally:
        conf.env["F77_LINKFLAGS"] = old
dataset/ETHPy150Open cournape/Bento/bento/private/_yaku/yaku/conftests/fconftests.py/check_fortran_dummy_main/swapped operands of `%`