https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99919
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |99918 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- The IL below shows there is enough information in the IL for the warning to determine that x_5 is never read from. void g (struct B b) { _Bool b$j; _Bool b$i; _Bool x; unsigned char _1; unsigned char _2; unsigned char _3; unsigned char _4; <bb 2> [local count: 1073741824]: b$i_11 = b.i; _1 = VIEW_CONVERT_EXPR<unsigned char>(b); _2 = _1 & 1; if (_2 != 0) goto <bb 4>; [50.00%] else goto <bb 3>; [50.00%] <bb 3> [local count: 536870912]: <bb 4> [local count: 1073741824]: # x_5 = PHI <x_8(D)(2), b$i_11(3)> # b$j_10 = PHI <0(2), b$i_11(3)> b.j = b$j_10; _3 = VIEW_CONVERT_EXPR<unsigned char>(b); _4 = _3 & 2; if (_4 != 0) goto <bb 5>; [50.00%] else goto <bb 6>; [50.00%] <bb 5> [local count: 536870913]: z = x_5; <bb 6> [local count: 1073741824]: return; } Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99918 [Bug 99918] [9/10/11 Regression] suboptimal code for bool bitfield tests