Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
8d31729f
Commit
8d31729f
authored
Nov 19, 1997
by
Jeff Law
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New test.
From-SVN: r16578
parent
4dff12bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
gcc/testsuite/g77.f-torture/execute/dnrm2.f
+72
-0
No files found.
gcc/testsuite/g77.f-torture/execute/dnrm2.f
0 → 100644
View file @
8d31729f
CCC g77 0.5.21 `Actual Bugs':
CCC * A code-generation bug afflicts Intel x86 targets when `-O2' is
CCC specified compiling, for example, an old version of the `DNRM2'
CCC routine. The x87 coprocessor stack is being somewhat mismanaged
CCC in cases where assigned `GOTO' and `ASSIGN' are involved.
CCC
CCC Version 0.5.21 of `g77' contains an initial effort to fix the
CCC problem, but this effort is incomplete, and a more complete fix is
CCC planned for the next release.
C Currently this test fails with (at least) `-O2 -funroll-loops' on
C i586-unknown-linux-gnulibc1.
C (This is actually an obsolete version of dnrm2 -- consult the
c current Netlib BLAS.)
integer i
double precision a(1:100)
do i=1,100
a(i)=0.D0
enddo
if (dnrm2(100,a,1) .ne. 0.0) call exit(1)
end
double precision function dnrm2 ( n, dx, incx)
integer i, incx, ix, j, n, next
double precision dx(1), cutlo, cuthi, hitest, sum, xmax,zero,one
data zero, one /0.0d0, 1.0d0/
if(n .gt. 0 .and. incx.gt.0) go to 10
dnrm2 = zero
go to 300
10 assign 30 to next
sum = zero
i = 1
ix = 1
20 go to next,(30, 50, 70, 110)
30 if( dabs(dx(i)) .gt. cutlo) go to 85
assign 50 to next
xmax = zero
50 if( dx(i) .eq. zero) go to 200
if( dabs(dx(i)) .gt. cutlo) go to 85
assign 70 to next
go to 105
100 continue
ix = j
assign 110 to next
sum = (sum / dx(i)) / dx(i)
105 xmax = dabs(dx(i))
go to 115
70 if( dabs(dx(i)) .gt. cutlo ) go to 75
110 if( dabs(dx(i)) .le. xmax ) go to 115
sum = one + sum * (xmax / dx(i))**2
xmax = dabs(dx(i))
go to 200
115 sum = sum + (dx(i)/xmax)**2
go to 200
75 sum = (sum * xmax) * xmax
85 hitest = cuthi/float( n )
do 95 j = ix,n
if(dabs(dx(i)) .ge. hitest) go to 100
sum = sum + dx(i)**2
i = i + incx
95 continue
dnrm2 = dsqrt( sum )
go to 300
200 continue
ix = ix + 1
i = i + incx
if( ix .le. n ) go to 20
dnrm2 = xmax * dsqrt(sum)
300 continue
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment