[Bug fortran/15182] New: gfortran ICE: gfc_get_symbol_decl: Assertion `((decl)->common.static_flag)' failed

olchansk at panix dot com gcc-bugzilla@gcc.gnu.org
Tue Apr 27 22:50:00 GMT 2004


Attached code produces an ICE. Absoft and ICC are fine.

/* in file bar.f90 */
module bar
  implicit none
  character(len=10), public:: bartest = ''
end module bar

/* in file test_gfc_get_symbol_decl.f90 */
module foo
  use bar
  implicit none
  character(len=10), public:: localtest = ''
contains
  subroutine foobar
    localtest = 'aaa'

    ! following line produces ICE:
    ! f951: ../../gcc/gcc/fortran/trans-decl.c:818: gfc_get_symbol_decl:
Assertion `((decl)->common.static_flag)' failed.

    bartest   = 'aaa'

  end subroutine foobar
end module foo

When compiling:
[olchansk@dork gfortran_test]$ make bar.o
/triumfcs/trshare/olchansk/gcc-tree-ssa/install/bin/gfortran -x f95 -c  -o bar.o
-O2 -g -Wall -Waliasing -Wline-truncation -Wsurprising -Wunused-labels -fPIC
-ffixed-line-length-132 bar.f90
[olchansk@dork gfortran_test]$ make test_gfc_get_symbol_decl.o
/triumfcs/trshare/olchansk/gcc-tree-ssa/install/bin/gfortran -x f95 -c  -o
test_gfc_get_symbol_decl.o -O2 -g -Wall -Waliasing -Wline-truncation
-Wsurprising -Wunused-labels -fPIC -ffixed-line-length-132
test_gfc_get_symbol_decl.f90
f951: ../../gcc/gcc/fortran/trans-decl.c:818: gfc_get_symbol_decl: Assertion
`((decl)->common.static_flag)' failed.
test_gfc_get_symbol_decl.f90: In function `foobar':
test_gfc_get_symbol_decl.f90:12: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make: *** [test_gfc_get_symbol_decl.o] Error 1

K.O.

-- 
           Summary: gfortran ICE: gfc_get_symbol_decl: Assertion `((decl)-
                    >common.static_flag)' failed
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: olchansk at panix dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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



More information about the Gcc-bugs mailing list