From patchwork Fri Mar 17 11:02:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 740247 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 3vl2WP42Y2z9ryZ for ; Fri, 17 Mar 2017 22:03:13 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="fpg2FHY9"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=pYH6eLgTznEVU/Q6XV1Y9lSzlVsPcbwgbuWDqAR3XBesjFAiCi6ow //TQKNsY19KlOfTyKoq4Z2wiWsahq9Nu85t6I6ER9hqsB2UZ0vsFk1lrgKHRf50X wjSocKearKXd6NnPzh8UehodOx3IlXvi6bduqbInCXyeN7NrLec3aQ= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=gbN5FcXyveA4tJ0zbNF2g0p3JyI=; b=fpg2FHY9R1Inwr0TAAqH ibeu/zac51FWbWIh6v4ViDMGmnBbquVt1bNUwq/auWj0tvdZRt5geR37LFmsGoiE mWGJRte9DhEHoGKCtlri84eCimguslphsvmVI3ZQ4KHFMWfFiHMEIui+hZYu2OfU d3/Z7Q21SLwsMqoJd/szE6k= Received: (qmail 1689 invoked by alias); 17 Mar 2017 11:02:58 -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 1342 invoked by uid 89); 17 Mar 2017 11:02:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Mar 2017 11:02:56 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6B709AABE for ; Fri, 17 Mar 2017 11:02:55 +0000 (UTC) Date: Fri, 17 Mar 2017 12:02:55 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR80050 Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-03-17 Richard Biener PR middle-end/80050 * genmatch.c (parser::next): Remove pointless check for CPP_EOF. (parser::peek): Likewise. Index: gcc/genmatch.c =================================================================== --- gcc/genmatch.c (revision 246188) +++ gcc/genmatch.c (working copy) @@ -3826,8 +3826,7 @@ parser::next () { token = cpp_get_token (r); } - while (token->type == CPP_PADDING - && token->type != CPP_EOF); + while (token->type == CPP_PADDING); return token; } @@ -3842,8 +3841,7 @@ parser::peek (unsigned num) { token = cpp_peek_token (r, i++); } - while ((token->type == CPP_PADDING - && token->type != CPP_EOF) + while (token->type == CPP_PADDING || (--num > 0)); /* If we peek at EOF this is a fatal error as it leaves the cpp_reader in unusable state. Assume we really wanted a