From patchwork Thu Apr 11 20:17:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 1084274 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-499138-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=netcologne.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="UYFWggFx"; dkim=pass (2048-bit key; unprotected) header.d=netcologne.de header.i=@netcologne.de header.b="qBVgmEUS"; dkim-atps=neutral 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 44gC4T6sGYz9s4Y for ; Fri, 12 Apr 2019 06:17:29 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=hMAynssDKFTe78fFMuXbYO6YpesSaIfHfcZxTx4JzGzCR4pqWL 8AJ8iJ9mJHkxXFnAXuvhTdfqnBxk6SsMj8gs6Kx4NT6EOQm5Ib2MGR5LFntuVQQt t9VV9gAdLLIo3Tj9Lwwl/IDsMU1CYsz4Kky3nZpxlbb2UCdxi4w3Vvv1k= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=8mCtjOy1uCDw0BY5ii2L3yUV7ww=; b=UYFWggFxbLM4+kNHxZNH bBG69qOxwrRpab8xsxjgopi3URus2TeyWItH/H1q9Klqiz1RyvSF5Wvvv02Z3tDI Nb2idWse5Rpu3C38U7GVff2FEiRVxQmVuc+KR6J5uixEJSPj7XA5bSN/o0lJXAia a84g/LH5FBnoGwfppmL7NSg= Received: (qmail 23999 invoked by alias); 11 Apr 2019 20:17:18 -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 23986 invoked by uid 89); 11 Apr 2019 20:17:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-12.6 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=sk:check_c, H*F:U*tkoenig, HX-Envelope-From:sk:tkoenig X-HELO: cc-smtpout1.netcologne.de Received: from cc-smtpout1.netcologne.de (HELO cc-smtpout1.netcologne.de) (89.1.8.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Apr 2019 20:17:15 +0000 Received: from cc-smtpin2.netcologne.de (cc-smtpin2.netcologne.de [89.1.8.202]) by cc-smtpout1.netcologne.de (Postfix) with ESMTP id 2063A12BE6; Thu, 11 Apr 2019 22:17:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=netcologne.de; s=nc1116a; t=1555013832; bh=7wPFZp68DKbIhbkjGd6AKsFw0WcqjVEzICwz3rbeBtw=; h=To:From:Subject:Message-ID:Date:From; b=qBVgmEUSmU2ajrBaLSfvpe8xsSPASGwqq67VBS/SlxVMX2Z+jliTANQRDFDr7UTdF sNctVlAnNai3CWEq6840e1MWm0XEJQQ0/BlKKXdx4TI2w5KS4DCOnmLKO6Otklvk7C v9pCoiIw3YRCINSUA9dXaAH9Q+Aa/hPl6fiw0qThcOO01Zn2k1NCDptxI+p7lsArqn 0Mcz2q27AZEtLClz8UJXpNhY9vobsRDhzblsKqGnurZpLWsn9+zQD02UersgGkMBQJ /IARrVdZFapcShI5d+4PmA4MUAC6G2WWJNZtrWxZ8TEVM1ZVXCt9KGuOhXCmrAm7cp FK5PGEtHjv+3Q== Received: from localhost (localhost [127.0.0.1]) by cc-smtpin2.netcologne.de (Postfix) with ESMTP id 11AA311F1F; Thu, 11 Apr 2019 22:17:12 +0200 (CEST) Received: from [2001:4dd7:6eb7:0:7285:c2ff:fe6c:992d] (helo=cc-smtpin2.netcologne.de) by localhost with ESMTP (eXpurgate 4.6.0) (envelope-from ) id 5cafa0c8-018f-7f0000012729-7f000001c1c6-1 for ; Thu, 11 Apr 2019 22:17:12 +0200 Received: from [IPv6:2001:4dd7:6eb7:0:7285:c2ff:fe6c:992d] (2001-4dd7-6eb7-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de [IPv6:2001:4dd7:6eb7:0:7285:c2ff:fe6c:992d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by cc-smtpin2.netcologne.de (Postfix) with ESMTPSA; Thu, 11 Apr 2019 22:17:06 +0200 (CEST) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran, committed] Fix error messages for translation Message-ID: Date: Thu, 11 Apr 2019 22:17:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Hello world, I have just committed the attached patch as obvious and simple. It fixes an error message so that it can be extracted for translation. No test case because it does not change anything (which was verified by regression-testing). Regards Thomas 2019-04-11 Thomas Koenig PR translation/89939 * frontend-passes.c (B_ERROR): Delete macro. (C_ERROR): Delete macro. (B_ERROR_1): New macro. (C_ERROR_1): New macro. (C_ERROR_2): New macro. (inline_matmul_assign): Use new macros. (call_external_blas): Likewise. Index: frontend-passes.c =================================================================== --- frontend-passes.c (Revision 270182) +++ frontend-passes.c (Arbeitskopie) @@ -3743,13 +3743,16 @@ check_conjg_transpose_variable (gfc_expr *e, bool /* Macros for unified error messages. */ -#define B_ERROR(n) _("Incorrect extent in argument B in MATMUL intrinsic in " \ - "dimension " #n ": is %ld, should be %ld") +#define B_ERROR_1 _("Incorrect extent in argument B in MATMUL intrinsic in " \ + "dimension 1: is %ld, should be %ld") -#define C_ERROR(n) _("Array bound mismatch for dimension " #n " of array " \ - "(%ld/%ld)") +#define C_ERROR_1 _("Array bound mismatch for dimension 1 of array " \ + "(%ld/%ld)") +#define C_ERROR_2 _("Array bound mismatch for dimension 2 of array " \ + "(%ld/%ld)") + /* Inline assignments of the form c = matmul(a,b). Handle only the cases currently where b and c are rank-two arrays. @@ -3976,7 +3979,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subt b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); - test = runtime_error_ne (b1, a2, B_ERROR(1)); + test = runtime_error_ne (b1, a2, B_ERROR_1); *next_code_point = test; next_code_point = &test->next; @@ -3984,7 +3987,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subt { c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 1); - test = runtime_error_ne (c1, a1, C_ERROR(1)); + test = runtime_error_ne (c1, a1, C_ERROR_1); *next_code_point = test; next_code_point = &test->next; } @@ -3994,7 +3997,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subt b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 1); - test = runtime_error_ne (b1, a1, B_ERROR(1)); + test = runtime_error_ne (b1, a1, B_ERROR_1); *next_code_point = test; next_code_point = &test->next; @@ -4002,7 +4005,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subt { c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2); - test = runtime_error_ne (c1, b2, C_ERROR(1)); + test = runtime_error_ne (c1, b2, C_ERROR_1); *next_code_point = test; next_code_point = &test->next; } @@ -4012,7 +4015,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subt b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); - test = runtime_error_ne (b1, a2, B_ERROR(1)); + test = runtime_error_ne (b1, a2, B_ERROR_1); *next_code_point = test; next_code_point = &test->next; @@ -4020,13 +4023,13 @@ inline_matmul_assign (gfc_code **c, int *walk_subt { c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 1); - test = runtime_error_ne (c1, a1, C_ERROR(1)); + test = runtime_error_ne (c1, a1, C_ERROR_1); *next_code_point = test; next_code_point = &test->next; c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2); b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2); - test = runtime_error_ne (c2, b2, C_ERROR(2)); + test = runtime_error_ne (c2, b2, C_ERROR_2); *next_code_point = test; next_code_point = &test->next; } @@ -4037,7 +4040,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subt b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2); a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); /* matrix_b is transposed, hence dimension 1 for the error message. */ - test = runtime_error_ne (b2, a2, B_ERROR(1)); + test = runtime_error_ne (b2, a2, B_ERROR_1); *next_code_point = test; next_code_point = &test->next; @@ -4045,13 +4048,13 @@ inline_matmul_assign (gfc_code **c, int *walk_subt { c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 1); - test = runtime_error_ne (c1, a1, C_ERROR(1)); + test = runtime_error_ne (c1, a1, C_ERROR_1); *next_code_point = test; next_code_point = &test->next; c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2); b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); - test = runtime_error_ne (c2, b1, C_ERROR(2)); + test = runtime_error_ne (c2, b1, C_ERROR_2); *next_code_point = test; next_code_point = &test->next; } @@ -4061,7 +4064,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subt b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 1); - test = runtime_error_ne (b1, a1, B_ERROR(1)); + test = runtime_error_ne (b1, a1, B_ERROR_1); *next_code_point = test; next_code_point = &test->next; @@ -4069,13 +4072,13 @@ inline_matmul_assign (gfc_code **c, int *walk_subt { c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); - test = runtime_error_ne (c1, a2, C_ERROR(1)); + test = runtime_error_ne (c1, a2, C_ERROR_1); *next_code_point = test; next_code_point = &test->next; c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2); b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2); - test = runtime_error_ne (c2, b2, C_ERROR(2)); + test = runtime_error_ne (c2, b2, C_ERROR_2); *next_code_point = test; next_code_point = &test->next; } @@ -4478,7 +4481,7 @@ call_external_blas (gfc_code **c, int *walk_subtre case A2B2: b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); - test = runtime_error_ne (b1, a2, B_ERROR(1)); + test = runtime_error_ne (b1, a2, B_ERROR_1); *next_code_point = test; next_code_point = &test->next; @@ -4486,13 +4489,13 @@ call_external_blas (gfc_code **c, int *walk_subtre { c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 1); - test = runtime_error_ne (c1, a1, C_ERROR(1)); + test = runtime_error_ne (c1, a1, C_ERROR_1); *next_code_point = test; next_code_point = &test->next; c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2); b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2); - test = runtime_error_ne (c2, b2, C_ERROR(2)); + test = runtime_error_ne (c2, b2, C_ERROR_2); *next_code_point = test; next_code_point = &test->next; } @@ -4503,7 +4506,7 @@ call_external_blas (gfc_code **c, int *walk_subtre b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2); a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); /* matrix_b is transposed, hence dimension 1 for the error message. */ - test = runtime_error_ne (b2, a2, B_ERROR(1)); + test = runtime_error_ne (b2, a2, B_ERROR_1); *next_code_point = test; next_code_point = &test->next; @@ -4511,13 +4514,13 @@ call_external_blas (gfc_code **c, int *walk_subtre { c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 1); - test = runtime_error_ne (c1, a1, C_ERROR(1)); + test = runtime_error_ne (c1, a1, C_ERROR_1); *next_code_point = test; next_code_point = &test->next; c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2); b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); - test = runtime_error_ne (c2, b1, C_ERROR(2)); + test = runtime_error_ne (c2, b1, C_ERROR_2); *next_code_point = test; next_code_point = &test->next; } @@ -4527,7 +4530,7 @@ call_external_blas (gfc_code **c, int *walk_subtre b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 1); - test = runtime_error_ne (b1, a1, B_ERROR(1)); + test = runtime_error_ne (b1, a1, B_ERROR_1); *next_code_point = test; next_code_point = &test->next; @@ -4535,13 +4538,13 @@ call_external_blas (gfc_code **c, int *walk_subtre { c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); - test = runtime_error_ne (c1, a2, C_ERROR(1)); + test = runtime_error_ne (c1, a2, C_ERROR_1); *next_code_point = test; next_code_point = &test->next; c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2); b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2); - test = runtime_error_ne (c2, b2, C_ERROR(2)); + test = runtime_error_ne (c2, b2, C_ERROR_2); *next_code_point = test; next_code_point = &test->next; } @@ -4550,7 +4553,7 @@ call_external_blas (gfc_code **c, int *walk_subtre case A2TB2T: b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2); a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 1); - test = runtime_error_ne (b2, a1, B_ERROR(1)); + test = runtime_error_ne (b2, a1, B_ERROR_1); *next_code_point = test; next_code_point = &test->next; @@ -4558,13 +4561,13 @@ call_external_blas (gfc_code **c, int *walk_subtre { c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); - test = runtime_error_ne (c1, a2, C_ERROR(1)); + test = runtime_error_ne (c1, a2, C_ERROR_1); *next_code_point = test; next_code_point = &test->next; c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2); b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); - test = runtime_error_ne (c2, b1, C_ERROR(2)); + test = runtime_error_ne (c2, b1, C_ERROR_2); *next_code_point = test; next_code_point = &test->next; }