From patchwork Thu Feb 20 15:00:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 322220 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A6E142C00BB for ; Fri, 21 Feb 2014 02:00:35 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:cc:content-type; q=dns; s=default; b=hPDDU1K7gh7e6q3jXdiTAvwDK7SFyCw5W1cZFC5BYiy NcWDpPvEi1k2hRh/oUtxQfv50iptTPVD58SFdsW8KsclbA/Si0Jwh2qjfVspzUmC 2VERZk+e02PSORbjRAf9vajQILxClan6Y86VuDGlz4p477OnOQT6t8iWOxYFcHe4 = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:cc:content-type; s=default; bh=67AozMo7IsnkGsPkhye1hOKKfxU=; b=LOBVtsS4DpOm/ThSO SJt7inikXJFlFJvzQM8Z8C5Qqivcv/3SE8UJXiRbj5TVyHbggEoLT24SjRS8xn9o cDK154G298VdaPYZ7hBdqA9jkEc4VwvEHh5rpOlDRJv9b/Twy7dwan0MngPwtsN1 fnVonyihwafIDZDl2El0WiqnK4= Received: (qmail 16280 invoked by alias); 20 Feb 2014 15:00:22 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 16218 invoked by uid 89); 20 Feb 2014 15:00:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qa0-f50.google.com Received: from mail-qa0-f50.google.com (HELO mail-qa0-f50.google.com) (209.85.216.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 20 Feb 2014 15:00:20 +0000 Received: by mail-qa0-f50.google.com with SMTP id cm18so3050317qab.9 for ; Thu, 20 Feb 2014 07:00:18 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.224.137.5 with SMTP id u5mr2223836qat.12.1392908418053; Thu, 20 Feb 2014 07:00:18 -0800 (PST) Received: by 10.96.141.227 with HTTP; Thu, 20 Feb 2014 07:00:18 -0800 (PST) Date: Thu, 20 Feb 2014 16:00:18 +0100 Message-ID: Subject: [patch c++]: Fix PR/58873 [4.7/4.8/4.9 Regression] [c++11] ICE with __underlying_type for broken enum From: Kai Tietz To: GCC Patches Cc: Jason Merrill X-IsSubscribed: yes Hi, Issue here is that the argument type gets NULL for function-call of cp_parser_functional_cast. This invalid type is the result of cp_parser_simple_type_specifier call. 2014-02-20 Kai Tietz PR c++/58873 * parser.c (cp_parser_functional_cast): Treat NULL_TREE valued type argument as error_mark_node. Regression tested for x86_64-unknown-linux-gnu, and i686-w64-mingw32. Ok for apply? Regards, Kai Index: parser.c =================================================================== --- parser.c (Revision 207953) +++ parser.c (Arbeitskopie) @@ -23165,6 +23165,9 @@ cp_parser_functional_cast (cp_parser* parser, tree tree cast; bool nonconst_p; + if (!type) + type = error_mark_node; + if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE)) { maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);