This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41580] [OOP] SAME_TYPE_AS and EXTENDS_TYPE_OF - add compile-time simplifcation
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 5 Jan 2011 12:16:42 +0000
- Subject: [Bug fortran/41580] [OOP] SAME_TYPE_AS and EXTENDS_TYPE_OF - add compile-time simplifcation
- Auto-submitted: auto-generated
- References: <bug-41580-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41580
--- Comment #4 from janus at gcc dot gnu.org 2011-01-05 12:16:33 UTC ---
(In reply to comment #2)
> For SAME_TYPE_AS and EXTENDS_TYPE_OF one should add a
> compile-time simplification to simplify.c.
> Currently, only the run-time version is implemented.
Well, currently the translation of SAME_TYPE_AS is done by
gfc_conv_same_type_as (trans-intrinsic.c), for both TYPE- and CLASS-valued
arguments.
Note: If both arguments are TYPE-valued, the result will be a compile-time
constant, otherwise it has to be evaluated at runtime, according to the _hash
values in the vtabs.
In which situations would we actually gain something by treating the TYPE-TYPE
case in simplify.c?