From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26001 invoked by alias); 3 Dec 2010 21:17:31 -0000 Received: (qmail 25993 invoked by uid 22791); 3 Dec 2010 21:17:31 -0000 X-SWARE-Spam-Status: No, hits=-2.8 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; Fri, 03 Dec 2010 21:17:26 +0000 From: "domob at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/46794] New: ICE on valid code involving power of small integer kinds X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: domob at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 03 Dec 2010 21:17:00 -0000 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: 2010-12/txt/msg00366.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46794 Summary: ICE on valid code involving power of small integer kinds Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: domob@gcc.gnu.org The following reduced code ICEs: PROGRAM main IMPLICIT NONE INTEGER(KIND=2) :: j j = 1_2 + 1_2**j END PROGRAM main I get something like: [/tmp]# gfortran-dev test.f03 test.f03: In function 'MAIN__': test.f03:1:0: error: type mismatch in binary expression integer(kind=2) integer(kind=4) integer(kind=2) j = D.1476 + 1; test.f03:1:0: internal compiler error: verify_gimple failed Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The problem is that for "small" integer kinds (1 and 2) we still call the library power routine for kind 4 but the result is not converted back to the smaller integer kinds properly. This seems to be a regression, with 4.3 and 4.5 the code compiles cleanly for me.