public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/36824] New: gfortran does not recognize constant array bounds in dimension attribute of type component
@ 2008-07-14 15:44 flad at gmx dot at
2008-07-14 19:30 ` [Bug fortran/36824] " burnus at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: flad at gmx dot at @ 2008-07-14 15:44 UTC (permalink / raw)
To: gcc-bugs
---------------------------------
program test
implicit none
integer, dimension( 3 ), parameter :: tgc = (/5, 6, 7 /)
type tgccomp
integer, dimension( tgc( 1 ) : tgc( 2 ) ) :: tgclist
end type tgccomp
end program
---------------------------------
This gives the following error:
gfortran test.f90
test.f90:8.73:
integer, dimension( tgc( 1 ) : tgc( 2 ) ) :: tgclist
1
Error: Component 'tgclist' of 'tgccomp' at (1) must have constant array bounds
This works:
---------------------------------
type tgccomp
integer, dimension( 1 : tgc( 1 ) ) :: tgclist
end type tgccomp
---------------------------------
--
Summary: gfortran does not recognize constant array bounds in
dimension attribute of type component
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: flad at gmx dot at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36824
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/36824] gfortran does not recognize constant array bounds in dimension attribute of type component
2008-07-14 15:44 [Bug fortran/36824] New: gfortran does not recognize constant array bounds in dimension attribute of type component flad at gmx dot at
@ 2008-07-14 19:30 ` burnus at gcc dot gnu dot org
2008-07-17 5:56 ` burnus at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-07-14 19:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2008-07-14 19:30 -------
The following seems to fix it.
Index: resolve.c
===================================================================
--- resolve.c (Revision 137789)
+++ resolve.c (Arbeitskopie)
@@ -7682,8 +7805,8 @@ resolve_fl_derived (gfc_symbol *sym)
for (i = 0; i < c->as->rank; i++)
{
if (c->as->lower[i] == NULL
- || !gfc_is_constant_expr (c->as->lower[i])
|| (resolve_index_expr (c->as->lower[i]) == FAILURE)
+ || !gfc_is_constant_expr (c->as->lower[i])
|| c->as->upper[i] == NULL
|| (resolve_index_expr (c->as->upper[i]) == FAILURE)
|| !gfc_is_constant_expr (c->as->upper[i]))
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36824
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/36824] gfortran does not recognize constant array bounds in dimension attribute of type component
2008-07-14 15:44 [Bug fortran/36824] New: gfortran does not recognize constant array bounds in dimension attribute of type component flad at gmx dot at
2008-07-14 19:30 ` [Bug fortran/36824] " burnus at gcc dot gnu dot org
@ 2008-07-17 5:56 ` burnus at gcc dot gnu dot org
2008-07-17 9:46 ` burnus at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-07-17 5:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2008-07-17 05:55 -------
Subject: Bug 36824
Author: burnus
Date: Thu Jul 17 05:54:42 2008
New Revision: 137910
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137910
Log:
2008-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/36825
PR fortran/36824
* array.c (gfc_match_array_spec): Fix array-rank check.
* resolve.c (resolve_fl_derived): Fix constentness check
for the array dimensions.
2008-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/36825
PR fortran/36824
* gfortran.dg/rank_2.f90: Add additional array-rank test.
* gfortran.dg/array_4.f90: New.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/array.c
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/rank_2.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36824
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/36824] gfortran does not recognize constant array bounds in dimension attribute of type component
2008-07-14 15:44 [Bug fortran/36824] New: gfortran does not recognize constant array bounds in dimension attribute of type component flad at gmx dot at
2008-07-14 19:30 ` [Bug fortran/36824] " burnus at gcc dot gnu dot org
2008-07-17 5:56 ` burnus at gcc dot gnu dot org
@ 2008-07-17 9:46 ` burnus at gcc dot gnu dot org
2008-07-17 9:47 ` burnus at gcc dot gnu dot org
2008-07-18 13:19 ` burnus at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-07-17 9:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2008-07-17 09:45 -------
Subject: Bug 36824
Author: burnus
Date: Thu Jul 17 09:44:33 2008
New Revision: 137917
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137917
Log:
2008-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/36824
* resolve.c (resolve_fl_derived): Fix constentness check
for the array dimensions.
2008-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/36824
* gfortran.dg/array_4.f90: New.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/array_4.f90
Modified:
branches/gcc-4_3-branch/gcc/fortran/ChangeLog
branches/gcc-4_3-branch/gcc/fortran/resolve.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36824
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/36824] gfortran does not recognize constant array bounds in dimension attribute of type component
2008-07-14 15:44 [Bug fortran/36824] New: gfortran does not recognize constant array bounds in dimension attribute of type component flad at gmx dot at
` (2 preceding siblings ...)
2008-07-17 9:46 ` burnus at gcc dot gnu dot org
@ 2008-07-17 9:47 ` burnus at gcc dot gnu dot org
2008-07-18 13:19 ` burnus at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-07-17 9:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from burnus at gcc dot gnu dot org 2008-07-17 09:46 -------
FIXED on the trunk (4.4) and for 4.3 (i.e. for 4.3.2).
Thanks for the bugreport.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36824
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/36824] gfortran does not recognize constant array bounds in dimension attribute of type component
2008-07-14 15:44 [Bug fortran/36824] New: gfortran does not recognize constant array bounds in dimension attribute of type component flad at gmx dot at
` (3 preceding siblings ...)
2008-07-17 9:47 ` burnus at gcc dot gnu dot org
@ 2008-07-18 13:19 ` burnus at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-07-18 13:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from burnus at gcc dot gnu dot org 2008-07-18 13:18 -------
Subject: Bug 36824
Author: burnus
Date: Fri Jul 18 13:17:49 2008
New Revision: 137949
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137949
Log:
The new file gfortran.dg/array_4.f90 was missing from the commit 137910
2008-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/36824
* gfortran.dg/array_4.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/array_4.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36824
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-07-18 13:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-14 15:44 [Bug fortran/36824] New: gfortran does not recognize constant array bounds in dimension attribute of type component flad at gmx dot at
2008-07-14 19:30 ` [Bug fortran/36824] " burnus at gcc dot gnu dot org
2008-07-17 5:56 ` burnus at gcc dot gnu dot org
2008-07-17 9:46 ` burnus at gcc dot gnu dot org
2008-07-17 9:47 ` burnus at gcc dot gnu dot org
2008-07-18 13:19 ` burnus 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).