From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29067 invoked by alias); 2 Dec 2004 14:23:16 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 27816 invoked by uid 48); 2 Dec 2004 14:22:20 -0000 Date: Thu, 02 Dec 2004 14:23:00 -0000 From: "darcypj at us dot ibm dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20041202142212.18785.darcypj@us.ibm.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/18785] New: isdigit builtin function fails with EBCDIC character sets X-Bugzilla-Reason: CC X-SW-Source: 2004-12/txt/msg00331.txt.bz2 List-Id: Configured with: /cteam/darcypj/200410bld/hbtree/configure --target=s390x-ibm-tpf --prefix=/opt/tpf-cross-tools2 --with-gcc-version-trigger=/cteam/darcypj/200410bld/hbtree/gcc/version.c --program-prefix=s390x-ibm-tpf- --with-headers=/cteam/darcypj/200410bld/tpfheaders/include --build=s390x-ibm-linux --without-newlib --enable-languages=c,c++ --with-libs=/opt/tpf-cross-tools2/lib --with-lib-path=/opt/tpf-cross-tools2/lib --host=s390x-ibm-linux Thread model: tpf gcc version 4.0.0 20041107 (experimental) Compilation command line: s390x-ibm-tpf-gcc -c digit.c -fexec-charset=IBM1047 -fverbose-asm -gdwarf-2 -Wa,-aldhs=listing.lst --save-temps -Wall No compiler warnings or errors emitted. The isdigit builtin function is using ASCII '0' for the comparison to the character passed to isdigit. This causes a failure in this case, because the IBM1047 codepage (and most EBCDIC based codepages) has a wholly different representation for numeric characters than plain old ASCII. Note: You don't need to be building for this specific target to get these results, just use any version from the trunk after isdigit was inserted as a builtin function, and make sure you use an EBCDIC character set for the -fexec-charset. I have .i files from s390x-ibm-tpf target and from a native i686-gnu-linux build. I will attach a sample .i file shortly from each architecture. -- Summary: isdigit builtin function fails with EBCDIC character sets Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: darcypj at us dot ibm dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: s390x-ibm-linux GCC host triplet: s390x-ibm-linux GCC target triplet: s390x-ibm-tpf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18785