[Bug fortran/30554] [4.2 and 4.1 only] ICE in mio_pointer_ref at module.c:1945
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Feb 2 10:03:00 GMT 2007
------- Comment #8 from burnus at gcc dot gnu dot org 2007-02-02 10:03 -------
> The patch seems to fix the problem with the test file. Unfortunately, the
> original problem with the Dynamo package remains:
Modified test case - added:
PRIVATE
PUBLIC :: ENergY_CONTRAINT
-------------------------
MODULE ATOMS
INTEGER :: NFREE = 0
END MODULE ATOMS
MODULE CONSTRAINT
USE ATOMS, ONLY: NFREE
PRIVATE
PUBLIC :: ENERGY_CONSTRAINT
CONTAINS
SUBROUTINE ENERGY_CONSTRAINT ( HESSIAN )
REAL , DIMENSION(1:(3*NFREE*(3*NFREE+1))/2):: HESSIAN
END SUBROUTINE ENERGY_CONSTRAINT
END MODULE CONSTRAINT
MODULE POTENTIAL_ENERGY
USE ATOMS
USE CONSTRAINT, ONLY : ENERGY_CONSTRAINT
END MODULE POTENTIAL_ENERGY
-------------------------
The backtrace looks rather similar:
Program received signal SIGSEGV, Segmentation fault.
mio_pointer_ref (gp=0x28) at fortran/module.c:1945
1945 p = get_pointer (*((char **) gp));
(gdb) bt
#0 mio_pointer_ref (gp=0x28) at fortran/module.c:1945
#1 0x000000000043b549 in mio_symbol_ref (symp=0x28) at /fortran/module.c:2174
#2 0x000000000043bfab in mio_expr (ep=0xe52fd8) at fortran/module.c:2699
#3 0x000000000043c080 in mio_expr (ep=0xe52f20) at fortran/module.c:2655
#4 0x000000000043c077 in mio_expr (ep=0xe52e70) at fortran/module.c:2654
#5 0x000000000043c102 in mio_expr (ep=0xe52dc0) at fortran/module.c:2635
#6 0x000000000043c077 in mio_expr (ep=0xe4dfd0) at fortran/module.c:2654
#7 0x000000000043c783 in mio_array_spec (asp=<value optimized out>) at
fortran/module.c:1846
#8 0x000000000043cdb3 in mio_symbol (sym=0xe50490) at fortran/module.c:2946
#9 0x000000000043d257 in write_symbol (n=38, sym=0xe50490) at
fortran/module.c:3647
In order to test the real program, use:
Dynamo molecular dynamics library (<http://www.pdynamo.org/Installation.html>)
In the Makefile:
FC = gfortran
FFLAGS = -c -I$(MOD_DIR) -J$(MOD_DIR) -O3
FFLAGS1 = -c -I$(MOD_DIR) -J$(MOD_DIR) -O1
Run:
DYNAMO_HOME=. make all
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30554
More information about the Gcc-bugs
mailing list