This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/33609] ICE on arithmetic overflow



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2007-10-01 20:11 -------
This is not target-specific:

$ cat u.f90 
  print *, real(huge(1.0_8),4)
  end
$ gfortran u.f90 
u.f90:1.16:

  print *, real(huge(1.0_8),4)
               1
Error: Arithmetic overflow converting REAL(8) to REAL(4) at (1). This check can
be disabled with the option -fno-range-check
f951: internal compiler error: Segmentation fault


Program received signal SIGSEGV, Segmentation fault.
gfc_range_check (e=0x0) at ../../../trunk/gcc/fortran/arith.c:524
524       switch (e->ts.type)
(gdb) where
#0  gfc_range_check (e=0x0) at ../../../trunk/gcc/fortran/arith.c:524
#1  0x0000000000463719 in range_check (result=0x0, name=0xb57e35 "REAL")
    at ../../../trunk/gcc/fortran/simplify.c:73
#2  0x0000000000425e8b in do_simplify (specific=0xed5168, e=0xf58d70)
    at ../../../trunk/gcc/fortran/intrinsic.c:3179
#3  0x0000000000426d3a in gfc_intrinsic_func_interface (expr=0xf58d70, 
    error_flag=1) at ../../../trunk/gcc/fortran/intrinsic.c:3437
#4  0x00000000004598b0 in gfc_resolve_expr (e=0xf58d70)
    at ../../../trunk/gcc/fortran/resolve.c:1553


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
  GCC build triplet|powerpc-apple-darwin8       |
   GCC host triplet|powerpc-apple-darwin8       |
 GCC target triplet|powerpc-apple-darwin8       |
           Keywords|                            |error-recovery, ice-on-
                   |                            |invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2007-10-01 20:11:40
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33609


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]