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/48876] New: ICE when initializing character variable with zero-length string Date: Wed, 04 May 2011 20:58:00 -0000 [thread overview] Message-ID: <bug-48876-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48876 Summary: ICE when initializing character variable with zero-length string Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: mhp77@gmx.at The following Fortran program compiles without errors: program test character :: string = "string"( : 0 ) end program test On the other hand, compiling the semantically equivalent program program test character :: string = "string"( : - 1 ) end program test leads to an internal compiler error. Interestingly, if the ending point of the substring is less than -2 the internal compiler error turns into an "out of memory" error. $ gfortran-4.6 -v -c test.f90 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' '-c' '-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/ccWeUXPn.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 *** glibc detected *** /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951: malloc(): smallbin double linked list corrupted: 0x0000000001e98f50 *** ======= Backtrace: ========= /lib/libc.so.6(+0x71ad6)[0x2b666912bad6] /lib/libc.so.6(+0x753ed)[0x2b666912f3ed] /lib/libc.so.6(__libc_malloc+0x70)[0x2b6669130930] /lib/libc.so.6(+0x2f682)[0x2b66690e9682] /lib/libc.so.6(+0x2d8b5)[0x2b66690e78b5] /lib/libc.so.6(+0x2d1a0)[0x2b66690e71a0] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951[0x7b07c1] /lib/libc.so.6(+0x321e0)[0x2b66690ec1e0] /lib/libc.so.6(memcpy+0x2eb)[0x2b6669139a3b] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951(gfc_simplify_expr+0x213)[0x4e0273] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951[0x4df07e] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951(gfc_reduce_init_expr+0x78)[0x4df8f8] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951(gfc_match_init_expr+0x5a)[0x4df95a] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951(gfc_match_data_decl+0xde4)[0x4d28b4] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951[0x51609a] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951[0x51680a] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951[0x517d35] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951[0x5190e5] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951[0x51a799] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951(gfc_parse_file+0x3ff)[0x51b6df] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951[0x554136] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951(toplev_main+0xd82)[0x7b2752] /lib/libc.so.6(__libc_start_main+0xfd)[0x2b66690d8c4d] /usr/lib/gcc/x86_64-linux-gnu/4.6.1/f951[0x4b5319] ======= Memory map: ======== ... f951: internal compiler error: Aborted Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
next reply other threads:[~2011-05-04 20:58 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-05-04 20:58 mhp77 at gmx dot at [this message] 2011-05-04 21:22 ` [Bug fortran/48876] " mhp77 at gmx dot at 2011-07-24 2:04 ` pinskia at gcc dot gnu.org 2011-07-30 9:56 ` tkoenig at gcc dot gnu.org 2011-07-30 18:18 ` tkoenig at gcc dot gnu.org 2011-07-30 21:33 ` tkoenig at gcc dot gnu.org 2011-07-30 22:59 ` 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-48876-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).