From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15251 invoked by alias); 20 Mar 2015 17:59:53 -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 15213 invoked by uid 48); 20 Mar 2015 17:59:50 -0000 From: "ldionne.2 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65498] New: ICE in cxx_eval_call_expression when using __func__ inside dependent context Date: Fri, 20 Mar 2015 18:15: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: ldionne.2 at gmail 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: bug_id short_desc product version bug_status 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: 2015-03/txt/msg02151.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D65498 Bug ID: 65498 Summary: ICE in cxx_eval_call_expression when using __func__ inside dependent context Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldionne.2 at gmail dot com The following code triggers an ICE on GCC trunk: ---------------------------------------------------------------------------= --- #include struct T; template struct F { }; template struct F{}()>> { template F(MakeDependent) { auto ICE_HERE =3D __func__; (void)ICE_HERE; // avoid -Wunused-variable } }; int main() { F{1}; } ---------------------------------------------------------------------------= --- Example run: ---------------------------------------------------------------------------= --- =E2=80=BA ~/code/gcc5/bin/g++ -std=3Dc++1y ~/code/hana/test/worksheet.cpp /Users/ldionne/code/hana/test/worksheet.cpp: In substitution of =E2=80=98te= mplate using enable_if_t =3D typename std::enable_if::type [with= bool _Cond =3D std::is_same{}(); _Tp =3D void]=E2=80=99: /Users/ldionne/code/hana/test/worksheet.cpp:1411:25: required from here /Users/ldionne/code/hana/test/worksheet.cpp:1408:50: in constexpr expansi= on of =E2=80=98((std::integral_constant*)(& std::is_same()))->std::integral_constant<_Tp, __v>::operator()()=E2=80=99 /Users/ldionne/code/hana/test/worksheet.cpp:1411:25: internal compiler erro= r: in cxx_eval_call_expression, at cp/constexpr.c:1358 auto ICE_HERE =3D __func__; ^ /Users/ldionne/code/hana/test/worksheet.cpp:1411:25: internal compiler erro= r: Abort trap: 6 g++: internal compiler error: Abort trap: 6 (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See for instructions. ---------------------------------------------------------------------------= --- Note that using=20 std::is_same::value instead of=20 std::is_same{}() seems to fix the issue. Regards, Louis Dionne >>From gcc-bugs-return-481008-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Mar 20 18:00:53 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 17276 invoked by alias); 20 Mar 2015 18:00: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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 17253 invoked by uid 48); 20 Mar 2015 18:00:49 -0000 From: "marejde at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/65499] New: Missing "using namespace literals::chrono_literals" in std::chrono Date: Fri, 20 Mar 2015 18:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marejde at gmail 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter 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-03/txt/msg02152.txt.bz2 Content-length: 1448 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65499 Bug ID: 65499 Summary: Missing "using namespace literals::chrono_literals" in std::chrono Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: marejde at gmail dot com Reading http://en.cppreference.com/w/cpp/chrono/operator%22%22min (sorry, I do not have the spec readily available) it says: "In addition, within the namespace std::chrono, the directive using namespace literals::chrono_literals; is provided by the standard library, so that if a programmer uses using namespace std::chrono; to gain access to the duration classes, the duration literal operators become visible as well." The following program: #include #include int main(void) { using namespace std::chrono; minutes min = 36min; return 0; } Does not compile with GCC 4.9.2 while it does with Clang 3.6. Looking at GCC trunk as of today I do not see a "using namespace literals::chrono_literals;" anywhere in libstdc++-v3/include/ . Clang's libc++ has it in the chrono namespace though. Would be great if this could be fixed before GCC 5.0 is released so I don't have to sprinkle "using namespace literals::chrono_literals;" in my code to be able to compile with GCC.