public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41106] New: [F03] Procedure Pointers with CHARACTER results
@ 2009-08-18 14:35 janus at gcc dot gnu dot org
2009-08-20 15:12 ` [Bug fortran/41106] " janus at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-08-18 14:35 UTC (permalink / raw)
To: gcc-bugs
There are some problems with CHARACTER-valued procedure pointers (and procedure
pointer components).
First example (with PPCs):
module m
type :: t
procedure(character(len=5)), pointer, nopass :: ptr
end type
contains
function abc()
character(len=5) :: abc
abc = 'abcde'
end function abc
end module m
use m
type(t) :: x
character(len=5) :: str
x%ptr => abc
str = x%ptr()
end
gives the error:
test.f90:12:0: internal compiler error: in gfc_conv_component_ref, at
fortran/trans-expr.c:477
Second example (similar, but with simple procedure pointers):
procedure(character(len=5)), pointer :: pp
pp => abc
contains
function abc()
character(len=5) :: abc
abc = 'abcde'
end function abc
end
gives:
internal compiler error: in gfc_trans_pointer_assignment, at
fortran/trans-expr.c:4237
--
Summary: [F03] Procedure Pointers with CHARACTER results
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41106
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/41106] [F03] Procedure Pointers with CHARACTER results
2009-08-18 14:35 [Bug fortran/41106] New: [F03] Procedure Pointers with CHARACTER results janus at gcc dot gnu dot org
@ 2009-08-20 15:12 ` janus at gcc dot gnu dot org
2009-08-21 9:43 ` janus at gcc dot gnu dot org
2009-08-21 12:17 ` janus at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-08-20 15:12 UTC (permalink / raw)
To: gcc-bugs
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-08-20 15:12:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41106
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/41106] [F03] Procedure Pointers with CHARACTER results
2009-08-18 14:35 [Bug fortran/41106] New: [F03] Procedure Pointers with CHARACTER results janus at gcc dot gnu dot org
2009-08-20 15:12 ` [Bug fortran/41106] " janus at gcc dot gnu dot org
@ 2009-08-21 9:43 ` janus at gcc dot gnu dot org
2009-08-21 12:17 ` janus at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-08-21 9:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from janus at gcc dot gnu dot org 2009-08-21 09:43 -------
Subject: Bug 41106
Author: janus
Date: Fri Aug 21 09:43:04 2009
New Revision: 150987
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150987
Log:
2009-08-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/41106
* primary.c (gfc_variable_attr): Make it work also on EXPR_FUNCTION.
(gfc_expr_attr): Use gfc_variable_attr for procedure pointer
components.
* resolve.c (resolve_fl_derived): Handle CHARACTER-valued procedure
pointer components.
* trans-expr.c (gfc_conv_component_ref): Ditto.
(gfc_conv_variable): Ditto.
(gfc_conv_procedure_call): Ditto.
(gfc_trans_pointer_assignment): Ditto.
* trans-types.c (gfc_get_derived_type): Ditto.
2009-08-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/41106
* gfortran.dg/proc_ptr_23.f90: New.
* gfortran.dg/proc_ptr_comp_15.f90: New.
* gfortran.dg/proc_ptr_comp_16.f90: New.
* gfortran.dg/proc_ptr_comp_17.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/proc_ptr_23.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_15.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_16.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_17.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/primary.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-types.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41106
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/41106] [F03] Procedure Pointers with CHARACTER results
2009-08-18 14:35 [Bug fortran/41106] New: [F03] Procedure Pointers with CHARACTER results janus at gcc dot gnu dot org
2009-08-20 15:12 ` [Bug fortran/41106] " janus at gcc dot gnu dot org
2009-08-21 9:43 ` janus at gcc dot gnu dot org
@ 2009-08-21 12:17 ` janus at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-08-21 12:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from janus at gcc dot gnu dot org 2009-08-21 12:17 -------
Fixed with r150987. Closing.
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41106
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-08-21 12:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-18 14:35 [Bug fortran/41106] New: [F03] Procedure Pointers with CHARACTER results janus at gcc dot gnu dot org
2009-08-20 15:12 ` [Bug fortran/41106] " janus at gcc dot gnu dot org
2009-08-21 9:43 ` janus at gcc dot gnu dot org
2009-08-21 12:17 ` janus 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).