[Bug fortran/24789] New: [gfortran] ICE when assigning to array of strings

martin at mpa-garching dot mpg dot de gcc-bugzilla@gcc.gnu.org
Fri Nov 11 08:33:00 GMT 2005


Current mainline gfortran ICEs on the following code:

subroutine foo(vals)
  character(len = *), pointer :: vals(:)

  vals = ''
end subroutine

martin@linux:~/tmp> gfortran -v test.F90
Driving: gfortran -v test.F90 -lgfortranbegin -lgfortran -lm -shared-libgcc
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /home/martin/software/gcc/configure --quiet
--prefix=/home/martin/software/ugcc --enable-languages=c++,fortran
Thread model: posix
gcc version 4.1.0 20051111 (experimental)
 /home/martin/software/ugcc/libexec/gcc/x86_64-unknown-linux-gnu/4.1.0/cc1 -E
-lang-fortran -traditional-cpp -D_LANGUAGE_FORTRAN -quiet -v test.F90 -mtune=k8
-o /tmp/ccchY9YK.f95
ignoring nonexistent directory
"/home/martin/software/ugcc/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /home/martin/software/ugcc/include
 /home/martin/software/ugcc/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/include
 /usr/include
End of search list.
 /home/martin/software/ugcc/libexec/gcc/x86_64-unknown-linux-gnu/4.1.0/f951
/tmp/ccchY9YK.f95 -quiet -dumpbase test.F90 -mtune=k8 -auxbase test -version -o
/tmp/ccaQr9Uk.s
GNU F95 version 4.1.0 20051111 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.1.0 20051111 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
test.F90: In function ‘foo’:
test.F90:4: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


The Fortran compiler from the GOMP branch does not ICE on this code.

This ICE may be related to PR24266, but I'm not absolutely sure, and anyway,
my testcase is shorter :)


-- 
           Summary: [gfortran] ICE when assigning to array of strings
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: martin at mpa-garching dot mpg dot de
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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



More information about the Gcc-bugs mailing list