https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115693
Xi Ruoyao <xry111 at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unknown |14.1.0 CC| |xry111 at gcc dot gnu.org Component|libstdc++ |tree-optimization --- Comment #1 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- I'm transferring it to tree-optimization as the following cases are compiled to stupid code: char a[8], b[8]; int test() { for (int i = 0; i < 8; i++) if (a[i] != b[i]) return 0; return 1; } int test1() { int ret = 0; for (int i = 0; i < 8; i++) ret = ret || a[i] != b[i]; return ret; } So it makes more sense to fix this in the optimization passes, instead of ad-hoc hack in libstdc++. But I'm not sure if there already exists a dup.