In cut_fields_mb in cut.c, wint_t wc is not initialized before being compared to WEOF. It just so happens that when I compile it on my system, through some miracle of perversity and stack layout, wc picks up -1 as its initial value. On cut.c line 836, change wint_t wc; to wint_t wc = 0; That fixes it for me. On the coreutils bug list I was told that this problem has already been fixed in Fedora Core 3 a while ago. Maybe Gentoo's coreutils needs to get new versions of the i18n patch? Reproducible: Always Steps to Reproduce: 1. Emerge coreutils with at least -O2 and gcc 3.4 or 4.0 Actual Results: echo foo:bar | cut -d: -f1 produces no output! Expected Results: foo
5.2.1-r6 has the updated redhat patch
*** Bug 86352 has been marked as a duplicate of this bug. ***
*** Bug 93234 has been marked as a duplicate of this bug. ***