From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10145 invoked by alias); 24 Nov 2014 23:35:52 -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 10117 invoked by uid 48); 24 Nov 2014 23:35:48 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/64063] New: Incorrect "ambiguous template specialization" error Date: Mon, 24 Nov 2014 23:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter Message-ID: 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-11/txt/msg02920.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64063 Bug ID: 64063 Summary: Incorrect "ambiguous template specialization" error Product: gcc Version: 5.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org G++ rejects this explicit instantiation definition as ambiguous: template struct S { void foo(int) { } template void foo(U) { } }; template void S::foo(int); // XXX EDG thinks it's OK, clang crashes, and G++ says: inst.cc:8:15: error: ambiguous template specialization =E2=80=98foo<>=E2=80= =99 for =E2=80=98void S::foo(int)=E2=80=99 template void S::foo(int); // XXX ^ inst.cc:4:8: note: candidates are: void S::foo(int) [with T =3D char] void foo(int) { } ^ inst.cc:5:29: note: template void S::foo(U) [wi= th U =3D U; T =3D char] template void foo(U) { } ^ I think EDG is correct and the diagnostic is wrong, because I'm not referri= ng to any foo<> but rather foo. Changing the instantiation to be unambiguously a template produces almost t= he same error (with foo<> replaced by foo) and that definitely isn't ambiguous because one candidate isn't even a function template: template struct S { void foo(int) { } template void foo(U) { } }; template void S::foo(int); // XXX inst.cc:8:15: error: ambiguous template specialization =E2=80=98foo=E2= =80=99 for =E2=80=98void S::foo(int)=E2=80=99 template void S::foo(int); // XXX ^ inst.cc:4:8: note: candidates are: void S::foo(int) [with T =3D char] void foo(int) { } ^ inst.cc:5:29: note: template void S::foo(U) [wi= th U =3D U; T =3D char] template void foo(U) { } ^ >>From gcc-bugs-return-468449-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 24 23:38:12 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 11594 invoked by alias); 24 Nov 2014 23:38:12 -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 11566 invoked by uid 48); 24 Nov 2014 23:38:09 -0000 From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/64057] Overlapping memcpy generated for array assignment Date: Mon, 24 Nov 2014 23:38:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou at gcc dot gnu.org 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: bug_status cf_reconfirmed_on cc everconfirmed 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-11/txt/msg02921.txt.bz2 Content-length: 691 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64057 Eric Botcazou changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2014-11-24 CC| |ebotcazou at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Eric Botcazou --- > Let me know if you need more info We need a testcase that fails with GCC 4.8 or GCC 4.9 since xsinfo is built by the base compiler.