public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/57126] New: Wrongly rejects a generic call because it doesn't match the intrinsic while another specific matches
@ 2013-04-30 16:36 burnus at gcc dot gnu.org
  2013-04-30 16:44 ` [Bug fortran/57126] Matching host-associated generic vs. same-named use-associated generic burnus at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-04-30 16:36 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57126

             Bug #: 57126
           Summary: Wrongly rejects a generic call because it doesn't
                    match the intrinsic while another specific matches
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


Created attachment 29984
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29984
Test case

Reported by Roger Ferrer Ibáñez at
https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.fortran/y31DDXAXNAE

The attached test case is accepted by NAG f95 (5.1) and by IBM XLF (12.1). But
gfortran rejects it with:

            Y = RENAME(M=Y)
                1
Error: Generic function 'size' at (1) is not consistent with a specific
intrinsic interface

            X = RENAME(A=X)
                1
Error: Generic function 'size' at (1) is not consistent with a specific
intrinsic interface


(Intel ifort 13.1.0 only rejects "X = RENAME(A=X)".)
>From gcc-bugs-return-421300-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Apr 30 16:39:41 2013
Return-Path: <gcc-bugs-return-421300-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7977 invoked by alias); 30 Apr 2013 16:39:41 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 7922 invoked by uid 48); 30 Apr 2013 16:39:38 -0000
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/57117] [OOP] ICE for sourced allocation of a polymorphic entity using TRANSPOSE
Date: Tue, 30 Apr 2013 16:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dominiq at lps dot ens.fr
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57117-4-8yJmzapp2d@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57117-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57117-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg02445.txt.bz2
Content-length: 478


http://gcc.gnu.org/bugzilla/show_bug.cgi?idW117

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-04-30 16:39:38 UTC ---
Reduced test for RESHAPE:

  implicit none

  type :: ti
  end type

  class(ti), allocatable :: x(:,:), z(:)

  allocate(z(9), source=reshape(x, (/ 9 /)))

end

pr57117_2.f90:8:0: internal compiler error: in gfc_conv_procedure_call, at
fortran/trans-expr.c:4902
   allocate(z(9), source=reshape(x, (/ 9 /)))


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/57126] Matching host-associated generic vs. same-named use-associated generic
  2013-04-30 16:36 [Bug fortran/57126] New: Wrongly rejects a generic call because it doesn't match the intrinsic while another specific matches burnus at gcc dot gnu.org
@ 2013-04-30 16:44 ` burnus at gcc dot gnu.org
  2013-04-30 16:51 ` burnus at gcc dot gnu.org
  2015-10-09 21:45 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-04-30 16:44 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57126

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org
            Summary|Wrongly rejects a generic   |Matching host-associated
                   |call because it doesn't     |generic vs. same-named
                   |match the intrinsic while   |use-associated generic
                   |another specific matches    |

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-30 16:44:36 UTC ---
For clarification:

- ABS and SIZE are both generic names, either having an intrinsic and a user
specific procedure.
- In "sub", the specific functions of "SIZE" do not match the rejected calls.
- The specific functions of "ABS" do match - and both have the same generic
name

See:
    USE MOO, ONLY: RENAME => ABS
    CONTAINS
        SUBROUTINE SUB
            USE MOO, ONLY: RENAME => SIZE, T


Thus, the question is whether the generic "rename" are merged or whether the
inner "rename" overrides the host-associated "rename".

If they are merged, the question is how ambiguity is handled.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/57126] Matching host-associated generic vs. same-named use-associated generic
  2013-04-30 16:36 [Bug fortran/57126] New: Wrongly rejects a generic call because it doesn't match the intrinsic while another specific matches burnus at gcc dot gnu.org
  2013-04-30 16:44 ` [Bug fortran/57126] Matching host-associated generic vs. same-named use-associated generic burnus at gcc dot gnu.org
@ 2013-04-30 16:51 ` burnus at gcc dot gnu.org
  2015-10-09 21:45 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-04-30 16:51 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57126

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-30 16:51:05 UTC ---
Fortran 2008, "16.5.1.4 Host association" has:

"If an entity that is accessed by use association has the same nongeneric name
as a host entity, the host entity is inaccessible by that name."

Thus, the generic name has to be pulled be merged - and also be honoured for
ambiguity resolution.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/57126] Matching host-associated generic vs. same-named use-associated generic
  2013-04-30 16:36 [Bug fortran/57126] New: Wrongly rejects a generic call because it doesn't match the intrinsic while another specific matches burnus at gcc dot gnu.org
  2013-04-30 16:44 ` [Bug fortran/57126] Matching host-associated generic vs. same-named use-associated generic burnus at gcc dot gnu.org
  2013-04-30 16:51 ` burnus at gcc dot gnu.org
@ 2015-10-09 21:45 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-09 21:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57126

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-10-09
     Ever confirmed|0                           |1

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Still present at r228660.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-09 21:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-30 16:36 [Bug fortran/57126] New: Wrongly rejects a generic call because it doesn't match the intrinsic while another specific matches burnus at gcc dot gnu.org
2013-04-30 16:44 ` [Bug fortran/57126] Matching host-associated generic vs. same-named use-associated generic burnus at gcc dot gnu.org
2013-04-30 16:51 ` burnus at gcc dot gnu.org
2015-10-09 21:45 ` dominiq at lps dot ens.fr

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).