public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/38914] New: ICE with array inquiry functions above contains in parameter expression
@ 2009-01-19 16:49 dick dot hendrickson at gmail dot com
2009-01-19 17:57 ` [Bug fortran/38914] " kargl at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: dick dot hendrickson at gmail dot com @ 2009-01-19 16:49 UTC (permalink / raw)
To: gcc-bugs
The following program causes an ICE. If the contains and subroutine statements
are uncommented, then the program compiles.
Dick Hendrickson
MODULE U_above_TESTS
! fails on Windows XP
! gcc version 4.4.0 20081219 (experimental) [trunk revision 142842] (GCC)
! contains
! subroutine U_below
INTEGER, PARAMETER, DIMENSION(0:20,4) :: IP_ARRAY2_4_S = 0
INTEGER, PARAMETER, DIMENSION(12) :: IP_ARRAY1_32_S =
$(/ LBOUND(IP_ARRAY2_4_S), LBOUND(IP_ARRAY2_4_S(5:10,2:3)),
$ UBOUND(IP_ARRAY2_4_S), UBOUND(IP_ARRAY2_4_S(5:10,2:3)),
$ SIZE(IP_ARRAY2_4_S), SIZE(IP_ARRAY2_4_S(5:10,2:3)),
$ SHAPE(IP_ARRAY2_4_S(5:10,2:3)) /)
! end subroutine u_below
END MODULE U_above_TESTS
C:\gfortran>gfortran u_above.f
f951.exe: internal compiler error: in gfc_conv_array_initializer, at
fortran/tra
ns-array.c:4009
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: ICE with array inquiry functions above contains in
parameter expression
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=38914
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/38914] ICE with array inquiry functions above contains in parameter expression
2009-01-19 16:49 [Bug fortran/38914] New: ICE with array inquiry functions above contains in parameter expression dick dot hendrickson at gmail dot com
@ 2009-01-19 17:57 ` kargl at gcc dot gnu dot org
2009-01-19 19:47 ` mikael at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-01-19 17:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from kargl at gcc dot gnu dot org 2009-01-19 17:56 -------
Reduced testcase. This appears to be an array section problem
with lbound().
MODULE U_above_TESTS
INTEGER, PARAMETER, DIMENSION(0:20,4) :: IP_ARRAY2_4_S = 0
INTEGER, PARAMETER, DIMENSION(2) :: IP_ARRAY1_32_S =
$(/ LBOUND(IP_ARRAY2_4_S(5:10,2:3))/)
END MODULE U_above_TESTS
--
kargl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |4.2.5 4.3.3 4.4.0
Priority|P3 |P4
Last reconfirmed|0000-00-00 00:00:00 |2009-01-19 17:56:51
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38914
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/38914] ICE with array inquiry functions above contains in parameter expression
2009-01-19 16:49 [Bug fortran/38914] New: ICE with array inquiry functions above contains in parameter expression dick dot hendrickson at gmail dot com
2009-01-19 17:57 ` [Bug fortran/38914] " kargl at gcc dot gnu dot org
@ 2009-01-19 19:47 ` mikael at gcc dot gnu dot org
2009-01-26 9:11 ` tkoenig at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mikael at gcc dot gnu dot org @ 2009-01-19 19:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from mikael at gcc dot gnu dot org 2009-01-19 19:47 -------
the lbound should be simplified in simplify_bound even if the ARRAY argument is
not a full array.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38914
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/38914] ICE with array inquiry functions above contains in parameter expression
2009-01-19 16:49 [Bug fortran/38914] New: ICE with array inquiry functions above contains in parameter expression dick dot hendrickson at gmail dot com
2009-01-19 17:57 ` [Bug fortran/38914] " kargl at gcc dot gnu dot org
2009-01-19 19:47 ` mikael at gcc dot gnu dot org
@ 2009-01-26 9:11 ` tkoenig at gcc dot gnu dot org
2009-01-26 9:14 ` tkoenig at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2009-01-26 9:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from tkoenig at gcc dot gnu dot org 2009-01-26 09:11 -------
(In reply to comment #2)
> the lbound should be simplified in simplify_bound even if the ARRAY argument is
> not a full array.
>
Here's a tentative patch:
Index: simplify.c
===================================================================
--- simplify.c (revision 143655)
+++ simplify.c (working copy)
@@ -2251,6 +2251,8 @@ simplify_bound (gfc_expr *array, gfc_exp
continue;
case AR_FULL:
+ case AR_SECTION:
+
/* We're done because 'as' has already been set in the
previous iteration. */
if (!ref->next)
@@ -2258,7 +2260,6 @@ simplify_bound (gfc_expr *array, gfc_exp
/* Fall through. */
- case AR_SECTION:
case AR_UNKNOWN:
return NULL;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38914
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/38914] ICE with array inquiry functions above contains in parameter expression
2009-01-19 16:49 [Bug fortran/38914] New: ICE with array inquiry functions above contains in parameter expression dick dot hendrickson at gmail dot com
` (2 preceding siblings ...)
2009-01-26 9:11 ` tkoenig at gcc dot gnu dot org
@ 2009-01-26 9:14 ` tkoenig at gcc dot gnu dot org
2009-01-26 21:05 ` tkoenig at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2009-01-26 9:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from tkoenig at gcc dot gnu dot org 2009-01-26 09:14 -------
> Here's a tentative patch:
... which causes regressions.
Back to the drawing board.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38914
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/38914] ICE with array inquiry functions above contains in parameter expression
2009-01-19 16:49 [Bug fortran/38914] New: ICE with array inquiry functions above contains in parameter expression dick dot hendrickson at gmail dot com
` (3 preceding siblings ...)
2009-01-26 9:14 ` tkoenig at gcc dot gnu dot org
@ 2009-01-26 21:05 ` tkoenig at gcc dot gnu dot org
2009-01-26 22:50 ` tkoenig at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2009-01-26 21:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from tkoenig at gcc dot gnu dot org 2009-01-26 21:04 -------
Created an attachment (id=17186)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17186&action=view)
patch
Here's something that at least passes all the *bound* tests.
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |tkoenig at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38914
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/38914] ICE with array inquiry functions above contains in parameter expression
2009-01-19 16:49 [Bug fortran/38914] New: ICE with array inquiry functions above contains in parameter expression dick dot hendrickson at gmail dot com
` (4 preceding siblings ...)
2009-01-26 21:05 ` tkoenig at gcc dot gnu dot org
@ 2009-01-26 22:50 ` tkoenig at gcc dot gnu dot org
2009-02-21 22:25 ` tkoenig at gcc dot gnu dot org
2009-06-07 14:39 ` [Bug fortran/38914] [4.3 only] " tkoenig at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2009-01-26 22:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from tkoenig at gcc dot gnu dot org 2009-01-26 22:50 -------
> Here's something that at least passes all the *bound* tests.
Regression test passed - formal submission of the patch tomorrow,
probably.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38914
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/38914] ICE with array inquiry functions above contains in parameter expression
2009-01-19 16:49 [Bug fortran/38914] New: ICE with array inquiry functions above contains in parameter expression dick dot hendrickson at gmail dot com
` (5 preceding siblings ...)
2009-01-26 22:50 ` tkoenig at gcc dot gnu dot org
@ 2009-02-21 22:25 ` tkoenig at gcc dot gnu dot org
2009-06-07 14:39 ` [Bug fortran/38914] [4.3 only] " tkoenig at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2009-02-21 22:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from tkoenig at gcc dot gnu dot org 2009-02-21 22:25 -------
Subject: Bug 38914
Author: tkoenig
Date: Sat Feb 21 22:25:06 2009
New Revision: 144362
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144362
Log:
2008-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/38914
* array.c (ref_dimen_size): Rename to gfc_ref_dimen_size,
make global. Change function name in error messages.
(ref_size): Change ref_dimen_size to gfc_ref_dimen_size.
(gfc_array_ref_shape): Likewise.
* gfortran.h: Add prototype for gfc_ref_dimen_size.
* simplify.c (simplify_bound_dim): Add ref argument.
If the reference isn't a full array, return one for
the lower bound and the extent for the upper bound.
(simplify_bound): For array sections, take as from the
argument. Add reference to all to simplify_bound_dim.
2008-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/38914
* bound_simplification_2.f90: New test case.
* bound_7.f90: New test case.
Added:
trunk/gcc/testsuite/gfortran.dg/bound_7.f90
trunk/gcc/testsuite/gfortran.dg/bound_simplification_2.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/array.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/simplify.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38914
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/38914] [4.3 only] ICE with array inquiry functions above contains in parameter expression
2009-01-19 16:49 [Bug fortran/38914] New: ICE with array inquiry functions above contains in parameter expression dick dot hendrickson at gmail dot com
` (6 preceding siblings ...)
2009-02-21 22:25 ` tkoenig at gcc dot gnu dot org
@ 2009-06-07 14:39 ` tkoenig at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2009-06-07 14:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from tkoenig at gcc dot gnu dot org 2009-06-07 14:39 -------
I don't want to do any backport to 4.3 any more.
Closing.
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38914
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-06-07 14:39 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-19 16:49 [Bug fortran/38914] New: ICE with array inquiry functions above contains in parameter expression dick dot hendrickson at gmail dot com
2009-01-19 17:57 ` [Bug fortran/38914] " kargl at gcc dot gnu dot org
2009-01-19 19:47 ` mikael at gcc dot gnu dot org
2009-01-26 9:11 ` tkoenig at gcc dot gnu dot org
2009-01-26 9:14 ` tkoenig at gcc dot gnu dot org
2009-01-26 21:05 ` tkoenig at gcc dot gnu dot org
2009-01-26 22:50 ` tkoenig at gcc dot gnu dot org
2009-02-21 22:25 ` tkoenig at gcc dot gnu dot org
2009-06-07 14:39 ` [Bug fortran/38914] [4.3 only] " tkoenig 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).