public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/15553] New: Array copy operation produces garbage
@ 2004-05-21 13:10 schnetter at aei dot mpg dot de
2004-05-21 13:29 ` [Bug fortran/15553] " schnetter at aei dot mpg dot de
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: schnetter at aei dot mpg dot de @ 2004-05-21 13:10 UTC (permalink / raw)
To: gcc-bugs
The attached programme fails with GNU Fortran 95 (GCC 3.5.0 20040520
(experimental)).
The programme packs the 2D array x. The array has the shape (10,10), of which
only the subarray (6,5) is used. The programme copies the 6*5=30 elements
into the "first" 30 elements of x, where "first" is here according to the
Fortran array ordering.
When run, I expect the output
11 11.0000000000000
12 12.0000000000000
13 13.0000000000000
14 14.0000000000000
15 15.0000000000000
16 16.0000000000000
17 21.0000000000000
18 22.0000000000000
19 23.0000000000000
20 24.0000000000000
21 25.0000000000000
22 26.0000000000000
23 31.0000000000000
24 32.0000000000000
25 33.0000000000000
26 34.0000000000000
27 35.0000000000000
28 36.0000000000000
29 41.0000000000000
30 42.0000000000000
31 43.0000000000000
32 44.0000000000000
33 45.0000000000000
34 46.0000000000000
35 51.0000000000000
36 52.0000000000000
37 53.0000000000000
38 54.0000000000000
39 55.0000000000000
40 56.0000000000000
but i receive only garbage:
11 5.030513618404220E-270
12 -1.99744415283204
13 -1.99659731990728
14 -1.99665522575300
15 0.00000000000000
16 0.00000000000000
17 0.00000000000000
18 2.334195370061799E-313
19 2.334195374458983E-313
20 1.060997895759312E-312
21 -1.99665832519531
22 1.141633735539316E-311
23 2.121995791459338E-314
24 2.121995791459338E-313
25 2.121995791014678E-313
26 0.00000000000000
27 0.00000000000000
28 1.273197474579163E-313
29 6.747412213442543E-270
30 9.555629329992950E-313
31 4.857336695425104E-270
32 -1.99665141105572
33 1.591495110041668E-314
34 0.00000000000000
35 0.00000000000000
36 0.00000000000000
37 1.888576254013439E-312
38 1.188317642994899E-312
39 2.470328229206232E-322
40 1.591495112017931E-314
--
Summary: Array copy operation produces garbage
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schnetter at aei dot mpg dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/15553] Array copy operation produces garbage
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
@ 2004-05-21 13:29 ` schnetter at aei dot mpg dot de
2004-05-21 13:31 ` [Bug fortran/15553] [gfortran] " pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: schnetter at aei dot mpg dot de @ 2004-05-21 13:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schnetter at aei dot mpg dot de 2004-05-20 13:25 -------
Created an attachment (id=6347)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6347&action=view)
failing source code
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/15553] [gfortran] Array copy operation produces garbage
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
2004-05-21 13:29 ` [Bug fortran/15553] " schnetter at aei dot mpg dot de
@ 2004-05-21 13:31 ` pinskia at gcc dot gnu dot org
2004-09-15 3:17 ` [Bug fortran/15553] " pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-21 13:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-20 13:37 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2004-05-20 13:37:39
date| |
Summary|Array copy operation |[gfortran] Array copy
|produces garbage |operation produces garbage
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/15553] Array copy operation produces garbage
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
2004-05-21 13:29 ` [Bug fortran/15553] " schnetter at aei dot mpg dot de
2004-05-21 13:31 ` [Bug fortran/15553] [gfortran] " pinskia at gcc dot gnu dot org
@ 2004-09-15 3:17 ` pinskia at gcc dot gnu dot org
2004-09-21 13:45 ` tobi at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-15 3:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-15 03:17 -------
Fixed, how long a long I do not know.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/15553] Array copy operation produces garbage
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
` (2 preceding siblings ...)
2004-09-15 3:17 ` [Bug fortran/15553] " pinskia at gcc dot gnu dot org
@ 2004-09-21 13:45 ` tobi at gcc dot gnu dot org
2004-09-21 13:51 ` tobi at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-09-21 13:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-09-21 13:45 -------
Are you sure, Andrew. My reduced testcase still fails for me on i686-pc-linux:
program arrpack
implicit none
integer x(1,1), y(1,1)
integer i, j
x = -1
call pack (x, 1, 1)
x = -1
call copy (y, x, 1, 1)
contains
subroutine pack (arr, ni, nj)
integer, intent(in) :: ni, nj
integer, intent(inout) :: arr(:,:)
integer :: tmp(ni,nj)
tmp(:,:) = arr(1:ni, 1:nj)
print *, "pack"
tmp(1,1) = -2
call copy (arr, tmp, ni,nj) !tmp, ni, nj)
end subroutine pack
subroutine copy (dst, src, ni, nj)
integer, intent(in) :: ni, nj
integer :: dst(ni, nj)
integer :: src(ni, nj)
print *, "copy"
print *, dst, src
dst = src
print *, dst, src
end subroutine copy
end program arrpack
prints:
[tobi@marktplatz tests]$ ./a.out
pack
copy
-1 -2
-2 -2
copy
9612368 -1
-1 -1
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |tobi at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/15553] Array copy operation produces garbage
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
` (3 preceding siblings ...)
2004-09-21 13:45 ` tobi at gcc dot gnu dot org
@ 2004-09-21 13:51 ` tobi at gcc dot gnu dot org
2004-09-25 17:14 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-09-21 13:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-09-21 13:51 -------
Reopened. Might be target specific.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/15553] Array copy operation produces garbage
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
` (4 preceding siblings ...)
2004-09-21 13:51 ` tobi at gcc dot gnu dot org
@ 2004-09-25 17:14 ` pinskia at gcc dot gnu dot org
2004-10-21 19:27 ` tobi at gcc dot gnu dot org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-25 17:14 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/15553] Array copy operation produces garbage
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
` (5 preceding siblings ...)
2004-09-25 17:14 ` pinskia at gcc dot gnu dot org
@ 2004-10-21 19:27 ` tobi at gcc dot gnu dot org
2005-01-06 16:10 ` Thomas dot Koenig at online dot de
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-10-21 19:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-10-21 19:27 -------
*** Bug 18022 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |gruel at astro dot ufl dot
| |edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/15553] Array copy operation produces garbage
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
` (6 preceding siblings ...)
2004-10-21 19:27 ` tobi at gcc dot gnu dot org
@ 2005-01-06 16:10 ` Thomas dot Koenig at online dot de
2005-01-06 16:28 ` tobi at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-06 16:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2005-01-06 16:10 -------
The reduced testcase does not fail with 20050102 snapshot
on ia64-unknown-linux-gnu:
$ gfortran arrpack.f90
$ ./a.out
pack
copy
-1 -2
-2 -2
copy
0 -1
-1 -1
$ ifort arrpack.f90
$ ./a.out
pack
copy
-1 -2
-2 -2
copy
0 -1
-1 -1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/15553] Array copy operation produces garbage
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
` (7 preceding siblings ...)
2005-01-06 16:10 ` Thomas dot Koenig at online dot de
@ 2005-01-06 16:28 ` tobi at gcc dot gnu dot org
2005-01-07 10:37 ` Thomas dot Koenig at online dot de
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-01-06 16:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2005-01-06 16:28 -------
Still fails on i686-pc-linux:
[tobi@marktplatz tests]$ ./a.out
pack
copy
-1 -2
-2 -2
copy
9049312 -1
-1 -1
[tobi@marktplatz tests]$ gfortran --version
GNU Fortran 95 (GCC 4.0.0 20050104 (experimental))
Copyright (C) 2004 Free Software Foundation, Inc.
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2004-05-20 13:37:39 |2005-01-06 16:28:46
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/15553] Array copy operation produces garbage
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
` (8 preceding siblings ...)
2005-01-06 16:28 ` tobi at gcc dot gnu dot org
@ 2005-01-07 10:37 ` Thomas dot Koenig at online dot de
2005-01-07 11:19 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-07 10:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2005-01-07 10:37 -------
(In reply to comment #8)
> Still fails on i686-pc-linux:
Is this something that should be put into the test suite,
so it is possible to get a better overview of when and
on which machines this fails?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/15553] Array copy operation produces garbage
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
` (9 preceding siblings ...)
2005-01-07 10:37 ` Thomas dot Koenig at online dot de
@ 2005-01-07 11:19 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2005-01-07 11:37 ` tobi at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Tobias dot Schlueter at physik dot uni-muenchen dot de @ 2005-01-07 11:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de 2005-01-07 11:19 -------
Subject: Re: Array copy operation produces garbage
Thomas dot Koenig at online dot de wrote:
> ------- Additional Comments From Thomas dot Koenig at online dot de 2005-01-07 10:37 -------
> (In reply to comment #8)
>
>>Still fails on i686-pc-linux:
>
>
> Is this something that should be put into the test suite,
> so it is possible to get a better overview of when and
> on which machines this fails?
gcc's policy is no known failures in the testsuite, so I'm afraid this is not
possible. I do think this is a good idea, but only to the extent that other
people's development work is not interfered with by spurious testsuite FAILs /
XPASSes, which is inevitable in this case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/15553] Array copy operation produces garbage
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
` (10 preceding siblings ...)
2005-01-07 11:19 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
@ 2005-01-07 11:37 ` tobi at gcc dot gnu dot org
2005-01-07 11:56 ` cvs-commit at gcc dot gnu dot org
2005-01-07 14:11 ` tobi at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-01-07 11:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2005-01-07 11:37 -------
I took time to look at this again, and I'm sorry to say that my reduced testcase
did print out an uninitialized variable, and was therefore wrong. My apologies
to all those who have wasted their time on this.
Since I don't know when or how this was fixed, I'll close this as WORKSFORME.
I'll see about creating something for the testsuite.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |WORKSFORME
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/15553] Array copy operation produces garbage
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
` (11 preceding siblings ...)
2005-01-07 11:37 ` tobi at gcc dot gnu dot org
@ 2005-01-07 11:56 ` cvs-commit at gcc dot gnu dot org
2005-01-07 14:11 ` tobi at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-07 11:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-01-07 11:56 -------
Subject: Bug 15553
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: tobi@gcc.gnu.org 2005-01-07 11:56:12
Modified files:
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.dg: array-1.f90
Log message:
PR fortran/15553
* gfortran.dg/array-1.f90: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4863&r2=1.4864
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/array-1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/15553] Array copy operation produces garbage
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
` (12 preceding siblings ...)
2005-01-07 11:56 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-07 14:11 ` tobi at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-01-07 14:11 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15553
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2005-01-07 14:11 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-21 13:10 [Bug fortran/15553] New: Array copy operation produces garbage schnetter at aei dot mpg dot de
2004-05-21 13:29 ` [Bug fortran/15553] " schnetter at aei dot mpg dot de
2004-05-21 13:31 ` [Bug fortran/15553] [gfortran] " pinskia at gcc dot gnu dot org
2004-09-15 3:17 ` [Bug fortran/15553] " pinskia at gcc dot gnu dot org
2004-09-21 13:45 ` tobi at gcc dot gnu dot org
2004-09-21 13:51 ` tobi at gcc dot gnu dot org
2004-09-25 17:14 ` pinskia at gcc dot gnu dot org
2004-10-21 19:27 ` tobi at gcc dot gnu dot org
2005-01-06 16:10 ` Thomas dot Koenig at online dot de
2005-01-06 16:28 ` tobi at gcc dot gnu dot org
2005-01-07 10:37 ` Thomas dot Koenig at online dot de
2005-01-07 11:19 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2005-01-07 11:37 ` tobi at gcc dot gnu dot org
2005-01-07 11:56 ` cvs-commit at gcc dot gnu dot org
2005-01-07 14:11 ` tobi at gcc dot gnu dot 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).