public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/60795] New: Wrong length when allocating character array
@ 2014-04-09 15:00 kergonath at me dot com
  2014-04-09 17:08 ` [Bug fortran/60795] [4.7/4.8/4.9 Regression] " dominiq at lps dot ens.fr
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: kergonath at me dot com @ 2014-04-09 15:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60795

            Bug ID: 60795
           Summary: Wrong length when allocating character array
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kergonath at me dot com

In the following program:

program stringtest
  character(:), dimension(:), allocatable :: s

  allocate(character(1) :: s(10))
  write(*,*) size(s)
  write(*,*) len(s)
end program

the elements of the array s end up with the wrong length, the output is:
          10
           0

Tested with latest version available with macports:
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin13/4.9.0/lto-wrapper
Target: x86_64-apple-darwin13
Configured with:
/opt/local/var/macports/build/_opt_mports_dports_lang_gcc49/gcc49/work/gcc-4.9-20140406/configure
--prefix=/opt/local --build=x86_64-apple-darwin13
--enable-languages=c,c++,objc,obj-c++,fortran,java
--libdir=/opt/local/lib/gcc49 --includedir=/opt/local/include/gcc49
--infodir=/opt/local/share/info --mandir=/opt/local/share/man
--datarootdir=/opt/local/share/gcc-4.9 --with-local-prefix=/opt/local
--with-system-zlib --disable-nls --program-suffix=-mp-4.9
--with-gxx-include-dir=/opt/local/include/gcc49/c++/ --with-gmp=/opt/local
--with-mpfr=/opt/local --with-mpc=/opt/local --with-cloog=/opt/local
--enable-cloog-backend=isl --disable-cloog-version-check
--enable-stage1-checking --disable-multilib --enable-lto
--enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld
--with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket
--with-pkgversion='MacPorts gcc49 4.9-20140406_0'
Thread model: posix
gcc version 4.9.0 20140406 (experimental) (MacPorts gcc49 4.9-20140406_0)


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

end of thread, other threads:[~2015-06-26 20:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-09 15:00 [Bug fortran/60795] New: Wrong length when allocating character array kergonath at me dot com
2014-04-09 17:08 ` [Bug fortran/60795] [4.7/4.8/4.9 Regression] " dominiq at lps dot ens.fr
2014-04-09 18:38 ` kargl at gcc dot gnu.org
2014-04-10  0:25 ` quantheory at gmail dot com
2014-04-10  9:30 ` kergonath at me dot com
2014-04-11  9:13 ` rguenth at gcc dot gnu.org
2014-06-12 13:43 ` rguenth at gcc dot gnu.org
2014-07-10 19:10 ` [Bug fortran/60795] [4.8/4.9/4.10 " dominiq at lps dot ens.fr
2014-12-19 13:27 ` [Bug fortran/60795] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-06-23  8:19 ` [Bug fortran/60795] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 19:56 ` [Bug fortran/60795] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:28 ` jakub at gcc dot gnu.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).