From: SF/projects/mingw n. l. <min...@li...> - 2012-06-14 12:11:40
|
Bugs item #3496273, was opened at 2012-03-02 05:02 Message generated for change (Settings changed) made by earnie You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3496273&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: gcc Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: alex bondarenko (alexian79) >Assigned to: Cesar Strauss (cstrauss) Summary: consequent if's with constant compile wrong Initial Comment: I have found this situation then working with QEMU 0.15.1 project. using mingw-get-inst-20111118 in process.c for target-arm if (IS_M(env)) { tmp = tcg_const_i32((insn & (1 << 4)) != 0); /* PRIMASK */ if (insn & 2) { addr = tcg_const_i32(16); gen_helper_v7m_msr(cpu_env, addr, tmp); tcg_temp_free_i32(addr); } /* FAULTMASK */ if (insn & 1) { addr = tcg_const_i32(17); gen_helper_v7m_msr(cpu_env, addr, tmp); tcg_temp_free_i32(addr); } tcg_temp_free_i32(tmp); gen_lookup_tb(s); if we just switch conditions order it will compile OK if (IS_M(env)) { tmp = tcg_const_i32((insn & (1 << 4)) != 0); /* FAULTMASK */ if (insn & 1) { addr = tcg_const_i32(17); gen_helper_v7m_msr(cpu_env, addr, tmp); tcg_temp_free_i32(addr); } /* PRIMASK */ if (insn & 2) { addr = tcg_const_i32(16); gen_helper_v7m_msr(cpu_env, addr, tmp); tcg_temp_free_i32(addr); } tcg_temp_free_i32(tmp); gen_lookup_tb(s); I have attached gdb disassembly in the attachment for both cases ---------------------------------------------------------------------- Comment By: alex bondarenko (alexian79) Date: 2012-03-02 07:08 Message: Submitted file bug.c compile with gcc.exe -O2 bug.c ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2012-03-02 05:16 Message: You need to also attach the small test case to build and give us the GCC parameters used to cause the effect. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3496273&group_id=2435 |