public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35947] New: wrong answers with array constructor argument to IEOR
@ 2008-04-15 15:51 dick dot hendrickson at gmail dot com
2008-04-16 18:20 ` [Bug fortran/35947] [4.3, 4.4 regression] " tkoenig at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: dick dot hendrickson at gmail dot com @ 2008-04-15 15:51 UTC (permalink / raw)
To: gcc-bugs
The following program gives wrong answers when an array
is used in an array constructor as an argument to IEOR.
Dick Hendrickson
program try_fa6077
! fails on Windows XP
! gcc version 4.4.0 20080312 (experimental) [trunk revision 133139]
call fa6077 ( 10, 1, -1, (/1,2,3,4,5,6,7,8,9,10/))
end
subroutine FA6077 (nf10,nf1,mf1, ida)
INTEGER IDA1(10)
INTEGER IDA2(10), ida(10)
IDA1 = IEOR((/1,2,3,4,5,6,7,8,9,10/),
$ (/(IDA(J1),J1=10,1,-1)/) )
IDA2 = IEOR ((/1,2,3,4,5,6,7,8,9,10/), (/10,9,8,7,6,5,4,3,2,1/) )
print '(10i3)', (/1,2,3,4,5,6,7,8,9,10/),
$ (/10,9,8,7,6,5,4,3,2,1/),ida1,ida2
END SUBROUTINE
c:\gfortran:gfortran fa6077.f
c:\gfortran:a
1 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1
8 10 4 2 0 2 4 10 8 10
11 11 11 3 3 3 3 11 11 11
--
Summary: wrong answers with array constructor argument to IEOR
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dick dot hendrickson at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35947
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/35947] [4.3, 4.4 regression] wrong answers with array constructor argument to IEOR
2008-04-15 15:51 [Bug fortran/35947] New: wrong answers with array constructor argument to IEOR dick dot hendrickson at gmail dot com
@ 2008-04-16 18:20 ` tkoenig at gcc dot gnu dot org
2008-04-17 7:09 ` jakub at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2008-04-16 18:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tkoenig at gcc dot gnu dot org 2008-04-16 18:19 -------
Confirmed, a regression:
$ gfortran foo.f
$ ./a.out
1 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1
8 10 4 2 0 2 4 10 8***
11 11 11 3 3 3 3 11 11 11
$ ifort foo.f
$ ./a.out
1 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1
11 11 11 3 3 3 3 11 11 11
11 11 11 3 3 3 3 11 11 11
$ gfortran-4.2 foo.f
$ ./a.out
1 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1
11 11 11 3 3 3 3 11 11 11
11 11 11 3 3 3 3 11 11 11
$ gfortran-4.3 -static foo.f
$ ./a.out
1 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1
8 10 4 2 0 2 4 10 8 10
11 11 11 3 3 3 3 11 11 11
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2008-04-16 18:19:41
date| |
Summary|wrong answers with array |[4.3, 4.4 regression] wrong
|constructor argument to IEOR|answers with array
| |constructor argument to IEOR
Target Milestone|--- |4.3.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35947
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/35947] [4.3, 4.4 regression] wrong answers with array constructor argument to IEOR
2008-04-15 15:51 [Bug fortran/35947] New: wrong answers with array constructor argument to IEOR dick dot hendrickson at gmail dot com
2008-04-16 18:20 ` [Bug fortran/35947] [4.3, 4.4 regression] " tkoenig at gcc dot gnu dot org
@ 2008-04-17 7:09 ` jakub at gcc dot gnu dot org
2008-04-19 7:59 ` jvdelisle at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-17 7:09 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35947
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/35947] [4.3, 4.4 regression] wrong answers with array constructor argument to IEOR
2008-04-15 15:51 [Bug fortran/35947] New: wrong answers with array constructor argument to IEOR dick dot hendrickson at gmail dot com
2008-04-16 18:20 ` [Bug fortran/35947] [4.3, 4.4 regression] " tkoenig at gcc dot gnu dot org
2008-04-17 7:09 ` jakub at gcc dot gnu dot org
@ 2008-04-19 7:59 ` jvdelisle at gcc dot gnu dot org
2008-04-19 8:37 ` pault at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-04-19 7:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2008-04-19 07:58 -------
I have started a regression hunt on this one. If any one finds the problem,
let me know, the hunt could take a while.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35947
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/35947] [4.3, 4.4 regression] wrong answers with array constructor argument to IEOR
2008-04-15 15:51 [Bug fortran/35947] New: wrong answers with array constructor argument to IEOR dick dot hendrickson at gmail dot com
` (2 preceding siblings ...)
2008-04-19 7:59 ` jvdelisle at gcc dot gnu dot org
@ 2008-04-19 8:37 ` pault at gcc dot gnu dot org
2008-04-19 21:57 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-04-19 8:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pault at gcc dot gnu dot org 2008-04-19 08:36 -------
(In reply to comment #2)
> I have started a regression hunt on this one. If any one finds the problem,
> let me know, the hunt could take a while.
>
Jerry,
In fixing PR35946, I have fixed this fella too:)
Call off the hounds!
Cheers
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2008-04-16 18:19:41 |2008-04-19 08:36:54
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35947
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/35947] [4.3, 4.4 regression] wrong answers with array constructor argument to IEOR
2008-04-15 15:51 [Bug fortran/35947] New: wrong answers with array constructor argument to IEOR dick dot hendrickson at gmail dot com
` (3 preceding siblings ...)
2008-04-19 8:37 ` pault at gcc dot gnu dot org
@ 2008-04-19 21:57 ` pault at gcc dot gnu dot org
2008-04-19 22:31 ` pault at gcc dot gnu dot org
2008-04-19 22:33 ` pault at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-04-19 21:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2008-04-19 21:56 -------
Subject: Bug 35947
Author: pault
Date: Sat Apr 19 21:55:24 2008
New Revision: 134472
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134472
Log:
2008-04-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35944
PR fortran/35946
PR fortran/35947
* trans_array.c (gfc_trans_array_constructor): Temporarily
realign loop, if loop->from is not zero, before creating
the temporary array and provide an offset.
PR fortran/35959
* trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
and allow for NULL body. Change all references from
init_default_dt to gfc_init_default_dt.
* trans.h : Add prototype for gfc_init_default_dt.
* trans-array.c (gfc_trans_deferred_vars): After nullification
call gfc_init_default_dt for derived types with allocatable
components.
2008-04-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35944
PR fortran/35946
PR fortran/35947
* gfortran.dg/array_constructor_23.f: New test.
PR fortran/35959
* gfortran.dg/alloc_comp_default_init_2.f90: New test.
* gfortran.dg/alloc_comp_basics_1.f90: Change occurrences of
"builtin_free" to 27.
* gfortran.dg/alloc_comp_constructor_1.f90: Change occurrences
of "builtin_free" to 21.
Added:
trunk/gcc/testsuite/gfortran.dg/alloc_comp_default_init_2.f90
trunk/gcc/testsuite/gfortran.dg/array_constructor_23.f
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/alloc_comp_basics_1.f90
trunk/gcc/testsuite/gfortran.dg/alloc_comp_constructor_1.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35947
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/35947] [4.3, 4.4 regression] wrong answers with array constructor argument to IEOR
2008-04-15 15:51 [Bug fortran/35947] New: wrong answers with array constructor argument to IEOR dick dot hendrickson at gmail dot com
` (4 preceding siblings ...)
2008-04-19 21:57 ` pault at gcc dot gnu dot org
@ 2008-04-19 22:31 ` pault at gcc dot gnu dot org
2008-04-19 22:33 ` pault at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-04-19 22:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2008-04-19 22:31 -------
Subject: Bug 35947
Author: pault
Date: Sat Apr 19 22:30:03 2008
New Revision: 134475
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134475
Log:
2008-04-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35944
PR fortran/35946
PR fortran/35947
* trans_array.c (gfc_trans_array_constructor): Temporarily
realign loop, if loop->from is not zero, before creating
the temporary array and provide an offset.
PR fortran/35959
* trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
and allow for NULL body. Change all references from
init_default_dt to gfc_init_default_dt.
* trans.h : Add prototype for gfc_init_default_dt.
* trans-array.c (gfc_trans_deferred_vars): After nullification
call gfc_init_default_dt for derived types with allocatable
components.
2008-04-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35944
PR fortran/35946
PR fortran/35947
* gfortran.dg/array_constructor_23.f: New test.
PR fortran/35959
* gfortran.dg/alloc_comp_default_init_2.f90: New test.
* gfortran.dg/alloc_comp_basics_1.f90: Change occurrences of
"builtin_free" to 27.
* gfortran.dg/alloc_comp_constructor_1.f90: Change occurrences
of "builtin_free" to 21.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/alloc_comp_default_init_2.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/array_constructor_23.f
Modified:
branches/gcc-4_3-branch/gcc/fortran/ChangeLog
branches/gcc-4_3-branch/gcc/fortran/trans-array.c
branches/gcc-4_3-branch/gcc/fortran/trans-decl.c
branches/gcc-4_3-branch/gcc/fortran/trans.h
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/alloc_comp_basics_1.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/alloc_comp_constructor_1.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35947
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/35947] [4.3, 4.4 regression] wrong answers with array constructor argument to IEOR
2008-04-15 15:51 [Bug fortran/35947] New: wrong answers with array constructor argument to IEOR dick dot hendrickson at gmail dot com
` (5 preceding siblings ...)
2008-04-19 22:31 ` pault at gcc dot gnu dot org
@ 2008-04-19 22:33 ` pault at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-04-19 22:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pault at gcc dot gnu dot org 2008-04-19 22:32 -------
Fixed on trunk and 4.3.
Thanks for the report.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35947
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-04-19 22:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-15 15:51 [Bug fortran/35947] New: wrong answers with array constructor argument to IEOR dick dot hendrickson at gmail dot com
2008-04-16 18:20 ` [Bug fortran/35947] [4.3, 4.4 regression] " tkoenig at gcc dot gnu dot org
2008-04-17 7:09 ` jakub at gcc dot gnu dot org
2008-04-19 7:59 ` jvdelisle at gcc dot gnu dot org
2008-04-19 8:37 ` pault at gcc dot gnu dot org
2008-04-19 21:57 ` pault at gcc dot gnu dot org
2008-04-19 22:31 ` pault at gcc dot gnu dot org
2008-04-19 22:33 ` pault 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).