From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29385 invoked by alias); 2 Dec 2004 10:38:41 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 29354 invoked by uid 48); 2 Dec 2004 10:38:36 -0000 Date: Thu, 02 Dec 2004 10:38:00 -0000 Message-ID: <20041202103836.29353.qmail@sourceware.org> From: "paul dot richard dot thomas at cea dot fr" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040803172636.16861.yosef@phys.utb.edu> References: <20040803172636.16861.yosef@phys.utb.edu> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug fortran/16861] segfault with doubly used module X-Bugzilla-Reason: CC X-SW-Source: 2004-12/txt/msg00283.txt.bz2 List-Id: ------- Additional Comments From paul dot richard dot thomas at cea dot fr 2004-12-02 10:38 ------- The 11th November still gives this behaviour. However, if the USE FOO is raised to the module level, all is well. For example, this slightly expanded version compiles and runs fine. module FOO integer :: I=2 end module FOO module BAR use FOO contains subroutine BAZ(J) integer, dimension(I) :: J print * ,"BAZ: size(j) =", size(J) end subroutine BAZ end module BAR subroutine QUUS() use FOO use BAR end subroutine QUUS program test_mod use FOO USE BAR integer, dimension(I) :: j I=3 call BAZ(j) call QUUS(2) print * ,"MAIN: size(j) =", size(J) end program test_mod (In reply to comment #4) > Confirmed. Here's a shorter testcase: > ===================================== > module FOO > integer :: I > end module FOO > module BAR > contains > subroutine BAZ(J) > use FOO > integer, dimension(I) :: J > end subroutine BAZ > end module BAR > subroutine QUUS() > use FOO > use BAR > end subroutine QUUS > ===================================== -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16861