This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR61335
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Richard Biener <rguenther at suse dot de>, Dominique Dhumieres <dominiq at lps dot ens dot fr>, Fortran List <fortran at gcc dot gnu dot org>
- Date: Fri, 6 Jun 2014 09:47:46 +0200
- Subject: Re: [PATCH] Fix PR61335
- Authentication-results: sourceware.org; auth=none
Hello!
> 2014-05-28 Richard Biener <rguenther@suse.de>
>
> PR tree-optimization/61335
> * tree-vrp.c (vrp_visit_phi_node): If the compare of old and
> new range fails, drop to varying.
>
> * gfortran.dg/pr61335.f90: New testcase.
This testcase triggers SIGFPE on alpha due to the use of denormal
operand. Maybe uninitialized value is used in line 48?
Reading symbols from ./pr61335.exe...done.
(gdb) r
Starting program: /space/homedirs/uros/test/pr61335.exe
Program received signal SIGFPE, Arithmetic exception.
0x0000000120000b54 in cp_units::cp_unit_create (string=<error reading
variable: Cannot access memory at address 0x120004000>, _string=5)
at /home/uros/gcc-svn/trunk/gcc/testsuite/gfortran.dg/pr61335.f90:48
48 unit_id=cp_units_none
(gdb) list
43 len_string, next_power
44 INTEGER, DIMENSION(cp_unit_max_kinds) :: kind_id, power, unit_id
45 LOGICAL :: failure
46
47 failure=.FALSE.
48 unit_id=cp_units_none
49 kind_id=cp_ukind_none
50 power=0
51 i_low=1
52 i_high=1
The exception is triggered in 0x120000b50, but emitted on the next FP insn.
0x0000000120000b4c <+76>: lds $f10,48(fp)
0x0000000120000b50 <+80>: cvttq/c $f10,$f10
=> 0x0000000120000b54 <+84>: ftoit $f10,t0
(gdb) b *0x120000b50
Breakpoint 1 at 0x120000b50: file
/home/uros/gcc-svn/trunk/gcc/testsuite/gfortran.dg/pr61335.f90, line
48.
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /space/homedirs/uros/test/pr61335.exe
Breakpoint 1, 0x0000000120000b50 in cp_units::cp_unit_create
(string=<error reading variable: Cannot access memory at address
0x120004000>,
_string=5) at
/home/uros/gcc-svn/trunk/gcc/testsuite/gfortran.dg/pr61335.f90:48
48 unit_id=cp_units_none
(gdb) i r $f10
f10 8.0173244974249919e-310 (raw 0x0000939600000000)
The test passes with -mieee that allows denormals.
Uros.