From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24440 invoked by alias); 26 Jan 2012 16:13:15 -0000 Received: (qmail 24425 invoked by uid 22791); 26 Jan 2012 16:13:12 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Jan 2012 16:13:00 +0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/50981] [4.4/4.5/4.6 Regression] Wrong-code for scalarizing ELEMENTAL call with absent OPTIONAL argument Date: Thu, 26 Jan 2012 16:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: mikael at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.4.7 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-01/txt/msg03055.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50981 --- Comment #30 from Dominique d'Humieres 2012-01-26 16:12:13 UTC --- (In reply to comment #28) > Created attachment 26468 [details] > better patch > > This one should work. It does;-) I have applied the patch on revision 183541 on top of the Paul's patch at http://gcc.gnu.org/ml/fortran/2012-01/msg00214.html (pr51870) and Tobias' ones for pr51970 and pr51434 comment #12. It regtested without regression and all the failures reported in comments #25 and #26 are gone. It passes the full comment #13 test fixed as in comment #22 (I blindly trust that it is the "right thing to do") and it fixes pr51514 and the test in pr41587 comment #1 (at least part of it: it now prints " 0 0 42" while I'ld expect " 42 42 42"(?); without the patch I get an ICE pr41587_db.f90:10:0: internal compiler error: in gfc_conv_descriptor_data_get, at fortran/trans-array.c:147). The test in comment #23 gives an ICE with/without the patch: pr50981_4.f90: In function 'MAIN__': pr50981_4.f90:16:0: internal compiler error: in fold_convert_loc, at fold-const.c:2016 i.e., the same ICE as for pr51977 (I did not tested the patchlet in comment #27). Thanks for the work!