public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32489] New: Endless loop when compiling
@ 2007-06-25 6:49 burnus at gcc dot gnu dot org
2007-06-25 6:50 ` [Bug fortran/32489] " burnus at gcc dot gnu dot org
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-25 6:49 UTC (permalink / raw)
To: gcc-bugs
The program compiles in 2 to 3 seconds with g95, f95 and sunf95; ifort needs 7
seconds.
gfortran I stopped after 2GB memory consumption after ~1 minute.
--
Summary: Endless loop when compiling
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
@ 2007-06-25 6:50 ` burnus at gcc dot gnu dot org
2007-06-25 6:58 ` pinskia at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-25 6:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2007-06-25 06:50 -------
Created an attachment (id=13781)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13781&action=view)
fft257.f90 test case
>From http://home.comcast.net/~kmbtib/
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
2007-06-25 6:50 ` [Bug fortran/32489] " burnus at gcc dot gnu dot org
@ 2007-06-25 6:58 ` pinskia at gcc dot gnu dot org
2007-06-25 8:03 ` burnus at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-25 6:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-06-25 06:58 -------
h1 =
(/(sum((/(exp(-2*pi*(0,1)*mod(k*L,N)/N)*h2(L),L=0,N-1)/)),k=0,N-1)/)
Seen this before ....
I think this is the same bug as something I filed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
2007-06-25 6:50 ` [Bug fortran/32489] " burnus at gcc dot gnu dot org
2007-06-25 6:58 ` pinskia at gcc dot gnu dot org
@ 2007-06-25 8:03 ` burnus at gcc dot gnu dot org
2008-01-11 20:22 ` pault at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-25 8:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2007-06-25 08:02 -------
> Seen this before ....
> I think this is the same bug as something I filed.
I found it (PR31301) after looking for closed bugs; it was marked as duplicate
of
PR31301.
*** This bug has been marked as a duplicate of 20923 ***
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-06-25 8:03 ` burnus at gcc dot gnu dot org
@ 2008-01-11 20:22 ` pault at gcc dot gnu dot org
2008-01-11 23:22 ` pault at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-11 20:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2008-01-11 19:12 -------
(In reply to comment #3)
Breaking up the expression for h1, thusly:
hh = (/(exp(-2*pi*(0,1)*mod(k*L,N)/N)*h2(L),L=0,N-1)/)
h1 = (/(sum(hh),k=0,N-1)/)
cures the problem.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-01-11 20:22 ` pault at gcc dot gnu dot org
@ 2008-01-11 23:22 ` pault at gcc dot gnu dot org
2008-01-12 0:24 ` dominiq at lps dot ens dot fr
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-11 23:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2008-01-11 22:01 -------
(In reply to comment #4)
Will 2.5s do you on amd64/Cygwin_nt?
Index: gcc/fortran/array.c
===================================================================
*** gcc/fortran/array.c (revision 131469)
--- gcc/fortran/array.c (working copy)
*************** gfc_expand_constructor (gfc_expr *e)
*** 1401,1406 ****
--- 1401,1409 ----
gfc_expr *f;
try rc;
+ if (!gfc_is_constant_expr (e))
+ return SUCCESS;
+
f = gfc_get_array_element (e, GFC_MAX_AC_EXPAND);
if (f != NULL)
{
...yet to be regtested but rather obvious.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-01-11 23:22 ` pault at gcc dot gnu dot org
@ 2008-01-12 0:24 ` dominiq at lps dot ens dot fr
2008-01-12 12:30 ` dominiq at lps dot ens dot fr
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-01-12 0:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dominiq at lps dot ens dot fr 2008-01-11 23:21 -------
With the patch there is a regression for the following tests:
[ibook-dhum] f90/bug% gfc
/opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/array_initializer_1.f90
/opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/array_initializer_1.f90:13.30:
real, parameter :: r(6) = (/(x(i:i +1, i), i = 1,3)/)
1
Error: Invalid character in name at (1)
/opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/array_initializer_1.f90:14.31:
real, parameter :: s(12) = (/((x(i, i:j-1:-1), i = 3,4), j = 2,3)/)
1
Error: Invalid character in name at (1)
and
[ibook-dhum] f90/bug% gfc
/opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/char_result_5.f90
/opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/char_result_5.f90:93: internal
compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-01-12 0:24 ` dominiq at lps dot ens dot fr
@ 2008-01-12 12:30 ` dominiq at lps dot ens dot fr
2008-01-12 12:37 ` pault at gcc dot gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-01-12 12:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from dominiq at lps dot ens dot fr 2008-01-12 09:19 -------
I forgot to say that the patch in #5 fixed this PR, but you can add to the list
of regressions:
[ibook-dhum] f90/bug% gfc
/opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/char_result_6.f90
/opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/char_result_6.f90:63: internal
compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
` (6 preceding siblings ...)
2008-01-12 12:30 ` dominiq at lps dot ens dot fr
@ 2008-01-12 12:37 ` pault at gcc dot gnu dot org
2009-12-08 20:32 ` [Bug fortran/32489] Endless loop when compiling - middle-end? jvdelisle at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-01-12 12:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pault at gcc dot gnu dot org 2008-01-12 09:43 -------
(In reply to comment #4)
Dominique,
Indeed - I found all those regressions when I got up this morning. However,
the patch indicates which way to go. The compiler is repeatedly trying to
expand an array that it cannot. I need to write an equivalent to
gfc_is_constant_expr that will test if the array can be expanded or not.
Thanks!
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling - middle-end?
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
` (7 preceding siblings ...)
2008-01-12 12:37 ` pault at gcc dot gnu dot org
@ 2009-12-08 20:32 ` jvdelisle at gcc dot gnu dot org
2009-12-10 8:23 ` burnus at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-12-08 20:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jvdelisle at gcc dot gnu dot org 2009-12-08 20:32 -------
This really is not a duplicate of PR20923. In fact the gfortran frontend makes
it through the fft257.f90 test case in a few seconds. The memory hogging and
cycling is happening in middle-end.
With a simple variation of the patch in comment #5, I am able to achieve the
2.5 second compilation with only one regression. I am not sure there is a way
to discern the difference between the fft257.f90 and array_constructor_20.f90.
The difference being one has the initialization has a parameter and the other
not. I plan to explore further and report back here.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Keywords|ice-on-valid-code |compile-time-hog
Resolution|DUPLICATE |
Summary|Endless loop when compiling |Endless loop when compiling
| |- middle-end?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling - middle-end?
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
` (8 preceding siblings ...)
2009-12-08 20:32 ` [Bug fortran/32489] Endless loop when compiling - middle-end? jvdelisle at gcc dot gnu dot org
@ 2009-12-10 8:23 ` burnus at gcc dot gnu dot org
2009-12-10 20:12 ` jvdelisle at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-12-10 8:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from burnus at gcc dot gnu dot org 2009-12-10 08:23 -------
Cf. http://gcc.gnu.org/ml/fortran/2009-12/msg00062.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling - middle-end?
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
` (9 preceding siblings ...)
2009-12-10 8:23 ` burnus at gcc dot gnu dot org
@ 2009-12-10 20:12 ` jvdelisle at gcc dot gnu dot org
2010-01-09 17:47 ` jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-12-10 20:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jvdelisle at gcc dot gnu dot org 2009-12-10 20:11 -------
Tobias, thanks for posting the link to the patch. I want to make sure we can
build cp2k with this and if anyone has any other large apps, I want to make
sure we don;t regress. Maybe weather modeling and such. :)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling - middle-end?
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
` (10 preceding siblings ...)
2009-12-10 20:12 ` jvdelisle at gcc dot gnu dot org
@ 2010-01-09 17:47 ` jvdelisle at gcc dot gnu dot org
2010-01-09 18:31 ` jvdelisle at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-01-09 17:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from jvdelisle at gcc dot gnu dot org 2010-01-09 17:47 -------
Subject: Bug 32489
Author: jvdelisle
Date: Sat Jan 9 17:47:04 2010
New Revision: 155769
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155769
Log:
2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/20923
PR fortran/32489
* trans-array.c (gfc_conv_array_initializer): Change call to
gfc_error_now to call to gfc_fatal_error.
* array.c (count_elements): Whitespace. (extract_element): Whitespace.
(is_constant_element): Changed name from constant_element.
(gfc_constant_ac): Only use expand_construuctor for expression
types of EXPR_ARRAY. If expression type is EXPR_CONSTANT, no need to
call gfc_is_constant_expr.
* expr.c (gfc_reduce_init_expr): Adjust conditionals and delete error
message.
* resolve.c (gfc_is_expandable_expr): New function that determiners if
array expressions should have their constructors expanded.
(gfc_resolve_expr): Use new function to determine whether or not to
call
gfc_expand_constructor.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/array.c
trunk/gcc/fortran/expr.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-array.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling - middle-end?
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
` (11 preceding siblings ...)
2010-01-09 17:47 ` jvdelisle at gcc dot gnu dot org
@ 2010-01-09 18:31 ` jvdelisle at gcc dot gnu dot org
2010-01-09 19:02 ` jvdelisle at gcc dot gnu dot org
2010-01-14 3:02 ` jvdelisle at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-01-09 18:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from jvdelisle at gcc dot gnu dot org 2010-01-09 18:31 -------
Subject: Bug 32489
Author: jvdelisle
Date: Sat Jan 9 18:31:00 2010
New Revision: 155772
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155772
Log:
2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/32489
* gfortran.dg/array_constructor_33.f90: New test.
gfortran.dg/array_function_5.f90: Add credit.
Added:
trunk/gcc/testsuite/gfortran.dg/array_constructor_33.f90
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/array_function_5.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling - middle-end?
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
` (12 preceding siblings ...)
2010-01-09 18:31 ` jvdelisle at gcc dot gnu dot org
@ 2010-01-09 19:02 ` jvdelisle at gcc dot gnu dot org
2010-01-14 3:02 ` jvdelisle at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-01-09 19:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from jvdelisle at gcc dot gnu dot org 2010-01-09 19:01 -------
Subject: Bug 32489
Author: jvdelisle
Date: Sat Jan 9 19:01:41 2010
New Revision: 155773
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155773
Log:
2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/32489
* gfortran.dg/array_constructor_33.f90: New test.
PR fortran/20923
Fix ChangeLog entry.
Added:
trunk/gcc/testsuite/gfortran.dg/array_constructor_34.f90
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32489] Endless loop when compiling - middle-end?
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
` (13 preceding siblings ...)
2010-01-09 19:02 ` jvdelisle at gcc dot gnu dot org
@ 2010-01-14 3:02 ` jvdelisle at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-01-14 3:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from jvdelisle at gcc dot gnu dot org 2010-01-14 03:02 -------
Fixed on trunk.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32489
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2010-01-14 3:02 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-25 6:49 [Bug fortran/32489] New: Endless loop when compiling burnus at gcc dot gnu dot org
2007-06-25 6:50 ` [Bug fortran/32489] " burnus at gcc dot gnu dot org
2007-06-25 6:58 ` pinskia at gcc dot gnu dot org
2007-06-25 8:03 ` burnus at gcc dot gnu dot org
2008-01-11 20:22 ` pault at gcc dot gnu dot org
2008-01-11 23:22 ` pault at gcc dot gnu dot org
2008-01-12 0:24 ` dominiq at lps dot ens dot fr
2008-01-12 12:30 ` dominiq at lps dot ens dot fr
2008-01-12 12:37 ` pault at gcc dot gnu dot org
2009-12-08 20:32 ` [Bug fortran/32489] Endless loop when compiling - middle-end? jvdelisle at gcc dot gnu dot org
2009-12-10 8:23 ` burnus at gcc dot gnu dot org
2009-12-10 20:12 ` jvdelisle at gcc dot gnu dot org
2010-01-09 17:47 ` jvdelisle at gcc dot gnu dot org
2010-01-09 18:31 ` jvdelisle at gcc dot gnu dot org
2010-01-09 19:02 ` jvdelisle at gcc dot gnu dot org
2010-01-14 3:02 ` jvdelisle 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).