From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96023 invoked by alias); 26 Oct 2015 03:05:38 -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 96009 invoked by uid 48); 26 Oct 2015 03:05:34 -0000 From: "tom at honermann dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/68093] New: [concepts] friend function declarations that differ only by constraints are rejected as redefinitions Date: Mon, 26 Oct 2015 03:05: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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tom at honermann dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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 bug_severity priority component assigned_to reporter target_milestone 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: 2015-10/txt/msg02088.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D68093 Bug ID: 68093 Summary: [concepts] friend function declarations that differ only by constraints are rejected as redefinitions Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tom at honermann dot net Target Milestone: --- I believe the following code is intended to be well-formed according to P01= 21r0 [1]. gcc trunk (r229299) currently rejects it. $ cat t.cpp struct S1 {}; struct S2 { using t1 =3D int; }; template concept bool Has_t1() { return requires () { typename T::t1; }; } template struct TS { friend void f(TS) {} friend void f(TS) requires Has_t1() {} // Unexpected error: redefini= tion }; TS ts1; TS ts2; auto x =3D []{ f(ts1); f(ts2); }; $ gcc --version gcc (GCC) 6.0.0 20151025 (experimental) Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc -c -std=3Dc++1z t.cpp=20 t.cpp: In instantiation of =E2=80=98struct TS=E2=80=99: t.cpp:12:8: required from here t.cpp:10:17: error: redefinition of =E2=80=98void f(TS)=E2=80=99 friend void f(TS) requires Has_t1() {} // Unexpected error: redefinition ^ t.cpp:9:17: note: =E2=80=98void f(TS)=E2=80=99 previously defined here friend void f(TS) {} ^ t.cpp: In instantiation of =E2=80=98struct TS=E2=80=99: t.cpp:13:8: required from here t.cpp:10:17: error: redefinition of =E2=80=98void f(TS)=E2=80=99 friend void f(TS) requires Has_t1() {} // Unexpected error: redefinition ^ t.cpp:9:17: note: =E2=80=98void f(TS)=E2=80=99 previously defined here friend void f(TS) {} ^ [1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0121r0.pdf >>From gcc-bugs-return-500534-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 26 03:26:29 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 119847 invoked by alias); 26 Oct 2015 03:26:29 -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 114427 invoked by uid 48); 26 Oct 2015 03:26:24 -0000 From: "baqwas at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/68094] New: Compiler segmentation fault Date: Mon, 26 Oct 2015 03:26: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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: baqwas at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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 bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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: 2015-10/txt/msg02089.txt.bz2 Content-length: 1084 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68094 Bug ID: 68094 Summary: Compiler segmentation fault Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: baqwas at gmail dot com Target Milestone: --- Created attachment 36585 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36585&action=edit Pre-processed source with error report Compiler issues segmentation fault for very nominal lines of code as shown in the attachment. Compiler invoked through Arduino IDE (2:1.0.5+dfsg2-4) running under Debian Jessie on Raspberry Pi 2 platform. Arduino IDE under Windows 10 does not exhibit any error. Arduino installed using standard apt-get install command after the customary update/upgrade steps. Was able to run Arduino IDE successfully under Debian Wheezy on same platform. My apologies if this is a "newbie" error but I did not find any equivalent bugs reported previously.