------- Comment #9 from dominiq at lps dot ens dot fr 2007-10-30 14:50 ------- Reduced test case:
module m_common_elstack implicit none private ! Simple stack to keep track of which elements have appeared so far ! Initial stack size: integer, parameter :: STACK_SIZE_INIT = 10 ! Multiplier when stack is exceeded: real, parameter :: STACK_SIZE_MULT = 1.5 type :: elstack_item character, dimension(:), pointer :: data end type elstack_item type :: elstack_t private integer :: n_items type(elstack_item), pointer, dimension(:) :: stack end type elstack_t public :: elstack_t public :: pop_elstack contains !----------------------------------------------------------------- function pop_elstack(elstack) result(item) type(elstack_t), intent(inout) :: elstack character(len=merge(size(elstack%stack(elstack%n_items)%data), 0, elstack%n_items > 0)) :: item integer :: n end function pop_elstack end module m_common_elstack program test use m_common_elstack end program [karma] bug/dir_com% gfc m_common_elstack_red.f90 Fatal Error: Reading module m_common_elstack at line 28 column 38: Bad name line 28 of m_common_elstack.mod: '' (OP (LOGICAL 4 0 0 LOGICAL ()) 0 > (VARIABLE (INTEGER 4 0 0 INTEGER ()) [karma] bug/dir_com% gfortran m_common_elstack_red.f90 [karma] bug/dir_com% gfortran -v Using built-in specs. Target: powerpc-apple-darwin8 Configured with: ../gcc-4.2.2/configure --prefix=/sw --prefix=/sw/lib/gcc4.2 --mandir=/sw/share/man --infodir=/sw/share/info --enable-languages=c,c++,fortran,objc,java --host=powerpc-apple-darwin8 --with-gmp=/sw --with-libiconv-prefix=/sw --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib Thread model: posix gcc version 4.2.2 line 20/21 of m_common_elstack.mod: (CONSTANT (INTEGER 4 ()) 0 '0')) ('' (OP (LOGICAL 4 ()) 0 GT (VARIABLE ( INTEGER 4 ()) 0 5 ((COMPONENT 6 8 'n_items'))) (CONSTANT (INTEGER 4 ()) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33941