From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22929 invoked by alias); 10 Jun 2009 12:19:52 -0000 Received: (qmail 22920 invoked by uid 22791); 10 Jun 2009 12:19:51 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from yw-out-1718.google.com (HELO yw-out-1718.google.com) (74.125.46.155) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 10 Jun 2009 12:19:42 +0000 Received: by yw-out-1718.google.com with SMTP id 4so364160ywq.48 for ; Wed, 10 Jun 2009 05:19:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.66.10 with SMTP id o10mr1061395aga.90.1244636379913; Wed, 10 Jun 2009 05:19:39 -0700 (PDT) In-Reply-To: <20090610115634.GA14702@net-b.de> References: <20090610115634.GA14702@net-b.de> Date: Wed, 10 Jun 2009 12:19:00 -0000 Message-ID: <1d9315cf0906100519j50afad14o4f4913b2c93d98e8@mail.gmail.com> Subject: Re: display character strings in fortran From: kamaraju kusumanchi To: Tobias Burnus Cc: fortran@gcc.gnu.org, gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00084.txt.bz2 On Wed, Jun 10, 2009 at 7:56 AM, Tobias Burnus wrote: > kamaraju kusumanchi wrote: >> However, when debugged, the character strings are not displayed properly. >> [...] >> (gdb) p first_name >> $1 = (32 ' ', 107 'k', 97 'a', 109 'm', 97 'a', 114 'r', 97 'a', 106 >> 'j', 117 'u', 32 ' ', 32 ' ', 32 ' ', 32 ' ', 32 ' ', 32 ' ', 32 ' ', >> 32 ' ', 32 ' ', 32 ' ', 32 ' ') >> [...] >> gcc version 4.3.2 (Debian 4.3.2-1.1) > >> Is this a bug in gdb or gfortran? I appreciate if you could fix it. > > The GCC bug was fixed about half a year ago. Please use GCC 4.4.0 (which > was released April 21, 2009) or later. Using GCC 4.4.x, one gets: > > (gdb) p first_name > $1 = ' kamaraju', ' ' > > Tobias > Upgraded my gfortran to $gfortran-4.4 -v Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.0-5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-objc-gc --enable-targets=all --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.4.0 (Debian 4.4.0-5) Now it works as intended. thanks for the quick replies raju