X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:to:from:reply-to:subject:date:message-id
	:mime-version:content-type; q=dns; s=default; b=fTMXBU0JUBr5BKdS
	7i91VLZ6I+7eACcS/mO+R4YoBgIKdYR8qiV0Zq/CQ4NIg/0OxmgcSRU0j+VMcWo9
	hfwtd7pIe4qULVwHGcL+vgKBUFqPe1ubDcE227TZiRNXe+Eye4Z0FD2lK7nsNZpM
	XNEHMSpnQ0x8h/XNlM5E0xfQ7JE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:to:from:reply-to:subject:date:message-id
	:mime-version:content-type; s=default; bh=NpLXBxiDLuVim0+KwJuUFi
	WB36k=; b=CgLlXgAVYW9G7XRvdtRbX/+fugvp5Lv/V0V38jEcDfhS3lQiYhfXlE
	7JJGYvoLnG1yd/9TbLruYYAcYbHS5RfPLCzv1G3EiTgyxl/VXFH38IExTTm4+bfF
	kJwXzs9hW/r9XCWk28WBkDQKQ9qOTOWQ/Jt2JpsHyxIqpqUeH/I98=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_GOODAOL,KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=H*F:D*aol.com, Hx-languages-length:1234, H*Ad:D*aol.com, H*r:Unknown
X-HELO: blaine.gmane.org
To: cygwin@cygwin.com
From: "airplanemath via cygwin" <cygwin@cygwin.com>
Reply-To: "airplanemath" <airplanemath@aol.com>
Subject: gfortran problems with equivalence statement in module
Date: Sun, 27 Jan 2019 17:52:09 -0500
Message-ID: <vriu4l9tlnmu.fsf@aol.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (cygwin)
X-IsSubscribed: yes

--=-=-=
Content-Type: text/plain
Content-Disposition: attachment; filename=test_compile.f90
Content-Description: Problematic fortran file.

module test
  integer, parameter :: rb = kind(1.0)              
  real(kind=rb) :: ka(5,13,10)   , absa(65,10)
  real(kind=rb) :: kb(5,13:59,10), absb(235,10)
  equivalence (ka(1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1))
end module test

--=-=-=
Content-Type: text/plain

Compiling the attached fortran code with "gfortran -c test_compile.f90"
fails, citing an internal compiler error due to a segmentation fault.
Downgrading gcc-fortran to 7.3.0-3 or using the Mingw-w64 7.4.0-0
gfortran allows the compilation to complete and produce a .o file.
Running as "${host}-gfortran -c -wrapper gdb,--args test_compile.f90"
seems to indicate that the Mingw-w64 compiler does not have the line
that causes the problem in the cygwin-native compiler:

attributes = gfc_add_attributes_to_decl (com->head->attr, NULL_TREE);

where *com is initialized to zeros (so that com->head is NULL), and
there does not seem to be any place between the creation of *com and
the call above that would set com->head to something other than NULL.

I seem to be missing something here, but I have no idea what that might
be.  Can someone point out to me what it is I've missed?

Thanks for any help you may be able to give, and for providing cygwin
all these years.


--=-=-=
Content-Type: text/plain; charset=us-ascii


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
--=-=-=--

