public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mhp77 at gmx dot at" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/48890] New: length of a character derived-type component Date: Thu, 05 May 2011 20:00:00 -0000 [thread overview] Message-ID: <bug-48890-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48890 Summary: length of a character derived-type component Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: mhp77@gmx.at Created attachment 24192 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24192 test case Consider the following derived-type definition: type :: string_t character( len= 10 ) :: str end type string_t In case of a variable of type string_t, e.g. type( string_t ) :: string1 = string_t( "text" ) the length of the character component is—as expected—10. In case of a constant of type string_t, e.g. type( string_t ), parameter :: string2 = string_t( "text" ) the length of the character component is, however, as if it had been declared with len= *. $ gfortran-4.6 -v -o test test.f90 && ./test Driving: gfortran-4.6 -v -o test test.f90 -l gfortran -l m -shared-libgcc Using built-in specs. COLLECT_GCC=gfortran-4.6 COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.0-2' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.6.1 20110329 (prerelease) (Debian 4.6.0-2) COLLECT_GCC_OPTIONS='-v' '-o' 'test' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951 test.f90 -quiet -dumpbase test.f90 -mtune=generic -march=x86-64 -auxbase test -version -fintrinsic-modules-path /usr/lib/gcc/x86_64-linux-gnu/4.6.1/finclude -o /tmp/ccYXc4lM.s GNU Fortran (Debian 4.6.0-2) version 4.6.1 20110329 (prerelease) (x86_64-linux-gnu) compiled by GNU C version 4.6.1 20110329 (prerelease), GMP version 5.0.1, MPFR version 3.0.0-p8, MPC version 0.9 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU Fortran (Debian 4.6.0-2) version 4.6.1 20110329 (prerelease) (x86_64-linux-gnu) compiled by GNU C version 4.6.1 20110329 (prerelease), GMP version 5.0.1, MPFR version 3.0.0-p8, MPC version 0.9 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 COLLECT_GCC_OPTIONS='-v' '-o' 'test' '-shared-libgcc' '-mtune=generic' '-march=x86-64' as --64 -o /tmp/ccmkcGOj.o /tmp/ccYXc4lM.s Reading specs from /usr/lib/gcc/x86_64-linux-gnu/4.6.1/libgfortran.spec rename spec lib to liborig COLLECT_GCC_OPTIONS='-v' '-o' 'test' '-shared-libgcc' '-mtune=generic' '-march=x86-64' COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/ LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../:/lib/:/usr/lib/:/usr/lib/x86_64-linux-gnu/ COLLECT_GCC_OPTIONS='-v' '-o' 'test' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-linux-gnu/4.6.1/collect2 --build-id --no-add-needed --eh-frame-hdr -m elf_x86_64 --hash-style=both -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1 -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../.. -L/usr/lib/x86_64-linux-gnu /tmp/ccmkcGOj.o -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/crtn.o text 10 text4
next reply other threads:[~2011-05-05 20:00 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-05-05 20:00 mhp77 at gmx dot at [this message] 2013-02-26 16:04 ` [Bug fortran/48890] " dominiq at lps dot ens.fr 2015-05-03 21:35 ` [Bug fortran/48890] [F95] Wrong length of a character component of named constant derived-type fxcoudert at gcc dot gnu.org 2015-05-04 8:24 ` burnus at gcc dot gnu.org 2015-05-04 9:48 ` tkoenig at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-48890-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).