public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/29507] New: INDEX in an array initialization causes ICE
@ 2006-10-18 20:46 kargl at gcc dot gnu dot org
2006-10-19 12:50 ` [Bug fortran/29507] " patchapp at dberlin dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: kargl at gcc dot gnu dot org @ 2006-10-18 20:46 UTC (permalink / raw)
To: gcc-bugs
This code:
module z
character(8), parameter :: a(1:3)=(/'nint() ', 'log10() ', 'sqrt() '/)
integer, parameter :: b(1:3) = index(a, '(')
end module z
causes
troutmask:sgk[415] gfc4x -o z z.f90
z.f90:0: internal compiler error: in gfc_conv_array_initializer, at
fortran/trans-array.c:3470
--
Summary: INDEX in an array initialization causes ICE
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kargl at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29507
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/29507] INDEX in an array initialization causes ICE
2006-10-18 20:46 [Bug fortran/29507] New: INDEX in an array initialization causes ICE kargl at gcc dot gnu dot org
@ 2006-10-19 12:50 ` patchapp at dberlin dot org
2006-10-22 5:01 ` pault at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: patchapp at dberlin dot org @ 2006-10-19 12:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from patchapp at dberlin dot org 2006-10-19 12:50 -------
Subject: Bug number PR29507
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-10/msg00984.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29507
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/29507] INDEX in an array initialization causes ICE
2006-10-18 20:46 [Bug fortran/29507] New: INDEX in an array initialization causes ICE kargl at gcc dot gnu dot org
2006-10-19 12:50 ` [Bug fortran/29507] " patchapp at dberlin dot org
@ 2006-10-22 5:01 ` pault at gcc dot gnu dot org
2006-10-23 10:02 ` pault at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-10-22 5:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pault at gcc dot gnu dot org 2006-10-22 05:01 -------
I have a general fix, in place of that of #1, more or less working. It'll be a
day or two yet before it's ready for exposure.
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|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-10-22 05:01:27
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29507
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/29507] INDEX in an array initialization causes ICE
2006-10-18 20:46 [Bug fortran/29507] New: INDEX in an array initialization causes ICE kargl at gcc dot gnu dot org
2006-10-19 12:50 ` [Bug fortran/29507] " patchapp at dberlin dot org
2006-10-22 5:01 ` pault at gcc dot gnu dot org
@ 2006-10-23 10:02 ` pault at gcc dot gnu dot org
2007-02-16 18:22 ` pault at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-10-23 10:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pault at gcc dot gnu dot org 2006-10-23 10:02 -------
Created an attachment (id=12479)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12479&action=view)
Provisional general fix for the PR
This patch fixes the the following:
real, parameter :: a(2,2) = reshape ((/1.0, 2.0, 3.0, 4.0/), (/2,2/))
real, parameter :: b(2,2) = sin (a)
character(6), parameter :: ch(3) = (/"animal", "person", "mantee"/)
character(1), parameter :: ch2(3) = (/"n", "r", "t"/)
integer, parameter :: i(3) = index (ch, ch2)
print *, a, b
print *, ch, i
end
There are still several things to do:
(i) Understand why *e needs to be copied to old and then freed; ideally, *e
should be assigned to old and expr assigned to it, at exit;
(ii) Add conformance checks;
(iii) Check if the branch to the new function is in the correct place - it is
certainly the earliest opportunity to identify an elemental intrinsic; and
(iv) Check that none of the non-elemental intrinsics are screwed up.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29507
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/29507] INDEX in an array initialization causes ICE
2006-10-18 20:46 [Bug fortran/29507] New: INDEX in an array initialization causes ICE kargl at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-10-23 10:02 ` pault at gcc dot gnu dot org
@ 2007-02-16 18:22 ` pault at gcc dot gnu dot org
2007-03-16 15:04 ` fxcoudert at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-02-16 18:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2007-02-16 18:22 -------
Thanks for the reminder - I had not forgotten. I am trying to work my way
through the list with very limited time. I'll get there though!
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29507
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/29507] INDEX in an array initialization causes ICE
2006-10-18 20:46 [Bug fortran/29507] New: INDEX in an array initialization causes ICE kargl at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-02-16 18:22 ` pault at gcc dot gnu dot org
@ 2007-03-16 15:04 ` fxcoudert at gcc dot gnu dot org
2007-04-04 7:19 ` pault at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-03-16 15:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from fxcoudert at gcc dot gnu dot org 2007-03-16 15:04 -------
(In reply to comment #3)
Since this bug is related to PR31221, I tried your patch on the other testcase,
and it fails:
$ cat a.f90
integer, parameter :: i2(1)=MODULO((/1/),5)
call foo(i2)
end
$ gfortran a.f90
a.f90:1.45:
integer, parameter :: i2(1)=MODULO((/1/),5)
1
Internal Error at (1):
check_init_expr(): Unknown expression type
I don't know if it exposes another bug or exposes something missing in your
patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29507
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/29507] INDEX in an array initialization causes ICE
2006-10-18 20:46 [Bug fortran/29507] New: INDEX in an array initialization causes ICE kargl at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-03-16 15:04 ` fxcoudert at gcc dot gnu dot org
@ 2007-04-04 7:19 ` pault at gcc dot gnu dot org
2007-04-04 15:15 ` pault at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-04-04 7:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pault at gcc dot gnu dot org 2007-04-04 08:19 -------
1
> Internal Error at (1):
> check_init_expr(): Unknown expression type
> I don't know if it exposes another bug or exposes something missing in your
> patch.
FX,
I have just returned to this and associated PRs. As noted originally, there are
some perplexing problems with the first attempt at a patch. In my first
attempts last night, I made the problems even more perplexing. Hanging
diagnostic output on the patched stretch of code changes its behaviour! This
time, I am going to stick with this one until it is fixed.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29507
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/29507] INDEX in an array initialization causes ICE
2006-10-18 20:46 [Bug fortran/29507] New: INDEX in an array initialization causes ICE kargl at gcc dot gnu dot org
` (5 preceding siblings ...)
2007-04-04 7:19 ` pault at gcc dot gnu dot org
@ 2007-04-04 15:15 ` pault at gcc dot gnu dot org
2007-04-05 12:05 ` patchapp at dberlin dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-04-04 15:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pault at gcc dot gnu dot org 2007-04-04 16:15 -------
Created an attachment (id=13328)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13328&action=view)
A better fix for the PR
This version of the patch has been moved to expr.c. It seems that PR29507,
PR31211 and PR31404 are all fixed. PR29397 is due to something else. I will
have a look as soon as I have this one finished.
It needs:
(i) Checking for memory leaks - I do not think that the expressions are being
cleaned up properly;
(ii) A rudimentary conformance check is need. gfc_conformance_check segfaults
on some of the expressions; and
(iii) I need to check what happens with implicit loop array constructors.
Anyway, this patch is halfway through regtesting, as I write, and is doing
fine.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #12479|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29507
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/29507] INDEX in an array initialization causes ICE
2006-10-18 20:46 [Bug fortran/29507] New: INDEX in an array initialization causes ICE kargl at gcc dot gnu dot org
` (6 preceding siblings ...)
2007-04-04 15:15 ` pault at gcc dot gnu dot org
@ 2007-04-05 12:05 ` patchapp at dberlin dot org
2007-04-14 14:10 ` pault at gcc dot gnu dot org
2007-04-15 12:08 ` [Bug fortran/29507] [4.2 only] " pault at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: patchapp at dberlin dot org @ 2007-04-05 12:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from patchapp at dberlin dot org 2007-04-05 13:05 -------
Subject: Bug number PR29507
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg00170.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29507
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/29507] INDEX in an array initialization causes ICE
2006-10-18 20:46 [Bug fortran/29507] New: INDEX in an array initialization causes ICE kargl at gcc dot gnu dot org
` (7 preceding siblings ...)
2007-04-05 12:05 ` patchapp at dberlin dot org
@ 2007-04-14 14:10 ` pault at gcc dot gnu dot org
2007-04-15 12:08 ` [Bug fortran/29507] [4.2 only] " pault at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-04-14 14:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pault at gcc dot gnu dot org 2007-04-14 15:10 -------
Subject: Bug 29507
Author: pault
Date: Sat Apr 14 15:09:57 2007
New Revision: 123815
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123815
Log:
2007-04-14 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29507
PR fortran/31404
* expr.c (scalarize_intrinsic_call): New function to
scalarize elemental intrinsic functions in initialization
expressions.
(check_init_expr): Detect elemental intrinsic functions
in initalization expressions and call previous.
2007-04-14 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29507
PR fortran/31404
* gfortran.dg/initialization_6.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/initialization_6.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/expr.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29507
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/29507] [4.2 only] INDEX in an array initialization causes ICE
2006-10-18 20:46 [Bug fortran/29507] New: INDEX in an array initialization causes ICE kargl at gcc dot gnu dot org
` (8 preceding siblings ...)
2007-04-14 14:10 ` pault at gcc dot gnu dot org
@ 2007-04-15 12:08 ` pault at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-04-15 12:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from pault at gcc dot gnu dot org 2007-04-15 13:08 -------
Fixed on trunk
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Summary|INDEX in an array |[4.2 only] INDEX in an array
|initialization causes ICE |initialization causes ICE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29507
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-04-15 12:08 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-18 20:46 [Bug fortran/29507] New: INDEX in an array initialization causes ICE kargl at gcc dot gnu dot org
2006-10-19 12:50 ` [Bug fortran/29507] " patchapp at dberlin dot org
2006-10-22 5:01 ` pault at gcc dot gnu dot org
2006-10-23 10:02 ` pault at gcc dot gnu dot org
2007-02-16 18:22 ` pault at gcc dot gnu dot org
2007-03-16 15:04 ` fxcoudert at gcc dot gnu dot org
2007-04-04 7:19 ` pault at gcc dot gnu dot org
2007-04-04 15:15 ` pault at gcc dot gnu dot org
2007-04-05 12:05 ` patchapp at dberlin dot org
2007-04-14 14:10 ` pault at gcc dot gnu dot org
2007-04-15 12:08 ` [Bug fortran/29507] [4.2 only] " 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).