public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/44565] New: [OOP] ICE in gimplify_expr when passing generic function as argument
@ 2010-06-17 10:26 boschmann at tp1 dot physik dot uni-siegen dot de
2010-06-17 11:07 ` [Bug fortran/44565] " dominiq at lps dot ens dot fr
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: boschmann at tp1 dot physik dot uni-siegen dot de @ 2010-06-17 10:26 UTC (permalink / raw)
To: gcc-bugs
module ice6
type :: lin_approx_cont_type
real,dimension(:),allocatable::values
contains
procedure::get_array
procedure::get_element
generic::get_something=>get_element,get_array
end type lin_approx_cont_type
contains
pure function get_element(this,index)
class(lin_approx_cont_type),intent(in)::this
integer,intent(in)::index
real::get_element
get_element=this%values(index)
end function get_element
pure function get_array(this)
class(lin_approx_cont_type),intent(in)::this
real,dimension(this%dim)::get_array
get_array=this%values
end function get_array
subroutine do_something(this)
class(lin_approx_cont_type),intent(in)::this
call really_do_something(this%get_something())
end subroutine do_something
subroutine really_do_something(array)
real,dimension(:),intent(in)::array
end subroutine really_do_something
end module ice6
compiling with GNU Fortran (GCC) 4.6.0 20100616 results in:
ice6.f03:35:0: interner Compiler-Fehler: in gimplify_expr, bei gimplify.c:7389
--
Summary: [OOP] ICE in gimplify_expr when passing generic function
as argument
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: boschmann at tp1 dot physik dot uni-siegen dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44565
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/44565] [OOP] ICE in gimplify_expr when passing generic function as argument
2010-06-17 10:26 [Bug fortran/44565] New: [OOP] ICE in gimplify_expr when passing generic function as argument boschmann at tp1 dot physik dot uni-siegen dot de
@ 2010-06-17 11:07 ` dominiq at lps dot ens dot fr
2010-06-17 22:24 ` [Bug fortran/44565] [4.6 Regression] " janus at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-06-17 11:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dominiq at lps dot ens dot fr 2010-06-17 11:07 -------
Confirmed on thrunk after having added
integer :: dim = 2
in 'type :: lin_approx_cont_type'. The modified code compile with 4.5.0, hence
a regression I can trace between revisions 158215 (working) and 158921 (ICE).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44565
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/44565] [4.6 Regression] [OOP] ICE in gimplify_expr when passing generic function as argument
2010-06-17 10:26 [Bug fortran/44565] New: [OOP] ICE in gimplify_expr when passing generic function as argument boschmann at tp1 dot physik dot uni-siegen dot de
2010-06-17 11:07 ` [Bug fortran/44565] " dominiq at lps dot ens dot fr
@ 2010-06-17 22:24 ` janus at gcc dot gnu dot org
2010-06-17 22:34 ` [Bug fortran/44565] [4.6 Regression] [OOP] ICE in gimplify_expr with array-valued generic TBP janus at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: janus at gcc dot gnu dot org @ 2010-06-17 22:24 UTC (permalink / raw)
To: gcc-bugs
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2010-06-17 22:24:27
date| |
Summary|[OOP] ICE in gimplify_expr |[4.6 Regression] [OOP] ICE
|when passing generic |in gimplify_expr when
|function as argument |passing generic function as
| |argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44565
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/44565] [4.6 Regression] [OOP] ICE in gimplify_expr with array-valued generic TBP
2010-06-17 10:26 [Bug fortran/44565] New: [OOP] ICE in gimplify_expr when passing generic function as argument boschmann at tp1 dot physik dot uni-siegen dot de
2010-06-17 11:07 ` [Bug fortran/44565] " dominiq at lps dot ens dot fr
2010-06-17 22:24 ` [Bug fortran/44565] [4.6 Regression] " janus at gcc dot gnu dot org
@ 2010-06-17 22:34 ` janus at gcc dot gnu dot org
2010-06-17 22:59 ` janus at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: janus at gcc dot gnu dot org @ 2010-06-17 22:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from janus at gcc dot gnu dot org 2010-06-17 22:34 -------
Reduced test case:
module ice6
type :: t
contains
procedure :: get_array
generic :: get_something => get_array
end type
contains
function get_array(this)
class(t) :: this
real,dimension(2) :: get_array
end function get_array
subroutine do_something(this)
class(t) :: this
print *,this%get_something()
end subroutine do_something
end module ice6
The problem is not related to passing the TBP as an argument, but the TBP has
to be generic and array-valued.
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.6 Regression] [OOP] ICE |[4.6 Regression] [OOP] ICE
|in gimplify_expr when |in gimplify_expr with array-
|passing generic function as |valued generic TBP
|argument |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44565
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/44565] [4.6 Regression] [OOP] ICE in gimplify_expr with array-valued generic TBP
2010-06-17 10:26 [Bug fortran/44565] New: [OOP] ICE in gimplify_expr when passing generic function as argument boschmann at tp1 dot physik dot uni-siegen dot de
` (2 preceding siblings ...)
2010-06-17 22:34 ` [Bug fortran/44565] [4.6 Regression] [OOP] ICE in gimplify_expr with array-valued generic TBP janus at gcc dot gnu dot org
@ 2010-06-17 22:59 ` janus at gcc dot gnu dot org
2010-06-24 21:35 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: janus at gcc dot gnu dot org @ 2010-06-17 22:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from janus at gcc dot gnu dot org 2010-06-17 22:59 -------
(In reply to comment #1)
> The modified code compile with 4.5.0, hence
> a regression I can trace between revisions 158215 (working) and 158921 (ICE).
The regression is most probably due to the merging of the fortran-dev branch:
r158910 | pault | 2010-04-29 21:10:48 +0200 (Thu, 29 Apr 2010) | 164 lines
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44565
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/44565] [4.6 Regression] [OOP] ICE in gimplify_expr with array-valued generic TBP
2010-06-17 10:26 [Bug fortran/44565] New: [OOP] ICE in gimplify_expr when passing generic function as argument boschmann at tp1 dot physik dot uni-siegen dot de
` (3 preceding siblings ...)
2010-06-17 22:59 ` janus at gcc dot gnu dot org
@ 2010-06-24 21:35 ` rguenth at gcc dot gnu dot org
2010-07-11 9:41 ` janus at gcc dot gnu dot org
2010-07-13 8:56 ` burnus at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-24 21:35 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44565
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/44565] [4.6 Regression] [OOP] ICE in gimplify_expr with array-valued generic TBP
2010-06-17 10:26 [Bug fortran/44565] New: [OOP] ICE in gimplify_expr when passing generic function as argument boschmann at tp1 dot physik dot uni-siegen dot de
` (4 preceding siblings ...)
2010-06-24 21:35 ` rguenth at gcc dot gnu dot org
@ 2010-07-11 9:41 ` janus at gcc dot gnu dot org
2010-07-13 8:56 ` burnus at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: janus at gcc dot gnu dot org @ 2010-07-11 9:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from janus at gcc dot gnu dot org 2010-07-11 09:41 -------
Mine. Patch coming soon.
--
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|NEW |ASSIGNED
Last reconfirmed|2010-06-17 22:24:27 |2010-07-11 09:41:26
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44565
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/44565] [4.6 Regression] [OOP] ICE in gimplify_expr with array-valued generic TBP
2010-06-17 10:26 [Bug fortran/44565] New: [OOP] ICE in gimplify_expr when passing generic function as argument boschmann at tp1 dot physik dot uni-siegen dot de
` (5 preceding siblings ...)
2010-07-11 9:41 ` janus at gcc dot gnu dot org
@ 2010-07-13 8:56 ` burnus at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-07-13 8:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from janus at gcc dot gnu dot org 2010-07-13 06:57 -------
Subject: Bug 44565
Author: janus
Date: Tue Jul 13 06:57:17 2010
New Revision: 162125
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162125
Log:
2010-07-13 Janus Weil <janus@gcc.gnu.org>
PR fortran/44434
PR fortran/44565
PR fortran/43945
PR fortran/44869
* gfortran.h (gfc_find_derived_vtab): Modified prototype.
* class.c (gfc_build_class_symbol): Modified call to
'gfc_find_derived_vtab'.
(add_proc_component): Removed, moved code into 'add_proc_comp'.
(add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
generics.
(add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
Removed treatment of generics.
(copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
Call 'add_proc_comp' instead of duplicating code.
(add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
and 'declared'.
(add_generic_specifics,add_generics_to_declared_vtab): Removed.
(gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
Removed treatment of generics.
* iresolve.c (gfc_resolve_extends_type_of): Modified call to
'gfc_find_derived_vtab'.
* resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
Removed treatment of generics.
(resolve_select_type,resolve_fl_derived): Modified call to
'gfc_find_derived_vtab'.
* trans-decl.c (gfc_get_symbol_decl): Ditto.
* trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
Ditto.
* trans-stmt.c (gfc_trans_allocate): Ditto.
2010-07-13 Janus Weil <janus@gcc.gnu.org>
PR fortran/44434
PR fortran/44565
PR fortran/43945
PR fortran/44869
* gfortran.dg/dynamic_dispatch_1.f03: Fixed invalid test case.
* gfortran.dg/dynamic_dispatch_2.f03: Ditto.
* gfortran.dg/dynamic_dispatch_3.f03: Ditto.
* gfortran.dh/typebound_call_16.f03: New.
* gfortran.dg/typebound_generic_6.f03: New.
* gfortran.dg/typebound_generic_7.f03: New.
* gfortran.dg/typebound_generic_8.f03: New.
Added:
trunk/gcc/testsuite/gfortran.dg/typebound_call_16.f03
trunk/gcc/testsuite/gfortran.dg/typebound_generic_6.f03
trunk/gcc/testsuite/gfortran.dg/typebound_generic_7.f03
trunk/gcc/testsuite/gfortran.dg/typebound_generic_8.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/class.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/iresolve.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/dynamic_dispatch_1.f03
trunk/gcc/testsuite/gfortran.dg/dynamic_dispatch_2.f03
trunk/gcc/testsuite/gfortran.dg/dynamic_dispatch_3.f03
------- Comment #6 from burnus at gcc dot gnu dot org 2010-07-13 08:56 -------
Close as FIXED. Thanks to Hans-Werner for the bug report and to Janus for the
patch!
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44565
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-07-13 8:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-17 10:26 [Bug fortran/44565] New: [OOP] ICE in gimplify_expr when passing generic function as argument boschmann at tp1 dot physik dot uni-siegen dot de
2010-06-17 11:07 ` [Bug fortran/44565] " dominiq at lps dot ens dot fr
2010-06-17 22:24 ` [Bug fortran/44565] [4.6 Regression] " janus at gcc dot gnu dot org
2010-06-17 22:34 ` [Bug fortran/44565] [4.6 Regression] [OOP] ICE in gimplify_expr with array-valued generic TBP janus at gcc dot gnu dot org
2010-06-17 22:59 ` janus at gcc dot gnu dot org
2010-06-24 21:35 ` rguenth at gcc dot gnu dot org
2010-07-11 9:41 ` janus at gcc dot gnu dot org
2010-07-13 8:56 ` burnus 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).