From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19840 invoked by alias); 13 Jul 2014 18:29:43 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 19660 invoked by uid 48); 13 Jul 2014 18:29:39 -0000 From: "daniel.kruegler at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/61795] [C++11] return type of std::pow(std::complex, int) should be std::complex Date: Sun, 13 Jul 2014 18:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: daniel.kruegler at googlemail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-07/txt/msg00822.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61795 Daniel Kr=C3=BCgler changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler@googlemail. | |com --- Comment #1 from Daniel Kr=C3=BCgler --- I agree with your analysis. I believe that the observed behaviour is due to= a lack of applying yet the corresponding library defect http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#844 to libstdc++, because in an earlier working draft there was the required overload: template complex pow(const complex& x, int y); which had lead to the observed result. >>From gcc-bugs-return-456232-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Jul 13 18:37:34 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 2195 invoked by alias); 13 Jul 2014 18:37:34 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 1909 invoked by uid 48); 13 Jul 2014 18:37:30 -0000 From: "anlauf at gmx dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/61615] Failure to resolve correct generic with TYPE(C_PTR) arguments Date: Sun, 13 Jul 2014 18:37: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-Version: 4.10.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gmx dot de X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-07/txt/msg00823.txt.bz2 Content-length: 723 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61615 --- Comment #7 from Harald Anlauf --- (In reply to Dominique d'Humieres from comment #6) Well, the problem is in the resolution of the generic, not in the invocation in the main. If you comment out ! MODULE PROCEDURE bar_a1d you get the result desired by the author: in bar_s Now if you comment out the module procedure bar_s, gfortran does *not* complain, but resolve to the *wrong* procedure. So for some strange reason, gfortran fails to recognise the proper rank. OTOH, NAG complains: Error: pr61615.f90, line 28: No specific match for reference to generic BAR I get corresponding errors from PGI or Intel. IMO a bug in gfortran.