This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/60718] Test case gfortran.dg/select_type_4.f90 fails on ARM
- From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 Apr 2014 11:45:11 +0000
- Subject: [Bug fortran/60718] Test case gfortran.dg/select_type_4.f90 fails on ARM
- Auto-submitted: auto-generated
- References: <bug-60718-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60718
--- Comment #6 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
hmm,
gfc_build_class_symbol creates different types,
if a class has the allocatable, target or pointer attribute.
get_unique_hashed_string (tname, ts->u.derived);
if ((*as) && attr->allocatable)
sprintf (name, "__class_%s_%d_%da", tname, rank, (*as)->corank);
else if ((*as) && attr->pointer)
sprintf (name, "__class_%s_%d_%dp", tname, rank, (*as)->corank);
else if ((*as))
sprintf (name, "__class_%s_%d_%d", tname, rank, (*as)->corank);
else if (attr->pointer)
sprintf (name, "__class_%s_p", tname);
else if (attr->allocatable)
sprintf (name, "__class_%s_a", tname);
else
sprintf (name, "__class_%s", tname);
But the class(xxx), pointer is passed to class(xxx), target when
used as a procedure parameter. this makes one type alias another.
maybe the test case is wrong, passing one flavor of object to
another?
subroutine append_node (list, new_node)
!-- Append a node to a list.
!-- Caller is responsible for allocating the node.
!---------- interface.
type(list_type), intent(inout) :: list
- class(node_type), target :: new_node
+ class(node_type), pointer, intent(in) :: new_node
!---------- executable code.