From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49548 invoked by alias); 3 Aug 2015 12:40:08 -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 49191 invoked by uid 48); 3 Aug 2015 12:39:59 -0000 From: "tower120 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/67100] New: ICE(in type_dependent_expression_p) on macro function + user defined literal Date: Mon, 03 Aug 2015 12:40: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: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tower120 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 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-08/txt/msg00074.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67100 Bug ID: 67100 Summary: ICE(in type_dependent_expression_p) on macro function + user defined literal Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tower120 at gmail dot com Target Milestone: --- Live errors : #http://goo.gl/UlaJI7 The following code: //------------------------------------------------------------------------- #include #include #define CAT1(A, B) A ## B #define CAT(A, B) CAT1(A, B) #define TOKEN_TO_STRING(TOK) # TOK #define STRINGIZE_TOKEN(TOK) TOKEN_TO_STRING(TOK) template using _tstring = std::integer_sequence; template constexpr _tstring operator""_tstr() { return { }; } #define tstring(STR) decltype( CAT( TOKEN_TO_STRING(STR), _tstr) ) #define dispatch_forward_fn(fn_name, prefix) \ template \ struct Dispatcher{ \ template \ inline decltype(auto) operator() (ArgsRef&&... args) {\ return 0; \ } \ }; #define dispatch_list_prefix \ template \ struct Dispatcher; \ dispatch_forward_fn(go_up, _d) dispatch_list_prefix int main(){ Dispatcher()(); return 0; } //------------------------------------------------------------------------- Produces following error at gcc 4.9.2 (any flags): /tmp/gcc-explorer-compiler11573-68-zk0erd/example.cpp: In instantiation of 'struct Dispatcher, void>': 40 : required from here 37 : internal compiler error: in type_dependent_expression_p, at cp/pt.c:21020