* [Bug fortran/28890] ICE on write
2006-08-29 16:53 [Bug fortran/28890] New: ICE on write pogo_tomcat at yahoo dot com
@ 2006-08-29 21:26 ` pault at gcc dot gnu dot org
2006-08-30 4:46 ` pault at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-29 21:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pault at gcc dot gnu dot org 2006-08-29 21:26 -------
Confirmed: changing the substring reference to the unambiguous
write (*,*) i, charr(i:i)
gets rid of the problem. Apparently, vene though charr is scalar, the
reference is being interpreted as an array reference.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-08-29 21:26:24
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28890
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/28890] ICE on write
2006-08-29 16:53 [Bug fortran/28890] New: ICE on write pogo_tomcat at yahoo dot com
2006-08-29 21:26 ` [Bug fortran/28890] " pault at gcc dot gnu dot org
@ 2006-08-30 4:46 ` pault at gcc dot gnu dot org
2006-08-30 13:12 ` paul dot richard dot thomas at cea dot fr
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-30 4:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pault at gcc dot gnu dot org 2006-08-30 04:46 -------
(In reply to comment #1)
> Confirmed: changing the substring reference to the unambiguous
> write (*,*) i, charr(i:i)
> gets rid of the problem. Apparently, vene though charr is scalar, the
> reference is being interpreted as an array reference.
>
> Paul
>
Cooh! Not only was I full of bulls**t last night but had gone sydlexic too!
charr(i:i) is, of course, no more unambiguous than charr(i), except,
apparently, in the bowels of gfortran!
In fact, using -fdump-parse-tree, I find that charr(i) is being taken as a
character function reference. It must be easy enough to put paid to that...
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28890
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/28890] ICE on write
2006-08-29 16:53 [Bug fortran/28890] New: ICE on write pogo_tomcat at yahoo dot com
2006-08-29 21:26 ` [Bug fortran/28890] " pault at gcc dot gnu dot org
2006-08-30 4:46 ` pault at gcc dot gnu dot org
@ 2006-08-30 13:12 ` paul dot richard dot thomas at cea dot fr
2006-09-05 19:40 ` pault at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2006-08-30 13:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from paul dot richard dot thomas at cea dot fr 2006-08-30 13:11 -------
(In reply to comment #2)
The standard is unambiguous: A string element must be written as charr(i:i).
character(*) :: charr
.....
print *, charr(i)
will always be interpreted as a call to an assumed character length function
charr, which is allowed if charr is a dummy function.
As to its being easy... *sigh* we'll see!
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28890
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/28890] ICE on write
2006-08-29 16:53 [Bug fortran/28890] New: ICE on write pogo_tomcat at yahoo dot com
` (2 preceding siblings ...)
2006-08-30 13:12 ` paul dot richard dot thomas at cea dot fr
@ 2006-09-05 19:40 ` pault at gcc dot gnu dot org
2006-09-11 5:03 ` pault at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-09-05 19:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2006-09-05 19:40 -------
A patch is ready but I have not had time to post it.
Watch the list this weekend.
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|2006-08-29 21:26:24 |2006-09-05 19:40:51
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28890
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/28890] ICE on write
2006-08-29 16:53 [Bug fortran/28890] New: ICE on write pogo_tomcat at yahoo dot com
` (3 preceding siblings ...)
2006-09-05 19:40 ` pault at gcc dot gnu dot org
@ 2006-09-11 5:03 ` pault at gcc dot gnu dot org
2006-09-11 8:15 ` paul dot richard dot thomas at cea dot fr
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-09-11 5:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2006-09-11 05:03 -------
Subject: Bug 28890
Author: pault
Date: Mon Sep 11 05:02:58 2006
New Revision: 116839
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116839
Log:
2006-09-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28890
trans-expr.c (gfc_conv_function_call): Obtain the string length
of a dummy character(*) function from the symbol if it is not
already translated. For a call to a character(*) function, use
the passed, hidden string length argument, which is available
from the backend_decl of the formal argument.
resolve.c (resolve_function): It is an error if a function call
to a character(*) function is other than a dummy procedure or
an intrinsic.
2006-09-11 Paul Thomas <pault@gcc.gnu.org>
PR libfortran/28890
gfortran.dg/assumed_charlen_function_5.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/assumed_charlen_function_5.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28890
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/28890] ICE on write
2006-08-29 16:53 [Bug fortran/28890] New: ICE on write pogo_tomcat at yahoo dot com
` (4 preceding siblings ...)
2006-09-11 5:03 ` pault at gcc dot gnu dot org
@ 2006-09-11 8:15 ` paul dot richard dot thomas at cea dot fr
2006-09-12 4:37 ` pault at gcc dot gnu dot org
2006-09-12 4:38 ` pault at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2006-09-11 8:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from paul dot richard dot thomas at cea dot fr 2006-09-11 08:15 -------
The patch did not apply cleanly to 4.1; I will take a look tonight to try to
understand why.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28890
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/28890] ICE on write
2006-08-29 16:53 [Bug fortran/28890] New: ICE on write pogo_tomcat at yahoo dot com
` (5 preceding siblings ...)
2006-09-11 8:15 ` paul dot richard dot thomas at cea dot fr
@ 2006-09-12 4:37 ` pault at gcc dot gnu dot org
2006-09-12 4:38 ` pault at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-09-12 4:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pault at gcc dot gnu dot org 2006-09-12 04:37 -------
Subject: Bug 28890
Author: pault
Date: Tue Sep 12 04:37:09 2006
New Revision: 116871
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116871
Log:
2006-09-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28890
trans-expr.c (gfc_conv_function_call): Obtain the string length
of a dummy character(*) function from the symbol if it is not
already translated. For a call to a character(*) function, use
the passed, hidden string length argument, which is available
from the backend_decl of the formal argument.
resolve.c (resolve_function): It is an error if a function call
to a character(*) function is other than a dummy procedure or
an intrinsic.
2006-09-12 Paul Thomas <pault@gcc.gnu.org>
PR libfortran/28890
gfortran.dg/assumed_charlen_function_5.f90: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_function_5.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/resolve.c
branches/gcc-4_1-branch/gcc/fortran/trans-expr.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28890
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/28890] ICE on write
2006-08-29 16:53 [Bug fortran/28890] New: ICE on write pogo_tomcat at yahoo dot com
` (6 preceding siblings ...)
2006-09-12 4:37 ` pault at gcc dot gnu dot org
@ 2006-09-12 4:38 ` pault at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-09-12 4:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pault at gcc dot gnu dot org 2006-09-12 04:38 -------
Fixed on trunk and 4.1
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=28890
^ permalink raw reply [flat|nested] 9+ messages in thread