[Bug fortran/29567] New: [gfortran, 4.3 regression] ICE in build2_stat, at tree.c:2963

martin at mpa-garching dot mpg dot de gcc-bugzilla@gcc.gnu.org
Mon Oct 23 18:09:00 GMT 2006


When compiling the following code with current gfortran 4.3, the compiler ICEs

module test
contains

  function gn_lc2uc1(string_lc) result(string_uc)
    character(len = *), intent(in) :: string_lc
    character(len = len(string_lc)) :: string_uc

    integer :: ch, nch, i
    logical :: found

    nch = len(string_lc)

    found = .false.
    do ch = 1, nch
      i = ichar(string_lc(ch: ch))
      if (((i >= 97) .and. (i <= 122)) .and. (.not. found)) then
        string_uc(ch: ch) = char(i - 32)
        found = .true.
      else if ((i >= 65) .and. (i <= 92)) then
        string_uc(ch: ch) = char(i)
        found = .true.
      else
        string_uc(ch: ch) = char(i)
      end if
    end do
  end function gn_lc2uc1

end module test

martin@linux:~/tmp> gfortran -O2 -v test.f90
Driving: gfortran -O2 -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 --disable-multilib
--with-gmp=/home/martin/software/mygmp --with-mpfr=/home/martin/software/mympfr
--prefix=/home/martin/software/ugcc --enable-languages=c++,fortran
--enable-checking=release
Thread model: posix
gcc version 4.3.0 20061023 (experimental)
 /home/martin/software/ugcc/libexec/gcc/x86_64-unknown-linux-gnu/4.3.0/f951
test.f90 -quiet -dumpbase test.f90 -mtune=generic -auxbase test -O2 -version -I
/home/martin/software/ugcc/lib/gcc/x86_64-unknown-linux-gnu/4.3.0/finclude -o
/tmp/ccsOQohf.s
GNU F95 version 4.3.0 20061023 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.3.0 20061023 (experimental).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128005
test.f90: In function ‘gn_lc2uc1’:
test.f90:4: internal compiler error: in build2_stat, at tree.c:2963
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

The ICE does not occur with the head ov the 4.2 branch, so the probelm must be
very new. It does not appear at lower optimisation levels either.


-- 
           Summary: [gfortran, 4.3 regression] ICE in build2_stat, at
                    tree.c:2963
           Product: gcc
           Version: 4.3.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=29567



More information about the Gcc-bugs mailing list