http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59534
Bug ID: 59534
Summary: [4.9 Regression] FAIL: libgomp.fortran/retval1.f90
execution test due to denormals
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgomp
Assignee: unassigned at gcc dot gnu.org
Reporter: ubizjak at gmail dot com
CC: jakub at gcc dot gnu.org
This testcase failure is exposed on alpha, which by default generates exception
when denormals are generated:
spawn [open ...]^M
Program received signal SIGFPE: Floating-point exception - erroneous arithmetic
operation.
Program received signal SIGFPE: Floating-point exception - erroneous arithmetic
operation.
Backtrace for this error:
Backtrace for this error:
#0 0x2000004F1D7
#0 0x2000004F1D7
WARNING: program timed out.
FAIL: libgomp.fortran/retval1.f90 -O2 execution test
Running the test under gdb shows:
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x20000c591a0 (LWP 24795)]
0x0000000120000d6c in master.3.f5_._omp_fn.0 () at
/home/uros/gcc-svn/trunk/libgomp/testsuite/libgomp.fortran/retval1.f90:95
95 l = l .or. (is_f5 .and. f5 .ne. 6.5)
(gdb) list
90 end if
91 l = .false.
92 !$omp parallel firstprivate (f5, e5) shared (is_f5) num_threads (2) &
93 !$omp reduction (.or.:l)
94 l = .not. is_f5 .and. e5 .ne. 8
95 l = l .or. (is_f5 .and. f5 .ne. 6.5)
96 if (omp_get_thread_num () .eq. 0) e5 = 8
97 if (omp_get_thread_num () .eq. 1) e5 = 14
98 f5 = e5 - 4.5
99 !$omp barrier
0x0000000120000d50 <+368>: ldah t0,-2(gp)
0x0000000120000d54 <+372>: lda s0,14
0x0000000120000d58 <+376>: lds $f2,30828(t0)
0x0000000120000d5c <+380>: br 0x120000c6c
<master.3.f5_._omp_fn.0+140>
0x0000000120000d60 <+384>: ldah t0,-2(gp)
0x0000000120000d64 <+388>: lds $f11,30832(t0)
=> 0x0000000120000d68 <+392>: cmpteq $f10,$f11,$f11
0x0000000120000d6c <+396>: ftoit $f11,s2
0x0000000120000d70 <+400>: cmpeq s2,0,s2
We can put breakpoint at the faulting insn, to obtain following session:
[New Thread 0x20000c591a0 (LWP 24957)]
[Switching to Thread 0x20000c591a0 (LWP 24957)]
Breakpoint 3, 0x0000000120000d68 in master.3.f5_._omp_fn.0 () at
/home/uros/gcc-svn/trunk/libgomp/testsuite/libgomp.fortran/retval1.f90:95
95 l = l .or. (is_f5 .and. f5 .ne. 6.5)
(gdb) i r f10 f11
f10 6.5 (raw 0x401a000000000000)
f11 6.5 (raw 0x401a000000000000)
(gdb) c
Continuing.
[Switching to Thread 0x20000458000 (LWP 24956)]
Breakpoint 3, 0x0000000120000d68 in master.3.f5_._omp_fn.0 () at
/home/uros/gcc-svn/trunk/libgomp/testsuite/libgomp.fortran/retval1.f90:95
95 l = l .or. (is_f5 .and. f5 .ne. 6.5)
(gdb) i r f10 f11
f10 6.5 (raw 0x401a000000000000)
f11 6.5 (raw 0x401a000000000000)
(gdb) c
Continuing.
[Switching to Thread 0x20000c591a0 (LWP 24957)]
Breakpoint 3, 0x0000000120000d68 in master.3.f5_._omp_fn.0 () at
/home/uros/gcc-svn/trunk/libgomp/testsuite/libgomp.fortran/retval1.f90:95
95 l = l .or. (is_f5 .and. f5 .ne. 6.5)
(gdb) i r f10 f11
f10 2.1219957909652723e-314 (raw 0x0000000100000000)
f11 6.5 (raw 0x401a000000000000)
(gdb) si
Program received signal SIGFPE, Arithmetic exception.
0x0000000120000d6c in master.3.f5_._omp_fn.0 () at
/home/uros/gcc-svn/trunk/libgomp/testsuite/libgomp.fortran/retval1.f90:95
95 l = l .or. (is_f5 .and. f5 .ne. 6.5)
This problem started somewhere between 15. October [1] and 3. November [2].
[1] http://gcc.gnu.org/ml/gcc-testresults/2013-10/msg01200.html
[2] http://gcc.gnu.org/ml/gcc-testresults/2013-11/msg00175.html