Commit c00d68e8 by Thomas Koenig

re PR translation/89939 (messages for translation must not contain embedded macro parameters)

2019-04-11  Thomas Koenig  <tkoenig@gcc.gnu.org>

	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.

From-SVN: r270292
parent 2c390a48
2019-04-11 Thomas Koenig <tkoenig@gcc.gnu.org>
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.
2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org> 2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87352 PR fortran/87352
......
...@@ -3743,10 +3743,13 @@ check_conjg_transpose_variable (gfc_expr *e, bool *conjg, bool *transpose) ...@@ -3743,10 +3743,13 @@ check_conjg_transpose_variable (gfc_expr *e, bool *conjg, bool *transpose)
/* Macros for unified error messages. */ /* Macros for unified error messages. */
#define B_ERROR(n) _("Incorrect extent in argument B in MATMUL intrinsic in " \ #define B_ERROR_1 _("Incorrect extent in argument B in MATMUL intrinsic in " \
"dimension " #n ": is %ld, should be %ld") "dimension 1: is %ld, should be %ld")
#define C_ERROR(n) _("Array bound mismatch for dimension " #n " of array " \ #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)") "(%ld/%ld)")
...@@ -3976,7 +3979,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees, ...@@ -3976,7 +3979,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1);
a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); 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_code_point = &test->next; next_code_point = &test->next;
...@@ -3984,7 +3987,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees, ...@@ -3984,7 +3987,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
{ {
c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1);
a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 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_code_point = &test->next; next_code_point = &test->next;
} }
...@@ -3994,7 +3997,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees, ...@@ -3994,7 +3997,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1);
a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 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_code_point = &test->next; next_code_point = &test->next;
...@@ -4002,7 +4005,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees, ...@@ -4002,7 +4005,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
{ {
c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1);
b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2); 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_code_point = &test->next; next_code_point = &test->next;
} }
...@@ -4012,7 +4015,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees, ...@@ -4012,7 +4015,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1);
a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); 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_code_point = &test->next; next_code_point = &test->next;
...@@ -4020,13 +4023,13 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees, ...@@ -4020,13 +4023,13 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
{ {
c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1);
a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 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_code_point = &test->next; next_code_point = &test->next;
c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2); c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2);
b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 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_code_point = &test->next; next_code_point = &test->next;
} }
...@@ -4037,7 +4040,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees, ...@@ -4037,7 +4040,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2); b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2);
a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2);
/* matrix_b is transposed, hence dimension 1 for the error message. */ /* 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_code_point = &test->next; next_code_point = &test->next;
...@@ -4045,13 +4048,13 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees, ...@@ -4045,13 +4048,13 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
{ {
c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1);
a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 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_code_point = &test->next; next_code_point = &test->next;
c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2); c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2);
b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); 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_code_point = &test->next; next_code_point = &test->next;
} }
...@@ -4061,7 +4064,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees, ...@@ -4061,7 +4064,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1);
a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 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_code_point = &test->next; next_code_point = &test->next;
...@@ -4069,13 +4072,13 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees, ...@@ -4069,13 +4072,13 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
{ {
c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1);
a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); 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_code_point = &test->next; next_code_point = &test->next;
c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2); c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2);
b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 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_code_point = &test->next; next_code_point = &test->next;
} }
...@@ -4478,7 +4481,7 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -4478,7 +4481,7 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED,
case A2B2: case A2B2:
b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1);
a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); 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_code_point = &test->next; next_code_point = &test->next;
...@@ -4486,13 +4489,13 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -4486,13 +4489,13 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED,
{ {
c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1);
a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 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_code_point = &test->next; next_code_point = &test->next;
c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2); c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2);
b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 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_code_point = &test->next; next_code_point = &test->next;
} }
...@@ -4503,7 +4506,7 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -4503,7 +4506,7 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED,
b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2); b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2);
a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2);
/* matrix_b is transposed, hence dimension 1 for the error message. */ /* 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_code_point = &test->next; next_code_point = &test->next;
...@@ -4511,13 +4514,13 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -4511,13 +4514,13 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED,
{ {
c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1);
a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 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_code_point = &test->next; next_code_point = &test->next;
c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2); c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2);
b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); 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_code_point = &test->next; next_code_point = &test->next;
} }
...@@ -4527,7 +4530,7 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -4527,7 +4530,7 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED,
b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1);
a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 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_code_point = &test->next; next_code_point = &test->next;
...@@ -4535,13 +4538,13 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -4535,13 +4538,13 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED,
{ {
c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1);
a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); 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_code_point = &test->next; next_code_point = &test->next;
c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2); c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2);
b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 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_code_point = &test->next; next_code_point = &test->next;
} }
...@@ -4550,7 +4553,7 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -4550,7 +4553,7 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED,
case A2TB2T: case A2TB2T:
b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2); b2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 2);
a1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 1); 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_code_point = &test->next; next_code_point = &test->next;
...@@ -4558,13 +4561,13 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED, ...@@ -4558,13 +4561,13 @@ call_external_blas (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED,
{ {
c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1); c1 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 1);
a2 = get_array_inq_function (GFC_ISYM_SIZE, matrix_a, 2); 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_code_point = &test->next; next_code_point = &test->next;
c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2); c2 = get_array_inq_function (GFC_ISYM_SIZE, expr1, 2);
b1 = get_array_inq_function (GFC_ISYM_SIZE, matrix_b, 1); 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_code_point = &test->next; next_code_point = &test->next;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment