From patchwork Fri Jul 31 23:17:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 502759 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 8D0511402D1 for ; Sat, 1 Aug 2015 09:18:04 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Uyo2FLmj; 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 :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=pY8hmDmEQ10KX76vWbCAYpJeUE7t68sundRdDrxQUDxwXP he73rTtuV7Pk4C1QzUrj6SaRdgA9cr1GTu9it7a3Ni4NLQYnHgNrrE6oKGp9KV4I /M4gtiITWyxPITHUQp+2p2M+nd595LJK3UcEsfgvKwCFhEXQV0Ul1oWXsUS8g= 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:content-type; s= default; bh=tJazyjeo4KkXjbQSMCZ1uc+L22E=; b=Uyo2FLmj1tEeyZylqXKj x/XTsKPQr/r3lJ6EQMeqPnB8S/TJclWfizMZg1TdknaZRZOWS7xTzmDYK4/DKT/I L/ycl5kkgyxPvTQaSHu1zjpndDzuXS8nmx9bJ2GuF9BdFbK9andnSRKOLRKdgIfS JBk9mPn1vF02cQXvQsbDP/g= Received: (qmail 55996 invoked by alias); 31 Jul 2015 23:17:55 -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 55984 invoked by uid 89); 31 Jul 2015 23:17:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL, BAYES_40, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ig0-f174.google.com Received: from mail-ig0-f174.google.com (HELO mail-ig0-f174.google.com) (209.85.213.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 31 Jul 2015 23:17:53 +0000 Received: by igr7 with SMTP id 7so25618585igr.0 for ; Fri, 31 Jul 2015 16:17:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=0wN2qoAXhujC0n93K+kfhEBqxMkpoAcYV8yE3I8w6KM=; b=WSk7T6+GeWjd+Y1fTJ4Z6X9HGiRCSHE0nbO8G/Pu6F9NbTYxP/vB6AhFI0nHaT5EG6 JWIqCtORx89Mdyi9kOvvzoAcilsIyFEyVhww69GNgv+0TQGYG9UmOq4gq3yTmZEH9xck zfsMVCv/nLdSQvDXXjTpW0OmmLJ/i8pcQi37znJLi+QVysokFTC0a9NBTZB316tGnyGP 1jAXjo9pZp3J5+7StudbpDBO/aUNi5nzVjIbUrft6D8j43VDu1KFt8WUiBIcVYExWg3d VBG+bjaNm01OpKpa9LtVcKxPcnQtE39yZ1onArdlLDJlh9vFQPzWw2ET+oYmCI80h1ea VoFQ== X-Gm-Message-State: ALoCoQkVPGmlllNeK5ybQljqUfeTmHnECZ9NnLAl2w1qPtNiERkcv4cstbPLhFwNROC74GsR/TI8 MIME-Version: 1.0 X-Received: by 10.50.43.134 with SMTP id w6mr10604903igl.74.1438384671707; Fri, 31 Jul 2015 16:17:51 -0700 (PDT) Received: by 10.79.102.133 with HTTP; Fri, 31 Jul 2015 16:17:51 -0700 (PDT) Date: Fri, 31 Jul 2015 16:17:51 -0700 Message-ID: Subject: Go patch committed: Fix error reporting for invalid builtin calls From: Ian Lance Taylor To: gcc-patches , "gofrontend-dev@googlegroups.com" This patch from Chris Manghane fixes the Go frontend error reporting for invalid builtin calls, by not losing track of whether the call is erroneous. This fixes https://golang.org/issue/11561. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 226456) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -bc4dda16f8686ab6e7335adfdfd2c6cc81cb2eb5 +2bf7c643a1d2f8503070c8e6cb87852026e32400 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: gcc/go/gofrontend/expressions.cc =================================================================== --- gcc/go/gofrontend/expressions.cc (revision 226122) +++ gcc/go/gofrontend/expressions.cc (working copy) @@ -8499,7 +8499,8 @@ Call_expression::do_lower(Gogo* gogo, Na { if (!this->fn_->type()->is_error()) this->report_error(_("expected function")); - return Expression::make_error(loc); + this->set_is_error(); + return this; } // Handle an argument which is a call to a function which returns