From patchwork Mon Feb 15 20:56:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 583081 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 D4EB31402CD for ; Tue, 16 Feb 2016 07:56:21 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=tFGIsYob; 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:cc:subject:message-id:reply-to:mime-version :content-type; q=dns; s=default; b=GC+5m+6Jg2OEXLR9VsRCEAMWbMcVF HiZXlpc376bg/9NVpDuNHPDXOkvfFz7/hKZ8jQa3FjpLUKihe2u9Nhrgz1nE4br/ l7EnYnaN2jDRdfrPE/Uhg1/iffTFf4EcUQlY8bh9lQrf1jHZ4WeesrN9d2Kb0/zu q/Nrew8OCACTgI= 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:cc:subject:message-id:reply-to:mime-version :content-type; s=default; bh=+AJXDgXnwvAFudkNZNIQ9LX/ViA=; b=tFG IsYob/xhCeGWCvZc8QIXtuTec5488v7QJt4VIjTII6+I50HpgVO2iZ7NAov8mtxw py3UFdiCKi9zlvVYEfdmo8vpNqSuJfeqleZFT46CCzTWAVXZL0O6y921+opk4Kgc CyRIbDXbdA1KNmB6FUt/zTqtFBzvZegw5+IcyoDU= Received: (qmail 48746 invoked by alias); 15 Feb 2016 20:56:14 -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 48730 invoked by uid 89); 15 Feb 2016 20:56:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=params, Hx-languages-length:1117 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 15 Feb 2016 20:56:11 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id A5048C07565C; Mon, 15 Feb 2016 20:56:10 +0000 (UTC) Received: from tucnak.zalov.cz ([10.3.113.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1FKu8xG007730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 Feb 2016 15:56:10 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u1FKu6F6006937; Mon, 15 Feb 2016 21:56:07 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u1FKu4RG006910; Mon, 15 Feb 2016 21:56:04 +0100 Date: Mon, 15 Feb 2016 21:56:04 +0100 From: Jakub Jelinek To: "Joseph S. Myers" , Marek Polacek , Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix ICE in sync_resolve_size (PR c++/69797) Message-ID: <20160215205604.GF3017@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes Hi! In C++, if there are no parameters, params can be non-NULL, but still empty vector. Fixed by properly testing for empty vector. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-02-15 Jakub Jelinek PR c++/69797 * c-common.c (sync_resolve_size): Diagnose too few arguments even when params is non-NULL empty vector. * c-c++-common/pr69797.c: New test. Jakub --- gcc/c-family/c-common.c.jj 2016-02-08 18:39:17.000000000 +0100 +++ gcc/c-family/c-common.c 2016-02-15 14:56:14.518790242 +0100 @@ -10675,7 +10675,7 @@ sync_resolve_size (tree function, vec