public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/18785] New: isdigit builtin function fails with EBCDIC character sets
@ 2004-12-02 14:23 darcypj at us dot ibm dot com
  2004-12-02 14:25 ` [Bug middle-end/18785] " darcypj at us dot ibm dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: darcypj at us dot ibm dot com @ 2004-12-02 14:23 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-02-20 17:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-02 14:23 [Bug middle-end/18785] New: isdigit builtin function fails with EBCDIC character sets darcypj at us dot ibm dot com
2004-12-02 14:25 ` [Bug middle-end/18785] " darcypj at us dot ibm dot com
2004-12-02 14:29 ` [Bug middle-end/18785] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-12-02 15:08 ` kghazi at verizon dot net
2004-12-02 15:27 ` darcypj at us dot ibm dot com
2004-12-02 15:56 ` kghazi at verizon dot net
2004-12-04  3:44 ` roger at eyesopen dot com
2004-12-05  3:23 ` pinskia at gcc dot gnu dot org
2004-12-06 22:06 ` kghazi at verizon dot net
2004-12-07 15:21 ` darcypj at us dot ibm dot com
2004-12-07 20:08 ` kghazi at verizon dot net
2004-12-22 16:40 ` roger at eyesopen dot com
2005-02-20 23:07 ` zack at codesourcery dot com
2005-02-20 23:07 ` cvs-commit at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).