public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/46794] New: ICE on valid code involving power of small integer kinds
@ 2010-12-03 21:17 domob at gcc dot gnu.org
  2010-12-03 21:17 ` [Bug fortran/46794] " domob at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: domob at gcc dot gnu.org @ 2010-12-03 21:17 UTC (permalink / raw)
  To: gcc-bugs

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 <http://gcc.gnu.org/bugs.html> 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.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-12-17 15:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-03 21:17 [Bug fortran/46794] New: ICE on valid code involving power of small integer kinds domob at gcc dot gnu.org
2010-12-03 21:17 ` [Bug fortran/46794] " domob at gcc dot gnu.org
2010-12-04  9:27 ` domob at gcc dot gnu.org
2010-12-04  9:29 ` domob at gcc dot gnu.org
2010-12-04 12:12 ` domob at gcc dot gnu.org
2010-12-05 10:09 ` domob at gcc dot gnu.org
2010-12-09 15:55 ` domob at gcc dot gnu.org
2010-12-17 15:30 ` domob at gcc dot gnu.org
2010-12-17 15:32 ` domob at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).