GNU F95 version 4.0.1 (i686-pc-linux-gnu) compiled by GNU C version 4.0.1. Fedora Core 1 Linux looneyjr.cam.nist.gov 2.4.25 #2 Wed Apr 21 12:08:18 EDT 2004 i686 i686 i386 GNU/Linux mitchell@looneyjr> gfortran -v -c stopwatch.f90 Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.0.1/configure --prefix=/local/home/mitchell/tmp/gcc-4.0.1-install -with-local-prefix=/local/home/mitchell/tmp/gcc-4.0.1-include Thread model: posix gcc version 4.0.1 /local/home/mitchell/tmp/gcc-4.0.1-install/libexec/gcc/i686-pc-linux-gnu/4.0.1/f951 stopwatch.f90 -quiet -dumpbase stopwatch.f90 -mtune=pentiumpro -auxbase stopwatch -version -o /tmp/ccK2OQTb.s GNU F95 version 4.0.1 (i686-pc-linux-gnu) compiled by GNU C version 4.0.1. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 stopwatch.f90: In function ‘which_clocks_s’: stopwatch.f90:3289: internal compiler error: in gfc_conv_expr_descriptor, at fortran/trans-array.c:3633 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. This is my first time using Bugzilla, and I don't see where/how to attach the source file to the report. I hope that when I hit "commit" it will ask for it!
Created attachment 9622 [details] Fortran 90 source file that demonstrates bug Here is the source code that should have been included with this bug report. How was I supposed to attach it in the original report?
Confirmed, reduced testcase: subroutine option_stopwatch_s(default_clock) character(len=*), intent(in) :: default_clock call option_stopwatch_a((/default_clock/)) end subroutine option_stopwatch_s
Another testcase: subroutine option_stopwatch_s(n) integer :: n character(len=1) :: default_clock call option_stopwatch_a((/default_clock/)) end subroutine option_stopwatch_s
(In reply to comment #3) > Another testcase: Ignore that one. The correct one is: subroutine option_stopwatch_s(n) integer :: n character(len=n) :: default_clock call option_stopwatch_a((/default_clock/)) end subroutine option_stopwatch_s
*** Bug 26057 has been marked as a duplicate of this bug. ***
I saw Starting program: /export/build/gnu/gcc-fortran/build-x86_64-linux/gcc/f951 foo.f90 -quiet -dumpbase foo.f90 -mtune=generic -auxbase foo -version -o foo.s GNU F95 version 4.2.0 20060131 (experimental) [trunk revision 110440 clean] (x86_64-unknown-linux-gnu) compiled by GNU C version 4.2.0 20060131 (experimental) [trunk revision 110440 clean]. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Breakpoint 1, gfc_conv_expr_descriptor (se=0x7fbffff110, expr=0xb69130, ss=0xb692f0) at /net/gnu-13/export/gnu/src/gcc/gcc/gcc/fortran/trans-array.c:3918 3918 loop.temp_ss->string_length = gfc_conv_mpz_to_tree (gdb) p *expr->ts.cl $14 = {length = 0x0, next = 0x0, backend_decl = 0x2a983f3640, resolved = 1} (gdb)
Subject: Bug 23634 Author: hjl Date: Wed Apr 5 04:47:51 2006 New Revision: 112695 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112695 Log: gcc/fortran/ 2006-04-04 H.J. Lu <hongjiu.lu@intel.com> PR fortran/25619 * trans-array.c (gfc_conv_expr_descriptor): Only dereference character pointer when copying temporary. PR fortran/23634 * trans-array.c (gfc_conv_expr_descriptor): Properly copy temporary character with non constant size. gcc/testsuite/ 2006-04-04 Paul Thomas <pault@gcc.gnu.org> PR fortran/23634 PR fortran/25619 * gfortran.dg/actual_array_constructor_1.f90: New testcase. Added: trunk/gcc/testsuite/gfortran.dg/actual_array_constructor_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-array.c trunk/gcc/testsuite/ChangeLog
Subject: Bug 23634 Author: hjl Date: Wed Apr 12 20:58:04 2006 New Revision: 112899 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112899 Log: gcc/fortran/ 2006-04-12 H.J. Lu <hongjiu.lu@intel.com> PR fortran/25619 Backport from mainline 2006-04-04 H.J. Lu <hongjiu.lu@intel.com> * trans-array.c (gfc_conv_expr_descriptor): Only dereference character pointer when copying temporary. PR fortran/23634 Backport from mainline 2006-04-04 H.J. Lu <hongjiu.lu@intel.com> * trans-array.c (gfc_conv_expr_descriptor): Properly copy temporary character with non constant size. gcc/testsuite/ 2006-04-12 H.J. Lu <hongjiu.lu@intel.com> PR fortran/23634 PR fortran/25619 Backport from mainline 2006-04-04 Paul Thomas <pault@gcc.gnu.org> * gfortran.dg/actual_array_constructor_1.f90: New testcase. Added: branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/actual_array_constructor_1.f90 Modified: branches/gcc-4_1-branch/gcc/fortran/ChangeLog branches/gcc-4_1-branch/gcc/fortran/trans-array.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
HJ has fixed this one. Paul