From b65e6a997761f03fe84ebe837201c51fe8bc2e2f Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 4 Mar 2019 23:49:23 +0000 Subject: re PR c++/84605 (internal compiler error: in xref_basetypes, at cp/decl.c:13818) /cp 2019-03-04 Paolo Carlini PR c++/84605 * parser.c (cp_parser_class_head): Reject TYPE_BEING_DEFINED too. /testsuite 2019-03-04 Paolo Carlini PR c++/84605 * g++.dg/parse/crash69.C: New. From-SVN: r269378 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/parser.c | 7 +++++-- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/parse/crash69.C | 11 +++++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/g++.dg/parse/crash69.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8c0bfd9..6997180 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2019-03-04 Paolo Carlini + + PR c++/84605 + * parser.c (cp_parser_class_head): Reject TYPE_BEING_DEFINED too. + 2019-03-04 Jakub Jelinek PR c++/71446 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 5804267..155e350 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -24021,8 +24021,11 @@ cp_parser_class_head (cp_parser* parser, cp_parser_check_class_key (class_key, type); /* If this type was already complete, and we see another definition, - that's an error. */ - if (type != error_mark_node && COMPLETE_TYPE_P (type)) + that's an error. Likewise if the type is already being defined: + this can happen, eg, when it's defined from within an expression + (c++/84605). */ + if (type != error_mark_node + && (COMPLETE_TYPE_P (type) || TYPE_BEING_DEFINED (type))) { error_at (type_start_token->location, "redefinition of %q#T", type); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3186805c..c06d63a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-04 Paolo Carlini + + PR c++/84605 + * g++.dg/parse/crash69.C: New. + 2019-03-04 Jakub Jelinek PR c++/71446 diff --git a/gcc/testsuite/g++.dg/parse/crash69.C b/gcc/testsuite/g++.dg/parse/crash69.C new file mode 100644 index 0000000..a85bbee --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/crash69.C @@ -0,0 +1,11 @@ +// PR c++/84605 + +struct b { + int x(((struct b {}))); // { dg-error "expected|redefinition" } +}; + +struct c { + struct d { + int x(((struct c {}))); // { dg-error "expected|redefinition" } + }; +}; -- cgit v1.1 From da7382442e127e54ba65edeab4d9444e786ffd73 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 5 Mar 2019 00:16:26 +0000 Subject: Daily bump. From-SVN: r269381 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 6cc47af..8db54c9 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20190304 +20190305 -- cgit v1.1 From d6f7829a1fa2577bac1bd8815acd31730affcb92 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 5 Mar 2019 09:43:16 +0100 Subject: re PR tree-optimization/89566 (ICE on compilable C++ code: in gimple_call_arg, at gimple.h:3166) PR tree-optimization/89566 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Set info.fncode to BUILT_IN_NONE if gimple_call_builtin_p failed. Punt if get_user_idx_format succeeds, but idx_format argument is not provided or doesn't have pointer type, or if idx_args is above number of provided arguments. * c-c++-common/pr89566.c: New test. From-SVN: r269384 --- gcc/ChangeLog | 9 +++++++++ gcc/gimple-ssa-sprintf.c | 13 +++++++++---- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/c-c++-common/pr89566.c | 15 +++++++++++++++ 4 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/c-c++-common/pr89566.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 38858fa..22ce364 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2019-03-05 Jakub Jelinek + + PR tree-optimization/89566 + * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): + Set info.fncode to BUILT_IN_NONE if gimple_call_builtin_p failed. + Punt if get_user_idx_format succeeds, but idx_format argument is + not provided or doesn't have pointer type, or if idx_args is above + number of provided arguments. + 2019-03-04 Wilco Dijkstra PR tree-optimization/89437 diff --git a/gcc/gimple-ssa-sprintf.c b/gcc/gimple-ssa-sprintf.c index 4fe206a..ced1c4c 100644 --- a/gcc/gimple-ssa-sprintf.c +++ b/gcc/gimple-ssa-sprintf.c @@ -3858,16 +3858,21 @@ sprintf_dom_walker::handle_gimple_call (gimple_stmt_iterator *gsi) if (!info.func) return false; - info.fncode = DECL_FUNCTION_CODE (info.func); - /* Format string argument number (valid for all functions). */ unsigned idx_format = UINT_MAX; - if (!gimple_call_builtin_p (info.callstmt, BUILT_IN_NORMAL)) + if (gimple_call_builtin_p (info.callstmt, BUILT_IN_NORMAL)) + info.fncode = DECL_FUNCTION_CODE (info.func); + else { unsigned idx_args; idx_format = get_user_idx_format (info.func, &idx_args); - if (idx_format == UINT_MAX) + if (idx_format == UINT_MAX + || idx_format >= gimple_call_num_args (info.callstmt) + || idx_args > gimple_call_num_args (info.callstmt) + || !POINTER_TYPE_P (TREE_TYPE (gimple_call_arg (info.callstmt, + idx_format)))) return false; + info.fncode = BUILT_IN_NONE; info.argidx = idx_args; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c06d63a..a5e25c3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-05 Jakub Jelinek + + PR tree-optimization/89566 + * c-c++-common/pr89566.c: New test. + 2019-03-04 Paolo Carlini PR c++/84605 diff --git a/gcc/testsuite/c-c++-common/pr89566.c b/gcc/testsuite/c-c++-common/pr89566.c new file mode 100644 index 0000000..d967656 --- /dev/null +++ b/gcc/testsuite/c-c++-common/pr89566.c @@ -0,0 +1,15 @@ +/* PR tree-optimization/89566 */ +/* { dg-do compile } */ + +typedef struct FILE { int i; } FILE; +#ifdef __cplusplus +extern "C" +#endif +int fprintf (FILE *, const char *, ...); + +int +main () +{ + ((void (*)()) fprintf) (); // { dg-warning "function called through a non-compatible type" "" { target c } } + return 0; +} -- cgit v1.1 From ea5212b741b5cc751d0d8271a9666c4ad0b4e799 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 5 Mar 2019 09:44:21 +0100 Subject: re PR tree-optimization/89570 (ICE in prepare_cmp_insn, at optabs.c:4001) PR tree-optimization/89570 * match.pd (vec_cond into cond_op simplification): Guard with vectorized_internal_fn_supported_p test and #if GIMPLE. * gcc.dg/pr89570.c: New test. From-SVN: r269385 --- gcc/ChangeLog | 4 ++++ gcc/match.pd | 32 ++++++++++++++++++++++++-------- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/gcc.dg/pr89570.c | 15 +++++++++++++++ 4 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/pr89570.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 22ce364..54c736b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2019-03-05 Jakub Jelinek + PR tree-optimization/89570 + * match.pd (vec_cond into cond_op simplification): Guard with + vectorized_internal_fn_supported_p test and #if GIMPLE. + PR tree-optimization/89566 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Set info.fncode to BUILT_IN_NONE if gimple_call_builtin_p failed. diff --git a/gcc/match.pd b/gcc/match.pd index c9af2e5..8bf6535 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -5177,17 +5177,24 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) if the target can do it in one go. This makes the operation conditional on c, so could drop potentially-trapping arithmetic, but that's a valid simplification if the result of the operation isn't needed. */ +#if GIMPLE (for uncond_op (UNCOND_BINARY) cond_op (COND_BINARY) (simplify (vec_cond @0 (view_convert? (uncond_op@4 @1 @2)) @3) - (with { tree op_type = TREE_TYPE (@4); } - (if (element_precision (type) == element_precision (op_type)) + (with { tree op_type = TREE_TYPE (@4); + internal_fn cond_fn = get_conditional_internal_fn (uncond_op); } + (if (cond_fn != IFN_LAST + && vectorized_internal_fn_supported_p (cond_fn, op_type) + && element_precision (type) == element_precision (op_type)) (view_convert (cond_op @0 @1 @2 (view_convert:op_type @3)))))) (simplify (vec_cond @0 @1 (view_convert? (uncond_op@4 @2 @3))) - (with { tree op_type = TREE_TYPE (@4); } - (if (element_precision (type) == element_precision (op_type)) + (with { tree op_type = TREE_TYPE (@4); + internal_fn cond_fn = get_conditional_internal_fn (uncond_op); } + (if (cond_fn != IFN_LAST + && vectorized_internal_fn_supported_p (cond_fn, op_type) + && element_precision (type) == element_precision (op_type)) (view_convert (cond_op (bit_not @0) @2 @3 (view_convert:op_type @1))))))) /* Same for ternary operations. */ @@ -5195,15 +5202,24 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) cond_op (COND_TERNARY) (simplify (vec_cond @0 (view_convert? (uncond_op@5 @1 @2 @3)) @4) - (with { tree op_type = TREE_TYPE (@5); } - (if (element_precision (type) == element_precision (op_type)) + (with { tree op_type = TREE_TYPE (@5); + internal_fn cond_fn + = get_conditional_internal_fn (as_internal_fn (uncond_op)); } + (if (cond_fn != IFN_LAST + && vectorized_internal_fn_supported_p (cond_fn, op_type) + && element_precision (type) == element_precision (op_type)) (view_convert (cond_op @0 @1 @2 @3 (view_convert:op_type @4)))))) (simplify (vec_cond @0 @1 (view_convert? (uncond_op@5 @2 @3 @4))) - (with { tree op_type = TREE_TYPE (@5); } - (if (element_precision (type) == element_precision (op_type)) + (with { tree op_type = TREE_TYPE (@5); + internal_fn cond_fn + = get_conditional_internal_fn (as_internal_fn (uncond_op)); } + (if (cond_fn != IFN_LAST + && vectorized_internal_fn_supported_p (cond_fn, op_type) + && element_precision (type) == element_precision (op_type)) (view_convert (cond_op (bit_not @0) @2 @3 @4 (view_convert:op_type @1))))))) +#endif /* Detect cases in which a VEC_COND_EXPR effectively replaces the "else" value of an IFN_COND_*. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a5e25c3..f9d770c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-03-05 Jakub Jelinek + PR tree-optimization/89570 + * gcc.dg/pr89570.c: New test. + PR tree-optimization/89566 * c-c++-common/pr89566.c: New test. diff --git a/gcc/testsuite/gcc.dg/pr89570.c b/gcc/testsuite/gcc.dg/pr89570.c new file mode 100644 index 0000000..cae5a25 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr89570.c @@ -0,0 +1,15 @@ +/* PR tree-optimization/89570 */ +/* { dg-do compile } */ +/* { dg-options "-O1 -ftree-vectorize -fno-trapping-math -fno-tree-dce -fno-tree-dominator-opts" } */ +/* { dg-additional-options "-mvsx" { target powerpc_vsx_ok } } */ + +void +foo (double *x, double *y, double *z) +{ + int i; + for (i = 0; i < 7; i += 2) + { + x[i] = y[i] ? z[i] / 2.0 : z[i]; + x[i + 1] = y[i + 1] ? z[i + 1] / 2.0 : z[i + 1]; + } +} -- cgit v1.1 From 386a83c170348577379c4def0bc41090be230333 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 5 Mar 2019 10:03:50 +0100 Subject: re PR bootstrap/89560 (ICE In function 'rtx_def* gen_vec_extract_lo_v64qi(rtx, rtx)') PR bootstrap/89560 * fold-const.c (fold_checksum_tree): Don't use fixed size buffer, instead alloca it only when needed with the needed size. * g++.dg/other/pr89560.C: New test. From-SVN: r269386 --- gcc/ChangeLog | 4 ++++ gcc/fold-const.c | 28 +++++++++++++++++----------- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/g++.dg/other/pr89560.C | 13 +++++++++++++ 4 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 gcc/testsuite/g++.dg/other/pr89560.C (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 54c736b..788ce54 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2019-03-05 Jakub Jelinek + PR bootstrap/89560 + * fold-const.c (fold_checksum_tree): Don't use fixed size buffer, + instead alloca it only when needed with the needed size. + PR tree-optimization/89570 * match.pd (vec_cond into cond_op simplification): Guard with vectorized_internal_fn_supported_p test and #if GIMPLE. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 8989fc7..571566a 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -12112,7 +12112,7 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx, { const tree_node **slot; enum tree_code code; - union tree_node buf; + union tree_node *buf; int i, len; recursive_label: @@ -12127,11 +12127,13 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx, && HAS_DECL_ASSEMBLER_NAME_P (expr)) { /* Allow DECL_ASSEMBLER_NAME and symtab_node to be modified. */ - memcpy ((char *) &buf, expr, tree_size (expr)); - SET_DECL_ASSEMBLER_NAME ((tree)&buf, NULL); - buf.decl_with_vis.symtab_node = NULL; - buf.base.nowarning_flag = 0; - expr = (tree) &buf; + size_t sz = tree_size (expr); + buf = XALLOCAVAR (union tree_node, sz); + memcpy ((char *) buf, expr, sz); + SET_DECL_ASSEMBLER_NAME ((tree) buf, NULL); + buf->decl_with_vis.symtab_node = NULL; + buf->base.nowarning_flag = 0; + expr = (tree) buf; } else if (TREE_CODE_CLASS (code) == tcc_type && (TYPE_POINTER_TO (expr) @@ -12143,8 +12145,10 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx, { /* Allow these fields to be modified. */ tree tmp; - memcpy ((char *) &buf, expr, tree_size (expr)); - expr = tmp = (tree) &buf; + size_t sz = tree_size (expr); + buf = XALLOCAVAR (union tree_node, sz); + memcpy ((char *) buf, expr, sz); + expr = tmp = (tree) buf; TYPE_CONTAINS_PLACEHOLDER_INTERNAL (tmp) = 0; TYPE_POINTER_TO (tmp) = NULL; TYPE_REFERENCE_TO (tmp) = NULL; @@ -12160,9 +12164,11 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx, { /* Allow TREE_NO_WARNING to be set. Perhaps we shouldn't allow that and change builtins.c etc. instead - see PR89543. */ - memcpy ((char *) &buf, expr, tree_size (expr)); - buf.base.nowarning_flag = 0; - expr = (tree) &buf; + size_t sz = tree_size (expr); + buf = XALLOCAVAR (union tree_node, sz); + memcpy ((char *) buf, expr, sz); + buf->base.nowarning_flag = 0; + expr = (tree) buf; } md5_process_bytes (expr, tree_size (expr), ctx); if (CODE_CONTAINS_STRUCT (code, TS_TYPED)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f9d770c..b9bfece 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-03-05 Jakub Jelinek + PR bootstrap/89560 + * g++.dg/other/pr89560.C: New test. + PR tree-optimization/89570 * gcc.dg/pr89570.c: New test. diff --git a/gcc/testsuite/g++.dg/other/pr89560.C b/gcc/testsuite/g++.dg/other/pr89560.C new file mode 100644 index 0000000..deb9839 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/pr89560.C @@ -0,0 +1,13 @@ +// PR bootstrap/89560 +// { dg-do compile } + +#define TEN(x) x##0, x##1, x##2, x##3, x##4, x##5, x##6, x##7, x##8, x##9, +#define HUNDRED(x) TEN(x##0) TEN(x##1) TEN(x##2) TEN(x##3) TEN(x##4) \ + TEN(x##5) TEN(x##6) TEN(x##7) TEN(x##8) TEN(x##9) +int foo (int, ...); + +int +bar () +{ + return (foo (HUNDRED (1) 0)); +} -- cgit v1.1 From 186ae93c7b641f7fb94359b0bf764205624a0fd1 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 5 Mar 2019 14:38:59 +0100 Subject: re PR tree-optimization/89487 (ICE in expand_expr_addr_expr_1, at expr.c:7993) PR tree-optimization/89487 * gcc.dg/tree-ssa/pr89487.c: Include ../pr87600.h. (caml_interprete): Ifdef the whole body out if REG1 or REG2 macros aren't defined. Use REG1 instead of "%r15" and REG2 instead of "%r14". From-SVN: r269388 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/tree-ssa/pr89487.c | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b9bfece..a019b62 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2019-03-05 Jakub Jelinek + PR tree-optimization/89487 + * gcc.dg/tree-ssa/pr89487.c: Include ../pr87600.h. + (caml_interprete): Ifdef the whole body out if REG1 or REG2 macros + aren't defined. Use REG1 instead of "%r15" and REG2 instead of + "%r14". + PR bootstrap/89560 * g++.dg/other/pr89560.C: New test. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr89487.c b/gcc/testsuite/gcc.dg/tree-ssa/pr89487.c index a024196..974d005 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr89487.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr89487.c @@ -1,13 +1,18 @@ +/* PR tree-optimization/89487 */ /* { dg-do compile } */ /* { dg-options "-O2 -ftree-loop-distribution" } */ +#include "../pr87600.h" + void caml_interprete (void) { - register int *pc asm("%r15"); - register int *sp asm("%r14"); +#if defined(REG1) && defined(REG2) + register int *pc asm(REG1); + register int *sp asm(REG2); int i; for (i = 0; i < 3; ++i) *--sp = pc[i]; +#endif } -- cgit v1.1 From deeec83de4379e253af4f41eaaf8f45d4db17302 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 5 Mar 2019 14:57:12 +0000 Subject: re PR tree-optimization/89594 (ICE: Segmentation fault (in gsi_for_stmt(gimple*))) 2019-03-05 Richard Biener PR tree-optimization/89594 * tree-if-conv.c (pass_if_conversion::execute): Handle case where .LOOP_VECTORIZED_FUNCTION was removed. * gcc.dg/pr89594.c: New testcase. From-SVN: r269389 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/pr89594.c | 24 ++++++++++++++++++++++++ gcc/tree-if-conv.c | 2 ++ 4 files changed, 37 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr89594.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 788ce54..4fb2792 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-05 Richard Biener + + PR tree-optimization/89594 + * tree-if-conv.c (pass_if_conversion::execute): Handle + case where .LOOP_VECTORIZED_FUNCTION was removed. + 2019-03-05 Jakub Jelinek PR bootstrap/89560 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a019b62..529aa3c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-05 Richard Biener + + PR tree-optimization/89594 + * gcc.dg/pr89594.c: New testcase. + 2019-03-05 Jakub Jelinek PR tree-optimization/89487 diff --git a/gcc/testsuite/gcc.dg/pr89594.c b/gcc/testsuite/gcc.dg/pr89594.c new file mode 100644 index 0000000..4039f73 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr89594.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-O -ftree-loop-if-convert -ftree-loop-vectorize -fno-tree-ch" } */ + +int h3; + +void +in (void) +{ + long int zr; + int ee = 0; + + for (zr = 0; zr < 1; zr = h3) + { + ee = !!h3 ? zr : 0; + + h3 = 0; + while (h3 < 0) + h3 = 0; + } + + h3 = 0; + while (h3 < 1) + h3 = !!ee ? (!!h3 + 1) : 0; +} diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index fe3cc02..ec2db00 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -3176,6 +3176,8 @@ pass_if_conversion::execute (function *fun) for (unsigned i = 0; i < preds.length (); ++i) { gimple *g = preds[i]; + if (!gimple_bb (g)) + continue; unsigned ifcvt_loop = tree_to_uhwi (gimple_call_arg (g, 0)); if (!get_loop (fun, ifcvt_loop)) { -- cgit v1.1 From d7c50d679ffafaf5e7ba105cea765a307f60e2f3 Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Tue, 5 Mar 2019 15:04:01 +0000 Subject: [ARM] Fix PR89222 The GCC optimizer can generate symbols with non-zero offset from simple if-statements. Bit zero is used for the Arm/Thumb state bit, so relocations with offsets fail if it changes bit zero and the relocation forces bit zero to true. The fix is to disable offsets on function pointer symbols. gcc/ PR target/89222 * config/arm/arm.md (movsi): Use targetm.cannot_force_const_mem to decide when to split off a non-zero offset from a symbol. * config/arm/arm.c (arm_cannot_force_const_mem): Disallow offsets in function symbols. testsuite/ PR target/89222 * gcc.target/arm/pr89222.c: Add new test. From-SVN: r269390 --- gcc/ChangeLog | 8 ++++++ gcc/config/arm/arm.c | 11 +++++-- gcc/config/arm/arm.md | 52 +++++++++------------------------- gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/gcc.target/arm/pr89222.c | 32 +++++++++++++++++++++ 5 files changed, 67 insertions(+), 41 deletions(-) create mode 100644 gcc/testsuite/gcc.target/arm/pr89222.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4fb2792..d4e8cbe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-03-05 Wilco Dijkstra + + PR target/89222 + * config/arm/arm.md (movsi): Use targetm.cannot_force_const_mem + to decide when to split off a non-zero offset from a symbol. + * config/arm/arm.c (arm_cannot_force_const_mem): Disallow offsets + in function symbols. + 2019-03-05 Richard Biener PR tree-optimization/89594 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index f07f4cc..69b74a2 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -8940,11 +8940,16 @@ static bool arm_cannot_force_const_mem (machine_mode mode ATTRIBUTE_UNUSED, rtx x) { rtx base, offset; + split_const (x, &base, &offset); - if (ARM_OFFSETS_MUST_BE_WITHIN_SECTIONS_P) + if (SYMBOL_REF_P (base)) { - split_const (x, &base, &offset); - if (GET_CODE (base) == SYMBOL_REF + /* Function symbols cannot have an offset due to the Thumb bit. */ + if ((SYMBOL_REF_FLAGS (base) & SYMBOL_FLAG_FUNCTION) + && INTVAL (offset) != 0) + return true; + + if (ARM_OFFSETS_MUST_BE_WITHIN_SECTIONS_P && !offset_within_block_p (base, INTVAL (offset))) return true; } diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 7ee83a5..1805901 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -6016,53 +6016,29 @@ } } - if (ARM_OFFSETS_MUST_BE_WITHIN_SECTIONS_P) + split_const (operands[1], &base, &offset); + if (INTVAL (offset) != 0 + && targetm.cannot_force_const_mem (SImode, operands[1])) { - split_const (operands[1], &base, &offset); - if (GET_CODE (base) == SYMBOL_REF - && !offset_within_block_p (base, INTVAL (offset))) - { - tmp = can_create_pseudo_p () ? gen_reg_rtx (SImode) : operands[0]; - emit_move_insn (tmp, base); - emit_insn (gen_addsi3 (operands[0], tmp, offset)); - DONE; - } + tmp = can_create_pseudo_p () ? gen_reg_rtx (SImode) : operands[0]; + emit_move_insn (tmp, base); + emit_insn (gen_addsi3 (operands[0], tmp, offset)); + DONE; } + tmp = can_create_pseudo_p () ? NULL_RTX : operands[0]; + /* Recognize the case where operand[1] is a reference to thread-local - data and load its address to a register. */ + data and load its address to a register. Offsets have been split off + already. */ if (arm_tls_referenced_p (operands[1])) - { - rtx tmp = operands[1]; - rtx addend = NULL; - - if (GET_CODE (tmp) == CONST && GET_CODE (XEXP (tmp, 0)) == PLUS) - { - addend = XEXP (XEXP (tmp, 0), 1); - tmp = XEXP (XEXP (tmp, 0), 0); - } - - gcc_assert (GET_CODE (tmp) == SYMBOL_REF); - gcc_assert (SYMBOL_REF_TLS_MODEL (tmp) != 0); - - tmp = legitimize_tls_address (tmp, - !can_create_pseudo_p () ? operands[0] : 0); - if (addend) - { - tmp = gen_rtx_PLUS (SImode, tmp, addend); - tmp = force_operand (tmp, operands[0]); - } - operands[1] = tmp; - } + operands[1] = legitimize_tls_address (operands[1], tmp); else if (flag_pic && (CONSTANT_P (operands[1]) || symbol_mentioned_p (operands[1]) || label_mentioned_p (operands[1]))) - operands[1] = legitimize_pic_address (operands[1], SImode, - (!can_create_pseudo_p () - ? operands[0] - : NULL_RTX), NULL_RTX, - false /*compute_now*/); + operands[1] = + legitimize_pic_address (operands[1], SImode, tmp, NULL_RTX, false); } " ) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 529aa3c..7c57390 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-05 Wilco Dijkstra + + PR target/89222 + * gcc.target/arm/pr89222.c: Add new test. + 2019-03-05 Richard Biener PR tree-optimization/89594 diff --git a/gcc/testsuite/gcc.target/arm/pr89222.c b/gcc/testsuite/gcc.target/arm/pr89222.c new file mode 100644 index 0000000..d26d7df --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr89222.c @@ -0,0 +1,32 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +void g (void); + +void f1 (int x) +{ + if (x != (int) g + 3) + return; + g(); +} + +void (*a2)(void); + +void f2 (void) +{ + a2 = &g + 3; +} + +typedef void (*__sighandler_t)(int); +void handler (int); + +void f3 (int x) +{ + __sighandler_t h = &handler; + if (h != (__sighandler_t) 2 && h != (__sighandler_t) 1) + h (x); +} + +/* { dg-final { scan-assembler-times {add(?:s)?\tr[0-9]+, r[0-9]+, #3} 2 } } */ +/* { dg-final { scan-assembler-not {.word\tg\+3} } } */ +/* { dg-final { scan-assembler-not {.word\thandler-1} } } */ -- cgit v1.1 From cff1a1225d8750df872cada03b7957e4f1a6df98 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 5 Mar 2019 16:05:07 +0100 Subject: re PR tree-optimization/89570 (ICE in prepare_cmp_insn, at optabs.c:4001) PR tree-optimization/89570 * match.pd (vec_cond into cond_op simplification): Don't use get_conditional_internal_fn, use as_internal_fn (cond_op). Co-Authored-By: Richard Sandiford From-SVN: r269391 --- gcc/ChangeLog | 7 +++++++ gcc/match.pd | 34 +++++++++++++++------------------- 2 files changed, 22 insertions(+), 19 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d4e8cbe..b85b54c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-03-05 Jakub Jelinek + Richard Sandiford + + PR tree-optimization/89570 + * match.pd (vec_cond into cond_op simplification): Don't use + get_conditional_internal_fn, use as_internal_fn (cond_op). + 2019-03-05 Wilco Dijkstra PR target/89222 diff --git a/gcc/match.pd b/gcc/match.pd index 8bf6535..0d82bea 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -5176,24 +5176,26 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) if the target can do it in one go. This makes the operation conditional on c, so could drop potentially-trapping arithmetic, but that's a valid - simplification if the result of the operation isn't needed. */ + simplification if the result of the operation isn't needed. + + Avoid speculatively generating a stand-alone vector comparison + on targets that might not support them. Any target implementing + conditional internal functions must support the same comparisons + inside and outside a VEC_COND_EXPR. */ + #if GIMPLE (for uncond_op (UNCOND_BINARY) cond_op (COND_BINARY) (simplify (vec_cond @0 (view_convert? (uncond_op@4 @1 @2)) @3) - (with { tree op_type = TREE_TYPE (@4); - internal_fn cond_fn = get_conditional_internal_fn (uncond_op); } - (if (cond_fn != IFN_LAST - && vectorized_internal_fn_supported_p (cond_fn, op_type) + (with { tree op_type = TREE_TYPE (@4); } + (if (vectorized_internal_fn_supported_p (as_internal_fn (cond_op), op_type) && element_precision (type) == element_precision (op_type)) (view_convert (cond_op @0 @1 @2 (view_convert:op_type @3)))))) (simplify (vec_cond @0 @1 (view_convert? (uncond_op@4 @2 @3))) - (with { tree op_type = TREE_TYPE (@4); - internal_fn cond_fn = get_conditional_internal_fn (uncond_op); } - (if (cond_fn != IFN_LAST - && vectorized_internal_fn_supported_p (cond_fn, op_type) + (with { tree op_type = TREE_TYPE (@4); } + (if (vectorized_internal_fn_supported_p (as_internal_fn (cond_op), op_type) && element_precision (type) == element_precision (op_type)) (view_convert (cond_op (bit_not @0) @2 @3 (view_convert:op_type @1))))))) @@ -5202,20 +5204,14 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) cond_op (COND_TERNARY) (simplify (vec_cond @0 (view_convert? (uncond_op@5 @1 @2 @3)) @4) - (with { tree op_type = TREE_TYPE (@5); - internal_fn cond_fn - = get_conditional_internal_fn (as_internal_fn (uncond_op)); } - (if (cond_fn != IFN_LAST - && vectorized_internal_fn_supported_p (cond_fn, op_type) + (with { tree op_type = TREE_TYPE (@5); } + (if (vectorized_internal_fn_supported_p (as_internal_fn (cond_op), op_type) && element_precision (type) == element_precision (op_type)) (view_convert (cond_op @0 @1 @2 @3 (view_convert:op_type @4)))))) (simplify (vec_cond @0 @1 (view_convert? (uncond_op@5 @2 @3 @4))) - (with { tree op_type = TREE_TYPE (@5); - internal_fn cond_fn - = get_conditional_internal_fn (as_internal_fn (uncond_op)); } - (if (cond_fn != IFN_LAST - && vectorized_internal_fn_supported_p (cond_fn, op_type) + (with { tree op_type = TREE_TYPE (@5); } + (if (vectorized_internal_fn_supported_p (as_internal_fn (cond_op), op_type) && element_precision (type) == element_precision (op_type)) (view_convert (cond_op (bit_not @0) @2 @3 @4 (view_convert:op_type @1))))))) -- cgit v1.1 From 9616781de2cfd1ab1d0e0c5fa238b12988c39945 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 5 Mar 2019 17:22:16 +0100 Subject: re PR middle-end/89590 (ICE in maybe_emit_free_warning) PR middle-end/89590 * builtins.c (maybe_emit_free_warning): Punt if free doesn't have exactly one argument. * gcc.dg/pr89590.c: New test. From-SVN: r269392 --- gcc/ChangeLog | 6 ++++++ gcc/builtins.c | 3 +++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/pr89590.c | 11 +++++++++++ 4 files changed, 25 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr89590.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b85b54c..c02e488 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,10 @@ 2019-03-05 Jakub Jelinek + + PR middle-end/89590 + * builtins.c (maybe_emit_free_warning): Punt if free doesn't have + exactly one argument. + +2019-03-05 Jakub Jelinek Richard Sandiford PR tree-optimization/89570 diff --git a/gcc/builtins.c b/gcc/builtins.c index c19ca30..d216d6f 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -10604,6 +10604,9 @@ maybe_emit_sprintf_chk_warning (tree exp, enum built_in_function fcode) static void maybe_emit_free_warning (tree exp) { + if (call_expr_nargs (exp) != 1) + return; + tree arg = CALL_EXPR_ARG (exp, 0); STRIP_NOPS (arg); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7c57390..98289eb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-05 Jakub Jelinek + + PR middle-end/89590 + * gcc.dg/pr89590.c: New test. + 2019-03-05 Wilco Dijkstra PR target/89222 diff --git a/gcc/testsuite/gcc.dg/pr89590.c b/gcc/testsuite/gcc.dg/pr89590.c new file mode 100644 index 0000000..441b0f9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr89590.c @@ -0,0 +1,11 @@ +/* PR middle-end/89590 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -Wall -w" } */ + +void free (void *); + +void +foo (void) +{ + ((void (*)()) free) (); +} -- cgit v1.1 From f0c3b1337fbd9216c3c7c6c28066df8abf45cccb Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 5 Mar 2019 18:25:01 +0100 Subject: re PR target/89587 (gcc's rs6000 configuration unconditionally sets MULTIARCH_DIRNAME, even when multiarch is disabled) PR target/89587 * config/rs6000/t-linux (MULTIARCH_DIRNAME): Set to non-empty only if_multiarch. From-SVN: r269396 --- gcc/ChangeLog | 4 ++++ gcc/config/rs6000/t-linux | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c02e488..405bc38 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2019-03-05 Jakub Jelinek + PR target/89587 + * config/rs6000/t-linux (MULTIARCH_DIRNAME): Set to non-empty only + if_multiarch. + PR middle-end/89590 * builtins.c (maybe_emit_free_warning): Punt if free doesn't have exactly one argument. diff --git a/gcc/config/rs6000/t-linux b/gcc/config/rs6000/t-linux index acfde1f..aeb7440 100644 --- a/gcc/config/rs6000/t-linux +++ b/gcc/config/rs6000/t-linux @@ -4,7 +4,7 @@ ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float))) ifneq (,$(findstring powerpc64,$(target))) MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu) else -MULTIARCH_DIRNAME := powerpc-linux-gnu +MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu) endif ifneq (,$(findstring powerpcle,$(target))) MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME)) -- cgit v1.1 From 77fa4c4275502fb4a030db1799d82704395a03ab Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 5 Mar 2019 19:41:42 +0000 Subject: re PR go/89598 (go frontend fails to build against mpfr 2.4.2) PR go/89598 compiler: use GMP_RNDN rather than MPFR_RNDN This fixes the build with mpfr 2.4.2. Fixes https://gcc.gnu.org/PR89598 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/165418 From-SVN: r269399 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/expressions.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 49ebe32..de7a3e1 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -decbbfb563ecf4609a3148dc789ae77ab1c62768 +689d5bda159300dc12f559de2d47b8c1c762fcb9 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index b1f503a..9539963 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -17287,8 +17287,8 @@ Numeric_constant::hash(unsigned int seed) const break; case NC_COMPLEX: mpfr_init(m); - mpc_abs(m, this->u_.complex_val, MPFR_RNDN); - val = mpfr_get_ui(m, MPFR_RNDN); + mpc_abs(m, this->u_.complex_val, GMP_RNDN); + val = mpfr_get_ui(m, GMP_RNDN); mpfr_clear(m); break; case NC_FLOAT: -- cgit v1.1 From 9bf54c938ab8ab79a92a5f354686e103d66f1a1a Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 5 Mar 2019 20:49:21 +0000 Subject: sysinfo: add Flags to Statfs_t if not already there If there is no f_flags field in statfs_t then rename one of the f_spare fields, as happened in Linux kernel version 2.6.36. This fixes the build on CentOS 5.11. The CentOS kernel will hopefully not fill in the f_spare field, so the resulting flags will be zero. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/165417 From-SVN: r269401 --- gcc/go/gofrontend/MERGE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index de7a3e1..b800330 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -689d5bda159300dc12f559de2d47b8c1c762fcb9 +3ae3024cae07fe7e85968ad2583add350616b296 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. -- cgit v1.1 From dbcd32f889365695b3ed835a3a7de5d23048f43b Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 5 Mar 2019 17:17:13 -0500 Subject: re PR c++/86485 ("anonymous" maybe-uninitialized false positive with ternary operator) * class.c (is_really_empty_class): Add ignore_vptr parm. While looking at PR86485, I noticed that many uses of is_really_empty_class were overlooking that it returned true for a class with only a vptr; initialization of such a class is not trivial. Marek's P1064 patch fixed one place in constexpr.c to also check for a vtable, but there are several others that still don't. This patch requires callers to explicitly choose which behavior they want. Currently the uses in constexpr.c want to consider the vptr, and other uses don't. * class.c (is_really_empty_class): Add ignore_vptr parm. (trivial_default_constructor_is_constexpr): Pass it. * call.c (build_over_call): Pass it. * constexpr.c (cxx_eval_constant_expression): Pass it instead of checking TYPE_POLYMORPHIC_P. (cxx_eval_component_reference, potential_constant_expression_1): Pass it. * cp-gimplify.c (simple_empty_class_p): Pass it. * init.c (expand_aggr_init_1): Pass it. From-SVN: r269402 --- gcc/cp/ChangeLog | 12 ++++++++++++ gcc/cp/call.c | 2 +- gcc/cp/class.c | 18 ++++++++++++------ gcc/cp/constexpr.c | 12 ++++-------- gcc/cp/cp-gimplify.c | 2 +- gcc/cp/cp-tree.h | 2 +- gcc/cp/init.c | 2 +- 7 files changed, 32 insertions(+), 18 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6997180..d2cb7fd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,15 @@ +2019-03-05 Jason Merrill + + * class.c (is_really_empty_class): Add ignore_vptr parm. + (trivial_default_constructor_is_constexpr): Pass it. + * call.c (build_over_call): Pass it. + * constexpr.c (cxx_eval_constant_expression): Pass it instead of + checking TYPE_POLYMORPHIC_P. + (cxx_eval_component_reference, potential_constant_expression_1): + Pass it. + * cp-gimplify.c (simple_empty_class_p): Pass it. + * init.c (expand_aggr_init_1): Pass it. + 2019-03-04 Paolo Carlini PR c++/84605 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 1a29eb7..04516eb 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -8566,7 +8566,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) tree arg = argarray[1]; location_t loc = cp_expr_loc_or_loc (arg, input_location); - if (is_really_empty_class (type)) + if (is_really_empty_class (type, /*ignore_vptr*/true)) { /* Avoid copying empty classes. */ val = build2 (COMPOUND_EXPR, type, arg, to); diff --git a/gcc/cp/class.c b/gcc/cp/class.c index f44acfd..0d4d35b 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5137,7 +5137,8 @@ trivial_default_constructor_is_constexpr (tree t) /* A defaulted trivial default constructor is constexpr if there is nothing to initialize. */ gcc_assert (!TYPE_HAS_COMPLEX_DFLT (t)); - return is_really_empty_class (t); + /* A class with a vptr doesn't have a trivial default ctor. */ + return is_really_empty_class (t, /*ignore_vptr*/true); } /* Returns true iff class T has a constexpr default constructor. */ @@ -8310,10 +8311,12 @@ is_empty_class (tree type) } /* Returns true if TYPE contains no actual data, just various - possible combinations of empty classes and possibly a vptr. */ + possible combinations of empty classes. If IGNORE_VPTR is true, + a vptr doesn't prevent the class from being considered empty. Typically + we want to ignore the vptr on assignment, and not on initialization. */ bool -is_really_empty_class (tree type) +is_really_empty_class (tree type, bool ignore_vptr) { if (CLASS_TYPE_P (type)) { @@ -8327,22 +8330,25 @@ is_really_empty_class (tree type) if (COMPLETE_TYPE_P (type) && is_empty_class (type)) return true; + if (!ignore_vptr && TYPE_CONTAINS_VPTR_P (type)) + return false; + for (binfo = TYPE_BINFO (type), i = 0; BINFO_BASE_ITERATE (binfo, i, base_binfo); ++i) - if (!is_really_empty_class (BINFO_TYPE (base_binfo))) + if (!is_really_empty_class (BINFO_TYPE (base_binfo), ignore_vptr)) return false; for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field)) if (TREE_CODE (field) == FIELD_DECL && !DECL_ARTIFICIAL (field) /* An unnamed bit-field is not a data member. */ && !DECL_UNNAMED_BIT_FIELD (field) - && !is_really_empty_class (TREE_TYPE (field))) + && !is_really_empty_class (TREE_TYPE (field), ignore_vptr)) return false; return true; } else if (TREE_CODE (type) == ARRAY_TYPE) return (integer_zerop (array_type_nelts_top (type)) - || is_really_empty_class (TREE_TYPE (type))); + || is_really_empty_class (TREE_TYPE (type), ignore_vptr)); return false; } diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 65888b6..1c3c725 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -2714,7 +2714,7 @@ cxx_eval_component_reference (const constexpr_ctx *ctx, tree t, /* We only create a CONSTRUCTOR for a subobject when we modify it, so empty classes never get represented; throw together a value now. */ - if (is_really_empty_class (TREE_TYPE (t))) + if (is_really_empty_class (TREE_TYPE (t), /*ignore_vptr*/false)) return build_constructor (TREE_TYPE (t), NULL); gcc_assert (DECL_CONTEXT (part) == TYPE_MAIN_VARIANT (TREE_TYPE (whole))); @@ -4427,12 +4427,8 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, CONST_DECL for aggregate constants. */ if (lval) return t; - /* is_really_empty_class doesn't take into account _vptr, so initializing - otherwise empty class with { } would overwrite the initializer that - initialize_vtable created for us. */ if (COMPLETE_TYPE_P (TREE_TYPE (t)) - && !TYPE_POLYMORPHIC_P (TREE_TYPE (t)) - && is_really_empty_class (TREE_TYPE (t))) + && is_really_empty_class (TREE_TYPE (t), /*ignore_vptr*/false)) { /* If the class is empty, we aren't actually loading anything. */ r = build_constructor (TREE_TYPE (t), NULL); @@ -4480,7 +4476,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, else if (TYPE_REF_P (TREE_TYPE (t))) /* Defer, there's no lvalue->rvalue conversion. */; else if (COMPLETE_TYPE_P (TREE_TYPE (t)) - && is_really_empty_class (TREE_TYPE (t))) + && is_really_empty_class (TREE_TYPE (t), /*ignore_vptr*/false)) { /* If the class is empty, we aren't actually loading anything. */ r = build_constructor (TREE_TYPE (t), NULL); @@ -5956,7 +5952,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, || (DECL_INITIAL (t) && !DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (t))) && COMPLETE_TYPE_P (TREE_TYPE (t)) - && !is_really_empty_class (TREE_TYPE (t))) + && !is_really_empty_class (TREE_TYPE (t), /*ignore_vptr*/false)) { if (flags & tf_error) non_const_var_error (t); diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index 56f717d..26be1fd1 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -584,7 +584,7 @@ simple_empty_class_p (tree type, tree op) && !TREE_CLOBBER_P (op)) || (TREE_CODE (op) == CALL_EXPR && !CALL_EXPR_RETURN_SLOT_OPT (op))) - && is_really_empty_class (type); + && is_really_empty_class (type, /*ignore_vptr*/true); } /* Returns true if evaluating E as an lvalue has side-effects; diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 663a23b..15e39e1 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -6267,7 +6267,7 @@ extern void finish_struct_1 (tree); extern int resolves_to_fixed_type_p (tree, int *); extern void init_class_processing (void); extern int is_empty_class (tree); -extern bool is_really_empty_class (tree); +extern bool is_really_empty_class (tree, bool); extern void pushclass (tree); extern void popclass (void); extern void push_nested_class (tree); diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 606d246..eb3b504 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2058,7 +2058,7 @@ expand_aggr_init_1 (tree binfo, tree true_exp, tree exp, tree init, int flags, /* If the type has data but no user-provided ctor, we need to zero out the object. */ if (!type_has_user_provided_constructor (type) - && !is_really_empty_class (type)) + && !is_really_empty_class (type, /*ignore_vptr*/true)) { tree field_size = NULL_TREE; if (exp != true_exp && CLASSTYPE_AS_BASE (type) != type) -- cgit v1.1 From 507318f109624f58d4bf554c3ad284cdf09324e3 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 5 Mar 2019 17:20:41 -0500 Subject: PR c++/86485 - -Wmaybe-unused with empty class ?: The problem in this testcase is that the front end expects an rvalue COND_EXPR to initialize a single temporary from one of the arms. But because gimplify_cond_expr used MODIFY_EXPR, instead the arms would each create their own temporary and then copy that into the common temporary. So, let's use INIT_EXPR instead. * gimplify.c (gimplify_cond_expr): Use INIT_EXPR. From-SVN: r269403 --- gcc/ChangeLog | 5 +++++ gcc/gimplify.c | 4 ++-- gcc/testsuite/g++.dg/init/empty2.C | 12 ++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/g++.dg/init/empty2.C (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 405bc38..df50f59 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-03-02 Jason Merrill + + PR c++/86485 - -Wmaybe-unused with empty class ?: + * gimplify.c (gimplify_cond_expr): Use INIT_EXPR. + 2019-03-05 Jakub Jelinek PR target/89587 diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 983635b..fa85b1c 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4024,11 +4024,11 @@ gimplify_cond_expr (tree *expr_p, gimple_seq *pre_p, fallback_t fallback) /* Build the new then clause, `tmp = then_;'. But don't build the assignment if the value is void; in C++ it can be if it's a throw. */ if (!VOID_TYPE_P (TREE_TYPE (then_))) - TREE_OPERAND (expr, 1) = build2 (MODIFY_EXPR, type, tmp, then_); + TREE_OPERAND (expr, 1) = build2 (INIT_EXPR, type, tmp, then_); /* Similarly, build the new else clause, `tmp = else_;'. */ if (!VOID_TYPE_P (TREE_TYPE (else_))) - TREE_OPERAND (expr, 2) = build2 (MODIFY_EXPR, type, tmp, else_); + TREE_OPERAND (expr, 2) = build2 (INIT_EXPR, type, tmp, else_); TREE_TYPE (expr) = void_type_node; recalculate_side_effects (expr); diff --git a/gcc/testsuite/g++.dg/init/empty2.C b/gcc/testsuite/g++.dg/init/empty2.C new file mode 100644 index 0000000..f0d8e3f --- /dev/null +++ b/gcc/testsuite/g++.dg/init/empty2.C @@ -0,0 +1,12 @@ +// PR c++/86485 +// { dg-additional-options -Wmaybe-uninitialized } + +struct E {}; +struct S { S () {} E e; }; +void foo (S); + +void +bar (bool b) +{ + foo (b ? S () : S ()); +} -- cgit v1.1 From b211cd1b4639a0ee3be5f643bde10b1c1683bb58 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 5 Mar 2019 22:40:21 +0000 Subject: cmd/go: pass -X64 to ar on aix/ppc64 On aix/ppc64, ar tool must always have -X64 argument if it aims to create 64 bits archives. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/165317 From-SVN: r269404 --- gcc/go/gofrontend/MERGE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index b800330..3315957 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -3ae3024cae07fe7e85968ad2583add350616b296 +14e48e756af205a68374c872f3bd03d62ccd70bb The first line of this file holds the git revision number of the last merge done from the gofrontend repository. -- cgit v1.1 From 03ac8302a60099632ea1f95af14db5dfd83f2970 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 5 Mar 2019 23:05:38 +0000 Subject: runtime: enable precise GC checks when using stack maps In the runtime there are bad pointer checks that currently don't work with the concervative collector. With stack maps, the GC is precise and the checks should work. Enable them. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/153871 From-SVN: r269406 --- gcc/go/gofrontend/MERGE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 3315957..78dd824 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -14e48e756af205a68374c872f3bd03d62ccd70bb +3f8ddaa1d773309b6a4b8e4640f8b9675d9764c6 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. -- cgit v1.1 From d77e925912d586fe60cfc5f4c2b84134996e6fe7 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 6 Mar 2019 00:16:13 +0000 Subject: Daily bump. From-SVN: r269409 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 8db54c9..3e15e14 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20190305 +20190306 -- cgit v1.1 From 956cb6d39762a731759f4a656f4ca0d8aae15cc2 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 6 Mar 2019 05:02:16 +0000 Subject: re PR go/89598 (go frontend fails to build against mpfr 2.4.2) PR go/89598 compiler: use GMP_RNDN rather than MPFR_RNDN Missed one last time around. This fixes the build with mpfr 2.4.2. Fixes https://gcc.gnu.org/PR89598 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/165420 From-SVN: r269411 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/expressions.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 78dd824..487548a 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -3f8ddaa1d773309b6a4b8e4640f8b9675d9764c6 +9b1374ded3d5e352a655d96bfe1bfb6aa1491a98 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 9539963..f32b7a4 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -17292,7 +17292,7 @@ Numeric_constant::hash(unsigned int seed) const mpfr_clear(m); break; case NC_FLOAT: - f = mpfr_get_d_2exp(&e, this->u_.float_val, MPFR_RNDN) * 4294967295.0; + f = mpfr_get_d_2exp(&e, this->u_.float_val, GMP_RNDN) * 4294967295.0; val = static_cast(e + static_cast(f)); break; default: -- cgit v1.1 From bb7c147fc8197a85a29f7d2d6e0f78331800edec Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 6 Mar 2019 11:01:16 +0100 Subject: Use --coverage instead of -fprofile-arcs -ftest-coverage in documentation (PR gcov-profile/89577). 2019-03-06 Martin Liska PR gcov-profile/89577 * doc/gcov.texi: Prefer to use --coverage. * doc/sourcebuild.texi: Likewise. From-SVN: r269415 --- gcc/ChangeLog | 6 ++++++ gcc/doc/gcov.texi | 10 +++++----- gcc/doc/sourcebuild.texi | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index df50f59..2603a77 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-06 Martin Liska + + PR gcov-profile/89577 + * doc/gcov.texi: Prefer to use --coverage. + * doc/sourcebuild.texi: Likewise. + 2019-03-02 Jason Merrill PR c++/86485 - -Wmaybe-unused with empty class ?: diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi index a128f5f..eaac2f6 100644 --- a/gcc/doc/gcov.texi +++ b/gcc/doc/gcov.texi @@ -486,8 +486,8 @@ are @emph{exactly} 0% and 100% respectively. Other values which would conventionally be rounded to 0% or 100% are instead printed as the nearest non-boundary value. -When using @command{gcov}, you must first compile your program with two -special GCC options: @samp{-fprofile-arcs -ftest-coverage}. +When using @command{gcov}, you must first compile your program +with a special GCC option @samp{--coverage}. This tells the compiler to generate additional information needed by gcov (basically a flow graph of the program) and also includes additional code in the object files for generating the extra profiling @@ -504,7 +504,7 @@ for each line. For example, if your program is called @file{tmp.cpp}, this is what you see when you use the basic @command{gcov} facility: @smallexample -$ g++ -fprofile-arcs -ftest-coverage tmp.cpp +$ g++ --coverage tmp.cpp $ a.out $ gcov tmp.cpp -m File 'tmp.cpp' @@ -802,8 +802,8 @@ new execution counts and finally writes the data to the file. @section Using @command{gcov} with GCC Optimization If you plan to use @command{gcov} to help optimize your code, you must -first compile your program with two special GCC options: -@samp{-fprofile-arcs -ftest-coverage}. Aside from that, you can use any +first compile your program with a special GCC option +@samp{--coverage}. Aside from that, you can use any other GCC options; but if you want to prove that every single line in your program was executed, you should not compile with optimization at the same time. On some machines the optimizer can eliminate some diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index a670456..cf12d74 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -2967,7 +2967,7 @@ in @file{lib/gcc-dg.exp} to compile and run the test program. A typical @command{gcov} test contains the following DejaGnu commands within comments: @smallexample -@{ dg-options "-fprofile-arcs -ftest-coverage" @} +@{ dg-options "--coverage" @} @{ dg-do run @{ target native @} @} @{ dg-final @{ run-gcov sourcefile @} @} @end smallexample -- cgit v1.1 From 3050b357660bf0425e0ac63c22960d2ec3af4572 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 6 Mar 2019 10:13:08 +0000 Subject: re PR middle-end/89551 (Test case gcc.dg/uninit-pred-8_b.c fails after r269302) 2019-03-06 Richard Biener PR testsuite/89551 * gcc.dg/uninit-pred-8_b.c: Force logical-op-non-short-circuit the way that makes the testcase PASS. From-SVN: r269416 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/uninit-pred-8_b.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 98289eb..828ed02 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-06 Richard Biener + + PR testsuite/89551 + * gcc.dg/uninit-pred-8_b.c: Force logical-op-non-short-circuit + the way that makes the testcase PASS. + 2019-03-05 Jakub Jelinek PR middle-end/89590 diff --git a/gcc/testsuite/gcc.dg/uninit-pred-8_b.c b/gcc/testsuite/gcc.dg/uninit-pred-8_b.c index 06e2eba..d9c3c42 100644 --- a/gcc/testsuite/gcc.dg/uninit-pred-8_b.c +++ b/gcc/testsuite/gcc.dg/uninit-pred-8_b.c @@ -1,6 +1,7 @@ - /* { dg-do compile } */ -/* { dg-options "-Wuninitialized -O2" } */ +/* ??? Jump threading makes a mess of the logical-op-non-short-circuit=0 case + so force it our way. */ +/* { dg-options "-Wuninitialized -O2 --param logical-op-non-short-circuit=1" } */ int g; void bar(); -- cgit v1.1 From 9f54ba8f7dfb00d834893a746db141a409778ad9 Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Wed, 6 Mar 2019 11:45:51 +0100 Subject: [ARC] Fix logic set UNALIGNED_ACCESS gcc/ xxxx-xx-xx Claudiu Zissulescu * config/arc/arc-c.def (__ARC_UNALIGNED__): Set it on unaligned_access variable. * config/arc/arc.c (arc_override_options): Set unaligned access default on for HS CPUs. * config/arc/arc.h (STRICT_ALIGNMENT): Fix logic. From-SVN: r269417 --- gcc/ChangeLog | 8 ++++++++ gcc/config/arc/arc-c.def | 2 +- gcc/config/arc/arc.c | 4 ++++ gcc/config/arc/arc.h | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2603a77..3408e67 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-03-06 Claudiu Zissulescu + + * config/arc/arc-c.def (__ARC_UNALIGNED__): Set it on + unaligned_access variable. + * config/arc/arc.c (arc_override_options): Set unaligned access + default on for HS CPUs. + * config/arc/arc.h (STRICT_ALIGNMENT): Fix logic. + 2019-03-06 Martin Liska PR gcov-profile/89577 diff --git a/gcc/config/arc/arc-c.def b/gcc/config/arc/arc-c.def index 9c0ba2c..9472b48 100644 --- a/gcc/config/arc/arc-c.def +++ b/gcc/config/arc/arc-c.def @@ -29,7 +29,7 @@ ARC_C_DEF ("__ARC_MUL64__", TARGET_MUL64_SET) ARC_C_DEF ("__ARC_MUL32BY16__", TARGET_MULMAC_32BY16_SET) ARC_C_DEF ("__ARC_SIMD__", TARGET_SIMD_SET) ARC_C_DEF ("__ARC_RF16__", TARGET_RF16) -ARC_C_DEF ("__ARC_UNALIGNED__", !STRICT_ALIGNMENT) +ARC_C_DEF ("__ARC_UNALIGNED__", unaligned_access) ARC_C_DEF ("__ARC_BARREL_SHIFTER__", TARGET_BARREL_SHIFTER) diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index de2c8d5..3b8c299 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -1313,6 +1313,10 @@ arc_override_options (void) if (TARGET_LONG_CALLS_SET) target_flags &= ~MASK_MILLICODE_THUNK_SET; + /* Set unaligned to all HS cpus. */ + if (!global_options_set.x_unaligned_access && TARGET_HS) + unaligned_access = 1; + /* These need to be done at start up. It's convenient to do them here. */ arc_init (); } diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index 12b4b62..894eb39 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -285,7 +285,7 @@ if (GET_MODE_CLASS (MODE) == MODE_INT \ /* On the ARC the lower address bits are masked to 0 as necessary. The chip won't croak when given an unaligned address, but the insn will still fail to produce the correct result. */ -#define STRICT_ALIGNMENT (!unaligned_access && !TARGET_HS) +#define STRICT_ALIGNMENT (!unaligned_access) /* Layout of source language data types. */ -- cgit v1.1 From 0e1a6d27009cf81ff7114f8ca4b8c71f122774b4 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 6 Mar 2019 14:19:56 +0000 Subject: mksysinfo: actually use modified Statfs_t value Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/165737 From-SVN: r269424 --- gcc/go/gofrontend/MERGE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 487548a..a93dedb 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -9b1374ded3d5e352a655d96bfe1bfb6aa1491a98 +13c98c3477647888fc7a186e9055793b0961e806 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. -- cgit v1.1 From ec2de569275fe76e9f7e4ca931e987be5638359f Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 6 Mar 2019 15:34:50 +0000 Subject: PR c++/87378 - bogus -Wredundant-move warning. * typeck.c (maybe_warn_pessimizing_move): See if the maybe-rvalue overload resolution would actually succeed. * g++.dg/cpp0x/Wredundant-move1.C (fn4): Drop dg-warning. * g++.dg/cpp0x/Wredundant-move7.C: New test. From-SVN: r269427 --- gcc/cp/ChangeLog | 6 +++ gcc/cp/typeck.c | 22 ++++++++-- gcc/testsuite/ChangeLog | 6 +++ gcc/testsuite/g++.dg/cpp0x/Wredundant-move1.C | 3 +- gcc/testsuite/g++.dg/cpp0x/Wredundant-move7.C | 59 +++++++++++++++++++++++++++ 5 files changed, 91 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/Wredundant-move7.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d2cb7fd..cfd86b2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2019-03-06 Marek Polacek + + PR c++/87378 - bogus -Wredundant-move warning. + * typeck.c (maybe_warn_pessimizing_move): See if the maybe-rvalue + overload resolution would actually succeed. + 2019-03-05 Jason Merrill * class.c (is_really_empty_class): Add ignore_vptr parm. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 1bf9ad8..43ff3d6 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -9429,10 +9429,24 @@ maybe_warn_pessimizing_move (tree retval, tree functype) do maybe-rvalue overload resolution even without std::move. */ else if (treat_lvalue_as_rvalue_p (arg, /*parm_ok*/true)) { - auto_diagnostic_group d; - if (warning_at (loc, OPT_Wredundant_move, - "redundant move in return statement")) - inform (loc, "remove % call"); + /* Make sure that the overload resolution would actually succeed + if we removed the std::move call. */ + tree t = convert_for_initialization (NULL_TREE, functype, + move (arg), + (LOOKUP_NORMAL + | LOOKUP_ONLYCONVERTING + | LOOKUP_PREFER_RVALUE), + ICR_RETURN, NULL_TREE, 0, + tf_none); + /* If this worked, implicit rvalue would work, so the call to + std::move is redundant. */ + if (t != error_mark_node) + { + auto_diagnostic_group d; + if (warning_at (loc, OPT_Wredundant_move, + "redundant move in return statement")) + inform (loc, "remove % call"); + } } } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 828ed02..9b2951f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-06 Marek Polacek + + PR c++/87378 - bogus -Wredundant-move warning. + * g++.dg/cpp0x/Wredundant-move1.C (fn4): Drop dg-warning. + * g++.dg/cpp0x/Wredundant-move7.C: New test. + 2019-03-06 Richard Biener PR testsuite/89551 diff --git a/gcc/testsuite/g++.dg/cpp0x/Wredundant-move1.C b/gcc/testsuite/g++.dg/cpp0x/Wredundant-move1.C index 5d4a25d..e70f3cd 100644 --- a/gcc/testsuite/g++.dg/cpp0x/Wredundant-move1.C +++ b/gcc/testsuite/g++.dg/cpp0x/Wredundant-move1.C @@ -59,7 +59,8 @@ T fn4 (const T t) { // t is const: will decay into copy despite std::move, so it's redundant. - return std::move (t); // { dg-warning "redundant move in return statement" } + // We used to warn about this, but no longer since c++/87378. + return std::move (t); } int diff --git a/gcc/testsuite/g++.dg/cpp0x/Wredundant-move7.C b/gcc/testsuite/g++.dg/cpp0x/Wredundant-move7.C new file mode 100644 index 0000000..015d7c4 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/Wredundant-move7.C @@ -0,0 +1,59 @@ +// PR c++/87378 +// { dg-do compile { target c++11 } } +// { dg-options "-Wredundant-move" } + +// Define std::move. +namespace std { + template + struct remove_reference + { typedef _Tp type; }; + + template + struct remove_reference<_Tp&> + { typedef _Tp type; }; + + template + struct remove_reference<_Tp&&> + { typedef _Tp type; }; + + template + constexpr typename std::remove_reference<_Tp>::type&& + move(_Tp&& __t) noexcept + { return static_cast::type&&>(__t); } +} + +struct S1 { S1(S1 &&); }; +struct S2 : S1 {}; + +S1 +f (S2 s) +{ + return std::move(s); // { dg-bogus "redundant move in return statement" } +} + +struct R1 { + R1(R1 &&); + R1(const R1 &&); +}; +struct R2 : R1 {}; + +R1 +f2 (const R2 s) +{ + return std::move(s); // { dg-bogus "redundant move in return statement" } +} + +struct T1 { + T1(const T1 &); + T1(T1 &&); + T1(const T1 &&); +}; +struct T2 : T1 {}; + +T1 +f3 (const T2 s) +{ + // Without std::move: const T1 & + // With std::move: const T1 && + return std::move(s); // { dg-bogus "redundant move in return statement" } +} -- cgit v1.1 From 2713e5db399787c5937856c503a924470ec372b8 Mon Sep 17 00:00:00 2001 From: Peter Bergner Date: Wed, 6 Mar 2019 15:36:43 +0000 Subject: re PR rtl-optimization/88845 (ICE in lra_set_insn_recog_data, at lra.c:1010) gcc/ PR rtl-optimization/88845 * config/rs6000/rs6000.c (rs6000_emit_move_si_sf_subreg): Enable during LRA. * lra.c (remove_scratches_1): New function. (remove_scratches): Use it. (lra_emit_move): Likewise. gcc/testsuite/ PR rtl-optimization/88845 * gcc.target/powerpc/pr88845.c: New test. From-SVN: r269428 --- gcc/ChangeLog | 9 ++++ gcc/config/rs6000/rs6000.c | 2 +- gcc/lra.c | 67 +++++++++++++++++------------- gcc/testsuite/ChangeLog | 5 +++ gcc/testsuite/gcc.target/powerpc/pr88845.c | 24 +++++++++++ 5 files changed, 78 insertions(+), 29 deletions(-) create mode 100644 gcc/testsuite/gcc.target/powerpc/pr88845.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3408e67..8a10820 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2019-03-06 Peter Bergner + + PR rtl-optimization/88845 + * config/rs6000/rs6000.c (rs6000_emit_move_si_sf_subreg): Enable during + LRA. + * lra.c (remove_scratches_1): New function. + (remove_scratches): Use it. + (lra_emit_move): Likewise. + 2019-03-06 Claudiu Zissulescu * config/arc/arc-c.def (__ARC_UNALIGNED__): Set it on diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index b489bef..d72a51a 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -9890,7 +9890,7 @@ valid_sf_si_move (rtx dest, rtx src, machine_mode mode) static bool rs6000_emit_move_si_sf_subreg (rtx dest, rtx source, machine_mode mode) { - if (TARGET_DIRECT_MOVE_64BIT && !lra_in_progress && !reload_completed + if (TARGET_DIRECT_MOVE_64BIT && !reload_completed && (!SUBREG_P (dest) || !sf_subreg_operand (dest, mode)) && SUBREG_P (source) && sf_subreg_operand (source, mode)) { diff --git a/gcc/lra.c b/gcc/lra.c index f130065..bef2f67 100644 --- a/gcc/lra.c +++ b/gcc/lra.c @@ -159,6 +159,7 @@ static void invalidate_insn_recog_data (int); static int get_insn_freq (rtx_insn *); static void invalidate_insn_data_regno_info (lra_insn_recog_data_t, rtx_insn *, int); +static void remove_scratches_1 (rtx_insn *); /* Expand all regno related info needed for LRA. */ static void @@ -494,7 +495,11 @@ lra_emit_move (rtx x, rtx y) if (rtx_equal_p (x, y)) return; old = max_reg_num (); - emit_move_insn (x, y); + rtx_insn *insn = emit_move_insn (x, y); + /* The move pattern may require scratch registers, so convert them + into real registers now. */ + if (insn != NULL_RTX) + remove_scratches_1 (insn); if (REG_P (x)) lra_reg_info[ORIGINAL_REGNO (x)].last_reload = ++lra_curr_reload_num; /* Function emit_move can create pseudos -- so expand the pseudo @@ -2077,47 +2082,53 @@ lra_register_new_scratch_op (rtx_insn *insn, int nop, int icode) add_reg_note (insn, REG_UNUSED, op); } -/* Change scratches onto pseudos and save their location. */ +/* Change INSN's scratches into pseudos and save their location. */ static void -remove_scratches (void) +remove_scratches_1 (rtx_insn *insn) { int i; bool insn_changed_p; - basic_block bb; - rtx_insn *insn; rtx reg; lra_insn_recog_data_t id; struct lra_static_insn_data *static_id; + id = lra_get_insn_recog_data (insn); + static_id = id->insn_static_data; + insn_changed_p = false; + for (i = 0; i < static_id->n_operands; i++) + if (GET_CODE (*id->operand_loc[i]) == SCRATCH + && GET_MODE (*id->operand_loc[i]) != VOIDmode) + { + insn_changed_p = true; + *id->operand_loc[i] = reg + = lra_create_new_reg (static_id->operand[i].mode, + *id->operand_loc[i], ALL_REGS, NULL); + lra_register_new_scratch_op (insn, i, id->icode); + if (lra_dump_file != NULL) + fprintf (lra_dump_file, + "Removing SCRATCH in insn #%u (nop %d)\n", + INSN_UID (insn), i); + } + if (insn_changed_p) + /* Because we might use DF right after caller-saves sub-pass + we need to keep DF info up to date. */ + df_insn_rescan (insn); +} + +/* Change scratches into pseudos and save their location. */ +static void +remove_scratches (void) +{ + basic_block bb; + rtx_insn *insn; + scratches.create (get_max_uid ()); bitmap_initialize (&scratch_bitmap, ®_obstack); bitmap_initialize (&scratch_operand_bitmap, ®_obstack); FOR_EACH_BB_FN (bb, cfun) FOR_BB_INSNS (bb, insn) if (INSN_P (insn)) - { - id = lra_get_insn_recog_data (insn); - static_id = id->insn_static_data; - insn_changed_p = false; - for (i = 0; i < static_id->n_operands; i++) - if (GET_CODE (*id->operand_loc[i]) == SCRATCH - && GET_MODE (*id->operand_loc[i]) != VOIDmode) - { - insn_changed_p = true; - *id->operand_loc[i] = reg - = lra_create_new_reg (static_id->operand[i].mode, - *id->operand_loc[i], ALL_REGS, NULL); - lra_register_new_scratch_op (insn, i, id->icode); - if (lra_dump_file != NULL) - fprintf (lra_dump_file, - "Removing SCRATCH in insn #%u (nop %d)\n", - INSN_UID (insn), i); - } - if (insn_changed_p) - /* Because we might use DF right after caller-saves sub-pass - we need to keep DF info up to date. */ - df_insn_rescan (insn); - } + remove_scratches_1 (insn); } /* Changes pseudos created by function remove_scratches onto scratches. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9b2951f..9a65e3a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-06 Peter Bergner + + PR rtl-optimization/88845 + * gcc.target/powerpc/pr88845.c: New test. + 2019-03-06 Marek Polacek PR c++/87378 - bogus -Wredundant-move warning. diff --git a/gcc/testsuite/gcc.target/powerpc/pr88845.c b/gcc/testsuite/gcc.target/powerpc/pr88845.c new file mode 100644 index 0000000..a939fa9 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr88845.c @@ -0,0 +1,24 @@ +/* { dg-do compile { target powerpc*-*-linux* } } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } } */ +/* { dg-skip-if "" { powerpc*-*-*spe* } } */ +/* { dg-require-effective-target powerpc_p8vector_ok } */ +/* { dg-options "-mdejagnu-cpu=power8 -O2" } */ +/* { dg-final { scan-assembler {\mmtvsrd\M} { target { lp64 } } } } */ +/* { dg-final { scan-assembler {\mxscvspdpn\M} { target { lp64 } } } } */ + +/* Verify that we do not ICE and that we generate a direct move + for float types when compiling for 64-bit. */ + +struct a { + unsigned ui; + float f; +}; + +void +foo (void) +{ + float e; + struct a s; + e = s.f; + __asm__("" : : "d" (e)); +} -- cgit v1.1 From 4556c5b3157f496c73f7fcd25d103ad3e6ff1874 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 6 Mar 2019 13:39:24 -0500 Subject: PR c++/89576 - if constexpr of lambda capture. Now that we're doing implicit lambda capture in templates, we see x here as the lambda capture. maybe_convert_cond was doing nothing in a template, so we never called mark_rvalue_use on x. As part of the broad move toward doing more processing of non-dependent expressions, let's do this conversion. * semantics.c (maybe_convert_cond): Do convert a non-dependent condition in a template. * typeck.c (condition_conversion): Handle being called in a template. From-SVN: r269433 --- gcc/cp/ChangeLog | 8 ++++++++ gcc/cp/semantics.c | 4 ++-- gcc/cp/typeck.c | 9 ++++----- gcc/testsuite/g++.dg/cpp1z/constexpr-if15.C | 2 +- gcc/testsuite/g++.dg/cpp1z/constexpr-if28.C | 11 +++++++++++ 5 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp1z/constexpr-if28.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cfd86b2..a076fa9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +2019-03-06 Jason Merrill + + PR c++/89576 - if constexpr of lambda capture. + * semantics.c (maybe_convert_cond): Do convert a non-dependent + condition in a template. + * typeck.c (condition_conversion): Handle being called in a + template. + 2019-03-06 Marek Polacek PR c++/87378 - bogus -Wredundant-move warning. diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index c03e4ef..2573b77 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -646,10 +646,10 @@ maybe_convert_cond (tree cond) return NULL_TREE; /* Wait until we instantiate templates before doing conversion. */ - if (processing_template_decl) + if (type_dependent_expression_p (cond)) return cond; - if (warn_sequence_point) + if (warn_sequence_point && !processing_template_decl) verify_sequence_points (cond); /* Do the conversion. */ diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 43ff3d6..9ceb7af 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -5867,18 +5867,17 @@ cp_truthvalue_conversion (tree expr) return c_common_truthvalue_conversion (input_location, expr); } -/* Just like cp_truthvalue_conversion, but we want a CLEANUP_POINT_EXPR. */ +/* Just like cp_truthvalue_conversion, but we want a CLEANUP_POINT_EXPR. This + is a low-level function; most callers should use maybe_convert_cond. */ tree condition_conversion (tree expr) { tree t; - /* Anything that might happen in a template should go through - maybe_convert_cond. */ - gcc_assert (!processing_template_decl); t = perform_implicit_conversion_flags (boolean_type_node, expr, tf_warning_or_error, LOOKUP_NORMAL); - t = fold_build_cleanup_point_expr (boolean_type_node, t); + if (!processing_template_decl) + t = fold_build_cleanup_point_expr (boolean_type_node, t); return t; } diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-if15.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-if15.C index 1dd8bea..49c7b7a 100644 --- a/gcc/testsuite/g++.dg/cpp1z/constexpr-if15.C +++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-if15.C @@ -7,5 +7,5 @@ constexpr int foo (int) { return 2; } template void a() { - if constexpr(foo) { }; + if constexpr(foo) { }; // { dg-error "overloaded" } } diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-if28.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-if28.C new file mode 100644 index 0000000..8bfde6c --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-if28.C @@ -0,0 +1,11 @@ +// PR c++/89576 +// { dg-do compile { target c++17 } } + +template +void foo() +{ + constexpr int x = 0; + [&] { + if constexpr (x) {} + }; +} -- cgit v1.1 From 71b6cb2bbccba8922a8c7e9082a13a02dee7e57d Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 6 Mar 2019 19:46:32 +0100 Subject: re PR c++/87148 (backward compatibility issue to take char [] as incomplete type) PR c++/87148 * init.c (build_value_init_noctor): Ignore flexible array members. * g++.dg/ext/flexary34.C: New test. From-SVN: r269434 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/init.c | 9 +++++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/ext/flexary34.C | 10 ++++++++++ 4 files changed, 29 insertions(+) create mode 100644 gcc/testsuite/g++.dg/ext/flexary34.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a076fa9..b0c1f88 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2019-03-06 Jakub Jelinek + + PR c++/87148 + * init.c (build_value_init_noctor): Ignore flexible array members. + 2019-03-06 Jason Merrill PR c++/89576 - if constexpr of lambda capture. diff --git a/gcc/cp/init.c b/gcc/cp/init.c index eb3b504..79a93a2 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -419,6 +419,15 @@ build_value_init_noctor (tree type, tsubst_flags_t complain) if (ftype == error_mark_node) continue; + /* Ignore flexible array members for value initialization. */ + if (TREE_CODE (ftype) == ARRAY_TYPE + && !COMPLETE_TYPE_P (ftype) + && !TYPE_DOMAIN (ftype) + && COMPLETE_TYPE_P (TREE_TYPE (ftype)) + && (next_initializable_field (DECL_CHAIN (field)) + == NULL_TREE)) + continue; + /* We could skip vfields and fields of types with user-defined constructors, but I think that won't improve performance at all; it should be simpler in general just diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9a65e3a..4175bc4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-06 Jakub Jelinek + + PR c++/87148 + * g++.dg/ext/flexary34.C: New test. + 2019-03-06 Peter Bergner PR rtl-optimization/88845 diff --git a/gcc/testsuite/g++.dg/ext/flexary34.C b/gcc/testsuite/g++.dg/ext/flexary34.C new file mode 100644 index 0000000..bbbbf85 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/flexary34.C @@ -0,0 +1,10 @@ +// PR c++/87148 +// { dg-do compile } +// { dg-options "-pedantic" } + +struct Tst { int i; char t[]; }; // { dg-warning "forbids flexible array member" } + +Tst t {}; // { dg-warning "extended initializer lists only available with" "" { target c++98_only } } +Tst u = Tst(); +void foo () { Tst u = {}; } +Tst *bar () { return new Tst (); } -- cgit v1.1 From 2de5d0ea90d2e64ff3d345b17228043e08a5d1ac Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 6 Mar 2019 15:28:47 -0500 Subject: PR c++/89381 - implicit copy and using-declaration. Here the used base::operator= gets into the list of foo's bindings for operator=, but it shouldn't make the copy ctor deleted. * class.c (classtype_has_move_assign_or_move_ctor_p): Don't consider op= brought in by a using-declaration. From-SVN: r269442 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/class.c | 4 +++- gcc/testsuite/g++.dg/cpp0x/implicit16.C | 37 +++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/implicit16.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b0c1f88..0667dd7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2019-03-06 Jason Merrill + + PR c++/89381 - implicit copy and using-declaration. + * class.c (classtype_has_move_assign_or_move_ctor_p): Don't consider + op= brought in by a using-declaration. + 2019-03-06 Jakub Jelinek PR c++/87148 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 0d4d35b..a70a852 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5220,7 +5220,9 @@ classtype_has_move_assign_or_move_ctor_p (tree t, bool user_p) for (ovl_iterator iter (get_class_binding_direct (t, assign_op_identifier)); iter; ++iter) - if ((!user_p || !DECL_ARTIFICIAL (*iter)) && move_fn_p (*iter)) + if ((!user_p || !DECL_ARTIFICIAL (*iter)) + && DECL_CONTEXT (*iter) == t + && move_fn_p (*iter)) return true; return false; diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit16.C b/gcc/testsuite/g++.dg/cpp0x/implicit16.C new file mode 100644 index 0000000..229f2b4 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/implicit16.C @@ -0,0 +1,37 @@ +// PR c++/89381 +// { dg-do compile { target c++11 } } + +template +struct base +{ + base() { } + base(const base&) { } + base(base&&) { } + base& operator=(const base&) { return *this; } + base& operator=(base&&) { return *this; } +}; + +struct foo : base +{ + using base::base; + using base::operator=; +}; + +//using workaround = decltype(foo{*static_cast(0)}); + +struct bar +{ + bar& operator=(foo ve) + { + value = ve; + return *this; + } + + foo value; +}; + +int main() +{ + foo a; + foo b{a}; +} -- cgit v1.1 From 1c98301f2b8b5f1bd7a411b1bbb66cc5694688bf Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 6 Mar 2019 20:40:32 +0000 Subject: compiler: emit underlying constant in array_type length export In Array_type::do_export, when emitting a concrete array length, evaluate the length expression to an integer constant and emit that constant, instead of calling the more general method for emitting expressions. This is to avoid the possibility that we will need to emit a conversion, which could confuse the gccgoimporter. Fixes golang/go#30628. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/165741 From-SVN: r269443 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/types.cc | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index a93dedb..f1bbc37 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -13c98c3477647888fc7a186e9055793b0961e806 +959260238817af3205fb9907dd92319291e6a893 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index 82f9fb0..2d34a28 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -7581,10 +7581,17 @@ Array_type::do_export(Export* exp) const exp->write_c_string("["); if (this->length_ != NULL) { - Export_function_body efb(exp, 0); - efb.set_type_context(this->length_->type()); - this->length_->export_expression(&efb); - exp->write_string(efb.body()); + Numeric_constant nc; + mpz_t val; + if (!this->length_->numeric_constant_value(&nc) || !nc.to_int(&val)) + { + go_assert(saw_errors()); + return; + } + char* s = mpz_get_str(NULL, 10, val); + exp->write_string(s); + exp->write_string(" "); + mpz_clear(val); } exp->write_c_string("] "); exp->write_type(this->element_type_); -- cgit v1.1 From a28a8193e57ce99f8d5ae1cbf34cd6e8f490d79e Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Wed, 6 Mar 2019 21:06:35 +0000 Subject: re PR fortran/71203 (ICE in add_init_expr_to_sym, at fortran/decl.c:1512 and :1564) 2019-03-06 Harald Anlauf PR fortran/71203 * expr.c (simplify_const_ref): Avoid null pointer dereference. PR fortran/71203 * gfortran.dg/substr_8.f90: New test. From-SVN: r269444 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/expr.c | 10 ++++++++-- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/substr_8.f90 | 15 +++++++++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/substr_8.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 9f42349..2b23b99 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2019-03-06 Harald Anlauf + + PR fortran/71203 + * expr.c (simplify_const_ref): Avoid null pointer dereference. + 2019-03-03 Harald Anlauf Steven G. Kargl diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index c3d78d3..51552a7 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -1897,8 +1897,14 @@ simplify_const_ref (gfc_expr *p) string_len = 0; if (!p->ts.u.cl) - p->ts.u.cl = gfc_new_charlen (p->symtree->n.sym->ns, - NULL); + { + if (p->symtree) + p->ts.u.cl = gfc_new_charlen (p->symtree->n.sym->ns, + NULL); + else + p->ts.u.cl = gfc_new_charlen (gfc_current_ns, + NULL); + } else gfc_free_expr (p->ts.u.cl->length); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4175bc4..4908a34 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-06 Harald Anlauf + + PR fortran/71203 + * gfortran.dg/substr_8.f90: New test. + 2019-03-06 Jakub Jelinek PR c++/87148 diff --git a/gcc/testsuite/gfortran.dg/substr_8.f90 b/gcc/testsuite/gfortran.dg/substr_8.f90 new file mode 100644 index 0000000..a3b7787 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/substr_8.f90 @@ -0,0 +1,15 @@ +! { dg-do run } +! PR fortran/71203 - used to ICE on zero-length arrays or substrings +! Derived from original test cases by Gerhard Steinmetz + +program p + implicit none + character(3), parameter :: a(4) = ' ' + character(*), parameter :: b(4) = 'abc' + character(*), parameter :: x(*) = a(2:2)(3:1) + character(*), parameter :: y(*) = a(2:1)(3:1) + character(*), parameter :: z(*) = b(2:1)(2:3) + if (size (x) /= 1 .or. len(x) /= 0) stop 1 + if (size (y) /= 0 .or. len(y) /= 0) stop 2 + if (size (z) /= 0 .or. len(z) /= 2) stop 3 +end -- cgit v1.1 From 295bae04b2140479029ed5f47a78954cc5995122 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 7 Mar 2019 00:16:32 +0000 Subject: Daily bump. From-SVN: r269448 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 3e15e14..71b5ee8 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20190306 +20190307 -- cgit v1.1 From c0017f91c4895e8cc625614454d0e2571c077770 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 7 Mar 2019 00:53:41 +0000 Subject: re PR go/89227 (gotools test cmd/go fails with link error "call lacks nop, can't restore toc; recompile with -fPIC") PR go/89227 * go-gcc.cc (Gcc_backend::function): Set TREE_PUBLIC for an only-inline function. From-SVN: r269449 --- gcc/go/ChangeLog | 6 ++++++ gcc/go/go-gcc.cc | 1 + 2 files changed, 7 insertions(+) (limited to 'gcc') diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index e1efc14..2c88593 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -1,3 +1,9 @@ +2019-03-06 Ian Lance Taylor + + PR go/89227 + * go-gcc.cc (Gcc_backend::function): Set TREE_PUBLIC for an + only-inline function. + 2019-02-15 Cherry Zhang * go-gcc.cc (Gcc_backend::Gcc_backend): Define __builtin_dwarf_cfa diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc index daa1ab2..1a52d9b 100644 --- a/gcc/go/go-gcc.cc +++ b/gcc/go/go-gcc.cc @@ -3101,6 +3101,7 @@ Gcc_backend::function(Btype* fntype, const std::string& name, resolve_unique_section(decl, 0, 1); if ((flags & function_only_inline) != 0) { + TREE_PUBLIC (decl) = 1; DECL_EXTERNAL(decl) = 1; DECL_DECLARED_INLINE_P(decl) = 1; } -- cgit v1.1 From f879f0e3f2667bd60b88603c5884364a0eed1fc4 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 7 Mar 2019 09:18:36 +0100 Subject: re PR c++/89585 (GCC 8.3: asm volatile no longer accepted at file scope) PR c++/89585 * doc/extend.texi (Basic Asm): Document qualifiers are not allowed at toplevel. * parser.c (cp_parser_asm_definition): Parse asm qualifiers even at toplevel, but diagnose them. * g++.dg/asm-qual-3.C: Adjust expected diagnostics. From-SVN: r269451 --- gcc/ChangeLog | 6 ++++++ gcc/cp/ChangeLog | 6 ++++++ gcc/cp/parser.c | 15 ++++++++++++++- gcc/doc/extend.texi | 2 ++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/asm-qual-3.C | 8 ++++---- 6 files changed, 37 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8a10820..4d48a67 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-07 Jakub Jelinek + + PR c++/89585 + * doc/extend.texi (Basic Asm): Document qualifiers are not allowed + at toplevel. + 2019-03-06 Peter Bergner PR rtl-optimization/88845 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0667dd7..c2162a4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2019-03-07 Jakub Jelinek + + PR c++/89585 + * parser.c (cp_parser_asm_definition): Parse asm qualifiers even + at toplevel, but diagnose them. + 2019-03-06 Jason Merrill PR c++/89381 - implicit copy and using-declaration. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 155e350..5ac6fc4 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -19766,8 +19766,9 @@ cp_parser_asm_definition (cp_parser* parser) location_t volatile_loc = UNKNOWN_LOCATION; location_t inline_loc = UNKNOWN_LOCATION; location_t goto_loc = UNKNOWN_LOCATION; + location_t first_loc = UNKNOWN_LOCATION; - if (cp_parser_allow_gnu_extensions_p (parser) && parser->in_function_body) + if (cp_parser_allow_gnu_extensions_p (parser)) for (;;) { cp_token *token = cp_lexer_peek_token (parser->lexer); @@ -19782,6 +19783,8 @@ cp_parser_asm_definition (cp_parser* parser) } else volatile_loc = loc; + if (!first_loc) + first_loc = loc; cp_lexer_consume_token (parser->lexer); continue; @@ -19793,6 +19796,8 @@ cp_parser_asm_definition (cp_parser* parser) } else inline_loc = loc; + if (!first_loc) + first_loc = loc; cp_lexer_consume_token (parser->lexer); continue; @@ -19804,6 +19809,8 @@ cp_parser_asm_definition (cp_parser* parser) } else goto_loc = loc; + if (!first_loc) + first_loc = loc; cp_lexer_consume_token (parser->lexer); continue; @@ -19823,6 +19830,12 @@ cp_parser_asm_definition (cp_parser* parser) bool inline_p = (inline_loc != UNKNOWN_LOCATION); bool goto_p = (goto_loc != UNKNOWN_LOCATION); + if (!parser->in_function_body && (volatile_p || inline_p || goto_p)) + { + error_at (first_loc, "asm qualifier outside of function body"); + volatile_p = inline_p = goto_p = false; + } + /* Look for the opening `('. */ if (!cp_parser_require (parser, CPP_OPEN_PAREN, RT_OPEN_PAREN)) return; diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 7425d89..0a84083 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -9064,6 +9064,8 @@ outside of C functions, you must use basic @code{asm}. You can use this technique to emit assembler directives, define assembly language macros that can be invoked elsewhere in the file, or write entire functions in assembly language. +Basic @code{asm} statements outside of functions may not use any +qualifiers. @item Functions declared diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4908a34..7092764 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-07 Jakub Jelinek + + PR c++/89585 + * g++.dg/asm-qual-3.C: Adjust expected diagnostics. + 2019-03-06 Harald Anlauf PR fortran/71203 diff --git a/gcc/testsuite/g++.dg/asm-qual-3.C b/gcc/testsuite/g++.dg/asm-qual-3.C index 95c9b57..0f8de36 100644 --- a/gcc/testsuite/g++.dg/asm-qual-3.C +++ b/gcc/testsuite/g++.dg/asm-qual-3.C @@ -2,11 +2,11 @@ // { dg-do compile } // { dg-options "-std=gnu++98" } -asm const (""); // { dg-error {expected '\(' before 'const'} } -asm volatile (""); // { dg-error {expected '\(' before 'volatile'} } +asm const (""); // { dg-error {'const' is not an asm qualifier} } +asm volatile (""); // { dg-error {asm qualifier outside of function body} } asm restrict (""); // { dg-error {expected '\(' before 'restrict'} } -asm inline (""); // { dg-error {expected '\(' before 'inline'} } -asm goto (""); // { dg-error {expected '\(' before 'goto'} } +asm inline (""); // { dg-error {asm qualifier outside of function body} } +asm goto (""); // { dg-error {asm qualifier outside of function body} } // There are many other things wrong with this code, so: // { dg-excess-errors "" } -- cgit v1.1 From 1a438d160e1dc845882c2ecba99513a09a931623 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 7 Mar 2019 12:46:44 +0000 Subject: re PR tree-optimization/89595 (DOM miscompiles code) 2019-03-07 Richard Biener PR tree-optimization/89595 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Take stmt iterator as reference, take boolean output parameter to indicate whether the stmt was removed and thus the iterator already advanced. (dom_opt_dom_walker::before_dom_children): Re-iterate over stmts created by folding. * gcc.dg/torture/pr89595.c: New testcase. From-SVN: r269453 --- gcc/ChangeLog | 10 ++++++ gcc/testsuite/ChangeLog | 5 +++ gcc/testsuite/gcc.dg/torture/pr89595.c | 39 +++++++++++++++++++++ gcc/tree-ssa-dom.c | 62 ++++++++++++++++++++++++++++------ 4 files changed, 105 insertions(+), 11 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/torture/pr89595.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4d48a67..544d3ea 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2019-03-07 Richard Biener + + PR tree-optimization/89595 + * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Take + stmt iterator as reference, take boolean output parameter to + indicate whether the stmt was removed and thus the iterator + already advanced. + (dom_opt_dom_walker::before_dom_children): Re-iterate over + stmts created by folding. + 2019-03-07 Jakub Jelinek PR c++/89585 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7092764..26f1716 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-07 Richard Biener + + PR tree-optimization/89595 + * gcc.dg/torture/pr89595.c: New testcase. + 2019-03-07 Jakub Jelinek PR c++/89585 diff --git a/gcc/testsuite/gcc.dg/torture/pr89595.c b/gcc/testsuite/gcc.dg/torture/pr89595.c new file mode 100644 index 0000000..ebd834f --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr89595.c @@ -0,0 +1,39 @@ +/* { dg-do run } */ +/* { dg-additional-options "-fgimple" } */ + +int __attribute__((noipa)) +__GIMPLE(startwith("dom")) bar(int cond, int val) +{ + int i; + + if (0 != 0) + goto bb_6; + else + goto bb_2; + +bb_2: + if (cond_5(D) != 0) + goto bb_4; + else + goto bb_5; + +bb_4: + i_6 = val_2(D); + i_1 = val_2(D) > 0 ? i_6 : 0; + +bb_5: + i_3 = __PHI (bb_4: i_1, bb_2: 0); + return i_3; + +bb_6: + i_4 = 1; + i_9 = 2; + goto bb_2; +} + +int main() +{ + if (bar (1, 1) != 1) + __builtin_abort (); + return 0; +} diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index aa4e24b..b0d56fc 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -618,7 +618,7 @@ private: various tables mantained by DOM. Returns the taken edge if the statement is a conditional with a statically determined value. */ - edge optimize_stmt (basic_block, gimple_stmt_iterator); + edge optimize_stmt (basic_block, gimple_stmt_iterator *, bool *); }; /* Jump threading, redundancy elimination and const/copy propagation. @@ -1480,10 +1480,48 @@ dom_opt_dom_walker::before_dom_children (basic_block bb) m_avail_exprs_stack->pop_to_marker (); edge taken_edge = NULL; + /* Initialize visited flag ahead of us, it has undefined state on + pass entry. */ for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) + gimple_set_visited (gsi_stmt (gsi), false); + for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi);) { + /* Do not optimize a stmt twice, substitution might end up with + _3 = _3 which is not valid. */ + if (gimple_visited_p (gsi_stmt (gsi))) + { + gsi_next (&gsi); + continue; + } + + /* Compute range information and optimize the stmt. */ evrp_range_analyzer.record_ranges_from_stmt (gsi_stmt (gsi), false); - taken_edge = this->optimize_stmt (bb, gsi); + bool removed_p = false; + taken_edge = this->optimize_stmt (bb, &gsi, &removed_p); + if (!removed_p) + gimple_set_visited (gsi_stmt (gsi), true); + + /* Go back and visit stmts inserted by folding after substituting + into the stmt at gsi. */ + if (gsi_end_p (gsi)) + { + gcc_checking_assert (removed_p); + gsi = gsi_last_bb (bb); + while (!gsi_end_p (gsi) && !gimple_visited_p (gsi_stmt (gsi))) + gsi_prev (&gsi); + } + else + { + do + { + gsi_prev (&gsi); + } + while (!gsi_end_p (gsi) && !gimple_visited_p (gsi_stmt (gsi))); + } + if (gsi_end_p (gsi)) + gsi = gsi_start_bb (bb); + else + gsi_next (&gsi); } /* Now prepare to process dominated blocks. */ @@ -1951,7 +1989,8 @@ test_for_singularity (gimple *stmt, gcond *dummy_cond, condition to an equality condition. */ edge -dom_opt_dom_walker::optimize_stmt (basic_block bb, gimple_stmt_iterator si) +dom_opt_dom_walker::optimize_stmt (basic_block bb, gimple_stmt_iterator *si, + bool *removed_p) { gimple *stmt, *old_stmt; bool may_optimize_p; @@ -1959,7 +1998,7 @@ dom_opt_dom_walker::optimize_stmt (basic_block bb, gimple_stmt_iterator si) bool was_noreturn; edge retval = NULL; - old_stmt = stmt = gsi_stmt (si); + old_stmt = stmt = gsi_stmt (*si); was_noreturn = is_gimple_call (stmt) && gimple_call_noreturn_p (stmt); if (dump_file && (dump_flags & TDF_DETAILS)) @@ -1982,9 +2021,9 @@ dom_opt_dom_walker::optimize_stmt (basic_block bb, gimple_stmt_iterator si) /* Try to fold the statement making sure that STMT is kept up to date. */ - if (fold_stmt (&si)) + if (fold_stmt (si)) { - stmt = gsi_stmt (si); + stmt = gsi_stmt (*si); gimple_set_modified (stmt, true); if (dump_file && (dump_flags & TDF_DETAILS)) @@ -2032,8 +2071,8 @@ dom_opt_dom_walker::optimize_stmt (basic_block bb, gimple_stmt_iterator si) if (callee && fndecl_built_in_p (callee, BUILT_IN_CONSTANT_P)) { - propagate_tree_value_into_stmt (&si, integer_zero_node); - stmt = gsi_stmt (si); + propagate_tree_value_into_stmt (si, integer_zero_node); + stmt = gsi_stmt (*si); } } @@ -2089,9 +2128,9 @@ dom_opt_dom_walker::optimize_stmt (basic_block bb, gimple_stmt_iterator si) } update_stmt_if_modified (stmt); - eliminate_redundant_computations (&si, m_const_and_copies, + eliminate_redundant_computations (si, m_const_and_copies, m_avail_exprs_stack); - stmt = gsi_stmt (si); + stmt = gsi_stmt (*si); /* Perform simple redundant store elimination. */ if (gimple_assign_single_p (stmt) @@ -2118,13 +2157,14 @@ dom_opt_dom_walker::optimize_stmt (basic_block bb, gimple_stmt_iterator si) { basic_block bb = gimple_bb (stmt); unlink_stmt_vdef (stmt); - if (gsi_remove (&si, true)) + if (gsi_remove (si, true)) { bitmap_set_bit (need_eh_cleanup, bb->index); if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, " Flagged to clear EH edges.\n"); } release_defs (stmt); + *removed_p = true; return retval; } } -- cgit v1.1 From 20faba6ddf316ea84b764b305ec1f9372f7f0ebd Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 7 Mar 2019 14:47:53 +0100 Subject: Revert function removal made in r264561. 2019-03-07 Martin Liska * dwarf2out.c (add_AT_vms_delta): Revert function removal. From-SVN: r269454 --- gcc/ChangeLog | 4 ++++ gcc/dwarf2out.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 544d3ea..b724446 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2019-03-07 Martin Liska + + * dwarf2out.c (add_AT_vms_delta): Revert function removal. + 2019-03-07 Richard Biener PR tree-optimization/89595 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 1b17f2b..e074ee3 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -3907,6 +3907,8 @@ static void prune_unused_types (void); static int maybe_emit_file (struct dwarf_file_data *fd); static inline const char *AT_vms_delta1 (dw_attr_node *); static inline const char *AT_vms_delta2 (dw_attr_node *); +static inline void add_AT_vms_delta (dw_die_ref, enum dwarf_attribute, + const char *, const char *); static void append_entry_to_tmpl_value_parm_die_table (dw_die_ref, tree); static void gen_remaining_tmpl_value_param_die_attribute (void); static bool generic_type_p (tree); @@ -5142,6 +5144,22 @@ AT_file (dw_attr_node *a) return a->dw_attr_val.v.val_file; } +/* Add a vms delta attribute value to a DIE. */ + +static inline void +add_AT_vms_delta (dw_die_ref die, enum dwarf_attribute attr_kind, + const char *lbl1, const char *lbl2) +{ + dw_attr_node attr; + + attr.dw_attr = attr_kind; + attr.dw_attr_val.val_class = dw_val_class_vms_delta; + attr.dw_attr_val.val_entry = NULL; + attr.dw_attr_val.v.val_vms_delta.lbl1 = xstrdup (lbl1); + attr.dw_attr_val.v.val_vms_delta.lbl2 = xstrdup (lbl2); + add_dwarf_attr (die, &attr); +} + /* Add a symbolic view identifier attribute value to a DIE. */ static inline void -- cgit v1.1 From 5161ffa4f5ae6133167673afc607c07e0be787f8 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 7 Mar 2019 14:53:37 +0000 Subject: re PR tree-optimization/89618 (Inner loop won't vectorize unless dummy statement is included) 2019-04-07 Richard Biener PR middle-end/89618 * cfgloopmanip.c (copy_loop_info): Copy forgotten fields. * tree-inline.c (copy_loops): Simplify. * gcc.target/i386/pr89618.c: New testcase. From-SVN: r269458 --- gcc/ChangeLog | 6 ++++++ gcc/cfgloopmanip.c | 5 +++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr89618.c | 21 +++++++++++++++++++++ gcc/tree-inline.c | 16 ++++------------ 5 files changed, 41 insertions(+), 12 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr89618.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b724446..b5a7387 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-04-07 Richard Biener + + PR middle-end/89618 + * cfgloopmanip.c (copy_loop_info): Copy forgotten fields. + * tree-inline.c (copy_loops): Simplify. + 2019-03-07 Martin Liska * dwarf2out.c (add_AT_vms_delta): Revert function removal. diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c index 17226b7..7eb587a 100644 --- a/gcc/cfgloopmanip.c +++ b/gcc/cfgloopmanip.c @@ -1015,10 +1015,15 @@ copy_loop_info (struct loop *loop, struct loop *target) target->any_estimate = loop->any_estimate; target->nb_iterations_estimate = loop->nb_iterations_estimate; target->estimate_state = loop->estimate_state; + target->safelen = loop->safelen; target->constraints = loop->constraints; + target->can_be_parallel = loop->can_be_parallel; target->warned_aggressive_loop_optimizations |= loop->warned_aggressive_loop_optimizations; + target->dont_vectorize = loop->dont_vectorize; + target->force_vectorize = loop->force_vectorize; target->in_oacc_kernels_region = loop->in_oacc_kernels_region; + target->unroll = loop->unroll; } /* Copies copy of LOOP as subloop of TARGET loop, placing newly diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 26f1716..d13a7db 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-04-07 Richard Biener + + PR middle-end/89618 + * gcc.target/i386/pr89618.c: New testcase. + 2019-03-07 Richard Biener PR tree-optimization/89595 diff --git a/gcc/testsuite/gcc.target/i386/pr89618.c b/gcc/testsuite/gcc.target/i386/pr89618.c new file mode 100644 index 0000000..11b2d28 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89618.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -mavx512f -fdump-tree-vect-details" } */ + +void foo (int n, int *off, double *a) +{ + const int m = 32; + + for (int j = 0; j < n/m; ++j) + { + int const start = j*m; + int const end = (j+1)*m; + +#pragma GCC ivdep + for (int i = start; i < end; ++i) + { + a[off[i]] = a[i] < 0 ? a[i] : 0; + } + } +} + +/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */ diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 9017da8..d3e53d2 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -2666,23 +2666,15 @@ copy_loops (copy_body_data *id, /* Copy loop meta-data. */ copy_loop_info (src_loop, dest_loop); + if (dest_loop->unroll) + cfun->has_unroll = true; + if (dest_loop->force_vectorize) + cfun->has_force_vectorize_loops = true; /* Finally place it into the loop array and the loop tree. */ place_new_loop (cfun, dest_loop); flow_loop_tree_node_add (dest_parent, dest_loop); - dest_loop->safelen = src_loop->safelen; - if (src_loop->unroll) - { - dest_loop->unroll = src_loop->unroll; - cfun->has_unroll = true; - } - dest_loop->dont_vectorize = src_loop->dont_vectorize; - if (src_loop->force_vectorize) - { - dest_loop->force_vectorize = true; - cfun->has_force_vectorize_loops = true; - } if (src_loop->simduid) { dest_loop->simduid = remap_decl (src_loop->simduid, id); -- cgit v1.1 From d4babd373b9634c6964cad53423470ac8f38addf Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 7 Mar 2019 10:10:22 -0500 Subject: PR c++/80916 - spurious "static but not defined" warning. Nothing can refer to an internal decl with no definition, so we shouldn't treat such a decl as a possible devirtualization target. * gimple-fold.c (can_refer_decl_in_current_unit_p): Return false for an internal symbol with DECL_EXTERNAL. From-SVN: r269459 --- gcc/ChangeLog | 6 ++++++ gcc/gimple-fold.c | 7 +++++-- gcc/testsuite/g++.dg/warn/unused-fn1.C | 16 ++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/g++.dg/warn/unused-fn1.C (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b5a7387..507c8e1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-01-25 Jason Merrill + + PR c++/80916 - spurious "static but not defined" warning. + * gimple-fold.c (can_refer_decl_in_current_unit_p): Return false + for an internal symbol with DECL_EXTERNAL. + 2019-04-07 Richard Biener PR middle-end/89618 diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index 7ef5004..62d2e0a 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -121,9 +121,12 @@ can_refer_decl_in_current_unit_p (tree decl, tree from_decl) || !VAR_OR_FUNCTION_DECL_P (decl)) return true; - /* Static objects can be referred only if they was not optimized out yet. */ - if (!TREE_PUBLIC (decl) && !DECL_EXTERNAL (decl)) + /* Static objects can be referred only if they are defined and not optimized + out yet. */ + if (!TREE_PUBLIC (decl)) { + if (DECL_EXTERNAL (decl)) + return false; /* Before we start optimizing unreachable code we can be sure all static objects are defined. */ if (symtab->function_flags_ready) diff --git a/gcc/testsuite/g++.dg/warn/unused-fn1.C b/gcc/testsuite/g++.dg/warn/unused-fn1.C new file mode 100644 index 0000000..aabc01b --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/unused-fn1.C @@ -0,0 +1,16 @@ +// PR c++/80916 +// { dg-options "-Os -Wunused" } + +struct j { + virtual void dispatch(void *) {} +}; +template +struct i : j { + void dispatch(void *) {} // warning: 'void i< >::dispatch(void*) [with = {anonymous}::l]' declared 'static' but never defined [-Wunused-function] +}; +namespace { + struct l : i {}; +} +void f(j *k) { + k->dispatch(0); +} -- cgit v1.1 From 7c3f98ca6567d5b12d28421a4a3deec3b9c52efc Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 7 Mar 2019 10:16:04 -0500 Subject: Fix comment From-SVN: r269460 --- gcc/cp/call.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 04516eb..d9294a0 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -10928,7 +10928,7 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn, tweak: - /* Extension: If the worst conversion for one candidate is worse than the + /* Extension: If the worst conversion for one candidate is better than the worst conversion for the other, take the first. */ if (!pedantic && (complain & tf_warning_or_error)) { -- cgit v1.1 From 606711a1671cc63713b893c4557df967a5a6ac20 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 7 Mar 2019 16:33:52 +0100 Subject: Significantly speed up verifiers for a cgraph_node with many clones. 2019-03-07 Martin Liska * cgraph.c (cgraph_node::verify_node): Verify with a neighbour which is equivalent to searching for this in clones chain. * symtab.c (symtab_node::verify_base): Similarly compare ASM names with a neighbour and special case first node in a chain. From-SVN: r269461 --- gcc/ChangeLog | 7 +++++++ gcc/cgraph.c | 14 +++++++------- gcc/symtab.c | 39 +++++++++++++++++++++++---------------- 3 files changed, 37 insertions(+), 23 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 507c8e1..e62b5e5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-03-07 Martin Liska + + * cgraph.c (cgraph_node::verify_node): Verify with a neighbour + which is equivalent to searching for this in clones chain. + * symtab.c (symtab_node::verify_base): Similarly compare ASM + names with a neighbour and special case first node in a chain. + 2019-01-25 Jason Merrill PR c++/80916 - spurious "static but not defined" warning. diff --git a/gcc/cgraph.c b/gcc/cgraph.c index de82316..dfe1833 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -3240,14 +3240,14 @@ cgraph_node::verify_node (void) if (clone_of) { - cgraph_node *n; - for (n = clone_of->clones; n; n = n->next_sibling_clone) - if (n == this) - break; - if (!n) + cgraph_node *first_clone = clone_of->clones; + if (first_clone != this) { - error ("cgraph_node has wrong clone_of"); - error_found = true; + if (prev_sibling_clone->clone_of != clone_of) + { + error ("cgraph_node has wrong clone_of"); + error_found = true; + } } } if (clones) diff --git a/gcc/symtab.c b/gcc/symtab.c index c9fa16b..16a2135 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -1040,23 +1040,30 @@ symtab_node::verify_base (void) if (symtab->assembler_name_hash) { hashed_node = symtab_node::get_for_asmname (DECL_ASSEMBLER_NAME (decl)); - if (hashed_node && hashed_node->previous_sharing_asm_name) + if (hashed_node) { - error ("assembler name hash list corrupted"); - error_found = true; - } - while (hashed_node) - { - if (hashed_node == this) - break; - hashed_node = hashed_node->next_sharing_asm_name; - } - if (!hashed_node - && !(is_a (this) - && DECL_HARD_REGISTER (decl))) - { - error ("node not found in symtab assembler name hash"); - error_found = true; + if (hashed_node->previous_sharing_asm_name) + { + error ("assembler name hash list corrupted"); + error_found = true; + } + else if (previous_sharing_asm_name == NULL) + { + if (hashed_node != this) + { + error ("assembler name hash list corrupted"); + error_found = true; + } + } + else if (!(is_a (this) && DECL_HARD_REGISTER (decl))) + { + if (!asmname_hasher::equal (previous_sharing_asm_name, + DECL_ASSEMBLER_NAME (decl))) + { + error ("node not found in symtab assembler name hash"); + error_found = true; + } + } } } if (previous_sharing_asm_name -- cgit v1.1 From 1738b52201b1ce28c9f869646f5412b8937ccfe6 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Thu, 7 Mar 2019 17:03:34 +0100 Subject: Relax cgraph_node::clone_of_p to also look through former clones 2019-03-07 Martin Jambor PR ipa/88235 * cgraph.h (cgraph_node): New inline method former_thunk_p. * cgraph.c (cgraph_node::dump): Dump a note if node is a former thunk. (clone_of_p): Treat expanded thunks like thunks, be optimistic if they have multiple callees. At the end check if declarations match as opposed to cgraph_nodes. testsuite/ * g++.dg/ipa/pr88235.C: New test. From-SVN: r269462 --- gcc/ChangeLog | 9 +++++++ gcc/cgraph.c | 15 ++++++++--- gcc/cgraph.h | 14 ++++++++++ gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/g++.dg/ipa/pr88235.C | 55 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/g++.dg/ipa/pr88235.C (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e62b5e5..b8774f2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2019-03-07 Martin Jambor + + PR ipa/88235 + * cgraph.h (cgraph_node): New inline method former_thunk_p. + * cgraph.c (cgraph_node::dump): Dump a note if node is a former thunk. + (clone_of_p): Treat expanded thunks like thunks, be optimistic if they + have multiple callees. At the end check if declarations match as + opposed to cgraph_nodes. + 2019-03-07 Martin Liska * cgraph.c (cgraph_node::verify_node): Verify with a neighbour diff --git a/gcc/cgraph.c b/gcc/cgraph.c index dfe1833..9f0d603 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -2109,6 +2109,8 @@ cgraph_node::dump (FILE *f) (int)thunk.indirect_offset, (int)thunk.virtual_offset_p); } + else if (former_thunk_p ()) + fprintf (f, " Former thunk"); if (alias && thunk.alias && DECL_P (thunk.alias)) { @@ -2963,7 +2965,9 @@ cgraph_node::collect_callers (void) return redirect_callers; } -/* Return TRUE if NODE2 a clone of NODE or is equivalent to it. */ + +/* Return TRUE if NODE2 a clone of NODE or is equivalent to it. Return + optimistically true if this cannot be determined. */ static bool clone_of_p (cgraph_node *node, cgraph_node *node2) @@ -2975,12 +2979,17 @@ clone_of_p (cgraph_node *node, cgraph_node *node2) /* There are no virtual clones of thunks so check former_clone_of or if we might have skipped thunks because this adjustments are no longer necessary. */ - while (node->thunk.thunk_p) + while (node->thunk.thunk_p || node->former_thunk_p ()) { if (node2->former_clone_of == node->decl) return true; if (!node->thunk.this_adjusting) return false; + /* In case of instrumented expanded thunks, which can have multiple calls + in them, we do not know how to continue and just have to be + optimistic. */ + if (node->callees->next_callee) + return true; node = node->callees->callee->ultimate_alias_target (); skipped_thunk = true; } @@ -2996,7 +3005,7 @@ clone_of_p (cgraph_node *node, cgraph_node *node2) return false; } - while (node != node2 && node2) + while (node2 && node->decl != node2->decl) node2 = node2->clone_of; return node2 != NULL; } diff --git a/gcc/cgraph.h b/gcc/cgraph.h index c294602..9a19d83 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -1283,6 +1283,9 @@ public: Note that at WPA stage, the function body may not be present in memory. */ inline bool has_gimple_body_p (void); + /* Return true if this node represents a former, i.e. an expanded, thunk. */ + inline bool former_thunk_p (void); + /* Return true if function should be optimized for size. */ bool optimize_for_size_p (void); @@ -2921,6 +2924,17 @@ cgraph_node::has_gimple_body_p (void) return definition && !thunk.thunk_p && !alias; } +/* Return true if this node represents a former, i.e. an expanded, thunk. */ + +inline bool +cgraph_node::former_thunk_p (void) +{ + return (!thunk.thunk_p + && (thunk.fixed_offset + || thunk.virtual_offset_p + || thunk.indirect_offset)); +} + /* Walk all functions with body defined. */ #define FOR_EACH_FUNCTION_WITH_GIMPLE_BODY(node) \ for ((node) = symtab->first_function_with_gimple_body (); (node); \ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d13a7db..d0bd734 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-07 Martin Jambor + + PR ipa/88235 + * g++.dg/ipa/pr88235.C: New test. + 2019-04-07 Richard Biener PR middle-end/89618 diff --git a/gcc/testsuite/g++.dg/ipa/pr88235.C b/gcc/testsuite/g++.dg/ipa/pr88235.C new file mode 100644 index 0000000..29f3252 --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/pr88235.C @@ -0,0 +1,55 @@ +// { dg-do compile } +// { dg-options "-O1 -fdevirtualize -finline-small-functions -fipa-cp -fipa-cp-clone --param ipa-cp-eval-threshold=125 --param max-inline-insns-single=4" } + +extern "C" int printf (const char *, ...); +enum E { vf_request, vf_event } want; + +int errs = 0; + +class ivResource { +public: + virtual ~ivResource () { } +}; + +class ivHandler : public ivResource { +public: + virtual void event() { } +}; + +class ivGlyph : public ivResource { +public: + virtual ~ivGlyph () { } + virtual void request () { + if (want!=vf_request) + ++errs; + } +}; + +class ItemView : public ivGlyph, public ivHandler { +public: + virtual void event () { + if (want!=vf_event) + ++errs; + } +} a; + +ivGlyph *bar() { + return &a; +} + +ivHandler *bar2() { + return &a; +} + +int main() { + want=vf_request; + bar()->request(); + want=vf_event; + bar2()->event(); + if (errs) { + printf("FAIL\n"); + return 1; + } + printf("PASS\n"); + return 0; +} -- cgit v1.1 From ae9b289201b6c6996b9c701109658adfb551327b Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 7 Mar 2019 11:15:56 -0500 Subject: PR c++/88820 - ICE with CTAD and member template used in DMI. Here the problem was that in order to form a FUNCTION_DECL for foo in the uninstantiated template, we were trying to deduce template args for S from the template parm itself, and failing. * pt.c (do_class_deduction): Handle parm used as its own arg. From-SVN: r269463 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/pt.c | 3 +++ gcc/testsuite/g++.dg/cpp1z/class-deduction64.C | 9 +++++++++ 3 files changed, 17 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp1z/class-deduction64.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c2162a4..94e278d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2019-03-07 Jason Merrill + + PR c++/88820 - ICE with CTAD and member template used in DMI. + * pt.c (do_class_deduction): Handle parm used as its own arg. + 2019-03-07 Jakub Jelinek PR c++/89585 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 8a5a0b3..906cfe0 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -27184,6 +27184,9 @@ do_class_deduction (tree ptype, tree tmpl, tree init, int flags, error ("non-class template %qT used without template arguments", tmpl); return error_mark_node; } + if (init && TREE_TYPE (init) == ptype) + /* Using the template parm as its own argument. */ + return ptype; tree type = TREE_TYPE (tmpl); diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction64.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction64.C new file mode 100644 index 0000000..3a06e6f --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction64.C @@ -0,0 +1,9 @@ +// PR c++/88820 +// { dg-do compile { target c++17 } } + +template struct S; + +template struct W { + template static int foo(); + bool b = foo(); +}; -- cgit v1.1 From 59d9a0aa71e3314f6a797fdfcce44ccfe8418b8d Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Thu, 7 Mar 2019 17:42:20 +0100 Subject: Zero local estimated benefit for cloning extern inline function 2019-03-07 Martin Jambor PR lto/87525 * ipa-cp.c (perform_estimation_of_a_value): Account zero time benefit for extern inline functions. testsuite/ * gcc.dg/ipa/ipcp-5.c: New test. From-SVN: r269464 --- gcc/ChangeLog | 6 ++++++ gcc/ipa-cp.c | 17 ++++++++++----- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/ipa/ipcp-5.c | 45 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/ipa/ipcp-5.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b8774f2..1483605 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2019-03-07 Martin Jambor + PR lto/87525 + * ipa-cp.c (perform_estimation_of_a_value): Account zero time benefit + for extern inline functions. + +2019-03-07 Martin Jambor + PR ipa/88235 * cgraph.h (cgraph_node): New inline method former_thunk_p. * cgraph.c (cgraph_node::dump): Dump a note if node is a former thunk. diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 442d5c6..59b15fa 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -2818,11 +2818,18 @@ perform_estimation_of_a_value (cgraph_node *node, vec known_csts, base_time -= time; if (base_time > 65535) base_time = 65535; - time_benefit = base_time.to_int () - + devirtualization_time_bonus (node, known_csts, known_contexts, - known_aggs_ptrs) - + hint_time_bonus (hints) - + removable_params_cost + est_move_cost; + + /* Extern inline functions have no cloning local time benefits because they + will be inlined anyway. The only reason to clone them is if it enables + optimization in any of the functions they call. */ + if (DECL_EXTERNAL (node->decl) && DECL_DECLARED_INLINE_P (node->decl)) + time_benefit = 0; + else + time_benefit = base_time.to_int () + + devirtualization_time_bonus (node, known_csts, known_contexts, + known_aggs_ptrs) + + hint_time_bonus (hints) + + removable_params_cost + est_move_cost; gcc_checking_assert (size >=0); /* The inliner-heuristics based estimates may think that in certain diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d0bd734..bf1546b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2019-03-07 Martin Jambor + PR lto/87525 + * gcc.dg/ipa/ipcp-5.c: New test. + +2019-03-07 Martin Jambor + PR ipa/88235 * g++.dg/ipa/pr88235.C: New test. diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-5.c b/gcc/testsuite/gcc.dg/ipa/ipcp-5.c new file mode 100644 index 0000000..6786c51 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/ipcp-5.c @@ -0,0 +1,45 @@ +/* Test that estimated local cloning time benefit of extern inline functions is + zero. */ + +/* { dg-do compile } */ +/* { dg-options "-O3 -fdump-ipa-cp -fno-early-inlining" } */ +/* { dg-add-options bind_pic_locally } */ + +extern int get_int (void); +extern void use_stuff (int); + +int arr[10]; + +inline void +f (int a) +{ + arr[0] += a + 5; + arr[1] += a + 50; + arr[2] += a - 3; + arr[3] += a; + arr[4] += a + 21; + arr[5] += a + 900; + arr[6] += a + 2; + arr[7] += a + 3456; + arr[8] += a + 3; + arr[9] += a + 32; + use_stuff (a); +} + + +int +entry (void) +{ + int i; + for (i = 0; i < 100; i++) + f (7); + for (i = 0; i < 100; i++) + f (get_int ()); + return 0; +} + + +/* { dg-final { scan-ipa-dump "loc_time: 0" "cp" } } */ +/* { dg-final { scan-ipa-dump-not "replacing param.*with const" "cp" } } */ + + -- cgit v1.1 From 8f5439bea30bd2370638261ec7613628c8918d7d Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Thu, 7 Mar 2019 16:57:23 +0000 Subject: d/dmd: Merge upstream dmd d517c0e6a Fixes https://gcc.gnu.org/PR89016 Reviewed-on: https://github.com/dlang/dmd/pull/9427 From-SVN: r269465 --- gcc/d/dmd/MERGE | 2 +- gcc/d/dmd/attrib.c | 108 ++++++++------------- gcc/d/dmd/dimport.c | 4 + gcc/d/dmd/dmodule.c | 12 +-- gcc/d/dmd/expression.c | 37 +++++++ gcc/d/dmd/expressionsem.c | 50 ++-------- gcc/d/dmd/statement.c | 52 +++++----- .../gdc.test/compilable/imports/test19609a.d | 1 + .../gdc.test/compilable/imports/test19609b.d | 1 + .../gdc.test/compilable/imports/test19609c.d | 1 + gcc/testsuite/gdc.test/compilable/test12567e.d | 7 ++ gcc/testsuite/gdc.test/compilable/test19609.d | 12 +++ .../gdc.test/fail_compilation/fail12567.d | 8 -- .../gdc.test/fail_compilation/fail19609.d | 18 ++++ .../gdc.test/fail_compilation/imports/fail19609a.d | 1 + .../gdc.test/fail_compilation/imports/fail19609b.d | 1 + .../gdc.test/fail_compilation/imports/fail19609c.d | 1 + 17 files changed, 158 insertions(+), 158 deletions(-) create mode 100644 gcc/testsuite/gdc.test/compilable/imports/test19609a.d create mode 100644 gcc/testsuite/gdc.test/compilable/imports/test19609b.d create mode 100644 gcc/testsuite/gdc.test/compilable/imports/test19609c.d create mode 100644 gcc/testsuite/gdc.test/compilable/test12567e.d create mode 100644 gcc/testsuite/gdc.test/compilable/test19609.d delete mode 100644 gcc/testsuite/gdc.test/fail_compilation/fail12567.d create mode 100644 gcc/testsuite/gdc.test/fail_compilation/fail19609.d create mode 100644 gcc/testsuite/gdc.test/fail_compilation/imports/fail19609a.d create mode 100644 gcc/testsuite/gdc.test/fail_compilation/imports/fail19609b.d create mode 100644 gcc/testsuite/gdc.test/fail_compilation/imports/fail19609c.d (limited to 'gcc') diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index 97aa40d..3f416db 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -ed71446aaa2bd0e548c3bf2154a638826dfe3db0 +d517c0e6a10b548f44d82b71b3c079663cb94f8e The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/attrib.c b/gcc/d/dmd/attrib.c index e4ad573..a668638 100644 --- a/gcc/d/dmd/attrib.c +++ b/gcc/d/dmd/attrib.c @@ -30,6 +30,7 @@ bool definitelyValueParameter(Expression *e); Expression *semantic(Expression *e, Scope *sc); +StringExp *semanticString(Scope *sc, Expression *exp, const char *s); /********************************* AttribDeclaration ****************************/ @@ -977,41 +978,29 @@ void PragmaDeclaration::semantic(Scope *sc) error("string expected for library name"); else { - Expression *e = (*args)[0]; - - sc = sc->startCTFE(); - e = ::semantic(e, sc); - e = resolveProperties(sc, e); - sc = sc->endCTFE(); - - e = e->ctfeInterpret(); - (*args)[0] = e; - if (e->op == TOKerror) - goto Lnodecl; - StringExp *se = e->toStringExp(); + StringExp *se = semanticString(sc, (*args)[0], "library name"); if (!se) - error("string expected for library name, not '%s'", e->toChars()); - else + goto Lnodecl; + (*args)[0] = se; + + char *name = (char *)mem.xmalloc(se->len + 1); + memcpy(name, se->string, se->len); + name[se->len] = 0; + if (global.params.verbose) + message("library %s", name); + if (global.params.moduleDeps && !global.params.moduleDepsFile) { - char *name = (char *)mem.xmalloc(se->len + 1); - memcpy(name, se->string, se->len); - name[se->len] = 0; - if (global.params.verbose) - message("library %s", name); - if (global.params.moduleDeps && !global.params.moduleDepsFile) - { - OutBuffer *ob = global.params.moduleDeps; - Module *imod = sc->instantiatingModule(); - ob->writestring("depsLib "); - ob->writestring(imod->toPrettyChars()); - ob->writestring(" ("); - escapePath(ob, imod->srcfile->toChars()); - ob->writestring(") : "); - ob->writestring((char *) name); - ob->writenl(); - } - mem.xfree(name); + OutBuffer *ob = global.params.moduleDeps; + Module *imod = sc->instantiatingModule(); + ob->writestring("depsLib "); + ob->writestring(imod->toPrettyChars()); + ob->writestring(" ("); + escapePath(ob, imod->srcfile->toChars()); + ob->writestring(") : "); + ob->writestring((char *) name); + ob->writenl(); } + mem.xfree(name); } goto Lnodecl; } @@ -1053,19 +1042,11 @@ void PragmaDeclaration::semantic(Scope *sc) goto Ldecl; } - Expression *e = (*args)[0]; - e = ::semantic(e, sc); - e = e->ctfeInterpret(); - (*args)[0] = e; - if (e->op == TOKerror) - goto Ldecl; - - StringExp *se = e->toStringExp(); + StringExp *se = semanticString(sc, (*args)[0], "mangled name"); if (!se) - { - error("string expected for mangled name, not '%s'", e->toChars()); goto Ldecl; - } + (*args)[0] = se; // Will be used for later + if (!se->len) { error("zero-length string not allowed for mangled name"); @@ -1418,35 +1399,22 @@ void CompileDeclaration::setScope(Scope *sc) void CompileDeclaration::compileIt(Scope *sc) { //printf("CompileDeclaration::compileIt(loc = %d) %s\n", loc.linnum, exp->toChars()); - sc = sc->startCTFE(); - exp = ::semantic(exp, sc); - exp = resolveProperties(sc, exp); - sc = sc->endCTFE(); + StringExp *se = semanticString(sc, exp, "argument to mixin"); + if (!se) + return; + se = se->toUTF8(sc); + + unsigned errors = global.errors; + Parser p(loc, sc->_module, (utf8_t *)se->string, se->len, 0); + p.nextToken(); - if (exp->op != TOKerror) + decl = p.parseDeclDefs(0); + if (p.token.value != TOKeof) + exp->error("incomplete mixin declaration (%s)", se->toChars()); + if (p.errors) { - Expression *e = exp->ctfeInterpret(); - if (e->op == TOKerror) // Bugzilla 15974 - return; - StringExp *se = e->toStringExp(); - if (!se) - exp->error("argument to mixin must be a string, not (%s) of type %s", exp->toChars(), exp->type->toChars()); - else - { - se = se->toUTF8(sc); - unsigned errors = global.errors; - Parser p(loc, sc->_module, (utf8_t *)se->string, se->len, 0); - p.nextToken(); - - decl = p.parseDeclDefs(0); - if (p.token.value != TOKeof) - exp->error("incomplete mixin declaration (%s)", se->toChars()); - if (p.errors) - { - assert(global.errors != errors); - decl = NULL; - } - } + assert(global.errors != errors); + decl = NULL; } } diff --git a/gcc/d/dmd/dimport.c b/gcc/d/dmd/dimport.c index ad1e2d0..cd2c5b2 100644 --- a/gcc/d/dmd/dimport.c +++ b/gcc/d/dmd/dimport.c @@ -23,6 +23,8 @@ #include "attrib.h" #include "hdrgen.h" +StringExp *semanticString(Scope *sc, Expression *exp, const char *s); + /********************************* Import ****************************/ Import::Import(Loc loc, Identifiers *packages, Identifier *id, Identifier *aliasId, @@ -176,6 +178,8 @@ void Import::importAll(Scope *sc) if (mod->md && mod->md->isdeprecated) { Expression *msg = mod->md->msg; + if (msg) + msg = semanticString(sc, msg, "deprecation message"); if (StringExp *se = msg ? msg->toStringExp() : NULL) mod->deprecation(loc, "is deprecated - %s", se->string); else diff --git a/gcc/d/dmd/dmodule.c b/gcc/d/dmd/dmodule.c index 3b74446..20dbb69 100644 --- a/gcc/d/dmd/dmodule.c +++ b/gcc/d/dmd/dmodule.c @@ -35,6 +35,7 @@ Dsymbols Module::deferred3; // deferred Dsymbol's needing semantic3() run on the unsigned Module::dprogress; const char *lookForSourceFile(const char **path, const char *filename); +StringExp *semanticString(Scope *sc, Expression *exp, const char *s); void Module::_init() { @@ -727,14 +728,6 @@ void Module::importAll(Scope *) return; } - if (md && md->msg) - { - if (StringExp *se = md->msg->toStringExp()) - md->msg = se; - else - md->msg->error("string expected, not '%s'", md->msg->toChars()); - } - /* Note that modules get their own scope, from scratch. * This is so regardless of where in the syntax a module * gets imported, it is unaffected by context. @@ -742,6 +735,9 @@ void Module::importAll(Scope *) */ Scope *sc = Scope::createGlobal(this); // create root scope + if (md && md->msg) + md->msg = semanticString(sc, md->msg, "deprecation message"); + // Add import of "object", even for the "object" module. // If it isn't there, some compiler rewrites, like // classinst == classinst -> .object.opEquals(classinst, classinst) diff --git a/gcc/d/dmd/expression.c b/gcc/d/dmd/expression.c index cbc3819..df37392 100644 --- a/gcc/d/dmd/expression.c +++ b/gcc/d/dmd/expression.c @@ -6850,6 +6850,43 @@ Expression *resolveOpDollar(Scope *sc, ArrayExp *ae, Expression **pe0) return ae; } +/*********************************************************** + * Resolve `exp` as a compile-time known string. + * Params: + * sc = scope + * exp = Expression which expected as a string + * s = What the string is expected for, will be used in error diagnostic. + * Returns: + * String literal, or `null` if error happens. + */ +StringExp *semanticString(Scope *sc, Expression *exp, const char *s) +{ + sc = sc->startCTFE(); + exp = semantic(exp, sc); + exp = resolveProperties(sc, exp); + sc = sc->endCTFE(); + + if (exp->op == TOKerror) + return NULL; + + Expression *e = exp; + if (exp->type->isString()) + { + e = e->ctfeInterpret(); + if (e->op == TOKerror) + return NULL; + } + + StringExp *se = e->toStringExp(); + if (!se) + { + exp->error("string expected for %s, not (%s) of type %s", + s, exp->toChars(), exp->type->toChars()); + return NULL; + } + return se; +} + /************************************** * Runs semantic on se->lwr and se->upr. Declares a temporary variable * if '$' was used. diff --git a/gcc/d/dmd/expressionsem.c b/gcc/d/dmd/expressionsem.c index d5319e5..3fd5c1f 100644 --- a/gcc/d/dmd/expressionsem.c +++ b/gcc/d/dmd/expressionsem.c @@ -74,6 +74,7 @@ Expression *binSemanticProp(BinExp *e, Scope *sc); Expression *semantic(Expression *e, Scope *sc); Expression *semanticY(DotIdExp *exp, Scope *sc, int flag); Expression *semanticY(DotTemplateInstanceExp *exp, Scope *sc, int flag); +StringExp *semanticString(Scope *sc, Expression *exp, const char *s); /**************************************** * Preprocess arguments to function. @@ -2259,27 +2260,9 @@ public: void visit(CompileExp *exp) { - sc = sc->startCTFE(); - exp->e1 = semantic(exp->e1, sc); - exp->e1 = resolveProperties(sc, exp->e1); - sc = sc->endCTFE(); - if (exp->e1->op == TOKerror) - { - result = exp->e1; - return; - } - if (!exp->e1->type->isString()) - { - exp->error("argument to mixin must be a string type, not %s", exp->e1->type->toChars()); - return setError(); - } - exp->e1 = exp->e1->ctfeInterpret(); - StringExp *se = exp->e1->toStringExp(); + StringExp *se = semanticString(sc, exp->e1, "argument to mixin"); if (!se) - { - exp->error("argument to mixin must be a string, not (%s)", exp->e1->toChars()); return setError(); - } se = se->toUTF8(sc); unsigned errors = global.errors; Parser p(exp->loc, sc->_module, (utf8_t *)se->string, se->len, 0); @@ -2301,27 +2284,16 @@ public: void visit(ImportExp *e) { - const char *name; - StringExp *se; - - sc = sc->startCTFE(); - e->e1 = semantic(e->e1, sc); - e->e1 = resolveProperties(sc, e->e1); - sc = sc->endCTFE(); - e->e1 = e->e1->ctfeInterpret(); - if (e->e1->op != TOKstring) - { - e->error("file name argument must be a string, not (%s)", e->e1->toChars()); - goto Lerror; - } - se = (StringExp *)e->e1; + StringExp *se = semanticString(sc, e->e1, "file name argument"); + if (!se) + return setError(); se = se->toUTF8(sc); - name = (char *)se->string; + const char *name = (char *)se->string; if (!global.params.fileImppath) { e->error("need -Jpath switch to import text file %s", name); - goto Lerror; + return setError(); } /* Be wary of CWE-22: Improper Limitation of a Pathname to a Restricted Directory @@ -2333,7 +2305,7 @@ public: if (!name) { e->error("file %s cannot be found or not in a path specified with -J", se->toChars()); - goto Lerror; + return setError(); } if (global.params.verbose) @@ -2363,7 +2335,7 @@ public: if (f.read()) { e->error("cannot read file %s", f.toChars()); - goto Lerror; + return setError(); } else { @@ -2372,10 +2344,6 @@ public: } } result = semantic(se, sc); - return; - - Lerror: - return setError(); } void visit(AssertExp *exp) diff --git a/gcc/d/dmd/statement.c b/gcc/d/dmd/statement.c index 95bb772..2d3a112 100644 --- a/gcc/d/dmd/statement.c +++ b/gcc/d/dmd/statement.c @@ -31,6 +31,7 @@ StorageClass mergeFuncAttrs(StorageClass s1, FuncDeclaration *f); bool checkEscapeRef(Scope *sc, Expression *e, bool gag); VarDeclaration *copyToTemp(StorageClass stc, const char *name, Expression *e); Expression *semantic(Expression *e, Scope *sc); +StringExp *semanticString(Scope *sc, Expression *exp, const char *s); Identifier *fixupLabelName(Scope *sc, Identifier *ident) { @@ -487,45 +488,36 @@ Statement *CompileStatement::syntaxCopy() return new CompileStatement(loc, exp->syntaxCopy()); } +static Statements *errorStatements() +{ + Statements *a = new Statements(); + a->push(new ErrorStatement()); + return a; +} + Statements *CompileStatement::flatten(Scope *sc) { //printf("CompileStatement::flatten() %s\n", exp->toChars()); - sc = sc->startCTFE(); - exp = semantic(exp, sc); - exp = resolveProperties(sc, exp); - sc = sc->endCTFE(); + StringExp *se = semanticString(sc, exp, "argument to mixin"); + if (!se) + return errorStatements(); + se = se->toUTF8(sc); + + unsigned errors = global.errors; + Parser p(loc, sc->_module, (utf8_t *)se->string, se->len, 0); + p.nextToken(); Statements *a = new Statements(); - if (exp->op != TOKerror) + while (p.token.value != TOKeof) { - Expression *e = exp->ctfeInterpret(); - if (e->op == TOKerror) // Bugzilla 15974 - goto Lerror; - StringExp *se = e->toStringExp(); - if (!se) - error("argument to mixin must be a string, not (%s) of type %s", exp->toChars(), exp->type->toChars()); - else + Statement *s = p.parseStatement(PSsemi | PScurlyscope); + if (!s || p.errors) { - se = se->toUTF8(sc); - unsigned errors = global.errors; - Parser p(loc, sc->_module, (utf8_t *)se->string, se->len, 0); - p.nextToken(); - - while (p.token.value != TOKeof) - { - Statement *s = p.parseStatement(PSsemi | PScurlyscope); - if (!s || p.errors) - { - assert(!p.errors || global.errors != errors); // make sure we caught all the cases - goto Lerror; - } - a->push(s); - } - return a; + assert(!p.errors || global.errors != errors); // make sure we caught all the cases + return errorStatements(); } + a->push(s); } -Lerror: - a->push(new ErrorStatement()); return a; } diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19609a.d b/gcc/testsuite/gdc.test/compilable/imports/test19609a.d new file mode 100644 index 0000000..53d4f88 --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/imports/test19609a.d @@ -0,0 +1 @@ +deprecated([]) module imports.test19609a; diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19609b.d b/gcc/testsuite/gdc.test/compilable/imports/test19609b.d new file mode 100644 index 0000000..91e26e2 --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/imports/test19609b.d @@ -0,0 +1 @@ +deprecated(['h','e','l','l','o']) module imports.test19609b; diff --git a/gcc/testsuite/gdc.test/compilable/imports/test19609c.d b/gcc/testsuite/gdc.test/compilable/imports/test19609c.d new file mode 100644 index 0000000..789585d --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/imports/test19609c.d @@ -0,0 +1 @@ +deprecated(null) module imports.test19609c; diff --git a/gcc/testsuite/gdc.test/compilable/test12567e.d b/gcc/testsuite/gdc.test/compilable/test12567e.d new file mode 100644 index 0000000..14c72bc --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/test12567e.d @@ -0,0 +1,7 @@ +// REQUIRED_ARGS: -o- +/* +TEST_OUTPUT: +--- +--- +*/ +deprecated("a" ~ "b") module fail12567; diff --git a/gcc/testsuite/gdc.test/compilable/test19609.d b/gcc/testsuite/gdc.test/compilable/test19609.d new file mode 100644 index 0000000..a3d6923 --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/test19609.d @@ -0,0 +1,12 @@ +// https://issues.dlang.org/show_bug.cgi?id=19609 +/* +TEST_OUTPUT +--- +compilable/test19609.d(10): Deprecation: module `imports.test19609a` is deprecated - +compilable/test19609.d(11): Deprecation: module `imports.test19609b` is deprecated - hello +compilable/test19609.d(12): Deprecation: module `imports.test19609c` is deprecated - +--- +*/ +import imports.test19609a; +import imports.test19609b; +import imports.test19609c; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail12567.d b/gcc/testsuite/gdc.test/fail_compilation/fail12567.d deleted file mode 100644 index e1ecd19..0000000 --- a/gcc/testsuite/gdc.test/fail_compilation/fail12567.d +++ /dev/null @@ -1,8 +0,0 @@ -// REQUIRED_ARGS: -o- -/* -TEST_OUTPUT: ---- -fail_compilation/fail12567.d(8): Error: string expected, not '"a" ~ "b"' ---- -*/ -deprecated("a" ~ "b") module fail12567; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19609.d b/gcc/testsuite/gdc.test/fail_compilation/fail19609.d new file mode 100644 index 0000000..64d080a --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/fail19609.d @@ -0,0 +1,18 @@ +// https://issues.dlang.org/show_bug.cgi?id=19609 +/* +TEST_OUTPUT +--- +fail_compilation/imports/fail19609a.d(1): Error: `string` expected for deprecation message, not `([""])` of type `string[]` +fail_compilation/fail19609.d(16): Deprecation: module `imports.fail19609a` is deprecated +fail_compilation/imports/fail19609a.d(1): Error: `string` expected for deprecation message, not `([""])` of type `string[]` +fail_compilation/imports/fail19609b.d(1): Error: `string` expected for deprecation message, not `([1])` of type `int[]` +fail_compilation/fail19609.d(17): Deprecation: module `imports.fail19609b` is deprecated +fail_compilation/imports/fail19609b.d(1): Error: `string` expected for deprecation message, not `([1])` of type `int[]` +fail_compilation/imports/fail19609c.d(1): Error: `string` expected for deprecation message, not `(123.4F)` of type `float` +fail_compilation/fail19609.d(18): Deprecation: module `imports.fail19609c` is deprecated +fail_compilation/imports/fail19609c.d(1): Error: `string` expected for deprecation message, not `(123.4F)` of type `float` +--- +*/ +import imports.fail19609a; +import imports.fail19609b; +import imports.fail19609c; diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/fail19609a.d b/gcc/testsuite/gdc.test/fail_compilation/imports/fail19609a.d new file mode 100644 index 0000000..6cf5d61 --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/imports/fail19609a.d @@ -0,0 +1 @@ +deprecated([""]) module imports.fail19609a; diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/fail19609b.d b/gcc/testsuite/gdc.test/fail_compilation/imports/fail19609b.d new file mode 100644 index 0000000..2ba62fe --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/imports/fail19609b.d @@ -0,0 +1 @@ +deprecated([1]) module imports.fail19609b; diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/fail19609c.d b/gcc/testsuite/gdc.test/fail_compilation/imports/fail19609c.d new file mode 100644 index 0000000..4aadb60 --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/imports/fail19609c.d @@ -0,0 +1 @@ +deprecated(123.4f) module imports.fail19609c; -- cgit v1.1 From 459d21c6cffb2c74d2644e21db372ba8a0c27eb6 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 7 Mar 2019 20:10:21 +0100 Subject: re PR target/89602 (Missing AVX512 intrinsics) PR target/89602 * config/i386/sse.md (avx512f_mov_mask, *avx512f_load_mask, avx512f_store_mask): New define_insns. (avx512f_load_mask): New define_expand. * config/i386/i386-builtin.def (__builtin_ia32_loadsd_mask, __builtin_ia32_loadss_mask, __builtin_ia32_storesd_mask, __builtin_ia32_storess_mask, __builtin_ia32_movesd_mask, __builtin_ia32_movess_mask): New builtins. * config/i386/avx512fintrin.h (_mm_mask_load_ss, _mm_maskz_load_ss, _mm_mask_load_sd, _mm_maskz_load_sd, _mm_mask_move_ss, _mm_maskz_move_ss, _mm_mask_move_sd, _mm_maskz_move_sd, _mm_mask_store_ss, _mm_mask_store_sd): New intrinsics. * gcc.target/i386/avx512f-vmovss-1.c: New test. * gcc.target/i386/avx512f-vmovss-2.c: New test. * gcc.target/i386/avx512f-vmovss-3.c: New test. * gcc.target/i386/avx512f-vmovsd-1.c: New test. * gcc.target/i386/avx512f-vmovsd-2.c: New test. * gcc.target/i386/avx512f-vmovsd-3.c: New test. From-SVN: r269467 --- gcc/ChangeLog | 15 ++++ gcc/config/i386/avx512fintrin.h | 77 +++++++++++++++++++++ gcc/config/i386/i386-builtin.def | 6 ++ gcc/config/i386/sse.md | 61 +++++++++++++++++ gcc/testsuite/ChangeLog | 10 +++ gcc/testsuite/gcc.target/i386/avx512f-vmovsd-1.c | 23 +++++++ gcc/testsuite/gcc.target/i386/avx512f-vmovsd-2.c | 87 ++++++++++++++++++++++++ gcc/testsuite/gcc.target/i386/avx512f-vmovsd-3.c | 84 +++++++++++++++++++++++ gcc/testsuite/gcc.target/i386/avx512f-vmovss-1.c | 23 +++++++ gcc/testsuite/gcc.target/i386/avx512f-vmovss-2.c | 87 ++++++++++++++++++++++++ gcc/testsuite/gcc.target/i386/avx512f-vmovss-3.c | 84 +++++++++++++++++++++++ 11 files changed, 557 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/avx512f-vmovsd-1.c create mode 100644 gcc/testsuite/gcc.target/i386/avx512f-vmovsd-2.c create mode 100644 gcc/testsuite/gcc.target/i386/avx512f-vmovsd-3.c create mode 100644 gcc/testsuite/gcc.target/i386/avx512f-vmovss-1.c create mode 100644 gcc/testsuite/gcc.target/i386/avx512f-vmovss-2.c create mode 100644 gcc/testsuite/gcc.target/i386/avx512f-vmovss-3.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1483605..082e90b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2019-03-07 Jakub Jelinek + + PR target/89602 + * config/i386/sse.md (avx512f_mov_mask, + *avx512f_load_mask, avx512f_store_mask): New define_insns. + (avx512f_load_mask): New define_expand. + * config/i386/i386-builtin.def (__builtin_ia32_loadsd_mask, + __builtin_ia32_loadss_mask, __builtin_ia32_storesd_mask, + __builtin_ia32_storess_mask, __builtin_ia32_movesd_mask, + __builtin_ia32_movess_mask): New builtins. + * config/i386/avx512fintrin.h (_mm_mask_load_ss, _mm_maskz_load_ss, + _mm_mask_load_sd, _mm_maskz_load_sd, _mm_mask_move_ss, + _mm_maskz_move_ss, _mm_mask_move_sd, _mm_maskz_move_sd, + _mm_mask_store_ss, _mm_mask_store_sd): New intrinsics. + 2019-03-07 Martin Jambor PR lto/87525 diff --git a/gcc/config/i386/avx512fintrin.h b/gcc/config/i386/avx512fintrin.h index 68320c2..3a4e0ad 100644 --- a/gcc/config/i386/avx512fintrin.h +++ b/gcc/config/i386/avx512fintrin.h @@ -6273,6 +6273,83 @@ _mm512_mask_storeu_ps (void *__P, __mmask16 __U, __m512 __A) (__mmask16) __U); } +extern __inline __m128 +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mask_load_ss (__m128 __W, __mmask8 __U, const float *__P) +{ + return (__m128) __builtin_ia32_loadss_mask (__P, (__v4sf) __W, __U); +} + +extern __inline __m128 +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_maskz_load_ss (__mmask8 __U, const float *__P) +{ + return (__m128) __builtin_ia32_loadss_mask (__P, (__v4sf) _mm_setzero_ps (), + __U); +} + +extern __inline __m128d +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mask_load_sd (__m128d __W, __mmask8 __U, const double *__P) +{ + return (__m128d) __builtin_ia32_loadsd_mask (__P, (__v2df) __W, __U); +} + +extern __inline __m128d +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_maskz_load_sd (__mmask8 __U, const double *__P) +{ + return (__m128d) __builtin_ia32_loadsd_mask (__P, (__v2df) _mm_setzero_pd (), + __U); +} + +extern __inline __m128 +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mask_move_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_movess_mask ((__v4sf) __A, (__v4sf) __B, + (__v4sf) __W, __U); +} + +extern __inline __m128 +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_maskz_move_ss (__mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_movess_mask ((__v4sf) __A, (__v4sf) __B, + (__v4sf) _mm_setzero_ps (), __U); +} + +extern __inline __m128d +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mask_move_sd (__m128d __W, __mmask8 __U, __m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_movesd_mask ((__v2df) __A, (__v2df) __B, + (__v2df) __W, __U); +} + +extern __inline __m128d +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_maskz_move_sd (__mmask8 __U, __m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_movesd_mask ((__v2df) __A, (__v2df) __B, + (__v2df) _mm_setzero_pd (), + __U); +} + +extern __inline void +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mask_store_ss (float *__P, __mmask8 __U, __m128 __A) +{ + __builtin_ia32_storess_mask (__P, (__v4sf) __A, (__mmask8) __U); +} + +extern __inline void +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mask_store_sd (double *__P, __mmask8 __U, __m128d __A) +{ + __builtin_ia32_storesd_mask (__P, (__v2df) __A, (__mmask8) __U); +} + extern __inline __m512i __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) _mm512_mask_loadu_epi64 (__m512i __W, __mmask8 __U, void const *__P) diff --git a/gcc/config/i386/i386-builtin.def b/gcc/config/i386/i386-builtin.def index 88005f4..eeef341 100644 --- a/gcc/config/i386/i386-builtin.def +++ b/gcc/config/i386/i386-builtin.def @@ -255,6 +255,10 @@ BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_storev16sf_mask, "__builtin_ BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_storev16si_mask, "__builtin_ia32_movdqa32store512_mask", IX86_BUILTIN_MOVDQA32STORE512, UNKNOWN, (int) VOID_FTYPE_PV16SI_V16SI_UHI) BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_storev8df_mask, "__builtin_ia32_storeapd512_mask", IX86_BUILTIN_STOREAPD512, UNKNOWN, (int) VOID_FTYPE_PV8DF_V8DF_UQI) BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_storev8di_mask, "__builtin_ia32_movdqa64store512_mask", IX86_BUILTIN_MOVDQA64STORE512, UNKNOWN, (int) VOID_FTYPE_PV8DI_V8DI_UQI) +BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_loaddf_mask, "__builtin_ia32_loadsd_mask", IX86_BUILTIN_LOADSD_MASK, UNKNOWN, (int) V2DF_FTYPE_PCDOUBLE_V2DF_UQI) +BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_loadsf_mask, "__builtin_ia32_loadss_mask", IX86_BUILTIN_LOADSS_MASK, UNKNOWN, (int) V4SF_FTYPE_PCFLOAT_V4SF_UQI) +BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_storedf_mask, "__builtin_ia32_storesd_mask", IX86_BUILTIN_STORESD_MASK, UNKNOWN, (int) VOID_FTYPE_PDOUBLE_V2DF_UQI) +BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_storesf_mask, "__builtin_ia32_storess_mask", IX86_BUILTIN_STORESS_MASK, UNKNOWN, (int) VOID_FTYPE_PFLOAT_V4SF_UQI) BDESC (OPTION_MASK_ISA_LWP, 0, CODE_FOR_lwp_llwpcb, "__builtin_ia32_llwpcb", IX86_BUILTIN_LLWPCB, UNKNOWN, (int) VOID_FTYPE_PVOID) BDESC (OPTION_MASK_ISA_LWP, 0, CODE_FOR_lwp_slwpcb, "__builtin_ia32_slwpcb", IX86_BUILTIN_SLWPCB, UNKNOWN, (int) PVOID_FTYPE_VOID) @@ -1470,6 +1474,8 @@ BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_vternlogv16si_mask, "__built BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_vternlogv16si_maskz, "__builtin_ia32_pternlogd512_maskz", IX86_BUILTIN_VTERNLOGD512_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_INT_UHI) BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_vternlogv8di_mask, "__builtin_ia32_pternlogq512_mask", IX86_BUILTIN_VTERNLOGQ512_MASK, UNKNOWN, (int) V8DI_FTYPE_V8DI_V8DI_V8DI_INT_UQI) BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_vternlogv8di_maskz, "__builtin_ia32_pternlogq512_maskz", IX86_BUILTIN_VTERNLOGQ512_MASKZ, UNKNOWN, (int) V8DI_FTYPE_V8DI_V8DI_V8DI_INT_UQI) +BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_movdf_mask, "__builtin_ia32_movesd_mask", IX86_BUILTIN_MOVSD_MASK, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_V2DF_UQI) +BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_avx512f_movsf_mask, "__builtin_ia32_movess_mask", IX86_BUILTIN_MOVSS_MASK, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_V4SF_UQI) BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_copysignv16sf3, "__builtin_ia32_copysignps512", IX86_BUILTIN_CPYSGNPS512, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF) BDESC (OPTION_MASK_ISA_AVX512F, 0, CODE_FOR_copysignv8df3, "__builtin_ia32_copysignpd512", IX86_BUILTIN_CPYSGNPD512, UNKNOWN, (int) V8DF_FTYPE_V8DF_V8DF) diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index ac29949..259063f 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -1151,6 +1151,67 @@ (set_attr "memory" "none,load") (set_attr "mode" "")]) +(define_insn "avx512f_mov_mask" + [(set (match_operand:VF_128 0 "register_operand" "=v") + (vec_merge:VF_128 + (vec_merge:VF_128 + (match_operand:VF_128 2 "register_operand" "v") + (match_operand:VF_128 3 "nonimm_or_0_operand" "0C") + (match_operand:QI 4 "register_operand" "Yk")) + (match_operand:VF_128 1 "register_operand" "v") + (const_int 1)))] + "TARGET_AVX512F" + "vmov\t{%2, %1, %0%{%4%}%N3|%0%{%4%}%N3, %1, %2}" + [(set_attr "type" "ssemov") + (set_attr "prefix" "evex") + (set_attr "mode" "")]) + +(define_expand "avx512f_load_mask" + [(set (match_operand: 0 "register_operand") + (vec_merge: + (vec_merge: + (vec_duplicate: + (match_operand:MODEF 1 "memory_operand")) + (match_operand: 2 "nonimm_or_0_operand") + (match_operand:QI 3 "register_operand")) + (match_dup 4) + (const_int 1)))] + "TARGET_AVX512F" + "operands[4] = CONST0_RTX (mode);") + +(define_insn "*avx512f_load_mask" + [(set (match_operand: 0 "register_operand" "=v") + (vec_merge: + (vec_merge: + (vec_duplicate: + (match_operand:MODEF 1 "memory_operand" "m")) + (match_operand: 2 "nonimm_or_0_operand" "0C") + (match_operand:QI 3 "register_operand" "Yk")) + (match_operand: 4 "const0_operand" "C") + (const_int 1)))] + "TARGET_AVX512F" + "vmov\t{%1, %0%{%3%}%N2|%0%{3%}%N2, %1}" + [(set_attr "type" "ssemov") + (set_attr "prefix" "evex") + (set_attr "memory" "load") + (set_attr "mode" "")]) + +(define_insn "avx512f_store_mask" + [(set (match_operand:MODEF 0 "memory_operand" "=m") + (if_then_else:MODEF + (and:QI (match_operand:QI 2 "register_operand" "Yk") + (const_int 1)) + (vec_select:MODEF + (match_operand: 1 "register_operand" "v") + (parallel [(const_int 0)])) + (match_dup 0)))] + "TARGET_AVX512F" + "vmov\t{%1, %0%{%2%}|%0%{%2%}, %1}" + [(set_attr "type" "ssemov") + (set_attr "prefix" "evex") + (set_attr "memory" "store") + (set_attr "mode" "")]) + (define_insn "_blendm" [(set (match_operand:V48_AVX512VL 0 "register_operand" "=v") (vec_merge:V48_AVX512VL diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bf1546b..31b1f69 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2019-03-07 Jakub Jelinek + + PR target/89602 + * gcc.target/i386/avx512f-vmovss-1.c: New test. + * gcc.target/i386/avx512f-vmovss-2.c: New test. + * gcc.target/i386/avx512f-vmovss-3.c: New test. + * gcc.target/i386/avx512f-vmovsd-1.c: New test. + * gcc.target/i386/avx512f-vmovsd-2.c: New test. + * gcc.target/i386/avx512f-vmovsd-3.c: New test. + 2019-03-07 Martin Jambor PR lto/87525 diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovsd-1.c new file mode 100644 index 0000000..a7e136b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovsd-1.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx512f -O2 -masm=att" } */ +/* { dg-final { scan-assembler-times "vmovsd\[ \\t\]+\\(%\[a-z0-9,]*\\), %xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vmovsd\[ \\t\]+\\(%\[a-z0-9,]*\\), %xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vmovsd\[ \\t\]+%xmm\[0-9\]+, %xmm\[0-9\]+, %xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vmovsd\[ \\t\]+%xmm\[0-9\]+, %xmm\[0-9\]+, %xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vmovsd\[ \\t\]+%xmm\[0-9\]+, \\(%\[a-z0-9,]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m128d x1, x2, x3; +volatile __mmask8 m; +double *volatile p; + +void extern +avx512f_test (void) +{ + x1 = _mm_mask_load_sd (x1, m, p); + x1 = _mm_maskz_load_sd (m, p); + x1 = _mm_mask_move_sd (x1, m, x2, x3); + x1 = _mm_maskz_move_sd (m, x2, x3); + _mm_mask_store_sd (p, m, x1); +} diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovsd-2.c new file mode 100644 index 0000000..fad298a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovsd-2.c @@ -0,0 +1,87 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -mavx512f" } */ +/* { dg-require-effective-target avx512f } */ + +#include "avx512f-check.h" + +#include "avx512f-helper.h" + +#define SIZE (128 / 64) +#include "avx512f-mask-type.h" + +void +avx512f_test (void) +{ + int i, sign; + union128d res1, res2, res3, res4, src1, src2, src3; + volatile __mmask8 mask = 5; + double val[2] = { 35.5, 0.0 }; + double *volatile p = &val[0]; + double res_ref[SIZE]; + double zero[SIZE]; + + for (i = 0; i < SIZE; i++) + { + src1.a[i] = 1.5 + i; + src2.a[i] = 7.5 + i; + src3.a[i] = 4.5 + i; + zero[i] = 0.0; + } + + res1.x = _mm_mask_load_sd (src1.x, mask, p); + res2.x = _mm_maskz_load_sd (mask, p); + + __builtin_memcpy (res_ref, zero, sizeof (zero)); + res_ref[0] = val[0]; + if (check_union128d (res1, res_ref)) + abort (); + + if (check_union128d (res2, res_ref)) + abort (); + + res3.x = _mm_mask_move_sd (src1.x, mask, src2.x, src3.x); + res4.x = _mm_maskz_move_sd (mask, src2.x, src3.x); + + __builtin_memcpy (res_ref, src2.a, sizeof (src2.a)); + res_ref[0] = src3.a[0]; + if (check_union128d (res3, res_ref)) + abort (); + + if (check_union128d (res4, res_ref)) + abort (); + + _mm_mask_store_sd (p + 1, mask, src1.x); + if (val[1] != src1.a[0]) + abort (); + + mask ^= 1; + + res1.x = _mm_mask_load_sd (src1.x, mask, p); + res2.x = _mm_maskz_load_sd (mask, p); + + __builtin_memcpy (res_ref, zero, sizeof (zero)); + res_ref[0] = src1.a[0]; + if (check_union128d (res1, res_ref)) + abort (); + + res_ref[0] = zero[0]; + if (check_union128d (res2, res_ref)) + abort (); + + res3.x = _mm_mask_move_sd (src1.x, mask, src2.x, src3.x); + res4.x = _mm_maskz_move_sd (mask, src2.x, src3.x); + + __builtin_memcpy (res_ref, src2.a, sizeof (src2.a)); + res_ref[0] = src1.a[0]; + if (check_union128d (res3, res_ref)) + abort (); + + res_ref[0] = zero[0]; + if (check_union128d (res4, res_ref)) + abort (); + + val[1] = 42.0; + _mm_mask_store_sd (p + 1, mask, src1.x); + if (val[1] != 42.0) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovsd-3.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovsd-3.c new file mode 100644 index 0000000..d84aefc --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovsd-3.c @@ -0,0 +1,84 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -mavx512f" } */ +/* { dg-require-effective-target avx512f } */ + +#include "avx512f-check.h" + +#include "avx512f-helper.h" + +#define SIZE (128 / 64) +#include "avx512f-mask-type.h" + +void +avx512f_test (void) +{ + int i, sign; + union128d res1, res2, res3, res4, src1, src2, src3; + double val[2] = { 35.5, 0.0 }; + double *volatile p = &val[0]; + double res_ref[SIZE]; + double zero[SIZE]; + + for (i = 0; i < SIZE; i++) + { + src1.a[i] = 1.5 + i; + src2.a[i] = 7.5 + i; + src3.a[i] = 4.5 + i; + zero[i] = 0.0; + } + + res1.x = _mm_mask_load_sd (src1.x, 1, p); + res2.x = _mm_maskz_load_sd (1, p); + + __builtin_memcpy (res_ref, zero, sizeof (zero)); + res_ref[0] = val[0]; + if (check_union128d (res1, res_ref)) + abort (); + + if (check_union128d (res2, res_ref)) + abort (); + + res3.x = _mm_mask_move_sd (src1.x, 1, src2.x, src3.x); + res4.x = _mm_maskz_move_sd (1, src2.x, src3.x); + + __builtin_memcpy (res_ref, src2.a, sizeof (src2.a)); + res_ref[0] = src3.a[0]; + if (check_union128d (res3, res_ref)) + abort (); + + if (check_union128d (res4, res_ref)) + abort (); + + _mm_mask_store_sd (p + 1, 1, src1.x); + if (val[1] != src1.a[0]) + abort (); + + res1.x = _mm_mask_load_sd (src1.x, 0, p); + res2.x = _mm_maskz_load_sd (0, p); + + __builtin_memcpy (res_ref, zero, sizeof (zero)); + res_ref[0] = src1.a[0]; + if (check_union128d (res1, res_ref)) + abort (); + + res_ref[0] = zero[0]; + if (check_union128d (res2, res_ref)) + abort (); + + res3.x = _mm_mask_move_sd (src1.x, 0, src2.x, src3.x); + res4.x = _mm_maskz_move_sd (0, src2.x, src3.x); + + __builtin_memcpy (res_ref, src2.a, sizeof (src2.a)); + res_ref[0] = src1.a[0]; + if (check_union128d (res3, res_ref)) + abort (); + + res_ref[0] = zero[0]; + if (check_union128d (res4, res_ref)) + abort (); + + val[1] = 42.0; + _mm_mask_store_sd (p + 1, 0, src1.x); + if (val[1] != 42.0) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovss-1.c new file mode 100644 index 0000000..85f40dc --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovss-1.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx512f -O2 -masm=att" } */ +/* { dg-final { scan-assembler-times "vmovss\[ \\t\]+\\(%\[a-z0-9,]*\\), %xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vmovss\[ \\t\]+\\(%\[a-z0-9,]*\\), %xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vmovss\[ \\t\]+%xmm\[0-9\]+, %xmm\[0-9\]+, %xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vmovss\[ \\t\]+%xmm\[0-9\]+, %xmm\[0-9\]+, %xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vmovss\[ \\t\]+%xmm\[0-9\]+, \\(%\[a-z0-9,]*\\)\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include + +volatile __m128 x1, x2, x3; +volatile __mmask8 m; +float *volatile p; + +void extern +avx512f_test (void) +{ + x1 = _mm_mask_load_ss (x1, m, p); + x1 = _mm_maskz_load_ss (m, p); + x1 = _mm_mask_move_ss (x1, m, x2, x3); + x1 = _mm_maskz_move_ss (m, x2, x3); + _mm_mask_store_ss (p, m, x1); +} diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovss-2.c new file mode 100644 index 0000000..91721cf --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovss-2.c @@ -0,0 +1,87 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -mavx512f" } */ +/* { dg-require-effective-target avx512f } */ + +#include "avx512f-check.h" + +#include "avx512f-helper.h" + +#define SIZE (128 / 32) +#include "avx512f-mask-type.h" + +void +avx512f_test (void) +{ + int i, sign; + union128 res1, res2, res3, res4, src1, src2, src3; + volatile __mmask8 mask = 5; + float val[2] = { 35.5f, 0.0f }; + float *volatile p = &val[0]; + float res_ref[SIZE]; + float zero[SIZE]; + + for (i = 0; i < SIZE; i++) + { + src1.a[i] = 1.5f + i; + src2.a[i] = 7.5f + i; + src3.a[i] = 4.5f + i; + zero[i] = 0.0f; + } + + res1.x = _mm_mask_load_ss (src1.x, mask, p); + res2.x = _mm_maskz_load_ss (mask, p); + + __builtin_memcpy (res_ref, zero, sizeof (zero)); + res_ref[0] = val[0]; + if (check_union128 (res1, res_ref)) + abort (); + + if (check_union128 (res2, res_ref)) + abort (); + + res3.x = _mm_mask_move_ss (src1.x, mask, src2.x, src3.x); + res4.x = _mm_maskz_move_ss (mask, src2.x, src3.x); + + __builtin_memcpy (res_ref, src2.a, sizeof (src2.a)); + res_ref[0] = src3.a[0]; + if (check_union128 (res3, res_ref)) + abort (); + + if (check_union128 (res4, res_ref)) + abort (); + + _mm_mask_store_ss (p + 1, mask, src1.x); + if (val[1] != src1.a[0]) + abort (); + + mask ^= 1; + + res1.x = _mm_mask_load_ss (src1.x, mask, p); + res2.x = _mm_maskz_load_ss (mask, p); + + __builtin_memcpy (res_ref, zero, sizeof (zero)); + res_ref[0] = src1.a[0]; + if (check_union128 (res1, res_ref)) + abort (); + + res_ref[0] = zero[0]; + if (check_union128 (res2, res_ref)) + abort (); + + res3.x = _mm_mask_move_ss (src1.x, mask, src2.x, src3.x); + res4.x = _mm_maskz_move_ss (mask, src2.x, src3.x); + + __builtin_memcpy (res_ref, src2.a, sizeof (src2.a)); + res_ref[0] = src1.a[0]; + if (check_union128 (res3, res_ref)) + abort (); + + res_ref[0] = zero[0]; + if (check_union128 (res4, res_ref)) + abort (); + + val[1] = 42.0f; + _mm_mask_store_ss (p + 1, mask, src1.x); + if (val[1] != 42.0f) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovss-3.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovss-3.c new file mode 100644 index 0000000..bb05983 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovss-3.c @@ -0,0 +1,84 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -mavx512f" } */ +/* { dg-require-effective-target avx512f } */ + +#include "avx512f-check.h" + +#include "avx512f-helper.h" + +#define SIZE (128 / 32) +#include "avx512f-mask-type.h" + +void +avx512f_test (void) +{ + int i, sign; + union128 res1, res2, res3, res4, src1, src2, src3; + float val[2] = { 35.5f, 0.0f }; + float *volatile p = &val[0]; + float res_ref[SIZE]; + float zero[SIZE]; + + for (i = 0; i < SIZE; i++) + { + src1.a[i] = 1.5f + i; + src2.a[i] = 7.5f + i; + src3.a[i] = 4.5f + i; + zero[i] = 0.0f; + } + + res1.x = _mm_mask_load_ss (src1.x, 1, p); + res2.x = _mm_maskz_load_ss (1, p); + + __builtin_memcpy (res_ref, zero, sizeof (zero)); + res_ref[0] = val[0]; + if (check_union128 (res1, res_ref)) + abort (); + + if (check_union128 (res2, res_ref)) + abort (); + + res3.x = _mm_mask_move_ss (src1.x, 1, src2.x, src3.x); + res4.x = _mm_maskz_move_ss (1, src2.x, src3.x); + + __builtin_memcpy (res_ref, src2.a, sizeof (src2.a)); + res_ref[0] = src3.a[0]; + if (check_union128 (res3, res_ref)) + abort (); + + if (check_union128 (res4, res_ref)) + abort (); + + _mm_mask_store_ss (p + 1, 1, src1.x); + if (val[1] != src1.a[0]) + abort (); + + res1.x = _mm_mask_load_ss (src1.x, 0, p); + res2.x = _mm_maskz_load_ss (0, p); + + __builtin_memcpy (res_ref, zero, sizeof (zero)); + res_ref[0] = src1.a[0]; + if (check_union128 (res1, res_ref)) + abort (); + + res_ref[0] = zero[0]; + if (check_union128 (res2, res_ref)) + abort (); + + res3.x = _mm_mask_move_ss (src1.x, 0, src2.x, src3.x); + res4.x = _mm_maskz_move_ss (0, src2.x, src3.x); + + __builtin_memcpy (res_ref, src2.a, sizeof (src2.a)); + res_ref[0] = src1.a[0]; + if (check_union128 (res3, res_ref)) + abort (); + + res_ref[0] = zero[0]; + if (check_union128 (res4, res_ref)) + abort (); + + val[1] = 42.0f; + _mm_mask_store_ss (p + 1, 0, src1.x); + if (val[1] != 42.0f) + abort (); +} -- cgit v1.1 From 90a0bf4e029b1ff3d7e7dfc6f98da88356587959 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 7 Mar 2019 20:46:11 +0100 Subject: re PR translation/79999 (possible typo in gimplify.c: depend(sink:)) PR translation/79999 * gimplify.c (gimplify_omp_ordered): Reword diagnostics to talk about depend clause with source (or sink) modifier. * omp-expand.c (expand_omp_ordered_sink): Likewise. * c-c++-common/gomp/doacross-1.c: Adjust expected diagnostics. * c-c++-common/gomp/doacross-3.c: New test. From-SVN: r269468 --- gcc/ChangeLog | 5 +++ gcc/gimplify.c | 13 +++---- gcc/omp-expand.c | 9 ++--- gcc/testsuite/ChangeLog | 4 +++ gcc/testsuite/c-c++-common/gomp/doacross-1.c | 4 +-- gcc/testsuite/c-c++-common/gomp/doacross-3.c | 54 ++++++++++++++++++++++++++++ 6 files changed, 77 insertions(+), 12 deletions(-) create mode 100644 gcc/testsuite/c-c++-common/gomp/doacross-3.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 082e90b..e2ece53 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2019-03-07 Jakub Jelinek + PR translation/79999 + * gimplify.c (gimplify_omp_ordered): Reword diagnostics to talk about + depend clause with source (or sink) modifier. + * omp-expand.c (expand_omp_ordered_sink): Likewise. + PR target/89602 * config/i386/sse.md (avx512f_mov_mask, *avx512f_load_mask, avx512f_store_mask): New define_insns. diff --git a/gcc/gimplify.c b/gcc/gimplify.c index fa85b1c..6d7a314 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -12145,8 +12145,8 @@ gimplify_omp_ordered (tree expr, gimple_seq body) if (!fail && i != gimplify_omp_ctxp->loop_iter_var.length () / 2) { error_at (OMP_CLAUSE_LOCATION (c), - "number of variables in % " - "clause does not match number of " + "number of variables in % clause with " + "% modifier does not match number of " "iteration variables"); failures++; } @@ -12158,8 +12158,8 @@ gimplify_omp_ordered (tree expr, gimple_seq body) if (source_c) { error_at (OMP_CLAUSE_LOCATION (c), - "more than one % clause on an " - "% construct"); + "more than one % clause with % " + "modifier on an % construct"); failures++; } else @@ -12169,8 +12169,9 @@ gimplify_omp_ordered (tree expr, gimple_seq body) if (source_c && sink_c) { error_at (OMP_CLAUSE_LOCATION (source_c), - "% clause specified together with " - "% clauses on the same construct"); + "% clause with % modifier specified " + "together with % clauses with % modifier " + "on the same construct"); failures++; } diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c index 5c2dba9..89a3a32 100644 --- a/gcc/omp-expand.c +++ b/gcc/omp-expand.c @@ -2147,8 +2147,8 @@ expand_omp_ordered_sink (gimple_stmt_iterator *gsi, struct omp_for_data *fd, forward = tree_int_cst_sgn (step) != -1; } if (forward ^ OMP_CLAUSE_DEPEND_SINK_NEGATIVE (deps)) - warning_at (loc, 0, "% clause waiting for " - "lexically later iteration"); + warning_at (loc, 0, "% clause with % modifier " + "waiting for lexically later iteration"); break; } deps = TREE_CHAIN (deps); @@ -2284,8 +2284,9 @@ expand_omp_ordered_sink (gimple_stmt_iterator *gsi, struct omp_for_data *fd, build_int_cst (itype, 0)); if (integer_zerop (t) && !warned_step) { - warning_at (loc, 0, "% refers to iteration never " - "in the iteration space"); + warning_at (loc, 0, "% clause with % modifier " + "refers to iteration never in the iteration " + "space"); warned_step = true; } cond = fold_build2_loc (loc, BIT_AND_EXPR, boolean_type_node, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 31b1f69..e2b22ba 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2019-03-07 Jakub Jelinek + PR translation/79999 + * c-c++-common/gomp/doacross-1.c: Adjust expected diagnostics. + * c-c++-common/gomp/doacross-3.c: New test. + PR target/89602 * gcc.target/i386/avx512f-vmovss-1.c: New test. * gcc.target/i386/avx512f-vmovss-2.c: New test. diff --git a/gcc/testsuite/c-c++-common/gomp/doacross-1.c b/gcc/testsuite/c-c++-common/gomp/doacross-1.c index 6244ca0..eacaeae 100644 --- a/gcc/testsuite/c-c++-common/gomp/doacross-1.c +++ b/gcc/testsuite/c-c++-common/gomp/doacross-1.c @@ -38,11 +38,11 @@ foo (void) for (i = 0; i < 64; i++) { #pragma omp ordered depend (sink: i - 1) depend (sink: i - 2) - #pragma omp ordered depend (source) depend (source) /* { dg-error "more than one .depend.source.. clause on an" } */ + #pragma omp ordered depend (source) depend (source) /* { dg-error "more than one .depend. clause with .source. modifier on an .ordered. construct" } */ } #pragma omp for ordered (1) for (i = 0; i < 64; i++) { - #pragma omp ordered depend (sink: i - 1) depend (source) depend (sink: i - 2) /* { dg-error "clause specified together with" } */ + #pragma omp ordered depend (sink: i - 1) depend (source) depend (sink: i - 2) /* { dg-error ".depend. clause with .source. modifier specified together with .depend. clauses with .sink. modifier on the same construct" } */ } } diff --git a/gcc/testsuite/c-c++-common/gomp/doacross-3.c b/gcc/testsuite/c-c++-common/gomp/doacross-3.c new file mode 100644 index 0000000..6d75172 --- /dev/null +++ b/gcc/testsuite/c-c++-common/gomp/doacross-3.c @@ -0,0 +1,54 @@ +/* { dg-do compile } */ +/* { dg-options "-fopenmp" } */ + +void +foo (void) +{ + int i, j; + #pragma omp for ordered (1) + for (i = 0; i < 64; i++) + { + #pragma omp ordered depend (sink: i + 1) /* { dg-warning "'depend' clause with 'sink' modifier waiting for lexically later iteration" } */ + #pragma omp ordered depend (source) + } + #pragma omp for ordered (1) + for (i = 63; i >= 0; i--) + { + #pragma omp ordered depend (sink: i - 1) /* { dg-warning "'depend' clause with 'sink' modifier waiting for lexically later iteration" } */ + #pragma omp ordered depend (source) + } + #pragma omp for ordered (2) collapse (2) + for (i = 0; i < 64; i++) + for (j = 0; j < 64; j++) + { + #pragma omp ordered depend (sink: i + 1, j - 2) /* { dg-warning "'depend' clause with 'sink' modifier waiting for lexically later iteration" } */ + #pragma omp ordered depend (source) + } + #pragma omp for ordered (2) collapse (2) + for (i = 63; i >= 0; --i) + for (j = 0; j < 64; j++) + { + #pragma omp ordered depend (sink: i - 2, j - 2) /* { dg-warning "'depend' clause with 'sink' modifier waiting for lexically later iteration" } */ + #pragma omp ordered depend (source) + } + #pragma omp for ordered (2) collapse (2) + for (i = 0; i < 64; i++) + for (j = 0; j < 64; j++) + { + #pragma omp ordered depend (sink: i - 1, j + 2) + #pragma omp ordered depend (source) + } + #pragma omp for ordered (2) collapse (2) + for (i = 63; i >= 0; --i) + for (j = 0; j < 64; j++) + { + #pragma omp ordered depend (sink: i + 2, j + 2) + #pragma omp ordered depend (source) + } + #pragma omp for ordered (1) + for (i = 0; i < 64; i += 2) + { + #pragma omp ordered depend (sink: i - 1) /* { dg-warning "'depend' clause with 'sink' modifier refers to iteration never in the iteration space" } */ + #pragma omp ordered depend (source) + } +} -- cgit v1.1 From c7163b643e48094f4a7e97c158cb11ca8560257b Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 7 Mar 2019 20:49:42 +0000 Subject: re PR c++/84518 (ICE with lambda capturing broken variable) 2019-03-07 Paolo Carlini PR c++/84518 * g++.dg/cpp0x/lambda/lambda-ice30.C: New. * g++.dg/cpp0x/lambda/lambda-ice31.C: Likewise. From-SVN: r269469 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice30.C | 13 +++++++++++++ gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice31.C | 8 ++++++++ 3 files changed, 27 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice30.C create mode 100644 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice31.C (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e2b22ba..0a90257 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-07 Paolo Carlini + + PR c++/84518 + * g++.dg/cpp0x/lambda/lambda-ice30.C: New. + * g++.dg/cpp0x/lambda/lambda-ice31.C: Likewise. + 2019-03-07 Jakub Jelinek PR translation/79999 diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice30.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice30.C new file mode 100644 index 0000000..46350bd --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice30.C @@ -0,0 +1,13 @@ +// PR c++/84518 +// { dg-do compile { target c++11 } } + +template void foo() +{ + int x[=]; // { dg-error "expected" } + [&x]{}; +} + +void bar() +{ + foo<0>(); +} diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice31.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice31.C new file mode 100644 index 0000000..54ded7b --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice31.C @@ -0,0 +1,8 @@ +// PR c++/84518 +// { dg-do compile { target c++11 } } + +template void foo() +{ + T x[=]; // { dg-error "expected" } + [&x]{}; +} -- cgit v1.1 From c04d666671b91e34d708df69e1202c190f6a5640 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 7 Mar 2019 20:50:30 +0000 Subject: * fi.po: Update. From-SVN: r269470 --- gcc/po/ChangeLog | 4 + gcc/po/fi.po | 2690 ++++++++++++++++++++++++++++-------------------------- 2 files changed, 1403 insertions(+), 1291 deletions(-) (limited to 'gcc') diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog index f0e7ba4..30a8eb7 100644 --- a/gcc/po/ChangeLog +++ b/gcc/po/ChangeLog @@ -1,3 +1,7 @@ +2019-03-07 Joseph Myers + + * fi.po: Update. + 2019-02-25 Joseph Myers * fr.po: Update. diff --git a/gcc/po/fi.po b/gcc/po/fi.po index cf4e772..8fd4f84 100644 --- a/gcc/po/fi.po +++ b/gcc/po/fi.po @@ -1,9 +1,9 @@ # Finnish translation of GNU Compiler Collection -# Copyright © 2013 Free Software Foundation, Inc. +# Copyright © 2019 Free Software Foundation, Inc. # This file is distributed under the same license as the GCC package. # Ville Koskinen , 2005. # Jorma Karvonen , 2009. -# Lauri Nurmi , 2007-2010, 2013. +# Lauri Nurmi , 2007-2010, 2013, 2015, 2016, 2019. # # Joitakin termejä, joille voi miettiä (parempaa) suomennosta: # @@ -33,7 +33,7 @@ msgstr "" "Project-Id-Version: gcc 9.1-b20190203\n" "Report-Msgid-Bugs-To: https://gcc.gnu.org/bugs/\n" "POT-Creation-Date: 2019-02-01 23:01+0000\n" -"PO-Revision-Date: 2019-02-09 16:58+0200\n" +"PO-Revision-Date: 2019-03-05 00:07+0200\n" "Last-Translator: Lauri Nurmi \n" "Language-Team: Finnish \n" "Language: fi\n" @@ -114,9 +114,8 @@ msgstr "" "ldd-tuloste muodostimilla/hajottimilla.\n" #: cprop.c:1756 -#, fuzzy msgid "const/copy propagation disabled" -msgstr "[ei käytössä]" +msgstr "const-/kopioinnin-eteneminen poistettu käytöstä" #: diagnostic.c:145 #, fuzzy, c-format @@ -303,34 +302,28 @@ msgid "Options:\n" msgstr "Valitsimet:\n" #: gcc.c:3547 -#, fuzzy msgid " -pass-exit-codes Exit with highest error code from a phase.\n" -msgstr " -pass-exit-codes Palauta korkein käännösvaiheen virhekoodi\n" +msgstr " -pass-exit-codes Palauta vaiheen korkein virhekoodi.\n" #: gcc.c:3548 -#, fuzzy msgid " --help Display this information.\n" -msgstr " --help Näytä tämä ohje\n" +msgstr " --help Näytä tämä ohje.\n" #: gcc.c:3549 -#, fuzzy msgid " --target-help Display target specific command line options.\n" -msgstr " --target-help Näytä kohdekohtaiset komentorivivalitsimet\n" +msgstr " --target-help Näytä kohdekohtaiset komentorivivalitsimet.\n" #: gcc.c:3550 -#, fuzzy msgid " --help={common|optimizers|params|target|warnings|[^]{joined|separate|undocumented}}[,...].\n" -msgstr " --help={target|optimizers|warnings|undocumented|params}[,{[^]joined|[^]separate}]\n" +msgstr " --help={common|optimizers|params|target|warnings|[^]{joined|separate|undocumented}}[,...].\n" #: gcc.c:3551 -#, fuzzy msgid " Display specific types of command line options.\n" -msgstr " Näytä tietyn tyyppiset komentorivivalitsimet\n" +msgstr " Näytä tietyn tyyppiset komentorivivalitsimet.\n" #: gcc.c:3553 -#, fuzzy msgid " (Use '-v --help' to display command line options of sub-processes).\n" -msgstr " (Komennolla ”-v --help” aliprosessien komentorivivalitsimet)\n" +msgstr " (Komennolla ”-v --help” aliprosessien komentorivivalitsimet).\n" #: gcc.c:3554 msgid " --version Display compiler version information.\n" @@ -441,9 +434,8 @@ msgid " -time Time the execution of each subprocess.\n" msgstr " -time Mittaa kunkin aliprosessin suoritusaika.\n" #: gcc.c:3585 -#, fuzzy msgid " -specs= Override built-in specs with the contents of .\n" -msgstr " -o Ohjaa tuloste \n" +msgstr " -specs= Ohita sisäänrakennetut määritykset sisällöllä.\n" #: gcc.c:3586 msgid " -std= Assume that the input sources are for .\n" @@ -466,9 +458,8 @@ msgid " -v Display the programs invoked by the compiler.\ msgstr " -v Näytä kääntäjän käynnistämät ohjelmat.\n" #: gcc.c:3592 -#, fuzzy msgid " -### Like -v but options quoted and commands not executed.\n" -msgstr " -pie Luo paikkariippumaton suoritettava tiedosto\n" +msgstr " -### Kuin -v mutta valitsimet lainausmerkeissä eikä komentoja käynnistetä.\n" #: gcc.c:3593 msgid " -E Preprocess only; do not compile, assemble or link.\n" @@ -487,28 +478,26 @@ msgid " -o Place the output into .\n" msgstr " -o Ohjaa tuloste .\n" #: gcc.c:3597 -#, fuzzy msgid "" " -pie Create a dynamically linked position independent\n" " executable.\n" -msgstr " -pie Luo paikkariippumaton suoritettava tiedosto\n" +msgstr " -pie Luo paikkariippumaton suoritettava tiedosto.\n" #: gcc.c:3599 msgid " -shared Create a shared library.\n" msgstr " -shared Luo jaettu kirjasto.\n" #: gcc.c:3600 -#, fuzzy msgid "" " -x Specify the language of the following input files.\n" " Permissible languages include: c c++ assembler none\n" " 'none' means revert to the default behavior of\n" " guessing the language based on the file's extension.\n" msgstr "" -" -x Määrittele seuraavien syötetiedostojen kieli\n" +" -x Määrittele seuraavien syötetiedostojen kieli.\n" " Kelvollisia kieliä ovat mm. c c++ assembler none\n" " ”none” palauttaa käyttöön oletustoiminnan,\n" -" eli kielen päättelyn tiedostopäätteestä\n" +" eli kielen päättelyn tiedoston päätteestä.\n" #: gcc.c:3607 #, c-format @@ -550,9 +539,9 @@ msgid "gcc version %s %s\n" msgstr "gcc-versio %s %s\n" #: gcc.c:6807 -#, c-format +#, fuzzy, c-format msgid "gcc driver version %s %sexecuting gcc version %s\n" -msgstr "" +msgstr "GMP-versio %s, MPFR-versio %s\n" #: gcc.c:6880 gcc.c:7090 #, c-format @@ -1004,9 +993,9 @@ msgid "%s:not a gcov notes file\n" msgstr "%s:ei ole gcov-datatiedosto\n" #: gcov.c:1688 -#, c-format +#, fuzzy, c-format msgid "%s:version '%.4s', prefer '%.4s'\n" -msgstr "" +msgstr "GMP-versio %s, MPFR-versio %s\n" #: gcov.c:1736 #, fuzzy, c-format @@ -1159,14 +1148,12 @@ msgid "Cannot open source file %s\n" msgstr "Lähdetiedostoa %s ei voi avata\n" #: gcse.c:2590 -#, fuzzy msgid "PRE disabled" -msgstr "[ei käytössä]" +msgstr "PRE poistettu käytöstä" #: gcse.c:3519 -#, fuzzy msgid "GCSE disabled" -msgstr "[ei käytössä]" +msgstr "GCSE pois käytöstä" #: gimple-ssa-isolate-paths.c:547 c/c-typeck.c:10640 #, gcc-internal-format @@ -1235,9 +1222,8 @@ msgid "In function %qs" msgstr "Funktio %qs" #: langhooks.c:445 cp/error.c:3411 -#, fuzzy msgid " inlined from %qs at %r%s:%d:%d%R" -msgstr "Muodostin %qs" +msgstr " avattu lähteestä %qs, %r%s:%d:%d%R" #: langhooks.c:450 cp/error.c:3416 #, fuzzy @@ -1414,17 +1400,19 @@ msgid "insn does not satisfy its constraints:" msgstr "alustusalkio ei ole vakio" #: targhooks.c:2019 -#, c-format +#, fuzzy, c-format msgid "created and used with differing settings of '%s'" -msgstr "" +msgstr "%qD esitelty uudelleen eri näkyvyydellä" #: targhooks.c:2034 +#, fuzzy msgid "created and used with different settings of -fpic" -msgstr "" +msgstr "%qD esitelty uudelleen eri näkyvyydellä" #: targhooks.c:2036 +#, fuzzy msgid "created and used with different settings of -fpie" -msgstr "" +msgstr "%qD esitelty uudelleen eri näkyvyydellä" #: tlink.c:387 #, fuzzy, c-format @@ -1554,8 +1542,9 @@ msgid "recursive inlining" msgstr " Rekursiiviset jäsenet:\n" #: cif-code.def:84 +#, fuzzy msgid "call is unlikely and code size would grow" -msgstr "" +msgstr "funktiota % ei voi määrittää avoimeksi" #: cif-code.def:88 #, fuzzy @@ -1689,14 +1678,14 @@ msgid "The minimal estimated speedup allowing inliner to ignore inline-insns-sin msgstr "" #: params.def:70 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of instructions in a single function eligible for inlining." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:82 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of instructions when automatically inlining." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:87 #, no-c-format @@ -1704,19 +1693,19 @@ msgid "The maximum number of instructions when automatically inlining small func msgstr "" #: params.def:92 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of instructions when inlining for size." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:97 -#, no-c-format +#, fuzzy, no-c-format msgid "Instruction accounted for function prologue, epilogue and other overhead." -msgstr "" +msgstr "virheellinen ei-staattisen jäsenfunktion käyttö" #: params.def:103 -#, no-c-format +#, fuzzy, no-c-format msgid "Time accounted for function prologue, epilogue and other overhead." -msgstr "" +msgstr "virheellinen ei-staattisen jäsenfunktion käyttö" #: params.def:109 #, no-c-format @@ -1729,19 +1718,19 @@ msgid "Time accounted for function thunk overhead." msgstr "" #: params.def:119 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of instructions inline function can grow to via recursive inlining." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:124 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of instructions non-inline function can grow to via recursive inlining." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:129 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum depth of recursive inlining for inline functions." -msgstr "" +msgstr "Kumoamistoimintojen enimmäismäärä" #: params.def:134 #, no-c-format @@ -1754,9 +1743,9 @@ msgid "Inline recursively only when the probability of call being executed excee msgstr "" #: params.def:147 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of nested indirect inlining performed by early inliner." -msgstr "" +msgstr "Kumoamistoimintojen enimmäismäärä" #: params.def:153 #, no-c-format @@ -1779,14 +1768,14 @@ msgid "If -ftree-vectorize is used, the minimal loop bound of a loop to be consi msgstr "" #: params.def:183 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of instructions to consider to fill a delay slot." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:194 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of instructions to consider to find accurate live register information." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:204 #, no-c-format @@ -1799,9 +1788,9 @@ msgid "The maximum number of backtrack attempts the scheduler should make when m msgstr "" #: params.def:216 -#, no-c-format +#, fuzzy, no-c-format msgid "The size of function body to be considered large." -msgstr "" +msgstr "pinokehys ei ole 8:n tavun monikerta: %wd" #: params.def:220 #, no-c-format @@ -1809,9 +1798,9 @@ msgid "Maximal growth due to inlining of large function (in percent)." msgstr "" #: params.def:224 -#, no-c-format +#, fuzzy, no-c-format msgid "The size of translation unit to be considered large." -msgstr "" +msgstr "pinokehys ei ole 8:n tavun monikerta: %wd" #: params.def:228 #, no-c-format @@ -1889,19 +1878,19 @@ msgid "Maximum depth of sqrt chains to use when synthesizing exponentiation by a msgstr "" #: params.def:329 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of instructions to consider to unroll in a loop." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:335 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of instructions to consider to unroll in a loop on average." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:340 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of unrollings of a single loop." -msgstr "" +msgstr "Kumoamistoimintojen enimmäismäärä" #: params.def:345 #, fuzzy, no-c-format @@ -1914,24 +1903,24 @@ msgid "The maximum number of peelings of a single loop." msgstr "Kumoamistoimintojen enimmäismäärä" #: params.def:355 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of branches on the path through the peeled sequence." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:360 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of insns of a completely peeled loop." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:365 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of peelings of a single loop that is peeled completely." -msgstr "" +msgstr "Kumoamistoimintojen enimmäismäärä" #: params.def:370 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of insns of a peeled loop that rolls only once." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:375 #, no-c-format @@ -1939,19 +1928,19 @@ msgid "The maximum depth of a loop nest we completely peel." msgstr "" #: params.def:381 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of insns of an unswitched loop." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:386 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of unswitchings in a single loop." -msgstr "" +msgstr "Kumoamistoimintojen enimmäismäärä" #: params.def:393 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of insns in loop header duplicated by the copy loop headers pass." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:400 #, no-c-format @@ -2014,9 +2003,9 @@ msgid "Loops iterating at least selected number of iterations will get loop alig msgstr "" #: params.def:471 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of loop iterations we predict statically." -msgstr "" +msgstr "Kumoamistoimintojen enimmäismäärä" #: params.def:484 #, no-c-format @@ -2059,14 +2048,14 @@ msgid "Stop forward growth if the probability of best edge is less than this thr msgstr "" #: params.def:518 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of incoming edges to consider for crossjumping." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:524 -#, no-c-format +#, fuzzy, no-c-format msgid "The minimum number of matching instructions to consider for crossjumping." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:530 #, no-c-format @@ -2074,9 +2063,9 @@ msgid "The maximum expansion factor when copying basic blocks." msgstr "" #: params.def:536 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of insns to duplicate when unfactoring computed gotos." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:542 #, no-c-format @@ -2099,9 +2088,9 @@ msgid "Bound on number of candidates below that all candidates are considered in msgstr "" #: params.def:570 -#, no-c-format +#, fuzzy, no-c-format msgid "Bound on number of iv uses in loop optimized in iv optimizations." -msgstr "" +msgstr "moduulienvälisiä optimointeja ei ole toteutettu C++:lle" #: params.def:578 #, no-c-format @@ -2184,9 +2173,9 @@ msgid "The maximum number of blocks in a region to be considered for interblock msgstr "" #: params.def:670 params.def:680 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of insns in a region to be considered for interblock scheduling." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:685 #, no-c-format @@ -2194,9 +2183,9 @@ msgid "The minimum probability of reaching a source block for interblock specula msgstr "" #: params.def:690 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of iterations through CFG to extend regions." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:695 #, no-c-format @@ -2239,9 +2228,9 @@ msgid "Hardware autoprefetcher scheduler model control flag. Number of lookahea msgstr "" #: params.def:735 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of RTL nodes that can be recorded as combiner's last value." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:740 #, fuzzy, no-c-format @@ -2279,9 +2268,9 @@ msgid "The maximum number of instructions ready to be issued to be considered by msgstr "" #: params.def:798 -#, no-c-format +#, fuzzy, no-c-format msgid "Maximum number of active local stores in RTL dead store elimination." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:808 #, no-c-format @@ -2319,9 +2308,9 @@ msgid "The minimum constant stride beyond which we should use prefetch hints for msgstr "" #: params.def:861 -#, no-c-format +#, fuzzy, no-c-format msgid "The maximum number of stmts in loop nest for loop interchange." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:868 #, no-c-format @@ -2454,9 +2443,9 @@ msgid "Max. size of loc list for which reverse ops should be added." msgstr "" #: params.def:1049 -#, no-c-format +#, fuzzy, no-c-format msgid "Max. count of debug markers to expand or inline." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:1056 #, no-c-format @@ -2539,9 +2528,9 @@ msgid "Maximal size of a partition for LTO (in estimated instructions)." msgstr "" #: params.def:1153 -#, no-c-format +#, fuzzy, no-c-format msgid "Maximum number of namespaces to search for alternatives when name lookup fails." -msgstr "" +msgstr "Kumoamistoimintojen enimmäismäärä" #: params.def:1160 #, fuzzy, no-c-format @@ -2564,9 +2553,9 @@ msgid "Set the maximum number of instructions executed in parallel in reassociat msgstr "" #: params.def:1188 -#, no-c-format +#, fuzzy, no-c-format msgid "Maximum amount of similar bbs to compare a bb with." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:1193 #, no-c-format @@ -2674,9 +2663,9 @@ msgid "Maximum number of basic blocks on a finite state automaton jump thread pa msgstr "" #: params.def:1311 -#, no-c-format +#, fuzzy, no-c-format msgid "Maximum number of new jump thread paths to create for a finite state automaton." -msgstr "" +msgstr "Kumoamistoimintojen enimmäismäärä" #: params.def:1316 #, no-c-format @@ -2724,9 +2713,9 @@ msgid "Maximum number of may-defs visited when devirtualizing speculatively." msgstr "" #: params.def:1370 -#, no-c-format +#, fuzzy, no-c-format msgid "Maximum number of assertions to add along the default edge of a switch statement during VRP." -msgstr "" +msgstr "parametrin %qs maksimiarvo on %u" #: params.def:1376 #, fuzzy, no-c-format @@ -3311,8 +3300,9 @@ msgid "address operand requires constraint for X, Y, or Z register" msgstr "" #: config/avr/avr.c:2836 +#, fuzzy msgid "operands to %T/%t must be reg + const_int:" -msgstr "" +msgstr "virheellinen lvalue asm-tulosteessa %d" #: config/avr/avr.c:2886 config/avr/avr.c:2953 #, fuzzy @@ -3588,13 +3578,15 @@ msgid "bad insn to frv_print_operand_address:" msgstr "fr30_print_operand_address: käsittelemätön osoite" #: config/frv/frv.c:2508 +#, fuzzy msgid "bad register to frv_print_operand_memory_reference_reg:" -msgstr "" +msgstr "strftimen ”E”-määre" #: config/frv/frv.c:2547 config/frv/frv.c:2557 config/frv/frv.c:2566 #: config/frv/frv.c:2587 config/frv/frv.c:2592 +#, fuzzy msgid "bad insn to frv_print_operand_memory_reference:" -msgstr "" +msgstr "strftimen ”E”-määre" #: config/frv/frv.c:2677 #, fuzzy, c-format @@ -3602,8 +3594,9 @@ msgid "bad condition code" msgstr "Kiireellinen I/O-ehto" #: config/frv/frv.c:2751 +#, fuzzy msgid "bad insn in frv_print_operand, bad const_double" -msgstr "" +msgstr "fr30_print_operand: tuntematon koodi" #: config/frv/frv.c:2812 #, fuzzy @@ -3631,8 +3624,9 @@ msgid "bad insn to frv_print_operand, 'L' modifier:" msgstr "fr30_print_operand: tunnistamaton %%b-koodi" #: config/frv/frv.c:2911 +#, fuzzy msgid "bad insn to frv_print_operand, 'M/N' modifier:" -msgstr "" +msgstr "strftimen ”E”-määre" #: config/frv/frv.c:2932 #, fuzzy @@ -3949,8 +3943,9 @@ msgid "MMIX Internal: Expected a CONST_INT, not this" msgstr "vakio tai tunniste odotettu" #: config/mmix/mmix.c:1677 +#, fuzzy msgid "MMIX Internal: Bad value for 'm', not a CONST_INT" -msgstr "" +msgstr "vakio tai tunniste odotettu" #: config/mmix/mmix.c:1696 #, fuzzy @@ -5548,9 +5543,9 @@ msgid "Operand of unary numeric operator %%<%s%%> at %%L is %s" msgstr "pilkkuoperaattori #if:in operandissa" #: fortran/resolve.c:3946 -#, c-format +#, fuzzy, c-format msgid "Unexpected derived-type entities in binary intrinsic numeric operator %%<%s%%> at %%L" -msgstr "" +msgstr "pilkkuoperaattori #if:in operandissa" #: fortran/resolve.c:3951 #, fuzzy, c-format @@ -5573,8 +5568,9 @@ msgid "Operand of .not. operator at %%L is %s" msgstr "pilkkuoperaattori #if:in operandissa" #: fortran/resolve.c:4045 +#, fuzzy msgid "COMPLEX quantities cannot be compared at %L" -msgstr "" +msgstr "osoitealueattribuuttia ei voi määritellä paikallisille muuttujille" #: fortran/resolve.c:4097 #, c-format @@ -5666,9 +5662,9 @@ msgid "ACQUIRED_LOCK variable" msgstr "uutta arkistoa ei voi lukita" #: fortran/trans-array.c:1626 -#, c-format +#, fuzzy, c-format msgid "Different CHARACTER lengths (%ld/%ld) in array constructor" -msgstr "" +msgstr "Odotettiin PARAMETER-symbolia kompleksivakiossa kohdassa %C" #: fortran/trans-array.c:5867 msgid "Integer overflow when calculating the amount of memory to allocate" @@ -5685,9 +5681,9 @@ msgid "Actual string length does not match the declared one for dummy argument ' msgstr "" #: fortran/trans-decl.c:5905 -#, c-format +#, fuzzy, c-format msgid "Actual string length is shorter than the declared one for dummy argument '%s' (%ld/%ld)" -msgstr "" +msgstr "liikaa argumentteja funktiolle %s %q+#D" #: fortran/trans-expr.c:9185 #, c-format @@ -5876,8 +5872,9 @@ msgid "cannot specify -static with -fsanitize=address" msgstr "#pragma redefine_extname ei ole tuettu tällä kohteella" #: gcc.c:995 +#, fuzzy msgid "cannot specify -static with -fsanitize=thread" -msgstr "" +msgstr "#pragma redefine_extname ei ole tuettu tällä kohteella" #: gcc.c:1017 #, fuzzy @@ -6013,8 +6010,9 @@ msgid "shared and mdll are not compatible" msgstr "attribuutit fastcall ja cdecl eivät ole yhteensopivia" #: config/mcore/mcore.h:53 +#, fuzzy msgid "the m210 does not have little endian support" -msgstr "" +msgstr "%s ei tue: split_edge" #: config/mips/r3900.h:37 #, fuzzy @@ -6375,8 +6373,9 @@ msgid "Enable DEC-style STATIC and AUTOMATIC attributes." msgstr "" #: fortran/lang.opt:465 +#, fuzzy msgid "Set the default double precision kind to an 8 byte wide type." -msgstr "" +msgstr "Tuota koodia big-endian-tilassa" #: fortran/lang.opt:469 msgid "Set the default integer kind to an 8 byte wide type." @@ -6608,8 +6607,9 @@ msgid "Allocate local variables on the stack to allow indirect recursion." msgstr "" #: fortran/lang.opt:723 +#, fuzzy msgid "Copy array sections into a contiguous block on procedure entry." -msgstr "" +msgstr "käytetään muuttuvapituista taulukkoa" #: fortran/lang.opt:727 msgid "-fcoarray=\tSpecify which coarray parallelization should be used." @@ -6848,8 +6848,9 @@ msgid "Warn on any use of alloca." msgstr "Varoita pragmain väärästä käytöstä." #: c-family/c.opt:312 +#, fuzzy msgid "-Walloc-size-larger-than= Warn for calls to allocation functions that attempt to allocate objects larger than the specified number of bytes." -msgstr "" +msgstr "muuttuja %qD esitelty %:ksi" #: c-family/c.opt:317 msgid "-Wno-alloc-size-larger-than Disable Walloc-size-larger-than= warning. Equivalent to Walloc-size-larger-than= or larger." @@ -7191,8 +7192,9 @@ msgid "Warn about incompatible integer to pointer and pointer to integer convers msgstr "" #: c-family/c.opt:677 +#, fuzzy msgid "Warn for suspicious integer expressions in boolean context." -msgstr "" +msgstr "lueteltu tyyppi määritelty täällä" #: c-family/c.opt:681 msgid "Warn when there is a cast to a pointer from an integer of a different size." @@ -7294,12 +7296,14 @@ msgid "Warn when sizeof is applied on a parameter declared as an array." msgstr "" #: c-family/c.opt:777 +#, fuzzy msgid "Warn about buffer overflow in string manipulation functions like memcpy and strcpy." -msgstr "" +msgstr "Varoita funktioiden muunnoksista epäyhteensopiviksi tyypeiksi" #: c-family/c.opt:782 +#, fuzzy msgid "Under the control of Object Size type, warn about buffer overflow in string manipulation functions like memcpy and strcpy." -msgstr "" +msgstr "Varoita funktioiden muunnoksista epäyhteensopiviksi tyypeiksi" #: c-family/c.opt:787 #, fuzzy @@ -7531,8 +7535,9 @@ msgid "Warn on suspicious constructs involving reverse scalar storage order." msgstr "" #: c-family/c.opt:1035 +#, fuzzy msgid "Warn if a selector has multiple methods." -msgstr "" +msgstr "Varoita globaaleista funktioista, joilla ei ole aiempaa esittelyä." #: c-family/c.opt:1039 #, fuzzy @@ -7838,8 +7843,9 @@ msgid "Write all declarations as Ada code transitively." msgstr "Varoita kun esittely ei määrittele tyyppiä" #: c-family/c.opt:1457 +#, fuzzy msgid "Write all declarations as Ada code for the given file only." -msgstr "" +msgstr "Varoita kun esittely ei määrittele tyyppiä" #: c-family/c.opt:1464 msgid "-fno-elide-type Do not elide common elements in template comparisons." @@ -7892,8 +7898,9 @@ msgid "Assume normal C execution environment." msgstr "Oleta normaali C-suoritusympäristö." #: c-family/c.opt:1530 +#, fuzzy msgid "Export functions even if they can be inlined." -msgstr "" +msgstr "Tuota koodia big-endian-tilassa" #: c-family/c.opt:1534 #, fuzzy @@ -8100,8 +8107,9 @@ msgid "-ftabstop=\tDistance between tab stops for column reporting." msgstr "" #: c-family/c.opt:1808 +#, fuzzy msgid "Set the maximum number of template instantiation notes for a single warning or error." -msgstr "" +msgstr "Kumoamistoimintojen enimmäismäärä" #: c-family/c.opt:1815 msgid "-ftemplate-depth=\tSpecify maximum template instantiation depth." @@ -8615,8 +8623,9 @@ msgid "List all hidden GC allocations." msgstr "" #: d/lang.opt:302 +#, fuzzy msgid "List all variables going into thread local storage." -msgstr "" +msgstr "Määrittele käytettävä ABI" #: d/lang.opt:306 #, fuzzy @@ -8776,8 +8785,9 @@ msgid "Generate code for the Android platform." msgstr "Tuota koodia Android-alustalle." #: config/mmix/mmix.opt:24 +#, fuzzy msgid "For intrinsics library: pass all parameters in registers." -msgstr "" +msgstr "Funktion ”%s” paluuarvoa kohdassa %L ei ole asetettu" #: config/mmix/mmix.opt:28 #, fuzzy @@ -9162,8 +9172,9 @@ msgid "Use different calling convention using 'rtd'." msgstr "tämä ”defined”-sanan käyttö ei ehkä ole siirrettävää" #: config/m68k/m68k.opt:179 +#, fuzzy msgid "Consider type 'int' to be 16 bits wide." -msgstr "" +msgstr "Tee kokonaisluvista 32 bitin levyisiä." #: config/m68k/m68k.opt:183 #, fuzzy @@ -9233,8 +9244,9 @@ msgid "-msmall-data-limit=N\tPut global and static data smaller than by msgstr "" #: config/riscv/riscv.opt:88 +#, fuzzy msgid "Use smaller but slower prologue and epilogue code." -msgstr "" +msgstr "virheellinen ei-staattisen jäsenfunktion käyttö" #: config/riscv/riscv.opt:92 config/aarch64/aarch64.opt:88 #, fuzzy @@ -9315,8 +9327,9 @@ msgid "Select large model - 20-bit addresses/pointers." msgstr "Tuota 68302-koodia" #: config/msp430/msp430.opt:27 +#, fuzzy msgid "Select small model - 16-bit addresses/pointers (default)." -msgstr "" +msgstr "Tuota 68302-koodia" #: config/msp430/msp430.opt:31 msgid "Optimize opcode sizes at link time." @@ -9357,8 +9370,9 @@ msgstr "" #: config/aarch64/aarch64.opt:68 config/arm/arm.opt:99 #: config/microblaze/microblaze.opt:60 +#, fuzzy msgid "Assume target CPU is configured as big endian." -msgstr "" +msgstr "Tuota koodia big-endian-tilassa" #: config/aarch64/aarch64.opt:72 config/i386/i386.opt:1019 #, fuzzy @@ -9431,16 +9445,18 @@ msgid "PC relative literal loads." msgstr "" #: config/aarch64/aarch64.opt:157 +#, fuzzy msgid "Use branch-protection features." -msgstr "" +msgstr "Kelvolliset argumentit ovat:\n" #: config/aarch64/aarch64.opt:161 msgid "Select return address signing scope." msgstr "" #: config/aarch64/aarch64.opt:165 +#, fuzzy msgid "Supported AArch64 return address signing scope (for use with -msign-return-address= option):" -msgstr "" +msgstr "epäkelpo osoitintila %qs" #: config/aarch64/aarch64.opt:178 msgid "Enable the reciprocal square root approximation. Enabling this reduces precision of reciprocal square root results to about 16 bits for single precision and to 32 bits for double precision." @@ -9586,12 +9602,14 @@ msgid "Do not inline integer division." msgstr "Varoita käännösaikaisesta nollalla jaosta" #: config/ia64/ia64.opt:94 +#, fuzzy msgid "Generate inline square root, optimize for latency." -msgstr "" +msgstr "Varoita käännösaikaisesta nollalla jaosta" #: config/ia64/ia64.opt:98 +#, fuzzy msgid "Generate inline square root, optimize for throughput." -msgstr "" +msgstr "Varoita käännösaikaisesta nollalla jaosta" #: config/ia64/ia64.opt:102 #, fuzzy @@ -9797,8 +9815,9 @@ msgid "enable conditional move instruction usage." msgstr "säiekohtaista muistia ei tueta tälle kohteelle" #: config/epiphany/epiphany.opt:40 +#, fuzzy msgid "set number of nops to emit before each insn pattern." -msgstr "" +msgstr "Kumoamistoimintojen enimmäismäärä" #: config/epiphany/epiphany.opt:52 msgid "Use software floating point comparisons." @@ -10121,8 +10140,9 @@ msgid "Use 128-bit long double." msgstr "Käytä 128-bittistä long double -tyyppiä." #: config/i386/i386.opt:216 config/sh/sh.opt:179 +#, fuzzy msgid "Reserve space for outgoing arguments in the function prologue." -msgstr "" +msgstr "Tuota bittikäskyjä" #: config/i386/i386.opt:220 #, fuzzy @@ -10230,8 +10250,9 @@ msgid "Inline memset/memcpy string operations, but perform inline version only f msgstr "" #: config/i386/i386.opt:379 +#, fuzzy msgid "%<-mintel-syntax%> and %<-mno-intel-syntax%> are deprecated; use %<-masm=intel%> and %<-masm=att%> instead" -msgstr "" +msgstr "%J%qD on tavallisesti ei-staattinen funktio" #: config/i386/i386.opt:384 #, fuzzy @@ -10327,8 +10348,9 @@ msgid "Use direct references against %gs when accessing tls data." msgstr "" #: config/i386/i386.opt:518 +#, fuzzy msgid "Fine grain control of tune features." -msgstr "" +msgstr "Poistettu ominaisuus:" #: config/i386/i386.opt:522 #, fuzzy @@ -10592,8 +10614,9 @@ msgid "Support LWP built-in functions and code generation." msgstr "sisäistä funktiota %qs ei voi ottaa pois käytöstä" #: config/i386/i386.opt:774 +#, fuzzy msgid "Support code generation of Advanced Bit Manipulation (ABM) instructions." -msgstr "" +msgstr "Ota käyttöön saturation-käskyt" #: config/i386/i386.opt:778 #, fuzzy @@ -10720,8 +10743,9 @@ msgid "Support code generation of cmpxchg16b instruction." msgstr "Ota käyttöön saturation-käskyt" #: config/i386/i386.opt:882 +#, fuzzy msgid "Support code generation of sahf instruction in 64bit x86-64 code." -msgstr "" +msgstr "Ota käyttöön saturation-käskyt" #: config/i386/i386.opt:886 #, fuzzy @@ -10834,16 +10858,19 @@ msgid "Known stack protector guard (for use with the -mstack-protector-guard= op msgstr "epäkelpo osoitintila %qs" #: config/i386/i386.opt:997 config/rs6000/rs6000.opt:549 +#, fuzzy msgid "Use the given base register for addressing the stack-protector guard." -msgstr "" +msgstr "”%s” ei ole kelvollinen esikääntäjän valitsin" #: config/i386/i386.opt:1004 config/rs6000/rs6000.opt:556 +#, fuzzy msgid "Use the given offset for addressing the stack-protector guard." -msgstr "" +msgstr "Kelvolliset argumentit ovat:\n" #: config/i386/i386.opt:1011 +#, fuzzy msgid "Use the given symbol for addressing the stack-protector guard." -msgstr "" +msgstr "Kelvolliset argumentit ovat:\n" #: config/i386/i386.opt:1023 msgid "Enable shadow stack built-in functions from Control-flow Enforcement Technology (CET)." @@ -10878,8 +10905,9 @@ msgid "Known indirect branch choices (for use with the -mindirect-branch=/-mfunc msgstr "epäkelpo osoitintila %qs" #: config/i386/i386.opt:1066 +#, fuzzy msgid "Force indirect call and jump via register." -msgstr "" +msgstr "funktion paluuarvon tyyppi ei voi olla funktio" #: config/i386/i386.opt:1070 #, fuzzy @@ -11064,8 +11092,9 @@ msgid "Set the max size of data eligible for the TDA area." msgstr "" #: config/v850/v850.opt:82 +#, fuzzy msgid "Do not enforce strict alignment." -msgstr "" +msgstr "Käytä H8/300-kohdistussääntöjä" #: config/v850/v850.opt:86 msgid "Put jump tables for switch statements into the .data section rather than the .code section." @@ -11270,8 +11299,9 @@ msgid "-mmcu=MCU\tSelect the target MCU." msgstr "-m64 vaatii PowerPC64-suorittimen" #: config/avr/avr.opt:31 +#, fuzzy msgid "Allow usage of __gcc_isr pseudo instructions in ISR prologues and epilogues." -msgstr "" +msgstr "virheellinen ei-staattisen jäsenfunktion käyttö" #: config/avr/avr.opt:35 msgid "Set the number of 64 KiB flash segments." @@ -11387,8 +11417,9 @@ msgid "Display compile time statistics." msgstr "Näytä kääntäjän versio" #: config/m32r/m32r.opt:62 +#, fuzzy msgid "Specify cache flush function." -msgstr "" +msgstr "Määrittele käytettävä ABI" #: config/m32r/m32r.opt:66 #, fuzzy @@ -11412,8 +11443,9 @@ msgid "Don't call any cache flush functions." msgstr "" #: config/m32r/m32r.opt:98 +#, fuzzy msgid "Don't call any cache flush trap." -msgstr "" +msgstr "Määrittele käytettävä ABI" #: config/m32r/m32r.opt:105 msgid "Small data area: none, sdata, use." @@ -11581,8 +11613,9 @@ msgid "Selects the type of hardware multiplication and division to use (none/g13 msgstr "" #: config/rl78/rl78.opt:50 +#, fuzzy msgid "Use all registers, reserving none for interrupt handlers." -msgstr "" +msgstr "Määrittele käytettävä ABI" #: config/rl78/rl78.opt:54 msgid "Enable assembler and linker relaxation. Enabled by default at -Os." @@ -11722,8 +11755,9 @@ msgid "Specify the register to be used for PIC addressing." msgstr "Määrittele käytettävä ABI" #: config/arm/arm.opt:180 +#, fuzzy msgid "Store function names in object code." -msgstr "" +msgstr "vähennyslaskussa käytetty osoitinta funktioon" #: config/arm/arm.opt:184 #, fuzzy @@ -11731,8 +11765,9 @@ msgid "Permit scheduling of a function's prologue sequence." msgstr "virheellinen ei-staattisen jäsenfunktion käyttö" #: config/arm/arm.opt:188 config/rs6000/rs6000.opt:240 +#, fuzzy msgid "Do not load the PIC register in function prologues." -msgstr "" +msgstr "Tuota bittikäskyjä" #: config/arm/arm.opt:195 msgid "Specify the minimum bit alignment of structures. (Deprecated)." @@ -11768,8 +11803,9 @@ msgid "Thumb: Generate (non-leaf) stack frames even if not needed." msgstr "" #: config/arm/arm.opt:232 +#, fuzzy msgid "Thumb: Generate (leaf) stack frames even if not needed." -msgstr "" +msgstr "Tuota koodia big-endian-tilassa" #: config/arm/arm.opt:236 config/mn10300/mn10300.opt:42 #, fuzzy @@ -12159,8 +12195,9 @@ msgid "Return all structures in memory (AIX default)." msgstr "" #: config/rs6000/rs6000.opt:263 +#, fuzzy msgid "Return small structures in registers (SVR4 default)." -msgstr "" +msgstr "Funktion ”%s” paluuarvoa kohdassa %L ei ole asetettu" #: config/rs6000/rs6000.opt:267 msgid "Conform more closely to IBM XLC semantics." @@ -12223,8 +12260,9 @@ msgid "%<-mvrsave=yes%> is deprecated; use %<-mvrsave%> instead" msgstr "%J%qD on tavallisesti ei-staattinen funktio" #: config/rs6000/rs6000.opt:322 +#, fuzzy msgid "Deprecated option. Use -mvrsave instead." -msgstr "" +msgstr "%J%qD on tavallisesti ei-staattinen funktio" #: config/rs6000/rs6000.opt:326 #, fuzzy @@ -12432,8 +12470,9 @@ msgid "-msdata=[none,data,sysv,eabi]\tSelect method for sdata handling." msgstr "" #: config/rs6000/sysv4.opt:32 +#, fuzzy msgid "Allow readonly data in sdata." -msgstr "" +msgstr "%qD:a käytetään alustamattomana tässä funktiossa" #: config/rs6000/sysv4.opt:36 msgid "-mtls-size=[16,32]\tSpecify bit size of immediate TLS offsets." @@ -12564,8 +12603,9 @@ msgid "Emit code for the byte/word ISA extension." msgstr "Tuota koodia Android-alustalle." #: config/alpha/alpha.opt:62 +#, fuzzy msgid "Emit code for the motion video ISA extension." -msgstr "" +msgstr "Tuota koodia Android-alustalle." #: config/alpha/alpha.opt:66 #, fuzzy @@ -12573,8 +12613,9 @@ msgid "Emit code for the fp move and sqrt ISA extension." msgstr "Tuota koodia Android-alustalle." #: config/alpha/alpha.opt:70 +#, fuzzy msgid "Emit code for the counting ISA extension." -msgstr "" +msgstr "Tuota koodia Android-alustalle." #: config/alpha/alpha.opt:74 msgid "Emit code using explicit relocation directives." @@ -12613,8 +12654,9 @@ msgid "Schedule given CPU." msgstr "Suoritinaikaraja ylittynyt" #: config/alpha/alpha.opt:114 +#, fuzzy msgid "Control the generated fp rounding mode." -msgstr "" +msgstr "Ota käyttöön normaalitila." #: config/alpha/alpha.opt:118 #, fuzzy @@ -12635,8 +12677,9 @@ msgid "Compile with 32 bit longs and pointers, which is the only supported behav msgstr "" #: config/tilepro/tilepro.opt:28 config/tilegx/tilegx.opt:26 +#, fuzzy msgid "-mcpu=CPU\tUse features of and schedule code for given CPU." -msgstr "" +msgstr "Tuota little-endian-koodia" #: config/tilepro/tilepro.opt:32 #, fuzzy @@ -12718,8 +12761,9 @@ msgid "Use multiply emulation." msgstr "Käytä ohjelmistoliukulukuja" #: config/nios2/elf.opt:26 +#, fuzzy msgid "Link with a limited version of the C library." -msgstr "" +msgstr "Linkitä yksittäisiä kirjastoja käsin." #: config/nios2/elf.opt:30 msgid "Name of system library to link against." @@ -12776,8 +12820,9 @@ msgid "Enable/disable GP-relative addressing." msgstr "Poista käytöstä POSIX ACLs -tuki" #: config/nios2/nios2.opt:67 +#, fuzzy msgid "Valid options for GP-relative addressing (for -mgpopt):" -msgstr "" +msgstr "Poista käytöstä POSIX ACLs -tuki" #: config/nios2/nios2.opt:86 #, fuzzy @@ -13408,8 +13453,9 @@ msgid "Regular expression matching section names for r0-relative addressing." msgstr "" #: config/rx/rx.opt:29 +#, fuzzy msgid "Store doubles in 64 bits." -msgstr "" +msgstr "Käännä koodi big-endian-tilaa varten" #: config/rx/rx.opt:33 #, fuzzy @@ -13564,8 +13610,9 @@ msgid "Use table lookup optimization for small signed integer divisions." msgstr "Käytä AltiVec-käskyjä" #: config/microblaze/microblaze.opt:52 +#, fuzzy msgid "-mcpu=PROCESSOR\t\tUse features of and schedule code for given CPU." -msgstr "" +msgstr "Tuota little-endian-koodia" #: config/microblaze/microblaze.opt:56 msgid "Don't optimize block moves, use memcpy." @@ -13703,8 +13750,9 @@ msgid "Enable label alignment optimizations." msgstr "Käytä AltiVec-käskyjä" #: config/frv/frv.opt:42 +#, fuzzy msgid "Dynamically allocate cc registers." -msgstr "" +msgstr "Funktion ”%s” paluuarvoa kohdassa %L ei ole asetettu" #: config/frv/frv.opt:49 #, fuzzy @@ -13837,8 +13885,9 @@ msgid "Assume a large TLS segment." msgstr "" #: config/frv/frv.opt:223 +#, fuzzy msgid "Do not assume a large TLS segment." -msgstr "" +msgstr "Käytä H8/300-kohdistussääntöjä" #: config/frv/frv.opt:228 #, fuzzy @@ -14029,8 +14078,9 @@ msgid "Specify the size of each interrupt vector, which must be 4 or 16." msgstr "" #: config/nds32/nds32.opt:163 +#, fuzzy msgid "Specify the security level of c-isr for the whole file." -msgstr "" +msgstr "Käytä AltiVec-käskyjä" #: config/nds32/nds32.opt:167 msgid "Specify the size of each cache block, which must be a power of 2 between 4 and 512." @@ -14098,8 +14148,9 @@ msgid "Force disable hardware loop, even use -mext-dsp." msgstr "" #: config/nds32/nds32.opt:449 +#, fuzzy msgid "Permit scheduling of a function's prologue and epilogue sequence." -msgstr "" +msgstr "virheellinen ei-staattisen jäsenfunktion käyttö" #: config/nds32/nds32.opt:453 #, fuzzy @@ -14120,8 +14171,9 @@ msgid "Specify CPU for code generation purposes." msgstr "sisäistä funktiota %qs ei voi ottaa pois käytöstä" #: config/iq2000/iq2000.opt:47 +#, fuzzy msgid "Specify CPU for scheduling purposes." -msgstr "" +msgstr "sisäistä funktiota %qs ei voi ottaa pois käytöstä" #: config/iq2000/iq2000.opt:51 #, fuzzy @@ -14276,8 +14328,9 @@ msgid "Set the branch costs to roughly the specified number of instructions." msgstr "" #: config/csky/csky.opt:173 +#, fuzzy msgid "Permit scheduling of function prologue and epilogue sequences." -msgstr "" +msgstr "virheellinen ei-staattisen jäsenfunktion käyttö" #: config/csky/csky_tables.opt:24 #, fuzzy @@ -14328,8 +14381,9 @@ msgid "Compile for ETRAX 4 (CRIS v3)." msgstr "Muunna..." #: config/cris/cris.opt:56 +#, fuzzy msgid "Compile for ETRAX 100 (CRIS v8)." -msgstr "" +msgstr "Muunna..." #: config/cris/cris.opt:64 #, fuzzy @@ -14356,8 +14410,9 @@ msgid "Do not tune writable data alignment." msgstr "Käytä H8/300-kohdistussääntöjä" #: config/cris/cris.opt:107 +#, fuzzy msgid "Do not tune code and read-only data alignment." -msgstr "" +msgstr "Käytä H8/300-kohdistussääntöjä" #: config/cris/cris.opt:116 #, fuzzy @@ -14370,8 +14425,9 @@ msgid "Don't align items in code or data." msgstr "Kohdista koodi ja data 32 bittiin" #: config/cris/cris.opt:142 +#, fuzzy msgid "Do not emit function prologue or epilogue." -msgstr "" +msgstr "virheellinen ei-staattisen jäsenfunktion käyttö" #: config/cris/cris.opt:149 msgid "Use the most feature-enabling options allowed by other options." @@ -14387,8 +14443,9 @@ msgid "-march=ARCH\tGenerate code for the specified chip or CPU version." msgstr "Käytä AltiVec-käskyjä" #: config/cris/cris.opt:169 +#, fuzzy msgid "-mtune=ARCH\tTune alignment for the specified chip or CPU version." -msgstr "" +msgstr "Käytä AltiVec-käskyjä" #: config/cris/cris.opt:173 msgid "-mmax-stackframe=SIZE\tWarn when a stackframe is larger than the specified size." @@ -14786,8 +14843,9 @@ msgid "Valid arguments to -mcode-readable=:" msgstr "Kelvolliset argumentit ovat:\n" #: config/mips/mips.opt:104 +#, fuzzy msgid "Use branch-and-break sequences to check for integer divide by zero." -msgstr "" +msgstr "Estä kaikkien laitteistoliukulukukäskyjen käyttö" #: config/mips/mips.opt:108 #, fuzzy @@ -14828,8 +14886,9 @@ msgid "Use -G for data that is not defined by the current object." msgstr "" #: config/mips/mips.opt:158 +#, fuzzy msgid "Work around certain 24K errata." -msgstr "" +msgstr "Kierrä vanha 4300-laitteistovika" #: config/mips/mips.opt:162 #, fuzzy @@ -14842,28 +14901,33 @@ msgid "Work around certain R4400 errata." msgstr "Kierrä vanha 4300-laitteistovika" #: config/mips/mips.opt:170 +#, fuzzy msgid "Work around the R5900 short loop erratum." -msgstr "" +msgstr "Kierrä vanha 4300-laitteistovika" #: config/mips/mips.opt:174 +#, fuzzy msgid "Work around certain RM7000 errata." -msgstr "" +msgstr "Kierrä vanha 4300-laitteistovika" #: config/mips/mips.opt:178 +#, fuzzy msgid "Work around certain R10000 errata." -msgstr "" +msgstr "Kierrä vanha 4300-laitteistovika" #: config/mips/mips.opt:182 msgid "Work around errata for early SB-1 revision 2 cores." msgstr "" #: config/mips/mips.opt:186 +#, fuzzy msgid "Work around certain VR4120 errata." -msgstr "" +msgstr "Kierrä vanha 4300-laitteistovika" #: config/mips/mips.opt:190 +#, fuzzy msgid "Work around VR4130 mflo/mfhi errata." -msgstr "" +msgstr "Kierrä vanha 4300-laitteistovika" #: config/mips/mips.opt:194 #, fuzzy @@ -14918,8 +14982,9 @@ msgid "Use 64-bit general registers." msgstr "Käytä 64-bittisiä yleisrekistereitä" #: config/mips/mips.opt:244 +#, fuzzy msgid "Use GP-relative addressing to access small data." -msgstr "" +msgstr "Poista käytöstä POSIX ACLs -tuki" #: config/mips/mips.opt:248 msgid "When generating -mabicalls code, allow executables to use PLTs and copy relocations." @@ -15117,8 +15182,9 @@ msgid "Lift restrictions on GOT size." msgstr "" #: config/mips/mips.opt:437 +#, fuzzy msgid "Enable use of odd-numbered single-precision registers." -msgstr "" +msgstr "kohdemuoto ei tue äärettömyyttä" #: config/mips/mips.opt:441 #, fuzzy @@ -15546,12 +15612,14 @@ msgid "Enable use of NPS400 xld/xst extension." msgstr "Käytä AltiVec-käskyjä" #: config/arc/arc.opt:500 +#, fuzzy msgid "Specifies the registers that the processor saves on an interrupt entry and exit." -msgstr "" +msgstr "Määrittele käytettävä ABI" #: config/arc/arc.opt:504 +#, fuzzy msgid "Specifies the number of registers replicated in second register bank on entry to fast interrupt." -msgstr "" +msgstr "Määrittele käytettävä ABI" #: config/arc/arc.opt:508 msgid "Sets LP_COUNT register width. Possible values are 8, 16, 20, 24, 28, and 32." @@ -15637,8 +15705,9 @@ msgid "Optimize for speed disregarding exact standards compliance." msgstr "" #: common.opt:482 +#, fuzzy msgid "Optimize for debugging experience rather than speed or size." -msgstr "" +msgstr "mahdollisia ikisilmukoita ei voi optimoida" #: common.opt:522 #, fuzzy @@ -16120,8 +16189,9 @@ msgid "Do not perform optimizations increasing noticeably stack usage." msgstr "" #: common.opt:1155 +#, fuzzy msgid "Perform a register copy-propagation optimization pass." -msgstr "" +msgstr "moduulienvälisiä optimointeja ei ole toteutettu C++:lle" #: common.opt:1159 #, fuzzy @@ -16253,8 +16323,9 @@ msgid "-fdump-final-insns=filename\tDump to filename the insns at the end of tra msgstr "" #: common.opt:1338 +#, fuzzy msgid "-fdump-go-spec=filename\tWrite all declarations to file as Go code." -msgstr "" +msgstr " -o Ohjaa tuloste \n" #: common.opt:1342 msgid "Suppress output of addresses in debugging dumps." @@ -16378,8 +16449,9 @@ msgid "Place each function into its own section." msgstr "ensimmäinen käyttökerta kussakin funktiossa.)" #: common.opt:1490 +#, fuzzy msgid "Perform global common subexpression elimination." -msgstr "" +msgstr "moduulienvälisiä optimointeja ei ole toteutettu C++:lle" #: common.opt:1494 msgid "Perform enhanced load motion during global common subexpression elimination." @@ -16394,8 +16466,9 @@ msgid "Perform redundant load after store elimination in global common subexpres msgstr "" #: common.opt:1507 +#, fuzzy msgid "Perform global common subexpression elimination after register allocation has finished." -msgstr "" +msgstr "Käytä rekistereitä argumenttien välittämiseen" #: common.opt:1524 msgid "-fgnat-encodings=[all|gdb|minimal]\tSelect the balance between GNAT encodings and standard DWARF emitted in the debug information" @@ -16431,8 +16504,9 @@ msgid "Enable loop interchange on trees." msgstr "säiekohtaista muistia ei tueta tälle kohteelle" #: common.opt:1562 +#, fuzzy msgid "Perform unroll-and-jam on loops." -msgstr "" +msgstr "continue-lause silmukan ulkopuolella" #: common.opt:1566 #, fuzzy @@ -16458,8 +16532,9 @@ msgid "Merge adjacent stores." msgstr "" #: common.opt:1590 +#, fuzzy msgid "Enable guessing of branch probabilities." -msgstr "" +msgstr "säiekohtaista muistia ei tueta tälle kohteelle" #: common.opt:1598 #, fuzzy @@ -16467,8 +16542,9 @@ msgid "Process #ident directives." msgstr "Älä luo #line-direktiivejä" #: common.opt:1602 +#, fuzzy msgid "Perform conversion of conditional jumps to branchless equivalents." -msgstr "" +msgstr "ehtolausekkeessa on tyyppiristiriita" #: common.opt:1606 #, fuzzy @@ -16540,8 +16616,9 @@ msgid "Instrument function entry and exit with profiling calls." msgstr "funktiokutsun argumentti voi olla ehdokas muotoiluattribuutille" #: common.opt:1702 +#, fuzzy msgid "-finstrument-functions-exclude-function-list=name,... Do not instrument listed functions." -msgstr "" +msgstr "funktiokutsun argumentti voi olla ehdokas muotoiluattribuutille" #: common.opt:1706 #, fuzzy @@ -16549,8 +16626,9 @@ msgid "-finstrument-functions-exclude-file-list=filename,... Do not instrument msgstr "funktiokutsun argumentti voi olla ehdokas muotoiluattribuutille" #: common.opt:1710 +#, fuzzy msgid "Perform interprocedural constant propagation." -msgstr "" +msgstr "Sähkökatko" #: common.opt:1714 msgid "Perform cloning to make Interprocedural constant propagation stronger." @@ -16565,8 +16643,9 @@ msgid "Perform interprocedural profile propagation." msgstr "" #: common.opt:1730 +#, fuzzy msgid "Perform interprocedural points-to analysis." -msgstr "" +msgstr "Sähkökatko" #: common.opt:1734 #, fuzzy @@ -16582,8 +16661,9 @@ msgid "Perform Identical Code Folding for functions." msgstr "" #: common.opt:1746 +#, fuzzy msgid "Perform Identical Code Folding for variables." -msgstr "" +msgstr "continue-lause silmukan ulkopuolella" #: common.opt:1750 msgid "Discover read-only and non addressable static variables." @@ -16598,8 +16678,9 @@ msgid "Reduce stack alignment on call sites if possible." msgstr "" #: common.opt:1770 +#, fuzzy msgid "Perform IPA Value Range Propagation." -msgstr "" +msgstr "ehtolausekkeessa ei-lvalue-taulukko" #: common.opt:1774 msgid "-fira-algorithm=[CB|priority]\tSet the used IRA algorithm." @@ -16659,8 +16740,9 @@ msgid "Generate code for static functions even if they are never called." msgstr "Tuota koodia big-endian-tilassa" #: common.opt:1841 +#, fuzzy msgid "Emit static const variables even if they are not used." -msgstr "" +msgstr "Tuota koodia big-endian-tilassa" #: common.opt:1845 msgid "Give external symbols a leading underscore." @@ -16698,8 +16780,9 @@ msgid "Merge C++ types using One Definition Rule." msgstr "edellinen määrittely täällä" #: common.opt:1896 +#, fuzzy msgid "Report various link-time optimization statistics." -msgstr "" +msgstr "moduulienvälisiä optimointeja ei ole toteutettu C++:lle" #: common.opt:1900 msgid "Report various link-time optimization statistics for WPA only." @@ -16828,8 +16911,9 @@ msgid "-fpack-struct=\tSet initial maximum structure member alignment." msgstr "" #: common.opt:2028 +#, fuzzy msgid "Return small aggregates in memory, not registers." -msgstr "" +msgstr "Funktion ”%s” paluuarvoa kohdassa %L ei ole asetettu" #: common.opt:2032 #, fuzzy @@ -16993,8 +17077,9 @@ msgid "Relief of register pressure through live range shrinkage." msgstr "" #: common.opt:2212 +#, fuzzy msgid "Perform a register renaming optimization pass." -msgstr "" +msgstr "moduulienvälisiä optimointeja ei ole toteutettu C++:lle" #: common.opt:2216 msgid "Perform a target dependent instruction fusion optimization pass." @@ -17009,9 +17094,9 @@ msgid "-freorder-blocks-algorithm=[simple|stc]\tSet the used basic block reorder msgstr "" #: common.opt:2227 -#, c-format +#, fuzzy, c-format msgid "unknown basic block reordering algorithm %qs" -msgstr "" +msgstr "Funktio %qs" #: common.opt:2237 msgid "Reorder basic blocks and partition into hot and cold sections." @@ -17034,8 +17119,9 @@ msgid "Enable scheduling across basic blocks." msgstr "" #: common.opt:2261 +#, fuzzy msgid "Enable register pressure sensitive insn scheduling." -msgstr "" +msgstr "Ota käyttöön RX FPU-käskyjen käyttö." #: common.opt:2265 msgid "Allow speculative motion of non-loads." @@ -17046,8 +17132,9 @@ msgid "Allow speculative motion of some loads." msgstr "" #: common.opt:2273 +#, fuzzy msgid "Allow speculative motion of more loads." -msgstr "" +msgstr "HALLINTA" #: common.opt:2277 msgid "-fsched-verbose=\tSet the verbosity level of the scheduler." @@ -17072,8 +17159,9 @@ msgid "Schedule instructions using selective scheduling algorithm." msgstr "" #: common.opt:2304 +#, fuzzy msgid "Run selective scheduling after reload." -msgstr "" +msgstr "HALLINTA" #: common.opt:2308 msgid "Run self-tests, using the given path to locate test files." @@ -17179,8 +17267,9 @@ msgid "Split lifetimes of induction variables when loops are unrolled." msgstr "" #: common.opt:2419 +#, fuzzy msgid "Generate discontiguous stack frames." -msgstr "" +msgstr "Tuota little-endian-koodia" #: common.opt:2423 msgid "Split wide types into independent registers." @@ -17407,8 +17496,9 @@ msgid "Enable loop invariant motion on trees." msgstr "ehtolausekkeessa ei-lvalue-taulukko" #: common.opt:2671 +#, fuzzy msgid "Create canonical induction variables in loops." -msgstr "" +msgstr "Tuota bittikäskyjä" #: common.opt:2675 #, fuzzy @@ -17482,8 +17572,9 @@ msgid "Compile whole compilation unit at a time." msgstr "" #: common.opt:2744 +#, fuzzy msgid "Perform loop unrolling when iteration count is known." -msgstr "" +msgstr "continue-lause silmukan ulkopuolella" #: common.opt:2748 #, fuzzy @@ -17522,16 +17613,19 @@ msgid "Just generate unwind tables for exception handling." msgstr "Käytä poikkeustenkäsittelyä" #: common.opt:2792 +#, fuzzy msgid "Use the bfd linker instead of the default linker." -msgstr "" +msgstr "Käytä PowerPC-64 -käskykantaa" #: common.opt:2796 +#, fuzzy msgid "Use the gold linker instead of the default linker." -msgstr "" +msgstr "Käytä PowerPC-64 -käskykantaa" #: common.opt:2800 +#, fuzzy msgid "Use the lld LLVM linker instead of the default linker." -msgstr "" +msgstr "Käytä PowerPC-64 -käskykantaa" #: common.opt:2812 #, fuzzy @@ -17548,8 +17642,9 @@ msgid "Toggle -fvar-tracking-assignments." msgstr "" #: common.opt:2834 +#, fuzzy msgid "Perform variable tracking and also tag variables that are uninitialized." -msgstr "" +msgstr "Suorita uusille äänitetyille tiedotteille:" #: common.opt:2839 #, fuzzy @@ -17618,8 +17713,9 @@ msgid "Output vtable verification counters." msgstr "Ota käyttöön moniydintuki" #: common.opt:2936 +#, fuzzy msgid "Output vtable verification pointer sets information." -msgstr "" +msgstr "Ota käyttöön moniydintuki" #: common.opt:2940 #, fuzzy @@ -17696,8 +17792,9 @@ msgid "Compute locview reset points based on insn length estimates" msgstr "" #: common.opt:3024 +#, fuzzy msgid "Don't generate DWARF pubnames and pubtypes sections." -msgstr "" +msgstr "Tuota vianjäljitystietoja VMS-muodossa" #: common.opt:3028 #, fuzzy @@ -17705,8 +17802,9 @@ msgid "Generate DWARF pubnames and pubtypes sections." msgstr "Tuota vianjäljitystietoja VMS-muodossa" #: common.opt:3032 +#, fuzzy msgid "Generate DWARF pubnames and pubtypes sections with GNU extensions." -msgstr "" +msgstr "Tuota vianjäljitystietoja VMS-muodossa" #: common.opt:3036 msgid "Record gcc command line switches in DWARF DW_AT_producer." @@ -18038,8 +18136,9 @@ msgid "expected function" msgstr "odotettiin %<,%> tai %<;%>" #: go/gofrontend/expressions.cc:9770 +#, fuzzy msgid "multiple-value argument in single-value context" -msgstr "" +msgstr "virheellinen funktioesittely" #: go/gofrontend/expressions.cc:9992 #, fuzzy @@ -18213,8 +18312,9 @@ msgid "map can only be compared to nil" msgstr "Valitsinta --acls voi käyttää vain POSIX-arkistoille" #: go/gofrontend/types.cc:552 +#, fuzzy msgid "func can only be compared to nil" -msgstr "" +msgstr "Valitsinta --acls voi käyttää vain POSIX-arkistoille" #: go/gofrontend/types.cc:558 #, fuzzy, c-format @@ -18462,9 +18562,9 @@ msgid "%q+D already declared with dllexport attribute: dllimport ignored" msgstr "%Javoimelle funktiolle %qD annettu attribuutti noinline" #: attribs.c:1571 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%q+D redeclared without dllimport attribute after being referenced with dll linkage" -msgstr "" +msgstr "%Javoimelle funktiolle %qD annettu attribuutti noinline" #: attribs.c:1585 #, fuzzy, gcc-internal-format @@ -18591,14 +18691,14 @@ msgid "invalid third argument to %<__builtin_prefetch%>; using zero" msgstr "%<__builtin_prefetch%>-funktion kolmas argumentti on epäkelpo; käytetään nollaa" #: builtins.c:3096 builtins.c:3510 calls.c:1658 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%K%qD specified bound %E exceeds maximum object size %E" -msgstr "" +msgstr "%Kargumentin %i arvo %qE ylittää olion enimmäiskoon %E" #: builtins.c:3124 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%K%qD specified bound %E exceeds the size %E of unterminated array" -msgstr "" +msgstr "%qE esitelty funktion palauttavana funktiona" #: builtins.c:3126 #, gcc-internal-format @@ -18606,9 +18706,9 @@ msgid "%K%qD specified bound %E may exceed the size of at most %E of unterminate msgstr "" #: builtins.c:3155 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%K%qD specified bound [%wu, %wu] exceeds maximum object size %E" -msgstr "" +msgstr "Funktion %s argumentti kohdassa %L on negatiivinen" #: builtins.c:3178 #, gcc-internal-format @@ -18621,14 +18721,14 @@ msgid "%K%qD specified bound [%wu, %wu] may exceed the size of at most %E of unt msgstr "" #: builtins.c:3410 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%K%qD specified size %E exceeds maximum object size %E" -msgstr "" +msgstr "%Kargumentin %i arvo %qE ylittää olion enimmäiskoon %E" #: builtins.c:3415 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%K%qD specified size between %E and %E exceeds maximum object size %E" -msgstr "" +msgstr "Funktion %s argumentti kohdassa %L on negatiivinen" #: builtins.c:3453 builtins.c:3468 #, fuzzy, gcc-internal-format @@ -18643,24 +18743,24 @@ msgstr[0] "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alu msgstr[1] "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" #: builtins.c:3474 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%K%qD writing between %E and %E bytes into a region of size %E overflows the destination" -msgstr "" +msgstr "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" #: builtins.c:3516 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%K%qD specified bound between %E and %E exceeds maximum object size %E" -msgstr "" +msgstr "%Kargumentin %i arvo %qE ylittää olion enimmäiskoon %E" #: builtins.c:3531 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%K%qD specified bound %E exceeds destination size %E" -msgstr "" +msgstr "%qE esitelty funktion palauttavana funktiona" #: builtins.c:3537 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%K%qD specified bound between %E and %E exceeds destination size %E" -msgstr "" +msgstr "%qE esitelty funktion palauttavana funktiona" #: builtins.c:3559 #, fuzzy, gcc-internal-format @@ -18680,9 +18780,9 @@ msgid "%K%qD reading between %E and %E bytes from a region of size %E" msgstr "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" #: builtins.c:4245 builtins.c:4314 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%K%qD specified bound %E equals destination size" -msgstr "" +msgstr "%qE esitelty funktion palauttavana funktiona" #: builtins.c:5158 gimplify.c:3277 #, gcc-internal-format @@ -18732,9 +18832,9 @@ msgid "invalid memory model argument to builtin" msgstr "epäkelpo argumentti funktiolle %<__builtin_frame_address%>" #: builtins.c:6246 builtins.c:6373 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "failure memory model cannot be stronger than success memory model for %<__atomic_compare_exchange%>" -msgstr "" +msgstr "epäkelpo %-avainsanan käyttö" #: builtins.c:6254 builtins.c:6381 #, fuzzy, gcc-internal-format @@ -18866,14 +18966,14 @@ msgid "%Kargument %i value %qE is negative" msgstr "Funktion %s argumentti kohdassa %L on negatiivinen" #: calls.c:1394 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%Kargument %i value is zero" -msgstr "%<__builtin_prefetch%>-funktion toinen argumentti on epäkelpo; käytetään nollaa" +msgstr "%Kargumentin %i arvo on nolla" #: calls.c:1412 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%Kargument %i value %qE exceeds maximum object size %E" -msgstr "Funktion %s argumentti kohdassa %L on negatiivinen" +msgstr "%Kargumentin %i arvo %qE ylittää olion enimmäiskoon %E" #: calls.c:1426 #, fuzzy, gcc-internal-format @@ -18891,9 +18991,9 @@ msgid "%Kproduct %<%E * %E%> of arguments %i and %i exceeds %" msgstr "" #: calls.c:1469 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%Kproduct %<%E * %E%> of arguments %i and %i exceeds maximum object size %E" -msgstr "" +msgstr "%Kargumentin %i arvo %qE ylittää olion enimmäiskoon %E" #: calls.c:1480 calls.c:1483 #, fuzzy, gcc-internal-format @@ -18906,14 +19006,14 @@ msgid "in a call to built-in allocation function %qD" msgstr "%qD on tavallisesti ei-staattinen funktio" #: calls.c:1497 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "in a call to allocation function %qD declared here" -msgstr "muuttuja %qD esitelty %:ksi" +msgstr "kutsussa muistinvarausfunktioon %qD, joka on esitelty täällä" #: calls.c:1663 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%K%qD specified bound [%E, %E] exceeds maximum object size %E" -msgstr "" +msgstr "Funktion %s argumentti kohdassa %L on negatiivinen" #: calls.c:1806 #, fuzzy, gcc-internal-format @@ -18948,7 +19048,7 @@ msgstr "lähdetiedostoa %s ei löydy" #: calls.c:3394 #, gcc-internal-format msgid "function call has aggregate value" -msgstr "" +msgstr "funktiokutsulla on aggregaattiarvo" #: calls.c:4084 #, fuzzy, gcc-internal-format @@ -19033,9 +19133,9 @@ msgid "output number %d not directly addressable" msgstr "" #: cfgexpand.c:3256 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "asm operand %d probably doesn%'t match constraints" -msgstr "" +msgstr "%s: Tätä tiedostoa ei voitu varmuuskopioida" #: cfgexpand.c:3439 #, gcc-internal-format @@ -19113,9 +19213,9 @@ msgid "wrong amount of branch edges after unconditional jump %i" msgstr "väärä määrä argumentteja funktiolle %" #: cfghooks.c:211 cfghooks.c:222 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "basic block %d pred edge is corrupted" -msgstr "" +msgstr "verify_flow_info: Lohkosta %i puuttuu loop_father" #: cfghooks.c:223 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -19123,9 +19223,9 @@ msgid "its dest_idx should be %d, not %d" msgstr "%q+D:n toisen argumentin pitäisi olla %" #: cfghooks.c:252 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "basic block %i edge lists are corrupted" -msgstr "" +msgstr "verify_flow_info: Lohkosta %i puuttuu loop_father" #: cfghooks.c:265 #, gcc-internal-format @@ -19243,9 +19343,9 @@ msgid "corrupt loop tree root" msgstr "" #: cfgloop.c:1414 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "loop with header %d marked for removal" -msgstr "" +msgstr "säiekohtaista muistia ei tueta tälle kohteelle" #: cfgloop.c:1419 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -19253,14 +19353,14 @@ msgid "loop with header %d not in loop tree" msgstr "säiekohtaista muistia ei tueta tälle kohteelle" #: cfgloop.c:1425 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "non-loop with header %d not marked for removal" -msgstr "" +msgstr "säiekohtaista muistia ei tueta tälle kohteelle" #: cfgloop.c:1439 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "removed loop %d in loop tree" -msgstr "" +msgstr "säiekohtaista muistia ei tueta tälle kohteelle" #: cfgloop.c:1447 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -19278,9 +19378,9 @@ msgid "bb %d has father loop %d, should be loop %d" msgstr "sektorimäärä: %d, sektorikoko: %d\n" #: cfgloop.c:1486 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "loop %d%'s header is not a loop header" -msgstr "" +msgstr "säiekohtaista muistia ei tueta tälle kohteelle" #: cfgloop.c:1492 #, gcc-internal-format @@ -19323,9 +19423,9 @@ msgid "loop %d%'s latch is marked as part of irreducible region" msgstr "" #: cfgloop.c:1568 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "basic block %d should be marked irreducible" -msgstr "" +msgstr "virheellinen tyyppi iterointimuuttujalle %qE" #: cfgloop.c:1574 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -19333,14 +19433,14 @@ msgid "basic block %d should not be marked irreducible" msgstr "virheellinen tyyppi iterointimuuttujalle %qE" #: cfgloop.c:1582 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "edge from %d to %d should be marked irreducible" -msgstr "" +msgstr "virheellinen tyyppi iterointimuuttujalle %qE" #: cfgloop.c:1589 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "edge from %d to %d should not be marked irreducible" -msgstr "" +msgstr "virheellinen tyyppi iterointimuuttujalle %qE" #: cfgloop.c:1603 #, gcc-internal-format, gfc-internal-format @@ -19413,14 +19513,14 @@ msgid "fallthru edge crosses section boundary in bb %i" msgstr "väärä määrä argumentteja funktiolle %" #: cfgrtl.c:2511 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "EH edge crosses section boundary in bb %i" -msgstr "" +msgstr "väärä määrä argumentteja funktiolle %" #: cfgrtl.c:2517 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "No region crossing jump at section boundary in bb %i" -msgstr "" +msgstr "väärä määrä argumentteja funktiolle %" #: cfgrtl.c:2524 #, gcc-internal-format @@ -19463,9 +19563,9 @@ msgid "wrong amount of branch edges after conditional jump in bb %i" msgstr "väärä määrä argumentteja funktiolle %" #: cfgrtl.c:2597 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "abnormal call edges for non-call insn in bb %i" -msgstr "" +msgstr "väärä määrä argumentteja funktiolle %" #: cfgrtl.c:2602 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -19473,9 +19573,9 @@ msgid "sibcall edges for non-call insn in bb %i" msgstr "väärä määrä argumentteja funktiolle %" #: cfgrtl.c:2612 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "abnormal edges for no purpose in bb %i" -msgstr "" +msgstr "väärä määrä argumentteja funktiolle %" #: cfgrtl.c:2623 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -19483,9 +19583,9 @@ msgid "EH incoming edge mixed with non-EH incoming edges in bb %i" msgstr "liikaa syötetiedostoja" #: cfgrtl.c:2664 cfgrtl.c:2674 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "NOTE_INSN_BASIC_BLOCK is missing for block %d" -msgstr "" +msgstr "vuonohjauskäsky peruslohkon sisällä" #: cfgrtl.c:2687 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -19503,19 +19603,19 @@ msgid "BB_RTL flag not set for block %d" msgstr "" #: cfgrtl.c:2730 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "insn %d basic block pointer is %d, should be %d" -msgstr "" +msgstr "sektorimäärä: %d, sektorikoko: %d\n" #: cfgrtl.c:2741 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "insn %d in header of bb %d has non-NULL basic block" -msgstr "" +msgstr "käsky peruslohkon ulkopuolella" #: cfgrtl.c:2749 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "insn %d in footer of bb %d has non-NULL basic block" -msgstr "" +msgstr "käsky peruslohkon ulkopuolella" #: cfgrtl.c:2822 cfgrtl.c:2870 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -19528,9 +19628,9 @@ msgid "end insn %d for block %d not found in the insn stream" msgstr "" #: cfgrtl.c:2843 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "insn %d is in multiple basic blocks (%d and %d)" -msgstr "" +msgstr "käsky peruslohkon ulkopuolella" #: cfgrtl.c:2855 #, gcc-internal-format, gfc-internal-format @@ -19658,9 +19758,9 @@ msgid "cgraph_node has wrong clone_of" msgstr "" #: cgraph.c:3256 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "cgraph_node has wrong clone list" -msgstr "" +msgstr "ei-muuttujan %qD esittely %-silmukan alkuesittelyssä" #: cgraph.c:3262 #, fuzzy, gcc-internal-format @@ -19778,9 +19878,9 @@ msgid "% attribute ignored because function is defined" msgstr "%qE-attribuuttia ei huomioida koska %qT on jo määritelty" #: cgraphunit.c:799 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "always_inline function might not be inlinable" -msgstr "%Javoimelle funktiolle %qD annettu attribuutti noinline" +msgstr "always_inline-funktio ei ehkä ole avattavissa" #: cgraphunit.c:824 #, fuzzy, gcc-internal-format @@ -19799,9 +19899,9 @@ msgid "%q+F declared % but never defined" msgstr "sisäkkäinen funktio %q+D esitelty mutta ei koskaan määritelty" #: cgraphunit.c:1022 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%qD defined but not used" -msgstr "nimiö %qD määritelty täällä" +msgstr "%qD määritelty mutta käyttämätön" #: cgraphunit.c:1345 #, fuzzy, gcc-internal-format @@ -19849,9 +19949,9 @@ msgid "failed to reclaim unneeded function" msgstr "virheellinen sisäinen makro ”%s”" #: cgraphunit.c:1562 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "failed to reclaim unneeded function in same comdat group" -msgstr "" +msgstr "virheellinen sisäinen makro ”%s”" #: cgraphunit.c:1842 #, gcc-internal-format @@ -19982,9 +20082,9 @@ msgid "init function found in object %s" msgstr "vähennyslaskussa käytetty osoitinta funktioon" #: collect2.c:2539 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "fini function found in object %s" -msgstr "" +msgstr "vähennyslaskussa käytetty osoitinta funktioon" #: collect2.c:2596 #, fuzzy, gcc-internal-format @@ -20112,9 +20212,9 @@ msgid "%qs profile count data file not found" msgstr "" #: coverage.c:341 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "profile for function %qD not found in profile data" -msgstr "" +msgstr "”%s” ei ole oikea profiilidatatiedosto ”%s”:lle" #: coverage.c:358 #, gcc-internal-format @@ -20157,9 +20257,9 @@ msgid "bytecode stream: string too long for the string table" msgstr "" #: data-streamer-in.c:84 data-streamer-in.c:113 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "bytecode stream: found non-null terminated string" -msgstr "" +msgstr "ei voitu luoda uutta ELF-lohkoa: %s" #: dbgcnt.c:94 #, gcc-internal-format, gfc-internal-format @@ -20292,9 +20392,9 @@ msgid "__builtin_eh_return not supported on this target" msgstr "%Jlohkoattribuutteja ei tueta tälle kohteelle" #: except.c:3411 except.c:3436 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "region_array is corrupted for region %i" -msgstr "" +msgstr "oikealle siirron lukumäärä on negatiivinen" #: except.c:3424 except.c:3455 #, gcc-internal-format, gfc-internal-format @@ -20327,9 +20427,9 @@ msgid "region_array does not match region_tree" msgstr "oikealle siirron lukumäärä on negatiivinen" #: except.c:3497 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "lp_array does not match region_tree" -msgstr "" +msgstr "oikealle siirron lukumäärä on negatiivinen" #: except.c:3504 #, fuzzy, gcc-internal-format @@ -20417,9 +20517,9 @@ msgid "% of unmatched not-equal tests is always 1" msgstr "" #: fold-const.c:6164 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "% of mutually exclusive equal-tests is always 0" -msgstr "" +msgstr "looginen" #: fold-const.c:8395 #, gcc-internal-format @@ -20457,9 +20557,9 @@ msgid "variable %q+D might be clobbered by % or %" msgstr "Varoita muuttujista, joita ”longjmp” tai ”vfork” saattaa muuttaa." #: function.c:4242 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "argument %q+D might be clobbered by % or %" -msgstr "" +msgstr "Varoita muuttujista, joita ”longjmp” tai ”vfork” saattaa muuttaa." #: function.c:4896 #, gcc-internal-format @@ -21012,8 +21112,9 @@ msgid "%qD source argument is the same as destination" msgstr "%qE esitelty funktion palauttavana funktiona" #: gimple-fold.c:1849 +#, fuzzy msgid "%G%qD destination unchanged after copying no bytes from a string of length %E" -msgstr "" +msgstr "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" #: gimple-fold.c:1854 msgid "%G%qD destination unchanged after copying no bytes" @@ -21025,22 +21126,23 @@ msgid "%G%qD specified bound %E equals destination size" msgstr "%qE esitelty funktion palauttavana funktiona" #: gimple-fold.c:2224 +#, fuzzy msgid "%G%qD specified bound %E exceeds destination size %wu" -msgstr "" +msgstr "%qE esitelty funktion palauttavana funktiona" #: gimple-fold.c:2242 msgid "%G%qD specified bound %E equals source length" -msgstr "" +msgstr "raja %3$E, jonka %1$G%2$qD määrittelee, on sama kuin lähteen pituus" #: gimple-ssa-isolate-paths.c:290 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "potential null pointer dereference" -msgstr "PRINT_OPERAND_ADDRESS, null-osoitin" +msgstr "mahdollinen null-osoittimen käyttö" #: gimple-ssa-isolate-paths.c:330 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "null pointer dereference" -msgstr "PRINT_OPERAND null-osoitin" +msgstr "null-osoittimen käyttö" #: gimple-ssa-isolate-paths.c:431 gimple-ssa-isolate-paths.c:556 tree.c:13157 #: tree.c:13194 c/c-typeck.c:2915 c/c-typeck.c:3001 c/c-typeck.c:10547 @@ -21054,9 +21156,9 @@ msgid "declared here" msgstr "esitelty täällä" #: gimple-ssa-nonnull-compare.c:102 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "nonnull argument %qD compared to NULL" -msgstr "annettu NULL funktion %2$qD ei-osoitinargumenttina %1$P" +msgstr "nonnull-argumenttia %qD verrataan NULLiin" #: gimple-ssa-sprintf.c:2477 gimple-ssa-sprintf.c:2597 #, gcc-internal-format @@ -21074,9 +21176,9 @@ msgid "%qE may write a terminating nul past the end of the destination" msgstr "" #: gimple-ssa-sprintf.c:2484 gimple-ssa-sprintf.c:2604 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qE writing a terminating nul past the end of the destination" -msgstr "" +msgstr "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2494 #, fuzzy, gcc-internal-format @@ -21100,9 +21202,9 @@ msgstr[0] "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu t msgstr[1] "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2519 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%<%.*s%> directive output may be truncated writing up to %wu bytes into a region of size %wu" -msgstr "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" +msgstr "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2522 #, fuzzy, gcc-internal-format @@ -21125,14 +21227,14 @@ msgid "%<%.*s%> directive output truncated writing likely %wu or more bytes into msgstr "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2542 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%<%.*s%> directive writing likely %wu or more bytes into a region of size %wu" -msgstr "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" +msgstr "%<%.*s%>-direktiivi kirjoittanee %wu tavua tai enemmän %wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2551 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%<%.*s%> directive output may be truncated writing between %wu and %wu bytes into a region of size %wu" -msgstr "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" +msgstr "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa %wu–%wu tavua %wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2554 #, fuzzy, gcc-internal-format @@ -21140,9 +21242,9 @@ msgid "%<%.*s%> directive output truncated writing between %wu and %wu bytes int msgstr "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2557 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%<%.*s%> directive writing between %wu and %wu bytes into a region of size %wu" -msgstr "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" +msgstr "%<%.*s%>-direktiivi kirjoittaa %wu–%wu tavua %wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2566 #, fuzzy, gcc-internal-format @@ -21211,9 +21313,9 @@ msgid "%<%.*s%> directive writing likely %wu or more bytes into a region of size msgstr "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2675 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%<%.*s%> directive output may be truncated writing between %wu and %wu bytes into a region of size between %wu and %wu" -msgstr "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" +msgstr "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa %wu–%wu tavua %wu–%wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2678 #, fuzzy, gcc-internal-format @@ -21251,14 +21353,14 @@ msgid "%<%.*s%> directive output of %wu bytes exceeds minimum required size of 4 msgstr "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2861 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<%.*s%> directive output between %wu and %wu bytes may exceed minimum required size of 4095" -msgstr "" +msgstr "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2864 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<%.*s%> directive output between %wu and %wu bytes exceeds minimum required size of 4095" -msgstr "" +msgstr "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2893 #, fuzzy, gcc-internal-format @@ -21266,19 +21368,19 @@ msgid "%<%.*s%> directive output of %wu bytes causes result to exceed %-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2900 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<%.*s%> directive output between %wu and %wu bytes causes result to exceed %" -msgstr "" +msgstr "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2903 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<%.*s%> directive output between %wu and %wu bytes may cause result to exceed %" -msgstr "" +msgstr "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:2913 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<%.*s%> directive argument is not a nul-terminated string" -msgstr "" +msgstr "Funktion %s argumentti kohdassa %L on negatiivinen" #: gimple-ssa-sprintf.c:2926 #, gcc-internal-format @@ -21293,9 +21395,9 @@ msgid "directive argument %qE" msgstr "Funktion %s argumentti kohdassa %L on negatiivinen" #: gimple-ssa-sprintf.c:2935 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "directive argument in the range [%E, %E]" -msgstr "%s odottaa kokonaislukuliteraalia väliltä [%d, %d]." +msgstr "direktiivin argumentti välillä [%E, %E]" #: gimple-ssa-sprintf.c:2939 #, gcc-internal-format @@ -21315,7 +21417,7 @@ msgstr "%qE tulostaa vähintään %wu tavua (oletetaan %wu) %wu tavun kokoiseen #: gimple-ssa-sprintf.c:2964 #, gcc-internal-format msgid "%qE output between %wu and %wu bytes into a destination of size %wu" -msgstr "" +msgstr "%qE tulostaa %wu–%wu tavua %wu tavun kokoiseen kohteeseen" #: gimple-ssa-sprintf.c:2969 #, gcc-internal-format @@ -21338,9 +21440,9 @@ msgid "%<%.*s%> directive precision out of range" msgstr "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" #: gimple-ssa-sprintf.c:4006 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "specified bound %wu exceeds maximum object size %wu" -msgstr "" +msgstr "paikallisten objektien kokonaiskoko on liian suuri" #: gimple-ssa-sprintf.c:4017 #, gcc-internal-format @@ -21482,8 +21584,9 @@ msgstr[0] "" msgstr[1] "" #: gimple-ssa-warn-restrict.c:1439 +#, fuzzy msgid "%G%qD accessing between %wu and %wu bytes at offsets %s and %s overlaps between %wu and %wu bytes at offset %s" -msgstr "" +msgstr "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" #: gimple-ssa-warn-restrict.c:1447 msgid "%G%qD accessing between %wu and %wu bytes at offsets %s and %s overlaps %wu or more bytes at offset %s" @@ -21528,10 +21631,11 @@ msgstr[0] "" msgstr[1] "" #: gimple-ssa-warn-restrict.c:1541 +#, fuzzy msgid "%G%qD accessing between %wu and %wu bytes may overlap %wu byte" msgid_plural "%G%qD accessing between %wu and %wu bytes may overlap up to %wu bytes" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" +msgstr[1] "%<%.*s%>-direktiivi kirjoittaa jopa %wu tavua %wu tavun kokoiseen alueeseen" #: gimple-ssa-warn-restrict.c:1548 msgid "%G%qD accessing between %wu and %wu bytes at offsets %s and %s may overlap %wu byte at offset %s" @@ -21559,8 +21663,9 @@ msgid "%G%qD pointer overflow between offset %s and size %s" msgstr "" #: gimple-ssa-warn-restrict.c:1667 +#, fuzzy msgid "%G%qD forming offset %s is out of the bounds [0, %wu] of object %qD with type %qT" -msgstr "" +msgstr "Arvo sallitun välin ulkopuolella." #: gimple-ssa-warn-restrict.c:1670 #, fuzzy @@ -21612,8 +21717,9 @@ msgid "%G%qD offset %s from the object at %qE is out of the bounds of %qT" msgstr "Arvo sallitun välin ulkopuolella." #: gimple-ssa-warn-restrict.c:1720 +#, fuzzy msgid "%G%qD offset %s from the object at %qE is out of the bounds of referenced subobject %qD with type %qT at offset %wu" -msgstr "" +msgstr "Arvo sallitun välin ulkopuolella." #: gimple-ssa-warn-restrict.c:1883 #, fuzzy @@ -21621,14 +21727,14 @@ msgid "%G%qD source argument is the same as destination" msgstr "%qE esitelty funktion palauttavana funktiona" #: gimple-streamer-in.c:210 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "bytecode stream: unknown GIMPLE statement tag %s" -msgstr "" +msgstr "ei voitu luoda uutta ELF-lohkoa: %s" #: gimple.c:1243 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "gimple check: expected %s(%s), have %s(%s) in %s, at %s:%d" -msgstr "" +msgstr "verifiointi epäonnistui kohdassa PC=%d: %s" #: gimplify.c:1878 #, fuzzy, gcc-internal-format @@ -21766,14 +21872,14 @@ msgid "iteration variable %qE should not be linear" msgstr "virheellinen tyyppi iterointimuuttujalle %qE" #: gimplify.c:8086 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "conditional % clause on % construct" -msgstr "" +msgstr "muuttuja %qD esitelty uudelleen funktiona" #: gimplify.c:8092 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "conditional % clause on % construct" -msgstr "" +msgstr "muuttuja %qD esitelty uudelleen funktiona" #: gimplify.c:8108 #, fuzzy, gcc-internal-format @@ -21831,9 +21937,9 @@ msgid "%<_Atomic%> %qD in implicit % clause" msgstr "muuttuja %qD esitelty uudelleen funktiona" #: gimplify.c:9474 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<_Atomic%> %qD in implicit % clause on % construct" -msgstr "" +msgstr "muuttuja %qD esitelty uudelleen funktiona" #: gimplify.c:9674 #, fuzzy, gcc-internal-format @@ -21841,9 +21947,9 @@ msgid "%<_Atomic%> %qD in % clause on % construct" msgstr "muuttuja %qD esitelty uudelleen funktiona" #: gimplify.c:9725 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "same variable used in % and % clauses on % construct" -msgstr "" +msgstr "muuttuja %qD esitelty uudelleen funktiona" #: gimplify.c:9813 #, gcc-internal-format @@ -21856,9 +21962,9 @@ msgid "invalid private reduction on %qE" msgstr "%qD ei ole malli" #: gimplify.c:10236 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "% kind in % clause on a % construct" -msgstr "" +msgstr "muuttuja %qD esitelty uudelleen funktiona" #: gimplify.c:12107 omp-low.c:2925 #, gcc-internal-format @@ -21881,9 +21987,9 @@ msgid "more than one % clause on an % construct" msgstr "" #: gimplify.c:12162 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "% clause specified together with % clauses on the same construct" -msgstr "" +msgstr "% vain parametrina ei ole oikeutettu" #: gimplify.c:13410 #, fuzzy, gcc-internal-format @@ -21998,9 +22104,9 @@ msgid "variable of same assembler name as the virtual table is defined in anothe msgstr "%J%qD esitelty avoimeksi määrittelyn jälkeen" #: ipa-devirt.c:806 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "virtual table of type %qD contains RTTI information" -msgstr "" +msgstr "edellinen määrittely täällä" #: ipa-devirt.c:812 #, fuzzy, gcc-internal-format @@ -22296,9 +22402,9 @@ msgid "ipa inline summary is missing in input file" msgstr "" #: ipa-hsa.c:57 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "could not emit HSAIL for function %s: function cannot be cloned" -msgstr "" +msgstr "sisäkkäinen funktio %qs esitelty %:ksi" #: ipa-prop.c:4192 #, fuzzy, gcc-internal-format @@ -22361,9 +22467,9 @@ msgid "inconsistent operand constraints in an %" msgstr "virheellinen lvalue asm-tulosteessa %d" #: lra-constraints.c:4859 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Max. number of generated reload insns per insn is achieved (%d)\n" -msgstr "" +msgstr "Kumoamistoimintojen enimmäismäärä" #: lto-cgraph.c:1111 #, gcc-internal-format @@ -22391,9 +22497,9 @@ msgid "bytecode stream: no callee found while reading edge" msgstr "" #: lto-cgraph.c:1528 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "bytecode stream: found empty cgraph node" -msgstr "" +msgstr "ei voitu luoda uutta ELF-lohkoa: %s" #: lto-cgraph.c:1644 #, gcc-internal-format, gfc-internal-format @@ -22437,9 +22543,9 @@ msgid "%s out of range: Range is %i to %i, value is %i" msgstr "" #: lto-streamer-in.c:80 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "bytecode stream: unexpected tag %s" -msgstr "" +msgstr "ei voitu luoda uutta ELF-lohkoa: %s" #: lto-streamer-in.c:900 lto-streamer-in.c:910 #, fuzzy, gcc-internal-format @@ -22692,9 +22798,9 @@ msgid "%<#pragma omp cancel for%> inside % for construct" msgstr "" #: omp-low.c:2728 omp-low.c:2741 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<#pragma omp cancel sections%> inside % sections construct" -msgstr "" +msgstr "-sanaa ei voi käyttää tässä yhteydessä" #: omp-low.c:2770 #, gcc-internal-format @@ -22989,9 +23095,9 @@ msgid "argument %qs to %<-femit-struct-debug-detailed%> not recognized" msgstr "%qs-attribuutin virheellinen argumentti" #: opts.c:126 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "argument %qs to %<-femit-struct-debug-detailed%> unknown" -msgstr "" +msgstr "%qs-attribuutin virheellinen argumentti" #: opts.c:133 #, gcc-internal-format @@ -23024,64 +23130,64 @@ msgid "%<-fipa-cp%> is incompatible with %<-flive-patching=inline-only-static%>" msgstr "__COUNTER__ lavennettu direktiivin sisällä valitsimella -fdirectives-only" #: opts.c:760 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-fwhole-program%> is incompatible with %<-flive-patching=inline-only-static|inline-clone%>" -msgstr "" +msgstr "__COUNTER__ lavennettu direktiivin sisällä valitsimella -fdirectives-only" #: opts.c:771 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-fipa-pta%> is incompatible with %<-flive-patching=inline-only-static|inline-clone%>" -msgstr "" +msgstr "__COUNTER__ lavennettu direktiivin sisällä valitsimella -fdirectives-only" #: opts.c:778 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-fipa-reference%> is incompatible with %<-flive-patching=inline-only-static|inline-clone%>" -msgstr "" +msgstr "__COUNTER__ lavennettu direktiivin sisällä valitsimella -fdirectives-only" #: opts.c:785 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-fipa-ra%> is incompatible with %<-flive-patching=inline-only-static|inline-clone%>" -msgstr "" +msgstr "__COUNTER__ lavennettu direktiivin sisällä valitsimella -fdirectives-only" #: opts.c:792 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-fipa-icf%> is incompatible with %<-flive-patching=inline-only-static|inline-clone%>" -msgstr "" +msgstr "__COUNTER__ lavennettu direktiivin sisällä valitsimella -fdirectives-only" #: opts.c:799 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-fipa-icf-functions%> is incompatible with %<-flive-patching=inline-only-static|inline-clone%>" -msgstr "" +msgstr "__COUNTER__ lavennettu direktiivin sisällä valitsimella -fdirectives-only" #: opts.c:806 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-fipa-icf-variables%> is incompatible with %<-flive-patching=inline-only-static|inline-clone%>" -msgstr "" +msgstr "__COUNTER__ lavennettu direktiivin sisällä valitsimella -fdirectives-only" #: opts.c:813 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-fipa-bit-cp%> is incompatible with %<-flive-patching=inline-only-static|inline-clone%>" -msgstr "" +msgstr "__COUNTER__ lavennettu direktiivin sisällä valitsimella -fdirectives-only" #: opts.c:820 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-fipa-vrp%> is incompatible with %<-flive-patching=inline-only-static|inline-clone%>" -msgstr "" +msgstr "__COUNTER__ lavennettu direktiivin sisällä valitsimella -fdirectives-only" #: opts.c:827 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-fipa-pure-const%> is incompatible with %<-flive-patching=inline-only-static|inline-clone%>" -msgstr "" +msgstr "__COUNTER__ lavennettu direktiivin sisällä valitsimella -fdirectives-only" #: opts.c:838 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-fipa-reference-addressable%> is incompatible with %<-flive-patching=inline-only-static|inline-clone%>" -msgstr "" +msgstr "__COUNTER__ lavennettu direktiivin sisällä valitsimella -fdirectives-only" #: opts.c:847 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-fipa-stack-alignment%> is incompatible with %<-flive-patching=inline-only-static|inline-clone%>" -msgstr "" +msgstr "__COUNTER__ lavennettu direktiivin sisällä valitsimella -fdirectives-only" #: opts.c:916 #, gcc-internal-format @@ -23415,9 +23521,9 @@ msgid "plugin cannot register an unnamed pass" msgstr "%s: tuntematon osan nimi ”%.*s”" #: passes.c:1455 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "plugin cannot register pass %qs without reference pass name" -msgstr "" +msgstr "Rekisteröi" #: passes.c:1474 #, gcc-internal-format @@ -23634,9 +23740,9 @@ msgid "can%'t use %qs as a call-used register" msgstr "luokkanimeä ei ole annettu %qs:n kanssa" #: reginfo.c:736 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "can%'t use %qs as a fixed register" -msgstr "" +msgstr "luokkanimeä ei ole annettu %qs:n kanssa" #: reginfo.c:762 config/arc/arc.c:1047 config/arc/arc.c:1089 #: config/ia64/ia64.c:6039 config/ia64/ia64.c:6046 config/pa/pa.c:468 @@ -23697,14 +23803,14 @@ msgid "unable to find a register to spill in class %qs" msgstr "%qD esitelty extern-avainsanalla sisäkkäin" #: reload1.c:4697 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "% operand requires impossible reload" -msgstr "" +msgstr "%s: Tätä tiedostoa ei voitu varmuuskopioida" #: reload1.c:6118 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "% operand constraint incompatible with operand size" -msgstr "" +msgstr "%s: Tätä tiedostoa ei voitu varmuuskopioida" #: reload1.c:7996 #, fuzzy, gcc-internal-format @@ -23717,9 +23823,9 @@ msgid "RTL check: access of elt %d of '%s' with last elt %d in %s, at %s:%d" msgstr "" #: rtl.c:864 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "RTL check: expected elt %d type '%c', have '%c' (rtx %s) in %s, at %s:%d" -msgstr "" +msgstr "verifiointi epäonnistui kohdassa PC=%d: %s" #: rtl.c:874 #, gcc-internal-format, gfc-internal-format @@ -23727,19 +23833,19 @@ msgid "RTL check: expected elt %d type '%c' or '%c', have '%c' (rtx %s) in %s, a msgstr "" #: rtl.c:883 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "RTL check: expected code '%s', have '%s' in %s, at %s:%d" -msgstr "" +msgstr "verifiointi epäonnistui kohdassa PC=%d: %s" #: rtl.c:893 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "RTL check: expected code '%s' or '%s', have '%s' in %s, at %s:%d" -msgstr "" +msgstr "verifiointi epäonnistui kohdassa PC=%d: %s" #: rtl.c:904 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "RTL check: expected code '%s', '%s' or '%s', have '%s' in %s, at %s:%d" -msgstr "" +msgstr "verifiointi epäonnistui kohdassa PC=%d: %s" #: rtl.c:931 #, gcc-internal-format, gfc-internal-format @@ -23782,9 +23888,9 @@ msgid "%<%%%> constraint used with last operand" msgstr "sisäkkäisessä funktiossa käytetty rekisterimuuttujaa %qD" #: stmt.c:277 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "matching constraint not valid in output operand" -msgstr "" +msgstr "muotomerkkijonolla on epäkelpo operandinumero" #: stmt.c:341 #, fuzzy, gcc-internal-format @@ -24202,9 +24308,9 @@ msgid "target system does not support the %qs debug format" msgstr "%s ei tue muotoilua %<%%%s%c%> %s" #: toplev.c:1548 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "variable tracking requested, but useless unless producing debug info" -msgstr "" +msgstr "%s ei tue muotoilua %<%%%s%c%> %s" #: toplev.c:1552 #, fuzzy, gcc-internal-format @@ -24317,9 +24423,9 @@ msgid "invalid use of volatile lvalue inside % function" msgstr "%Jvanhanmallinen funktiomäärittely" #: trans-mem.c:643 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "% function call not within outer transaction or %" -msgstr "" +msgstr "Käyttö: %s \n" #: trans-mem.c:712 trans-mem.c:4819 #, fuzzy, gcc-internal-format @@ -24452,9 +24558,9 @@ msgid "BIT_FIELD_REF of non-mode-precision operand" msgstr "" #: tree-cfg.c:3131 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "position plus size exceeds size of referenced object in BIT_FIELD_REF" -msgstr "" +msgstr "epäkelvot operandit binääriselle %s-operaatiolle" #: tree-cfg.c:3142 #, gcc-internal-format @@ -24813,9 +24919,9 @@ msgid "type mismatch in BIT_INSERT_EXPR" msgstr "" #: tree-cfg.c:4316 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "not allowed type combination in BIT_INSERT_EXPR" -msgstr "" +msgstr "virheellinen vastaanottajatyyppi %qs" #: tree-cfg.c:4325 #, fuzzy, gcc-internal-format @@ -24828,9 +24934,9 @@ msgid "BIT_INSERT_EXPR into non-mode-precision operand" msgstr "" #: tree-cfg.c:4341 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "insertion out of range in BIT_INSERT_EXPR" -msgstr "" +msgstr "virheellinen vastaanottajatyyppi %qs" #: tree-cfg.c:4351 #, gcc-internal-format @@ -25100,9 +25206,9 @@ msgid "fallthru edge after a control statement in bb %d" msgstr "väärä määrä argumentteja funktiolle %" #: tree-cfg.c:5582 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "true/false edge after a non-GIMPLE_COND in bb %d" -msgstr "" +msgstr "väärä määrä argumentteja funktiolle %" #: tree-cfg.c:5605 tree-cfg.c:5627 tree-cfg.c:5644 tree-cfg.c:5713 #, gcc-internal-format, gfc-internal-format @@ -25160,9 +25266,9 @@ msgid "ignoring return value of function declared with attribute warn_unused_res msgstr "attribuutilla warn_unused_result esitellyn funktion paluuarvoa ei huomioida" #: tree-diagnostic.c:202 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "in definition of macro %qs" -msgstr "makron nimi puuttuu %qs:n jälkeen" +msgstr "%qs-makron määrittelyssä" #: tree-diagnostic.c:219 #, gcc-internal-format @@ -25170,9 +25276,9 @@ msgid "in expansion of macro %qs" msgstr "%qs-makron lavennuksessa" #: tree-eh.c:4754 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "BB %i has multiple EH edges" -msgstr "" +msgstr "fr30_print_operand: tunnistamaton %%b-koodi" #: tree-eh.c:4766 #, gcc-internal-format, gfc-internal-format @@ -25205,9 +25311,9 @@ msgid "BB %i too many fallthru edges" msgstr "" #: tree-eh.c:4865 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "BB %i has incorrect edge" -msgstr "" +msgstr "nimettömällä kentällä on vaillinainen tyyppi" #: tree-eh.c:4871 #, gcc-internal-format, gfc-internal-format @@ -25270,9 +25376,9 @@ msgid "function %q+F can never be inlined because it uses attributes conflicting msgstr "%Jfunktio %qF ei voi koskaan olla avoin, koska se käyttää avoimille funktioille sopimattomia attribuutteja" #: tree-inline.c:4479 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "inlining failed in call to always_inline %q+F: %s" -msgstr "" +msgstr "%J%qD esitelty turhaan uudestaan" #: tree-inline.c:4482 tree-inline.c:4503 #, gcc-internal-format @@ -25365,9 +25471,9 @@ msgid "virtual def operand missing for stmt" msgstr "epäkelvot operandit binääriselle %s-operaatiolle" #: tree-ssa-operands.c:992 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "virtual use of statement not up-to-date" -msgstr "" +msgstr "tyypillä %qE on virtuaalisia jäsenfunktioita" #: tree-ssa-operands.c:999 #, fuzzy, gcc-internal-format @@ -25390,20 +25496,23 @@ msgid "stmt volatile flag not up-to-date" msgstr "" #: tree-ssa-strlen.c:2072 +#, fuzzy msgid "%G%qD output truncated before terminating nul copying %E byte from a string of the same length" msgid_plural "%G%qD output truncated before terminating nul copying %E bytes from a string of the same length" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" +msgstr[1] "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" #: tree-ssa-strlen.c:2088 +#, fuzzy msgid "%G%qD output truncated copying %E byte from a string of length %wu" msgid_plural "%G%qD output truncated copying %E bytes from a string of length %wu" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" +msgstr[1] "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" #: tree-ssa-strlen.c:2095 +#, fuzzy msgid "%G%qD output truncated copying between %wu and %wu bytes from a string of length %wu" -msgstr "" +msgstr "%G%qD-tuloste saattaa katketa kopioitaessa %wu–%wu tavua %wu tavun pituisesta merkkijonosta" #: tree-ssa-strlen.c:2107 #, fuzzy @@ -25413,17 +25522,18 @@ msgstr[0] "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu t msgstr[1] "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" #: tree-ssa-strlen.c:2114 tree-ssa-strlen.c:2130 -#, fuzzy msgid "%G%qD output may be truncated copying between %wu and %wu bytes from a string of length %wu" -msgstr "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" +msgstr "%G%qD-tuloste saattaa katketa kopioitaessa %wu–%wu tavua %wu tavun pituisesta merkkijonosta" #: tree-ssa-strlen.c:2256 +#, fuzzy msgid "%G%qD output truncated before terminating nul copying as many bytes from a string as its length" -msgstr "" +msgstr "%<%.*s%>-direktiivin tuloste saattaa katketa kirjoittaessa jopa %wu tavua %wu–%wu tavun kokoiseen alueeseen" #: tree-ssa-strlen.c:2262 +#, fuzzy msgid "%G%qD specified bound depends on the length of the source argument" -msgstr "" +msgstr "raja %3$E, jonka %1$G%2$qD määrittelee, on sama kuin lähteen pituus" #: tree-ssa-strlen.c:2269 #, gcc-internal-format @@ -25531,9 +25641,9 @@ msgid "missing definition" msgstr "puuttuva määrittely" #: tree-ssa.c:874 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "definition in block %i does not dominate use in block %i" -msgstr "" +msgstr "%qD ei ole luokka eikä nimiavaruus" #: tree-ssa.c:882 #, gcc-internal-format, gfc-internal-format @@ -25646,9 +25756,9 @@ msgid "array subscript [%E, %E] is outside array bounds of %qT" msgstr "taulukon indeksi on taulukkorajojen ulkopuolella" #: tree-vrp.c:4490 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "array subscript %E is below array bounds of %qT" -msgstr "taulukon indeksi on taulukkorajojen alapuolella" +msgstr "taulukon indeksi %E on %qT-taulukon rajojen alapuolella" #: tree-vrp.c:4499 tree-vrp.c:4750 tree-vrp.c:4851 #, gcc-internal-format @@ -25706,44 +25816,44 @@ msgid "tree check: %s, have %s in %s, at %s:%d" msgstr "verifiointi epäonnistui kohdassa PC=%d: %s" #: tree.c:9850 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "tree check: expected none of %s, have %s in %s, at %s:%d" -msgstr "" +msgstr "verifiointi epäonnistui kohdassa PC=%d: %s" #: tree.c:9863 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "tree check: expected class %qs, have %qs (%s) in %s, at %s:%d" -msgstr "" +msgstr "verifiointi epäonnistui kohdassa PC=%d: %s" #: tree.c:9912 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "tree check: did not expect class %qs, have %qs (%s) in %s, at %s:%d" -msgstr "" +msgstr "verifiointi epäonnistui kohdassa PC=%d: %s" #: tree.c:9925 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "tree check: expected omp_clause %s, have %s in %s, at %s:%d" -msgstr "" +msgstr "verifiointi epäonnistui kohdassa PC=%d: %s" #: tree.c:9985 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "tree check: expected tree that contains %qs structure, have %qs in %s, at %s:%d" -msgstr "" +msgstr "verifiointi epäonnistui kohdassa PC=%d: %s" #: tree.c:9999 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "tree check: accessed elt %d of tree_int_cst with %d elts in %s, at %s:%d" -msgstr "" +msgstr "verifiointi epäonnistui kohdassa PC=%d: %s" #: tree.c:10011 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "tree check: accessed elt %d of tree_vec with %d elts in %s, at %s:%d" -msgstr "" +msgstr "verifiointi epäonnistui kohdassa PC=%d: %s" #: tree.c:10024 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "tree check: accessed operand %d of %s with %d operands in %s, at %s:%d" -msgstr "" +msgstr "verifiointi epäonnistui kohdassa PC=%d: %s" #: tree.c:10037 #, gcc-internal-format, gfc-internal-format @@ -25751,9 +25861,9 @@ msgid "tree check: accessed operand %d of omp_clause %s with %d operands in %s, msgstr "" #: tree.c:13152 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%qD is deprecated: %s" -msgstr "%qE on vanhentunut: %s" +msgstr "%qD on vanhentunut: %s" #: tree.c:13155 #, gcc-internal-format @@ -25906,9 +26016,9 @@ msgid "TYPE_MODE of TYPE_CANONICAL is not compatible" msgstr "funktiokutsu epäsopivan tyypin läpi" #: tree.c:14273 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "TYPE_CANONICAL of main variant is not main variant" -msgstr "" +msgstr "funktiokutsu epäsopivan tyypin läpi" #: tree.c:14289 #, gcc-internal-format @@ -25931,9 +26041,9 @@ msgid "TYPE_BINFO is not TREE_BINFO" msgstr "tyyppitäsmäämättömyys komponenttiviitteessä" #: tree.c:14336 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "TYPE_BINFO type is not TYPE_MAIN_VARIANT" -msgstr "" +msgstr "tyyppitäsmäämättömyys komponenttiviitteessä" #: tree.c:14347 #, gcc-internal-format @@ -25956,9 +26066,9 @@ msgid "TYPE_MAX_VALUE_RAW non-NULL" msgstr "NULLin muunnos epäosoitintyypiksi" #: tree.c:14390 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "TYPE_LANG_SLOT_1 (binfo) field is non-NULL" -msgstr "" +msgstr "NULLin muunnos epäosoitintyypiksi" #: tree.c:14406 #, gcc-internal-format @@ -26116,9 +26226,9 @@ msgid "data type of %q+D isn%'t suitable for a register" msgstr "" #: varasm.c:1405 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "the register specified for %q+D cannot be accessed by the current target" -msgstr "" +msgstr "sisäkkäisessä funktiossa käytetty globaalia rekisterimuuttujaa %qD" #: varasm.c:1408 #, fuzzy, gcc-internal-format @@ -26126,9 +26236,9 @@ msgid "the register specified for %q+D is not general enough to be used as a reg msgstr "sisäkkäisessä funktiossa käytetty globaalia rekisterimuuttujaa %qD" #: varasm.c:1411 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "register specified for %q+D isn%'t suitable for data type" -msgstr "" +msgstr "sisäkkäisessä funktiossa käytetty globaalia rekisterimuuttujaa %qD" #: varasm.c:1421 #, fuzzy, gcc-internal-format @@ -26221,9 +26331,9 @@ msgid "weakref %q+D ultimately targets itself" msgstr "" #: varasm.c:5960 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "weakref %q+D must have static linkage" -msgstr "" +msgstr "jäsenfunktiota %qD ei voi kutsua ilman oliota" #: varasm.c:5967 #, fuzzy, gcc-internal-format @@ -26302,14 +26412,14 @@ msgid "no sclass for %s stab (0x%x)" msgstr "%s[%s] Virhe 0x%x%s" #: lto-streamer.h:1003 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "bytecode stream: expected tag %s instead of %s" -msgstr "" +msgstr "ei voitu luoda uutta ELF-lohkoa: %s" #: lto-streamer.h:1013 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "bytecode stream: tag %s is not in the expected range [%s, %s]" -msgstr "" +msgstr "ei voitu luoda uutta ELF-lohkoa: %s" #: c-family/c-ada-spec.c:2792 #, fuzzy, gcc-internal-format @@ -26474,9 +26584,9 @@ msgid "destructor priorities from 0 to %d are reserved for the implementation" msgstr "" #: c-family/c-attribs.c:1562 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "constructor priorities from 0 to %d are reserved for the implementation" -msgstr "" +msgstr "Muodostin %qs" #: c-family/c-attribs.c:1570 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -26957,14 +27067,14 @@ msgid "__builtin_shuffle argument vectors must be of the same type" msgstr "%<__builtin_longjmp%>-fuktion toisen argumentin pitää olla 1" #: c-family/c-common.c:1046 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "__builtin_shuffle number of elements of the argument vector(s) and the mask vector should be the same" -msgstr "" +msgstr "puhdistusargumentti ei ole tunniste" #: c-family/c-common.c:1056 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "__builtin_shuffle argument vector(s) inner type must have the same size as inner type of the mask" -msgstr "" +msgstr "%<__builtin_longjmp%>-fuktion toisen argumentin pitää olla 1" #: c-family/c-common.c:1104 #, fuzzy, gcc-internal-format @@ -27091,7 +27201,7 @@ msgstr "%qD:n osoite tulee aina olemaan %" #: c-family/c-common.c:3445 #, gcc-internal-format msgid "%<*%> in boolean context, suggest %<&&%> instead" -msgstr "" +msgstr "%<*%> totuusarvokontekstissa, ehdotetaan %<&&%> sen sijaan" #: c-family/c-common.c:3457 #, fuzzy, gcc-internal-format @@ -27488,9 +27598,11 @@ msgid "format string argument is not a string type" msgstr "muotomerkkijonoargumentti seuraa muotoiltavia argumentteja" #: c-family/c-format.c:226 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "found a %qs reference but the format argument should be a string" msgstr "" +"Käyttö: %s MUOTOILU [ARGUMENTTI]...\n" +" tai: %s VALITSIN\n" #: c-family/c-format.c:229 #, fuzzy, gcc-internal-format @@ -27832,9 +27944,9 @@ msgid "%<__gcc_host_wide_int__%> is not defined as a type" msgstr "%<%T::%E%> ei ole tyyppi" #: c-family/c-format.c:3838 c-family/c-format.c:4027 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<__gcc_host_wide_int__%> is not defined as % or %" -msgstr "" +msgstr "%<%T::%E%> ei ole tyyppi" #: c-family/c-format.c:3886 #, fuzzy, gcc-internal-format @@ -27877,14 +27989,14 @@ msgid "-Wmisleading-indentation is disabled from this point onwards, since colum msgstr "" #: c-family/c-indentation.c:614 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "this %qs clause does not guard..." -msgstr "Syntaksivirhe IF-lauseessa kohdassa %C" +msgstr "tämä %qs-ehtolause ei reunusta..." #: c-family/c-indentation.c:617 #, gcc-internal-format msgid "...this statement, but the latter is misleadingly indented as if it were guarded by the %qs" -msgstr "" +msgstr "...tätä lausetta, mutta jäljempi on harhaanjohtavasti sisennetty kuin %qs reunustaisi sitä" #: c-family/c-lex.c:226 #, gcc-internal-format @@ -27968,9 +28080,9 @@ msgid "repeated %<@%> before Objective-C string" msgstr "käytetty %<__thread%> ennen %:a" #: c-family/c-lex.c:1198 cp/parser.c:4183 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "unsupported non-standard concatenation of string literals" -msgstr "" +msgstr "virheellinen loppuliite ”%.*s” liukulukuvakiolla" #: c-family/c-lex.c:1234 #, gcc-internal-format @@ -27988,9 +28100,9 @@ msgid "%<_Atomic%> expression in %<#pragma omp atomic%>" msgstr "roskaa ilmaisun %<#pragma pack%> lopussa" #: c-family/c-omp.c:334 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<#pragma omp atomic update%> uses two different variables for memory" -msgstr "" +msgstr "virheellinen tyyppi iterointimuuttujalle %qE" #: c-family/c-omp.c:337 c-family/c-omp.c:375 #, gcc-internal-format @@ -28008,9 +28120,9 @@ msgid "% qualified % expression" msgstr "" #: c-family/c-omp.c:479 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "more than one locator in % clause on % construct" -msgstr "" +msgstr "% vain parametrina ei ole oikeutettu" #: c-family/c-omp.c:485 #, fuzzy, gcc-internal-format @@ -28448,9 +28560,9 @@ msgid "unknown option after %<#pragma GCC diagnostic%> kind" msgstr "tuntematon toiminto %qs ilmaisulle %<#pragma pack%> - jätetään huomiotta" #: c-family/c-pragma.c:814 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%qs is not an option that controls warnings" -msgstr "tuntematon komentorivivalitsin %qs" +msgstr "%qs ei ole varoituksia ohjaava valitsin" #: c-family/c-pragma.c:822 #, fuzzy, gcc-internal-format @@ -28468,9 +28580,9 @@ msgid "%<#pragma GCC option%> is not a string" msgstr "%<#pragma GCC option%> ei ole merkkijono" #: c-family/c-pragma.c:894 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<#pragma GCC target (string [,string]...)%> does not have a final %<)%>" -msgstr "" +msgstr "%<#pragma GCC optimize%> ei ole merkkijono eikä luku" #: c-family/c-pragma.c:900 #, fuzzy, gcc-internal-format @@ -28508,9 +28620,9 @@ msgid "junk at end of %<#pragma pop_options%>" msgstr "roskaa ilmaisun %<#pragma pop_options%> lopussa" #: c-family/c-pragma.c:1046 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<#pragma GCC pop_options%> without a corresponding %<#pragma GCC push_options%>" -msgstr "" +msgstr "%Jluetellun tyypin jäsenen %qd uudelleenesittely" #: c-family/c-pragma.c:1088 #, gcc-internal-format @@ -28563,9 +28675,9 @@ msgid "%<#pragma STDC FLOAT_CONST_DECIMAL64%> is not supported on this target" msgstr "%<#pragma STDC FLOAT_CONST_DECIMAL64%> ei ole tuettu tällä kohteella" #: c-family/c-pragma.c:1238 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "ISO C does not support %<#pragma STDC FLOAT_CONST_DECIMAL64%>" -msgstr "" +msgstr "%<#pragma STDC FLOAT_CONST_DECIMAL64%> ei ole tuettu tällä kohteella" #: c-family/c-pretty-print.c:329 #, gcc-internal-format @@ -28689,9 +28801,9 @@ msgid "logical % applied to non-boolean constant" msgstr "" #: c-family/c-warn.c:294 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "logical % of collectively exhaustive tests is always true" -msgstr "" +msgstr "looginen" #: c-family/c-warn.c:298 #, fuzzy, gcc-internal-format @@ -29255,7 +29367,7 @@ msgstr "tyyppien %qT ja %qT välinen vertailu" #: c-family/c-warn.c:2096 #, gcc-internal-format msgid "comparison of integer expressions of different signedness: %qT and %qT" -msgstr "" +msgstr "etumerkiltään eroavien kokonaislukulausekkeiden vertailu: %qT ja %qT" #: c-family/c-warn.c:2149 #, gcc-internal-format @@ -29278,9 +29390,9 @@ msgid "unused parameter %qD" msgstr "käyttämätön parametri %qD" #: c-family/c-warn.c:2278 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "typedef %qD locally defined but not used" -msgstr "%Jnimike %qD määritelty, mutta ei käytetty" +msgstr "typedef %qD määritelty paikallisesti mutta käyttämätön" # XXX #: c-family/c-warn.c:2314 @@ -29474,9 +29586,9 @@ msgid "-mcpu=%s has invalid silicon revision" msgstr "" #: common/config/i386/i386-common.c:1340 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "-malign-loops is obsolete, use -falign-loops" -msgstr "" +msgstr "funktion palauttava funktio" #: common/config/i386/i386-common.c:1342 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -29484,9 +29596,9 @@ msgid "-malign-loops=%d is not between 0 and %d" msgstr " uid = %d, gid = %d, oikeudet = 0%o.\n" #: common/config/i386/i386-common.c:1349 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "-malign-jumps is obsolete, use -falign-jumps" -msgstr "" +msgstr "funktion palauttava funktio" #: common/config/i386/i386-common.c:1351 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -29739,9 +29851,9 @@ msgid "failed to open temporary file %s for LTO output" msgstr "%s: virhe kirjoitettaessa tiedostoa ”%s”: %s\n" #: config/darwin.c:2038 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qE 2.95 vtable-compatibility attribute applies only when compiling a kext" -msgstr "" +msgstr "%qE-attribuutti pätee vain funktioihin" #: config/darwin.c:2045 #, fuzzy, gcc-internal-format @@ -30027,9 +30139,9 @@ msgid "invalid arg %<%s%> for %<-mbranch-protection=%>" msgstr "Virheellinen vähimmäisargumenttimäärä (%d) funktiolle %s" #: config/aarch64/aarch64.c:11798 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "missing arg for %<-mbranch-protection=%>" -msgstr "" +msgstr "Virheellinen vähimmäisargumenttimäärä (%d) funktiolle %s" #: config/aarch64/aarch64.c:11822 #, fuzzy, gcc-internal-format @@ -30160,9 +30272,9 @@ msgid "malformed % pragma or attribute" msgstr "Väärin muotoiltu kohdekohtainen muuttujamäärittely" #: config/aarch64/aarch64.c:14775 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%Klane %wd out of range %wd - %wd" -msgstr "" +msgstr "operandinumero on arvoalueen ulkopuolella muotoilussa" #: config/aarch64/aarch64.c:14777 #, fuzzy, gcc-internal-format @@ -30467,9 +30579,9 @@ msgid "operand %d should be a 3 bit unsigned immediate" msgstr "argumentin 2 on oltava 5-bittinen etumerkitön literaali" #: config/arc/arc.c:7213 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "unknown builtin immediate operand type for operand %d" -msgstr "" +msgstr "sijoituksen vasemman operandin on oltava lvalue" #: config/arc/arc.c:7264 #, gcc-internal-format @@ -30792,14 +30904,14 @@ msgid "RTP PIC is incompatible with -msingle-pic-base" msgstr "Muodostin %qs" #: config/arm/arm.c:3490 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "-mpic-register= is useless without -fpic" -msgstr "" +msgstr "PROCEDURE-lauseen kohdassa %C on oltava geneerisessä rajapinnassa" #: config/arm/arm.c:3499 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "unable to use '%s' for PIC register" -msgstr "" +msgstr "Tiedostoa ”%s” ei löytynyt." #: config/arm/arm.c:3521 #, fuzzy, gcc-internal-format @@ -30867,9 +30979,9 @@ msgid "non-AAPCS derived PCS variant" msgstr "" #: config/arm/arm.c:5836 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "variadic functions must use the base AAPCS variant" -msgstr "" +msgstr "kenttä %qE esitelty funktiona" #: config/arm/arm.c:5855 #, gcc-internal-format @@ -30923,14 +31035,14 @@ msgid "accessing thread-local storage is not currently supported with -mpure-cod msgstr "" #: config/arm/arm.c:12526 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%K%s %wd out of range %wd - %wd" -msgstr "" +msgstr "operandinumero on arvoalueen ulkopuolella muotoilussa" #: config/arm/arm.c:12529 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%s %wd out of range %wd - %wd" -msgstr "" +msgstr "operandinumero on arvoalueen ulkopuolella muotoilussa" #: config/arm/arm.c:23958 #, gcc-internal-format @@ -31401,9 +31513,9 @@ msgid "expand_binop failed in movsi got" msgstr "" #: config/cris/cris.c:3935 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "emitting PIC operand, but PIC register isn%'t set up" -msgstr "" +msgstr "ensimmäinen argumentti" #. Definitions for GCC. Part of the machine description for CRIS. #. Copyright (C) 1998-2019 Free Software Foundation, Inc. @@ -31567,14 +31679,14 @@ msgid "media functions are not available unless -mmedia is used" msgstr "" #: config/frv/frv.c:9130 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "this media function is only available on the fr500" -msgstr "" +msgstr "#pragma redefine_extname ei ole tuettu tällä kohteella" #: config/frv/frv.c:9158 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "this media function is only available on the fr400 and fr550" -msgstr "" +msgstr "#pragma redefine_extname ei ole tuettu tällä kohteella" #: config/frv/frv.c:9177 #, fuzzy, gcc-internal-format @@ -31674,14 +31786,14 @@ msgid "-msx is not supported in coff" msgstr "Ei ole tuettu" #: config/h8300/h8300.c:351 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "-ms2600 is used without -ms" -msgstr "" +msgstr "PROCEDURE-lauseen kohdassa %C on oltava geneerisessä rajapinnassa" #: config/h8300/h8300.c:357 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "-mn is used without -mh or -ms or -msx" -msgstr "" +msgstr "PROCEDURE-lauseen kohdassa %C on oltava geneerisessä rajapinnassa" #: config/h8300/h8300.c:363 #, fuzzy, gcc-internal-format @@ -31694,9 +31806,9 @@ msgid "-mint32 is not supported for H8300 and H8300L targets" msgstr "%Jlohkoattribuutteja ei tueta tälle kohteelle" #: config/h8300/h8300.c:375 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "-mexr is used without -ms or -msx" -msgstr "" +msgstr "PROCEDURE-lauseen kohdassa %C on oltava geneerisessä rajapinnassa" #: config/h8300/h8300.c:381 #, gcc-internal-format @@ -31772,9 +31884,9 @@ msgid "%<-mtune=x86-64%> is deprecated; use %<-mtune=k8%> or %<-mtune=generic%> msgstr "%J%qD on tavallisesti ei-staattinen funktio" #: config/i386/i386.c:3540 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "% is deprecated; use % or % instead as appropriate" -msgstr "" +msgstr "%J%qD on tavallisesti ei-staattinen funktio" #. rep; movq isn't available in 32-bit code. #: config/i386/i386.c:3566 @@ -32185,9 +32297,9 @@ msgid "AVX vector return without AVX enabled changes the ABI" msgstr "" #: config/i386/i386.c:7295 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "SSE vector argument without SSE enabled changes the ABI" -msgstr "" +msgstr "muodostimen virheellinen käyttö mallina" #: config/i386/i386.c:7301 #, gcc-internal-format @@ -32220,9 +32332,9 @@ msgid "the ABI of passing structure with complex float member has changed in GCC msgstr "" #: config/i386/i386.c:7902 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "SSE register return with SSE disabled" -msgstr "" +msgstr "muodostimen virheellinen käyttö mallina" #: config/i386/i386.c:7908 #, fuzzy, gcc-internal-format @@ -32230,9 +32342,9 @@ msgid "SSE register argument with SSE disabled" msgstr "muodostimen virheellinen käyttö mallina" #: config/i386/i386.c:7924 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "x87 register return with x87 disabled" -msgstr "" +msgstr "muodostimen virheellinen käyttö mallina" #: config/i386/i386.c:8234 config/i386/i386.c:8476 config/i386/i386.c:8976 #, gcc-internal-format @@ -32255,9 +32367,9 @@ msgid "-mcall-ms2sysv-xlogues is not compatible with %s" msgstr "”%s”-liitännäinen on yhteensopiva." #: config/i386/i386.c:13139 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "ms_hook_prologue attribute isn%'t compatible with -mfentry for 32-bit" -msgstr "" +msgstr "ISO C kieltää sisäkkäiset funktiot" #: config/i386/i386.c:13229 #, gcc-internal-format @@ -32287,9 +32399,9 @@ msgid "'V' modifier on non-integer register" msgstr "" #: config/i386/i386.c:17498 config/i386/i386.c:17512 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "unsupported size for integer register" -msgstr "" +msgstr "fr30_print_operand: tuntematon koodi" #: config/i386/i386.c:17544 #, gcc-internal-format @@ -32307,9 +32419,9 @@ msgid "non-integer operand used with operand code 'z'" msgstr "epäkelvot operandit binääriselle %s-operaatiolle" #: config/i386/i386.c:28200 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "interrupt service routine can't be called directly" -msgstr "" +msgstr "keskeytyskäsittelijät eivät voi olla MIPS16-funktioita" #: config/i386/i386.c:29579 #, gcc-internal-format @@ -32448,9 +32560,9 @@ msgid "selector must be an integer constant in the range 0..%wi" msgstr "case-nimiö ei ole kokonaislukutyyppinen vakiolauseke" #: config/i386/i386.c:36545 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qE needs unknown isa option" -msgstr "" +msgstr "<%s> ja <%s> ovat virheellisiä nimiä välille" #: config/i386/i386.c:36549 #, fuzzy, gcc-internal-format @@ -32531,9 +32643,9 @@ msgid "interrupt service routine can only have a pointer argument and an optiona msgstr "" #: config/i386/i386.c:41238 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "interrupt service routine can't have non-void return value" -msgstr "" +msgstr "keskeytyskäsittelijät eivät voi olla MIPS16-funktioita" #: config/i386/i386.c:44101 #, fuzzy, gcc-internal-format @@ -32975,9 +33087,9 @@ msgid "%<-mgp32%> and %<-mfp64%> can only be combined if the target supports the msgstr "" #: config/mips/mips.c:19878 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-mgp32%> and %<-mfp64%> can only be combined when using the o32 ABI" -msgstr "" +msgstr "Valitsinta --acls voi käyttää vain POSIX-arkistoille" #: config/mips/mips.c:19899 #, fuzzy, gcc-internal-format @@ -33075,9 +33187,9 @@ msgid "%qs must be used with %qs" msgstr "Muodostin %qs" #: config/mips/mips.c:20162 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-mmsa%> must be used with %<-mfp64%> and %<-mhard-float%>" -msgstr "" +msgstr "-Wformat-y2k jätetty huomiotta ilman valitsinta -Wformat" #: config/mips/mips.c:20169 #, fuzzy, gcc-internal-format @@ -33100,9 +33212,9 @@ msgid "%<-mloongson-mmi%> must be used with %<-mhard-float%>" msgstr "-Wformat-y2k jätetty huomiotta ilman valitsinta -Wformat" #: config/mips/mips.c:20209 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<-mloongson-ext2%> must be used with %<-mloongson-ext%>" -msgstr "" +msgstr "-Wformat-y2k jätetty huomiotta ilman valitsinta -Wformat" #: config/mips/mips.c:20315 #, fuzzy, gcc-internal-format @@ -33151,9 +33263,9 @@ msgstr "kääntäjän sisäinen virhe. Virheellinen osoite:" #. Presumably there's a missing case above if we get here. #: config/mmix/mmix.c:1738 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "MMIX Internal: Missing %qc case in mmix_print_operand" -msgstr "" +msgstr "vakio tai tunniste odotettu" #: config/mmix/mmix.c:2023 #, gcc-internal-format @@ -33247,9 +33359,9 @@ msgid "Unrecognized MCU name '%s'." msgstr "Käyttö: %s [VALITSIN] NIMI...\n" #: config/msp430/msp430.c:871 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "-mlarge requires a 430X-compatible -mmcu=" -msgstr "" +msgstr "valitsin vaatii argumentin -- %s" #: config/msp430/msp430.c:874 #, fuzzy, gcc-internal-format @@ -33257,9 +33369,9 @@ msgid "-mcode-region=upper requires 430X-compatible cpu" msgstr "valitsin vaatii argumentin -- %s" #: config/msp430/msp430.c:876 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "-mdata-region=upper requires 430X-compatible cpu" -msgstr "" +msgstr "valitsin vaatii argumentin -- %s" #: config/msp430/msp430.c:1910 #, fuzzy, gcc-internal-format @@ -33431,9 +33543,9 @@ msgstr "sulkumerkkien käyttö laskulausekkeen ympärillä on suositeltavaa |-op #: config/nds32/nds32.c:3474 config/nds32/nds32.c:3481 #: config/nds32/nds32.c:3488 config/nds32/nds32.c:3495 #: config/nds32/nds32.c:3502 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "CCTL intrinsic function subtype out of range!" -msgstr "" +msgstr "sulkumerkkien käyttö laskulausekkeen ympärillä on suositeltavaa |-operandissa" #: config/nds32/nds32.c:3941 #, fuzzy, gcc-internal-format @@ -33521,9 +33633,9 @@ msgid "switch %<-mcustom-%s%> value %d must be between 0 and 255" msgstr "" #: config/nios2/nios2.c:1362 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "position-independent code requires the Linux ABI" -msgstr "" +msgstr "parametrilla %P on vaillinainen tyyppi %qT" #: config/nios2/nios2.c:1365 #, gcc-internal-format @@ -33556,14 +33668,14 @@ msgid "-mr0rel-sec= argument is not a valid regular expression." msgstr "etumerkillisen ja etumerkittömän kokonaislukulausekkeen vertailu" #: config/nios2/nios2.c:1416 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "BMX instructions are only supported with R2 architecture" -msgstr "" +msgstr "ISO C kieltää sisäkkäiset funktiot" #: config/nios2/nios2.c:1418 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "CDX instructions are only supported with R2 architecture" -msgstr "" +msgstr "ISO C kieltää sisäkkäiset funktiot" #: config/nios2/nios2.c:1423 #, fuzzy, gcc-internal-format @@ -33571,9 +33683,9 @@ msgid "R2 architecture is little-endian only" msgstr "Tuota koodia big-endian-tilassa" #: config/nios2/nios2.c:3593 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Cannot call %<__builtin_custom_%s%> without specifying switch %<-mcustom-%s%>" -msgstr "" +msgstr "valitsin -mcpu=%s on ristiriidassa valitsimen -march=%s kanssa" #: config/nios2/nios2.c:3701 #, gcc-internal-format, gfc-internal-format @@ -33581,9 +33693,9 @@ msgid "custom instruction opcode must be compile time constant in the range 0-25 msgstr "" #: config/nios2/nios2.c:3906 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Control register number must be in range 0-31 for %s" -msgstr "" +msgstr "{0} versio {1}" #: config/nios2/nios2.c:3934 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -33611,9 +33723,9 @@ msgid "switch %<-mcustom-%s%> conflicts with switch %<-mcustom-%s%>" msgstr "valitsin -mcpu=%s on ristiriidassa valitsimen -march=%s kanssa" #: config/nios2/nios2.c:4105 config/nios2/nios2.c:4115 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "call to %<__builtin_custom_%s%> conflicts with switch %<-mcustom-%s%>" -msgstr "" +msgstr "valitsin -mcpu=%s on ristiriidassa valitsimen -march=%s kanssa" #: config/nios2/nios2.c:4221 #, fuzzy, gcc-internal-format @@ -33621,9 +33733,9 @@ msgid "custom-fpu-cfg option does not support %" msgstr "%s ei tue: predicted_by_p" #: config/nios2/nios2.c:4226 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "custom-fpu-cfg option requires configuration argument" -msgstr "" +msgstr "%s ei tue: predicted_by_p" #: config/nios2/nios2.c:4255 #, fuzzy, gcc-internal-format @@ -34050,9 +34162,9 @@ msgid "%qs requires full ISA 3.0 support" msgstr "%s ei tue muotoilua %<%%%c%> %s" #: config/rs6000/rs6000.c:4437 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "unknown vectorization library ABI type (%qs) for %qs switch" -msgstr "" +msgstr "epäkelpo osoitintila %qs" #: config/rs6000/rs6000.c:4460 config/rs6000/rs6000.c:4475 #, fuzzy, gcc-internal-format @@ -34719,9 +34831,9 @@ msgid "builtin %qF requires -mvx (default with -march=z13 and higher)." msgstr "" #: config/s390/s390.c:818 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Builtin %qF requires z14 or higher." -msgstr "" +msgstr "%qs määritelty parametrille %qE" #: config/s390/s390.c:837 #, fuzzy, gcc-internal-format @@ -34820,9 +34932,9 @@ msgid "-mbackchain -mpacked-stack -mhard-float are not supported in combination" msgstr "" #: config/s390/s390.c:14921 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "stack size must be greater than the stack guard value" -msgstr "" +msgstr "kohdistuksen pitää olla kahden potenssi, ei %d" #: config/s390/s390.c:14923 #, fuzzy, gcc-internal-format @@ -35114,14 +35226,14 @@ msgid "bad amount of stack space removal: %d" msgstr "" #: config/v850/v850.c:2317 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "bogus JARL construction: %d" -msgstr "" +msgstr "Muodostin %qs" #: config/v850/v850.c:2615 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "bogus DISPOSE construction: %d" -msgstr "" +msgstr "Muodostin %qs" #: config/v850/v850.c:2634 #, gcc-internal-format, gfc-internal-format @@ -35129,9 +35241,9 @@ msgid "too much stack space to dispose of: %d" msgstr "" #: config/v850/v850.c:2736 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "bogus PREPEARE construction: %d" -msgstr "" +msgstr "Muodostin %qs" #: config/v850/v850.c:2753 #, gcc-internal-format, gfc-internal-format @@ -35254,9 +35366,9 @@ msgid "STABS debugging information for Ada is obsolete and not supported anymore msgstr "" #: ada/gcc-interface/trans.c:2027 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "subprogram %q+F not marked Inline_Always" -msgstr "" +msgstr "läpinäkymättömiä vektorityyppejä ei voida alustaa" #: ada/gcc-interface/trans.c:2028 ada/gcc-interface/trans.c:2034 #, fuzzy, gcc-internal-format @@ -35377,9 +35489,9 @@ msgid "unused variable %q+D" msgstr "käyttämätön muuttuja %q+D" #: c/c-decl.c:1303 cp/decl.c:686 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "variable %qD set but not used" -msgstr "sisäkkäisessä funktiossa käytetty rekisterimuuttujaa %qD" +msgstr "muuttuja %qD asetettu mutta käyttämätön" #: c/c-decl.c:1308 #, fuzzy, gcc-internal-format @@ -35589,9 +35701,9 @@ msgid "redefinition of parameter %q+D" msgstr "parametri %q+D määritelty uudelleen" #: c/c-decl.c:2443 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "redundant redeclaration of %q+D" -msgstr "luetellun tyypin jäsenen %q+D uudelleenesittely" +msgstr "tarpeeton %q+D:n uudelleenesittely" #: c/c-decl.c:2932 #, fuzzy, gcc-internal-format @@ -36241,7 +36353,7 @@ msgstr "funktion määrittely oikeuttaa tyhjän paluutyypin" #: c/c-decl.c:6612 cp/decl.c:11396 #, gcc-internal-format msgid "type qualifiers ignored on function return type" -msgstr "tyyppimääreet jätetään huomiotta funktion paluutyypissä" +msgstr "tyyppimääritteet jätetään huomiotta funktion paluutyypissä" #: c/c-decl.c:6650 c/c-decl.c:6859 c/c-decl.c:6913 c/c-decl.c:6997 #: c/c-decl.c:7118 c/c-parser.c:2849 @@ -36361,9 +36473,9 @@ msgstr "ISO C kieltää const- ja volatile-funktiotyypit" #. C99 6.7.2.1p8 #: c/c-decl.c:6930 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "a member of a structure or union cannot have a variably modified type" -msgstr "" +msgstr "odotettiin %qT, mutta argumentti on tyyppiä %qT" #: c/c-decl.c:6947 cp/decl.c:10119 #, gcc-internal-format @@ -36446,9 +36558,9 @@ msgid "non-nested function with variably modified type" msgstr "typedef %q+D määritelty uudelleen" #: c/c-decl.c:7254 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "object with variably modified type must have no linkage" -msgstr "" +msgstr "typedef %q+D määritelty uudelleen" #: c/c-decl.c:7345 c/c-decl.c:9014 #, gcc-internal-format @@ -37036,9 +37148,9 @@ msgid "%<#pragma omp declare reduction%> initializer refers to variable %qD whic msgstr "" #: c/c-fold.c:385 c/c-typeck.c:11840 cp/typeck.c:4794 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "left shift of negative value" -msgstr "vasemmalle siirron lukumäärä on negatiivinen" +msgstr "negatiivisen arvon siirto vasemmalle" #: c/c-fold.c:395 c/c-typeck.c:11849 cp/typeck.c:4802 #, gcc-internal-format @@ -37690,14 +37802,14 @@ msgid "ISO C forbids braced-groups within expressions" msgstr "ISO C kieltää lohkot lausekkeiden sisällä" #: c/c-parser.c:8215 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "ISO C does not support %<__FUNCTION__%> predefined identifier" -msgstr "ISO C ei tue kompleksikokonaiskulutyyppejä" +msgstr "ISO C ei tue esimääriteltyä %<__FUNCTION__%>-tunnistetta" #: c/c-parser.c:8224 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "ISO C does not support %<__PRETTY_FUNCTION__%> predefined identifier" -msgstr "ISO C ei tue kompleksikokonaiskulutyyppejä" +msgstr "ISO C ei tue esimääriteltyä %<__PRETTY_FUNCTION__%>-tunnistetta" #: c/c-parser.c:8233 #, fuzzy, gcc-internal-format @@ -37865,9 +37977,9 @@ msgid "using integer absolute value function %qD when argument is of complex typ msgstr "" #: c/c-parser.c:9411 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "taking the absolute value of unsigned type %qT has no effect" -msgstr "" +msgstr "%qE-attribuuttia ei huomioida %qE:lle" #: c/c-parser.c:9422 #, gcc-internal-format @@ -38363,9 +38475,9 @@ msgid "%<#pragma acc routine%> must be applied before definition" msgstr "#pragma GCC optimize ei ole sallittu funktioiden sisällä" #: c/c-parser.c:15905 cp/parser.c:38973 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<#pragma acc update%> must contain at least one % or % or % clause" -msgstr "" +msgstr "%Hdatamäärittelyllä ei ole tyyppiä eikä tallennusluokkaa" #: c/c-parser.c:16057 cp/parser.c:35526 #, fuzzy, gcc-internal-format @@ -38393,9 +38505,9 @@ msgid "%<#pragma omp atomic write%> incompatible with % or % msgstr "" #: c/c-parser.c:16146 cp/parser.c:35615 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<#pragma omp atomic update%> incompatible with % or % clauses" -msgstr "" +msgstr "%Hdatamäärittelyllä ei ole tyyppiä eikä tallennusluokkaa" #: c/c-parser.c:16412 cp/parser.c:35820 cp/parser.c:35846 #, fuzzy, gcc-internal-format @@ -38468,9 +38580,9 @@ msgid "not enough perfectly nested loops" msgstr "liian vähän argumentteja" #: c/c-parser.c:16982 cp/parser.c:37084 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "collapsed loops not perfectly nested" -msgstr "" +msgstr "liian vähän argumentteja" #: c/c-parser.c:17029 cp/parser.c:36882 cp/parser.c:36924 cp/pt.c:16615 #, fuzzy, gcc-internal-format @@ -38499,24 +38611,24 @@ msgid "expected %" msgstr "odotettiin %<,%> tai %<;%>" #: c/c-parser.c:18016 cp/parser.c:38063 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<#pragma omp target data%> with map-type other than %, %, % or % on % clause" -msgstr "" +msgstr "%Hdatamäärittelyllä ei ole tyyppiä eikä tallennusluokkaa" #: c/c-parser.c:18031 cp/parser.c:38078 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<#pragma omp target data%> must contain at least one % or % clause" -msgstr "" +msgstr "%Hdatamäärittelyllä ei ole tyyppiä eikä tallennusluokkaa" #: c/c-parser.c:18078 cp/parser.c:38303 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<#pragma omp target update%> must contain at least one % or % clauses" -msgstr "" +msgstr "%Hdatamäärittelyllä ei ole tyyppiä eikä tallennusluokkaa" #: c/c-parser.c:18150 cp/parser.c:38158 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<#pragma omp target enter data%> with map-type other than % or % on % clause" -msgstr "" +msgstr "%Hdatamäärittelyllä ei ole tyyppiä eikä tallennusluokkaa" #: c/c-parser.c:18162 cp/parser.c:38170 #, fuzzy, gcc-internal-format @@ -38524,9 +38636,9 @@ msgid "%<#pragma omp target enter data%> must contain at least one % claus msgstr "%Hdatamäärittelyllä ei ole tyyppiä eikä tallennusluokkaa" #: c/c-parser.c:18236 cp/parser.c:38247 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<#pragma omp target exit data%> with map-type other than %, % or % on % clause" -msgstr "" +msgstr "%Hdatamäärittelyllä ei ole tyyppiä eikä tallennusluokkaa" #: c/c-parser.c:18249 cp/parser.c:38260 #, fuzzy, gcc-internal-format @@ -38534,9 +38646,9 @@ msgid "%<#pragma omp target exit data%> must contain at least one % clause msgstr "%Hdatamäärittelyllä ei ole tyyppiä eikä tallennusluokkaa" #: c/c-parser.c:18468 cp/parser.c:38517 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<#pragma omp target%> with map-type other than %, %, % or % on % clause" -msgstr "" +msgstr "%Hdatamäärittelyllä ei ole tyyppiä eikä tallennusluokkaa" #: c/c-parser.c:18518 #, fuzzy, gcc-internal-format @@ -38559,14 +38671,14 @@ msgid "%<#pragma omp declare simd%> not immediately followed by a single functio msgstr "%Jvanhanmallinen funktiomäärittely" #: c/c-parser.c:18704 cp/parser.c:39164 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<#pragma omp declare target%> with clauses in between %<#pragma omp declare target%> without clauses and %<#pragma omp end declare target%>" -msgstr "" +msgstr "%Jluetellun tyypin jäsenen %qd uudelleenesittely" #: c/c-parser.c:18723 cp/parser.c:39183 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qD specified both in declare target % and % clauses" -msgstr "" +msgstr " alustettaessa funktion %2$qD argumenttia %1$P" #: c/c-parser.c:18764 cp/parser.c:39230 #, fuzzy, gcc-internal-format @@ -38669,9 +38781,9 @@ msgid "% clause used lexically after first % msgstr "" #: c/c-parser.c:19317 cp/parser.c:39836 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "% requires at least one clause" -msgstr "" +msgstr "%Hdatamäärittelyllä ei ole tyyppiä eikä tallennusluokkaa" #: c/c-parser.c:19336 #, fuzzy, gcc-internal-format @@ -38699,9 +38811,9 @@ msgid "% %qE has incomplete type" msgstr "parametrilla %u in vaillinainen tyyppi" #: c/c-parser.c:19780 cp/parser.c:40541 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<__transaction_cancel%> without transactional memory support enabled" -msgstr "" +msgstr "odotettiin %<,%> tai %<;%>" #: c/c-parser.c:19786 cp/parser.c:40547 #, fuzzy, gcc-internal-format @@ -38785,9 +38897,9 @@ msgid "can%'t mix operands of decimal float and other float types" msgstr "" #: c/c-typeck.c:1296 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "pointers to arrays with different qualifiers are incompatible in ISO C" -msgstr "tyypit eivät ole ihan yhteensopivia" +msgstr "osoittimet erimääritteisiin taulukoihin ovat epäyhteensopivia ISO C:ssä" #: c/c-typeck.c:1300 #, gcc-internal-format @@ -39003,9 +39115,9 @@ msgid "comparison between pointer and zero character constant" msgstr "osoittimen ja kokonaisluvun välinen vertailu" #: c/c-typeck.c:3841 c/c-typeck.c:3852 cp/typeck.c:4896 cp/typeck.c:4919 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "did you mean to dereference the pointer?" -msgstr "" +msgstr "oliko tarkoitus käyttää loogista negaatiota?" #: c/c-typeck.c:3872 #, gcc-internal-format @@ -39034,14 +39146,14 @@ msgid "arithmetic on pointer to an empty aggregate" msgstr "funktio-osoitinta käytetty laskutoimituksessa" #: c/c-typeck.c:4398 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%<~%> on a boolean expression" -msgstr "odotettiin lauseketta" +msgstr "%<~%> totuusarvolausekkeelle" #: c/c-typeck.c:4402 #, gcc-internal-format msgid "did you mean to use logical not?" -msgstr "" +msgstr "oliko tarkoitus käyttää loogista negaatiota?" #: c/c-typeck.c:4412 #, gcc-internal-format @@ -39104,9 +39216,9 @@ msgid "decrement of pointer to an incomplete type %qT" msgstr "ei voida vähentää osoitinta vaillinaiseen tyyppiin %qT" #: c/c-typeck.c:4703 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "taking address of expression of type %" -msgstr "" +msgstr "odotettiin lauseketta" #: c/c-typeck.c:4762 #, gcc-internal-format @@ -39289,9 +39401,9 @@ msgid "ISO C forbids conversion of object pointer to function pointer type" msgstr "ISO C kieltää objektiosoittimen muuntamisen funktio-osoitintyypiksi" #: c/c-typeck.c:5899 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "cast between incompatible function types from %qT to %qT" -msgstr "ei voi muuntaa tyyppiä %qT tyypiksi %qT" +msgstr "muunnos funktiotyypistä %qT epäyhteensopivaan funktiotyyppiin %qT" #: c/c-typeck.c:5986 #, gcc-internal-format @@ -39379,14 +39491,12 @@ msgid "return makes %q#v qualified function pointer from unqualified" msgstr "sijoitus hylkää kohdeosoitintyypin määreitä" #: c/c-typeck.c:6920 c/c-typeck.c:7117 c/c-typeck.c:7160 -#, fuzzy msgid "passing argument %d of %qE discards %qv qualifier from pointer target type" -msgstr "sijoitus hylkää kohdeosoitintyypin määreitä" +msgstr "%d. argumentti funktiolle %qE hylkää kohdeosoitintyypin %qv-määritteen" #: c/c-typeck.c:6922 c/c-typeck.c:7119 c/c-typeck.c:7162 -#, fuzzy msgid "assignment discards %qv qualifier from pointer target type" -msgstr "sijoitus hylkää kohdeosoitintyypin määreitä" +msgstr "sijoitus hylkää kohdeosoitintyypin %qv-määritteen" #: c/c-typeck.c:6924 c/c-typeck.c:7121 c/c-typeck.c:7164 #, fuzzy @@ -39394,9 +39504,8 @@ msgid "initialization discards %qv qualifier from pointer target type" msgstr "alustus hylkää kohdeosoitintyypin määreitä" #: c/c-typeck.c:6926 c/c-typeck.c:7123 c/c-typeck.c:7166 -#, fuzzy msgid "return discards %qv qualifier from pointer target type" -msgstr "palautus hylkää kohdeosoitintyypin määreitä" +msgstr "palautus hylkää kohdeosoitintyypin %qv-määritteen" #: c/c-typeck.c:6935 #, gcc-internal-format @@ -39404,9 +39513,9 @@ msgid "ISO C prohibits argument conversion to union type" msgstr "ISO C kieltää argumenttien muuntamisen unionityypiksi" #: c/c-typeck.c:7003 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "request for implicit conversion from %qT to %qT not permitted in C++" -msgstr "enum-muunnos palautuksessa on virheellistä C++-kielessä" +msgstr "implisiittinen muunnos tyypistä %qT tyyppiin %qT ei ole sallittu C++:ssa" #: c/c-typeck.c:7016 #, fuzzy, gcc-internal-format @@ -39755,9 +39864,9 @@ msgid "excess elements in union initializer" msgstr "ylimääräisiä alkioita union-alustimessa" #: c/c-typeck.c:10106 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "traditional C rejects initialization of unions" -msgstr "perinteinen C ei hyväksy automaattista koostealustusta" +msgstr "perinteinen C ei hyväksy unionien alustusta" #: c/c-typeck.c:10174 #, gcc-internal-format @@ -39812,7 +39921,7 @@ msgstr "yhteensopivuusvalitsin (jätetään huomiotta)" #: c/c-typeck.c:10752 #, gcc-internal-format msgid "% switch expression not converted to % in ISO C" -msgstr "" +msgstr "%-tyyppistä switch-lauseketta ei muunneta %-tyyppiin ISO C:ssä" #: c/c-typeck.c:10790 c/c-typeck.c:10798 #, gcc-internal-format @@ -40184,9 +40293,9 @@ msgid "%<_Atomic%> %qD in % clause" msgstr "muuttuja %qD esitelty uudelleen funktiona" #: c/c-typeck.c:14014 cp/semantics.c:6253 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "% clause step %qE is neither constant nor a parameter" -msgstr "" +msgstr "indeksoitu arvo ei ole taulukko eikä osoitin" #: c/c-typeck.c:14044 c/c-typeck.c:14534 cp/semantics.c:6340 #: cp/semantics.c:7310 @@ -40272,9 +40381,9 @@ msgid "%qE is not lvalue expression nor array section in % clause" msgstr "instanssimuuttuja %qE on esitelty yksityisenä" #: c/c-typeck.c:14273 cp/semantics.c:6974 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qE does not have % type in % clause with % dependence type" -msgstr "" +msgstr "% vain parametrina ei ole oikeutettu" #: c/c-typeck.c:14282 cp/semantics.c:6985 #, gcc-internal-format @@ -40370,9 +40479,9 @@ msgid "% clause must not be used together with % clause" msgstr "" #: c/c-typeck.c:14963 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "cannot use % with reverse storage order" -msgstr "" +msgstr "halutaan rekisterimuuttujan %qD osoite" #: c/c-typeck.c:14968 #, fuzzy, gcc-internal-format @@ -41085,9 +41194,9 @@ msgid "%qD writing to an object of non-trivially copyable type %#qT%s" msgstr "%qD kirjoittaa ei-triviaalisti-kopioitavaan tyyppiin %#qT%s" #: cp/call.c:8911 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qD writing to an object with a deleted copy constructor" -msgstr "" +msgstr "%qD siirtää ei-triviaalisti-kopioitavan tyyppisen %q#T-olion; käytä %:tä ja %:ä" #: cp/call.c:8922 #, fuzzy, gcc-internal-format @@ -41356,12 +41465,12 @@ msgstr "esitelty täällä" #: cp/class.c:1327 #, gcc-internal-format msgid "%qD inherits the %E ABI tag that %qT (used in its type) has" -msgstr "" +msgstr "%qD perii %E-ABI-tunnisteen, jota %qT käyttää (tyypissään)" #: cp/class.c:1334 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qT does not have the %E ABI tag that base %qT has" -msgstr "" +msgstr "%qD perii %E-ABI-tunnisteen, jota %qT käyttää (paluutyypissään)" #: cp/class.c:1342 #, fuzzy, gcc-internal-format @@ -41470,9 +41579,9 @@ msgid "%qD is too small to hold all values of %q#T" msgstr "%q+D on liian pieni sisältämään %q#T:n kaikkia arvoja" #: cp/class.c:3326 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "member %q+#D with constructor not allowed in union" -msgstr "" +msgstr "ei argumentteja" #: cp/class.c:3329 #, fuzzy, gcc-internal-format @@ -41480,9 +41589,9 @@ msgid "member %q+#D with destructor not allowed in union" msgstr "ei argumentteja" #: cp/class.c:3331 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "member %q+#D with copy assignment operator not allowed in union" -msgstr "" +msgstr "ei argumentteja" #: cp/class.c:3335 #, fuzzy, gcc-internal-format @@ -41830,9 +41939,9 @@ msgid "%q#T has virtual base classes" msgstr "%q#T ei ole luokka" #: cp/constexpr.c:524 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "% constructor does not have empty body" -msgstr "" +msgstr "epäkelvot operandit binääriselle %s-operaatiolle" #: cp/constexpr.c:630 #, fuzzy, gcc-internal-format @@ -42082,9 +42191,9 @@ msgid "unexpected expression %qE of kind %s" msgstr "vektoriylivuoto lausekkeessa" #: cp/constexpr.c:5127 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qE is not a constant expression because it refers to mutable subobjects of %qT" -msgstr "" +msgstr "taulukon %qD koko ei ole kokonaislukutyyppinen vakiolauseke" #: cp/constexpr.c:5136 #, fuzzy, gcc-internal-format @@ -42533,9 +42642,9 @@ msgid "left operand of comma operator has no effect" msgstr "pilkkulausekkeen vasemmalla operandilla ei ole vaikutusta" #: cp/cvt.c:1551 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "statement has no effect" -msgstr "lauseella ei ole vaikutusta" +msgstr "lause on vaikutukseton" #: cp/cvt.c:1555 #, fuzzy, gcc-internal-format @@ -42997,19 +43106,19 @@ msgid "-faligned-new=%d is not a power of two" msgstr "dwarfin versio %d ei ole tuettu" #: cp/decl.c:4735 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "member %q+#D with constructor not allowed in anonymous aggregate" -msgstr "" +msgstr "ei argumentteja" #: cp/decl.c:4738 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "member %q+#D with destructor not allowed in anonymous aggregate" -msgstr "" +msgstr "ei argumentteja" #: cp/decl.c:4741 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "member %q+#D with copy assignment operator not allowed in anonymous aggregate" -msgstr "" +msgstr "ei argumentteja" #: cp/decl.c:4760 #, fuzzy, gcc-internal-format @@ -43203,9 +43312,9 @@ msgid "name used in a GNU-style designated initializer for an array" msgstr "ISO C ei salli ylimääräisiä %<;%>-merkkejä funktion ulkopuolella" #: cp/decl.c:5426 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "name %qD used in a GNU-style designated initializer for an array" -msgstr "" +msgstr "ISO C ei salli ylimääräisiä %<;%>-merkkejä funktion ulkopuolella" #: cp/decl.c:5445 #, fuzzy, gcc-internal-format @@ -43399,9 +43508,9 @@ msgid "ISO C++17 does not allow % storage class specifier" msgstr "ISO C ei salli ylimääräisiä %<;%>-merkkejä funktion ulkopuolella" #: cp/decl.c:6920 cp/decl.c:12848 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "% storage class specifier used" -msgstr "tallennusluokka annettu %qs:lle" +msgstr "%-tallennusluokkamääritteen käyttö" #: cp/decl.c:6967 #, fuzzy, gcc-internal-format @@ -43424,14 +43533,14 @@ msgid "function %q#D is initialized like a variable" msgstr "funktio %q#D alustetaan kuin muuttuja" #: cp/decl.c:7392 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "cannot decompose class type %qT because it has an anonymous struct member" -msgstr "" +msgstr "%qE-attribuutti pätee vain muuttujiin" #: cp/decl.c:7395 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "cannot decompose class type %qT because it has an anonymous union member" -msgstr "" +msgstr "%qE-attribuutti pätee vain muuttujiin" #: cp/decl.c:7402 #, fuzzy, gcc-internal-format @@ -43439,14 +43548,14 @@ msgid "cannot decompose inaccessible member %qD of %qT" msgstr "perustyypin %qT kaksoiskappale virheellinen" #: cp/decl.c:7428 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "cannot decompose class type %qT: both it and its base class %qT have non-static data members" -msgstr "" +msgstr "%qE-attribuutti pätee vain muuttujiin" #: cp/decl.c:7437 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "cannot decompose class type %qT: its base classes %qT and %qT have non-static data members" -msgstr "" +msgstr "%qE-attribuutti pätee vain muuttujiin" #: cp/decl.c:7654 #, fuzzy, gcc-internal-format @@ -43525,9 +43634,9 @@ msgid "cannot decompose class type %qT without non-static data members" msgstr "%qE-attribuutti pätee vain muuttujiin" #: cp/decl.c:8276 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "non-local variable %qD declared %<__thread%> needs dynamic initialization" -msgstr "" +msgstr "Java-luokalla %qT ei voi olla implisiittistä epätriviaalia hajotinta" #: cp/decl.c:8279 #, fuzzy, gcc-internal-format @@ -44286,9 +44395,9 @@ msgid "storage class specifiers invalid in friend function declarations" msgstr "tallennusluokkatarkentimet virheellisiä parameteresittelyissä" #: cp/decl.c:11227 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "unnecessary parentheses in declaration of %qs" -msgstr "useita tallennusluokkia %qs:n esittelyssä" +msgstr "tarpeettomat sulkeet %qs:n esittelyssä" #: cp/decl.c:11276 #, fuzzy, gcc-internal-format @@ -44576,9 +44685,9 @@ msgid "template parameters cannot be friends" msgstr "strftime-muotoilut eivät voi muotoilla argumentteja" #: cp/decl.c:12123 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "friend declaration requires class-key, i.e. %" -msgstr "" +msgstr "luokkamäärittelyä ei voi esitellä ystäväksi" #: cp/decl.c:12127 #, fuzzy, gcc-internal-format @@ -44727,9 +44836,9 @@ msgid "%qE is neither function nor member function; cannot be declared friend" msgstr "sisäkkäinen funktio %qs esitelty %:ksi" #: cp/decl.c:12500 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "unnamed field is neither function nor member function; cannot be declared friend" -msgstr "" +msgstr "sisäkkäinen funktio %qs esitelty %:ksi" #: cp/decl.c:12545 #, fuzzy, gcc-internal-format @@ -44822,9 +44931,9 @@ msgid "static member %qD declared %" msgstr "jäsentä %qD ei voida esitellä sekä virtuaaliseksi että staattiseksi" #: cp/decl.c:12782 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "cannot explicitly declare member %q#D to have extern linkage" -msgstr "" +msgstr "jäsenfunktiota %qD ei voi kutsua ilman oliota" #: cp/decl.c:12790 #, fuzzy, gcc-internal-format @@ -44872,14 +44981,14 @@ msgid "parameter %qD invalidly declared method type" msgstr "parametri %qD virheellisesti esitelty metodityyppi" #: cp/decl.c:13134 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "parameter %qD includes pointer to array of unknown bound %qT" -msgstr "" +msgstr "virheellinen tyyppimuunnos funktiotyyppiin %qT" #: cp/decl.c:13136 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "parameter %qD includes reference to array of unknown bound %qT" -msgstr "" +msgstr "virheellinen tyyppimuunnos funktiotyyppiin %qT" #. [class.copy] #. @@ -45108,14 +45217,14 @@ msgid "derived union %qT invalid" msgstr "useita kenttiä unionissa %qT alustettu" #: cp/decl.c:14227 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%qT defined with multiple direct bases" -msgstr "%q+D on yleensä funktio" +msgstr "%qT määritelty monella suoralla kannoalla" #: cp/decl.c:14238 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%qT defined with direct virtual base" -msgstr "%q+D on yleensä funktio" +msgstr "%qT määritelty suoralla virtuaalisella kannalla" #: cp/decl.c:14263 #, fuzzy, gcc-internal-format @@ -45133,9 +45242,9 @@ msgid "duplicate base type %qT invalid" msgstr "perustyypin %qT kaksoiskappale virheellinen" #: cp/decl.c:14440 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "scoped/unscoped mismatch in enum %q#T" -msgstr "" +msgstr "tyyppitäsmäämättömyys taulukkoviitteessä" #: cp/decl.c:14443 cp/decl.c:14451 cp/decl.c:14461 cp/parser.c:18870 #, gcc-internal-format @@ -45148,9 +45257,9 @@ msgid "underlying type mismatch in enum %q#T" msgstr "tyyppitäsmäämättömyys taulukkoviitteessä" #: cp/decl.c:14458 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "different underlying type in enum %q#T" -msgstr "" +msgstr "tyyppitäsmäämättömyys taulukkoviitteessä" #: cp/decl.c:14531 #, fuzzy, gcc-internal-format @@ -45390,9 +45499,9 @@ msgid "width of bit-field %qD has non-integral type %qT" msgstr "bittikentän %qs leveys ei ole kokonaislukuvakio" #: cp/decl2.c:1490 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%q+D static data member inside of declare target directive" -msgstr "" +msgstr "staattinen jäsenfunktio %q#D esitelty tyyppimääreillä" #: cp/decl2.c:1557 #, fuzzy, gcc-internal-format @@ -45487,9 +45596,9 @@ msgid "%qT has a field %qD whose type uses the anonymous namespace" msgstr "" #: cp/decl2.c:2742 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qT declared with greater visibility than the type of its field %qD" -msgstr "" +msgstr "%qD esitelty uudelleen eri näkyvyydellä" #: cp/decl2.c:2760 #, gcc-internal-format @@ -45960,9 +46069,9 @@ msgid "uninitialized reference member in %q#T" msgstr "jäsen %qD on alustamaton viittaus" #: cp/init.c:1118 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%qD will be initialized after" -msgstr "%q+D alustetaan jäljempänä kuin" +msgstr "%qD alustetaan jäljempänä kuin" #: cp/init.c:1121 #, fuzzy, gcc-internal-format @@ -45975,9 +46084,9 @@ msgid " %q#D" msgstr " %q+#D" #: cp/init.c:1127 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid " base %qT" -msgstr "perustyypin %qT kaksoiskappale virheellinen" +msgstr " kanta %qT" #: cp/init.c:1129 #, gcc-internal-format @@ -46010,9 +46119,9 @@ msgid "class %qT does not have any field named %qD" msgstr "luokalla %qT ei ole %qD-nimistä kenttää" #: cp/init.c:1565 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%q#D is a static data member; it can only be initialized at its definition" -msgstr "" +msgstr "staattinen jäsenfunktio %q#D esitelty tyyppimääreillä" #: cp/init.c:1572 #, fuzzy, gcc-internal-format @@ -46020,9 +46129,9 @@ msgid "%q#D is not a non-static data member of %qT" msgstr "staattinen jäsenfunktio %q#D esitelty tyyppimääreillä" #: cp/init.c:1611 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "unnamed initializer for %qT, which has no base classes" -msgstr "" +msgstr "virheellinen alustin taulukon jäsenelle %q#D" #: cp/init.c:1619 #, gcc-internal-format @@ -46105,19 +46214,19 @@ msgid "uninitialized const member in base %q#T of %q#T" msgstr "alustamaton const-jäsen %qD" #: cp/init.c:2791 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "placement new constructing an object of type %<%T [%wu]%> and size %qwu in a region of type %qT and size %qwi" -msgstr "" +msgstr "%qD siirtää ei-triviaalisti-kopioitavan tyyppisen %q#T-olion; käytä %:tä ja %:ä" #: cp/init.c:2802 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "placement new constructing an array of objects of type %qT and size %qwu in a region of type %qT and size %qwi" -msgstr "" +msgstr "%qD siirtää ei-triviaalisti-kopioitavan tyyppisen %q#T-olion; käytä %:tä ja %:ä" #: cp/init.c:2813 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "placement new constructing an object of type %qT and size %qwu in a region of type %qT and size %qwi" -msgstr "" +msgstr "%qD siirtää ei-triviaalisti-kopioitavan tyyppisen %q#T-olion; käytä %:tä ja %:ä" #: cp/init.c:2960 #, fuzzy, gcc-internal-format @@ -46425,9 +46534,9 @@ msgid "non-static const member %q#D, can%'t use default assignment operator" msgstr "ei-staattinen datajäsen %qE esitelty %:ksi" #: cp/method.c:837 cp/method.c:1345 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "non-static reference member %q#D, can%'t use default assignment operator" -msgstr "" +msgstr "ei-staattinen datajäsen %qE esitelty %:ksi" #: cp/method.c:957 #, gcc-internal-format @@ -46476,9 +46585,9 @@ msgid "a lambda closure type has a deleted default constructor" msgstr "%J%qD on tavallisesti ei-staattinen funktio" #: cp/method.c:1799 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "a lambda closure type has a deleted copy assignment operator" -msgstr "" +msgstr "%J%qD on tavallisesti ei-staattinen funktio" #: cp/method.c:1808 #, gcc-internal-format @@ -47107,9 +47216,9 @@ msgid "a wide string is invalid in this context" msgstr "muotoilu on leveämerkkinen merkkijono" #: cp/parser.c:4350 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "unable to find character literal operator %qD with %qT argument" -msgstr "" +msgstr "epäkelvot operandit binääriselle %s-operaatiolle" #: cp/parser.c:4458 #, fuzzy, gcc-internal-format @@ -47152,9 +47261,9 @@ msgid "use -fext-numeric-literals to enable more built-in suffixes" msgstr "" #: cp/parser.c:4640 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "unable to find string literal operator %qD with %qT, %qT arguments" -msgstr "" +msgstr "epäkelvot operandit binääriselle %s-operaatiolle" #: cp/parser.c:4691 cp/parser.c:13367 #, fuzzy, gcc-internal-format @@ -47247,9 +47356,9 @@ msgid "declaration of %<~%T%> as member of %qT" msgstr "%<~%T%>:n esittely %qT:n jäsenenä" #: cp/parser.c:6187 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "typedef-name %qD used as destructor declarator" -msgstr "" +msgstr "%qD ei ole mallifunktio" #: cp/parser.c:6224 cp/parser.c:20953 #, fuzzy, gcc-internal-format @@ -47347,9 +47456,9 @@ msgid "types may not be defined in a new-expression" msgstr "uusia tyyppejä ei voi määritellä paluutyypissä" #: cp/parser.c:8679 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "array bound forbidden after parenthesized type-id" -msgstr "" +msgstr "taulukkoindeksi ei-taulukkoalustimessa" #: cp/parser.c:8681 #, gcc-internal-format @@ -47568,9 +47677,9 @@ msgid "range-based % expression of type %qT has incomplete type" msgstr "%Jparametrin %qD tyyppi on vaillinainen" #: cp/parser.c:12523 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "inconsistent begin/end types in range-based % statement: %qT and %qT" -msgstr "" +msgstr "odotettiin %qT, mutta argumentti on tyyppiä %qT" #: cp/parser.c:12668 cp/parser.c:29286 #, fuzzy, gcc-internal-format @@ -48458,9 +48567,9 @@ msgid "pure-specifier on function-definition" msgstr "pure-tarkenne funktiomäärittelyssä" #: cp/parser.c:24681 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "extra %<;%> after in-class function definition" -msgstr "Odotettiin :: TYPE-määrittelyssä kohdassa %C" +msgstr "ylimääräinen %<;%> luokansisäisen funktiomäärittelyn perässä" #: cp/parser.c:24728 #, gcc-internal-format @@ -48493,9 +48602,9 @@ msgid "more than one access specifier in base-specifier" msgstr "varoitus: lähdetiedosto %s annettu useammin kuin kerran" #: cp/parser.c:25025 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "keyword % not allowed outside of templates" -msgstr "" +msgstr "%<[*]%> ei ole esittelyssä" #: cp/parser.c:25028 #, gcc-internal-format @@ -48513,9 +48622,9 @@ msgid "ISO C++17 does not allow dynamic exception specifications" msgstr "%qs esitelty funktion palauttavana funktiona" #: cp/parser.c:25223 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "dynamic exception specifications are deprecated in C++11" -msgstr "%q+D:n edellinen esittely oli täällä" +msgstr "dynaamiset poikkeusmäärittelyt ovat vanhentuneita C++11:ssä" #: cp/parser.c:25267 #, fuzzy, gcc-internal-format @@ -49020,14 +49129,14 @@ msgid "atomic_cancel" msgstr "_Peru" #: cp/parser.c:40411 cp/semantics.c:9136 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<__transaction_relaxed%> without transactional memory support enabled" -msgstr "" +msgstr "odotettiin %<,%> tai %<;%>" #: cp/parser.c:40413 cp/semantics.c:9138 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<__transaction_atomic%> without transactional memory support enabled" -msgstr "" +msgstr "odotettiin %<,%> tai %<;%>" #: cp/parser.c:40607 #, gcc-internal-format @@ -49187,20 +49296,20 @@ msgid "members of an explicitly specialized class are defined without a template msgstr "" #: cp/pt.c:2629 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "explicit specialization of %qD outside its namespace must use a nested-name-specifier" -msgstr "" +msgstr "(mahdollisesti %qT:n määrittelyn perästä puuttuu puolipiste)" #. This was allowed in C++98, so only pedwarn. #: cp/pt.c:2634 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "explicit instantiation of %qD outside its namespace must use a nested-name-specifier" -msgstr "" +msgstr "%J%qD:n edellinen esittely oli täällä" #: cp/pt.c:2670 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "explicit specialization %q#D may be missing attributes" -msgstr "" +msgstr "(mahdollisesti %qT:n määrittelyn perästä puuttuu puolipiste)" #: cp/pt.c:2674 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -49313,14 +49422,14 @@ msgid "base initializer expansion %qT contains no parameter packs" msgstr "" #: cp/pt.c:3964 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "expansion pattern %qT contains no parameter packs" -msgstr "" +msgstr "Muuttujatyyppi on UNKNOWN sijoituksessa kohdassa %L" #: cp/pt.c:3966 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "expansion pattern %qE contains no parameter packs" -msgstr "" +msgstr "Muuttujatyyppi on UNKNOWN sijoituksessa kohdassa %L" #: cp/pt.c:4018 #, fuzzy, gcc-internal-format @@ -49656,9 +49765,9 @@ msgid " deduced conflicting types for parameter %qT (%qT and %qT)" msgstr "tyyppien %qT ja %qT välinen vertailu" #: cp/pt.c:6410 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid " deduced conflicting values for non-type parameter %qE (%qE and %qE)" -msgstr "" +msgstr "tyyppien %qT ja %qT välinen vertailu" #: cp/pt.c:6421 #, fuzzy, gcc-internal-format @@ -50061,9 +50170,9 @@ msgid "%qT resolves to %qT, which is is not a class type" msgstr "%qT ei ole luokka-, struct- eikä unionityyppi" #: cp/pt.c:15020 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "empty initializer in lambda init-capture" -msgstr "" +msgstr "tallennusluokka annettu parametrille %qs" #: cp/pt.c:15095 #, fuzzy, gcc-internal-format @@ -50651,9 +50760,9 @@ msgid "lambda in local class %q+T cannot capture variables from the enclosing co msgstr "" #: cp/semantics.c:3492 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "use of local variable with automatic storage from containing function" -msgstr "" +msgstr "poistettu funktio %q+D" #: cp/semantics.c:3494 #, fuzzy, gcc-internal-format @@ -51040,9 +51149,9 @@ msgid " declared here" msgstr "esitelty täällä" #: cp/tree.c:4005 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "the calling convention for %qT changes in -fabi-version=13 (GCC 8.2)" -msgstr "" +msgstr "%J%qD:n lohko on ristiriidassa edellisen esittelyn kanssa" #: cp/tree.c:4007 #, gcc-internal-format @@ -51280,9 +51389,9 @@ msgid "deprecated conversion from string constant to %qT" msgstr "vanhentunut tyyppimuunnos merkkijonovakiosta tyyppiin %qT" #: cp/typeck.c:2382 cp/typeck.c:2929 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "request for member %qD in %qE, which is of pointer type %qT (maybe you meant to use %<->%> ?)" -msgstr "" +msgstr "pyyntö jäsenen %qs käsittelyyn jossain, joka ei ole tietue tai unioni" #: cp/typeck.c:2386 cp/typeck.c:2933 #, fuzzy, gcc-internal-format @@ -51492,9 +51601,9 @@ msgid "the address of %qD will never be NULL" msgstr "%qD:n osoite ei tule koskaan olemaan NULL" #: cp/typeck.c:4290 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "the compiler can assume that the address of %qD will never be NULL" -msgstr "%qD:n osoite ei tule koskaan olemaan NULL" +msgstr "kääntäjä voi olettaa, että %qD:n osoite ei koskaan ole NULL" #: cp/typeck.c:4408 cp/typeck.c:4419 #, fuzzy, gcc-internal-format @@ -51635,9 +51744,9 @@ msgid "%<~%> on an expression of type bool" msgstr "odotettiin lauseketta" #: cp/typeck.c:6250 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "did you mean to use logical not (%)?" -msgstr "" +msgstr "oliko tarkoitus käyttää loogista negaatiota?" #: cp/typeck.c:6372 #, gcc-internal-format @@ -51700,9 +51809,9 @@ msgid "address requested for %qD, which is declared %" msgstr "halutaan globaalin rekisterimuuttujan %qD osoite" #: cp/typeck.c:6736 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "list-initializer for non-class type must not be parenthesized" -msgstr "" +msgstr "virheellinen alustin taulukon jäsenelle %q#D" #: cp/typeck.c:6748 #, fuzzy, gcc-internal-format @@ -51710,9 +51819,9 @@ msgid "expression list treated as compound expression in initializer" msgstr "luetellun tyypin jäsenen %qE arvo ei ole kokonaislukuvakio" #: cp/typeck.c:6752 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "expression list treated as compound expression in mem-initializer" -msgstr "" +msgstr "luetellun tyypin jäsenen %qE arvo ei ole kokonaislukuvakio" #: cp/typeck.c:6756 #, fuzzy, gcc-internal-format @@ -51785,9 +51894,8 @@ msgid "cast between incompatible function types from %qH to %qI" msgstr "ei voi muuntaa tyyppiä %qT tyypiksi %qT" #: cp/typeck.c:7595 -#, fuzzy msgid "cast between incompatible pointer to member types from %qH to %qI" -msgstr "erilaisten osoitintyyppien %qT ja %qT välisestä vertailusta puuttuu tyyppimuunnos" +msgstr "muunnos epäyhteensopivien jäsenosoitintyyppien %qH ja %qI välillä" #: cp/typeck.c:7616 cp/typeck.c:7798 #, fuzzy @@ -52179,9 +52287,9 @@ msgid "\t%#qD" msgstr "%s %d" #: cp/typeck2.c:436 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "definition of %q#T is not complete until the closing brace" -msgstr "" +msgstr "%qD ei ole luokka eikä nimiavaruus" #: cp/typeck2.c:439 #, fuzzy, gcc-internal-format @@ -52444,9 +52552,9 @@ msgid "with symbol %s is shadowing local symbol %s" msgstr "" #: d/dmd/expressionsem.c:385 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "variable __ctfe cannot be read at compile time" -msgstr "" +msgstr "Muuttuja %s ei voida liittää PURE-proseduuriin kohdassa %C" #: d/dmd/expressionsem.c:428 #, gcc-internal-format, gfc-internal-format @@ -52749,14 +52857,14 @@ msgid "function expected before (), not %s of type %s" msgstr "odotettiin %qT, mutta argumentti on tyyppiä %qT" #: d/dmd/expressionsem.c:3416 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "pure %s '%s' cannot call impure %s '%s'" -msgstr "" +msgstr "tyypillä %qE on virtuaalisia jäsenfunktioita" #: d/dmd/expressionsem.c:3422 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "@nogc %s '%s' cannot call non-@nogc %s '%s'" -msgstr "" +msgstr "tyypillä %qE on virtuaalisia jäsenfunktioita" #: d/dmd/expressionsem.c:3428 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -53152,9 +53260,9 @@ msgid "gfc_range_check(): Bad type" msgstr "vektoriylivuoto lausekkeessa" #: fortran/arith.c:608 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_arith_uminus(): Bad basic type" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/arith.c:642 #, fuzzy, gcc-internal-format @@ -53162,9 +53270,9 @@ msgid "gfc_arith_plus(): Bad basic type" msgstr "vektoriylivuoto lausekkeessa" #: fortran/arith.c:676 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_arith_minus(): Bad basic type" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/arith.c:711 #, fuzzy, gcc-internal-format @@ -53217,9 +53325,9 @@ msgid "gfc_compare_expr(): Bad basic type" msgstr "vektoriylivuoto lausekkeessa" #: fortran/arith.c:1589 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "eval_intrinsic(): Bad operator" -msgstr "" +msgstr " eikä %" #: fortran/arith.c:1642 #, gcc-internal-format @@ -53491,9 +53599,9 @@ msgid "Type-spec at %L cannot contain a deferred type parameter" msgstr "Automaattitaulukolla ”%s” kohdassa %L ei voi olla alustinta" #: fortran/array.c:1172 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Type-spec at %L cannot contain an asterisk for a type parameter" -msgstr "" +msgstr "Automaattitaulukolla ”%s” kohdassa %L ei voi olla alustinta" #: fortran/array.c:1190 #, gcc-internal-format, gfc-internal-format @@ -53546,14 +53654,14 @@ msgid "Different CHARACTER lengths (%ld/%ld) in array constructor at %L" msgstr "Odotettiin PARAMETER-symbolia kompleksivakiossa kohdassa %C" #: fortran/array.c:2188 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "spec_dimen_size(): Bad dimension" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/array.c:2247 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_ref_dimen_size(): Bad dimension" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/array.c:2251 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -53574,14 +53682,14 @@ msgid "gfc_ref_dimen_size(): Bad dimen_type" msgstr "vektoriylivuoto lausekkeessa" #: fortran/array.c:2441 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_array_dimen_size(): Bad dimension" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/array.c:2486 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_array_dimen_size(): Bad EXPR_ARRAY expr" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/array.c:2634 #, gcc-internal-format @@ -53791,9 +53899,9 @@ msgid "Array section with a vector subscript at %L shall not be the target of a msgstr "" #: fortran/check.c:1078 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "NULL pointer at %L is not permitted as actual argument of %qs intrinsic function" -msgstr "" +msgstr "ASYNCHRONOUS= määrite kohdassa %L täytyy olla alustuslauseke" #: fortran/check.c:1121 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -54067,9 +54175,9 @@ msgid "SIZE at %L must be positive" msgstr "%-arvon on oltava positiivinen" #: fortran/check.c:2728 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "The absolute value of SHIFT at %L must be less than or equal to SIZE at %L" -msgstr "" +msgstr "%s:n kohdassa %L täytyy olla INTEGER" #: fortran/check.c:2802 #, fuzzy, gcc-internal-format @@ -54117,14 +54225,14 @@ msgid "Argument types of %qs intrinsic at %L must match (%s/%s)" msgstr "Kääntäjänsisäisen ”%s”-funktion argumenttityyppien kohdassa %L on täsmättävä (%s/%s)" #: fortran/check.c:3229 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Different shape on dimension 1 for arguments %qs and %qs at %L for intrinsic matmul" -msgstr "" +msgstr "%<__builtin_args_info%>-funktion argumentti puuttuu" #: fortran/check.c:3248 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Different shape on dimension 2 for argument %qs and dimension 1 for argument %qs at %L for intrinsic matmul" -msgstr "" +msgstr "%<__builtin_args_info%>-funktion argumentti puuttuu" #: fortran/check.c:3257 #, fuzzy, gcc-internal-format @@ -54152,9 +54260,9 @@ msgid "The TO argument to MOVE_ALLOC at %L shall not be coindexed" msgstr "%<__builtin_args_info%>-funktion argumentin pitää olla vakio" #: fortran/check.c:3611 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "The TO arguments in MOVE_ALLOC at %L must be polymorphic if FROM is polymorphic" -msgstr "" +msgstr "%<__builtin_args_info%>-funktion argumentin pitää olla vakio" #: fortran/check.c:3622 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -54232,9 +54340,9 @@ msgid "%qs argument of %qs intrinsic at %L has negative element (%d)" msgstr "kääntäjänsisäisen ”%2$s”-funktion argumentilla ”%1$s” kohdassa %3$L on negatiivinen alkio (%4$d)" #: fortran/check.c:4141 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Element %d of actual argument of RESHAPE at %L cannot be negative" -msgstr "" +msgstr "%qs ei ole kelpo tulostetiedosto" #: fortran/check.c:4179 #, fuzzy, gcc-internal-format @@ -54307,14 +54415,14 @@ msgid "%qs argument of %qs intrinsic at %L must be an interoperable data entity: msgstr "%<__builtin_expect%>-funktion toisen argumentin pitää olla vakio" #: fortran/check.c:4712 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Argument C_PTR_1 at %L to C_ASSOCIATED shall have the type TYPE(C_PTR) or TYPE(C_FUNPTR)" -msgstr "" +msgstr "%<__builtin_args_info%>-funktion argumentin pitää olla vakio" #: fortran/check.c:4726 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Argument C_PTR_2 at %L to C_ASSOCIATED shall have the same type as C_PTR_1: %s instead of %s" -msgstr "" +msgstr "%<__builtin_args_info%>-funktion argumentin pitää olla vakio" #: fortran/check.c:4750 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -54337,9 +54445,9 @@ msgid "Argument FPTR at %L to C_F_POINTER shall not be coindexed" msgstr "%<__builtin_args_info%>-funktion argumentin pitää olla vakio" #: fortran/check.c:4783 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Unexpected SHAPE argument at %L to C_F_POINTER with scalar FPTR" -msgstr "" +msgstr "Odottamatonta roskaa muodollisessa argumenttiluettelossa kohdassa %C" #: fortran/check.c:4789 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -54532,9 +54640,9 @@ msgid "Too many arguments to %s at %L" msgstr "Liikaa argumentteja funktiolle %s kohdassa %L" #: fortran/check.c:6010 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "fe_runtime_error string must be null terminated" -msgstr "" +msgstr "Sarakkeiden määrä : %d\n" #: fortran/check.c:6022 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -54542,9 +54650,9 @@ msgid "fe_runtime_error: Wrong number of arguments (%d instead of %d)" msgstr "Sarakkeiden määrä : %d\n" #: fortran/check.c:6062 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "COUNT argument to SYSTEM_CLOCK at %L has non-default kind" -msgstr "" +msgstr "Argumentin %s kohdassa %L on oltava pituudeltaan yksi" #: fortran/check.c:6081 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -54552,14 +54660,14 @@ msgid "Real COUNT_RATE argument to SYSTEM_CLOCK at %L" msgstr "Argumentin %s kohdassa %L on oltava pituudeltaan yksi" #: fortran/check.c:6091 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "COUNT_RATE argument to SYSTEM_CLOCK at %L has non-default kind" -msgstr "" +msgstr "Argumentin %s kohdassa %L on oltava pituudeltaan yksi" #: fortran/check.c:6108 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "COUNT_MAX argument to SYSTEM_CLOCK at %L has non-default kind" -msgstr "" +msgstr "Argumentin %s kohdassa %L on oltava pituudeltaan yksi" #: fortran/check.c:6325 #, fuzzy, gcc-internal-format @@ -54609,9 +54717,9 @@ msgid "non-constant array in DATA statement %L" msgstr "ei-vakio alustuslauseke kohdassa %L" #: fortran/data.c:140 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "failure to simplify substring reference in DATA statement at %L" -msgstr "" +msgstr "tyhjä esittely" #: fortran/data.c:173 #, gcc-internal-format, gfc-internal-format @@ -54814,9 +54922,9 @@ msgid "Procedure %qs defined in interface body at %L clashes with internal proce msgstr "Proseduuri ”%s” kohdassa %C on jo määritelty kohdassa %L" #: fortran/decl.c:1445 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Procedure %qs at %L must have the BIND(C) attribute to be C interoperable" -msgstr "" +msgstr "tyhjä esittely" #: fortran/decl.c:1472 #, gcc-internal-format @@ -54824,14 +54932,14 @@ msgid "Variable %qs at %L is a dummy argument to the BIND(C) procedure %qs but i msgstr "" #: fortran/decl.c:1479 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Variable %qs at %L is a dummy argument to the BIND(C) procedure %qs but is not C interoperable because it is polymorphic" -msgstr "" +msgstr "Liikaa argumentteja funktiolle %s kohdassa %L" #: fortran/decl.c:1486 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Variable %qs at %L is a dummy argument of the BIND(C) procedure %qs but may not be C interoperable" -msgstr "" +msgstr "Liikaa argumentteja funktiolle %s kohdassa %L" #: fortran/decl.c:1501 #, fuzzy, gcc-internal-format @@ -54849,9 +54957,9 @@ msgid "Variable %qs at %L with POINTER attribute in procedure %qs with BIND(C)" msgstr "Muuttujalla ”%s” kohdassa %L ei voi olla sekä POINTER- että BIND(C)-attribuutit" #: fortran/decl.c:1531 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Scalar variable %qs at %L with POINTER or ALLOCATABLE in procedure %qs with BIND(C) is not yet supported" -msgstr "" +msgstr "Muuttujalla ”%s” kohdassa %L ei voi olla sekä POINTER- että BIND(C)-attribuutit" #: fortran/decl.c:1540 #, fuzzy, gcc-internal-format @@ -54894,9 +55002,9 @@ msgid "The CHARACTER elements of the array constructor at %L must have the same msgstr "Taulukkomuodostimen CHARACTER-alkioiden kohdassa %L on oltava saman pituisia (%d/%d)" #: fortran/decl.c:1839 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Initializer not allowed for PARAMETER %qs at %C" -msgstr "" +msgstr "%s: paniikki: Virheellinen ”l_value” %d\n" #: fortran/decl.c:1849 #, gcc-internal-format, gfc-internal-format @@ -54909,9 +55017,9 @@ msgid "Variable %qs at %C with an initializer already appears in a DATA statemen msgstr "" #: fortran/decl.c:1902 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Cannot initialize parameter array at %L with variable length elements" -msgstr "" +msgstr "Alkio %s-taulukkomuodostimessa kohdassa %L on %s" #: fortran/decl.c:1971 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -55089,9 +55197,9 @@ msgid "The component with KIND or LEN attribute at %C does not not appear in the msgstr "kolme pistettä sisältävä parametriluettelo ei sovellu tyhjään parametrinimiluettelon esittelyyn" #: fortran/decl.c:2827 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "The component at %C that appears in the type parameter list at %L has neither the KIND nor LEN attribute" -msgstr "" +msgstr "kolme pistettä sisältävä parametriluettelo ei sovellu tyhjään parametrinimiluettelon esittelyyn" #: fortran/decl.c:2835 #, gcc-internal-format, gfc-internal-format @@ -55134,9 +55242,9 @@ msgid "Kind %d not supported for type %s at %C" msgstr "Vanhantyylinen esittely %s*%d ei ole tuettu kohdassa %C" #: fortran/decl.c:3079 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "C kind type parameter is for type %s but type at %L is %s" -msgstr "" +msgstr "Yhteensopimattomat tasot %d ja %d sijoituksessa kohdassa %L" #: fortran/decl.c:3090 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -55164,9 +55272,9 @@ msgid "Structure name expected after RECORD at %C" msgstr "Odotettiin nimetöntä rajapintaa kohdassa %C" #: fortran/decl.c:3552 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "The type parameter spec list at %C cannot contain both ASSUMED and DEFERRED parameters" -msgstr "" +msgstr "luetellun tyypin jäsenen %qE arvo ei ole kokonaislukuvakio" #: fortran/decl.c:3576 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -55194,9 +55302,9 @@ msgid "The value for the KIND parameter %qs at %C does not reduce to a constant msgstr "luetellun tyypin jäsenen %qE arvo ei ole kokonaislukuvakio" #: fortran/decl.c:3682 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "The type parameter spec list at %C contains too many parameter expressions" -msgstr "" +msgstr "luetellun tyypin jäsenen %qE arvo ei ole kokonaislukuvakio" #: fortran/decl.c:3691 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -55286,9 +55394,9 @@ msgid "IMPORT statement at %C only permitted in an INTERFACE body" msgstr "PRINT-lause kohdassa %C ei ole sallittu PURE-proseduurin sisällä" #: fortran/decl.c:4711 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "F2008: C1210 IMPORT statement at %C is not permitted in a module procedure interface body" -msgstr "" +msgstr "PRINT-lause kohdassa %C ei ole sallittu PURE-proseduurin sisällä" #: fortran/decl.c:4716 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -55446,9 +55554,9 @@ msgid "Type declaration %qs at %L is not C interoperable but it is BIND(C)" msgstr "BIND(C)-funktion ”%s” paluutyyppi kohdassa %L ei voi olla taulukko" #: fortran/decl.c:5680 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Variable %qs at %L may not be a C interoperable kind but it is BIND(C)" -msgstr "" +msgstr "BIND(C)-funktion ”%s” paluutyyppi kohdassa %L ei voi olla taulukko" #: fortran/decl.c:5692 #, gcc-internal-format @@ -55538,9 +55646,9 @@ msgid "ELEMENTAL prefix in MODULE PROCEDURE interface is missing at %L" msgstr "" #: fortran/decl.c:6197 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "PURE prefix in MODULE PROCEDURE interface is missing at %L" -msgstr "" +msgstr "Syntaksivirhe PROCEDURE-lauseessa kohdassa %C" #: fortran/decl.c:6204 #, gcc-internal-format, gfc-internal-format @@ -55588,9 +55696,9 @@ msgid "Mismatch in MODULE PROCEDURE formal argument names (%s/%s) at %C" msgstr "" #: fortran/decl.c:6406 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Mismatch in number of MODULE PROCEDURE formal arguments at %C" -msgstr "" +msgstr "Syntaksivirhe PROCEDURE-lauseessa kohdassa %C" #: fortran/decl.c:6445 #, gcc-internal-format, gfc-internal-format @@ -55770,9 +55878,9 @@ msgid "ENTRY statement at %L with BIND(C) prohibited in an elemental procedure" msgstr "DATA-lause kohdassa %C ei ole sallittu PURE-proseduurissa" #: fortran/decl.c:7660 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Alternate return dummy argument cannot appear in a SUBROUTINE with the BIND(C) attribute at %L" -msgstr "" +msgstr "ylivuoto vakiolausekkeessa" #: fortran/decl.c:7723 fortran/decl.c:7730 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -56107,9 +56215,9 @@ msgid "%qs in EXTENDS expression at %C is not a derived type" msgstr "" #: fortran/decl.c:9656 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qs cannot be extended at %C because it is BIND(C)" -msgstr "" +msgstr "Muuttujalla ”%s” kohdassa %L ei voi olla sekä POINTER- että BIND(C)-attribuutit" #: fortran/decl.c:9663 #, gcc-internal-format @@ -56292,9 +56400,9 @@ msgid "%<)%> expected at %C" msgstr "Odotettiin merkkiä ”,” kohdassa %C" #: fortran/decl.c:10774 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Interface must be specified for DEFERRED binding at %C" -msgstr "" +msgstr "Syntaksivirhe CASE-spesifikaatiossa kohdassa %C" #: fortran/decl.c:10779 #, gcc-internal-format, gfc-internal-format @@ -56332,9 +56440,9 @@ msgid "Type %qs containing DEFERRED binding at %C is not ABSTRACT" msgstr "" #: fortran/decl.c:10862 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "There is already a procedure with binding name %qs for the derived type %qs at %C" -msgstr "" +msgstr "%J%qD:lle ei ole aiempaa esittelyä" #: fortran/decl.c:10913 #, gcc-internal-format, gfc-internal-format @@ -56392,9 +56500,9 @@ msgid "FINAL declaration at %C must be inside a derived type CONTAINS section" msgstr "" #: fortran/decl.c:11143 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Derived type declaration with FINAL at %C must be in the specification part of a MODULE" -msgstr "" +msgstr "PROTECTED kohdassa %C on sallittu vain moduulin spesifikaatio-osassa" #: fortran/decl.c:11165 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -56467,9 +56575,9 @@ msgid "gfc_check_dependency: expecting an EXPR_VARIABLE" msgstr "" #: fortran/dump-parse-tree.c:201 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "show_array_spec(): Unhandled array shape type." -msgstr "" +msgstr "luodaan viitteiden taulukko" #: fortran/dump-parse-tree.c:280 #, fuzzy, gcc-internal-format @@ -56477,9 +56585,9 @@ msgid "show_array_ref(): Unknown array reference" msgstr "luodaan viitteiden taulukko" #: fortran/dump-parse-tree.c:329 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "show_ref(): Bad component code" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/dump-parse-tree.c:592 #, fuzzy, gcc-internal-format @@ -56492,9 +56600,9 @@ msgid "show_expr(): Don't know how to show expr" msgstr "" #: fortran/dump-parse-tree.c:2880 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "show_code_node(): Bad statement code" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/dump-parse-tree.c:3174 fortran/dump-parse-tree.c:3266 #, fuzzy, gcc-internal-format @@ -56547,9 +56655,9 @@ msgid "gfc_is_constant_expr(): Unknown expression type" msgstr "vektoriylivuoto lausekkeessa" #: fortran/expr.c:1213 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "simplify_intrinsic_op(): Bad operator" -msgstr "" +msgstr "ylivuoto vakiolausekkeessa" #: fortran/expr.c:1319 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -56597,19 +56705,19 @@ msgid "Numeric or CHARACTER operands are required in expression at %L" msgstr "Odotettiin PARAMETER-symbolia kompleksivakiossa kohdassa %C" #: fortran/expr.c:2418 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Concatenation operator in expression at %L must have two CHARACTER operands" -msgstr "" +msgstr "Sijoitusoperaattorirajapinta kohdassa %L ei saa määritellä uudelleen INTRINSIC-tyyppisijoitusta" #: fortran/expr.c:2425 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Concat operator at %L must concatenate strings of the same kind" -msgstr "" +msgstr "Lausekkeen CASE-lauseessa kohdassa %L on oltava skalaari" #: fortran/expr.c:2435 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid ".NOT. operator in expression at %L must have a LOGICAL operand" -msgstr "" +msgstr "Kääntäjänsisäisellä ”%s”-funktiolla kohdassa %L on oltava vähintään kaksi argumenttia" #: fortran/expr.c:2451 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -56762,9 +56870,9 @@ msgid "Incompatible ranks in %s (%d and %d) at %L" msgstr "Yhteensopimattomat tasot %d ja %d sijoituksessa kohdassa %L" #: fortran/expr.c:3428 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Different shape for %s at %L on dimension %d (%d and %d)" -msgstr "" +msgstr "%<__builtin_args_info%>-funktion argumentti puuttuu" #: fortran/expr.c:3476 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -56797,9 +56905,9 @@ msgid "NULL appears on right-hand side in assignment at %L" msgstr "Yhteensopimattomat tasot %d ja %d sijoituksessa kohdassa %L" #: fortran/expr.c:3580 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "POINTER-valued function appears on right-hand side of assignment at %L" -msgstr "" +msgstr "Yhteensopimattomat tasot %d ja %d sijoituksessa kohdassa %L" #: fortran/expr.c:3590 #, gcc-internal-format @@ -56972,14 +57080,14 @@ msgid "Different ranks in pointer assignment at %L" msgstr "Yhteensopimattomat tasot %d ja %d sijoituksessa kohdassa %L" #: fortran/expr.c:4069 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Rank remapping target is smaller than size of the pointer (%ld < %ld) at %L" -msgstr "" +msgstr "Virheellinen proseduuriosoitinsijoitus kohdassa %L" #: fortran/expr.c:4082 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Rank remapping target must be rank 1 or simply contiguous at %L" -msgstr "" +msgstr "Virheellinen proseduuriosoitinsijoitus kohdassa %L" #: fortran/expr.c:4086 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -57307,9 +57415,9 @@ msgid "Expecting % at %C" msgstr "Odottamaton %s-lause INTERFACE-lohkossa kohdassa %C" #: fortran/interface.c:619 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_compare_derived_types: invalid derived type" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/interface.c:888 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -57362,9 +57470,9 @@ msgid "Second argument of operator interface at %L must be INTENT(IN)" msgstr "kääntäjänsisäisen ”%2$s”-funktion argumentin ”%1$s” kohdassa %3$L ei voi olla INTENT(IN)" #: fortran/interface.c:1099 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Operator interface at %L conflicts with intrinsic interface" -msgstr "" +msgstr "kääntäjänsisäisen ”%2$s”-funktion argumentin ”%1$s” kohdassa %3$L on väärä määrä alkioita (%4$d/%5$d)" #: fortran/interface.c:1455 fortran/interface.c:1514 #, gcc-internal-format, gfc-internal-format @@ -57472,9 +57580,9 @@ msgid "Type mismatch in argument %qs at %L; passed %s to %s" msgstr " alustettaessa funktion %2$qD argumenttia %1$P" #: fortran/interface.c:2325 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Assumed-type actual argument at %L requires that dummy argument %qs is of assumed type" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/interface.c:2341 #, fuzzy, gcc-internal-format @@ -57542,9 +57650,9 @@ msgid "Element of assumed-shaped or pointer array passed to array dummy argument msgstr "tyhjä esittely" #: fortran/interface.c:2567 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Extension: Scalar non-default-kind, non-C_CHAR-kind CHARACTER actual argument with array dummy argument %qs at %L" -msgstr "" +msgstr "tyhjä esittely" #: fortran/interface.c:2575 #, fuzzy, gcc-internal-format @@ -57602,14 +57710,14 @@ msgid "Actual argument at %L to assumed-type dummy is of derived type with type- msgstr "" #: fortran/interface.c:3058 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Character length mismatch (%ld/%ld) between actual argument and pointer or allocatable dummy argument %qs at %L" -msgstr "" +msgstr "liikaa argumentteja funktiolle %s %q+#D" #: fortran/interface.c:3066 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Character length mismatch (%ld/%ld) between actual argument and assumed-shape dummy argument %qs at %L" -msgstr "" +msgstr "liikaa argumentteja funktiolle %s %q+#D" #: fortran/interface.c:3080 #, gcc-internal-format @@ -57622,9 +57730,9 @@ msgid "Character length of actual argument shorter than of dummy argument %qs (% msgstr "liikaa argumentteja funktiolle %s %q+#D" #: fortran/interface.c:3107 fortran/interface.c:3112 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Actual argument contains too few elements for dummy argument %qs (%lu/%lu) at %L" -msgstr "" +msgstr "liikaa argumentteja funktiolle %s %q+#D" #: fortran/interface.c:3132 #, fuzzy, gcc-internal-format @@ -57667,9 +57775,9 @@ msgid "Coindexed ASYNCHRONOUS or VOLATILE actual argument at %L requires that du msgstr "" #: fortran/interface.c:3232 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Coindexed actual argument at %L with allocatable ultimate component to dummy %qs requires either VALUE or INTENT(IN)" -msgstr "" +msgstr "Varsinaisen argumentin kohteelle ”%s” on oltava osoitin kohdassa %L" #: fortran/interface.c:3244 #, fuzzy, gcc-internal-format @@ -57707,9 +57815,9 @@ msgid "Missing actual argument for argument %qs at %L" msgstr "liikaa argumentteja funktiolle %s %q+#D" #: fortran/interface.c:3490 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "compare_actual_expr(): Bad component code" -msgstr "" +msgstr " eikä %" #: fortran/interface.c:3519 #, gcc-internal-format @@ -57857,14 +57965,14 @@ msgid "%qs at %L must not be DEFERRED as it overrides a non-DEFERRED binding" msgstr "" #: fortran/interface.c:4583 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qs at %L overrides a PURE procedure and must also be PURE" -msgstr "" +msgstr "%s:n kohdassa %L täytyy olla INTEGER" #: fortran/interface.c:4592 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qs at %L overrides an ELEMENTAL procedure and must also be ELEMENTAL" -msgstr "" +msgstr "%qs esitelty funktion palauttavana funktiona" #: fortran/interface.c:4598 #, gcc-internal-format @@ -57887,9 +57995,9 @@ msgid "Result mismatch for the overriding procedure %qs at %L: %s" msgstr "Rajapintatäsmäämättömyys proseduuriosoitinsijoituksessa kohdassa %L: %s" #: fortran/interface.c:4637 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qs at %L overrides a PUBLIC procedure and must not be PRIVATE" -msgstr "" +msgstr "%s:n kohdassa %L täytyy olla INTEGER" #: fortran/interface.c:4667 #, gcc-internal-format @@ -57907,14 +58015,14 @@ msgid "%qs at %L must have the same number of formal arguments as the overridden msgstr "" #: fortran/interface.c:4697 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qs at %L overrides a NOPASS binding and must also be NOPASS" -msgstr "" +msgstr "%qs esitelty funktion palauttavana funktiona" #: fortran/interface.c:4708 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qs at %L overrides a binding with PASS and must also be PASS" -msgstr "" +msgstr "%s:n kohdassa %L täytyy olla INTEGER" #: fortran/interface.c:4715 #, gcc-internal-format @@ -57982,19 +58090,19 @@ msgid "Assumed-type argument at %L is not permitted as actual argument to the in msgstr "ASYNCHRONOUS= määrite kohdassa %L täytyy olla alustuslauseke" #: fortran/intrinsic.c:224 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Assumed-type argument at %L is only permitted as first actual argument to the intrinsic %s" -msgstr "" +msgstr "ASYNCHRONOUS= määrite kohdassa %L täytyy olla alustuslauseke" #: fortran/intrinsic.c:231 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Assumed-rank argument at %L is only permitted as actual argument to intrinsic inquiry functions" -msgstr "" +msgstr "ASYNCHRONOUS= määrite kohdassa %L täytyy olla alustuslauseke" #: fortran/intrinsic.c:238 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Assumed-rank argument at %L is only permitted as first actual argument to the intrinsic inquiry function %s" -msgstr "" +msgstr "ASYNCHRONOUS= määrite kohdassa %L täytyy olla alustuslauseke" #: fortran/intrinsic.c:286 #, fuzzy, gcc-internal-format @@ -58022,9 +58130,9 @@ msgid "Too many arguments in call to %qs at %L" msgstr "Liikaa argumentteja funktiolle %s kohdassa %L" #: fortran/intrinsic.c:4217 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "The argument list functions %%VAL, %%LOC or %%REF are not allowed in this context at %L" -msgstr "" +msgstr "Avainsana-argumentti ”%s” kohdassa %L ei ole proseduurissa" #: fortran/intrinsic.c:4220 #, fuzzy, gcc-internal-format @@ -58052,9 +58160,9 @@ msgid "Type of argument %qs in call to %qs at %L should be %s, not %s" msgstr "Liikaa argumentteja funktiokutsussa ”%s” kohdassa %L" #: fortran/intrinsic.c:4428 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "resolve_intrinsic(): Too many args for intrinsic" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/intrinsic.c:4531 #, gcc-internal-format @@ -58292,9 +58400,9 @@ msgid "FORMAT tag at %C cannot be a zero-sized array" msgstr "Muuttuja %s ei voida liittää PURE-proseduuriin kohdassa %C" #: fortran/io.c:1681 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "FORMAT tag at %L must be of type default-kind CHARACTER or of INTEGER" -msgstr "" +msgstr "Lauseke CASE-lauseessa kohdassa %L on oltava %s-tyyppinen" #: fortran/io.c:1687 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -58402,9 +58510,9 @@ msgid "ACTION type conflicts with READONLY specifier at %C" msgstr "" #: fortran/io.c:2207 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "ASYNCHRONOUS= at %C not allowed in Fortran 95" -msgstr "" +msgstr "CLOSE-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/io.c:2216 fortran/io.c:3843 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -58417,29 +58525,29 @@ msgid "ASYNCHRONOUS= specifier at %L must be scalar" msgstr "ASYNCHRONOUS= määrite kohdassa %L täytyy olla alustuslauseke" #: fortran/io.c:2243 fortran/io.c:3908 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "BLANK= at %C not allowed in Fortran 95" -msgstr "" +msgstr "CLOSE-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/io.c:2280 fortran/io.c:3884 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "DECIMAL= at %C not allowed in Fortran 95" -msgstr "" +msgstr "CLOSE-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/io.c:2318 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "ENCODING= at %C not allowed in Fortran 95" -msgstr "" +msgstr "CLOSE-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/io.c:2381 fortran/io.c:3957 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "ROUND= at %C not allowed in Fortran 95" -msgstr "" +msgstr "CLOSE-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/io.c:2420 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "SIGN= at %C not allowed in Fortran 95" -msgstr "" +msgstr "CLOSE-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/io.c:2503 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -58452,9 +58560,9 @@ msgid "NEWUNIT specifier must have FILE= or STATUS='scratch' at %C" msgstr "" #: fortran/io.c:2521 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "OPEN statement at %C must have UNIT or NEWUNIT specified" -msgstr "" +msgstr "UNIT-numeron CLOSE-lauseessa kohdassa %L täytyy olla epänegatiivinen" #: fortran/io.c:2668 #, gcc-internal-format, gfc-internal-format @@ -58532,9 +58640,9 @@ msgid "UNIT not specified at %L" msgstr "UNIT ei ole määritelty kohdassa %L" #: fortran/io.c:3299 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "UNIT specification at %L must be an INTEGER expression or a CHARACTER variable" -msgstr "" +msgstr "decltypen argumentin on oltava lauseke" #: fortran/io.c:3321 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -58643,14 +58751,14 @@ msgid "ASYNCHRONOUS= specifier at %L must be an initialization expression" msgstr "ASYNCHRONOUS= määrite kohdassa %L täytyy olla alustuslauseke" #: fortran/io.c:3933 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "PAD= at %C not allowed in Fortran 95" -msgstr "" +msgstr "CLOSE-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/io.c:4009 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "DELIM= at %C not allowed in Fortran 95" -msgstr "" +msgstr "CLOSE-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/io.c:4161 #, gcc-internal-format, gfc-internal-format @@ -58658,9 +58766,9 @@ msgid "PRINT namelist at %C is an extension" msgstr "" #: fortran/io.c:4183 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Comma after * at %C not allowed without I/O list" -msgstr "" +msgstr "Syntaksivirhe SAVE-lauseessa kohdassa %C" #: fortran/io.c:4359 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -58683,9 +58791,9 @@ msgid "IOLENGTH tag invalid in INQUIRE statement at %C" msgstr "Odotettiin muuttujaa READ-lauseessa kohdassa %C" #: fortran/io.c:4632 fortran/trans-io.c:1332 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "INQUIRE statement at %L cannot contain both FILE and UNIT specifiers" -msgstr "" +msgstr "UNIT-numeron CLOSE-lauseessa kohdassa %L täytyy olla epänegatiivinen" #: fortran/io.c:4639 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -58698,9 +58806,9 @@ msgid "UNIT number in INQUIRE statement at %L cannot be %d" msgstr "UNIT-numeron lauseessa kohdassa %L täytyy olla epänegatiivinen" #: fortran/io.c:4664 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "INQUIRE statement at %L requires a PENDING= specifier with the ID= specifier" -msgstr "" +msgstr "UNIT-numeron CLOSE-lauseessa kohdassa %L täytyy olla epänegatiivinen" #: fortran/io.c:4842 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -58713,9 +58821,9 @@ msgid "WAIT statement not allowed in PURE procedure at %C" msgstr "CLOSE-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/match.c:118 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_op2string(): Bad code" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/match.c:195 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -58808,9 +58916,9 @@ msgid "Syntax error in iterator at %C" msgstr "Syntaksivirhe iteraattorissa kohdassa %C" #: fortran/match.c:1241 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "gfc_match(): Bad match code %c" -msgstr "" +msgstr "lauseella ei ole vaikutusta" #: fortran/match.c:1315 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -59009,9 +59117,9 @@ msgid "EXIT statement at %C terminating !$ACC LOOP loop" msgstr "break-lause silmukan tai switch-rakenteen ulkopuolella" #: fortran/match.c:2860 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "CYCLE statement at %C to non-innermost collapsed !$ACC LOOP loop" -msgstr "" +msgstr "break-lause silmukan tai switch-rakenteen ulkopuolella" #: fortran/match.c:2889 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -59019,9 +59127,9 @@ msgid "EXIT statement at %C terminating !$OMP DO loop" msgstr "break-lause silmukan tai switch-rakenteen ulkopuolella" #: fortran/match.c:2894 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "CYCLE statement at %C to non-innermost collapsed !$OMP DO loop" -msgstr "" +msgstr "break-lause silmukan tai switch-rakenteen ulkopuolella" #: fortran/match.c:2979 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -59059,9 +59167,9 @@ msgid "STOP code at %L must be a scalar CHARACTER constant or digit[digit[digit[ msgstr "" #: fortran/match.c:3069 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "STOP code at %L must be either INTEGER or CHARACTER type" -msgstr "" +msgstr "Lausekkeen CASE-lauseessa kohdassa %L on oltava skalaari" #: fortran/match.c:3076 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -59236,9 +59344,9 @@ msgid "typespec in ALLOCATE at %L" msgstr "nimitietueelle ei voi varata muistia" #: fortran/match.c:4185 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "The type parameter spec list in the type-spec at %L cannot contain DEFERRED parameters" -msgstr "" +msgstr "luetellun tyypin jäsenen %qE arvo ei ole kokonaislukuvakio" #: fortran/match.c:4219 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -59246,19 +59354,19 @@ msgid "Bad allocate-object at %C for a PURE procedure" msgstr "%s-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/match.c:4234 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Incompatible allocate-object at %C for CHARACTER type-spec at %L" -msgstr "" +msgstr "%s-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/match.c:4256 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "ALLOCATE of coarray at %C in DO CONCURRENT block" -msgstr "" +msgstr "%s-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/match.c:4261 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "ALLOCATE of coarray at %C in CRITICAL block" -msgstr "" +msgstr "%s-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/match.c:4283 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -59271,9 +59379,9 @@ msgid "Type of entity at %L is type incompatible with typespec" msgstr "Jäsenfunktio %qs" #: fortran/match.c:4303 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Kind type parameter for entity at %L differs from the kind type parameter of the typespec" -msgstr "" +msgstr "luetellun tyypin jäsenen %qE arvo ei ole kokonaislukuvakio" #: fortran/match.c:4320 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -59296,9 +59404,9 @@ msgid "Redundant SOURCE tag found at %L" msgstr "" #: fortran/match.c:4393 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "SOURCE tag at %L conflicts with the typespec at %L" -msgstr "" +msgstr "SAVE-attribuuttia kohdassa %L ei voida määritellä PURE-proseduurissa" #: fortran/match.c:4399 #, gcc-internal-format, gfc-internal-format @@ -59316,9 +59424,9 @@ msgid "Redundant MOLD tag found at %L" msgstr "" #: fortran/match.c:4430 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "MOLD tag at %L conflicts with the typespec at %L" -msgstr "" +msgstr "SAVE-attribuuttia kohdassa %L ei voida määritellä PURE-proseduurissa" #: fortran/match.c:4456 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -59346,14 +59454,14 @@ msgid "Illegal allocate-object at %C for a PURE procedure" msgstr "%s-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/match.c:4639 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "DEALLOCATE of coarray at %C in DO CONCURRENT block" -msgstr "" +msgstr "%s-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/match.c:4646 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "DEALLOCATE of coarray at %C in CRITICAL block" -msgstr "" +msgstr "%s-lause ei ole sallittu PURE-proseduurissa kohdassa %C" #: fortran/match.c:4662 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -59484,9 +59592,9 @@ msgid "Attempt to indirectly overlap COMMON blocks %s and %s by EQUIVALENCE at % msgstr "" #: fortran/match.c:5597 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Expecting a comma in EQUIVALENCE at %C" -msgstr "" +msgstr "Odotettiin argumenttiluetteloa kohdassa %C" #: fortran/match.c:5602 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -59605,9 +59713,9 @@ msgid "Extension: Unary operator following arithmetic operator (use parentheses) msgstr "" #: fortran/matchexp.c:665 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "match_level_4(): Bad operator" -msgstr "" +msgstr " eikä %" #: fortran/misc.c:110 #, fuzzy, gcc-internal-format @@ -59620,9 +59728,9 @@ msgid "gfc_typename(): Undefined type" msgstr "rekursiivinen tyyppi %qT määrittelemätön" #: fortran/misc.c:196 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_code2string(): Bad code" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/module.c:236 #, gcc-internal-format @@ -59720,19 +59828,19 @@ msgid "unquote_string(): got bad string" msgstr "virheellinen merkkijonovakio" #: fortran/module.c:2725 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "mio_array_ref(): Unknown array ref" -msgstr "" +msgstr "luodaan viitteiden taulukko" #: fortran/module.c:4851 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Ambiguous !$OMP DECLARE REDUCTION from module %s at %L" -msgstr "" +msgstr "tyhjä esittely" #: fortran/module.c:4854 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Previous !$OMP DECLARE REDUCTION from module %s at %L" -msgstr "" +msgstr "tyhjä esittely" #: fortran/module.c:5048 #, gcc-internal-format @@ -59755,9 +59863,9 @@ msgid "User operator %qs referenced at %L not found in module %qs" msgstr "Taulukkoviite kohdassa %L on rajojen ulkopuolella (%ld < %ld) ulottuvuudessa %d" #: fortran/module.c:5418 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Intrinsic operator %qs referenced at %L not found in module %qs" -msgstr "" +msgstr "Taulukkoviite kohdassa %L on rajojen ulkopuolella (%ld < %ld) ulottuvuudessa %d" #: fortran/module.c:5653 #, gcc-internal-format @@ -59805,14 +59913,14 @@ msgid "import_iso_c_binding_module(): Unable to create symbol for %s" msgstr "" #: fortran/module.c:6450 fortran/module.c:6794 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "The symbol %qs, referenced at %L, is not in the selected standard" -msgstr "" +msgstr "Nimiö %d kohdassa %L on määritelty, mutta ei käytetty" #: fortran/module.c:6578 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Symbol %qs referenced at %L not found in intrinsic module ISO_C_BINDING" -msgstr "" +msgstr "Nimiö %d kohdassa %L on määritelty, mutta ei käytetty" #: fortran/module.c:6599 fortran/module.c:6632 fortran/module.c:6674 #, fuzzy, gcc-internal-format @@ -59835,9 +59943,9 @@ msgid "Use of the NUMERIC_STORAGE_SIZE named constant from intrinsic module ISO_ msgstr "" #: fortran/module.c:6923 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Symbol %qs referenced at %L not found in intrinsic module ISO_FORTRAN_ENV" -msgstr "" +msgstr "Nimiö %d kohdassa %L on määritelty, mutta ei käytetty" #: fortran/module.c:6949 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -59996,9 +60104,9 @@ msgid "WAIT clause at %L requires a scalar INTEGER expression" msgstr "decltypen argumentin on oltava lauseke" #: fortran/openmp.c:2220 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "ACC CACHE directive must be inside of loop %C" -msgstr "" +msgstr "ISO C kieltää sisäkkäiset funktiot" #: fortran/openmp.c:2251 #, fuzzy, gcc-internal-format @@ -60091,14 +60199,14 @@ msgid "Variable at %L mentioned multiple times in clauses of the same OMP DECLAR msgstr "" #: fortran/openmp.c:3077 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "OMP DECLARE TARGET COMMON at %L previously mentioned in LINK clause and later in TO clause" -msgstr "" +msgstr "Symboli ”%s” kohdassa %C on jo COMMON-lohkossa" #: fortran/openmp.c:3083 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "OMP DECLARE TARGET COMMON at %L previously mentioned in TO clause and later in LINK clause" -msgstr "" +msgstr "Symboli ”%s” kohdassa %C on jo COMMON-lohkossa" #: fortran/openmp.c:3087 #, gcc-internal-format, gfc-internal-format @@ -60276,9 +60384,9 @@ msgid "Implicitly declared subroutine %s used in !$OMP DECLARE REDUCTION at %L" msgstr "tyhjä esittely" #: fortran/openmp.c:3943 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "ORDERED clause parameter is less than COLLAPSE at %L" -msgstr "" +msgstr "% vain parametrina ei ole oikeutettu" #: fortran/openmp.c:3951 fortran/openmp.c:3962 fortran/resolve.c:10209 #: fortran/resolve.c:11489 @@ -60349,9 +60457,9 @@ msgid "Array %qs is not permitted in reduction at %L" msgstr "ylivuoto vakiolausekkeessa" #: fortran/openmp.c:4232 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Symbol %qs present on both FROM and TO clauses at %L" -msgstr "" +msgstr "Proseduuri ”%s” kohdassa %L ei voi olla perustyyppiä %s" #: fortran/openmp.c:4254 #, fuzzy, gcc-internal-format @@ -60485,9 +60593,9 @@ msgid "INTENT(IN) POINTER %qs in %s clause at %L" msgstr "Objekti ”%s” ei ole muuttuja kohdassa %L" #: fortran/openmp.c:4619 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "!$OMP DECLARE REDUCTION %s not found for type %s at %L" -msgstr "" +msgstr "tyhjä esittely" #: fortran/openmp.c:4645 #, gcc-internal-format, gfc-internal-format @@ -60565,9 +60673,9 @@ msgid "expr in !$OMP ATOMIC WRITE assignment var = expr must be scalar and canno msgstr "kääntäjänsisäiset ”!$OMP ATOMIC”-argumentit paitsi yksi eivät saa viitata kohteeseen ”%s” kohdassa %L" #: fortran/openmp.c:4977 fortran/openmp.c:5268 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "!$OMP ATOMIC CAPTURE capture statement must read from a scalar variable of intrinsic type at %L" -msgstr "" +msgstr "”!$OMP ATOMIC”-sijoituksen on oltava operaattori tai kääntäjänsisäinen oikealla puolella kohdassa %L" #: fortran/openmp.c:4992 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -60575,9 +60683,9 @@ msgid "!$OMP ATOMIC CAPTURE update statement must set a scalar variable of intri msgstr "”!$OMP ATOMIC”-sijoituksen on oltava operaattori tai kääntäjänsisäinen oikealla puolella kohdassa %L" #: fortran/openmp.c:4999 fortran/openmp.c:5275 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "!$OMP ATOMIC CAPTURE capture statement reads from different variable than update statement writes into at %L" -msgstr "" +msgstr "”!$OMP ATOMIC”-sijoituksen on oltava operaattori tai kääntäjänsisäinen oikealla puolella kohdassa %L" #: fortran/openmp.c:5015 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -60595,14 +60703,14 @@ msgid "!$OMP ATOMIC assignment must be var = var op expr or var = expr op var at msgstr "”!$OMP ATOMIC”-sijoituksen on oltava operaattori tai kääntäjänsisäinen oikealla puolella kohdassa %L" #: fortran/openmp.c:5119 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "!$OMP ATOMIC var = var op expr not mathematically equivalent to var = var op (expr) at %L" -msgstr "" +msgstr "”!$OMP ATOMIC”-sijoituksen on oltava operaattori tai kääntäjänsisäinen oikealla puolella kohdassa %L" #: fortran/openmp.c:5151 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "expr in !$OMP ATOMIC assignment var = var op expr must be scalar and cannot reference var at %L" -msgstr "" +msgstr "kääntäjänsisäiset ”!$OMP ATOMIC”-argumentit paitsi yksi eivät saa viitata kohteeseen ”%s” kohdassa %L" #: fortran/openmp.c:5175 #, gcc-internal-format, gfc-internal-format @@ -60715,9 +60823,9 @@ msgid "%s !$ACC LOOP loops not perfectly nested at %L" msgstr "" #: fortran/openmp.c:5803 fortran/openmp.c:5812 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "not enough DO loops for %s !$ACC LOOP at %L" -msgstr "" +msgstr "mahdollisia ikisilmukoita ei voi optimoida" #: fortran/openmp.c:5827 fortran/openmp.c:5834 #, gcc-internal-format, gfc-internal-format @@ -60755,9 +60863,9 @@ msgid "!$OMP DECLARE SIMD should refer to containing procedure %qs at %L" msgstr "" #: fortran/openmp.c:6134 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Variable other than OMP_PRIV or OMP_ORIG used in INITIALIZER clause of !$OMP DECLARE REDUCTION at %L" -msgstr "" +msgstr "tyhjä esittely" #: fortran/openmp.c:6142 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -60785,9 +60893,9 @@ msgid "Subroutine call with alternate returns in INITIALIZER clause of !$OMP DEC msgstr "tyhjä esittely" #: fortran/openmp.c:6234 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "One of actual subroutine arguments in INITIALIZER clause of !$OMP DECLARE REDUCTION must be OMP_PRIV at %L" -msgstr "" +msgstr "tyhjä esittely" #: fortran/openmp.c:6242 #, gcc-internal-format, gfc-internal-format @@ -61035,9 +61143,9 @@ msgid "SEQUENCE statement at %C must precede CONTAINS" msgstr "Syntaksivirhe VALUE-lauseessa kohdassa %C" #: fortran/parse.c:2888 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Already inside a CONTAINS block at %C" -msgstr "" +msgstr "ISO C kieltää sisäkkäiset funktiot" #: fortran/parse.c:3007 #, gcc-internal-format, gfc-internal-format @@ -61045,9 +61153,9 @@ msgid "Component %s at %L of type LOCK_TYPE must have a codimension or be a subc msgstr "" #: fortran/parse.c:3013 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Pointer component %s at %L has a noncoarray subcomponent of type LOCK_TYPE, which must have a codimension or be a subcomponent of a coarray" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/parse.c:3018 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -61055,9 +61163,9 @@ msgid "Allocatable component %s at %L of type LOCK_TYPE must have a codimension" msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/parse.c:3022 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Allocatable component %s at %L must have a codimension as it has a noncoarray subcomponent of type LOCK_TYPE" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/parse.c:3027 #, gcc-internal-format, gfc-internal-format @@ -61080,9 +61188,9 @@ msgid "Pointer component %s at %L has a noncoarray subcomponent of type EVENT_TY msgstr "" #: fortran/parse.c:3055 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Allocatable component %s at %L of type EVENT_TYPE must have a codimension" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/parse.c:3059 #, gcc-internal-format, gfc-internal-format @@ -61115,9 +61223,9 @@ msgid "Syntax error in nested structure declaration at %C" msgstr "Syntaksivirhe data-esittelyssä kohdassa %C" #: fortran/parse.c:3298 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "FINAL declaration at %C must be inside CONTAINS" -msgstr "" +msgstr "Syntaksivirhe VALUE-lauseessa kohdassa %C" #: fortran/parse.c:3306 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -61125,14 +61233,14 @@ msgid "Derived type definition at %C without components" msgstr "%qD on jo määritelty" #: fortran/parse.c:3322 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "PRIVATE statement at %C must precede structure components" -msgstr "" +msgstr "PRINT-lause kohdassa %C ei ole sallittu PURE-proseduurin sisällä" #: fortran/parse.c:3339 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "SEQUENCE statement at %C must precede structure components" -msgstr "" +msgstr "Syntaksivirhe VALUE-lauseessa kohdassa %C" #: fortran/parse.c:3345 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -61250,9 +61358,9 @@ msgid "End of nonblock DO statement at %C is within another block" msgstr "PRINT-lause kohdassa %C ei ole sallittu PURE-proseduurin sisällä" #: fortran/parse.c:4357 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "End of nonblock DO statement at %C is interwoven with another DO loop" -msgstr "" +msgstr "PRINT-lause kohdassa %C ei ole sallittu PURE-proseduurin sisällä" #: fortran/parse.c:4383 #, gcc-internal-format, gfc-internal-format @@ -61265,9 +61373,9 @@ msgid "CRITICAL block inside of OpenMP region at %C" msgstr "" #: fortran/parse.c:4410 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Statement label in END CRITICAL at %C does not match CRITICAL label" -msgstr "" +msgstr "Nimiö ”%s” kohdassa %C ei täsmää IF nimiön ”%s” kanssa" #: fortran/parse.c:4479 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -61310,9 +61418,9 @@ msgid "Expected DO loop at %C" msgstr "Odotettiin merkkiä ”,” kohdassa %C" #: fortran/parse.c:5022 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Redundant !$ACC END LOOP at %C" -msgstr "" +msgstr "" #: fortran/parse.c:5236 #, gcc-internal-format, gfc-internal-format @@ -61375,9 +61483,9 @@ msgid "Global name %qs at %L is already being used at %L" msgstr "Nimi ”%s” kohdassa %C on jo määritelty geneerisenä rajapintana kohdassa %L" #: fortran/parse.c:5832 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Blank BLOCK DATA at %C conflicts with prior BLOCK DATA at %L" -msgstr "" +msgstr "SAVE-attribuuttia kohdassa %L ei voida määritellä PURE-proseduurissa" #: fortran/parse.c:5858 #, gcc-internal-format, gfc-internal-format @@ -61513,9 +61621,9 @@ msgid "Real constant underflows its kind at %C" msgstr "liukulukuvakio esikääntäjän lausekkeessa" #: fortran/primary.c:738 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_range_check() returned bad value" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/primary.c:785 #, gcc-internal-format @@ -61573,9 +61681,9 @@ msgid "PARAMETER symbol in complex constant at %C" msgstr "Odotettiin PARAMETER-symbolia kompleksivakiossa kohdassa %C" #: fortran/primary.c:1307 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_match_sym_complex_part(): Bad type" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/primary.c:1314 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -61960,9 +62068,9 @@ msgid "Contained function %qs at %L has no IMPLICIT type" msgstr "Proseduuri ”%s” kohdassa %L ei voi olla perustyyppiä %s" #: fortran/resolve.c:597 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Result %qs of contained function %qs at %L has no IMPLICIT type" -msgstr "" +msgstr "Proseduuri ”%s” kohdassa %L ei voi olla perustyyppiä %s" #: fortran/resolve.c:623 #, fuzzy, gcc-internal-format @@ -62105,9 +62213,9 @@ msgid "The rank of the element in the structure constructor at %L does not match msgstr "Taulukkomuodostimen CHARACTER-alkioiden kohdassa %L on oltava saman pituisia (%d/%d)" #: fortran/resolve.c:1329 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "The element in the structure constructor at %L, for pointer component %qs, is %s but should be %s" -msgstr "" +msgstr "Taulukkomuodostimen CHARACTER-alkioiden kohdassa %L on oltava saman pituisia (%d/%d)" #: fortran/resolve.c:1395 #, gcc-internal-format @@ -62120,9 +62228,9 @@ msgid "Interface mismatch for procedure-pointer component %qs in structure const msgstr "tyhjä esittely" #: fortran/resolve.c:1446 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "The element in the structure constructor at %L, for pointer component %qs should be a POINTER or a TARGET" -msgstr "" +msgstr "Taulukkomuodostimen CHARACTER-alkioiden kohdassa %L on oltava saman pituisia (%d/%d)" #: fortran/resolve.c:1475 #, gcc-internal-format @@ -62195,9 +62303,9 @@ msgid "ELEMENTAL non-INTRINSIC procedure %qs is not allowed as an actual argumen msgstr "Virheellinen proseduuriargumentti kohdassa %L" #: fortran/resolve.c:1989 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Unable to find a specific INTRINSIC procedure for the reference %qs at %L" -msgstr "" +msgstr "%J%qD:lle ei ole aiempaa esittelyä" #: fortran/resolve.c:2011 #, fuzzy, gcc-internal-format @@ -62265,9 +62373,9 @@ msgid "Generic function %qs at %L is not consistent with a specific intrinsic in msgstr "Luontaisella ”%s” kohdassa %L ei voi olla alustinta" #: fortran/resolve.c:2753 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Function %qs at %L is INTRINSIC but is not compatible with an intrinsic" -msgstr "" +msgstr "Luontaisella ”%s” kohdassa %L ei voi olla alustinta" #: fortran/resolve.c:2808 #, fuzzy, gcc-internal-format @@ -62361,9 +62469,9 @@ msgid "There is no specific subroutine for the generic %qs at %L" msgstr "%J%qD:lle ei ole aiempaa esittelyä" #: fortran/resolve.c:3441 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Generic subroutine %qs at %L is not consistent with an intrinsic subroutine interface" -msgstr "" +msgstr "Luontaisella ”%s” kohdassa %L ei voi olla alustinta" #: fortran/resolve.c:3476 #, gcc-internal-format @@ -62401,9 +62509,9 @@ msgid "Shapes for operands at %L and %L are not conformable" msgstr "attribuutit fastcall ja cdecl eivät ole yhteensopivia" #: fortran/resolve.c:3757 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "logical_to_bitwise(): Bad intrinsic" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/resolve.c:3860 #, fuzzy, gcc-internal-format @@ -62491,9 +62599,9 @@ msgid "Coindex rank mismatch in array reference at %L (%d/%d)" msgstr "ehtolausekkeessa on tyyppiristiriita" #: fortran/resolve.c:4592 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Coindex of codimension %d must be a scalar at %L" -msgstr "" +msgstr "Arvo sallitun välin ulkopuolella." #: fortran/resolve.c:4620 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -62581,9 +62689,9 @@ msgid "resolve_ref(): Bad array reference" msgstr "luodaan viitteiden taulukko" #: fortran/resolve.c:5135 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Component to the right of a part reference with nonzero rank must not have the POINTER attribute at %L" -msgstr "" +msgstr "Argumentilla ”%s”/”%s” PASS(%s) kohdassa %L ei voi olla POINTER-attribuuttia" #: fortran/resolve.c:5145 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -62591,9 +62699,9 @@ msgid "Component to the right of a part reference with nonzero rank must not hav msgstr "Argumentilla ”%s”/”%s” PASS(%s) kohdassa %L ei voi olla POINTER-attribuuttia" #: fortran/resolve.c:5165 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Two or more part references with nonzero rank must not be specified at %L" -msgstr "" +msgstr "Argumentilla ”%s”/”%s” PASS(%s) kohdassa %L ei voi olla POINTER-attribuuttia" #: fortran/resolve.c:5263 #, gcc-internal-format @@ -62629,9 +62737,9 @@ msgstr "muuttuvakokoista objektia ei voi alustaa" #. that the function-name resolution happens too late in that #. function. #: fortran/resolve.c:5390 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Assumed-rank variable %s at %L as actual argument to an inquiry function shall be the first argument" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/resolve.c:5401 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -62679,9 +62787,9 @@ msgid "Base object for procedure-pointer component call at %L is of ABSTRACT typ msgstr "" #: fortran/resolve.c:6088 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Base object for type-bound procedure call at %L is of ABSTRACT type %qs" -msgstr "" +msgstr "FINAL-proseduurin argumentin kohdassa %L täytyy olla tyyppiä ”%s”" #: fortran/resolve.c:6097 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -62795,9 +62903,9 @@ msgid "Source-expr at %L and allocate-object at %L must have the same shape" msgstr "" #: fortran/resolve.c:7576 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Type of entity at %L is type incompatible with source-expr at %L" -msgstr "" +msgstr "Jäsenfunktio %qs" #: fortran/resolve.c:7588 #, gcc-internal-format, gfc-internal-format @@ -62875,24 +62983,24 @@ msgid "ERRMSG at %L is useless without a STAT tag" msgstr "" #: fortran/resolve.c:7913 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "ERRMSG variable at %L shall be a scalar default CHARACTER variable" -msgstr "" +msgstr "decltypen argumentin on oltava lauseke" #: fortran/resolve.c:7936 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Errmsg-variable at %L shall not be %sd within the same %s statement" -msgstr "" +msgstr "Odotettiin muuttujaa READ-lauseessa kohdassa %C" #: fortran/resolve.c:7966 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Allocate-object at %L also appears at %L" -msgstr "" +msgstr "Argumentti ”%s”/”%s” PASS(%s) kohdassa %L ei voi olla ALLOCATABLE" #: fortran/resolve.c:7972 fortran/resolve.c:7978 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Allocate-object at %L is subobject of object at %L" -msgstr "" +msgstr "Argumentti ”%s”/”%s” PASS(%s) kohdassa %L ei voi olla ALLOCATABLE" #. The cases overlap, or they are the same #. element in the list. Either way, we must @@ -62949,14 +63057,14 @@ msgid "Logical range in CASE statement at %L is not allowed" msgstr "Lauseke CASE-lauseessa kohdassa %L on oltava %s-tyyppinen" #: fortran/resolve.c:8482 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Constant logical value in CASE statement is repeated at %L" -msgstr "" +msgstr "Lauseke CASE-lauseessa kohdassa %L on oltava %s-tyyppinen" #: fortran/resolve.c:8497 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Range specification at %L can never be matched" -msgstr "" +msgstr "Tämä pikanäppäin on jo käytössä toiminnolle %s" #: fortran/resolve.c:8600 #, gcc-internal-format, gfc-internal-format @@ -63014,9 +63122,9 @@ msgid "Unexpected intrinsic type %qs at %L" msgstr "tyhjä esittely" #: fortran/resolve.c:9039 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "The type-spec at %L shall specify that each length type parameter is assumed" -msgstr "" +msgstr "Automaattitaulukolla ”%s” kohdassa %L ei voi olla alustinta" #: fortran/resolve.c:9286 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -63039,19 +63147,19 @@ msgid "Data transfer element at %L cannot be polymorphic unless it is processed msgstr "" #: fortran/resolve.c:9456 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Data transfer element at %L cannot have POINTER components unless it is processed by a defined input/output procedure" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/resolve.c:9465 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Data transfer element at %L cannot have procedure pointer components" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/resolve.c:9472 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Data transfer element at %L cannot have ALLOCATABLE components unless it is processed by a defined input/output procedure" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/resolve.c:9483 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -63059,9 +63167,9 @@ msgid "Data transfer element at %L cannot have PRIVATE components" msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/resolve.c:9489 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Data transfer element at %L cannot have PRIVATE components unless it is processed by a defined input/output procedure" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/resolve.c:9504 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -63136,22 +63244,22 @@ msgid "GOTO statement at %L leaves CRITICAL construct for label at %L" msgstr "break-lause silmukan tai switch-rakenteen ulkopuolella" #: fortran/resolve.c:9776 fortran/resolve.c:9801 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "GOTO statement at %L leaves DO CONCURRENT construct for label at %L" -msgstr "" +msgstr "break-lause silmukan tai switch-rakenteen ulkopuolella" #. The label is not in an enclosing block, so illegal. This was #. allowed in Fortran 66, so we allow it as extension. No #. further checks are necessary in this case. #: fortran/resolve.c:9816 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Label at %L is not in the same block as the GOTO statement at %L" -msgstr "" +msgstr "Odotettiin muuttujaa READ-lauseessa kohdassa %C" #: fortran/resolve.c:9888 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "WHERE mask at %L has inconsistent shape" -msgstr "" +msgstr "Virheellinen proseduuriosoitinsijoitus kohdassa %L" #: fortran/resolve.c:9904 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -63184,9 +63292,9 @@ msgid "FORALL construct at %L" msgstr "Lohkonimiö ei ole sopiva IF-lauseelle kohdassa %C" #: fortran/resolve.c:10130 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "FORALL index-name at %L must be a scalar variable of type integer" -msgstr "" +msgstr "Lausekkeen CASE-lauseessa kohdassa %L on oltava skalaari" #: fortran/resolve.c:10140 #, gcc-internal-format, gfc-internal-format @@ -63194,9 +63302,9 @@ msgid "An outer FORALL construct already has an index with this name %L" msgstr "" #: fortran/resolve.c:10217 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "WHERE/ELSEWHERE clause at %L requires a LOGICAL array" -msgstr "" +msgstr "decltypen argumentin on oltava lauseke" #: fortran/resolve.c:10319 #, fuzzy, gcc-internal-format @@ -63276,9 +63384,9 @@ msgid "Variable %qs has not been assigned a target label at %L" msgstr "Muuttuja %s ei voida liittää PURE-proseduuriin kohdassa %C" #: fortran/resolve.c:11364 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Alternate RETURN statement at %L requires a SCALAR-INTEGER return specifier" -msgstr "" +msgstr "UNIT-numeron CLOSE-lauseessa kohdassa %L täytyy olla epänegatiivinen" #: fortran/resolve.c:11426 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -63306,9 +63414,9 @@ msgid "Exit condition of DO WHILE loop at %L must be a scalar LOGICAL expression msgstr "Lausekkeen CASE-lauseessa kohdassa %L on oltava skalaari" #: fortran/resolve.c:11622 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "FORALL mask clause at %L requires a scalar LOGICAL expression" -msgstr "" +msgstr "decltypen argumentin on oltava lauseke" #: fortran/resolve.c:11701 #, fuzzy, gcc-internal-format @@ -63393,14 +63501,14 @@ msgid "The module or main program array %qs at %L must have constant shape" msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/resolve.c:12349 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Entity with assumed character length at %L must be a dummy argument or a PARAMETER" -msgstr "" +msgstr "kääntäjänsisäisen ”%2$s”-funktion argumentin ”%1$s” kohdassa %3$L on oltava valemuuttuja" #: fortran/resolve.c:12370 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%qs at %L must have constant character length in this context" -msgstr "" +msgstr "Argumentin %s kohdassa %L on oltava pituudeltaan yksi" #: fortran/resolve.c:12377 #, fuzzy, gcc-internal-format @@ -63626,9 +63734,9 @@ msgid "%qs and %qs for GENERIC %qs at %L are ambiguous" msgstr "" #: fortran/resolve.c:13157 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Undefined specific binding %qs as target of GENERIC %qs at %L" -msgstr "" +msgstr "%J%qD:lle ei ole aiempaa esittelyä" #: fortran/resolve.c:13169 #, gcc-internal-format @@ -63696,9 +63804,9 @@ msgid "Procedure %qs at %L has the same name as an inherited component of %qs" msgstr "Proseduuri ”%s” kohdassa %L ei voi olla perustyyppiä %s" #: fortran/resolve.c:13678 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Derived-type %qs declared at %L must be ABSTRACT because %qs is DEFERRED and not overridden" -msgstr "" +msgstr "tyhjä esittely" #: fortran/resolve.c:13781 #, fuzzy, gcc-internal-format @@ -63716,9 +63824,9 @@ msgid "Component %qs at %L with coarray component shall be a nonpointer, nonallo msgstr "" #: fortran/resolve.c:13825 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Component %qs at %L has the CONTIGUOUS attribute but is not an array pointer" -msgstr "" +msgstr "Muuttujalla ”%s” kohdassa %L ei voi olla sekä POINTER- että BIND(C)-attribuutit" #: fortran/resolve.c:13836 #, fuzzy, gcc-internal-format @@ -63771,9 +63879,9 @@ msgid "Character component %qs of %qs at %L with deferred length must be a POINT msgstr "" #: fortran/resolve.c:14091 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "the component %qs is a PRIVATE type and cannot be a component of %qs, which is PUBLIC at %L" -msgstr "" +msgstr "Proseduuri ”%s” kohdassa %L ei voi olla perustyyppiä %s" #: fortran/resolve.c:14099 #, gcc-internal-format, gfc-internal-format @@ -63796,9 +63904,9 @@ msgid "As extending type %qs at %L has a coarray component, parent type %qs shal msgstr "" #: fortran/resolve.c:14248 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Non-extensible derived-type %qs at %L must not be ABSTRACT" -msgstr "" +msgstr "tyhjä esittely" #: fortran/resolve.c:14312 #, fuzzy, gcc-internal-format @@ -63831,9 +63939,9 @@ msgid "NAMELIST array object %qs with nonconstant shape in namelist %qs at %L" msgstr "" #: fortran/resolve.c:14444 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "NAMELIST object %qs with nonconstant character length in namelist %qs at %L" -msgstr "" +msgstr "funktiota %<__builtin_next_arg%> kutsuttu ilman argumenttia" #: fortran/resolve.c:14461 #, gcc-internal-format @@ -63951,9 +64059,9 @@ msgid "Character dummy variable %qs at %L with VALUE attribute must have constan msgstr "%<__builtin_expect%>-funktion toisen argumentin pitää olla vakio" #: fortran/resolve.c:14941 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "C interoperable character dummy variable %qs at %L with VALUE attribute must have length one" -msgstr "" +msgstr "%<__builtin_expect%>-funktion toisen argumentin pitää olla vakio" #: fortran/resolve.c:14954 fortran/resolve.c:15131 #, fuzzy, gcc-internal-format @@ -64016,9 +64124,9 @@ msgid "BIND(C) Variable %qs at %L must have length one" msgstr "Argumentin %s kohdassa %L on oltava pituudeltaan yksi" #: fortran/resolve.c:15157 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "PUBLIC %s %qs at %L of PRIVATE derived type %qs" -msgstr "" +msgstr "epäkelpo %qs:n soveltaminen tyhjään tyyppiin" #: fortran/resolve.c:15172 #, gcc-internal-format, gfc-internal-format @@ -64076,9 +64184,9 @@ msgid "Allocatable coarray variable %qs at %L must have deferred shape" msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/resolve.c:15300 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Variable %qs at %L is INTENT(OUT) and can thus not be an allocatable coarray or have coarray components" -msgstr "" +msgstr "Funktiolla ”%s” kohdassa %L ei voi olla alustinta" #: fortran/resolve.c:15309 #, fuzzy, gcc-internal-format @@ -64186,9 +64294,9 @@ msgid "Derived type variable %qs at %L cannot have ALLOCATABLE components to be msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/resolve.c:16151 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Derived type variable %qs at %L with default initialization cannot be in EQUIVALENCE with a variable in COMMON" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/resolve.c:16167 #, fuzzy, gcc-internal-format @@ -64216,9 +64324,9 @@ msgid "Named constant %qs at %L cannot be an EQUIVALENCE object" msgstr "Ei voi sijoitaa nimettyyn vakioon kohdassa %C" #: fortran/resolve.c:16392 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Array %qs at %L with non-constant bounds cannot be an EQUIVALENCE object" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #: fortran/resolve.c:16403 #, fuzzy, gcc-internal-format @@ -64396,9 +64504,9 @@ msgid "Invalid KIND parameter of %s at %L" msgstr "%s: paniikki: Virheellinen ”l_value” %d\n" #: fortran/simplify.c:747 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_simplify_abs(): Bad type" -msgstr "" +msgstr "ylivuoto vakiolausekkeessa" #: fortran/simplify.c:768 #, gcc-internal-format, gfc-internal-format @@ -64421,9 +64529,9 @@ msgid "Argument of ACOS at %L must be between -1 and 1" msgstr "Argumentin %s kohdassa %L on oltava pituudeltaan yksi" #: fortran/simplify.c:844 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "in gfc_simplify_acos(): Bad type" -msgstr "" +msgstr "ylivuoto vakiolausekkeessa" #: fortran/simplify.c:863 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -64431,9 +64539,9 @@ msgid "Argument of ACOSH at %L must not be less than 1" msgstr "Argumentin %s kohdassa %L on oltava pituudeltaan yksi" #: fortran/simplify.c:878 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "in gfc_simplify_acosh(): Bad type" -msgstr "" +msgstr "ylivuoto vakiolausekkeessa" #: fortran/simplify.c:1107 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -64451,9 +64559,9 @@ msgid "in gfc_simplify_asinh(): Bad type" msgstr "ylivuoto vakiolausekkeessa" #: fortran/simplify.c:1177 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "in gfc_simplify_atan(): Bad type" -msgstr "" +msgstr "ylivuoto vakiolausekkeessa" #: fortran/simplify.c:1198 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -64461,9 +64569,9 @@ msgid "Argument of ATANH at %L must be inside the range -1 to 1" msgstr "Argumentin %s kohdassa %L on oltava pituudeltaan yksi" #: fortran/simplify.c:1212 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "in gfc_simplify_atanh(): Bad type" -msgstr "" +msgstr "ylivuoto vakiolausekkeessa" #: fortran/simplify.c:1229 #, gcc-internal-format, gfc-internal-format @@ -64476,44 +64584,44 @@ msgid "Result of BESSEL_YN is -INF at %L" msgstr "Haarautuminen kohdassa %L voi aiheuttaa ikisilmukan" #: fortran/simplify.c:1690 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_simplify_dcmplx(): Bad type (x)" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/simplify.c:1709 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_simplify_dcmplx(): Bad type (y)" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/simplify.c:1790 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "in simplify_trig_call(): Bad intrinsic" -msgstr "" +msgstr "ylivuoto vakiolausekkeessa" #: fortran/simplify.c:1850 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "in gfc_simplify_trigd(): Bad type" -msgstr "" +msgstr "ylivuoto vakiolausekkeessa" #: fortran/simplify.c:1868 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "in gfc_simplify_atrigd(): Bad type" -msgstr "" +msgstr "ylivuoto vakiolausekkeessa" #: fortran/simplify.c:1892 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "in gfc_simplify_atan2d(): Bad type" -msgstr "" +msgstr "ylivuoto vakiolausekkeessa" #: fortran/simplify.c:1930 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "in gfc_simplify_cos(): Bad type" -msgstr "" +msgstr "ylivuoto vakiolausekkeessa" #: fortran/simplify.c:2291 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_simplify_dim(): Bad type" -msgstr "" +msgstr "ylivuoto vakiolausekkeessa" #: fortran/simplify.c:2862 #, fuzzy, gcc-internal-format @@ -64521,9 +64629,9 @@ msgid "in gfc_simplify_exp(): Bad type" msgstr "vektoriylivuoto lausekkeessa" #: fortran/simplify.c:3084 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_simplify_floor(): Bad kind" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/simplify.c:3234 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -64567,9 +64675,9 @@ msgid "Magnitude of second argument of ISHFTC exceeds BIT_SIZE of first argument msgstr "%<__builtin_args_info%>-funktion argumentti puuttuu" #: fortran/simplify.c:3945 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "Absolute value of SHIFT shall be less than or equal to SIZE at %C" -msgstr "" +msgstr "%s:n kohdassa %L täytyy olla INTEGER" #: fortran/simplify.c:4266 fortran/simplify.c:4399 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -64587,9 +64695,9 @@ msgid "Complex argument of LOG at %L cannot be zero" msgstr "%qs ei ole kelpo tulostetiedosto" #: fortran/simplify.c:4606 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_simplify_log: bad type" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/simplify.c:4623 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -64597,9 +64705,9 @@ msgid "Argument of LOG10 at %L cannot be less than or equal to zero" msgstr "%qs ei ole kelpo tulostetiedosto" #: fortran/simplify.c:4946 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "simplify_min_max(): Bad type in arglist" -msgstr "" +msgstr "ylivuoto vakiolausekkeessa" #: fortran/simplify.c:5854 fortran/simplify.c:5862 #, fuzzy, gcc-internal-format @@ -64607,9 +64715,9 @@ msgid "Argument %qs of MOD at %L shall not be zero" msgstr "%qs ei ole kelpo tulostetiedosto" #: fortran/simplify.c:5868 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_simplify_mod(): Bad arguments" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/simplify.c:5906 fortran/simplify.c:5914 #, fuzzy, gcc-internal-format @@ -64617,9 +64725,9 @@ msgid "Argument %qs of MODULO at %L shall not be zero" msgstr "%qs ei ole kelpo tulostetiedosto" #: fortran/simplify.c:5920 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_simplify_modulo(): Bad arguments" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/simplify.c:5992 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -64760,9 +64868,9 @@ msgstr "BIND(C)-funktion ”%s” paluutyyppi kohdassa %L ei voi olla taulukko" #. Dummy args to a BIND(C) routine may not be interoperable if #. they are implicitly typed. #: fortran/symbol.c:346 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Implicitly declared variable %qs at %L may not be C interoperable but it is a dummy argument to the BIND(C) procedure %qs at %L" -msgstr "" +msgstr "Liikaa argumentteja funktiolle %s kohdassa %L" #: fortran/symbol.c:387 #, fuzzy, gcc-internal-format @@ -65083,9 +65191,9 @@ msgid "Component %qs at %L cannot have the ALLOCATABLE attribute because it is a msgstr "tyhjä esittely" #: fortran/symbol.c:4500 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Component %qs in derived type %qs at %L may not be C interoperable, even though derived type %qs is BIND(C)" -msgstr "" +msgstr "BIND(C)-funktion ”%s” paluutyyppi kohdassa %L ei voi olla taulukko" #: fortran/symbol.c:4510 #, fuzzy, gcc-internal-format @@ -65266,9 +65374,9 @@ msgid "Dummy argument %qs at %L was declared INTENT(OUT) but was not set" msgstr "kääntäjänsisäisen ”%2$s”-funktion argumentin ”%1$s” kohdassa %3$L ei voi olla INTENT(IN)" #: fortran/trans-decl.c:5637 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Derived-type dummy argument %qs at %L was declared INTENT(OUT) but was not set and does not have a default initializer" -msgstr "" +msgstr "kääntäjänsisäisen ”%2$s”-funktion argumentin ”%1$s” kohdassa %3$L ei voi olla INTENT(IN)" #: fortran/trans-decl.c:5647 fortran/trans-decl.c:5785 #, fuzzy, gcc-internal-format @@ -65336,9 +65444,9 @@ msgid "Unknown argument list function at %L" msgstr "Tuntematon argumenttiluettelofunktio kohdassa %L" #: fortran/trans-intrinsic.c:926 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "Intrinsic function %qs (%d) not recognized" -msgstr "" +msgstr "Luontaisella ”%s” kohdassa %L ei voi olla alustinta" #: fortran/trans-intrinsic.c:2431 fortran/trans-intrinsic.c:2969 #: fortran/trans-intrinsic.c:3166 @@ -65372,9 +65480,9 @@ msgid "implicit mapping of assumed size array %qD" msgstr "vektoriylivuoto lausekkeessa" #: fortran/trans-openmp.c:5041 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_trans_omp_workshare(): Bad statement code" -msgstr "" +msgstr "lauseella ei ole vaikutusta" #: fortran/trans-stmt.c:546 #, fuzzy, gcc-internal-format, gfc-internal-format @@ -65392,9 +65500,9 @@ msgid "Sorry, only support for integer kind %d implemented for image-set at %L" msgstr "" #: fortran/trans-stmt.c:3354 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_trans_select(): Bad type for case expr." -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/trans-types.c:518 #, gcc-internal-format @@ -65452,9 +65560,9 @@ msgid "REAL(KIND=10) is not available for %<-freal-8-real-16%> option" msgstr "" #: fortran/trans-types.c:773 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "gfc_validate_kind(): Got bad type" -msgstr "" +msgstr "vektoriylivuoto lausekkeessa" #: fortran/trans-types.c:777 #, gcc-internal-format @@ -65598,9 +65706,9 @@ msgid "previously declared here" msgstr "esitelty aiemmin täällä" #: lto/lto.c:1864 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "bytecode stream: garbage at the end of symbols section" -msgstr "" +msgstr "ei voitu luoda uutta ELF-lohkoa: %s" #: lto/lto.c:1891 #, gcc-internal-format @@ -65608,9 +65716,9 @@ msgid "could not parse hex number" msgstr "ei voitu jäsentää heksadesimaalinumeroa" #: lto/lto.c:1923 -#, gcc-internal-format, gfc-internal-format +#, fuzzy, gcc-internal-format, gfc-internal-format msgid "unexpected file name %s in linker resolution file. Expected %s" -msgstr "" +msgstr "%qD esitelty staattisesti sisäkkäin" #: lto/lto.c:1932 #, gcc-internal-format @@ -65723,19 +65831,19 @@ msgid "class attributes are not available in Objective-C 1.0" msgstr "parametritaulukon esittelijän attribuutit jätetään huomiotta" #: objc/objc-act.c:593 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "category attributes are not available in Objective-C 1.0" -msgstr "" +msgstr "parametritaulukon esittelijän attribuutit jätetään huomiotta" #: objc/objc-act.c:596 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "category attributes are not available in this version of the compiler, (ignored)" -msgstr "" +msgstr "parametritaulukon esittelijän attribuutit jätetään huomiotta" #: objc/objc-act.c:602 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "class extensions are not available in Objective-C 1.0" -msgstr "" +msgstr "parametritaulukon esittelijän attribuutit jätetään huomiotta" #: objc/objc-act.c:616 #, gcc-internal-format @@ -65743,9 +65851,9 @@ msgid "class extension for class %qE declared after its %<@implementation%>" msgstr "" #: objc/objc-act.c:631 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "protocol attributes are not available in Objective-C 1.0" -msgstr "" +msgstr "parametritaulukon esittelijän attribuutit jätetään huomiotta" #: objc/objc-act.c:696 #, fuzzy, gcc-internal-format @@ -65753,9 +65861,9 @@ msgid "%<@end%> must appear in an @implementation context" msgstr "täytemerkki puuttuu strfmon-muotoilun lopusta" #: objc/objc-act.c:705 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<@package%> is not available in Objective-C 1.0" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #: objc/objc-act.c:707 #, gcc-internal-format @@ -65783,9 +65891,9 @@ msgid "%<@required%> is allowed in @protocol context only" msgstr "" #: objc/objc-act.c:837 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<@property%> is not available in Objective-C 1.0" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #: objc/objc-act.c:841 #, fuzzy, gcc-internal-format @@ -65904,9 +66012,9 @@ msgid "type of property %qD conflicts with previous declaration" msgstr "%J%qD:n lohko on ristiriidassa edellisen esittelyn kanssa" #: objc/objc-act.c:1651 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "the dot syntax is not available in Objective-C 1.0" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #. We know that 'class_name' is an Objective-C class name as the #. parser won't call this function if it is not. This is only a @@ -65943,9 +66051,9 @@ msgid "method declaration not in @interface context" msgstr "kaksoiskappale-rajapintaesittely luokalle %qE" #: objc/objc-act.c:2021 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "method attributes are not available in Objective-C 1.0" -msgstr "" +msgstr "parametritaulukon esittelijän attribuutit jätetään huomiotta" #: objc/objc-act.c:2041 #, fuzzy, gcc-internal-format @@ -65958,14 +66066,14 @@ msgid "method attributes cannot be specified in @implementation context" msgstr "%Jlohkoattribuuttia ei voi määrittää paikalliselle muuttujalle" #: objc/objc-act.c:2285 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "class %qs does not implement the %qE protocol" -msgstr "" +msgstr "%s %qE ei täysin toteuta %qE-protokollaa" #: objc/objc-act.c:2288 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "type %qs does not conform to the %qE protocol" -msgstr "" +msgstr "%s %qE ei täysin toteuta %qE-protokollaa" #: objc/objc-act.c:2569 #, gcc-internal-format @@ -66073,9 +66181,9 @@ msgid "previous declaration of %q+D" msgstr "%q+D:n edellinen esittely" #: objc/objc-act.c:3686 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "strong-cast assignment has been intercepted" -msgstr "" +msgstr "muuttujalla %qD on alustin, mutta vaillinainen tyyppi" #: objc/objc-act.c:3728 #, gcc-internal-format @@ -66093,9 +66201,9 @@ msgid "pointer arithmetic for garbage-collected objects not allowed" msgstr "" #: objc/objc-act.c:3763 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "global/static variable assignment has been intercepted" -msgstr "" +msgstr "muuttujalla %qD on alustin, mutta vaillinainen tyyppi" #: objc/objc-act.c:3980 objc/objc-act.c:4008 objc/objc-act.c:4063 #, fuzzy, gcc-internal-format @@ -66163,9 +66271,9 @@ msgid "cannot use an object as parameter to a method" msgstr "ei voi käyttää objektia metodin parametrinä" #: objc/objc-act.c:4724 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "method argument attributes are not available in Objective-C 1.0" -msgstr "" +msgstr "parametritaulukon esittelijän attribuutit jätetään huomiotta" #: objc/objc-act.c:5098 #, gcc-internal-format @@ -66508,9 +66616,9 @@ msgid "%<@synthesize%> requires the @interface of the class to be available" msgstr "" #: objc/objc-act.c:7822 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%<@dynamic%> is not available in Objective-C 1.0" -msgstr "" +msgstr "valitsimia -mcorea ja -mcoreb ei voi käyttää yhdessä" #. We can get here only in Objective-C; the Objective-C++ parser #. detects the problem while parsing, outputs the error @@ -66560,9 +66668,9 @@ msgid "no super class declared in interface for %qE" msgstr "kaksoiskappale-rajapintaesittely luokalle %qE" #: objc/objc-act.c:8845 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "[super ...] must appear in a method context" -msgstr "" +msgstr "täytemerkki puuttuu strfmon-muotoilun lopusta" #: objc/objc-act.c:8885 #, gcc-internal-format @@ -66588,9 +66696,9 @@ msgid "no %qs getter found" msgstr "Ei löydy" #: objc/objc-act.c:9692 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "fast enumeration is not available in Objective-C 1.0" -msgstr "" +msgstr "muuttuvakokoista objektia ei voi alustaa" #: objc/objc-act.c:9702 #, fuzzy, gcc-internal-format -- cgit v1.1 From 74d1f65102a4bfaf9df7b2f1c9145869c7c8cce4 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 7 Mar 2019 22:32:21 +0100 Subject: re PR target/80003 (i386.c: %s placeholder is no semantic grammar unit) PR target/80003 * config/i386/i386.c (ix86_set_func_type): Make sure diagnostics doesn't start with a capital letter and doesn't end with a dot. (ix86_function_arg_boundary): Make sure diagnostics doesn't start with a capital letter. (ix86_mangle_function_version_assembler_name): Likewise. (ix86_generate_version_dispatcher_body): Likewise. (fold_builtin_cpu): Likewise. (get_builtin_code_for_version): Likewise. Remove extraneous space. (ix86_handle_interrupt_attribute): Make the diagnostics easier for translators, wrap full type name in %qs. * gcc.target/i386/pr68657.c: Adjust expected diagnostics wording. * gcc.target/i386/interrupt-6.c: Likewise. * g++.target/i386/pr57362.C: Adjust capitalization in dg-prune-output. From-SVN: r269471 --- gcc/ChangeLog | 12 +++++++++++ gcc/config/i386/i386.c | 33 +++++++++++++++-------------- gcc/testsuite/ChangeLog | 7 ++++++ gcc/testsuite/g++.target/i386/pr57362.C | 2 +- gcc/testsuite/gcc.target/i386/interrupt-6.c | 2 +- gcc/testsuite/gcc.target/i386/pr68657.c | 2 +- 6 files changed, 39 insertions(+), 19 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e2ece53..e7a7d58 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,17 @@ 2019-03-07 Jakub Jelinek + PR target/80003 + * config/i386/i386.c (ix86_set_func_type): Make sure diagnostics + doesn't start with a capital letter and doesn't end with a dot. + (ix86_function_arg_boundary): Make sure diagnostics doesn't start + with a capital letter. + (ix86_mangle_function_version_assembler_name): Likewise. + (ix86_generate_version_dispatcher_body): Likewise. + (fold_builtin_cpu): Likewise. + (get_builtin_code_for_version): Likewise. Remove extraneous space. + (ix86_handle_interrupt_attribute): Make the diagnostics easier for + translators, wrap full type name in %qs. + PR translation/79999 * gimplify.c (gimplify_omp_ordered): Reword diagnostics to talk about depend clause with source (or sink) modifier. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index c8f9957..2d6a993 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5800,8 +5800,8 @@ ix86_set_func_type (tree fndecl) /* Only dwarf2out.c can handle -WORD(AP) as a pointer argument. */ if (write_symbols != NO_DEBUG && write_symbols != DWARF2_DEBUG) - sorry ("Only DWARF debug format is supported for interrupt " - "service routine."); + sorry ("only DWARF debug format is supported for interrupt " + "service routine"); } else { @@ -9069,7 +9069,7 @@ ix86_function_arg_boundary (machine_mode mode, const_tree type) { warned = true; inform (input_location, - "The ABI for passing parameters with %d-byte" + "the ABI for passing parameters with %d-byte" " alignment has changed in GCC 4.6", align / BITS_PER_UNIT); } @@ -32116,7 +32116,7 @@ get_builtin_code_for_version (tree decl, tree *predicate_list) if (predicate_list && arg_str == NULL) { error_at (DECL_SOURCE_LOCATION (decl), - "No dispatcher found for the versioning attributes"); + "no dispatcher found for the versioning attributes"); return 0; } @@ -32166,7 +32166,7 @@ get_builtin_code_for_version (tree decl, tree *predicate_list) if (predicate_list && i == NUM_FEATURES) { error_at (DECL_SOURCE_LOCATION (decl), - "No dispatcher found for %s", token); + "no dispatcher found for %s", token); return 0; } token = strtok (NULL, ","); @@ -32176,7 +32176,7 @@ get_builtin_code_for_version (tree decl, tree *predicate_list) if (predicate_list && predicate_chain == NULL_TREE) { error_at (DECL_SOURCE_LOCATION (decl), - "No dispatcher found for the versioning attributes : %s", + "no dispatcher found for the versioning attributes: %s", attrs_str); return 0; } @@ -32338,12 +32338,12 @@ ix86_mangle_function_version_assembler_name (tree decl, tree id) && lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (decl))) error_at (DECL_SOURCE_LOCATION (decl), - "Function versions cannot be marked as gnu_inline," + "function versions cannot be marked as gnu_inline," " bodies have to be generated"); if (DECL_VIRTUAL_P (decl) || DECL_VINDEX (decl)) - sorry ("Virtual function multiversioning not supported"); + sorry ("virtual function multiversioning not supported"); version_attr = lookup_attribute ("target", DECL_ATTRIBUTES (decl)); @@ -32619,7 +32619,7 @@ ix86_generate_version_dispatcher_body (void *node_p) virtual methods in base classes but are not explicitly marked as virtual. */ if (DECL_VINDEX (versn->decl)) - sorry ("Virtual function multiversioning not supported"); + sorry ("virtual function multiversioning not supported"); fn_ver_vec.safe_push (versn->decl); } @@ -32898,7 +32898,7 @@ fold_builtin_cpu (tree fndecl, tree *args) STRING_CST. */ if (!EXPR_P (param_string_cst)) { - error ("Parameter to builtin must be a string constant or literal"); + error ("parameter to builtin must be a string constant or literal"); return integer_zero_node; } param_string_cst = TREE_OPERAND (EXPR_CHECK (param_string_cst), 0); @@ -32923,7 +32923,7 @@ fold_builtin_cpu (tree fndecl, tree *args) if (i == NUM_ARCH_NAMES) { - error ("Parameter to builtin not valid: %s", + error ("parameter to builtin not valid: %s", TREE_STRING_POINTER (param_string_cst)); return integer_zero_node; } @@ -32973,7 +32973,7 @@ fold_builtin_cpu (tree fndecl, tree *args) if (i == NUM_ISA_NAMES) { - error ("Parameter to builtin not valid: %s", + error ("parameter to builtin not valid: %s", TREE_STRING_POINTER (param_string_cst)); return integer_zero_node; } @@ -41417,11 +41417,12 @@ ix86_handle_interrupt_attribute (tree *node, tree, tree, int, bool *) { if (TREE_CODE (TREE_VALUE (current_arg_type)) != INTEGER_TYPE || TYPE_MODE (TREE_VALUE (current_arg_type)) != word_mode) - error ("interrupt service routine should have unsigned %s" - "int as the second argument", + error ("interrupt service routine should have %qs " + "as the second argument", TARGET_64BIT - ? (TARGET_X32 ? "long long " : "long ") - : ""); + ? (TARGET_X32 ? "unsigned long long int" + : "unsigned long int") + : "unsigned int"); } nargs++; current_arg_type = TREE_CHAIN (current_arg_type); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0a90257..46920d6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-03-07 Jakub Jelinek + + PR target/80003 + * gcc.target/i386/pr68657.c: Adjust expected diagnostics wording. + * gcc.target/i386/interrupt-6.c: Likewise. + * g++.target/i386/pr57362.C: Adjust capitalization in dg-prune-output. + 2019-03-07 Paolo Carlini PR c++/84518 diff --git a/gcc/testsuite/g++.target/i386/pr57362.C b/gcc/testsuite/g++.target/i386/pr57362.C index 8c07e85..5e61213 100644 --- a/gcc/testsuite/g++.target/i386/pr57362.C +++ b/gcc/testsuite/g++.target/i386/pr57362.C @@ -199,4 +199,4 @@ int foo(void) { return 1; } /* { dg-prune-output "attribute.* is unknown" } */ /* { dg-prune-output "missing 'target' attribute*" } */ /* { dg-prune-output "redefinition of 'int foo" } */ -/* { dg-prune-output "No dispatcher found for" } */ +/* { dg-prune-output "no dispatcher found for" } */ diff --git a/gcc/testsuite/gcc.target/i386/interrupt-6.c b/gcc/testsuite/gcc.target/i386/interrupt-6.c index 2a0266a..bcbcc97 100644 --- a/gcc/testsuite/gcc.target/i386/interrupt-6.c +++ b/gcc/testsuite/gcc.target/i386/interrupt-6.c @@ -8,7 +8,7 @@ extern int error; __attribute__((interrupt)) void fn1 (void *p, short error_code) -{ /* { dg-error "interrupt service routine should have unsigned \(long long |long |\)int as the second argument" } */ +{ /* { dg-error "interrupt service routine should have 'unsigned \(long long |long |\)int' as the second argument" } */ } __attribute__((interrupt)) diff --git a/gcc/testsuite/gcc.target/i386/pr68657.c b/gcc/testsuite/gcc.target/i386/pr68657.c index fcfb489..3480242 100644 --- a/gcc/testsuite/gcc.target/i386/pr68657.c +++ b/gcc/testsuite/gcc.target/i386/pr68657.c @@ -4,7 +4,7 @@ typedef int V __attribute__((vector_size (64))); void foo (V x, V *y) { /* { dg-error "AVX512F vector argument without AVX512F enabled" } */ - /* { dg-message "The ABI for passing parameters with 64-byte alignment has changed" "" { target *-*-* } .-1 } */ + /* { dg-message "the ABI for passing parameters with 64-byte alignment has changed" "" { target *-*-* } .-1 } */ *y = x; } -- cgit v1.1 From 1ce59b6cad83d5ca6f1efee83f910d8b677a976a Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 8 Mar 2019 00:16:34 +0000 Subject: Daily bump. From-SVN: r269476 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 71b5ee8..6d65f6b 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20190307 +20190308 -- cgit v1.1 From bddee796d0b4800b5ac3d7e7e9e315c23799424d Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 7 Mar 2019 21:54:41 -0500 Subject: PR c++/88123 - lambda and using-directive. For named function calls in a template, the result of unqualified lookup is safed in CALL_EXPR_FN. But for operator expressions, no unqualified lookup is performed until we know whether the operands have class type. So when we see in a lambda a use of an operator that might be overloaded, we need to do that lookup then and save it away somewhere. One possibility would be in the expression, but we can't really add extra conditional operands to standard tree codes. I mostly implemented another approach using a new WITH_LOOKUP_EXPR code, but teaching everywhere how to handle a new tree code is always complicated. Then it occurred to me that we could associate the lookups with the function, which is both simpler and smaller. So this patch stores any operator bindings needed by a lambda function in an internal attribute on the lambda call operator. * name-lookup.c (op_unqualified_lookup) (maybe_save_operator_binding, discard_operator_bindings) (push_operator_bindings): New. * typeck.c (build_x_binary_op, build_x_unary_op): Call maybe_save_operator_binding. * decl.c (start_preparsed_function): Call push_operator_bindings. * tree.c (cp_free_lang_data): Call discard_operator_bindings. From-SVN: r269477 --- gcc/cp/ChangeLog | 9 ++ gcc/cp/decl.c | 2 + gcc/cp/name-lookup.c | 99 ++++++++++++++++++++++ gcc/cp/name-lookup.h | 3 + gcc/cp/tree.c | 2 + gcc/cp/typeck.c | 12 ++- gcc/testsuite/g++.dg/cpp1y/lambda-generic-using1.C | 29 +++++++ 7 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp1y/lambda-generic-using1.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 94e278d..ae5735d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,14 @@ 2019-03-07 Jason Merrill + PR c++/88123 - lambda and using-directive. + * name-lookup.c (op_unqualified_lookup) + (maybe_save_operator_binding, discard_operator_bindings) + (push_operator_bindings): New. + * typeck.c (build_x_binary_op, build_x_unary_op): Call + maybe_save_operator_binding. + * decl.c (start_preparsed_function): Call push_operator_bindings. + * tree.c (cp_free_lang_data): Call discard_operator_bindings. + PR c++/88820 - ICE with CTAD and member template used in DMI. * pt.c (do_class_deduction): Handle parm used as its own arg. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 173758f..0187db5 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -15553,6 +15553,8 @@ start_preparsed_function (tree decl1, tree attrs, int flags) store_parm_decls (current_function_parms); + push_operator_bindings (); + if (!processing_template_decl && (flag_lifetime_dse > 1) && DECL_CONSTRUCTOR_P (decl1) diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 1ddcde2..2ba888f 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -7556,4 +7556,103 @@ cp_emit_debug_info_for_using (tree t, tree context) } } +/* Return the result of unqualified lookup for the overloaded operator + designated by CODE, if we are in a template and the binding we find is + not. */ + +static tree +op_unqualified_lookup (tree fnname) +{ + if (cxx_binding *binding = IDENTIFIER_BINDING (fnname)) + { + cp_binding_level *l = binding->scope; + while (l && !l->this_entity) + l = l->level_chain; + if (l && uses_template_parms (l->this_entity)) + /* Don't preserve decls from an uninstantiated template, + wait until that template is instantiated. */ + return NULL_TREE; + } + tree fns = lookup_name (fnname); + if (fns && fns == get_global_binding (fnname)) + /* The instantiation can find these. */ + return NULL_TREE; + return fns; +} + +/* E is an expression representing an operation with dependent type, so we + don't know yet whether it will use the built-in meaning of the operator or a + function. Remember declarations of that operator in scope. */ + +const char *const op_bind_attrname = "operator bindings"; + +void +maybe_save_operator_binding (tree e) +{ + /* This is only useful in a generic lambda. */ + if (!processing_template_decl) + return; + tree cfn = current_function_decl; + if (!cfn) + return; + + /* Let's only do this for generic lambdas for now, we could do it for all + function templates if we wanted to. */ + if (!current_lambda_expr()) + return; + + tree fnname = ovl_op_identifier (false, TREE_CODE (e)); + if (!fnname) + return; + + tree attributes = DECL_ATTRIBUTES (cfn); + tree attr = lookup_attribute (op_bind_attrname, attributes); + tree bindings = NULL_TREE; + tree fns = NULL_TREE; + if (attr) + { + bindings = TREE_VALUE (attr); + if (tree elt = purpose_member (fnname, bindings)) + fns = TREE_VALUE (elt); + } + + if (!fns && (fns = op_unqualified_lookup (fnname))) + { + bindings = tree_cons (fnname, fns, bindings); + if (attr) + TREE_VALUE (attr) = bindings; + else + DECL_ATTRIBUTES (cfn) + = tree_cons (get_identifier (op_bind_attrname), + bindings, + attributes); + } +} + +/* Called from cp_free_lang_data so we don't put this into LTO. */ + +void +discard_operator_bindings (tree decl) +{ + DECL_ATTRIBUTES (decl) = remove_attribute (op_bind_attrname, + DECL_ATTRIBUTES (decl)); +} + +/* Subroutine of start_preparsed_function: push the bindings we saved away in + maybe_save_op_lookup into the function parameter binding level. */ + +void +push_operator_bindings () +{ + tree decl1 = current_function_decl; + if (tree attr = lookup_attribute (op_bind_attrname, + DECL_ATTRIBUTES (decl1))) + for (tree binds = TREE_VALUE (attr); binds; binds = TREE_CHAIN (binds)) + { + tree name = TREE_PURPOSE (binds); + tree val = TREE_VALUE (binds); + push_local_binding (name, val, /*using*/true); + } +} + #include "gt-cp-name-lookup.h" diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h index 36816df..a47486d 100644 --- a/gcc/cp/name-lookup.h +++ b/gcc/cp/name-lookup.h @@ -330,5 +330,8 @@ extern void push_nested_namespace (tree); extern void pop_nested_namespace (tree); extern void push_to_top_level (void); extern void pop_from_top_level (void); +extern void maybe_save_operator_binding (tree); +extern void push_operator_bindings (void); +extern void discard_operator_bindings (tree); #endif /* GCC_CP_NAME_LOOKUP_H */ diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index be33d41..eca6b52 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -5398,6 +5398,8 @@ cp_free_lang_data (tree t) DECL_EXTERNAL (t) = 1; TREE_STATIC (t) = 0; } + if (TREE_CODE (t) == FUNCTION_DECL) + discard_operator_bindings (t); if (TREE_CODE (t) == NAMESPACE_DECL) /* We do not need the leftover chaining of namespaces from the binding level. */ diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 9ceb7af..8d9224b 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -4141,7 +4141,11 @@ build_x_binary_op (const op_location_t &loc, enum tree_code code, tree arg1, { if (type_dependent_expression_p (arg1) || type_dependent_expression_p (arg2)) - return build_min_nt_loc (loc, code, arg1, arg2); + { + expr = build_min_nt_loc (loc, code, arg1, arg2); + maybe_save_operator_binding (expr); + return expr; + } arg1 = build_non_dependent_expr (arg1); arg2 = build_non_dependent_expr (arg2); } @@ -5725,7 +5729,11 @@ build_x_unary_op (location_t loc, enum tree_code code, cp_expr xarg, if (processing_template_decl) { if (type_dependent_expression_p (xarg)) - return build_min_nt_loc (loc, code, xarg.get_value (), NULL_TREE); + { + tree e = build_min_nt_loc (loc, code, xarg.get_value (), NULL_TREE); + maybe_save_operator_binding (e); + return e; + } xarg = build_non_dependent_expr (xarg); } diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-using1.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-using1.C new file mode 100644 index 0000000..2912a75 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-using1.C @@ -0,0 +1,29 @@ +// PR c++/88123 +// { dg-do compile { target c++14 } } + +struct bar {}; +struct baz {}; +struct baq {}; + +namespace foo +{ + void operator+(bar); +} // namespace foo + +namespace foo2 +{ + void operator-(baz); +} + +auto fn() { + using foo::operator+; + using namespace foo2; + extern void operator!(baq); + return [](auto x, auto y, auto z) { +x; -y; !z; }; +} + +int main() +{ + auto l = fn(); + l(bar(),baz(),baq()); +} -- cgit v1.1 From 1d28bbdf471936be77705fbf27ac6934b67382f3 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 8 Mar 2019 08:39:31 +0100 Subject: re PR target/80190 (darwin: untranslateable placeholder "non-ASCII character") PR target/80190 * config/darwin.c: Include intl.h. (darwin_build_constant_cfstring): Improve i18n of diagnostics by not composing the message out of two separate parts. From-SVN: r269480 --- gcc/ChangeLog | 7 +++++++ gcc/config/darwin.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e7a7d58..72a1c3f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-03-08 Jakub Jelinek + + PR target/80190 + * config/darwin.c: Include intl.h. + (darwin_build_constant_cfstring): Improve i18n of diagnostics by not + composing the message out of two separate parts. + 2019-03-07 Jakub Jelinek PR target/80003 diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 174c82f..9194811 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -46,6 +46,7 @@ along with GCC; see the file COPYING3. If not see #include "langhooks.h" #include "toplev.h" #include "lto-section-names.h" +#include "intl.h" /* Darwin supports a feature called fix-and-continue, which is used for rapid turn around debugging. When code is compiled with the @@ -3565,8 +3566,9 @@ darwin_build_constant_cfstring (tree str) for (l = 0; l < length; l++) if (!s[l] || !isascii (s[l])) { - warning (darwin_warn_nonportable_cfstrings, "%s in CFString literal", - s[l] ? "non-ASCII character" : "embedded NUL"); + warning (darwin_warn_nonportable_cfstrings, + s[l] ? G_("non-ASCII character in CFString literal") + : G_("embedded NUL in CFString literal")); break; } } -- cgit v1.1 From 560a46a5914a3cc55ade0cb0fe3d8e36d85d01cd Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 8 Mar 2019 08:42:51 +0100 Subject: re PR c++/89622 (G++ prints notes, but no warning or error) PR c++/89622 * call.c (joust): Call print_z_candidate only if pedwarn returned true. * g++.dg/warn/pr89622.C: New test. From-SVN: r269481 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/call.c | 14 ++++++++------ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/warn/pr89622.C | 27 +++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 gcc/testsuite/g++.dg/warn/pr89622.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ae5735d..9bdb493 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2019-03-08 Jakub Jelinek + + PR c++/89622 + * call.c (joust): Call print_z_candidate only if pedwarn returned + true. + 2019-03-07 Jason Merrill PR c++/88123 - lambda and using-directive. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index d9294a0..c50d9c8 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -10954,12 +10954,14 @@ tweak: if (warn) { auto_diagnostic_group d; - pedwarn (input_location, 0, - "ISO C++ says that these are ambiguous, even " - "though the worst conversion for the first is better than " - "the worst conversion for the second:"); - print_z_candidate (input_location, _("candidate 1:"), w); - print_z_candidate (input_location, _("candidate 2:"), l); + if (pedwarn (input_location, 0, + "ISO C++ says that these are ambiguous, even " + "though the worst conversion for the first is " + "better than the worst conversion for the second:")) + { + print_z_candidate (input_location, _("candidate 1:"), w); + print_z_candidate (input_location, _("candidate 2:"), l); + } } else add_warning (w, l); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 46920d6..777c1b2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-08 Jakub Jelinek + + PR c++/89622 + * g++.dg/warn/pr89622.C: New test. + 2019-03-07 Jakub Jelinek PR target/80003 diff --git a/gcc/testsuite/g++.dg/warn/pr89622.C b/gcc/testsuite/g++.dg/warn/pr89622.C new file mode 100644 index 0000000..247fe09 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/pr89622.C @@ -0,0 +1,27 @@ +// PR c++/89622 +// { dg-do compile { target c++11 } } +// { dg-options "-Wno-system-headers -w" } +// { dg-bogus "says that these are ambiguous" "" { target *-*-* } 0 } +// { dg-bogus "candidate 1" "" { target *-*-* } 0 } +// { dg-bogus "candidate 2" "" { target *-*-* } 0 } + +# 3 "pr89622.h" 3 +template +struct X +{ + X() { } + template X(int, U&&) { } + template X(char, const X&) { } +}; + +template +X wrap_X(X x) +{ + return X('a', x); +} + +int main() +{ + X x; + wrap_X(x); +} -- cgit v1.1 From ed3ea9f271aecfdea1650c87f835efa70a6f1bac Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 8 Mar 2019 08:43:58 +0100 Subject: re PR c++/89599 (C-style function-pointer-to-void* cast is handled inconsistently) PR c++/89599 * constexpr.c (potential_constant_expression_1): Reject REINTERPRET_CAST_P NOP_EXPRs. * g++.dg/ubsan/vptr-4.C: Adjust expected diagnostics. * g++.dg/parse/array-size2.C: Likewise. * g++.dg/cpp0x/constexpr-89599.C: New test. From-SVN: r269482 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/constexpr.c | 7 +++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/constexpr-89599.C | 6 ++++++ gcc/testsuite/g++.dg/parse/array-size2.C | 2 ++ gcc/testsuite/g++.dg/ubsan/vptr-4.C | 11 +++++------ 6 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-89599.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9bdb493..c6e023f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2019-03-08 Jakub Jelinek + PR c++/89599 + * constexpr.c (potential_constant_expression_1): Reject + REINTERPRET_CAST_P NOP_EXPRs. + PR c++/89622 * call.c (joust): Call print_z_candidate only if pedwarn returned true. diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 1c3c725..783d1fc 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -5961,6 +5961,13 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, return true; case NOP_EXPR: + if (REINTERPRET_CAST_P (t)) + { + if (flags & tf_error) + error_at (loc, "a reinterpret_cast is not a constant expression"); + return false; + } + /* FALLTHRU */ case CONVERT_EXPR: case VIEW_CONVERT_EXPR: /* -- a reinterpret_cast. FIXME not implemented, and this rule diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 777c1b2..5db4e37 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2019-03-08 Jakub Jelinek + PR c++/89599 + * g++.dg/ubsan/vptr-4.C: Adjust expected diagnostics. + * g++.dg/parse/array-size2.C: Likewise. + * g++.dg/cpp0x/constexpr-89599.C: New test. + PR c++/89622 * g++.dg/warn/pr89622.C: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-89599.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-89599.C new file mode 100644 index 0000000..07760a3 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-89599.C @@ -0,0 +1,6 @@ +// PR c++/89599 +// { dg-do compile { target c++11 } } + +void foo (int x) {} +constexpr void *arr[2] = { (void*) &foo, (void *) foo };// { dg-error "a reinterpret_cast is not a constant expression" } +constexpr void *ptr = (void *) &foo; // { dg-error "a reinterpret_cast is not a constant expression" } diff --git a/gcc/testsuite/g++.dg/parse/array-size2.C b/gcc/testsuite/g++.dg/parse/array-size2.C index e58fe26..c4a69df 100644 --- a/gcc/testsuite/g++.dg/parse/array-size2.C +++ b/gcc/testsuite/g++.dg/parse/array-size2.C @@ -15,6 +15,8 @@ void foo (void) { char g[(char *) &((struct S *) 0)->b - (char *) 0]; // { dg-error "40:size of array .g. is not an integral constant-expression" } + // { dg-error "narrowing conversion" "" { target c++11 } .-1 } + // { dg-message "expression has a constant value but is not a C.. constant-expression" "" { target c++11 } .-2 } char h[(__SIZE_TYPE__) &((struct S *) 8)->b]; // { dg-error "10:size of array .h. is not an integral constant-expression" } bar (g, h); } diff --git a/gcc/testsuite/g++.dg/ubsan/vptr-4.C b/gcc/testsuite/g++.dg/ubsan/vptr-4.C index cf638e9..764f599 100644 --- a/gcc/testsuite/g++.dg/ubsan/vptr-4.C +++ b/gcc/testsuite/g++.dg/ubsan/vptr-4.C @@ -19,7 +19,7 @@ struct T : S { }; constexpr T t; -constexpr const T *p = t.foo (); // { dg-message "expansion of" } +constexpr const T *p = t.foo (); // { dg-error "called in a constant expression" } template struct V { @@ -39,17 +39,16 @@ struct W : V { }; constexpr W w; -constexpr const W *s = w.foo (); // { dg-error "is not a constant expression" } -// { dg-message "expansion of" "" { target *-*-* } .-1 } +constexpr const W *s = w.foo (); // { dg-error "called in a constant expression" } template int foo (void) { static constexpr T t; - static constexpr const T *p = t.foo (); // { dg-message "expansion of" } + static constexpr const T *p = t.foo (); // { dg-error "called in a constant expression" } static constexpr W w; - static constexpr const W *s = w.foo (); // { dg-error "is not a constant expression" } - return t.b + w.b; // { dg-message "expansion of" "" { target *-*-* } .-1 } + static constexpr const W *s = w.foo (); // { dg-error "called in a constant expression" } + return t.b + w.b; } int x = foo (); -- cgit v1.1 From 5d1504d42af6b12efeb83a2056424ceb1512961f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 8 Mar 2019 08:45:23 +0100 Subject: re PR c++/89585 (GCC 8.3: asm volatile no longer accepted at file scope) PR c++/89585 * parser.c (cp_parser_asm_definition): Just warn instead of error on volatile qualifier outside of function body. * g++.dg/asm-qual-3.C: Adjust expected diagnostics for toplevel asm volatile. From-SVN: r269483 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/parser.c | 13 ++++++++----- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/g++.dg/asm-qual-3.C | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c6e023f..5faebe5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2019-03-08 Jakub Jelinek + PR c++/89585 + * parser.c (cp_parser_asm_definition): Just warn instead of error + on volatile qualifier outside of function body. + PR c++/89599 * constexpr.c (potential_constant_expression_1): Reject REINTERPRET_CAST_P NOP_EXPRs. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 5ac6fc4..e6c2036 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -19782,9 +19782,12 @@ cp_parser_asm_definition (cp_parser* parser) inform (volatile_loc, "first seen here"); } else - volatile_loc = loc; - if (!first_loc) - first_loc = loc; + { + if (!parser->in_function_body) + warning_at (loc, 0, "asm qualifier %qT ignored outside of " + "function body", token->u.value); + volatile_loc = loc; + } cp_lexer_consume_token (parser->lexer); continue; @@ -19830,10 +19833,10 @@ cp_parser_asm_definition (cp_parser* parser) bool inline_p = (inline_loc != UNKNOWN_LOCATION); bool goto_p = (goto_loc != UNKNOWN_LOCATION); - if (!parser->in_function_body && (volatile_p || inline_p || goto_p)) + if (!parser->in_function_body && (inline_p || goto_p)) { error_at (first_loc, "asm qualifier outside of function body"); - volatile_p = inline_p = goto_p = false; + inline_p = goto_p = false; } /* Look for the opening `('. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5db4e37..4010924 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2019-03-08 Jakub Jelinek + PR c++/89585 + * g++.dg/asm-qual-3.C: Adjust expected diagnostics for toplevel + asm volatile. + PR c++/89599 * g++.dg/ubsan/vptr-4.C: Adjust expected diagnostics. * g++.dg/parse/array-size2.C: Likewise. diff --git a/gcc/testsuite/g++.dg/asm-qual-3.C b/gcc/testsuite/g++.dg/asm-qual-3.C index 0f8de36..0bf6069 100644 --- a/gcc/testsuite/g++.dg/asm-qual-3.C +++ b/gcc/testsuite/g++.dg/asm-qual-3.C @@ -3,7 +3,7 @@ // { dg-options "-std=gnu++98" } asm const (""); // { dg-error {'const' is not an asm qualifier} } -asm volatile (""); // { dg-error {asm qualifier outside of function body} } +asm volatile (""); // { dg-warning {asm qualifier 'volatile' ignored outside of function body} } asm restrict (""); // { dg-error {expected '\(' before 'restrict'} } asm inline (""); // { dg-error {asm qualifier outside of function body} } asm goto (""); // { dg-error {asm qualifier outside of function body} } -- cgit v1.1 From 94ec37a909697bbf29db73278c77621ccdf60693 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 8 Mar 2019 10:20:12 +0000 Subject: re PR target/89578 (5% runtime regression for 481.wrf at -Ofast -flto) 2019-03-08 Richard Biener PR middle-end/89578 * cfgloop.h (struct loop): Add owned_clique field. * cfgloopmanip.c (copy_loop_info): Copy it. * tree-cfg.c (gimple_duplicate_bb): Do not remap owned_clique cliques. * tree-inline.c (copy_loops): Remap owned_clique. * lto-streamer-in.c (input_cfg): Stream owned_clique. * lto-streamer-out.c (output_cfg): Likewise. From-SVN: r269484 --- gcc/ChangeLog | 11 +++++++++++ gcc/cfgloop.h | 4 ++++ gcc/cfgloopmanip.c | 1 + gcc/lto-streamer-in.c | 1 + gcc/lto-streamer-out.c | 1 + gcc/tree-cfg.c | 3 ++- gcc/tree-inline.c | 5 +++++ 7 files changed, 25 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 72a1c3f..b46c5af 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2019-03-08 Richard Biener + + PR middle-end/89578 + * cfgloop.h (struct loop): Add owned_clique field. + * cfgloopmanip.c (copy_loop_info): Copy it. + * tree-cfg.c (gimple_duplicate_bb): Do not remap owned_clique + cliques. + * tree-inline.c (copy_loops): Remap owned_clique. + * lto-streamer-in.c (input_cfg): Stream owned_clique. + * lto-streamer-out.c (output_cfg): Likewise. + 2019-03-08 Jakub Jelinek PR target/80190 diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 2e93af3..e82cd7a 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -227,6 +227,10 @@ struct GTY ((chain_next ("%h.next"))) loop { Other values means unroll with the given unrolling factor. */ unsigned short unroll; + /* If this loop was inlined the main clique of the callee which does + not need remapping when copying the loop body. */ + unsigned short owned_clique; + /* For SIMD loops, this is a unique identifier of the loop, referenced by IFN_GOMP_SIMD_VF, IFN_GOMP_SIMD_LANE and IFN_GOMP_SIMD_LAST_LANE builtins. */ diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c index 7eb587a..bfee48e 100644 --- a/gcc/cfgloopmanip.c +++ b/gcc/cfgloopmanip.c @@ -1024,6 +1024,7 @@ copy_loop_info (struct loop *loop, struct loop *target) target->force_vectorize = loop->force_vectorize; target->in_oacc_kernels_region = loop->in_oacc_kernels_region; target->unroll = loop->unroll; + target->owned_clique = loop->owned_clique; } /* Copies copy of LOOP as subloop of TARGET loop, placing newly diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index 6d78e66..7727b9b 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -826,6 +826,7 @@ input_cfg (struct lto_input_block *ib, struct data_in *data_in, /* Read OMP SIMD related info. */ loop->safelen = streamer_read_hwi (ib); loop->unroll = streamer_read_hwi (ib); + loop->owned_clique = streamer_read_hwi (ib); loop->dont_vectorize = streamer_read_hwi (ib); loop->force_vectorize = streamer_read_hwi (ib); loop->simduid = stream_read_tree (ib, data_in); diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index a72016a..b6e395b 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -1938,6 +1938,7 @@ output_cfg (struct output_block *ob, struct function *fn) /* Write OMP SIMD related info. */ streamer_write_hwi (ob, loop->safelen); streamer_write_hwi (ob, loop->unroll); + streamer_write_hwi (ob, loop->owned_clique); streamer_write_hwi (ob, loop->dont_vectorize); streamer_write_hwi (ob, loop->force_vectorize); stream_write_tree (ob, loop->simduid, true); diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 088fc7b..f433efc 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -6244,7 +6244,8 @@ gimple_duplicate_bb (basic_block bb, copy_bb_data *id) op = TREE_OPERAND (op, 0); if ((TREE_CODE (op) == MEM_REF || TREE_CODE (op) == TARGET_MEM_REF) - && MR_DEPENDENCE_CLIQUE (op) > 1) + && MR_DEPENDENCE_CLIQUE (op) > 1 + && MR_DEPENDENCE_CLIQUE (op) != bb->loop_father->owned_clique) { if (!id->dependence_map) id->dependence_map = new hash_maphas_unroll = true; if (dest_loop->force_vectorize) cfun->has_force_vectorize_loops = true; + if (id->src_cfun->last_clique != 0) + dest_loop->owned_clique + = remap_dependence_clique (id, + src_loop->owned_clique + ? src_loop->owned_clique : 1); /* Finally place it into the loop array and the loop tree. */ place_new_loop (cfun, dest_loop); -- cgit v1.1 From 1db01ff96aa5ce5c4ad78313d342cf70f923b40c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 8 Mar 2019 11:46:39 +0100 Subject: re PR tree-optimization/89550 (Spurious array-bounds warning when using __PRETTY_FUNCTION__ as a string_view) PR tree-optimization/89550 * builtins.c (c_strlen): Only set TREE_NO_WARNING if warning_at returned true. Formatting fixes. (expand_builtin_strnlen): Formatting fixes. * tree-vrp.c (vrp_prop::check_mem_ref): Only set TREE_NO_WARNING if warning_at returned true. * tree-cfg.c (pass_warn_function_return::execute): Likewise. c-family/ * c-common.c (c_common_truthvalue_conversion): Only set TREE_NO_WARNING if warning_at returned true. * c-warn.c (overflow_warning, warn_logical_operator): Likewise. c/ * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at returned true. (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn or warning returned true. cp/ * semantics.c (maybe_convert_cond): Only set TREE_NO_WARNING if warning_at returned true. * decl2.c (c_parse_final_cleanups): Likewise. * typeck.c (convert_for_assignment): Likewise. * decl.c (finish_function): Likewise. From-SVN: r269485 --- gcc/ChangeLog | 10 ++++++++++ gcc/builtins.c | 18 ++++++++---------- gcc/c-family/ChangeLog | 7 +++++++ gcc/c-family/c-common.c | 12 +++++------- gcc/c-family/c-warn.c | 24 ++++++++++++++++-------- gcc/c/ChangeLog | 8 ++++++++ gcc/c/c-decl.c | 22 +++++++++++----------- gcc/cp/ChangeLog | 7 +++++++ gcc/cp/decl.c | 6 +++--- gcc/cp/decl2.c | 12 +++++------- gcc/cp/semantics.c | 11 +++++------ gcc/cp/typeck.c | 11 +++++------ gcc/tree-cfg.c | 12 ++++++------ gcc/tree-vrp.c | 12 ++++++------ 14 files changed, 102 insertions(+), 70 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b46c5af..5ce5907 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2019-03-08 Jakub Jelinek + + PR tree-optimization/89550 + * builtins.c (c_strlen): Only set TREE_NO_WARNING if warning_at + returned true. Formatting fixes. + (expand_builtin_strnlen): Formatting fixes. + * tree-vrp.c (vrp_prop::check_mem_ref): Only set TREE_NO_WARNING + if warning_at returned true. + * tree-cfg.c (pass_warn_function_return::execute): Likewise. + 2019-03-08 Richard Biener PR middle-end/89578 diff --git a/gcc/builtins.c b/gcc/builtins.c index d216d6f..0910c72 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -760,15 +760,13 @@ c_strlen (tree src, int only_value, c_strlen_data *data, unsigned eltsize) runtime. */ if (eltoff < 0 || eltoff >= maxelts) { - /* Suppress multiple warnings for propagated constant strings. */ + /* Suppress multiple warnings for propagated constant strings. */ if (only_value != 2 - && !TREE_NO_WARNING (src)) - { - warning_at (loc, OPT_Warray_bounds, - "offset %qwi outside bounds of constant string", - eltoff); - TREE_NO_WARNING (src) = 1; - } + && !TREE_NO_WARNING (src) + && warning_at (loc, OPT_Warray_bounds, + "offset %qwi outside bounds of constant string", + eltoff)) + TREE_NO_WARNING (src) = 1; return NULL_TREE; } @@ -3099,7 +3097,7 @@ expand_builtin_strnlen (tree exp, rtx target, machine_mode target_mode) "%K%qD specified bound %E " "exceeds maximum object size %E", exp, func, bound, maxobjsize)) - TREE_NO_WARNING (exp) = true; + TREE_NO_WARNING (exp) = true; bool exact = true; if (!len || TREE_CODE (len) != INTEGER_CST) @@ -3158,7 +3156,7 @@ expand_builtin_strnlen (tree exp, rtx target, machine_mode target_mode) "%K%qD specified bound [%wu, %wu] " "exceeds maximum object size %E", exp, func, min.to_uhwi (), max.to_uhwi (), maxobjsize)) - TREE_NO_WARNING (exp) = true; + TREE_NO_WARNING (exp) = true; bool exact = true; if (!len || TREE_CODE (len) != INTEGER_CST) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index da8918c..55006e6 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,10 @@ +2019-03-08 Jakub Jelinek + + PR tree-optimization/89550 + * c-common.c (c_common_truthvalue_conversion): Only set + TREE_NO_WARNING if warning_at returned true. + * c-warn.c (overflow_warning, warn_logical_operator): Likewise. + 2019-02-25 Sandra Loosemore Martin Sebor diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index e5a5ea8..e5a19cc 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -3546,13 +3546,11 @@ c_common_truthvalue_conversion (location_t location, tree expr) case MODIFY_EXPR: if (!TREE_NO_WARNING (expr) - && warn_parentheses) - { - warning_at (location, OPT_Wparentheses, - "suggest parentheses around assignment used as " - "truth value"); - TREE_NO_WARNING (expr) = 1; - } + && warn_parentheses + && warning_at (location, OPT_Wparentheses, + "suggest parentheses around assignment used as " + "truth value")) + TREE_NO_WARNING (expr) = 1; break; case CONST_DECL: diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c index e2f3449..d775ff8 100644 --- a/gcc/c-family/c-warn.c +++ b/gcc/c-family/c-warn.c @@ -143,12 +143,16 @@ overflow_warning (location_t loc, tree value, tree expr) return; } + bool warned; if (expr) - warning_at (loc, OPT_Woverflow, warnfmt, expr, TREE_TYPE (expr), value); + warned = warning_at (loc, OPT_Woverflow, warnfmt, expr, TREE_TYPE (expr), + value); else - warning_at (loc, OPT_Woverflow, warnfmt, TREE_TYPE (value), value); + warned = warning_at (loc, OPT_Woverflow, warnfmt, TREE_TYPE (value), + value); - TREE_NO_WARNING (value) = 1; + if (warned) + TREE_NO_WARNING (value) = 1; } /* Helper function for walk_tree. Unwrap C_MAYBE_CONST_EXPRs in an expression @@ -216,13 +220,17 @@ warn_logical_operator (location_t location, enum tree_code code, tree type, && !integer_zerop (folded_op_right) && !integer_onep (folded_op_right)) { + bool warned; if (or_op) - warning_at (location, OPT_Wlogical_op, "logical %" - " applied to non-boolean constant"); + warned + = warning_at (location, OPT_Wlogical_op, + "logical % applied to non-boolean constant"); else - warning_at (location, OPT_Wlogical_op, "logical %" - " applied to non-boolean constant"); - TREE_NO_WARNING (op_left) = true; + warned + = warning_at (location, OPT_Wlogical_op, + "logical % applied to non-boolean constant"); + if (warned) + TREE_NO_WARNING (op_left) = true; return; } } diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index ec60ed3..b59be5e 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,11 @@ +2019-03-08 Jakub Jelinek + + PR tree-optimization/89550 + * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at + returned true. + (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn + or warning returned true. + 2019-02-28 Jakub Jelinek PR c/89525 diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 69c04d5..32ec183 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -9664,12 +9664,10 @@ finish_function (void) && !C_FUNCTION_IMPLICIT_INT (fndecl) /* Normally, with -Wreturn-type, flow will complain, but we might optimize out static functions. */ - && !TREE_PUBLIC (fndecl)) - { - warning (OPT_Wreturn_type, - "no return statement in function returning non-void"); - TREE_NO_WARNING (fndecl) = 1; - } + && !TREE_PUBLIC (fndecl) + && warning (OPT_Wreturn_type, + "no return statement in function returning non-void")) + TREE_NO_WARNING (fndecl) = 1; /* Complain about parameters that are only set, but never otherwise used. */ if (warn_unused_but_set_parameter) @@ -11486,17 +11484,19 @@ c_write_global_declarations_1 (tree globals) { if (C_DECL_USED (decl)) { - pedwarn (input_location, 0, "%q+F used but never defined", decl); - TREE_NO_WARNING (decl) = 1; + if (pedwarn (input_location, 0, "%q+F used but never defined", + decl)) + TREE_NO_WARNING (decl) = 1; } /* For -Wunused-function warn about unused static prototypes. */ else if (warn_unused_function && ! DECL_ARTIFICIAL (decl) && ! TREE_NO_WARNING (decl)) { - warning (OPT_Wunused_function, - "%q+F declared % but never defined", decl); - TREE_NO_WARNING (decl) = 1; + if (warning (OPT_Wunused_function, + "%q+F declared % but never defined", + decl)) + TREE_NO_WARNING (decl) = 1; } } diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5faebe5..43184b0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,12 @@ 2019-03-08 Jakub Jelinek + PR tree-optimization/89550 + * semantics.c (maybe_convert_cond): Only set TREE_NO_WARNING if + warning_at returned true. + * decl2.c (c_parse_final_cleanups): Likewise. + * typeck.c (convert_for_assignment): Likewise. + * decl.c (finish_function): Likewise. + PR c++/89585 * parser.c (cp_parser_asm_definition): Just warn instead of error on volatile qualifier outside of function body. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 0187db5..081f37c 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -16171,9 +16171,9 @@ finish_function (bool inline_p) global_dc->option_state)) add_return_star_this_fixit (&richloc, fndecl); } - warning_at (&richloc, OPT_Wreturn_type, - "no return statement in function returning non-void"); - TREE_NO_WARNING (fndecl) = 1; + if (warning_at (&richloc, OPT_Wreturn_type, + "no return statement in function returning non-void")) + TREE_NO_WARNING (fndecl) = 1; } /* Store the end of the function, so that we get good line number diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index b60110a..4e4746e 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -5022,13 +5022,11 @@ c_parse_final_cleanups (void) /* Don't complain if the template was defined. */ && !(DECL_TEMPLATE_INSTANTIATION (decl) && DECL_INITIAL (DECL_TEMPLATE_RESULT - (template_for_substitution (decl))))) - { - warning_at (DECL_SOURCE_LOCATION (decl), 0, - "inline function %qD used but never defined", decl); - /* Avoid a duplicate warning from check_global_declaration. */ - TREE_NO_WARNING (decl) = 1; - } + (template_for_substitution (decl)))) + && warning_at (DECL_SOURCE_LOCATION (decl), 0, + "inline function %qD used but never defined", decl)) + /* Avoid a duplicate warning from check_global_declaration. */ + TREE_NO_WARNING (decl) = 1; } /* So must decls that use a type with no linkage. */ diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 2573b77..798a2b3 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -657,12 +657,11 @@ maybe_convert_cond (tree cond) if (TREE_CODE (cond) == MODIFY_EXPR && !TREE_NO_WARNING (cond) - && warn_parentheses) - { - warning_at (cp_expr_loc_or_loc (cond, input_location), OPT_Wparentheses, - "suggest parentheses around assignment used as truth value"); - TREE_NO_WARNING (cond) = 1; - } + && warn_parentheses + && warning_at (cp_expr_loc_or_loc (cond, input_location), + OPT_Wparentheses, "suggest parentheses around " + "assignment used as truth value")) + TREE_NO_WARNING (cond) = 1; return condition_conversion (cond); } diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 8d9224b..51f4781 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -9071,12 +9071,11 @@ convert_for_assignment (tree type, tree rhs, && TREE_CODE (rhs) == MODIFY_EXPR && !TREE_NO_WARNING (rhs) && TREE_CODE (TREE_TYPE (rhs)) != BOOLEAN_TYPE - && (complain & tf_warning)) - { - warning_at (rhs_loc, OPT_Wparentheses, - "suggest parentheses around assignment used as truth value"); - TREE_NO_WARNING (rhs) = 1; - } + && (complain & tf_warning) + && warning_at (rhs_loc, OPT_Wparentheses, + "suggest parentheses around assignment used as " + "truth value")) + TREE_NO_WARNING (rhs) = 1; if (complain & tf_warning) warn_for_address_or_pointer_of_packed_member (type, rhs); diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index f433efc..7196614 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -9329,9 +9329,9 @@ pass_warn_function_return::execute (function *fun) location = gimple_location (last); if (LOCATION_LOCUS (location) == UNKNOWN_LOCATION) location = fun->function_end_locus; - warning_at (location, OPT_Wreturn_type, - "control reaches end of non-void function"); - TREE_NO_WARNING (fun->decl) = 1; + if (warning_at (location, OPT_Wreturn_type, + "control reaches end of non-void function")) + TREE_NO_WARNING (fun->decl) = 1; break; } } @@ -9361,9 +9361,9 @@ pass_warn_function_return::execute (function *fun) location = gimple_location (prev); if (LOCATION_LOCUS (location) == UNKNOWN_LOCATION) location = fun->function_end_locus; - warning_at (location, OPT_Wreturn_type, - "control reaches end of non-void function"); - TREE_NO_WARNING (fun->decl) = 1; + if (warning_at (location, OPT_Wreturn_type, + "control reaches end of non-void function")) + TREE_NO_WARNING (fun->decl) = 1; break; } } diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index bde0751..bf1d947 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -4749,7 +4749,8 @@ vrp_prop::check_mem_ref (location_t location, tree ref, if (warned && DECL_P (arg)) inform (DECL_SOURCE_LOCATION (arg), "while referencing %qD", arg); - TREE_NO_WARNING (ref) = 1; + if (warned) + TREE_NO_WARNING (ref) = 1; return; } @@ -4762,11 +4763,10 @@ vrp_prop::check_mem_ref (location_t location, tree ref, { HOST_WIDE_INT tmpidx = extrema[i].to_shwi () / eltsize.to_shwi (); - warning_at (location, OPT_Warray_bounds, - "intermediate array offset %wi is outside array bounds " - "of %qT", - tmpidx, reftype); - TREE_NO_WARNING (ref) = 1; + if (warning_at (location, OPT_Warray_bounds, + "intermediate array offset %wi is outside array bounds " + "of %qT", tmpidx, reftype)) + TREE_NO_WARNING (ref) = 1; } } -- cgit v1.1 From 723a52f9512a22af0f3f6758770b60dd8dfb7d47 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 8 Mar 2019 11:50:23 +0100 Subject: gimple-ssa-warn-alloca.c (pass_walloca::execute): Don't wrap warning_at or inform messages in G_() if there is no ?:. * gimple-ssa-warn-alloca.c (pass_walloca::execute): Don't wrap warning_at or inform messages in G_() if there is no ?:. From-SVN: r269486 --- gcc/ChangeLog | 3 +++ gcc/gimple-ssa-warn-alloca.c | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ce5907..86bb8d5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2019-03-08 Jakub Jelinek + * gimple-ssa-warn-alloca.c (pass_walloca::execute): Don't wrap + warning_at or inform messages in G_() if there is no ?:. + PR tree-optimization/89550 * builtins.c (c_strlen): Only set TREE_NO_WARNING if warning_at returned true. Formatting fixes. diff --git a/gcc/gimple-ssa-warn-alloca.c b/gcc/gimple-ssa-warn-alloca.c index 2d88fcf..d804146 100644 --- a/gcc/gimple-ssa-warn-alloca.c +++ b/gcc/gimple-ssa-warn-alloca.c @@ -528,7 +528,7 @@ pass_walloca::execute (function *fun) } else if (warn_alloca) { - warning_at (loc, OPT_Walloca, G_("use of %")); + warning_at (loc, OPT_Walloca, "use of %"); continue; } else if (warn_alloca_limit < 0) @@ -571,8 +571,8 @@ pass_walloca::execute (function *fun) && t.limit != 0) { print_decu (t.limit, buff); - inform (loc, G_("limit is %wu bytes, but argument " - "may be as large as %s"), + inform (loc, "limit is %wu bytes, but argument " + "may be as large as %s", is_vla ? warn_vla_limit : adjusted_alloca_limit, buff); } @@ -588,7 +588,7 @@ pass_walloca::execute (function *fun) && t.limit != 0) { print_decu (t.limit, buff); - inform (loc, G_("limit is %wu bytes, but argument is %s"), + inform (loc, "limit is %wu bytes, but argument is %s", is_vla ? warn_vla_limit : adjusted_alloca_limit, buff); } @@ -606,7 +606,7 @@ pass_walloca::execute (function *fun) break; case ALLOCA_IN_LOOP: gcc_assert (!is_vla); - warning_at (loc, wcode, G_("use of % within a loop")); + warning_at (loc, wcode, "use of % within a loop"); break; case ALLOCA_CAST_FROM_SIGNED: gcc_assert (invalid_casted_type != NULL_TREE); -- cgit v1.1 From 0d7bac69b78fbb3bc2d088e7777472d261ea0a21 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 8 Mar 2019 11:51:28 +0100 Subject: re PR other/80058 (fix double spaces in string literals everywhere) PR other/80058 * lra-constraints.c (process_alt_operands): Avoid one space before " at the end of line and another after " on another line in a string literal. * attribs.c (handle_dll_attribute): Likewise. * config/avr/avr-devices.c (avr_texinfo): Likewise. cp/ * parser.c (cp_parser_template_declaration_after_parameters): Avoid one space before " at the end of line and another after " on another line in a string literal. fortran/ * arith.c (gfc_complex2complex): Avoid two spaces in the middle of diagnostics. * resolve.c (resolve_allocate_expr): Likewise. From-SVN: r269487 --- gcc/ChangeLog | 7 +++++++ gcc/attribs.c | 2 +- gcc/config/avr/avr-devices.c | 2 +- gcc/cp/ChangeLog | 5 +++++ gcc/cp/parser.c | 2 +- gcc/fortran/ChangeLog | 7 +++++++ gcc/fortran/arith.c | 2 +- gcc/fortran/resolve.c | 2 +- gcc/lra-constraints.c | 2 +- 9 files changed, 25 insertions(+), 6 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 86bb8d5..54f3cd8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2019-03-08 Jakub Jelinek + PR other/80058 + * lra-constraints.c (process_alt_operands): Avoid one space before + " at the end of line and another after " on another line in a string + literal. + * attribs.c (handle_dll_attribute): Likewise. + * config/avr/avr-devices.c (avr_texinfo): Likewise. + * gimple-ssa-warn-alloca.c (pass_walloca::execute): Don't wrap warning_at or inform messages in G_() if there is no ?:. diff --git a/gcc/attribs.c b/gcc/attribs.c index 408f920..a55638d 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -1664,7 +1664,7 @@ handle_dll_attribute (tree * pnode, tree name, tree args, int flags, && DECL_DECLARED_INLINE_P (node)) { warning (OPT_Wattributes, "inline function %q+D declared as " - " dllimport: attribute ignored", node); + "dllimport: attribute ignored", node); *no_add_attrs = true; } /* Like MS, treat definition of dllimported variables and diff --git a/gcc/config/avr/avr-devices.c b/gcc/config/avr/avr-devices.c index e6ced29..8688675 100644 --- a/gcc/config/avr/avr-devices.c +++ b/gcc/config/avr/avr-devices.c @@ -76,7 +76,7 @@ avr_texinfo[] = "the @code{MOVW} instruction." }, { ARCH_AVR3, "``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of " - " program memory." }, + "program memory." }, { ARCH_AVR31, "``Classic'' devices with 128@tie{}KiB of program memory." }, { ARCH_AVR35, diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 43184b0..2d58add 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,10 @@ 2019-03-08 Jakub Jelinek + PR other/80058 + * parser.c (cp_parser_template_declaration_after_parameters): Avoid + one space before " at the end of line and another after " on another + line in a string literal. + PR tree-optimization/89550 * semantics.c (maybe_convert_cond): Only set TREE_NO_WARNING if warning_at returned true. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index e6c2036..de2dd30 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -27865,7 +27865,7 @@ cp_parser_template_declaration_after_parameters (cp_parser* parser, if (cxx_dialect > cxx17) error ("literal operator template %qD has invalid parameter list;" " Expected non-type template parameter pack " - " or single non-type parameter of class type", + "or single non-type parameter of class type", decl); else error ("literal operator template %qD has invalid parameter list." diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 2b23b99..2840368 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2019-03-08 Jakub Jelinek + + PR other/80058 + * arith.c (gfc_complex2complex): Avoid two spaces in the middle of + diagnostics. + * resolve.c (resolve_allocate_expr): Likewise. + 2019-03-06 Harald Anlauf PR fortran/71203 diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c index 52d3a38..f2d311c 100644 --- a/gcc/fortran/arith.c +++ b/gcc/fortran/arith.c @@ -2472,7 +2472,7 @@ gfc_complex2complex (gfc_expr *src, int kind) int w = warn_conversion ? OPT_Wconversion : OPT_Wconversion_extra; gfc_warning_now (w, "Change of value in conversion from " - " %qs to %qs at %L", + "%qs to %qs at %L", gfc_typename (&src->ts), gfc_typename (&result->ts), &src->where); did_warn = true; diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 955978b..1cf9cba 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -7798,7 +7798,7 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code, bool *array_alloc_wo_spec) if (mpz_cmp_si (ar->start[i]->value.integer, 1) < 0) { gfc_error ("Upper cobound is less than lower cobound " - " of 1 at %L", &ar->start[i]->where); + "of 1 at %L", &ar->start[i]->where); goto failure; } } diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 629dc5d..afbd5d0 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -2681,7 +2681,7 @@ process_alt_operands (int only_alternative) if (lra_dump_file != NULL) fprintf (lra_dump_file, " alt=%d: reload pseudo for op %d " - " cannot hold the mode value -- refuse\n", + "cannot hold the mode value -- refuse\n", nalt, nop); goto fail; } -- cgit v1.1 From 4ee494c053787ec7f8f9a7db6c98f32c11259baf Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 8 Mar 2019 11:52:38 +0100 Subject: re PR ipa/80000 (diagnostics: trailing spaces in "one definition rule ") PR ipa/80000 * ipa-devirt.c (compare_virtual_tables): Remove two trailing spaces from diagnostics. Formatting fixes. PR target/85665 * ipa-devirt.c (odr_types_equivalent_p): Fix grammar in warn_odr diagnostics. From-SVN: r269488 --- gcc/ChangeLog | 8 ++++++++ gcc/ipa-devirt.c | 18 +++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 54f3cd8..b616535 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2019-03-08 Jakub Jelinek + PR ipa/80000 + * ipa-devirt.c (compare_virtual_tables): Remove two trailing spaces + from diagnostics. Formatting fixes. + + PR target/85665 + * ipa-devirt.c (odr_types_equivalent_p): Fix grammar in + warn_odr diagnostics. + PR other/80058 * lra-constraints.c (process_alt_operands): Avoid one space before " at the end of line and another after " on another line in a string diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index bba73b2..6d891e8 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -842,17 +842,16 @@ compare_virtual_tables (varpool_node *prevailing, varpool_node *vtable) { class_type->odr_violated = true; auto_diagnostic_group d; - if (warning_at (DECL_SOURCE_LOCATION - (TYPE_NAME (DECL_CONTEXT (vtable->decl))), - OPT_Wodr, + tree ctx = TYPE_NAME (DECL_CONTEXT (vtable->decl)); + if (warning_at (DECL_SOURCE_LOCATION (ctx), OPT_Wodr, "virtual table of type %qD violates " - "one definition rule ", + "one definition rule", DECL_CONTEXT (vtable->decl))) { - inform (DECL_SOURCE_LOCATION - (TYPE_NAME (DECL_CONTEXT (prevailing->decl))), - "the conflicting type defined in another translation " - "unit has virtual table of different size"); + ctx = TYPE_NAME (DECL_CONTEXT (prevailing->decl)); + inform (DECL_SOURCE_LOCATION (ctx), + "the conflicting type defined in another translation" + " unit has virtual table of different size"); } } return; @@ -1607,7 +1606,8 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, if (DECL_BIT_FIELD (f1) != DECL_BIT_FIELD (f2)) { warn_odr (t1, t2, f1, f2, warn, warned, - G_("one field is bitfield while other is not")); + G_("one field is a bitfield while the other " + "is not")); return false; } else -- cgit v1.1 From ec07e94bbf22be8cd8f47e34de5e764437e33774 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 8 Mar 2019 11:53:27 +0100 Subject: re PR target/79846 (s390: untranslatable diagnostic in s390.c) PR target/79846 * config/s390/s390.c (s390_const_operand_ok): Use %wu instead of HOST_WIDE_INT_PRINT_UNSIGNED and %wd instead of HOST_WIDE_INT_PRINT_DEC. Formatting fixes. From-SVN: r269489 --- gcc/ChangeLog | 5 +++++ gcc/config/s390/s390.c | 17 +++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b616535..f56b266 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2019-03-08 Jakub Jelinek + PR target/79846 + * config/s390/s390.c (s390_const_operand_ok): Use %wu instead of + HOST_WIDE_INT_PRINT_UNSIGNED and %wd instead of + HOST_WIDE_INT_PRINT_DEC. Formatting fixes. + PR ipa/80000 * ipa-devirt.c (compare_virtual_tables): Remove two trailing spaces from diagnostics. Formatting fixes. diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index aff2718..fce463f 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -734,10 +734,9 @@ s390_const_operand_ok (tree arg, int argnum, int op_flags, tree decl) if (!tree_fits_uhwi_p (arg) || tree_to_uhwi (arg) > (HOST_WIDE_INT_1U << bitwidth) - 1) { - error("constant argument %d for builtin %qF is out of range (0.." - HOST_WIDE_INT_PRINT_UNSIGNED ")", - argnum, decl, - (HOST_WIDE_INT_1U << bitwidth) - 1); + error ("constant argument %d for builtin %qF is out of range " + "(0..%wu)", argnum, decl, + (HOST_WIDE_INT_1U << bitwidth) - 1); return false; } } @@ -751,12 +750,10 @@ s390_const_operand_ok (tree arg, int argnum, int op_flags, tree decl) || tree_to_shwi (arg) < -(HOST_WIDE_INT_1 << (bitwidth - 1)) || tree_to_shwi (arg) > ((HOST_WIDE_INT_1 << (bitwidth - 1)) - 1)) { - error("constant argument %d for builtin %qF is out of range (" - HOST_WIDE_INT_PRINT_DEC ".." - HOST_WIDE_INT_PRINT_DEC ")", - argnum, decl, - -(HOST_WIDE_INT_1 << (bitwidth - 1)), - (HOST_WIDE_INT_1 << (bitwidth - 1)) - 1); + error ("constant argument %d for builtin %qF is out of range " + "(%wd..%wd)", argnum, decl, + -(HOST_WIDE_INT_1 << (bitwidth - 1)), + (HOST_WIDE_INT_1 << (bitwidth - 1)) - 1); return false; } } -- cgit v1.1 From 37555926fe70c828675b5d3e165cb291b283a978 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 8 Mar 2019 13:37:54 +0100 Subject: Restrict IPA split (PR go/63560). 2019-03-08 Jan Hubicka PR go/63560 * ipa-split.c (execute_split_functions): Do not split 'noinline' or 'section' function. From-SVN: r269491 --- gcc/ChangeLog | 6 ++++++ gcc/ipa-split.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f56b266..de7bdde 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-08 Jan Hubicka + + PR go/63560 + * ipa-split.c (execute_split_functions): Do not split + 'noinline' or 'section' function. + 2019-03-08 Jakub Jelinek PR target/79846 diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index cfd03ab..5eaf825 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -104,6 +104,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple-pretty-print.h" #include "ipa-fnsummary.h" #include "cfgloop.h" +#include "attribs.h" /* Per basic block info. */ @@ -1751,6 +1752,20 @@ execute_split_functions (void) return 0; } + if (lookup_attribute ("noinline", DECL_ATTRIBUTES (current_function_decl))) + { + if (dump_file) + fprintf (dump_file, "Not splitting: function is noinline.\n"); + return 0; + } + if (lookup_attribute ("section", DECL_ATTRIBUTES (current_function_decl))) + { + if (dump_file) + fprintf (dump_file, "Not splitting: function is in user defined " + "section.\n"); + return 0; + } + /* We enforce splitting after loop headers when profile info is not available. */ if (profile_status_for_fn (cfun) != PROFILE_READ) -- cgit v1.1 From f62d3527db908646a518b1c1412210a3ae645d73 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 8 Mar 2019 13:55:40 +0100 Subject: x86: Disable jump tables when retpolines are used (PR target/86952). 2019-03-08 Martin Liska PR target/86952 * config/i386/i386.c (ix86_option_override_internal): Disable jump tables when retpolines are used. 2019-03-08 Martin Liska PR target/86952 * gcc.target/i386/pr86952.c: New test. * gcc.target/i386/indirect-thunk-7.c: Use jump tables to match scanned pattern. * gcc.target/i386/indirect-thunk-inline-7.c: Likewise. From-SVN: r269492 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 6 ++++++ gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 2 +- .../gcc.target/i386/indirect-thunk-inline-7.c | 2 +- gcc/testsuite/gcc.target/i386/pr86952.c | 23 ++++++++++++++++++++++ 6 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr86952.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index de7bdde..5e737bd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-08 Martin Liska + + PR target/86952 + * config/i386/i386.c (ix86_option_override_internal): Disable + jump tables when retpolines are used. + 2019-03-08 Jan Hubicka PR go/63560 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 2d6a993..319caed 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4894,6 +4894,12 @@ ix86_option_override_internal (bool main_args_p, opts->x_param_values, opts_set->x_param_values); + /* PR86952: jump table usage with retpolines is slow. + The PR provides some numbers about the slowness. */ + if (ix86_indirect_branch != indirect_branch_keep + && !opts_set->x_flag_jump_tables) + opts->x_flag_jump_tables = 0; + return true; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4010924..9d386f6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2019-03-08 Martin Liska + + PR target/86952 + * gcc.target/i386/pr86952.c: New test. + * gcc.target/i386/indirect-thunk-7.c: Use jump tables to match + scanned pattern. + * gcc.target/i386/indirect-thunk-inline-7.c: Likewise. + 2019-03-08 Jakub Jelinek PR c++/89585 diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c index 3c72036..53868f4 100644 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c +++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */ +/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic -fjump-tables" } */ void func0 (void); void func1 (void); diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c index ea00924..e6f0649 100644 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c +++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */ +/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic -fjump-tables" } */ void func0 (void); void func1 (void); diff --git a/gcc/testsuite/gcc.target/i386/pr86952.c b/gcc/testsuite/gcc.target/i386/pr86952.c new file mode 100644 index 0000000..3ff3e35 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr86952.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mindirect-branch=thunk -fdump-tree-switchlower1" } */ + +int global; + +int +foo (int x) +{ + switch (x & 7) + { + case 0: ; return 1722; + case 1: global += 1; return 1060; + case 2: ; return 1990; + case 3: ; return 1242; + case 4: ; return 1466; + case 5: ; return 894; + case 6: ; return 570; + case 7: ; return 572; + default: return 0; + } +} + +/* { dg-final { scan-tree-dump ";; GIMPLE switch case clusters: 1 2 3 4 5 6 7" "switchlower1" } } */ -- cgit v1.1 From 752e334b3acacf188a9bb14aec278c93ea42988b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 8 Mar 2019 15:04:27 +0100 Subject: Add tests for resolved PR (PR c/85870). 2019-03-08 Jakub Jelinek PR c/85870 * gcc.dg/lto/pr85870_0.c: New test. * gcc.dg/lto/pr85870_1.c: New test. From-SVN: r269495 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/lto/pr85870_0.c | 34 ++++++++++++++++++++++++++++++++++ gcc/testsuite/gcc.dg/lto/pr85870_1.c | 27 +++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/lto/pr85870_0.c create mode 100644 gcc/testsuite/gcc.dg/lto/pr85870_1.c (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9d386f6..b566c62 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-08 Jakub Jelinek + + PR c/85870 + * gcc.dg/lto/pr85870_0.c: New test. + * gcc.dg/lto/pr85870_1.c: New test. + 2019-03-08 Martin Liska PR target/86952 diff --git a/gcc/testsuite/gcc.dg/lto/pr85870_0.c b/gcc/testsuite/gcc.dg/lto/pr85870_0.c new file mode 100644 index 0000000..4b59f60 --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/pr85870_0.c @@ -0,0 +1,34 @@ +/* PR c/85870 */ +/* { dg-lto-do link } */ +/* { dg-lto-options { { -flto -O2 } } } */ + +typedef struct abc_s { + char a1; + short a2; + unsigned int a3; + unsigned int a4; +} abc; + +typedef struct xyz_s { + unsigned x1; + unsigned x2; + abc *x3; +} xyz; + +extern xyz XYZ[3]; +static const abc Arr1[]={ + {0,0,0xdeadbeaf,0xbeefdead} , +#line 1040 + {0,0,0xdeadbeaf,0xbeefdead} }; + +void init_xyz_0() { + XYZ[0].x1=975753; + XYZ[0].x2=1024; + XYZ[0].x3=(abc *)Arr1; + +} + +int +main () +{ +} diff --git a/gcc/testsuite/gcc.dg/lto/pr85870_1.c b/gcc/testsuite/gcc.dg/lto/pr85870_1.c new file mode 100644 index 0000000..cd1cd31 --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/pr85870_1.c @@ -0,0 +1,27 @@ +typedef struct abc_s { + char a1; + short a2; + unsigned int a3; + unsigned int a4; +} abc; + + +typedef struct xyz_s { + unsigned int x1; + unsigned int x2; + abc *x3; +} xyz; + + +extern xyz XYZ[3]; +static const abc Arr2[]={ + {0,0,0xbeafdead,0xdeadbeef} , +#line 1048594 + {0,0,0xbeafdead,0xdeadbeef} }; + +void init_xyz_1() { + XYZ[1].x1=425753; + XYZ[1].x2=1048576; + XYZ[1].x3=(abc *)Arr2; + +} -- cgit v1.1 From 9a53d503a433b3ca0c4e312e9ebea5f1b344efed Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 8 Mar 2019 16:53:47 +0100 Subject: re PR target/68924 (No intrinsic for x86 `MOVQ m64, %xmm` in 32bit mode.) PR target/68924 PR target/78782 PR target/87558 * config/i386/emmintrin.h (_mm_loadu_si64): New intrinsic. (_mm_storeu_si64): Ditto. testsuite/ChangeLog: PR target/68924 PR target/78782 PR target/87558 * gcc.target/i386/pr78782.c: New test. * gcc.target/i386/pr87558.c: Ditto. From-SVN: r269497 --- gcc/ChangeLog | 8 ++++++++ gcc/config/i386/emmintrin.h | 12 ++++++++++++ gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/gcc.target/i386/pr78782.c | 9 +++++++++ gcc/testsuite/gcc.target/i386/pr87558.c | 9 +++++++++ 5 files changed, 46 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr78782.c create mode 100644 gcc/testsuite/gcc.target/i386/pr87558.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5e737bd..9ecc07d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-03-08 Uroš Bizjak + + PR target/68924 + PR target/78782 + PR target/87558 + * config/i386/emmintrin.h (_mm_loadu_si64): New intrinsic. + (_mm_storeu_si64): Ditto. + 2019-03-08 Martin Liska PR target/86952 diff --git a/gcc/config/i386/emmintrin.h b/gcc/config/i386/emmintrin.h index d9bc3f7..f9e7b33 100644 --- a/gcc/config/i386/emmintrin.h +++ b/gcc/config/i386/emmintrin.h @@ -709,6 +709,12 @@ _mm_loadl_epi64 (__m128i_u const *__P) return _mm_set_epi64 ((__m64)0LL, *(__m64_u *)__P); } +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadu_si64 (void const *__P) +{ + return _mm_loadl_epi64 ((__m128i_u *)__P); +} + extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_store_si128 (__m128i *__P, __m128i __B) { @@ -727,6 +733,12 @@ _mm_storel_epi64 (__m128i_u *__P, __m128i __B) *(__m64_u *)__P = (__m64) ((__v2di)__B)[0]; } +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeu_si64 (void *__P, __m128i __B) +{ + _mm_storel_epi64 ((__m128i_u *)__P, __B); +} + extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_movepi64_pi64 (__m128i __B) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b566c62..a58b29d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2019-03-08 Uroš Bizjak + + PR target/68924 + PR target/78782 + PR target/87558 + * gcc.target/i386/pr78782.c: New test. + * gcc.target/i386/pr87558.c: Ditto. + 2019-03-08 Jakub Jelinek PR c/85870 diff --git a/gcc/testsuite/gcc.target/i386/pr78782.c b/gcc/testsuite/gcc.target/i386/pr78782.c new file mode 100644 index 0000000..e91d953 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr78782.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -msse2" } */ + +#include + +__m128i foo (unsigned char *p) +{ + return _mm_loadu_si64 ((void *)p); +} diff --git a/gcc/testsuite/gcc.target/i386/pr87558.c b/gcc/testsuite/gcc.target/i386/pr87558.c new file mode 100644 index 0000000..c210507 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr87558.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -msse2" } */ + +#include + +void foo (unsigned char *p, __m128i x) +{ + _mm_storeu_si64 ((void *)p, x); +} -- cgit v1.1 From f65112f61661d4a62b8952eda126e4cbca4195b1 Mon Sep 17 00:00:00 2001 From: Andre Vieira Date: Fri, 8 Mar 2019 17:29:02 +0000 Subject: [GCC, Arm] Fix availability of FP16-FP64 conversion instructions vcvtb.f16.f64 and vcvtb.f64.f16 were being made available even for FPUs that do not support double precision. This patch fixes that. gcc/ChangeLog: 2019-03-08 Andre Vieira * config/arm/arm.h (TARGET_FP16_TO_DOUBLE): Add TARGET_VFP_DOUBLE requirement. gcc/testsuite/ChangeLog: 2019-03-08 Andre Vieira * gcc.target/arm/f16_f64_conv_no_dp.c: New test. From-SVN: r269499 --- gcc/ChangeLog | 5 +++++ gcc/config/arm/arm.h | 2 +- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c | 15 +++++++++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9ecc07d..ad486b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-03-08 Andre Vieira + + * config/arm/arm.h (TARGET_FP16_TO_DOUBLE): Add TARGET_VFP_DOUBLE + requirement. + 2019-03-08 Uroš Bizjak PR target/68924 diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 103d390..7adafea 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -195,7 +195,7 @@ extern tree arm_fp16_type_node; /* FPU supports converting between HFmode and DFmode in a single hardware step. */ #define TARGET_FP16_TO_DOUBLE \ - (TARGET_HARD_FLOAT && (TARGET_FP16 && TARGET_VFP5)) + (TARGET_HARD_FLOAT && TARGET_FP16 && TARGET_VFP5 && TARGET_VFP_DOUBLE) /* FPU supports fused-multiply-add operations. */ #define TARGET_FMA (bitmap_bit_p (arm_active_target.isa, isa_bit_vfpv4)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a58b29d..13b91c7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-03-08 Andre Vieira + + * gcc.target/arm/f16_f64_conv_no_dp.c: New test. + 2019-03-08 Uroš Bizjak PR target/68924 diff --git a/gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c b/gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c new file mode 100644 index 0000000..99b62a8 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-skip-if "do not override fpu" { *-*-* } { "-mfpu=*" } { "-mfpu=fpv5-sp-d16" } } */ +/* { dg-skip-if "do not disable fpu" { *-*-* } { "-mfloat-abi=soft" } { * } } */ +/* { dg-skip-if "do not override fp16-format" { *-*-* } { "-mfp16-format=*" } { "-mfp16-format=ieee" } } */ +/* { dg-options "-O1 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee" } */ + +__fp16 foo (double a) +{ + return a; +} + +double bar (__fp16 a) +{ + return a; +} -- cgit v1.1 From 3a3998f36a6b8f0c3eb90a8c6f6970f4be3cde79 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Fri, 8 Mar 2019 18:18:23 +0000 Subject: Fix POLY_INT_CST/CONST_POLY_INT typo (PR 89631) 2019-03-08 Richard Sandiford gcc/ PR debug/89631 * dwarf2cfi.c (dwarf2out_frame_debug_expr): Use CONST_POLY_INT instead of POLY_INT_CST. From-SVN: r269500 --- gcc/ChangeLog | 6 ++++++ gcc/dwarf2cfi.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ad486b4..fc347dc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-08 Richard Sandiford + + PR debug/89631 + * dwarf2cfi.c (dwarf2out_frame_debug_expr): Use CONST_POLY_INT + instead of POLY_INT_CST. + 2019-03-08 Andre Vieira * config/arm/arm.h (TARGET_FP16_TO_DOUBLE): Add TARGET_VFP_DOUBLE diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 86b88c6..d6aed35 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -1778,7 +1778,7 @@ dwarf2out_frame_debug_expr (rtx expr) /* Rule 6 */ case CONST_INT: - case POLY_INT_CST: + case CONST_POLY_INT: cur_trace->cfa_temp.reg = dwf_regno (dest); cur_trace->cfa_temp.offset = rtx_to_poly_int64 (src); break; -- cgit v1.1 From 6fbaad21546a628edfc44ba6b2db419504d16203 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 8 Mar 2019 19:31:27 +0100 Subject: re PR c++/82075 (structured binding fails with empty base class) PR c++/82075 * g++.dg/cpp1z/decomp49.C: New test. From-SVN: r269504 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp1z/decomp49.C | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp1z/decomp49.C (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 13b91c7..baa3126 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-08 Jakub Jelinek + + PR c++/82075 + * g++.dg/cpp1z/decomp49.C: New test. + 2019-03-08 Andre Vieira * gcc.target/arm/f16_f64_conv_no_dp.c: New test. diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp49.C b/gcc/testsuite/g++.dg/cpp1z/decomp49.C new file mode 100644 index 0000000..525eb45 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/decomp49.C @@ -0,0 +1,14 @@ +// PR c++/82075 +// { dg-do run { target c++11 } } +// { dg-options "" } + +struct B { }; +struct D : B { int i; }; + +int +main () +{ + auto [i] = D{}; // { dg-warning "only available with" "" { target c++14_down } } + if (i != 0) + __builtin_abort (); +} -- cgit v1.1 From 792deebfe42e6abf4fa79e6f34882a773d06bb13 Mon Sep 17 00:00:00 2001 From: Bill Schmidt Date: Fri, 8 Mar 2019 19:47:05 +0000 Subject: rs6000-p8swap.c (rs6000_analyze_swaps): Rebuild ud- and du-chains between phases. 2019-03-08 Bill Schmidt * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Rebuild ud- and du-chains between phases. From-SVN: r269505 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/rs6000-p8swap.c | 7 +++++++ 2 files changed, 12 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc347dc..15910aa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-03-08 Bill Schmidt + + * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Rebuild + ud- and du-chains between phases. + 2019-03-08 Richard Sandiford PR debug/89631 diff --git a/gcc/config/rs6000/rs6000-p8swap.c b/gcc/config/rs6000/rs6000-p8swap.c index bb9c167..c3b9831 100644 --- a/gcc/config/rs6000/rs6000-p8swap.c +++ b/gcc/config/rs6000/rs6000-p8swap.c @@ -2316,7 +2316,14 @@ rs6000_analyze_swaps (function *fun) /* Pre-pass to recombine lvx and stvx patterns so we don't lose info. */ recombine_lvx_stvx_patterns (fun); + + /* Rebuild ud- and du-chains. */ + df_remove_problem (df_chain); df_process_deferred_rescans (); + df_set_flags (DF_RD_PRUNE_DEAD_DEFS); + df_chain_add_problem (DF_DU_CHAIN | DF_UD_CHAIN); + df_analyze (); + df_set_flags (DF_DEFER_INSN_RESCAN); /* Allocate structure to represent webs of insns. */ insn_entry = XCNEWVEC (swap_web_entry, get_max_uid ()); -- cgit v1.1 From a8ce2144c15b47eebf9a1e27f9634a814a3bb481 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 8 Mar 2019 20:59:39 +0000 Subject: re PR c++/22149 (func pointer non-type template parm invalid access control) 2019-03-08 Paolo Carlini PR c++/22149 * g++.dg/template/access29.C: New. From-SVN: r269507 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/template/access29.C | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/access29.C (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index baa3126..f38eb2a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-08 Paolo Carlini + + PR c++/22149 + * g++.dg/template/access29.C: New. + 2019-03-08 Jakub Jelinek PR c++/82075 diff --git a/gcc/testsuite/g++.dg/template/access29.C b/gcc/testsuite/g++.dg/template/access29.C new file mode 100644 index 0000000..01f1187 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/access29.C @@ -0,0 +1,22 @@ +// PR c++/22149 + +template < void (*FOOBAR) () > +class foo { +public: + foo () { (*FOOBAR) (); } +}; + +class bar { +public: + bar () { foo < bar::foobar > tmp; } +private: + static void foobar () + { + } +}; + +int +main () +{ + bar b; +} -- cgit v1.1 From 49c1f7a6c54fe16b603d409df4974e584efbe2ea Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 8 Mar 2019 21:22:07 +0000 Subject: re PR c++/63540 (Erroneous "'Derived' declares a move constructor or move assignment operator" in error.) 2019-03-08 Paolo Carlini PR c++/63540 * g++.dg/cpp0x/implicit17.C: New. From-SVN: r269508 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/implicit17.C | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/implicit17.C (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f38eb2a..0b820ac 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2019-03-08 Paolo Carlini + PR c++/63540 + * g++.dg/cpp0x/implicit17.C: New. + +2019-03-08 Paolo Carlini + PR c++/22149 * g++.dg/template/access29.C: New. diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit17.C b/gcc/testsuite/g++.dg/cpp0x/implicit17.C new file mode 100644 index 0000000..795bc4d --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/implicit17.C @@ -0,0 +1,18 @@ +// PR c++/63540 +// { dg-do compile { target c++11 } } + +template (0) = 0)> int break_it(); +template int break_it(); + +struct Base { + Base(const Base &); + void operator=(Base &&); +}; + +struct Derived : Base { + using Base::operator=; +}; + +int a = break_it(); +Derived v(v); -- cgit v1.1 From ec0f936b30ef0065907ce0a45d0fa9053763f3e3 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 8 Mar 2019 22:27:08 +0000 Subject: i386.c: make "sorry" message more amenable to translation (PR target/79926) gcc/ChangeLog: PR target/79926 * config/i386/i386.c (ix86_set_current_function): Make "sorry" messages more amenable to translation, and improve wording. gcc/testsuite/ChangeLog: PR target/79926 * gcc.target/i386/interrupt-387-err-1.c: Update expected message. * gcc.target/i386/interrupt-387-err-2.c: Likewise. * gcc.target/i386/interrupt-mmx-err-1.c: Likewise. * gcc.target/i386/interrupt-mmx-err-2.c: Likewise. From-SVN: r269515 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 13 ++++++++----- gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c | 4 ++-- gcc/testsuite/gcc.target/i386/interrupt-387-err-2.c | 2 +- gcc/testsuite/gcc.target/i386/interrupt-mmx-err-1.c | 4 ++-- gcc/testsuite/gcc.target/i386/interrupt-mmx-err-2.c | 2 +- 7 files changed, 28 insertions(+), 11 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 15910aa..564ad3e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-08 David Malcolm + + PR target/79926 + * config/i386/i386.c (ix86_set_current_function): Make "sorry" + messages more amenable to translation, and improve wording. + 2019-03-08 Bill Schmidt * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Rebuild diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 319caed..e50938c 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5999,12 +5999,15 @@ ix86_set_current_function (tree fndecl) if (isa != NULL) { if (cfun->machine->func_type != TYPE_NORMAL) - sorry ("%s instructions aren't allowed in %s service routine", - isa, (cfun->machine->func_type == TYPE_EXCEPTION - ? "exception" : "interrupt")); + sorry (cfun->machine->func_type == TYPE_EXCEPTION + ? G_("%s instructions aren%'t allowed in an" + " exception service routine") + : G_("%s instructions aren%'t allowed in an" + " interrupt service routine"), + isa); else - sorry ("%s instructions aren't allowed in function with " - "no_caller_saved_registers attribute", isa); + sorry ("%s instructions aren%'t allowed in a function with " + "the % attribute", isa); /* Don't issue the same error twice. */ cfun->machine->func_type = TYPE_NORMAL; cfun->machine->no_caller_saved_registers = false; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0b820ac..1605c21 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2019-03-08 David Malcolm + + PR target/79926 + * gcc.target/i386/interrupt-387-err-1.c: Update expected message. + * gcc.target/i386/interrupt-387-err-2.c: Likewise. + * gcc.target/i386/interrupt-mmx-err-1.c: Likewise. + * gcc.target/i386/interrupt-mmx-err-2.c: Likewise. + 2019-03-08 Paolo Carlini PR c++/63540 diff --git a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c index 3fbdc88..8561a3c 100644 --- a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c +++ b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c @@ -6,11 +6,11 @@ typedef unsigned int uword_t __attribute__ ((mode (__word__))); void __attribute__((interrupt)) fn1 (void *frame, uword_t error) -{ /* { dg-message "80387 instructions aren't allowed in exception service routine" } */ +{ /* { dg-message "80387 instructions aren't allowed in an exception service routine" } */ } void __attribute__((interrupt)) fn2 (void *frame) -{ /* { dg-message "80387 instructions aren't allowed in interrupt service routine" } */ +{ /* { dg-message "80387 instructions aren't allowed in an interrupt service routine" } */ } diff --git a/gcc/testsuite/gcc.target/i386/interrupt-387-err-2.c b/gcc/testsuite/gcc.target/i386/interrupt-387-err-2.c index 3203d64..9810f18 100644 --- a/gcc/testsuite/gcc.target/i386/interrupt-387-err-2.c +++ b/gcc/testsuite/gcc.target/i386/interrupt-387-err-2.c @@ -4,5 +4,5 @@ void __attribute__((no_caller_saved_registers)) fn1 (void) -{ /* { dg-message "80387 instructions aren't allowed in function with no_caller_saved_registers attribute" } */ +{ /* { dg-message "80387 instructions aren't allowed in a function with the 'no_caller_saved_registers' attribute" } */ } diff --git a/gcc/testsuite/gcc.target/i386/interrupt-mmx-err-1.c b/gcc/testsuite/gcc.target/i386/interrupt-mmx-err-1.c index cd1367b..8c14594 100644 --- a/gcc/testsuite/gcc.target/i386/interrupt-mmx-err-1.c +++ b/gcc/testsuite/gcc.target/i386/interrupt-mmx-err-1.c @@ -6,11 +6,11 @@ typedef unsigned int uword_t __attribute__ ((mode (__word__))); void __attribute__((interrupt)) fn1 (void *frame) -{ /* { dg-message "MMX/3Dnow instructions aren't allowed in interrupt service routine" } */ +{ /* { dg-message "MMX/3Dnow instructions aren't allowed in an interrupt service routine" } */ } void __attribute__((interrupt)) fn2 (void *frame, uword_t error) -{ /* { dg-message "MMX/3Dnow instructions aren't allowed in exception service routine" } */ +{ /* { dg-message "MMX/3Dnow instructions aren't allowed in an exception service routine" } */ } diff --git a/gcc/testsuite/gcc.target/i386/interrupt-mmx-err-2.c b/gcc/testsuite/gcc.target/i386/interrupt-mmx-err-2.c index 3e9f70c..073700e 100644 --- a/gcc/testsuite/gcc.target/i386/interrupt-mmx-err-2.c +++ b/gcc/testsuite/gcc.target/i386/interrupt-mmx-err-2.c @@ -4,5 +4,5 @@ void __attribute__((no_caller_saved_registers)) fn1 (void) -{ /* { dg-message "MMX/3Dnow instructions aren't allowed in function with no_caller_saved_registers attribute" } */ +{ /* { dg-message "MMX/3Dnow instructions aren't allowed in a function with the 'no_caller_saved_registers' attribute" } */ } -- cgit v1.1 From 407974ae816364d6d1652e5ade1e95cab8093f67 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 8 Mar 2019 23:30:34 +0100 Subject: re PR c/85870 ([LTO1] ICE in linemap_line_start, at libcpp/line-map.c:794) PR c/85870 * gcc.dg/lto/pr85870_0.c: Add dg-extra-ld-options with -r -nostdlib -flinker-output=nolto-rel. From-SVN: r269516 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/lto/pr85870_0.c | 1 + 2 files changed, 7 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1605c21..02f2482 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-08 Jakub Jelinek + + PR c/85870 + * gcc.dg/lto/pr85870_0.c: Add dg-extra-ld-options with + -r -nostdlib -flinker-output=nolto-rel. + 2019-03-08 David Malcolm PR target/79926 diff --git a/gcc/testsuite/gcc.dg/lto/pr85870_0.c b/gcc/testsuite/gcc.dg/lto/pr85870_0.c index 4b59f60..b57ac7c 100644 --- a/gcc/testsuite/gcc.dg/lto/pr85870_0.c +++ b/gcc/testsuite/gcc.dg/lto/pr85870_0.c @@ -1,6 +1,7 @@ /* PR c/85870 */ /* { dg-lto-do link } */ /* { dg-lto-options { { -flto -O2 } } } */ +/* { dg-extra-ld-options { -r -nostdlib -flinker-output=nolto-rel } } */ typedef struct abc_s { char a1; -- cgit v1.1 From 9c0aa28c4818ab2477910dacdfdceb3cb33c8629 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 9 Mar 2019 00:16:18 +0000 Subject: Daily bump. From-SVN: r269520 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 6d65f6b..9dc8722 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20190308 +20190309 -- cgit v1.1 From ee973155b2fd00dfe0ef6a3563c9623512f6632e Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sat, 9 Mar 2019 02:10:22 +0000 Subject: re PR go/89447 (libgo largefile support is incomplete and inconsistent) PR go/89447 syscall, internal/syscall: adjust use of largefile functions Consistently call __go_openat for openat. Use fstatat64, creat64, sendfile64, and getdents64 where needed. Based on patch by Rainer Orth. Fixes https://gcc.gnu.org/PR89447 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166420 From-SVN: r269521 --- gcc/go/gofrontend/MERGE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index f1bbc37..3c0ee14 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -959260238817af3205fb9907dd92319291e6a893 +3106ec19626d75d8275be16c86421132548fa13e The first line of this file holds the git revision number of the last merge done from the gofrontend repository. -- cgit v1.1 From 23c6448136e9a8aa7dbf7a6d2a76efbe8edf1681 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 9 Mar 2019 09:25:48 +0100 Subject: re PR rtl-optimization/89634 (gmp-ecm miscompilation on s390x with -march=zEC12 -m64 -O2) PR rtl-optimization/89634 * cfgcleanup.c (thread_jump): Punt if registers mentioned in cond1 are modified in BB_END (e->src) instruction. * gcc.c-torture/execute/pr89634.c: New test. From-SVN: r269522 --- gcc/ChangeLog | 6 ++++ gcc/cfgcleanup.c | 5 ++++ gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/gcc.c-torture/execute/pr89634.c | 40 +++++++++++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr89634.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 564ad3e..5cac152 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-09 Jakub Jelinek + + PR rtl-optimization/89634 + * cfgcleanup.c (thread_jump): Punt if registers mentioned in cond1 + are modified in BB_END (e->src) instruction. + 2019-03-08 David Malcolm PR target/79926 diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index fd27fd6..86b2627 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -308,6 +308,11 @@ thread_jump (edge e, basic_block b) || !rtx_equal_p (XEXP (cond1, 1), XEXP (cond2, 1))) return NULL; + /* Punt if BB_END (e->src) is doloop-like conditional jump that modifies + the registers used in cond1. */ + if (modified_in_p (cond1, BB_END (e->src))) + return NULL; + /* Short circuit cases where block B contains some side effects, as we can't safely bypass it. */ for (insn = NEXT_INSN (BB_HEAD (b)); insn != NEXT_INSN (BB_END (b)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 02f2482..f32b5af 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-09 Jakub Jelinek + + PR rtl-optimization/89634 + * gcc.c-torture/execute/pr89634.c: New test. + 2019-03-08 Jakub Jelinek PR c/85870 diff --git a/gcc/testsuite/gcc.c-torture/execute/pr89634.c b/gcc/testsuite/gcc.c-torture/execute/pr89634.c new file mode 100644 index 0000000..b633e61 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr89634.c @@ -0,0 +1,40 @@ +/* PR rtl-optimization/89634 */ + +static unsigned long * +foo (unsigned long *x) +{ + return x + (1 + *x); +} + +__attribute__((noipa)) unsigned long +bar (unsigned long *x) +{ + unsigned long c, d = 1, e, *f, g, h = 0, i; + for (e = *x - 1; e > 0; e--) + { + f = foo (x + 1); + for (i = 1; i < e; i++) + f = foo (f); + c = *f; + if (c == 2) + d *= 2; + else + { + i = (c - 1) / 2 - 1; + g = (2 * i + 1) * (d + 1) + (2 * d + 1); + if (g > h) + h = g; + d *= c; + } + } + return h; +} + +int +main () +{ + unsigned long a[18] = { 4, 2, -200, 200, 2, -400, 400, 3, -600, 0, 600, 5, -100, -66, 0, 66, 100, __LONG_MAX__ / 8 + 1 }; + if (bar (a) != 17) + __builtin_abort (); + return 0; +} -- cgit v1.1 From 04e5c73db8b51c76bff5fb30553089ccfa7bb5fc Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 9 Mar 2019 10:28:04 +0100 Subject: re PR target/79645 (missing period in microblaze.opt) PR target/79645 * common.opt (fdiagnostics-show-labels, fdiagnostics-show-line-numbers, fdiagnostics-format=, fdiagnostics-minimum-margin-width=, fgnat-encodings=, gas-loc-support, gas-locview-support, ginline-points, ginternal-reset-location-views): Terminate description text with a dot. * config/microblaze/microblaze.opt (mxl-prefetch): Likewise. * config/mcore/mcore.opt (m210, m340): Likewise. * config/epiphany/epiphany.opt (mprefer-short-insn-regs, mcmove, mnops=): Start description text with a capital letter. * config/arc/arc.opt (msize-level=): Likewise. * config/sh/sh.opt (minline-ic_invalidate): Likewise. * config/rs6000/sysv4.opt (mno-toc, mtoc, mno-traceback, mshlib, mnewlib): Likewise. * config/ft32/ft32.opt (msim): Likewise. (mft32b, mcompress): Likewise. Terminate description text with a dot. (mnodiv, mnopm): Terminate description text with a dot. * config/c6x/c6x.opt (c6x_sdata): Terminate Enum description with a colon. * config/i386/i386.opt (prefer_vector_width, instrument_return): Likewise. * config/rx/rx.opt (nofpu): Remove trailing spaces from description text. lto/ * lang.opt: Terminate description text with a dot. From-SVN: r269523 --- gcc/ChangeLog | 24 ++++++++++++++++++++++++ gcc/common.opt | 18 +++++++++--------- gcc/config/arc/arc.opt | 2 +- gcc/config/c6x/c6x.opt | 2 +- gcc/config/epiphany/epiphany.opt | 6 +++--- gcc/config/ft32/ft32.opt | 10 +++++----- gcc/config/i386/i386.opt | 4 ++-- gcc/config/mcore/mcore.opt | 4 ++-- gcc/config/microblaze/microblaze.opt | 2 +- gcc/config/rs6000/sysv4.opt | 10 +++++----- gcc/config/rx/rx.opt | 2 +- gcc/config/sh/sh.opt | 2 +- gcc/lto/ChangeLog | 5 +++++ gcc/lto/lang.opt | 2 +- 14 files changed, 61 insertions(+), 32 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5cac152..a4cfe91 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,29 @@ 2019-03-09 Jakub Jelinek + PR target/79645 + * common.opt (fdiagnostics-show-labels, + fdiagnostics-show-line-numbers, fdiagnostics-format=, + fdiagnostics-minimum-margin-width=, fgnat-encodings=, gas-loc-support, + gas-locview-support, ginline-points, ginternal-reset-location-views): + Terminate description text with a dot. + * config/microblaze/microblaze.opt (mxl-prefetch): Likewise. + * config/mcore/mcore.opt (m210, m340): Likewise. + * config/epiphany/epiphany.opt (mprefer-short-insn-regs, mcmove, + mnops=): Start description text with a capital letter. + * config/arc/arc.opt (msize-level=): Likewise. + * config/sh/sh.opt (minline-ic_invalidate): Likewise. + * config/rs6000/sysv4.opt (mno-toc, mtoc, mno-traceback, mshlib, + mnewlib): Likewise. + * config/ft32/ft32.opt (msim): Likewise. + (mft32b, mcompress): Likewise. Terminate description text with a dot. + (mnodiv, mnopm): Terminate description text with a dot. + * config/c6x/c6x.opt (c6x_sdata): Terminate Enum description with + a colon. + * config/i386/i386.opt (prefer_vector_width, instrument_return): + Likewise. + * config/rx/rx.opt (nofpu): Remove trailing spaces from description + text. + PR rtl-optimization/89634 * cfgcleanup.c (thread_jump): Punt if registers mentioned in cond1 are modified in BB_END (e->src) instruction. diff --git a/gcc/common.opt b/gcc/common.opt index fb42e18..d342c4f 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1251,11 +1251,11 @@ Show the source line with a caret indicating the column. fdiagnostics-show-labels Common Var(flag_diagnostics_show_labels) Init(1) -Show labels annotating ranges of source code when showing source +Show labels annotating ranges of source code when showing source. fdiagnostics-show-line-numbers Common Var(flag_diagnostics_show_line_numbers) Init(1) -Show line numbers in the left margin when showing source +Show line numbers in the left margin when showing source. fdiagnostics-color Common Alias(fdiagnostics-color=,always,never) @@ -1283,7 +1283,7 @@ Enum(diagnostic_color_rule) String(auto) Value(DIAGNOSTICS_COLOR_AUTO) fdiagnostics-format= Common Joined RejectNegative Enum(diagnostics_output_format) --fdiagnostics-format=[text|json] Select output format +-fdiagnostics-format=[text|json] Select output format. ; Required for these enum values. SourceInclude @@ -1312,7 +1312,7 @@ Amend appropriate diagnostic messages with the command line option that controls fdiagnostics-minimum-margin-width= Common Joined UInteger Var(diagnostics_minimum_margin_width) Init(6) -Set minimum width of left margin of source code when showing source +Set minimum width of left margin of source code when showing source. fdisable- Common Joined RejectNegative Var(common_deferred_options) Defer @@ -1521,7 +1521,7 @@ Enum(dwarf_gnat_encodings) String(minimal) Value(DWARF_GNAT_ENCODINGS_MINIMAL) fgnat-encodings= Common Enum(dwarf_gnat_encodings) Joined RejectNegative Report Undocumented Var(gnat_encodings) --fgnat-encodings=[all|gdb|minimal] Select the balance between GNAT encodings and standard DWARF emitted in the debug information +-fgnat-encodings=[all|gdb|minimal] Select the balance between GNAT encodings and standard DWARF emitted in the debug information. ; This option is not documented yet as its semantics will change. fgraphite @@ -2969,11 +2969,11 @@ Generate debug information in default format. gas-loc-support Common Driver Var(dwarf2out_as_loc_support) Init(2) -Assume assembler support for (DWARF2+) .loc directives +Assume assembler support for (DWARF2+) .loc directives. gas-locview-support Common Driver Var(dwarf2out_as_locview_support) Init(2) -Assume assembler support for view in (DWARF2+) .loc directives +Assume assembler support for view in (DWARF2+) .loc directives. gcoff Common Driver Deprecated @@ -3009,11 +3009,11 @@ Generate debug information in default extended format. ginline-points Common Driver Var(debug_inline_points) Init(2) -Generate extended entry point information for inlined functions +Generate extended entry point information for inlined functions. ginternal-reset-location-views Common Driver Var(debug_internal_reset_location_views) Init(2) -Compute locview reset points based on insn length estimates +Compute locview reset points based on insn length estimates. gno- RejectNegative Joined Undocumented diff --git a/gcc/config/arc/arc.opt b/gcc/config/arc/arc.opt index a5271cb..3e864dd 100644 --- a/gcc/config/arc/arc.opt +++ b/gcc/config/arc/arc.opt @@ -239,7 +239,7 @@ Target RejectNegative Joined Var(arc_cpu) Enum(processor_type) Init(PROCESSOR_NO msize-level= Target RejectNegative Joined UInteger Var(arc_size_opt_level) Init(-1) -size optimization level: 0:none 1:opportunistic 2: regalloc 3:drop align, -Os. +Size optimization level: 0:none 1:opportunistic 2: regalloc 3:drop align, -Os. misize Target Report PchIgnore Var(TARGET_DUMPISIZE) diff --git a/gcc/config/c6x/c6x.opt b/gcc/config/c6x/c6x.opt index 27f5a16..e7424c9 100644 --- a/gcc/config/c6x/c6x.opt +++ b/gcc/config/c6x/c6x.opt @@ -43,7 +43,7 @@ Select method for sdata handling. Enum Name(c6x_sdata) Type(enum c6x_sdata) -Valid arguments for the -msdata= option. +Valid arguments for the -msdata= option: EnumValue Enum(c6x_sdata) String(none) Value(C6X_SDATA_NONE) diff --git a/gcc/config/epiphany/epiphany.opt b/gcc/config/epiphany/epiphany.opt index f8eceb1..6c84414 100644 --- a/gcc/config/epiphany/epiphany.opt +++ b/gcc/config/epiphany/epiphany.opt @@ -25,7 +25,7 @@ Don't use any of r32..r63. mprefer-short-insn-regs Target Mask(PREFER_SHORT_INSN_REGS) -preferentially allocate registers that allow short instruction generation. +Preferentially allocate registers that allow short instruction generation. mbranch-cost= Target RejectNegative Joined UInteger Var(epiphany_branch_cost) Init(3) @@ -33,11 +33,11 @@ Set branch cost. mcmove Target Mask(CMOVE) -enable conditional move instruction usage. +Enable conditional move instruction usage. mnops= Target RejectNegative Joined UInteger Var(epiphany_n_nops) Init(0) -set number of nops to emit before each insn pattern. +Set number of nops to emit before each insn pattern. ; Problems with using the flags from fsub for comparison are: ; - Because of underflow (lack of subnormal numbers), different small numbers diff --git a/gcc/config/ft32/ft32.opt b/gcc/config/ft32/ft32.opt index 8ca2838..10905a7 100644 --- a/gcc/config/ft32/ft32.opt +++ b/gcc/config/ft32/ft32.opt @@ -20,7 +20,7 @@ msim Target Report Mask(SIM) -target the software simulator. +Target the software simulator. mlra Target Report Var(ft32_lra_flag) Init(0) Save @@ -28,16 +28,16 @@ Use LRA instead of reload. mnodiv Target Report Mask(NODIV) -Avoid use of the DIV and MOD instructions +Avoid use of the DIV and MOD instructions. mft32b Target Report Mask(FT32B) -target the FT32B architecture +Target the FT32B architecture. mcompress Target Report Mask(COMPRESS) -enable FT32B code compression +Enable FT32B code compression. mnopm Target Report Mask(NOPM) -Avoid placing any readable data in program memory +Avoid placing any readable data in program memory. diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt index b7998ee..5fb2ec6 100644 --- a/gcc/config/i386/i386.opt +++ b/gcc/config/i386/i386.opt @@ -601,7 +601,7 @@ Use given register vector width instructions instead of maximum register width i Enum Name(prefer_vector_width) Type(enum prefer_vector_width) -Known preferred register vector length (to use with the -mprefer-vector-width= option) +Known preferred register vector length (to use with the -mprefer-vector-width= option): EnumValue Enum(prefer_vector_width) String(none) Value(PVW_NONE) @@ -1087,7 +1087,7 @@ Instrument function exit in instrumented functions with __fentry__. Enum Name(instrument_return) Type(enum instrument_return) -Known choices for return instrumentation with -minstrument-return= +Known choices for return instrumentation with -minstrument-return=: EnumValue Enum(instrument_return) String(none) Value(instrument_return_none) diff --git a/gcc/config/mcore/mcore.opt b/gcc/config/mcore/mcore.opt index 98cfc83..418a34e 100644 --- a/gcc/config/mcore/mcore.opt +++ b/gcc/config/mcore/mcore.opt @@ -20,11 +20,11 @@ m210 Target RejectNegative Report InverseMask(M340) -Generate code for the M*Core M210 +Generate code for the M*Core M210. m340 Target RejectNegative Report Mask(M340) -Generate code for the M*Core M340 +Generate code for the M*Core M340. m4byte-functions Target Report Mask(OVERALIGN_FUNC) diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt index 0e5a46b..2e46941 100644 --- a/gcc/config/microblaze/microblaze.opt +++ b/gcc/config/microblaze/microblaze.opt @@ -125,7 +125,7 @@ Description for mxl-mode-novectors. mxl-prefetch Target Mask(PREFETCH) -Use hardware prefetch instruction +Use hardware prefetch instruction. mpic-data-is-text-relative Target Mask(PIC_DATA_TEXT_REL) diff --git a/gcc/config/rs6000/sysv4.opt b/gcc/config/rs6000/sysv4.opt index 07e6df7..a8ce44b 100644 --- a/gcc/config/rs6000/sysv4.opt +++ b/gcc/config/rs6000/sysv4.opt @@ -83,11 +83,11 @@ Produce big endian code. ;; FIXME: This does nothing. What should be done? mno-toc Target RejectNegative -no description yet. +No description yet. mtoc Target RejectNegative -no description yet. +No description yet. mprototype Target Var(target_prototype) Save @@ -96,7 +96,7 @@ Assume all variable arg functions are prototyped. ;; FIXME: Does nothing. mno-traceback Target RejectNegative -no description yet. +No description yet. meabi Target Report Mask(EABI) Var(rs6000_isa_flags) @@ -138,7 +138,7 @@ Set the PPC_EMB bit in the ELF flags header. mshlib Target RejectNegative -no description yet. +No description yet. m64 Target Report RejectNegative Negative(m32) Mask(64BIT) Var(rs6000_isa_flags) @@ -150,7 +150,7 @@ Generate 32-bit code. mnewlib Target RejectNegative -no description yet. +No description yet. msecure-plt Target Report RejectNegative Var(secure_plt, 1) Save diff --git a/gcc/config/rx/rx.opt b/gcc/config/rx/rx.opt index 5b24b2a..50814a1 100644 --- a/gcc/config/rx/rx.opt +++ b/gcc/config/rx/rx.opt @@ -34,7 +34,7 @@ Stores doubles in 32 bits. This is the default. nofpu Target RejectNegative Alias(mnofpu) -Disable the use of RX FPU instructions. +Disable the use of RX FPU instructions. mnofpu Target RejectNegative Mask(NO_USE_FPU) Report Undocumented diff --git a/gcc/config/sh/sh.opt b/gcc/config/sh/sh.opt index 359fe76..8eb1a4e 100644 --- a/gcc/config/sh/sh.opt +++ b/gcc/config/sh/sh.opt @@ -236,7 +236,7 @@ Increase the IEEE compliance for floating-point comparisons. minline-ic_invalidate Target Report Var(TARGET_INLINE_IC_INVALIDATE) -inline code to invalidate instruction cache entries after setting up nested function trampolines. +Inline code to invalidate instruction cache entries after setting up nested function trampolines. misize Target Report RejectNegative Mask(DUMPISIZE) diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index f8a1bbe..96d74b7 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,8 @@ +2019-03-09 Jakub Jelinek + + PR target/79645 + * lang.opt: Terminate description text with a dot. + 2019-02-28 Jason Merrill PR c++/88049 - ICE with undefined destructor and anon namespace. diff --git a/gcc/lto/lang.opt b/gcc/lto/lang.opt index 5ef0f53..4c4c1ce 100644 --- a/gcc/lto/lang.opt +++ b/gcc/lto/lang.opt @@ -47,7 +47,7 @@ Enum(lto_linker_output) String(exec) Value(LTO_LINKER_OUTPUT_EXEC) flinker-output= LTO Report Driver Joined RejectNegative Enum(lto_linker_output) Var(flag_lto_linker_output) Init(LTO_LINKER_OUTPUT_UNKNOWN) -Set linker output type (used internally during LTO optimization) +Set linker output type (used internally during LTO optimization). fltrans -- cgit v1.1 From 3568d2d5fa77f5c8798c1dca46b1f738d2097202 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 9 Mar 2019 13:08:23 +0100 Subject: re PR c/88568 ('dllimport' no longer implies 'extern' in C) PR c/88568 * attribs.c (handle_dll_attribute): Don't clear TREE_STATIC for dllimport on VAR_DECLs with RECORD_TYPE or UNION_TYPE DECL_CONTEXT. * g++.dg/other/pr88568.C: New test. From-SVN: r269525 --- gcc/ChangeLog | 4 ++++ gcc/attribs.c | 7 +++++-- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/g++.dg/other/pr88568.C | 13 +++++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/g++.dg/other/pr88568.C (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4cfe91..5b1fb49 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2019-03-09 Jakub Jelinek + PR c/88568 + * attribs.c (handle_dll_attribute): Don't clear TREE_STATIC for + dllimport on VAR_DECLs with RECORD_TYPE or UNION_TYPE DECL_CONTEXT. + PR target/79645 * common.opt (fdiagnostics-show-labels, fdiagnostics-show-line-numbers, fdiagnostics-format=, diff --git a/gcc/attribs.c b/gcc/attribs.c index a55638d..adf4973 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -1691,8 +1691,11 @@ handle_dll_attribute (tree * pnode, tree name, tree args, int flags, a function global scope, unless declared static. */ if (current_function_decl != NULL_TREE && !TREE_STATIC (node)) TREE_PUBLIC (node) = 1; - /* Clear TREE_STATIC because DECL_EXTERNAL is set. */ - TREE_STATIC (node) = 0; + /* Clear TREE_STATIC because DECL_EXTERNAL is set, unless + it is a C++ static data member. */ + if (DECL_CONTEXT (node) == NULL_TREE + || !RECORD_OR_UNION_TYPE_P (DECL_CONTEXT (node))) + TREE_STATIC (node) = 0; } if (*no_add_attrs == false) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f32b5af..6b131cb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-03-09 Jakub Jelinek + PR c/88568 + * g++.dg/other/pr88568.C: New test. + PR rtl-optimization/89634 * gcc.c-torture/execute/pr89634.c: New test. diff --git a/gcc/testsuite/g++.dg/other/pr88568.C b/gcc/testsuite/g++.dg/other/pr88568.C new file mode 100644 index 0000000..9d344fd --- /dev/null +++ b/gcc/testsuite/g++.dg/other/pr88568.C @@ -0,0 +1,13 @@ +// PR c/88568 +// { dg-do compile } +// { dg-require-dll "" } + +struct S { + __attribute__((dllimport)) static const char foo[]; +}; + +int +foo (int x) +{ + return S::foo[x]; +} -- cgit v1.1 From 8ed5ae524ae350a50a82630342ef9578591090a5 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sat, 9 Mar 2019 14:10:17 +0000 Subject: re PR fortran/71203 (ICE in add_init_expr_to_sym, at fortran/decl.c:1512 and :1564) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2019-03-09 Thomas König PR fortran/71203 * decl.c (add_init_expr_to_sym): Add shape if init has none. Add assert that it has to be an EXPR_ARRAY in this case. 2019-03-09 Thomas König PR fortran/71203 * gfortran.dg/array_simplify_3.f90: New test case. From-SVN: r269526 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/decl.c | 10 ++++++++-- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/array_simplify_3.f90 | 9 +++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/array_simplify_3.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 2840368..48ab06b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2019-03-09 Thomas König + + PR fortran/71203 + * decl.c (add_init_expr_to_sym): Add shape if init has none. Add + asserts that it has to be an EXPR_ARRAY in this case. + 2019-03-08 Jakub Jelinek PR other/80058 diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 3c8c5ff..31c7fb6 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -1983,8 +1983,14 @@ add_init_expr_to_sym (const char *name, gfc_expr **initp, locus *var_locus) return false; } - /* Shape should be present, we get an initialization expression. */ - gcc_assert (init->shape); + /* The shape may be NULL for EXPR_ARRAY, set it. */ + if (init->shape == NULL) + { + gcc_assert (init->expr_type == EXPR_ARRAY); + init->shape = gfc_get_shape (1); + if (!gfc_array_size (init, &init->shape[0])) + gfc_internal_error ("gfc_array_size failed"); + } for (dim = 0; dim < sym->as->rank; ++dim) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6b131cb..d100f1b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-09 Thomas König + + PR fortran/71203 + * gfortran.dg/array_simplify_3.f90: New test case. + 2019-03-09 Jakub Jelinek PR c/88568 diff --git a/gcc/testsuite/gfortran.dg/array_simplify_3.f90 b/gcc/testsuite/gfortran.dg/array_simplify_3.f90 new file mode 100644 index 0000000..31183b0 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/array_simplify_3.f90 @@ -0,0 +1,9 @@ +! { dg-do run } +! PR 71203 - this used to ICE +program p + integer :: i + integer, parameter :: x(2) = 0 + integer, parameter :: y(*) = [(x(i:i), i=1,2)] + if (size(y,1) /= 2) stop 1 + if (any(y /= 0)) stop 2 +end -- cgit v1.1 From b13b235065dc0e4d6e584f44c374f5d7550ebaab Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 9 Mar 2019 16:31:46 +0000 Subject: re PR fortran/89639 (FAIL: gfortran.dg/ieee/ieee_9.f90 -O0 (test for excess errors)) PR fortran/89639 * gfortran.dg/ieee/ieee_9.f90: Skip on hppa*-*-linux*. From-SVN: r269527 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/ieee/ieee_9.f90 | 1 + 2 files changed, 6 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d100f1b..20a4d4b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-09 John David Anglin + + PR fortran/89639 + * gfortran.dg/ieee/ieee_9.f90: Skip on hppa*-*-linux*. + 2019-03-09 Thomas König PR fortran/71203 diff --git a/gcc/testsuite/gfortran.dg/ieee/ieee_9.f90 b/gcc/testsuite/gfortran.dg/ieee/ieee_9.f90 index 5993b83..ba75181 100644 --- a/gcc/testsuite/gfortran.dg/ieee/ieee_9.f90 +++ b/gcc/testsuite/gfortran.dg/ieee/ieee_9.f90 @@ -1,4 +1,5 @@ ! { dg-do run { xfail arm*-*-gnueabi arm*-*-gnueabihf } } +! { dg-skip-if "PR89639" { hppa-*-linux* } } program foo use ieee_arithmetic use iso_fortran_env -- cgit v1.1 From 660de2bae3b7a301fc19ef877d94ce0a86eaf72b Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 9 Mar 2019 16:50:17 +0000 Subject: ieee_9.f90: Fix typo. * gfortran.dg/ieee/ieee_9.f90: Fix typo. From-SVN: r269528 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gfortran.dg/ieee/ieee_9.f90 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 20a4d4b..003fe1c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2019-03-09 John David Anglin + * gfortran.dg/ieee/ieee_9.f90: Fix typo. + +2019-03-09 John David Anglin + PR fortran/89639 * gfortran.dg/ieee/ieee_9.f90: Skip on hppa*-*-linux*. diff --git a/gcc/testsuite/gfortran.dg/ieee/ieee_9.f90 b/gcc/testsuite/gfortran.dg/ieee/ieee_9.f90 index ba75181..5e0ac36 100644 --- a/gcc/testsuite/gfortran.dg/ieee/ieee_9.f90 +++ b/gcc/testsuite/gfortran.dg/ieee/ieee_9.f90 @@ -1,5 +1,5 @@ ! { dg-do run { xfail arm*-*-gnueabi arm*-*-gnueabihf } } -! { dg-skip-if "PR89639" { hppa-*-linux* } } +! { dg-skip-if "PR89639" { hppa*-*-linux* } } program foo use ieee_arithmetic use iso_fortran_env -- cgit v1.1 From b5c26787c4e5d7b13df865edb7439a875c844cfe Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Sat, 9 Mar 2019 19:25:39 +0100 Subject: re PR fortran/84504 ([F08] procedure pointer variables cannot be initialized with functions returning pointers) fix PR 84504 2019-03-09 Janus Weil PR fortran/84504 * expr.c (gfc_check_assign_symbol): Deal with procedure pointers to pointer-valued functions. 2019-03-09 Janus Weil PR fortran/84504 * gfortran.dg/pointer_init_10.f90: New test case. From-SVN: r269529 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/expr.c | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/pointer_init_10.f90 | 24 ++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/pointer_init_10.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 48ab06b..40b3a32 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2019-03-09 Janus Weil + + PR fortran/84504 + * expr.c (gfc_check_assign_symbol): Deal with procedure pointers to + pointer-valued functions. + 2019-03-09 Thomas König PR fortran/71203 diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 51552a7..4e95f24 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -4321,7 +4321,7 @@ gfc_check_assign_symbol (gfc_symbol *sym, gfc_component *comp, gfc_expr *rvalue) if (!r) return r; - if (pointer && rvalue->expr_type != EXPR_NULL) + if (pointer && rvalue->expr_type != EXPR_NULL && !proc_pointer) { /* F08:C461. Additional checks for pointer initialization. */ symbol_attribute attr; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 003fe1c..a2eec5e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-09 Janus Weil + + PR fortran/84504 + * gfortran.dg/pointer_init_10.f90: New test case. + 2019-03-09 John David Anglin * gfortran.dg/ieee/ieee_9.f90: Fix typo. diff --git a/gcc/testsuite/gfortran.dg/pointer_init_10.f90 b/gcc/testsuite/gfortran.dg/pointer_init_10.f90 new file mode 100644 index 0000000..81e7d73 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pointer_init_10.f90 @@ -0,0 +1,24 @@ +! { dg-do run } +! +! PR 84504: [F08] procedure pointer variables cannot be initialized with functions returning pointers +! +! Contributed by Sriram Swaminarayan + +module test_mod + implicit none + private + integer, target :: i = 333 + procedure(the_proc), pointer, public :: ptr => the_proc +contains + function the_proc() + integer, pointer :: the_proc + the_proc => i + end function +end module + +program test_prog + use test_mod + integer, pointer :: ip + ip => ptr() + if (ip /= 333) stop 1 +end -- cgit v1.1 From 5b2803942b8ff724e80e413c700be160cec20ef8 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 9 Mar 2019 18:51:39 +0000 Subject: target-supports.exp (check_effective_target_weak_undefined): Return 0 on hppa*-*-hpux*. * lib/target-supports.exp (check_effective_target_weak_undefined): Return 0 on hppa*-*-hpux*. (check_ascii_locale_available): Likewise. From-SVN: r269530 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/lib/target-supports.exp | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a2eec5e..a8ebc7f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-09 John David Anglin + + * lib/target-supports.exp (check_effective_target_weak_undefined): + Return 0 on hppa*-*-hpux*. + (check_ascii_locale_available): Likewise. + 2019-03-09 Janus Weil PR fortran/84504 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 242cc3f..d6e7a35 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -341,6 +341,9 @@ proc check_weak_available { } { # return 1 if weak undefined symbols are supported. proc check_effective_target_weak_undefined { } { + if { [istarget hppa*-*-hpux*] } { + return 0 + } return [check_runtime weak_undefined { extern void foo () __attribute__((weak)); int main (void) { if (foo) return 1; return 0; } @@ -1427,6 +1430,9 @@ proc check_effective_target_libatomic_available { } { # Return 1 if an ASCII locale is supported on this host, 0 otherwise. proc check_ascii_locale_available { } { + if { [istarget hppa*-*-hpux*] } { + return 0 + } return 1 } -- cgit v1.1 From e6780631b13612b88b1ada69ca2e736f8a16da87 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 9 Mar 2019 19:10:00 +0000 Subject: debug11.adb: Skip on 32-bit hppa*-*-hpux*. * gnat.dg/debug11.adb: Skip on 32-bit hppa*-*-hpux*. * gnat.dg/debug12.adb: Likewise. From-SVN: r269531 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/gnat.dg/debug11.adb | 1 + gcc/testsuite/gnat.dg/debug12.adb | 1 + 3 files changed, 5 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a8ebc7f..9b8655a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-03-09 John David Anglin + * gnat.dg/debug11.adb: Skip on 32-bit hppa*-*-hpux*. + * gnat.dg/debug12.adb: Likewise. + * lib/target-supports.exp (check_effective_target_weak_undefined): Return 0 on hppa*-*-hpux*. (check_ascii_locale_available): Likewise. diff --git a/gcc/testsuite/gnat.dg/debug11.adb b/gcc/testsuite/gnat.dg/debug11.adb index 19c1c43..26db5db 100644 --- a/gcc/testsuite/gnat.dg/debug11.adb +++ b/gcc/testsuite/gnat.dg/debug11.adb @@ -1,4 +1,5 @@ -- { dg-do compile } +-- { dg-skip-if "No Dwarf" { { hppa*-*-hpux* } && { ! lp64 } } } -- { dg-options "-cargs -O0 -g -dA -fgnat-encodings=minimal -margs" } -- -- This testcase checks that in the DWARF description of the variant type diff --git a/gcc/testsuite/gnat.dg/debug12.adb b/gcc/testsuite/gnat.dg/debug12.adb index c236dc4..fa34c0a 100644 --- a/gcc/testsuite/gnat.dg/debug12.adb +++ b/gcc/testsuite/gnat.dg/debug12.adb @@ -1,4 +1,5 @@ -- { dg-do compile } +-- { dg-skip-if "No Dwarf" { { hppa*-*-hpux* } && { ! lp64 } } } -- { dg-options "-cargs -gdwarf-4 -fdebug-types-section -dA -margs" } -- { dg-final { scan-assembler-times "DW_AT_location" 4 } } -- cgit v1.1 From 4ea60a393eee13a0a7715b7c8134e2115195c7f7 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sat, 9 Mar 2019 19:21:24 +0000 Subject: re PR fortran/71544 (gfortran compiler optimization bug when dealing with c-style pointers) 2019-03-09 Thomas Koenig PR fortran/71544 * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of C_PTR and C_FUNPTR. (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set. 2019-03-09 Thomas Koenig PR fortran/71544 * gfortran.dg/c_ptr_tests_19.f90: New test. From-SVN: r269532 --- gcc/fortran/ChangeLog | 7 ++++++ gcc/fortran/trans-types.c | 6 +++-- gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/gfortran.dg/c_ptr_tests_19.f90 | 36 ++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/c_ptr_tests_19.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 40b3a32..785c731 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2019-03-09 Thomas Koenig + + PR fortran/71544 + * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of + C_PTR and C_FUNPTR. + (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set. + 2019-03-09 Janus Weil PR fortran/84504 diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 58102ba..9ae516b 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -1176,7 +1176,8 @@ gfc_typenode_for_spec (gfc_typespec * spec, int codim) { spec->type = BT_INTEGER; spec->kind = gfc_index_integer_kind; - spec->f90_type = BT_VOID; + spec->f90_type = BT_VOID; + spec->is_c_interop = 1; /* Mark as escaping later. */ } break; case BT_VOID: @@ -2957,7 +2958,8 @@ create_fn_spec (gfc_symbol *sym, tree fntype) || f->sym->ts.u.derived->attr.pointer_comp)) || (f->sym->ts.type == BT_CLASS && (CLASS_DATA (f->sym)->ts.u.derived->attr.proc_pointer_comp - || CLASS_DATA (f->sym)->ts.u.derived->attr.pointer_comp))) + || CLASS_DATA (f->sym)->ts.u.derived->attr.pointer_comp)) + || (f->sym->ts.type == BT_INTEGER && f->sym->ts.is_c_interop)) spec[spec_len++] = '.'; else if (f->sym->attr.intent == INTENT_IN) spec[spec_len++] = 'r'; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9b8655a..b1714e4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-09 Thomas Koenig + + PR fortran/71544 + * gfortran.dg/c_ptr_tests_19.f90: New test. + 2019-03-09 John David Anglin * gnat.dg/debug11.adb: Skip on 32-bit hppa*-*-hpux*. diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_19.f90 b/gcc/testsuite/gfortran.dg/c_ptr_tests_19.f90 new file mode 100644 index 0000000..2cb0b18 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_19.f90 @@ -0,0 +1,36 @@ +! { dg-do run } + +! PR 71544 - this failed with some optimization options due to a +! pointer not being marked as escaping. + +module store_cptr + use, intrinsic :: iso_c_binding + implicit none + public + type(c_ptr), save :: cptr +end module store_cptr + +subroutine init() + use, intrinsic :: iso_c_binding + implicit none + integer(c_int), pointer :: a + allocate(a) + call save_cptr(c_loc(a)) + a = 100 +end subroutine init + +subroutine save_cptr(cptr_in) + use store_cptr + implicit none + type(c_ptr), intent(in) :: cptr_in + cptr = cptr_in +end subroutine save_cptr + +program init_fails + use store_cptr + implicit none + integer(c_int), pointer :: val + call init() + call c_f_pointer(cptr,val) + if (val /= 100) stop 1 +end program init_fails -- cgit v1.1 From 9fa5d5de369171b7149827fbc784aedb27eb6b84 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Sat, 9 Mar 2019 19:29:29 +0000 Subject: d: Fix ICE in get_frame_for_symbol When generating code for a non-nested delegate literal, there is no context pointer required to pass to the function. 2019-03-09 Iain Buclaw gcc/d/ PR d/89041 * d-codegen.cc (get_frame_for_symbol): Delegate literals defined in global scope don't have a frame pointer. gcc/testsuite/ PR d/89041 * gdc.dg/pr89041.d: New test. From-SVN: r269533 --- gcc/d/ChangeLog | 6 ++++++ gcc/d/d-codegen.cc | 15 ++++++++++++--- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gdc.dg/pr89041.d | 13 +++++++++++++ 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gdc.dg/pr89041.d (limited to 'gcc') diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index 305b22e..4d9fb99 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,9 @@ +2019-03-09 Iain Buclaw + + PR d/89041 + * d-codegen.cc (get_frame_for_symbol): Delegate literals defined in + global scope don't have a frame pointer. + 2019-03-01 Iain Buclaw * d-builtins.cc (d_init_versions): Add CppRuntime_Gcc as predefined diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc index 58c8257..e8233b4 100644 --- a/gcc/d/d-codegen.cc +++ b/gcc/d/d-codegen.cc @@ -2172,7 +2172,16 @@ get_frame_for_symbol (Dsymbol *sym) fdparent = (FuncDeclaration *) sym; } - gcc_assert (fdparent != NULL); + /* Not a nested function, there is no frame pointer to pass. */ + if (fdparent == NULL) + { + /* Only delegate literals report as being nested, even if they are in + global scope. */ + gcc_assert (fd && fd->isFuncLiteralDeclaration ()); + return null_pointer_node; + } + + gcc_assert (thisfd != NULL); if (thisfd != fdparent) { @@ -2180,8 +2189,8 @@ get_frame_for_symbol (Dsymbol *sym) if (!thisfd->vthis) { error_at (make_location_t (sym->loc), - "is a nested function and cannot be accessed from %qs", - thisfd->toChars ()); + "%qs is a nested function and cannot be accessed from %qs", + fd->toPrettyChars (), thisfd->toPrettyChars ()); return null_pointer_node; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b1714e4..cb4bf77 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-09 Iain Buclaw + + PR d/89041 + * gdc.dg/pr89041.d: New test. + 2019-03-09 Thomas Koenig PR fortran/71544 diff --git a/gcc/testsuite/gdc.dg/pr89041.d b/gcc/testsuite/gdc.dg/pr89041.d new file mode 100644 index 0000000..b62c2db --- /dev/null +++ b/gcc/testsuite/gdc.dg/pr89041.d @@ -0,0 +1,13 @@ +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89041 +module pr89041; + +enum dg = delegate {}; + +void fn() +{ + auto var = dg; + + auto inner() { + return dg(); + } +} -- cgit v1.1 From 4ecbb52b6e52d62bc4ca2800ca7dd0d48c87137d Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 9 Mar 2019 19:39:38 +0000 Subject: coarray_data_1.f90: Link against libatomic if target libatomic_available. * gfortran.dg/coarray_data_1.f90: Link against libatomic if target libatomic_available. From-SVN: r269534 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/coarray_data_1.f90 | 1 + 2 files changed, 6 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cb4bf77..dcc75f3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-09 John David Anglin + + * gfortran.dg/coarray_data_1.f90: Link against libatomic if target + libatomic_available. + 2019-03-09 Iain Buclaw PR d/89041 diff --git a/gcc/testsuite/gfortran.dg/coarray_data_1.f90 b/gcc/testsuite/gfortran.dg/coarray_data_1.f90 index 94ab4c2..e1cc33e 100644 --- a/gcc/testsuite/gfortran.dg/coarray_data_1.f90 +++ b/gcc/testsuite/gfortran.dg/coarray_data_1.f90 @@ -1,5 +1,6 @@ ! { dg-do run } ! { dg-options "-fcoarray=lib -lcaf_single " } +! { dg-additional-options "-latomic" { target libatomic_available } } ! PR 71066 - this used to ICE program p real :: a(2,2)[*] -- cgit v1.1 From 1e613d7a5271a58288d054ffb0cdec3501898097 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 9 Mar 2019 19:56:06 +0000 Subject: re PR inline-asm/87010 (FAIL: gcc.dg/torture/20180712-1.c -O1 (test for excess errors)) PR inline-asm/87010 * gcc.dg/torture/20180712-1.c: Skip on hppa*-*-*. From-SVN: r269535 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/gcc.dg/torture/20180712-1.c | 1 + 2 files changed, 4 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dcc75f3..16c1c13 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-03-09 John David Anglin + PR inline-asm/87010 + * gcc.dg/torture/20180712-1.c: Skip on hppa*-*-*. + * gfortran.dg/coarray_data_1.f90: Link against libatomic if target libatomic_available. diff --git a/gcc/testsuite/gcc.dg/torture/20180712-1.c b/gcc/testsuite/gcc.dg/torture/20180712-1.c index 3ac2c7f..ba649db 100644 --- a/gcc/testsuite/gcc.dg/torture/20180712-1.c +++ b/gcc/testsuite/gcc.dg/torture/20180712-1.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "asm operand has impossible constraints" { hppa*-*-* } } */ /* { dg-additional-options "-fstack-protector" { target fstack_protector } } */ /* { dg-additional-options "-fPIC" { target fpic } } */ -- cgit v1.1 From 0f7292f5574965ec747e59a58414ccf1e4fd5a6b Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 9 Mar 2019 20:08:54 +0000 Subject: lambda1.C: Require visibility. * g++.dg/ext/visibility/lambda1.C: Require visibility. From-SVN: r269536 --- gcc/testsuite/ChangeLog | 2 ++ gcc/testsuite/g++.dg/ext/visibility/lambda1.C | 1 + 2 files changed, 3 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 16c1c13..1f3c3aa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,7 @@ 2019-03-09 John David Anglin + * g++.dg/ext/visibility/lambda1.C: Require visibility. + PR inline-asm/87010 * gcc.dg/torture/20180712-1.c: Skip on hppa*-*-*. diff --git a/gcc/testsuite/g++.dg/ext/visibility/lambda1.C b/gcc/testsuite/g++.dg/ext/visibility/lambda1.C index 359f8e4..b5b3747 100644 --- a/gcc/testsuite/g++.dg/ext/visibility/lambda1.C +++ b/gcc/testsuite/g++.dg/ext/visibility/lambda1.C @@ -1,5 +1,6 @@ // PR c++/85646 // { dg-do compile { target c++11 } } +// { dg-require-visibility "" } // { dg-additional-options -fvisibility=hidden } template -- cgit v1.1 From 4fb649b5cb66951387b87e85297a538fa7d1d329 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 9 Mar 2019 20:18:41 +0000 Subject: pr77285-2.C: Require tls_native support. * g++.dg/tls/pr77285-2.C: Require tls_native support. From-SVN: r269537 --- gcc/testsuite/ChangeLog | 4 +++- gcc/testsuite/g++.dg/tls/pr77285-2.C | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1f3c3aa..07f95a2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,6 @@ -2019-03-09 John David Anglin +2018-03-09 John David Anglin + + * g++.dg/tls/pr77285-2.C: Require tls_native support. * g++.dg/ext/visibility/lambda1.C: Require visibility. diff --git a/gcc/testsuite/g++.dg/tls/pr77285-2.C b/gcc/testsuite/g++.dg/tls/pr77285-2.C index bac273a..a47b7a3 100644 --- a/gcc/testsuite/g++.dg/tls/pr77285-2.C +++ b/gcc/testsuite/g++.dg/tls/pr77285-2.C @@ -1,6 +1,6 @@ // PR c++/77285 // { dg-do compile { target c++11 } } -// { dg-require-effective-target tls } +// { dg-require-effective-target tls_native } // { dg-final { scan-assembler "_Z4var1B3tag" } } // { dg-final { scan-assembler "_Z4var2B3tag" } } // { dg-final { scan-assembler "_ZTH4var1B3tag" } } -- cgit v1.1 From 7053f7e1997295711aaf1dd51a539815b45e204d Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 9 Mar 2019 21:48:43 +0000 Subject: ident-0b.c: Also skip on 32-bit hppa*-*-hpux*. * c-c++-common/ident-0b.c: Also skip on 32-bit hppa*-*-hpux*. * c-c++-common/ident-1a.c: Likewise. * c-c++-common/ident-1b.c: Likewise. * c-c++-common/ident-2b.c: Likewise. From-SVN: r269538 --- gcc/testsuite/ChangeLog | 7 ++++++- gcc/testsuite/c-c++-common/ident-0b.c | 2 +- gcc/testsuite/c-c++-common/ident-1a.c | 2 +- gcc/testsuite/c-c++-common/ident-1b.c | 2 +- gcc/testsuite/c-c++-common/ident-2b.c | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 07f95a2..9d857bb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,9 @@ -2018-03-09 John David Anglin +2019-03-09 John David Anglin + + * c-c++-common/ident-0b.c: Also skip on 32-bit hppa*-*-hpux*. + * c-c++-common/ident-1a.c: Likewise. + * c-c++-common/ident-1b.c: Likewise. + * c-c++-common/ident-2b.c: Likewise. * g++.dg/tls/pr77285-2.C: Require tls_native support. diff --git a/gcc/testsuite/c-c++-common/ident-0b.c b/gcc/testsuite/c-c++-common/ident-0b.c index 1184f8f..67b593c 100644 --- a/gcc/testsuite/c-c++-common/ident-0b.c +++ b/gcc/testsuite/c-c++-common/ident-0b.c @@ -2,7 +2,7 @@ * Make sure scan-assembler-not turns off .ident unless -fident in testcase */ /* { dg-do compile } */ /* { dg-options "-fident" } */ -/* { dg-skip-if "no assembler .ident support" { powerpc*-*-darwin* } } */ +/* { dg-skip-if "no assembler .ident support" { { hppa*-*-hpux* && { ! lp64 } } || powerpc*-*-darwin* } } */ int i; /* { dg-final { scan-assembler-not "GCC: " { xfail *-*-* } } } */ diff --git a/gcc/testsuite/c-c++-common/ident-1a.c b/gcc/testsuite/c-c++-common/ident-1a.c index b600373..dc167c3 100644 --- a/gcc/testsuite/c-c++-common/ident-1a.c +++ b/gcc/testsuite/c-c++-common/ident-1a.c @@ -1,7 +1,7 @@ /* PR testsuite/52665 * Make sure scan-assembler turns off .ident */ /* { dg-do compile } */ -/* { dg-skip-if "no assembler .ident support" { powerpc*-*-darwin* } } */ +/* { dg-skip-if "no assembler .ident support" { { hppa*-*-hpux* && { ! lp64 } } || powerpc*-*-darwin* } } */ int i; /* { dg-final { scan-assembler "GCC: " { xfail *-*-* } } } */ diff --git a/gcc/testsuite/c-c++-common/ident-1b.c b/gcc/testsuite/c-c++-common/ident-1b.c index d4eff0d..6956744 100644 --- a/gcc/testsuite/c-c++-common/ident-1b.c +++ b/gcc/testsuite/c-c++-common/ident-1b.c @@ -4,4 +4,4 @@ /* { dg-options "-fident" } */ int i; -/* { dg-final { scan-assembler "GCC: " { xfail powerpc-ibm-aix* powerpc*-*-darwin* } } } */ +/* { dg-final { scan-assembler "GCC: " { xfail { { hppa*-*-hpux* && { ! lp64 } } || { powerpc-ibm-aix* || powerpc*-*-darwin* } } } } } */ diff --git a/gcc/testsuite/c-c++-common/ident-2b.c b/gcc/testsuite/c-c++-common/ident-2b.c index 12a8058..fae6a03 100644 --- a/gcc/testsuite/c-c++-common/ident-2b.c +++ b/gcc/testsuite/c-c++-common/ident-2b.c @@ -4,4 +4,4 @@ /* { dg-options "-fident" } */ int ident; -/* { dg-final { scan-assembler-times "GCC: " 1 { xfail powerpc-ibm-aix* powerpc*-*-darwin* } } } */ +/* { dg-final { scan-assembler "GCC: " { xfail { { hppa*-*-hpux* && { ! lp64 } } || { powerpc-ibm-aix* || powerpc*-*-darwin* } } } } } */ -- cgit v1.1 From 6c00302019fca2a2ffaf2e6b134b4140e505dace Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sat, 9 Mar 2019 21:49:41 +0000 Subject: re PR c++/87750 (Failed compilation / parsing of template member call after 'using' declaration) 2019-03-09 Paolo Carlini PR c++/87750 * g++.dg/cpp0x/pr87750.C: New. From-SVN: r269539 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/pr87750.C | 40 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/pr87750.C (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9d857bb..769a5e9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-09 Paolo Carlini + + PR c++/87750 + * g++.dg/cpp0x/pr87750.C: New. + 2019-03-09 John David Anglin * c-c++-common/ident-0b.c: Also skip on 32-bit hppa*-*-hpux*. diff --git a/gcc/testsuite/g++.dg/cpp0x/pr87750.C b/gcc/testsuite/g++.dg/cpp0x/pr87750.C new file mode 100644 index 0000000..6002e41 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr87750.C @@ -0,0 +1,40 @@ +// PR c++/87750 +// { dg-do compile { target c++11 } } + +template +class Bar +{ +protected: + template + int process(int) { return 0; } +}; + +template +class Derived : Bar +{ + using Base = Bar; + // Note applying Base::template workaround in (2) and commenting + // this out then compiles. + using Base::process; +public: + void foo() + { + // (1) workaround: this->template + // This line only fails on gcc 8.x, works in clang/icc/msvc. + process(); + } + + template + int process() + { + // (2) workaround: this->template or Base::template + // Note clang 5 & 6 don't accept this line either, but clang 7 does. + return process(1); + } +}; + +int main() +{ + Derived x; + return x.process(); +} -- cgit v1.1 From 3d59d5e47b47131869aa7812a9bdfba86f55376d Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 9 Mar 2019 22:13:01 +0000 Subject: re PR testsuite/89472 (FAIL: gcc.dg/debug/dwarf2/inline5.c scan-assembler-times DW_TAG_lexical_block\\)[^#/!@;\\|]*[#/!@;\\|]+ +[^#/!@\\|]*\\(DIE \\(0x[0-9a-f]*\\) DW_TAG_variable 1) PR testsuite/89472 * gcc.dg/debug/dwarf2/inline5.c: XFAIL one scan-assembler-times check. From-SVN: r269540 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/debug/dwarf2/inline5.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 769a5e9..e5153d8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-09 John David Anglin + + PR testsuite/89472 + * gcc.dg/debug/dwarf2/inline5.c: XFAIL one scan-assembler-times check. + 2019-03-09 Paolo Carlini PR c++/87750 diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/inline5.c b/gcc/testsuite/gcc.dg/debug/dwarf2/inline5.c index 029438e..7587a28 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/inline5.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/inline5.c @@ -5,7 +5,7 @@ /* { dg-do compile } */ /* { dg-final { scan-assembler-times "DW_TAG_inlined_subroutine" 2 } } */ /* { dg-final { scan-assembler-times "DW_TAG_lexical_block\\)\[^#/!@;\\|\]*\[#/!@;\\|\]+ +DW_AT_abstract_origin" 2 } } */ -/* { dg-final { scan-assembler-times "DW_TAG_lexical_block\\)\[^#/!@;\\|\]*\[#/!@;\\|\]+ +\[^#/!@\\|\]*\\(DIE \\(0x\[0-9a-f\]*\\) DW_TAG_variable" 1 } } */ +/* { dg-final { scan-assembler-times "DW_TAG_lexical_block\\)\[^#/!@;\\|\]*\[#/!@;\\|\]+ +\[^#/!@\\|\]*\\(DIE \\(0x\[0-9a-f\]*\\) DW_TAG_variable" 1 { xfail hppa*-*-* } } } */ /* We do not know which is output first so look for both invalid abstract origins on the lexical blocks (knowing that the abstract instance has no attribute following the DW_TAG_lexical_block. */ -- cgit v1.1 From 5377d711111d0b9b9f61c198a4feee6e2d3d45b0 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 9 Mar 2019 22:32:30 +0000 Subject: re PR middle-end/68733 (FAIL: libgomp.c/target-29.c (internal compiler error)) PR middle-end/68733 * c-c++-common/gomp/clauses-2.c: Skip on 32-bit hppa*-*-hpux*. From-SVN: r269541 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/c-c++-common/gomp/clauses-2.c | 1 + 2 files changed, 4 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e5153d8..e47057d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-03-09 John David Anglin + PR middle-end/68733 + * c-c++-common/gomp/clauses-2.c: Skip on 32-bit hppa*-*-hpux*. + PR testsuite/89472 * gcc.dg/debug/dwarf2/inline5.c: XFAIL one scan-assembler-times check. diff --git a/gcc/testsuite/c-c++-common/gomp/clauses-2.c b/gcc/testsuite/c-c++-common/gomp/clauses-2.c index 9225773..ded1d74 100644 --- a/gcc/testsuite/c-c++-common/gomp/clauses-2.c +++ b/gcc/testsuite/c-c++-common/gomp/clauses-2.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "PR 68733" { hppa*-*-hpux* && { ! lp64 } } } */ struct S { int r; int *s; int t[10]; }; void bar (int *); -- cgit v1.1 From c93a9da9744b8d5e9af47b38c37c39f5af2e1691 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 9 Mar 2019 22:58:24 +0000 Subject: re PR c++/70349 (FAIL: g++.dg/abi/abi-tag18a.C -std=gnu++98 scan-assembler _ZZ1fB7__test1vEN1T1gB7__test2Ev) PR c++/70349 * g++.dg/abi/abi-tag18a.C: Skip on 32-bit hppa*-*-hpux*. From-SVN: r269542 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/g++.dg/abi/abi-tag18a.C | 1 + 2 files changed, 4 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e47057d..917d171 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-03-09 John David Anglin + PR c++/70349 + * g++.dg/abi/abi-tag18a.C: Skip on 32-bit hppa*-*-hpux*. + PR middle-end/68733 * c-c++-common/gomp/clauses-2.c: Skip on 32-bit hppa*-*-hpux*. diff --git a/gcc/testsuite/g++.dg/abi/abi-tag18a.C b/gcc/testsuite/g++.dg/abi/abi-tag18a.C index 6c56950..95e192a 100644 --- a/gcc/testsuite/g++.dg/abi/abi-tag18a.C +++ b/gcc/testsuite/g++.dg/abi/abi-tag18a.C @@ -1,3 +1,4 @@ +// { dg-skip-if "PR 70349" { hppa*-*-hpux* && { ! lp64 } } } // { dg-options -fabi-version=9 } // { dg-final { scan-assembler "_Z1fB7__test1v" } } // { dg-final { scan-assembler "_ZZ1fB7__test1vEN1T1gB7__test2Ev" } } -- cgit v1.1 From c02a57a0bb0238915929b267f275ee3d4832185f Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 10 Mar 2019 00:16:16 +0000 Subject: Daily bump. From-SVN: r269545 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 9dc8722..a82dd10 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20190309 +20190310 -- cgit v1.1 From 2263c69edc270c1e762c88e771d12dd5d09b052d Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sun, 10 Mar 2019 09:34:46 +0000 Subject: re PR fortran/87734 (ICE in is_illegal_recursion check for character len= parameter) 2019-03-10 Thomas Koenig PR fortran/87734 * symbol.c (gfc_add_procedure): Only throw an error if the procedure has not been declared either PUBLIC or PRIVATE. 2019-03-10 Thomas Koenig PR fortran/87734 * gfortran.dg/public_private_module_10.f90: New test. From-SVN: r269547 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/symbol.c | 3 ++- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/public_private_module_10.f90 | 16 ++++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/public_private_module_10.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 785c731..d8f5abb 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2019-03-10 Thomas Koenig + + PR fortran/87734 + * symbol.c (gfc_add_procedure): Only throw an error if the + procedure has not been declared either PUBLIC or PRIVATE. + 2019-03-09 Thomas Koenig PR fortran/71544 diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 0eb4130..4dfa836 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -1805,7 +1805,8 @@ gfc_add_procedure (symbol_attribute *attr, procedure_type t, if (where == NULL) where = &gfc_current_locus; - if (attr->proc != PROC_UNKNOWN && !attr->module_procedure) + if (attr->proc != PROC_UNKNOWN && !attr->module_procedure + && attr->access == ACCESS_UNKNOWN) { if (attr->proc == PROC_ST_FUNCTION && t == PROC_INTERNAL && !gfc_notification_std (GFC_STD_F2008)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 917d171..05be099 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-10 Thomas Koenig + + PR fortran/87734 + * gfortran.dg/public_private_module_10.f90: New test. + 2019-03-09 John David Anglin PR c++/70349 diff --git a/gcc/testsuite/gfortran.dg/public_private_module_10.f90 b/gcc/testsuite/gfortran.dg/public_private_module_10.f90 new file mode 100644 index 0000000..ddc1f88 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/public_private_module_10.f90 @@ -0,0 +1,16 @@ +! PR 87734 +module m_vstring + implicit none + + public :: vstring_length + +contains + + subroutine vstring_cast() + character ( len = vstring_length() ) :: char_string + end subroutine + + pure integer function vstring_length () + end function + +end module -- cgit v1.1 From 4932364bd569d131e6f0dbb68ed5a538be3d07f3 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sun, 10 Mar 2019 10:42:23 +0000 Subject: re PR fortran/66089 (elemental dependency mishandling when class array are involved) 2019-03-10 Thomas Koenig PR fortran/66089 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference): Return false if a scalar tempoary is needed. (gfc_walk_variable_expr): Fix up class refs. 2019-03-10 Thomas Koenig PR fortran/66089 * gfortran.dg/dependency_53.f90: New test. From-SVN: r269549 --- gcc/fortran/ChangeLog | 7 +++++++ gcc/fortran/trans-array.c | 5 +++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/dependency_53.f90 | 25 +++++++++++++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/dependency_53.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index d8f5abb..8ad4361 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,12 @@ 2019-03-10 Thomas Koenig + PR fortran/66089 + * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference): + Return false if a scalar tempoary is needed. + (gfc_walk_variable_expr): Fix up class refs. + +2019-03-10 Thomas Koenig + PR fortran/87734 * symbol.c (gfc_add_procedure): Only throw an error if the procedure has not been declared either PUBLIC or PRIVATE. diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 6192e68..1379426 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -2699,6 +2699,9 @@ gfc_scalar_elemental_arg_saved_as_reference (gfc_ss_info * ss_info) if (ss_info->type != GFC_SS_REFERENCE) return false; + if (ss_info->data.scalar.needs_temporary) + return false; + /* If the actual argument can be absent (in other words, it can be a NULL reference), don't try to evaluate it; pass instead the reference directly. */ @@ -10515,6 +10518,8 @@ gfc_walk_variable_expr (gfc_ss * ss, gfc_expr * expr) { gfc_ref *ref; + gfc_fix_class_refs (expr); + for (ref = expr->ref; ref; ref = ref->next) if (ref->type == REF_ARRAY && ref->u.ar.type != AR_ELEMENT) break; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 05be099..cb07129 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2019-03-10 Thomas Koenig + PR fortran/66089 + * gfortran.dg/dependency_53.f90: New test. + +2019-03-10 Thomas Koenig + PR fortran/87734 * gfortran.dg/public_private_module_10.f90: New test. diff --git a/gcc/testsuite/gfortran.dg/dependency_53.f90 b/gcc/testsuite/gfortran.dg/dependency_53.f90 new file mode 100644 index 0000000..a45302f --- /dev/null +++ b/gcc/testsuite/gfortran.dg/dependency_53.f90 @@ -0,0 +1,25 @@ +! { dg-do run } +! PR fortran/66089 - used to ICE and, after that ICE was fixed, +! gave wrong results. + type :: t + integer :: c + end type t + + class(t), dimension(:), allocatable :: b,c + + allocate (b(5), source=t(7)) + allocate(c(5), source=t(13)) + c = plus(c(1), b) + if (any(c%c /= 20)) stop 1 + c = t(13) + c = plus(b, c(1)) + if (any(c%c /= 20)) stop 2 +contains + + elemental function plus(lhs, rhs) + class(t), intent(in) :: lhs, rhs + type(t) :: plus + plus%c = lhs%c + rhs%c + end function plus + +end -- cgit v1.1 From c98eece2bac43f80f8f3b1edeae253e3935d5df1 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sun, 10 Mar 2019 14:02:48 +0100 Subject: re PR c++/89648 (rejects-valid error starting with r268850) PR c++/89648 * g++.dg/cpp0x/lambda/lambda-89648.C: New test. From-SVN: r269554 --- gcc/testsuite/ChangeLog | 5 ++ gcc/testsuite/g++.dg/cpp0x/lambda/lambda-89648.C | 60 ++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-89648.C (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cb07129..e5f1da7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-10 Jakub Jelinek + + PR c++/89648 + * g++.dg/cpp0x/lambda/lambda-89648.C: New test. + 2019-03-10 Thomas Koenig PR fortran/66089 diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-89648.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-89648.C new file mode 100644 index 0000000..c7a3e84 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-89648.C @@ -0,0 +1,60 @@ +// PR c++/89648 +// { dg-do compile { target c++11 } } + +template struct A { static const T e = U; }; +template struct B; +template struct C; +template using E = typename C::k; +template struct F {}; +template using G = F; +template using H = F; +template using I = G; +template class J {}; +template struct B> : A {}; +template +struct C> : C> {}; +template struct C<0, J> { typedef T k; }; +template E> qux (J); +struct D { template void foo (T) {} }; +void bar (...); +struct K { void baz (int &); int l; D m; int *n, o; }; +template +void quux (int, int *, D x, int *, int, int, T, U, V y, H) { + x.foo ([=] { bar (qux (y)...); }); +} +void K::baz (int &x) { + J p; + int q, r; + long s; + quux (x, &l, m, n, o, r, s, q, p, I::e> ()); +} +// PR c++/89648 +// { dg-do compile { target c++11 } } + +template struct A { static const T e = U; }; +template struct B; +template struct C; +template using E = typename C::k; +template struct F {}; +template using G = F; +template using H = F; +template using I = G; +template class J {}; +template struct B> : A {}; +template +struct C> : C> {}; +template struct C<0, J> { typedef T k; }; +template E> qux (J); +struct D { template void foo (T) {} }; +void bar (...); +struct K { void baz (int &); int l; D m; int *n, o; }; +template +void quux (int, int *, D x, int *, int, int, T, U, V y, H) { + x.foo ([=] { bar (qux (y)...); }); +} +void K::baz (int &x) { + J p; + int q, r; + long s; + quux (x, &l, m, n, o, r, s, q, p, I::e> ()); +} -- cgit v1.1 From 7f862706a22c2ce0b94390c5b6ecd3cb15a135d9 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sun, 10 Mar 2019 14:21:34 +0000 Subject: re PR fortran/66089 (elemental dependency mishandling when class array are involved) 2019-03-10 Thomas Koenig PR fortran/66089 * gfortran.dg/assumed_type_2.f90: Adapted tree dumps. * gfortran.dg/no_arg_check_2.f90: Likewise. From-SVN: r269555 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gfortran.dg/assumed_type_2.f90 | 4 ++-- gcc/testsuite/gfortran.dg/no_arg_check_2.f90 | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e5f1da7..9dfdfe3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-10 Thomas Koenig + + PR fortran/66089 + * gfortran.dg/assumed_type_2.f90: Adapted tree dumps. + * gfortran.dg/no_arg_check_2.f90: Likewise. + 2019-03-10 Jakub Jelinek PR c++/89648 diff --git a/gcc/testsuite/gfortran.dg/assumed_type_2.f90 b/gcc/testsuite/gfortran.dg/assumed_type_2.f90 index acf5873..dce5ac6 100644 --- a/gcc/testsuite/gfortran.dg/assumed_type_2.f90 +++ b/gcc/testsuite/gfortran.dg/assumed_type_2.f90 @@ -157,7 +157,7 @@ end ! { dg-final { scan-tree-dump-times "sub_scalar .\\(struct t1 .\\) array_class_t1_alloc._data.data" 1 "original" } } ! { dg-final { scan-tree-dump-times "sub_scalar .\\(struct t1 .\\) \\(array_class_t1_ptr._data.dat" 1 "original" } } -! { dg-final { scan-tree-dump-times "sub_array_assumed \\(D" 3 "original" } } +! { dg-final { scan-tree-dump-times "sub_array_assumed \\(D" 4 "original" } } ! { dg-final { scan-tree-dump-times " = _gfortran_internal_pack \\(&parm" 1 "original" } } ! { dg-final { scan-tree-dump-times "sub_array_assumed \\(&array_int\\)" 1 "original" } } ! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(real\\(kind=4\\).0:. . restrict\\) array_real_alloc.data" 1 "original" } } @@ -166,7 +166,7 @@ end ! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. .\\) parm" 1 "original" } } ! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t2.0:. . restrict\\) array_t2_alloc.data\\);" 1 "original" } } ! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. . restrict\\) array_class_t1_alloc._data.data\\);" 1 "original" } } -! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. .\\) array_class_t1_ptr._data.data\\);" 1 "original" } } +! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. .\\) array_class_t1_ptr._data.data\\);" 0 "original" } } ! { dg-final { scan-tree-dump-times "sub_array_shape \\(&array_real_alloc," 1 "original" } } ! { dg-final { scan-tree-dump-times "sub_array_shape \\(&array_char_ptr," 1 "original" } } diff --git a/gcc/testsuite/gfortran.dg/no_arg_check_2.f90 b/gcc/testsuite/gfortran.dg/no_arg_check_2.f90 index f99a2e8..fe33488 100644 --- a/gcc/testsuite/gfortran.dg/no_arg_check_2.f90 +++ b/gcc/testsuite/gfortran.dg/no_arg_check_2.f90 @@ -139,7 +139,7 @@ end ! { dg-final { scan-tree-dump-times "sub_scalar .\\(struct t1 .\\) array_class_t1_alloc._data.data" 1 "original" } } ! { dg-final { scan-tree-dump-times "sub_scalar .\\(struct t1 .\\) \\(array_class_t1_ptr._data.dat" 1 "original" } } -! { dg-final { scan-tree-dump-times "sub_array_assumed \\(D" 3 "original" } } +! { dg-final { scan-tree-dump-times "sub_array_assumed \\(D" 4 "original" } } ! { dg-final { scan-tree-dump-times " = _gfortran_internal_pack \\(&parm" 1 "original" } } ! { dg-final { scan-tree-dump-times "sub_array_assumed \\(&array_int\\)" 1 "original" } } ! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(real\\(kind=4\\).0:. . restrict\\) array_real_alloc.data" 1 "original" } } @@ -148,5 +148,5 @@ end ! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. .\\) parm" 1 "original" } } ! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t2.0:. . restrict\\) array_t2_alloc.data\\);" 1 "original" } } ! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. . restrict\\) array_class_t1_alloc._data.data\\);" 1 "original" } } -! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. .\\) array_class_t1_ptr._data.data\\);" 1 "original" } } +! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. .\\) array_class_t1_ptr._data.data\\);" 0 "original" } } -- cgit v1.1 From b496651b7d281bd1bf22688f4de0cbb78c1bf8e5 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Sun, 10 Mar 2019 17:20:06 +0100 Subject: Make SRA less strict with memcpy performing MEM_REFs 2019-03-10 Martin Jambor PR tree-optimization/85762 PR tree-optimization/87008 PR tree-optimization/85459 * tree-sra.c (contains_vce_or_bfcref_p): New parameter, set the bool it points to if there is a type changing MEM_REF. Adjust all callers. (build_accesses_from_assign): Disable total scalarization if contains_vce_or_bfcref_p returns true through the new parameter, for both rhs and lhs. testsuite/ * g++.dg/tree-ssa/pr87008.C: New test. * gcc.dg/guality/pr54970.c: Xfail tests querying a[0] everywhere. From-SVN: r269556 --- gcc/ChangeLog | 11 ++++++++++ gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/g++.dg/tree-ssa/pr87008.C | 17 ++++++++++++++++ gcc/testsuite/gcc.dg/guality/pr54970.c | 6 +++--- gcc/tree-sra.c | 36 ++++++++++++++++++++++++--------- 5 files changed, 66 insertions(+), 12 deletions(-) create mode 100644 gcc/testsuite/g++.dg/tree-ssa/pr87008.C (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5b1fb49..d1e59d4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2019-03-10 Martin Jambor + + PR tree-optimization/85762 + PR tree-optimization/87008 + PR tree-optimization/85459 + * tree-sra.c (contains_vce_or_bfcref_p): New parameter, set the bool + it points to if there is a type changing MEM_REF. Adjust all callers. + (build_accesses_from_assign): Disable total scalarization if + contains_vce_or_bfcref_p returns true through the new parameter, for + both rhs and lhs. + 2019-03-09 Jakub Jelinek PR c/88568 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9dfdfe3..b6d6f67 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2019-03-10 Martin Jambor + + PR tree-optimization/85762 + PR tree-optimization/87008 + PR tree-optimization/85459 + * g++.dg/tree-ssa/pr87008.C: New test. + * gcc.dg/guality/pr54970.c: Xfail tests querying a[0] everywhere. + 2019-03-10 Thomas Koenig PR fortran/66089 diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr87008.C b/gcc/testsuite/g++.dg/tree-ssa/pr87008.C new file mode 100644 index 0000000..eef521f --- /dev/null +++ b/gcc/testsuite/g++.dg/tree-ssa/pr87008.C @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + +extern void dontcallthis(); + +struct A { long a, b; }; +struct B : A {}; +templatevoid cp(T&a,T const&b){a=b;} +long f(B x){ + B y; cp(y,x); + B z; cp(z,x); + if (y.a - z.a) + dontcallthis (); + return 0; +} + +/* { dg-final { scan-tree-dump-not "dontcallthis" "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/guality/pr54970.c b/gcc/testsuite/gcc.dg/guality/pr54970.c index 5d32af0..2e0bc57 100644 --- a/gcc/testsuite/gcc.dg/guality/pr54970.c +++ b/gcc/testsuite/gcc.dg/guality/pr54970.c @@ -8,17 +8,17 @@ int main () { - int a[] = { 1, 2, 3 }; /* { dg-final { gdb-test .+4 "a\[0\]" "1" } } */ + int a[] = { 1, 2, 3 }; /* { dg-final { gdb-test .+4 "a\[0\]" "1" { xfail { *-*-* } } } } */ int *p = a + 2; /* { dg-final { gdb-test .+3 "a\[1\]" "2" } } */ int *q = a + 1; /* { dg-final { gdb-test .+2 "a\[2\]" "3" } } */ /* { dg-final { gdb-test .+1 "*p" "3" } } */ asm volatile (NOP); /* { dg-final { gdb-test . "*q" "2" } } */ - *p += 10; /* { dg-final { gdb-test .+4 "a\[0\]" "1" } } */ + *p += 10; /* { dg-final { gdb-test .+4 "a\[0\]" "1" { xfail { *-*-* } } } } */ /* { dg-final { gdb-test .+3 "a\[1\]" "2" } } */ /* { dg-final { gdb-test .+2 "a\[2\]" "13" } } */ /* { dg-final { gdb-test .+1 "*p" "13" } } */ asm volatile (NOP); /* { dg-final { gdb-test . "*q" "2" } } */ - *q += 10; /* { dg-final { gdb-test .+4 "a\[0\]" "1" } } */ + *q += 10; /* { dg-final { gdb-test .+4 "a\[0\]" "1" { xfail { *-*-* } } } } */ /* { dg-final { gdb-test .+3 "a\[1\]" "12" } } */ /* { dg-final { gdb-test .+2 "a\[2\]" "13" } } */ /* { dg-final { gdb-test .+1 "*p" "13" } } */ diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index eeef31b..ca3858d 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1150,29 +1150,36 @@ contains_view_convert_expr_p (const_tree ref) return false; } -/* Return true if REF contains a VIEW_CONVERT_EXPR or a MEM_REF that performs - type conversion or a COMPONENT_REF with a bit-field field declaration. */ +/* Return true if REF contains a VIEW_CONVERT_EXPR or a COMPONENT_REF with a + bit-field field declaration. If TYPE_CHANGING_P is non-NULL, set the bool + it points to will be set if REF contains any of the above or a MEM_REF + expression that effectively performs type conversion. */ static bool -contains_vce_or_bfcref_p (const_tree ref) +contains_vce_or_bfcref_p (const_tree ref, bool *type_changing_p = NULL) { while (handled_component_p (ref)) { if (TREE_CODE (ref) == VIEW_CONVERT_EXPR || (TREE_CODE (ref) == COMPONENT_REF && DECL_BIT_FIELD (TREE_OPERAND (ref, 1)))) - return true; + { + if (type_changing_p) + *type_changing_p = true; + return true; + } ref = TREE_OPERAND (ref, 0); } - if (TREE_CODE (ref) != MEM_REF + if (!type_changing_p + || TREE_CODE (ref) != MEM_REF || TREE_CODE (TREE_OPERAND (ref, 0)) != ADDR_EXPR) return false; tree mem = TREE_OPERAND (TREE_OPERAND (ref, 0), 0); if (TYPE_MAIN_VARIANT (TREE_TYPE (ref)) != TYPE_MAIN_VARIANT (TREE_TYPE (mem))) - return true; + *type_changing_p = true; return false; } @@ -1368,15 +1375,26 @@ build_accesses_from_assign (gimple *stmt) lacc->grp_assignment_write = 1; if (storage_order_barrier_p (rhs)) lacc->grp_unscalarizable_region = 1; + + if (should_scalarize_away_bitmap && !is_gimple_reg_type (lacc->type)) + { + bool type_changing_p = false; + contains_vce_or_bfcref_p (lhs, &type_changing_p); + if (type_changing_p) + bitmap_set_bit (cannot_scalarize_away_bitmap, + DECL_UID (lacc->base)); + } } if (racc) { racc->grp_assignment_read = 1; - if (should_scalarize_away_bitmap && !gimple_has_volatile_ops (stmt) - && !is_gimple_reg_type (racc->type)) + if (should_scalarize_away_bitmap && !is_gimple_reg_type (racc->type)) { - if (contains_vce_or_bfcref_p (rhs)) + bool type_changing_p = false; + contains_vce_or_bfcref_p (rhs, &type_changing_p); + + if (type_changing_p || gimple_has_volatile_ops (stmt)) bitmap_set_bit (cannot_scalarize_away_bitmap, DECL_UID (racc->base)); else -- cgit v1.1 From 1c63105c0cfc9d75b3c07bcb242a2863003874d3 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Sun, 10 Mar 2019 16:29:48 +0000 Subject: re PR d/88958 (ICE in walk_aliased_vdefs_1, at tree-ssa-alias.c:2887) PR d/88958 d/dmd: Merge upstream dmd 0fc786f49 Backport fix to disallow passing functions as parameters. Fixes https://gcc.gnu.org/PR88958 Reviewed-on: https://github.com/dlang/dmd/pull/9437 From-SVN: r269557 --- gcc/d/dmd/MERGE | 2 +- gcc/d/dmd/expressionsem.c | 6 ++++++ gcc/testsuite/gdc.test/fail_compilation/test19608.d | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gdc.test/fail_compilation/test19608.d (limited to 'gcc') diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index 3f416db..98bf825 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -d517c0e6a10b548f44d82b71b3c079663cb94f8e +0fc786f4908aa6bdd4220af87995333b1f24c3d7 The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/expressionsem.c b/gcc/d/dmd/expressionsem.c index 3fd5c1f..bcc1ac9 100644 --- a/gcc/d/dmd/expressionsem.c +++ b/gcc/d/dmd/expressionsem.c @@ -102,6 +102,12 @@ static bool preFunctionParameters(Scope *sc, Expressions *exps) arg = new ErrorExp(); err = true; } + else if (arg->type->toBasetype()->ty == Tfunction) + { + arg->error("cannot pass type %s as a function argument", arg->toChars()); + arg = new ErrorExp(); + err = true; + } else if (checkNonAssignmentArrayOp(arg)) { arg = new ErrorExp(); diff --git a/gcc/testsuite/gdc.test/fail_compilation/test19608.d b/gcc/testsuite/gdc.test/fail_compilation/test19608.d new file mode 100644 index 0000000..cea84a6 --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/test19608.d @@ -0,0 +1,16 @@ +// https://issues.dlang.org/show_bug.cgi?id=19608 +/* +TEST_OUTPUT: +--- +fail_compilation/test19608.d(15): Error: cannot pass function `*& f` as a function argument +--- +*/ +import core.stdc.stdarg; + +void f(int) {} +void g(...) {} +void h() +{ + g(&f); // OK, function address + g(*&f); // ICE -> Error +} -- cgit v1.1 From aa05353c1e3f7c18d021741a0f86312473a62a9f Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Sun, 10 Mar 2019 16:43:48 +0000 Subject: Compile gcc.target/i386/indirect-thunk-extern-7.c with -fjump-tables * gcc.target/i386/indirect-thunk-extern-7.c: Add -fjump-tables to dg-options. From-SVN: r269558 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b6d6f67..2a00fe9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-10 Rainer Orth + + * gcc.target/i386/indirect-thunk-extern-7.c: Add -fjump-tables to + dg-options. + 2019-03-10 Martin Jambor PR tree-optimization/85762 diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c index b733974..95c5cc1 100644 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c +++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */ +/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic -fjump-tables" } */ void func0 (void); void func1 (void); -- cgit v1.1 From 055c7e41132ad4788367af718e5d26953ba23162 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Sun, 10 Mar 2019 16:45:23 +0000 Subject: Mark gdc.dg/pr89041.d as compile test * gdc.dg/pr89041.d: Mark as compile test. From-SVN: r269559 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gdc.dg/pr89041.d | 1 + 2 files changed, 5 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2a00fe9..fc117d8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2019-03-10 Rainer Orth + * gdc.dg/pr89041.d: Mark as compile test. + +2019-03-10 Rainer Orth + * gcc.target/i386/indirect-thunk-extern-7.c: Add -fjump-tables to dg-options. diff --git a/gcc/testsuite/gdc.dg/pr89041.d b/gcc/testsuite/gdc.dg/pr89041.d index b62c2db..b51643c 100644 --- a/gcc/testsuite/gdc.dg/pr89041.d +++ b/gcc/testsuite/gdc.dg/pr89041.d @@ -1,4 +1,5 @@ // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89041 +// { dg-do compile } module pr89041; enum dg = delegate {}; -- cgit v1.1 From 42a84c28ef2fec57faa061e0676437e354c8c521 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Sun, 10 Mar 2019 17:25:18 +0000 Subject: re PR d/89016 (ICE in ArrayLiteralExp::toStringExp, at d/dmd/expression.c:3873) PR d/89016 d/dmd: Merge upstream dmd da26db819 Backports supplementary fix for ICE on importing deprecated modules. Updates https://gcc.gnu.org/PR89016 Reviewed-on: https://github.com/dlang/dmd/pull/9436 From-SVN: r269560 --- gcc/d/dmd/MERGE | 2 +- gcc/d/dmd/dimport.c | 8 ++------ gcc/testsuite/gdc.test/fail_compilation/fail19609.d | 13 +++++++------ .../gdc.test/fail_compilation/imports/fail19609d.d | 2 ++ 4 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 gcc/testsuite/gdc.test/fail_compilation/imports/fail19609d.d (limited to 'gcc') diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index 98bf825..313748f 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -0fc786f4908aa6bdd4220af87995333b1f24c3d7 +da26db81943952c7e35dab98650df589ec122485 The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/dimport.c b/gcc/d/dmd/dimport.c index cd2c5b2..3d899f0 100644 --- a/gcc/d/dmd/dimport.c +++ b/gcc/d/dmd/dimport.c @@ -23,8 +23,6 @@ #include "attrib.h" #include "hdrgen.h" -StringExp *semanticString(Scope *sc, Expression *exp, const char *s); - /********************************* Import ****************************/ Import::Import(Loc loc, Identifiers *packages, Identifier *id, Identifier *aliasId, @@ -175,19 +173,17 @@ void Import::importAll(Scope *sc) load(sc); if (mod) // if successfully loaded module { + mod->importAll(NULL); + if (mod->md && mod->md->isdeprecated) { Expression *msg = mod->md->msg; - if (msg) - msg = semanticString(sc, msg, "deprecation message"); if (StringExp *se = msg ? msg->toStringExp() : NULL) mod->deprecation(loc, "is deprecated - %s", se->string); else mod->deprecation(loc, "is deprecated"); } - mod->importAll(NULL); - if (sc->explicitProtection) protection = sc->protection; if (!isstatic && !aliasId && !names.dim) diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19609.d b/gcc/testsuite/gdc.test/fail_compilation/fail19609.d index 64d080a..26ef576 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail19609.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail19609.d @@ -3,16 +3,17 @@ TEST_OUTPUT --- fail_compilation/imports/fail19609a.d(1): Error: `string` expected for deprecation message, not `([""])` of type `string[]` -fail_compilation/fail19609.d(16): Deprecation: module `imports.fail19609a` is deprecated -fail_compilation/imports/fail19609a.d(1): Error: `string` expected for deprecation message, not `([""])` of type `string[]` -fail_compilation/imports/fail19609b.d(1): Error: `string` expected for deprecation message, not `([1])` of type `int[]` -fail_compilation/fail19609.d(17): Deprecation: module `imports.fail19609b` is deprecated +fail_compilation/fail19609.d(15): Deprecation: module `imports.fail19609a` is deprecated fail_compilation/imports/fail19609b.d(1): Error: `string` expected for deprecation message, not `([1])` of type `int[]` +fail_compilation/fail19609.d(16): Deprecation: module `imports.fail19609b` is deprecated fail_compilation/imports/fail19609c.d(1): Error: `string` expected for deprecation message, not `(123.4F)` of type `float` -fail_compilation/fail19609.d(18): Deprecation: module `imports.fail19609c` is deprecated -fail_compilation/imports/fail19609c.d(1): Error: `string` expected for deprecation message, not `(123.4F)` of type `float` +fail_compilation/fail19609.d(17): Deprecation: module `imports.fail19609c` is deprecated +fail_compilation/imports/fail19609d.d(1): Error: undefined identifier `msg` +fail_compilation/fail19609.d(19): Deprecation: module `imports.fail19609d` is deprecated --- */ import imports.fail19609a; import imports.fail19609b; import imports.fail19609c; +enum msg = "You should not be able to see me"; +import imports.fail19609d; diff --git a/gcc/testsuite/gdc.test/fail_compilation/imports/fail19609d.d b/gcc/testsuite/gdc.test/fail_compilation/imports/fail19609d.d new file mode 100644 index 0000000..0955ca4 --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/imports/fail19609d.d @@ -0,0 +1,2 @@ +deprecated(msg) module imports.fail19609d; +enum msg = "You won't see this either"; -- cgit v1.1 From 5f49d2fc4e52398f04a39f81069bb5d1c21bb168 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Sun, 10 Mar 2019 21:55:30 +0000 Subject: re PR d/87824 (x86_64-linux multilib issues) PR d/87824 d/dmd: Merge upstream dmd fcc235e8e Associative arrays are value types, which are not covariant with the pointer type typeof(null). Updates https://gcc.gnu.org/PR87824 Reviewed-on: https://github.com/dlang/dmd/pull/9435 From-SVN: r269561 --- gcc/d/dmd/MERGE | 2 +- gcc/d/dmd/mtype.c | 13 ++++++++++--- gcc/testsuite/gdc.test/runnable/nulltype.d | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) (limited to 'gcc') diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index 313748f..cf5a22f 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -da26db81943952c7e35dab98650df589ec122485 +fcc235e8e25f7758266f7874edd5abefb9943e0b The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/mtype.c b/gcc/d/dmd/mtype.c index 2a23cab..900f172 100644 --- a/gcc/d/dmd/mtype.c +++ b/gcc/d/dmd/mtype.c @@ -5331,9 +5331,16 @@ int Type::covariant(Type *t, StorageClass *pstc, bool fix17349) } else if (t1n->ty == t2n->ty && t1n->implicitConvTo(t2n)) goto Lcovariant; - else if (t1n->ty == Tnull && t1n->implicitConvTo(t2n) && - t1n->size() == t2n->size()) - goto Lcovariant; + else if (t1n->ty == Tnull) + { + // NULL is covariant with any pointer type, but not with any + // dynamic arrays, associative arrays or delegates. + // https://issues.dlang.org/show_bug.cgi?id=8589 + // https://issues.dlang.org/show_bug.cgi?id=19618 + Type *t2bn = t2n->toBasetype(); + if (t2bn->ty == Tnull || t2bn->ty == Tpointer || t2bn->ty == Tclass) + goto Lcovariant; + } } goto Lnotcovariant; diff --git a/gcc/testsuite/gdc.test/runnable/nulltype.d b/gcc/testsuite/gdc.test/runnable/nulltype.d index 32d1174..c400d7f 100644 --- a/gcc/testsuite/gdc.test/runnable/nulltype.d +++ b/gcc/testsuite/gdc.test/runnable/nulltype.d @@ -127,7 +127,7 @@ void test8589() { void f(T function() dg) { assert(!dg()); } - static assert((T.sizeof == typeof(null).sizeof) == result); + static assert((is(typeof(null) function() : T function())) == result); static assert(is(typeof( f(&retnull) )) == result); static assert(is(typeof( f(()=>null) )) == result); static if (result) @@ -138,7 +138,7 @@ void test8589() } test!(true, int*)(); test!(true, Object)(); - test!(true, int[int])(); + test!(false, int[int])(); test!(false, int[])(); test!(false, void delegate())(); } -- cgit v1.1 From c89f54838c313ab599fd5c406ebb5c0290aff492 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Sun, 10 Mar 2019 23:59:31 +0100 Subject: re PR target/68924 (No intrinsic for x86 `MOVQ m64, %xmm` in 32bit mode.) PR target/68924 * config/i386/sse.md (*vec_extractv2di_0_sse): Add (=r,x) alternative and corresponding splitter. From-SVN: r269562 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/sse.md | 30 +++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d1e59d4..24194ab 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-10 Uroš Bizjak + + PR target/68924 + * config/i386/sse.md (*vec_extractv2di_0_sse): + Add (=r,x) alternative and corresponding splitter. + 2019-03-10 Martin Jambor PR tree-optimization/85762 diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 259063f..d4c0140 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -14308,13 +14308,37 @@ (symbol_ref "true")))]) (define_insn "*vec_extractv2di_0_sse" - [(set (match_operand:DI 0 "nonimmediate_operand" "=v,m") + [(set (match_operand:DI 0 "nonimmediate_operand" "=r,x ,m") (vec_select:DI - (match_operand:V2DI 1 "nonimmediate_operand" "vm,v") + (match_operand:V2DI 1 "nonimmediate_operand" " x,xm,x") (parallel [(const_int 0)])))] "TARGET_SSE && !TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))" - "#") + "#" + [(set_attr "isa" "sse4,*,*") + (set (attr "preferred_for_speed") + (cond [(eq_attr "alternative" "0") + (symbol_ref "TARGET_INTER_UNIT_MOVES_FROM_VEC") + ] + (symbol_ref "true")))]) + +(define_split + [(set (match_operand:DI 0 "general_reg_operand") + (vec_select:DI + (match_operand:V2DI 1 "register_operand") + (parallel [(const_int 0)])))] + "TARGET_SSE4_1 && !TARGET_64BIT + && reload_completed" + [(set (match_dup 2) (match_dup 4)) + (set (match_dup 3) + (vec_select:SI + (match_dup 5) + (parallel [(const_int 1)])))] +{ + operands[4] = gen_lowpart (SImode, operands[1]); + operands[5] = gen_lowpart (V4SImode, operands[1]); + split_double_mode (DImode, &operands[0], 1, &operands[2], &operands[3]); +}) (define_split [(set (match_operand:SWI48x 0 "nonimmediate_operand") -- cgit v1.1 From 49cb9b53e0fe26fcd317483dfa28994b52035420 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 11 Mar 2019 00:16:14 +0000 Subject: Daily bump. From-SVN: r269565 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index a82dd10..6bb0d5a 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20190310 +20190311 -- cgit v1.1 From 6068721c55ada48a275ecef0e32b72d05748bd8e Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 11 Mar 2019 08:30:48 +0100 Subject: Fix up doubly applied patch making two copies of the test in one file. From-SVN: r269566 --- gcc/testsuite/g++.dg/cpp0x/lambda/lambda-89648.C | 30 ------------------------ 1 file changed, 30 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-89648.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-89648.C index c7a3e84..966dcaa 100644 --- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-89648.C +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-89648.C @@ -28,33 +28,3 @@ void K::baz (int &x) { long s; quux (x, &l, m, n, o, r, s, q, p, I::e> ()); } -// PR c++/89648 -// { dg-do compile { target c++11 } } - -template struct A { static const T e = U; }; -template struct B; -template struct C; -template using E = typename C::k; -template struct F {}; -template using G = F; -template using H = F; -template using I = G; -template class J {}; -template struct B> : A {}; -template -struct C> : C> {}; -template struct C<0, J> { typedef T k; }; -template E> qux (J); -struct D { template void foo (T) {} }; -void bar (...); -struct K { void baz (int &); int l; D m; int *n, o; }; -template -void quux (int, int *, D x, int *, int, int, T, U, V y, H) { - x.foo ([=] { bar (qux (y)...); }); -} -void K::baz (int &x) { - J p; - int q, r; - long s; - quux (x, &l, m, n, o, r, s, q, p, I::e> ()); -} -- cgit v1.1 From 470fa18b8d54594b339dafbd77ece4b05b4f00c3 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 11 Mar 2019 10:30:24 +0000 Subject: re PR c++/87571 (ICE in friend_accessible_p, accessing protected member of template friend inside template class) 2019-03-11 Paolo Carlini PR c++/87571 * g++.dg/template/memfriend18.C: New. From-SVN: r269575 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/template/memfriend18.C | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/memfriend18.C (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fc117d8..ac02d28 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-11 Paolo Carlini + + PR c++/87571 + * g++.dg/template/memfriend18.C: New. + 2019-03-10 Rainer Orth * gdc.dg/pr89041.d: Mark as compile test. diff --git a/gcc/testsuite/g++.dg/template/memfriend18.C b/gcc/testsuite/g++.dg/template/memfriend18.C new file mode 100644 index 0000000..ac21896 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/memfriend18.C @@ -0,0 +1,19 @@ +// PR c++/87571 + +template struct A { + template struct B { + template friend class B; + protected: + int protected_member_; + public: + template int method(const B& other) const { + return other.protected_member_; + } + }; +}; + +int main() { + A::B a; + A::B b; + a.method(b); +} -- cgit v1.1 From 03001a351528a1fc35bfe0c70deb08c7e18d314b Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 11 Mar 2019 11:31:05 +0000 Subject: re PR tree-optimization/89649 (r269458 FAILs g++.dg/pr80481.C, scan-assembler-not vmovaps) 2019-03-11 Richard Biener PR tree-optimization/89649 * tree-vectorizer.h (vect_loop_versioning): Adjust prototype. * tree-vect-loop-manip.c (vect_do_peeling): Unset force_vectorize on the prolog and epilog loops. (vect_loop_versioning): Return copy of loop. * tree-vect-loop.c (vect_transform_loop): Unset force_vectorize on the non-vectorized version of the loop. From-SVN: r269578 --- gcc/ChangeLog | 10 ++++++++++ gcc/tree-vect-loop-manip.c | 6 +++++- gcc/tree-vect-loop.c | 6 ++++-- gcc/tree-vectorizer.h | 4 ++-- 4 files changed, 21 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 24194ab..cf2e61d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2019-03-11 Richard Biener + + PR tree-optimization/89649 + * tree-vectorizer.h (vect_loop_versioning): Adjust prototype. + * tree-vect-loop-manip.c (vect_do_peeling): Unset force_vectorize + on the prolog and epilog loops. + (vect_loop_versioning): Return copy of loop. + * tree-vect-loop.c (vect_transform_loop): Unset force_vectorize + on the non-vectorized version of the loop. + 2019-03-10 Uroš Bizjak PR target/68924 diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index 58d1850..77d3dac 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -2542,6 +2542,7 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1, "slpeel_tree_duplicate_loop_to_edge_cfg failed.\n"); gcc_unreachable (); } + prolog->force_vectorize = false; slpeel_update_phi_nodes_for_loops (loop_vinfo, prolog, loop, true); first_loop = prolog; reset_original_copy_tables (); @@ -2612,6 +2613,7 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1, "slpeel_tree_duplicate_loop_to_edge_cfg failed.\n"); gcc_unreachable (); } + epilog->force_vectorize = false; slpeel_update_phi_nodes_for_loops (loop_vinfo, loop, epilog, false); /* Scalar version loop may be preferred. In this case, add guard @@ -2984,7 +2986,7 @@ vect_create_cond_for_alias_checks (loop_vec_info loop_vinfo, tree * cond_expr) The versioning precondition(s) are placed in *COND_EXPR and *COND_EXPR_STMT_LIST. */ -void +struct loop * vect_loop_versioning (loop_vec_info loop_vinfo, unsigned int th, bool check_profitability, poly_uint64 versioning_threshold) @@ -3154,4 +3156,6 @@ vect_loop_versioning (loop_vec_info loop_vinfo, GSI_SAME_STMT); } update_ssa (TODO_update_ssa); + + return nloop; } diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index e088b6f..bd81193 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -8201,8 +8201,10 @@ vect_transform_loop (loop_vec_info loop_vinfo) versioning_threshold); check_profitability = false; } - vect_loop_versioning (loop_vinfo, th, check_profitability, - versioning_threshold); + struct loop *sloop + = vect_loop_versioning (loop_vinfo, th, check_profitability, + versioning_threshold); + sloop->force_vectorize = false; check_profitability = false; } diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 0e056f3..d67c544 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -1449,8 +1449,8 @@ extern void vect_set_loop_condition (struct loop *, loop_vec_info, extern bool slpeel_can_duplicate_loop_p (const struct loop *, const_edge); struct loop *slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *, struct loop *, edge); -extern void vect_loop_versioning (loop_vec_info, unsigned int, bool, - poly_uint64); +struct loop *vect_loop_versioning (loop_vec_info, unsigned int, bool, + poly_uint64); extern struct loop *vect_do_peeling (loop_vec_info, tree, tree, tree *, tree *, tree *, int, bool, bool); extern void vect_prepare_for_masked_peels (loop_vec_info); -- cgit v1.1 From cb90c0014070f4ace5bb88258b31c1d654162306 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 11 Mar 2019 11:37:46 +0000 Subject: re PR rtl-optimization/89588 (ICE in unroll_loop_constant_iterations, at loop-unroll.c:498) PR rtl-optimization/89588 * loop-unroll.c (decide_unroll_constant_iterations): Make guard for explicit unrolling factor more robust. From-SVN: r269579 --- gcc/ChangeLog | 6 ++++++ gcc/loop-unroll.c | 2 +- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/c-c++-common/unroll-6.c | 9 +++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/c-c++-common/unroll-6.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cf2e61d..989f883 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-11 Eric Botcazou + + PR rtl-optimization/89588 + * loop-unroll.c (decide_unroll_constant_iterations): Make guard for + explicit unrolling factor more robust. + 2019-03-11 Richard Biener PR tree-optimization/89649 diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c index cbc6673..0164762 100644 --- a/gcc/loop-unroll.c +++ b/gcc/loop-unroll.c @@ -400,7 +400,7 @@ decide_unroll_constant_iterations (struct loop *loop, int flags) { /* However we cannot unroll completely at the RTL level a loop with constant number of iterations; it should have been peeled instead. */ - if ((unsigned) loop->unroll - 1 > desc->niter - 2) + if ((unsigned) loop->unroll > desc->niter - 1) { if (dump_file) fprintf (dump_file, ";; Loop should have been peeled\n"); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ac02d28..e8d393a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-03-11 Eric Botcazou + + * c-c++-common/unroll-6.c: New test. + 2019-03-11 Paolo Carlini PR c++/87571 diff --git a/gcc/testsuite/c-c++-common/unroll-6.c b/gcc/testsuite/c-c++-common/unroll-6.c new file mode 100644 index 0000000..fd74f19 --- /dev/null +++ b/gcc/testsuite/c-c++-common/unroll-6.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fno-tree-loop-optimize" } */ + +void test (void) +{ + #pragma GCC unroll 2 + for (int nv = 0; nv <= 2; nv += 2) + {} +} -- cgit v1.1 From 52eba77915ed77da53928905a731840249cf45d5 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 11 Mar 2019 12:48:49 +0100 Subject: Improve JSON format: add function names for lines. 2019-03-11 Martin Liska * gcov.c (output_intermediate_json_line): Print function name of each line. (output_json_intermediate_file): Add new argument. * doc/gcov.texi: Document the change. From-SVN: r269581 --- gcc/ChangeLog | 7 +++++++ gcc/doc/gcov.texi | 5 +++++ gcc/gcov.c | 20 ++++++++++++++++---- 3 files changed, 28 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 989f883..d4bfbec 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-03-11 Martin Liska + + * gcov.c (output_intermediate_json_line): Print function + name of each line. + (output_json_intermediate_file): Add new argument. + * doc/gcov.texi: Document the change. + 2019-03-11 Eric Botcazou PR rtl-optimization/89588 diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi index eaac2f6..0960e4a 100644 --- a/gcc/doc/gcov.texi +++ b/gcc/doc/gcov.texi @@ -276,6 +276,7 @@ Each @var{line} has the following form: "count": @var{count}, "line_number": @var{line_number}, "unexecuted_block": @var{unexecuted_block} + "function_name": @var{function_name}, @} @end smallexample @@ -294,6 +295,10 @@ Fields of the @var{line} element have following semantics: (not all statements on the line are executed) @end itemize +@item +@var{function_name}: a name of a function this @var{line} belongs to +(for a line with an inlined statements can be not set) + Each @var{branch} has the following form: @smallexample diff --git a/gcc/gcov.c b/gcc/gcov.c index 9e27a82..37e787a 100644 --- a/gcc/gcov.c +++ b/gcc/gcov.c @@ -1041,17 +1041,21 @@ process_args (int argc, char **argv) return optind; } -/* Output intermediate LINE sitting on LINE_NUM to JSON OBJECT. */ +/* Output intermediate LINE sitting on LINE_NUM to JSON OBJECT. + Add FUNCTION_NAME to the LINE. */ static void output_intermediate_json_line (json::array *object, - line_info *line, unsigned line_num) + line_info *line, unsigned line_num, + const char *function_name) { if (!line->exists) return; json::object *lineo = new json::object (); lineo->set ("line_number", new json::number (line_num)); + if (function_name != NULL) + lineo->set ("function_name", new json::string (function_name)); lineo->set ("count", new json::number (line->count)); lineo->set ("unexecuted_block", new json::literal (line->has_unexecuted_block)); @@ -1141,6 +1145,8 @@ output_json_intermediate_file (json::array *json_files, source_info *src) json::array *lineso = new json::array (); root->set ("lines", lineso); + function_info *last_non_group_fn = NULL; + for (unsigned line_num = 1; line_num <= src->lines.size (); line_num++) { vector *fns = src->get_functions_at_location (line_num); @@ -1150,17 +1156,23 @@ output_json_intermediate_file (json::array *json_files, source_info *src) for (vector::iterator it2 = fns->begin (); it2 != fns->end (); it2++) { + if (!(*it2)->is_group) + last_non_group_fn = *it2; + vector &lines = (*it2)->lines; for (unsigned i = 0; i < lines.size (); i++) { line_info *line = &lines[i]; - output_intermediate_json_line (lineso, line, line_num + i); + output_intermediate_json_line (lineso, line, line_num + i, + (*it2)->m_name); } } /* Follow with lines associated with the source file. */ if (line_num < src->lines.size ()) - output_intermediate_json_line (lineso, &src->lines[line_num], line_num); + output_intermediate_json_line (lineso, &src->lines[line_num], line_num, + (last_non_group_fn != NULL + ? last_non_group_fn->m_name : NULL)); } } -- cgit v1.1 From ac5aeaae413341adc57926e8ab43fd1e3ec9f7c2 Mon Sep 17 00:00:00 2001 From: Andreas Krebbel Date: Mon, 11 Mar 2019 13:30:35 +0000 Subject: S/390: Fix immediate vector operands for some builtins. This fixes a problem with vec_add/sub_u128 builtins. The s390_expand_builtin backend function is supposed to convert the operand to TImode *AND* load it into a vector register. The current implementation did only the conversion and gave up then. gcc/ChangeLog: 2019-03-11 Andreas Krebbel * config/s390/s390.c (s390_expand_builtin): Do the copy_to_reg not only on the else branch. gcc/testsuite/ChangeLog: 2019-03-11 Andreas Krebbel * gcc.target/s390/zvector/vec-addc-u128.c: New test. From-SVN: r269583 --- gcc/ChangeLog | 5 +++++ gcc/config/s390/s390.c | 14 ++++++++++---- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.target/s390/zvector/vec-addc-u128.c | 10 ++++++++++ 4 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.target/s390/zvector/vec-addc-u128.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d4bfbec..83f5a83 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-03-11 Andreas Krebbel + + * config/s390/s390.c (s390_expand_builtin): Do the copy_to_reg not + only on the else branch. + 2019-03-11 Martin Liska * gcov.c (output_intermediate_json_line): Print function diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index fce463f..b80d5e8 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -928,6 +928,8 @@ s390_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, continue; } + /* A memory operand is rejected by the memory_operand predicate. + Try making the address legal by copying it into a register. */ if (MEM_P (op[arity]) && insn_op->predicate == memory_operand && (GET_MODE (XEXP (op[arity], 0)) == Pmode @@ -951,10 +953,14 @@ s390_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, { op[arity] = tmp_rtx; } - else if (GET_MODE (op[arity]) == insn_op->mode - || GET_MODE (op[arity]) == VOIDmode - || (insn_op->predicate == address_operand - && GET_MODE (op[arity]) == Pmode)) + + /* The predicate rejects the operand although the mode is fine. + Copy the operand to register. */ + if (!insn_op->predicate (op[arity], insn_op->mode) + && (GET_MODE (op[arity]) == insn_op->mode + || GET_MODE (op[arity]) == VOIDmode + || (insn_op->predicate == address_operand + && GET_MODE (op[arity]) == Pmode))) { /* An address_operand usually has VOIDmode in the expander so we cannot use this. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e8d393a..5d09166 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-03-11 Andreas Krebbel + + * gcc.target/s390/zvector/vec-addc-u128.c: New test. + 2019-03-11 Eric Botcazou * c-c++-common/unroll-6.c: New test. diff --git a/gcc/testsuite/gcc.target/s390/zvector/vec-addc-u128.c b/gcc/testsuite/gcc.target/s390/zvector/vec-addc-u128.c new file mode 100644 index 0000000..3ab0c71 --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/zvector/vec-addc-u128.c @@ -0,0 +1,10 @@ +/* { dg-do compile { target { s390*-*-* } } } */ +/* { dg-options "-O3 -mzarch -march=z13 -mzvector -fno-asynchronous-unwind-tables" } */ + +#include + +vector unsigned char test(void) +{ + vector unsigned char a = { 0 }; + return __builtin_s390_vec_addc_u128 (a, a); +} -- cgit v1.1 From a3f9f006a8e24bfc2a045b918a4f3665407f0018 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 11 Mar 2019 14:58:44 +0100 Subject: Wrap option names in gcc internal messages with %< and %>. 2019-03-11 Martin Liska * check-internal-format-escaping.py: New file. 2019-03-11 Martin Liska * builtins.c (expand_builtin_thread_pointer): Wrap an option name in a string format message and fix GNU coding style. (expand_builtin_set_thread_pointer): Likewise. * common/config/aarch64/aarch64-common.c (aarch64_rewrite_selected_cpu): Likewise. * common/config/alpha/alpha-common.c (alpha_handle_option): Likewise. * common/config/arc/arc-common.c (arc_handle_option): Likewise. * common/config/arm/arm-common.c (arm_parse_fpu_option): Likewise. * common/config/bfin/bfin-common.c (bfin_handle_option): Likewise. * common/config/i386/i386-common.c (ix86_handle_option): Likewise. * common/config/ia64/ia64-common.c (ia64_handle_option): Likewise. * common/config/m68k/m68k-common.c (m68k_handle_option): Likewise. * common/config/msp430/msp430-common.c (msp430_handle_option): Likewise. * common/config/nds32/nds32-common.c (nds32_handle_option): Likewise. * common/config/powerpcspe/powerpcspe-common.c (rs6000_handle_option): Likewise. * common/config/riscv/riscv-common.c (riscv_subset_list::parsing_subset_version): Likewise. (riscv_subset_list::parse_std_ext): Likewise. (riscv_subset_list::parse_sv_or_non_std_ext): Likewise. (riscv_subset_list::parse): Likewise. * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Likewise. * config/aarch64/aarch64.c (aarch64_parse_one_option_token): Likewise. (aarch64_override_options_internal): Likewise. (aarch64_validate_mcpu): Likewise. (aarch64_validate_march): Likewise. (aarch64_validate_mtune): Likewise. (aarch64_override_options): Likewise. * config/alpha/alpha.c (alpha_option_override): Likewise. * config/arc/arc.c (arc_init): Likewise. (parse_mrgf_banked_regs_option): Likewise. (arc_override_options): Likewise. (arc_expand_builtin_aligned): Likewise. * config/arm/arm-builtins.c (arm_expand_neon_builtin): Likewise. (arm_expand_builtin): Likewise. * config/arm/arm.c (arm_option_check_internal): Likewise. (arm_configure_build_target): Likewise. (arm_option_override): Likewise. (arm_options_perform_arch_sanity_checks): Likewise. (arm_handle_cmse_nonsecure_entry): Likewise. (arm_handle_cmse_nonsecure_call): Likewise. (arm_tls_referenced_p): Likewise. (thumb1_expand_prologue): Likewise. * config/avr/avr.c (avr_option_override): Likewise. * config/bfin/bfin.c (bfin_option_override): Likewise. * config/c6x/c6x.c (c6x_option_override): Likewise. * config/cr16/cr16.c (cr16_override_options): Likewise. * config/cris/cris.c (cris_option_override): Likewise. * config/csky/csky.c (csky_handle_isr_attribute): Likewise. * config/darwin-c.c (macosx_version_as_macro): Likewise. * config/darwin.c (darwin_override_options): Likewise. * config/frv/frv.c (frv_expand_builtin): Likewise. * config/h8300/h8300.c (h8300_option_override): Likewise. * config/i386/i386.c (parse_mtune_ctrl_str): Likewise. (ix86_option_override_internal): Likewise. (warn_once_call_ms2sysv_xlogues): Likewise. (ix86_expand_prologue): Likewise. (split_stack_prologue_scratch_regno): Likewise. (ix86_warn_parameter_passing_abi): Likewise. * config/ia64/ia64.c (fix_range): Likewise. * config/m68k/m68k.c (m68k_option_override): Likewise. * config/microblaze/microblaze.c (microblaze_option_override): Likewise. * config/mips/mips.c (mips_emit_probe_stack_range): Likewise. (mips_set_compression_mode): Likewise. * config/mmix/mmix.c (mmix_option_override): Likewise. * config/mn10300/mn10300.c (mn10300_option_override): Likewise. * config/msp430/msp430.c (msp430_option_override): Likewise. * config/nds32/nds32.c (nds32_option_override): Likewise. * config/nios2/nios2.c (nios2_custom_check_insns): Likewise. (nios2_option_override): Likewise. (nios2_expand_custom_builtin): Likewise. * config/nvptx/mkoffload.c (main): Likewise. * config/nvptx/nvptx.c (diagnose_openacc_conflict): Likewise. * config/pa/pa.c (fix_range): Likewise. (pa_option_override): Likewise. * config/riscv/riscv.c (riscv_parse_cpu): Likewise. (riscv_option_override): Likewise. * config/rl78/rl78.c (rl78_option_override): Likewise. * config/rs6000/aix61.h: Likewise. * config/rs6000/aix71.h: Likewise. * config/rs6000/aix72.h: Likewise. * config/rs6000/driver-rs6000.c (elf_platform): Likewise. * config/rs6000/freebsd64.h: Likewise. * config/rs6000/linux64.h: Likewise. * config/rs6000/rs6000.c (rs6000_option_override_internal): Likewise. (rs6000_expand_zeroop_builtin): Likewise. (rs6000_expand_mtfsb_builtin): Likewise. (rs6000_expand_set_fpscr_rn_builtin): Likewise. (rs6000_expand_set_fpscr_drn_builtin): Likewise. (rs6000_invalid_builtin): Likewise. (rs6000_expand_split_stack_prologue): Likewise. * config/rs6000/rtems.h: Likewise. * config/rx/rx.c (valid_psw_flag): Likewise. (rx_expand_builtin): Likewise. * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Likewise. * config/s390/s390.c (s390_expand_builtin): Likewise. (s390_function_profiler): Likewise. (s390_option_override_internal): Likewise. (s390_option_override): Likewise. * config/sh/sh.c (sh_option_override): Likewise. (sh_builtin_saveregs): Likewise. (sh_fix_range): Likewise. * config/sh/vxworks.h: Likewise. * config/sparc/sparc.c (sparc_option_override): Likewise. * config/spu/spu.c (spu_option_override): Likewise. (fix_range): Likewise. * config/visium/visium.c (visium_option_override): Likewise. (visium_handle_interrupt_attr): Likewise. * config/xtensa/xtensa.c (xtensa_option_override): Likewise. * dbgcnt.c (dbg_cnt_set_limit_by_name): Likewise. (dbg_cnt_process_opt): Likewise. * dwarf2out.c (output_dwarf_version): Likewise. * except.c (expand_eh_return): Likewise. * gcc.c (defined): Likewise. (driver_handle_option): Likewise. (process_command): Likewise. (compare_files): Likewise. (driver::prepare_infiles): Likewise. (driver::do_spec_on_infiles): Likewise. (driver::maybe_run_linker): Likewise. * omp-offload.c (oacc_parse_default_dims): Likewise. * opts-global.c (handle_common_deferred_options): Likewise. * opts.c (parse_sanitizer_options): Likewise. (common_handle_option): Likewise. (enable_warning_as_error): Likewise. * passes.c (enable_disable_pass): Likewise. * plugin.c (parse_plugin_arg_opt): Likewise. (default_plugin_dir_name): Likewise. * targhooks.c (default_expand_builtin_saveregs): Likewise. (default_pch_valid_p): Likewise. * toplev.c (init_asm_output): Likewise. (process_options): Likewise. (toplev::run_self_tests): Likewise. * tree-cfg.c (verify_gimple_call): Likewise. * tree-inline.c (inline_forbidden_p_stmt): Likewise. (tree_inlinable_function_p): Likewise. * var-tracking.c (vt_find_locations): Likewise. 2019-03-11 Martin Liska * gcc-interface/misc.c (gnat_post_options) Wrap an option name in a string format message and fix GNU coding style.: 2019-03-11 Martin Liska * c-attribs.c (handle_nocf_check_attribute): Wrap an option name in a string format message and fix GNU coding style. * c-common.c (vector_types_convertible_p): Likewise. (c_build_vec_perm_expr): Likewise. * c-indentation.c (get_visual_column): Likewise. * c-opts.c (c_common_handle_option): Likewise. (c_common_post_options): Likewise. (sanitize_cpp_opts): Likewise. * c-pch.c (c_common_pch_pragma): Likewise. * c-pragma.c (handle_pragma_pack): Likewise. 2019-03-11 Martin Liska * c-decl.c (check_for_loop_decls): Wrap an option name in a string format message and fix GNU coding style. * c-parser.c (c_parser_declspecs): Likewise. 2019-03-11 Martin Liska * call.c (convert_arg_to_ellipsis): Wrap an option name in a string format message and fix GNU coding style. (build_over_call): Likewise. * class.c (check_field_decl): Likewise. (layout_nonempty_base_or_field): Likewise. * constexpr.c (cxx_eval_loop_expr): Likewise. * cvt.c (type_promotes_to): Likewise. * decl.c (cxx_init_decl_processing): Likewise. (mark_inline_variable): Likewise. (grokdeclarator): Likewise. * decl2.c (record_mangling): Likewise. * error.c (maybe_warn_cpp0x): Likewise. * except.c (doing_eh): Likewise. * mangle.c (maybe_check_abi_tags): Likewise. * parser.c (cp_parser_diagnose_invalid_type_name): Likewise. (cp_parser_userdef_numeric_literal): Likewise. (cp_parser_primary_expression): Likewise. (cp_parser_unqualified_id): Likewise. (cp_parser_pseudo_destructor_name): Likewise. (cp_parser_builtin_offsetof): Likewise. (cp_parser_lambda_expression): Likewise. (cp_parser_lambda_introducer): Likewise. (cp_parser_lambda_declarator_opt): Likewise. (cp_parser_selection_statement): Likewise. (cp_parser_init_statement): Likewise. (cp_parser_decomposition_declaration): Likewise. (cp_parser_function_specifier_opt): Likewise. (cp_parser_static_assert): Likewise. (cp_parser_simple_type_specifier): Likewise. (cp_parser_namespace_definition): Likewise. (cp_parser_using_declaration): Likewise. (cp_parser_ctor_initializer_opt_and_function_body): Likewise. (cp_parser_initializer_list): Likewise. (cp_parser_type_parameter_key): Likewise. (cp_parser_member_declaration): Likewise. (cp_parser_try_block): Likewise. (cp_parser_std_attribute_spec): Likewise. (cp_parser_requires_clause_opt): Likewise. * pt.c (check_template_variable): Likewise. (check_default_tmpl_args): Likewise. (push_tinst_level_loc): Likewise. (instantiate_pending_templates): Likewise. (invalid_nontype_parm_type_p): Likewise. * repo.c (get_base_filename): Likewise. * rtti.c (typeid_ok_p): Likewise. (build_dynamic_cast_1): Likewise. * tree.c (maybe_warn_parm_abi): Likewise. 2019-03-11 Martin Liska * decl.c (match_record_decl): Wrap an option name in a string format message and fix GNU coding style. (gfc_match_pointer): Likewise. * expr.c (find_array_section): Likewise. * intrinsic.c (gfc_is_intrinsic): Likewise. * options.c (gfc_post_options): Likewise. * primary.c (match_integer_constant): Likewise. * trans-common.c (translate_common): Likewise. 2019-03-11 Martin Liska * lto-lang.c (lto_post_options): Wrap an option name in a string format message and fix GNU coding style. * lto-symtab.c (lto_symtab_merge_decls_2): Likewise. 2019-03-11 Martin Liska * g++.dg/conversion/simd3.C (foo): Wrap option names with apostrophe character. * g++.dg/cpp1z/decomp3.C (test): Likewise. (test3): Likewise. * g++.dg/cpp1z/decomp4.C (test): Likewise. * g++.dg/cpp1z/decomp44.C (foo): Likewise. * g++.dg/cpp1z/decomp45.C (f): Likewise. * g++.dg/opt/pr34036.C: Likewise. * g++.dg/spellcheck-c++-11-keyword.C: Likewise. * gcc.dg/c90-fordecl-1.c (foo): Likewise. * gcc.dg/cpp/dir-only-4.c: Likewise. * gcc.dg/cpp/dir-only-5.c: Likewise. * gcc.dg/cpp/pr71591.c: Likewise. * gcc.dg/format/opt-1.c: Likewise. * gcc.dg/format/opt-2.c: Likewise. * gcc.dg/format/opt-3.c: Likewise. * gcc.dg/format/opt-4.c: Likewise. * gcc.dg/format/opt-5.c: Likewise. * gcc.dg/format/opt-6.c: Likewise. * gcc.dg/pr22231.c: Likewise. * gcc.dg/pr33007.c: Likewise. * gcc.dg/simd-1.c (hanneke): Likewise. * gcc.dg/simd-5.c: Likewise. * gcc.dg/simd-6.c: Likewise. * gcc.dg/spellcheck-options-14.c: Likewise. * gcc.dg/spellcheck-options-15.c: Likewise. * gcc.dg/spellcheck-options-16.c: Likewise. * gcc.dg/spellcheck-options-17.c: Likewise. * gcc.dg/tree-ssa/pr23109.c: Likewise. * gcc.dg/tree-ssa/recip-5.c: Likewise. * gcc.target/i386/cet-notrack-1a.c (func): Likewise. (__attribute__): Likewise. * gcc.target/i386/cet-notrack-icf-1.c (fn3): Likewise. * gcc.target/i386/cet-notrack-icf-3.c (__attribute__): Likewise. * gcc.target/powerpc/warn-1.c: Likewise. * gcc.target/powerpc/warn-2.c: Likewise. From-SVN: r269586 --- gcc/ChangeLog | 137 ++++++++++++++++++++++ gcc/ada/ChangeLog | 5 + gcc/ada/gcc-interface/misc.c | 2 +- gcc/builtins.c | 4 +- gcc/c-family/ChangeLog | 13 ++ gcc/c-family/c-attribs.c | 3 +- gcc/c-family/c-common.c | 12 +- gcc/c-family/c-indentation.c | 2 +- gcc/c-family/c-opts.c | 35 +++--- gcc/c-family/c-pch.c | 5 +- gcc/c-family/c-pragma.c | 2 +- gcc/c/ChangeLog | 6 + gcc/c/c-decl.c | 4 +- gcc/c/c-parser.c | 2 +- gcc/common/config/aarch64/aarch64-common.c | 2 +- gcc/common/config/alpha/alpha-common.c | 2 +- gcc/common/config/arc/arc-common.c | 2 +- gcc/common/config/arm/arm-common.c | 2 +- gcc/common/config/bfin/bfin-common.c | 7 +- gcc/common/config/i386/i386-common.c | 17 +-- gcc/common/config/ia64/ia64-common.c | 2 +- gcc/common/config/m68k/m68k-common.c | 2 +- gcc/common/config/msp430/msp430-common.c | 2 +- gcc/common/config/nds32/nds32-common.c | 9 +- gcc/common/config/powerpcspe/powerpcspe-common.c | 8 +- gcc/common/config/riscv/riscv-common.c | 20 ++-- gcc/common/config/rs6000/rs6000-common.c | 4 +- gcc/config/aarch64/aarch64.c | 28 ++--- gcc/config/alpha/alpha.c | 17 +-- gcc/config/arc/arc.c | 18 +-- gcc/config/arm/arm-builtins.c | 5 +- gcc/config/arm/arm.c | 42 ++++--- gcc/config/avr/avr.c | 8 +- gcc/config/bfin/bfin.c | 19 +-- gcc/config/c6x/c6x.c | 3 +- gcc/config/cr16/cr16.c | 3 +- gcc/config/cris/cris.c | 12 +- gcc/config/csky/csky.c | 2 +- gcc/config/darwin-c.c | 2 +- gcc/config/darwin.c | 6 +- gcc/config/frv/frv.c | 2 +- gcc/config/h8300/h8300.c | 18 +-- gcc/config/i386/i386.c | 54 ++++----- gcc/config/ia64/ia64.c | 2 +- gcc/config/m68k/m68k.c | 12 +- gcc/config/microblaze/microblaze.c | 15 ++- gcc/config/mips/mips.c | 4 +- gcc/config/mmix/mmix.c | 3 +- gcc/config/mn10300/mn10300.c | 2 +- gcc/config/msp430/msp430.c | 31 +++-- gcc/config/nds32/nds32.c | 2 +- gcc/config/nios2/nios2.c | 25 ++-- gcc/config/nvptx/mkoffload.c | 3 +- gcc/config/nvptx/nvptx.c | 2 +- gcc/config/pa/pa.c | 10 +- gcc/config/riscv/riscv.c | 14 +-- gcc/config/rl78/rl78.c | 14 ++- gcc/config/rs6000/aix61.h | 6 +- gcc/config/rs6000/aix71.h | 6 +- gcc/config/rs6000/aix72.h | 6 +- gcc/config/rs6000/driver-rs6000.c | 3 +- gcc/config/rs6000/freebsd64.h | 6 +- gcc/config/rs6000/linux64.h | 6 +- gcc/config/rs6000/rs6000.c | 42 ++++--- gcc/config/rs6000/rtems.h | 4 +- gcc/config/rx/rx.c | 7 +- gcc/config/s390/s390-c.c | 2 +- gcc/config/s390/s390.c | 29 +++-- gcc/config/sh/sh.c | 8 +- gcc/config/sh/vxworks.h | 2 +- gcc/config/sparc/sparc.c | 8 +- gcc/config/spu/spu.c | 6 +- gcc/config/visium/visium.c | 6 +- gcc/config/xtensa/xtensa.c | 2 +- gcc/cp/ChangeLog | 50 ++++++++ gcc/cp/call.c | 5 +- gcc/cp/class.c | 7 +- gcc/cp/constexpr.c | 2 +- gcc/cp/cvt.c | 2 +- gcc/cp/decl.c | 13 +- gcc/cp/decl2.c | 2 +- gcc/cp/error.c | 32 ++--- gcc/cp/except.c | 2 +- gcc/cp/mangle.c | 8 +- gcc/cp/parser.c | 87 +++++++------- gcc/cp/pt.c | 16 +-- gcc/cp/repo.c | 2 +- gcc/cp/rtti.c | 4 +- gcc/cp/tree.c | 10 +- gcc/dbgcnt.c | 12 +- gcc/dwarf2out.c | 4 +- gcc/except.c | 2 +- gcc/fortran/ChangeLog | 11 ++ gcc/fortran/decl.c | 6 +- gcc/fortran/expr.c | 2 +- gcc/fortran/intrinsic.c | 4 +- gcc/fortran/options.c | 2 +- gcc/fortran/primary.c | 2 +- gcc/fortran/trans-common.c | 4 +- gcc/gcc.c | 21 ++-- gcc/lto/ChangeLog | 6 + gcc/lto/lto-lang.c | 5 +- gcc/lto/lto-symtab.c | 2 +- gcc/omp-offload.c | 2 +- gcc/opts-global.c | 4 +- gcc/opts.c | 20 ++-- gcc/passes.c | 8 +- gcc/plugin.c | 6 +- gcc/targhooks.c | 6 +- gcc/testsuite/ChangeLog | 39 ++++++ gcc/testsuite/g++.dg/conversion/simd3.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp3.C | 42 +++---- gcc/testsuite/g++.dg/cpp1z/decomp4.C | 18 +-- gcc/testsuite/g++.dg/cpp1z/decomp44.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp45.C | 2 +- gcc/testsuite/g++.dg/opt/pr34036.C | 2 +- gcc/testsuite/g++.dg/spellcheck-c++-11-keyword.C | 8 +- gcc/testsuite/gcc.dg/c90-fordecl-1.c | 2 +- gcc/testsuite/gcc.dg/cpp/dir-only-4.c | 2 +- gcc/testsuite/gcc.dg/cpp/dir-only-5.c | 2 +- gcc/testsuite/gcc.dg/cpp/pr71591.c | 2 +- gcc/testsuite/gcc.dg/format/opt-1.c | 2 +- gcc/testsuite/gcc.dg/format/opt-2.c | 2 +- gcc/testsuite/gcc.dg/format/opt-3.c | 2 +- gcc/testsuite/gcc.dg/format/opt-4.c | 2 +- gcc/testsuite/gcc.dg/format/opt-5.c | 2 +- gcc/testsuite/gcc.dg/format/opt-6.c | 2 +- gcc/testsuite/gcc.dg/pr22231.c | 2 +- gcc/testsuite/gcc.dg/pr33007.c | 2 +- gcc/testsuite/gcc.dg/simd-1.c | 2 +- gcc/testsuite/gcc.dg/simd-5.c | 2 +- gcc/testsuite/gcc.dg/simd-6.c | 2 +- gcc/testsuite/gcc.dg/spellcheck-options-14.c | 6 +- gcc/testsuite/gcc.dg/spellcheck-options-15.c | 2 +- gcc/testsuite/gcc.dg/spellcheck-options-16.c | 2 +- gcc/testsuite/gcc.dg/spellcheck-options-17.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/pr23109.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/recip-5.c | 2 +- gcc/testsuite/gcc.target/i386/cet-notrack-1a.c | 8 +- gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c | 2 +- gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c | 2 +- gcc/testsuite/gcc.target/powerpc/warn-1.c | 2 +- gcc/testsuite/gcc.target/powerpc/warn-2.c | 2 +- gcc/toplev.c | 43 +++---- gcc/tree-cfg.c | 4 +- gcc/tree-inline.c | 6 +- gcc/var-tracking.c | 2 +- 147 files changed, 883 insertions(+), 558 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83f5a83..dd07096 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,140 @@ +2019-03-11 Martin Liska + + * builtins.c (expand_builtin_thread_pointer): Wrap an option name + in a string format message and fix GNU coding style. + (expand_builtin_set_thread_pointer): Likewise. + * common/config/aarch64/aarch64-common.c (aarch64_rewrite_selected_cpu): Likewise. + * common/config/alpha/alpha-common.c (alpha_handle_option): Likewise. + * common/config/arc/arc-common.c (arc_handle_option): Likewise. + * common/config/arm/arm-common.c (arm_parse_fpu_option): Likewise. + * common/config/bfin/bfin-common.c (bfin_handle_option): Likewise. + * common/config/i386/i386-common.c (ix86_handle_option): Likewise. + * common/config/ia64/ia64-common.c (ia64_handle_option): Likewise. + * common/config/m68k/m68k-common.c (m68k_handle_option): Likewise. + * common/config/msp430/msp430-common.c (msp430_handle_option): Likewise. + * common/config/nds32/nds32-common.c (nds32_handle_option): Likewise. + * common/config/powerpcspe/powerpcspe-common.c (rs6000_handle_option): Likewise. + * common/config/riscv/riscv-common.c (riscv_subset_list::parsing_subset_version): Likewise. + (riscv_subset_list::parse_std_ext): Likewise. + (riscv_subset_list::parse_sv_or_non_std_ext): Likewise. + (riscv_subset_list::parse): Likewise. + * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Likewise. + * config/aarch64/aarch64.c (aarch64_parse_one_option_token): Likewise. + (aarch64_override_options_internal): Likewise. + (aarch64_validate_mcpu): Likewise. + (aarch64_validate_march): Likewise. + (aarch64_validate_mtune): Likewise. + (aarch64_override_options): Likewise. + * config/alpha/alpha.c (alpha_option_override): Likewise. + * config/arc/arc.c (arc_init): Likewise. + (parse_mrgf_banked_regs_option): Likewise. + (arc_override_options): Likewise. + (arc_expand_builtin_aligned): Likewise. + * config/arm/arm-builtins.c (arm_expand_neon_builtin): Likewise. + (arm_expand_builtin): Likewise. + * config/arm/arm.c (arm_option_check_internal): Likewise. + (arm_configure_build_target): Likewise. + (arm_option_override): Likewise. + (arm_options_perform_arch_sanity_checks): Likewise. + (arm_handle_cmse_nonsecure_entry): Likewise. + (arm_handle_cmse_nonsecure_call): Likewise. + (arm_tls_referenced_p): Likewise. + (thumb1_expand_prologue): Likewise. + * config/avr/avr.c (avr_option_override): Likewise. + * config/bfin/bfin.c (bfin_option_override): Likewise. + * config/c6x/c6x.c (c6x_option_override): Likewise. + * config/cr16/cr16.c (cr16_override_options): Likewise. + * config/cris/cris.c (cris_option_override): Likewise. + * config/csky/csky.c (csky_handle_isr_attribute): Likewise. + * config/darwin-c.c (macosx_version_as_macro): Likewise. + * config/darwin.c (darwin_override_options): Likewise. + * config/frv/frv.c (frv_expand_builtin): Likewise. + * config/h8300/h8300.c (h8300_option_override): Likewise. + * config/i386/i386.c (parse_mtune_ctrl_str): Likewise. + (ix86_option_override_internal): Likewise. + (warn_once_call_ms2sysv_xlogues): Likewise. + (ix86_expand_prologue): Likewise. + (split_stack_prologue_scratch_regno): Likewise. + (ix86_warn_parameter_passing_abi): Likewise. + * config/ia64/ia64.c (fix_range): Likewise. + * config/m68k/m68k.c (m68k_option_override): Likewise. + * config/microblaze/microblaze.c (microblaze_option_override): Likewise. + * config/mips/mips.c (mips_emit_probe_stack_range): Likewise. + (mips_set_compression_mode): Likewise. + * config/mmix/mmix.c (mmix_option_override): Likewise. + * config/mn10300/mn10300.c (mn10300_option_override): Likewise. + * config/msp430/msp430.c (msp430_option_override): Likewise. + * config/nds32/nds32.c (nds32_option_override): Likewise. + * config/nios2/nios2.c (nios2_custom_check_insns): Likewise. + (nios2_option_override): Likewise. + (nios2_expand_custom_builtin): Likewise. + * config/nvptx/mkoffload.c (main): Likewise. + * config/nvptx/nvptx.c (diagnose_openacc_conflict): Likewise. + * config/pa/pa.c (fix_range): Likewise. + (pa_option_override): Likewise. + * config/riscv/riscv.c (riscv_parse_cpu): Likewise. + (riscv_option_override): Likewise. + * config/rl78/rl78.c (rl78_option_override): Likewise. + * config/rs6000/aix61.h: Likewise. + * config/rs6000/aix71.h: Likewise. + * config/rs6000/aix72.h: Likewise. + * config/rs6000/driver-rs6000.c (elf_platform): Likewise. + * config/rs6000/freebsd64.h: Likewise. + * config/rs6000/linux64.h: Likewise. + * config/rs6000/rs6000.c (rs6000_option_override_internal): Likewise. + (rs6000_expand_zeroop_builtin): Likewise. + (rs6000_expand_mtfsb_builtin): Likewise. + (rs6000_expand_set_fpscr_rn_builtin): Likewise. + (rs6000_expand_set_fpscr_drn_builtin): Likewise. + (rs6000_invalid_builtin): Likewise. + (rs6000_expand_split_stack_prologue): Likewise. + * config/rs6000/rtems.h: Likewise. + * config/rx/rx.c (valid_psw_flag): Likewise. + (rx_expand_builtin): Likewise. + * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Likewise. + * config/s390/s390.c (s390_expand_builtin): Likewise. + (s390_function_profiler): Likewise. + (s390_option_override_internal): Likewise. + (s390_option_override): Likewise. + * config/sh/sh.c (sh_option_override): Likewise. + (sh_builtin_saveregs): Likewise. + (sh_fix_range): Likewise. + * config/sh/vxworks.h: Likewise. + * config/sparc/sparc.c (sparc_option_override): Likewise. + * config/spu/spu.c (spu_option_override): Likewise. + (fix_range): Likewise. + * config/visium/visium.c (visium_option_override): Likewise. + (visium_handle_interrupt_attr): Likewise. + * config/xtensa/xtensa.c (xtensa_option_override): Likewise. + * dbgcnt.c (dbg_cnt_set_limit_by_name): Likewise. + (dbg_cnt_process_opt): Likewise. + * dwarf2out.c (output_dwarf_version): Likewise. + * except.c (expand_eh_return): Likewise. + * gcc.c (defined): Likewise. + (driver_handle_option): Likewise. + (process_command): Likewise. + (compare_files): Likewise. + (driver::prepare_infiles): Likewise. + (driver::do_spec_on_infiles): Likewise. + (driver::maybe_run_linker): Likewise. + * omp-offload.c (oacc_parse_default_dims): Likewise. + * opts-global.c (handle_common_deferred_options): Likewise. + * opts.c (parse_sanitizer_options): Likewise. + (common_handle_option): Likewise. + (enable_warning_as_error): Likewise. + * passes.c (enable_disable_pass): Likewise. + * plugin.c (parse_plugin_arg_opt): Likewise. + (default_plugin_dir_name): Likewise. + * targhooks.c (default_expand_builtin_saveregs): Likewise. + (default_pch_valid_p): Likewise. + * toplev.c (init_asm_output): Likewise. + (process_options): Likewise. + (toplev::run_self_tests): Likewise. + * tree-cfg.c (verify_gimple_call): Likewise. + * tree-inline.c (inline_forbidden_p_stmt): Likewise. + (tree_inlinable_function_p): Likewise. + * var-tracking.c (vt_find_locations): Likewise. + 2019-03-11 Andreas Krebbel * config/s390/s390.c (s390_expand_builtin): Do the copy_to_reg not diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9003bec..1863f5b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-03-11 Martin Liska + + * gcc-interface/misc.c (gnat_post_options) Wrap an option name + in a string format message and fix GNU coding style.: + 2019-02-08 Eric Botcazou * gcc-interface/trans.c (gnat_to_gnu) : Minor tweak. diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 38e33be..5737165 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -256,7 +256,7 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED) { /* Excess precision other than "fast" requires front-end support. */ if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD) - sorry ("-fexcess-precision=standard for Ada"); + sorry ("%<-fexcess-precision=standard%> for Ada"); flag_excess_precision_cmdline = EXCESS_PRECISION_FAST; /* No psABI change warnings for Ada. */ diff --git a/gcc/builtins.c b/gcc/builtins.c index 0910c72..a65eb88 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -6889,7 +6889,7 @@ expand_builtin_thread_pointer (tree exp, rtx target) expand_insn (icode, 1, &op); return target; } - error ("__builtin_thread_pointer is not supported on this target"); + error ("%<__builtin_thread_pointer%> is not supported on this target"); return const0_rtx; } @@ -6909,7 +6909,7 @@ expand_builtin_set_thread_pointer (tree exp) expand_insn (icode, 1, &op); return; } - error ("__builtin_set_thread_pointer is not supported on this target"); + error ("%<__builtin_set_thread_pointer%> is not supported on this target"); } diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 55006e6..e529538 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,16 @@ +2019-03-11 Martin Liska + + * c-attribs.c (handle_nocf_check_attribute): Wrap an option name + in a string format message and fix GNU coding style. + * c-common.c (vector_types_convertible_p): Likewise. + (c_build_vec_perm_expr): Likewise. + * c-indentation.c (get_visual_column): Likewise. + * c-opts.c (c_common_handle_option): Likewise. + (c_common_post_options): Likewise. + (sanitize_cpp_opts): Likewise. + * c-pch.c (c_common_pch_pragma): Likewise. + * c-pragma.c (handle_pragma_pack): Likewise. + 2019-03-08 Jakub Jelinek PR tree-optimization/89550 diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c index 2058459..e559d3b 100644 --- a/gcc/c-family/c-attribs.c +++ b/gcc/c-family/c-attribs.c @@ -1072,7 +1072,8 @@ handle_nocf_check_attribute (tree *node, tree name, else if (!(flag_cf_protection & CF_BRANCH)) { warning (OPT_Wattributes, "%qE attribute ignored. Use " - "-fcf-protection option to enable it", name); + "%<-fcf-protection%> option to enable it", + name); *no_add_attrs = true; } diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index e5a19cc..019f108 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -976,7 +976,7 @@ vector_types_convertible_p (const_tree t1, const_tree t2, bool emit_lax_note) if (emit_lax_note && !emitted_lax_note) { emitted_lax_note = true; - inform (input_location, "use -flax-vector-conversions to permit " + inform (input_location, "use %<-flax-vector-conversions%> to permit " "conversions between vectors with differing " "element types or numbers of subparts"); } @@ -1016,7 +1016,7 @@ c_build_vec_perm_expr (location_t loc, tree v0, tree v1, tree mask, if (!VECTOR_INTEGER_TYPE_P (TREE_TYPE (mask))) { if (complain) - error_at (loc, "__builtin_shuffle last argument must " + error_at (loc, "%<__builtin_shuffle%> last argument must " "be an integer vector"); return error_mark_node; } @@ -1025,14 +1025,14 @@ c_build_vec_perm_expr (location_t loc, tree v0, tree v1, tree mask, || !VECTOR_TYPE_P (TREE_TYPE (v1))) { if (complain) - error_at (loc, "__builtin_shuffle arguments must be vectors"); + error_at (loc, "%<__builtin_shuffle%> arguments must be vectors"); return error_mark_node; } if (TYPE_MAIN_VARIANT (TREE_TYPE (v0)) != TYPE_MAIN_VARIANT (TREE_TYPE (v1))) { if (complain) - error_at (loc, "__builtin_shuffle argument vectors must be of " + error_at (loc, "%<__builtin_shuffle%> argument vectors must be of " "the same type"); return error_mark_node; } @@ -1043,7 +1043,7 @@ c_build_vec_perm_expr (location_t loc, tree v0, tree v1, tree mask, TYPE_VECTOR_SUBPARTS (TREE_TYPE (mask)))) { if (complain) - error_at (loc, "__builtin_shuffle number of elements of the " + error_at (loc, "%<__builtin_shuffle%> number of elements of the " "argument vector(s) and the mask vector should " "be the same"); return error_mark_node; @@ -1053,7 +1053,7 @@ c_build_vec_perm_expr (location_t loc, tree v0, tree v1, tree mask, != GET_MODE_BITSIZE (SCALAR_TYPE_MODE (TREE_TYPE (TREE_TYPE (mask))))) { if (complain) - error_at (loc, "__builtin_shuffle argument vector(s) inner type " + error_at (loc, "%<__builtin_shuffle%> argument vector(s) inner type " "must have the same size as inner type of the mask"); return error_mark_node; } diff --git a/gcc/c-family/c-indentation.c b/gcc/c-family/c-indentation.c index 23eac79..e643125 100644 --- a/gcc/c-family/c-indentation.c +++ b/gcc/c-family/c-indentation.c @@ -64,7 +64,7 @@ get_visual_column (expanded_location exploc, location_t loc, /* Notify the user the first time this happens. */ issued_note = true; inform (loc, - "-Wmisleading-indentation is disabled from this point" + "%<-Wmisleading-indentation%> is disabled from this point" " onwards, since column-tracking was disabled due to" " the size of the code/headers"); } diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 9660f51..3233fdb 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -327,7 +327,8 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, error ("-I- specified twice"); quote_chain_split = true; split_quote_chain (); - inform (input_location, "obsolete option -I- used, please use -iquote instead"); + inform (input_location, "obsolete option %<-I-%> used, " + "please use %<-iquote%> instead"); } break; @@ -796,7 +797,7 @@ c_common_post_options (const char **pfilename) if (c_dialect_cxx ()) { if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD) - sorry ("-fexcess-precision=standard for C++"); + sorry ("%<-fexcess-precision=standard%> for C++"); flag_excess_precision_cmdline = EXCESS_PRECISION_FAST; } else if (flag_excess_precision_cmdline == EXCESS_PRECISION_DEFAULT) @@ -831,7 +832,7 @@ c_common_post_options (const char **pfilename) if (flag_gnu89_inline == -1) flag_gnu89_inline = !flag_isoc99; else if (!flag_gnu89_inline && !flag_isoc99) - error ("-fno-gnu89-inline is only supported in GNU99 or C99 mode"); + error ("%<-fno-gnu89-inline%> is only supported in GNU99 or C99 mode"); /* Default to ObjC sjlj exception handling if NeXT runtime. */ if (flag_objc_sjlj_exceptions < 0) @@ -877,17 +878,17 @@ c_common_post_options (const char **pfilename) if (!warn_format) { warning (OPT_Wformat_y2k, - "-Wformat-y2k ignored without -Wformat"); + "%<-Wformat-y2k%> ignored without %<-Wformat%>"); warning (OPT_Wformat_extra_args, - "-Wformat-extra-args ignored without -Wformat"); + "%<-Wformat-extra-args%> ignored without %<-Wformat%>"); warning (OPT_Wformat_zero_length, - "-Wformat-zero-length ignored without -Wformat"); + "%<-Wformat-zero-length%> ignored without %<-Wformat%>"); warning (OPT_Wformat_nonliteral, - "-Wformat-nonliteral ignored without -Wformat"); + "%<-Wformat-nonliteral%> ignored without %<-Wformat%>"); warning (OPT_Wformat_contains_nul, - "-Wformat-contains-nul ignored without -Wformat"); + "%<-Wformat-contains-nul%> ignored without %<-Wformat%>"); warning (OPT_Wformat_security, - "-Wformat-security ignored without -Wformat"); + "%<-Wformat-security%> ignored without %<-Wformat%>"); } /* -Wimplicit-function-declaration is enabled by default for C99. */ @@ -944,12 +945,12 @@ c_common_post_options (const char **pfilename) if (flag_abi_version == latest_abi_version) { auto_diagnostic_group d; - if (warning (OPT_Wabi, "-Wabi won't warn about anything")) + if (warning (OPT_Wabi, "%<-Wabi%> won't warn about anything")) { - inform (input_location, "-Wabi warns about differences " + inform (input_location, "%<-Wabi%> warns about differences " "from the most up-to-date ABI, which is also used " "by default"); - inform (input_location, "use e.g. -Wabi=11 to warn about " + inform (input_location, "use e.g. %<-Wabi=11%> to warn about " "changes from GCC 7"); } flag_abi_compat_version = abi_compat_default; @@ -1304,7 +1305,8 @@ sanitize_cpp_opts (void) /* If we don't know what style of dependencies to output, complain if any other dependency switches have been given. */ if (deps_seen && cpp_opts->deps.style == DEPS_NONE) - error ("to generate dependencies you must specify either -M or -MM"); + error ("to generate dependencies you must specify either %<-M%> " + "or %<-MM%>"); /* -dM and dependencies suppress normal output; do it here so that the last -d[MDN] switch overrides earlier ones. */ @@ -1327,7 +1329,7 @@ sanitize_cpp_opts (void) flag_no_line_commands = 1; } else if (cpp_opts->deps.missing_files) - error ("-MG may only be used with -M or -MM"); + error ("%<-MG%> may only be used with %<-M%> or %<-MM%>"); cpp_opts->unsigned_char = !flag_signed_char; cpp_opts->stdc_0_in_system_headers = STDC_0_IN_SYSTEM_HEADERS; @@ -1360,9 +1362,10 @@ sanitize_cpp_opts (void) if (cpp_opts->directives_only) { if (cpp_warn_unused_macros) - error ("-fdirectives-only is incompatible with -Wunused_macros"); + error ("%<-fdirectives-only%> is incompatible " + "with %<-Wunused-macros%>"); if (cpp_opts->traditional) - error ("-fdirectives-only is incompatible with -traditional"); + error ("%<-fdirectives-only%> is incompatible with %<-traditional%>"); } } diff --git a/gcc/c-family/c-pch.c b/gcc/c-family/c-pch.c index 5492752..316fb84f 100644 --- a/gcc/c-family/c-pch.c +++ b/gcc/c-family/c-pch.c @@ -406,7 +406,8 @@ c_common_pch_pragma (cpp_reader *pfile, const char *name) if (!cpp_get_options (pfile)->preprocessed) { - error ("pch_preprocess pragma should only be used with -fpreprocessed"); + error ("pch_preprocess pragma should only be used " + "with %<-fpreprocessed%>"); inform (input_location, "use #include instead"); return; } @@ -418,7 +419,7 @@ c_common_pch_pragma (cpp_reader *pfile, const char *name) if (c_common_valid_pch (pfile, name, fd) != 1) { if (!cpp_get_options (pfile)->warn_invalid_pch) - inform (input_location, "use -Winvalid-pch for more information"); + inform (input_location, "use %<-Winvalid-pch%> for more information"); fatal_error (input_location, "%s: PCH file was invalid", name); } diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c index bcc3302..fbc734a 100644 --- a/gcc/c-family/c-pragma.c +++ b/gcc/c-family/c-pragma.c @@ -196,7 +196,7 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy)) warning (OPT_Wpragmas, "junk at end of %<#pragma pack%>"); if (flag_pack_struct) - GCC_BAD ("#pragma pack has no effect with -fpack-struct - ignored"); + GCC_BAD ("#pragma pack has no effect with %<-fpack-struct%> - ignored"); if (action != pop) switch (align) diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index b59be5e..5859f5b 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2019-03-11 Martin Liska + + * c-decl.c (check_for_loop_decls): Wrap an option name + in a string format message and fix GNU coding style. + * c-parser.c (c_parser_declspecs): Likewise. + 2019-03-08 Jakub Jelinek PR tree-optimization/89550 diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 32ec183..d8fa109 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -9786,8 +9786,8 @@ check_for_loop_decls (location_t loc, bool turn_off_iso_c99_error) if (hint) { inform (loc, - "use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 " - "to compile your code"); + "use option %<-std=c99%>, %<-std=gnu99%>, %<-std=c11%> or " + "%<-std=gnu11%> to compile your code"); hint = false; } return NULL_TREE; diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index ee722cc..5134e95 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -2880,7 +2880,7 @@ c_parser_declspecs (c_parser *parser, struct c_declspecs *specs, break; case RID_GIMPLE: if (! flag_gimple) - error_at (loc, "%<__GIMPLE%> only valid with -fgimple"); + error_at (loc, "%<__GIMPLE%> only valid with %<-fgimple%>"); c_parser_consume_token (parser); specs->gimple_p = true; specs->locations[cdw_gimple] = loc; diff --git a/gcc/common/config/aarch64/aarch64-common.c b/gcc/common/config/aarch64/aarch64-common.c index 5329471..bab3ab3 100644 --- a/gcc/common/config/aarch64/aarch64-common.c +++ b/gcc/common/config/aarch64/aarch64-common.c @@ -536,7 +536,7 @@ aarch64_rewrite_selected_cpu (const char *name) found does not map to an architecture we understand. */ if (p_to_a->arch == aarch64_no_arch || a_to_an->arch == aarch64_no_arch) - fatal_error (input_location, "unknown value %qs for -mcpu", name); + fatal_error (input_location, "unknown value %qs for %<-mcpu%>", name); unsigned long extensions = p_to_a->flags; aarch64_parse_extension (extension_str.c_str (), &extensions, NULL); diff --git a/gcc/common/config/alpha/alpha-common.c b/gcc/common/config/alpha/alpha-common.c index f7a861a..05fdf81 100644 --- a/gcc/common/config/alpha/alpha-common.c +++ b/gcc/common/config/alpha/alpha-common.c @@ -72,7 +72,7 @@ alpha_handle_option (struct gcc_options *opts, case OPT_mtls_size_: if (value != 16 && value != 32 && value != 64) - error_at (loc, "bad value %qs for -mtls-size switch", arg); + error_at (loc, "bad value %qs for %<-mtls-size%> switch", arg); break; } diff --git a/gcc/common/config/arc/arc-common.c b/gcc/common/config/arc/arc-common.c index db39433..e10e161 100644 --- a/gcc/common/config/arc/arc-common.c +++ b/gcc/common/config/arc/arc-common.c @@ -84,7 +84,7 @@ arc_handle_option (struct gcc_options *opts, our caller, so comparing arc_cpu with PROCESSOR_NONE is pointless. */ if (mcpu_seen != PROCESSOR_NONE && mcpu_seen != value) - warning_at (loc, 0, "multiple -mcpu= options specified."); + warning_at (loc, 0, "multiple %<-mcpu=%> options specified."); mcpu_seen = value; break; diff --git a/gcc/common/config/arm/arm-common.c b/gcc/common/config/arm/arm-common.c index 8c64308..41a920f 100644 --- a/gcc/common/config/arm/arm-common.c +++ b/gcc/common/config/arm/arm-common.c @@ -458,7 +458,7 @@ arm_parse_fpu_option (const char *opt) return all_fpus + i; } - error_at (input_location, "unrecognized -mfpu target: %s", opt); + error_at (input_location, "unrecognized %<-mfpu%> target: %s", opt); arm_print_hint_for_fpu_option (opt); return NULL; } diff --git a/gcc/common/config/bfin/bfin-common.c b/gcc/common/config/bfin/bfin-common.c index a85fb8f..10910f3 100644 --- a/gcc/common/config/bfin/bfin-common.c +++ b/gcc/common/config/bfin/bfin-common.c @@ -301,7 +301,7 @@ bfin_handle_option (struct gcc_options *opts, { case OPT_mshared_library_id_: if (value > MAX_LIBRARY_ID) - error_at (loc, "-mshared-library-id=%s is not between 0 and %d", + error_at (loc, "%<-mshared-library-id=%s%> is not between 0 and %d", arg, MAX_LIBRARY_ID); return true; @@ -320,7 +320,7 @@ bfin_handle_option (struct gcc_options *opts, if (p == NULL) { - error_at (loc, "-mcpu=%s is not valid", arg); + error_at (loc, "%<-mcpu=%s%> is not valid", arg); return false; } @@ -356,7 +356,8 @@ bfin_handle_option (struct gcc_options *opts, || si_major > 0xff || si_minor > 0xff) { invalid_silicon_revision: - error_at (loc, "-mcpu=%s has invalid silicon revision", arg); + error_at (loc, "%<-mcpu=%s%> has invalid silicon revision", + arg); return false; } diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c index a5dac6d..ee725a4 100644 --- a/gcc/common/config/i386/i386-common.c +++ b/gcc/common/config/i386/i386-common.c @@ -1337,18 +1337,20 @@ ix86_handle_option (struct gcc_options *opts, case OPT_malign_loops_: - warning_at (loc, 0, "-malign-loops is obsolete, use -falign-loops"); + warning_at (loc, 0, "%<-malign-loops%> is obsolete, " + "use %<-falign-loops%>"); if (value > MAX_CODE_ALIGN) - error_at (loc, "-malign-loops=%d is not between 0 and %d", + error_at (loc, "%<-malign-loops=%d%> is not between 0 and %d", value, MAX_CODE_ALIGN); else set_malign_value (&opts->x_str_align_loops, value); return true; case OPT_malign_jumps_: - warning_at (loc, 0, "-malign-jumps is obsolete, use -falign-jumps"); + warning_at (loc, 0, "%<-malign-jumps%> is obsolete, " + "use %<-falign-jumps%>"); if (value > MAX_CODE_ALIGN) - error_at (loc, "-malign-jumps=%d is not between 0 and %d", + error_at (loc, "%<-malign-jumps=%d%> is not between 0 and %d", value, MAX_CODE_ALIGN); else set_malign_value (&opts->x_str_align_jumps, value); @@ -1356,9 +1358,10 @@ ix86_handle_option (struct gcc_options *opts, case OPT_malign_functions_: warning_at (loc, 0, - "-malign-functions is obsolete, use -falign-functions"); + "%<-malign-functions%> is obsolete, " + "use %<-falign-functions%>"); if (value > MAX_CODE_ALIGN) - error_at (loc, "-malign-functions=%d is not between 0 and %d", + error_at (loc, "%<-malign-functions=%d%> is not between 0 and %d", value, MAX_CODE_ALIGN); else set_malign_value (&opts->x_str_align_functions, value); @@ -1367,7 +1370,7 @@ ix86_handle_option (struct gcc_options *opts, case OPT_mbranch_cost_: if (value > 5) { - error_at (loc, "-mbranch-cost=%d is not between 0 and 5", value); + error_at (loc, "%<-mbranch-cost=%d%> is not between 0 and 5", value); opts->x_ix86_branch_cost = 5; } return true; diff --git a/gcc/common/config/ia64/ia64-common.c b/gcc/common/config/ia64/ia64-common.c index e8410b1..02e297a 100644 --- a/gcc/common/config/ia64/ia64-common.c +++ b/gcc/common/config/ia64/ia64-common.c @@ -55,7 +55,7 @@ ia64_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, { case OPT_mtls_size_: if (value != 14 && value != 22 && value != 64) - error_at (loc, "bad value %<%s%> for -mtls-size= switch", arg); + error_at (loc, "bad value %<%s%> for %<-mtls-size=%> switch", arg); return true; default: diff --git a/gcc/common/config/m68k/m68k-common.c b/gcc/common/config/m68k/m68k-common.c index 05b23d5..f13e0f9 100644 --- a/gcc/common/config/m68k/m68k-common.c +++ b/gcc/common/config/m68k/m68k-common.c @@ -57,7 +57,7 @@ m68k_handle_option (struct gcc_options *opts, case OPT_mshared_library_id_: if (value > MAX_LIBRARY_ID) - error_at (loc, "-mshared-library-id=%s is not between 0 and %d", + error_at (loc, "%<-mshared-library-id=%s%> is not between 0 and %d", arg, MAX_LIBRARY_ID); else { diff --git a/gcc/common/config/msp430/msp430-common.c b/gcc/common/config/msp430/msp430-common.c index 7ff12c6..166abf7 100644 --- a/gcc/common/config/msp430/msp430-common.c +++ b/gcc/common/config/msp430/msp430-common.c @@ -54,7 +54,7 @@ msp430_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, } else { - error ("unrecognized argument of -mcpu: %s", decoded->arg); + error ("unrecognized argument of %<-mcpu%>: %s", decoded->arg); return false; } break; diff --git a/gcc/common/config/nds32/nds32-common.c b/gcc/common/config/nds32/nds32-common.c index e3d910e..85f672f 100644 --- a/gcc/common/config/nds32/nds32-common.c +++ b/gcc/common/config/nds32/nds32-common.c @@ -46,8 +46,7 @@ nds32_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, /* Check the valid vector size: 4 or 16. */ if (value != 4 && value != 16) { - error_at (loc, "for the option -misr-vector-size=X, the valid X " - "must be: 4 or 16"); + error_at (loc, "%<-misr-vector-size=%d%> argument must be 4 or 16", value); return false; } @@ -57,8 +56,8 @@ nds32_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, /* Check the valid security level: 0 1 2 3. */ if (value < 0 || value > 3) { - error_at (loc, "for the option -misr-secure=X, the valid X " - "must be: 0, 1, 2, or 3"); + error_at (loc, "%<-misr-secure=%d%> argument not in between 0 and 3", + value); return false; } return true; @@ -67,7 +66,7 @@ nds32_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, /* Check valid value: 4 8 16 32 64 128 256 512. */ if (exact_log2 (value) < 2 || exact_log2 (value) > 9) { - error_at (loc, "for the option -mcache-block-size=X, the valid X " + error_at (loc, "for the option %<-mcache-block-size=X%>, the valid X " "must be: 4, 8, 16, 32, 64, 128, 256, or 512"); return false; } diff --git a/gcc/common/config/powerpcspe/powerpcspe-common.c b/gcc/common/config/powerpcspe/powerpcspe-common.c index 5f70666..c949a60 100644 --- a/gcc/common/config/powerpcspe/powerpcspe-common.c +++ b/gcc/common/config/powerpcspe/powerpcspe-common.c @@ -170,7 +170,7 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, else if (! strcmp (q, "builtin")) mask = MASK_DEBUG_BUILTIN; else - error_at (loc, "unknown -mdebug-%s switch", q); + error_at (loc, "unknown %<-mdebug-%s%> switch", q); if (invert) opts->x_rs6000_debug &= ~mask; @@ -218,7 +218,7 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, case OPT_mlong_double_: if (value != 64 && value != 128) { - error_at (loc, "unknown switch -mlong-double-%s", arg); + error_at (loc, "unknown switch %<-mlong-double-%s%>", arg); opts->x_rs6000_long_double_type_size = RS6000_DEFAULT_LONG_DOUBLE_SIZE; return false; @@ -228,7 +228,7 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, case OPT_msingle_float: if (!TARGET_SINGLE_FPU) warning_at (loc, 0, - "-msingle-float option equivalent to -mhard-float"); + "%<-msingle-float%> option equivalent to %<-mhard-float%>"); /* -msingle-float implies -mno-double-float and TARGET_HARD_FLOAT. */ opts->x_rs6000_double_float = 0; opts->x_rs6000_isa_flags &= ~OPTION_MASK_SOFT_FLOAT; @@ -244,7 +244,7 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, case OPT_msimple_fpu: if (!TARGET_SINGLE_FPU) - warning_at (loc, 0, "-msimple-fpu option ignored"); + warning_at (loc, 0, "%<-msimple-fpu%> option ignored"); break; case OPT_mhard_float: diff --git a/gcc/common/config/riscv/riscv-common.c b/gcc/common/config/riscv/riscv-common.c index 16ddb26..72c43c6 100644 --- a/gcc/common/config/riscv/riscv-common.c +++ b/gcc/common/config/riscv/riscv-common.c @@ -250,7 +250,7 @@ riscv_subset_list::parsing_subset_version (const char *p, } else { - error_at (m_loc, "-march=%s: Expect number after `%dp'.", + error_at (m_loc, "%<-march=%s%>: Expect number after `%dp'.", m_arch, version); return NULL; } @@ -326,8 +326,8 @@ riscv_subset_list::parse_std_ext (const char *p) if (m_xlen > 32) { - error_at (m_loc, "-march=%s: rv%de is not a valid base ISA", m_arch, - m_xlen); + error_at (m_loc, "%<-march=%s%>: rv%de is not a valid base ISA", + m_arch, m_xlen); return NULL; } break; @@ -348,8 +348,8 @@ riscv_subset_list::parse_std_ext (const char *p) break; default: - error_at (m_loc, "-march=%s: first ISA subset must be `e', `i' or `g'", - m_arch); + error_at (m_loc, "%<-march=%s%>: first ISA subset must be `e', " + "`i' or `g'", m_arch); return NULL; } @@ -375,12 +375,12 @@ riscv_subset_list::parse_std_ext (const char *p) if (std_ext != *std_exts) { if (strchr (all_std_exts, std_ext) == NULL) - error_at (m_loc, "-march=%s: unsupported ISA subset `%c'", + error_at (m_loc, "%<-march=%s%>: unsupported ISA subset `%c'", m_arch, *p); else error_at (m_loc, - "-march=%s: ISA string is not in canonical order. `%c'", - m_arch, *p); + "%<-march=%s%>: ISA string is not in canonical order. " + "`%c'", m_arch, *p); return NULL; } @@ -455,7 +455,7 @@ riscv_subset_list::parse_sv_or_non_std_ext (const char *p, if (*p != '\0' && *p != '_') { - error_at (m_loc, "-march=%s: %s must separate with _", + error_at (m_loc, "%<-march=%s%>: %s must separate with _", m_arch, ext_type_str); return NULL; } @@ -483,7 +483,7 @@ riscv_subset_list::parse (const char *arch, location_t loc) } else { - error_at (loc, "-march=%s: ISA string must begin with rv32 or rv64", + error_at (loc, "%<-march=%s%>: ISA string must begin with rv32 or rv64", arch); goto fail; } diff --git a/gcc/common/config/rs6000/rs6000-common.c b/gcc/common/config/rs6000/rs6000-common.c index 30d7000..9857b54 100644 --- a/gcc/common/config/rs6000/rs6000-common.c +++ b/gcc/common/config/rs6000/rs6000-common.c @@ -178,7 +178,7 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, else if (! strcmp (q, "builtin")) mask = MASK_DEBUG_BUILTIN; else - error_at (loc, "unknown -mdebug-%s switch", q); + error_at (loc, "unknown %<-mdebug-%s%> switch", q); if (invert) opts->x_rs6000_debug &= ~mask; @@ -217,7 +217,7 @@ rs6000_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, case OPT_mlong_double_: if (value != 64 && value != 128) { - error_at (loc, "unknown switch -mlong-double-%s", arg); + error_at (loc, "unknown switch %<-mlong-double-%s%>", arg); opts->x_rs6000_long_double_type_size = RS6000_DEFAULT_LONG_DOUBLE_SIZE; return false; diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index f13f268..252bed7 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -11151,7 +11151,7 @@ aarch64_parse_one_option_token (const char *token, return flag->flag; } - error ("unknown flag passed in -moverride=%s (%s)", option_name, token); + error ("unknown flag passed in %<-moverride=%s%> (%s)", option_name, token); return 0; } @@ -11454,8 +11454,8 @@ aarch64_override_options_internal (struct gcc_options *opts) if (aarch64_stack_protector_guard == SSP_GLOBAL && opts->x_aarch64_stack_protector_guard_offset_str) { - error ("incompatible options -mstack-protector-guard=global and" - "-mstack-protector-guard-offset=%qs", + error ("incompatible options %<-mstack-protector-guard=global%> and" + "%<-mstack-protector-guard-offset=%qs%>", aarch64_stack_protector_guard_offset_str); } @@ -11463,9 +11463,9 @@ aarch64_override_options_internal (struct gcc_options *opts) && !(opts->x_aarch64_stack_protector_guard_offset_str && opts->x_aarch64_stack_protector_guard_reg_str)) { - error ("both -mstack-protector-guard-offset and " - "-mstack-protector-guard-reg must be used " - "with -mstack-protector-guard=sysreg"); + error ("both %<-mstack-protector-guard-offset%> and " + "%<-mstack-protector-guard-reg%> must be used " + "with %<-mstack-protector-guard=sysreg%>"); } if (opts->x_aarch64_stack_protector_guard_reg_str) @@ -11482,7 +11482,7 @@ aarch64_override_options_internal (struct gcc_options *opts) long offs = strtol (aarch64_stack_protector_guard_offset_str, &end, 0); if (!*str || *end || errno) error ("%qs is not a valid offset in %qs", str, - "-mstack-protector-guard-offset="); + "%<-mstack-protector-guard-offset=%>"); aarch64_stack_protector_guard_offset = offs; } @@ -11687,7 +11687,7 @@ aarch64_validate_mcpu (const char *str, const struct processor **res, error ("missing cpu name in %<-mcpu=%s%>", str); break; case AARCH64_PARSE_INVALID_ARG: - error ("unknown value %qs for -mcpu", str); + error ("unknown value %qs for %<-mcpu%>", str); aarch64_print_hint_for_core (str); break; case AARCH64_PARSE_INVALID_FEATURE: @@ -11828,7 +11828,7 @@ aarch64_validate_march (const char *str, const struct processor **res, error ("missing arch name in %<-march=%s%>", str); break; case AARCH64_PARSE_INVALID_ARG: - error ("unknown value %qs for -march", str); + error ("unknown value %qs for %<-march%>", str); aarch64_print_hint_for_arch (str); break; case AARCH64_PARSE_INVALID_FEATURE: @@ -11863,7 +11863,7 @@ aarch64_validate_mtune (const char *str, const struct processor **res) error ("missing cpu name in %<-mtune=%s%>", str); break; case AARCH64_PARSE_INVALID_ARG: - error ("unknown value %qs for -mtune", str); + error ("unknown value %qs for %<-mtune%>", str); aarch64_print_hint_for_core (str); break; default: @@ -11988,7 +11988,7 @@ aarch64_override_options (void) { if (selected_arch->arch != selected_cpu->arch) { - warning (0, "switch -mcpu=%s conflicts with -march=%s switch", + warning (0, "switch %<-mcpu=%s%> conflicts with %<-march=%s%> switch", all_architectures[selected_cpu->arch].name, selected_arch->name); } @@ -12044,14 +12044,14 @@ aarch64_override_options (void) /* The compiler may have been configured with 2.23.* binutils, which does not have support for ILP32. */ if (TARGET_ILP32) - error ("assembler does not support -mabi=ilp32"); + error ("assembler does not support %<-mabi=ilp32%>"); #endif /* Convert -msve-vector-bits to a VG count. */ aarch64_sve_vg = aarch64_convert_sve_vector_bits (aarch64_sve_vector_bits); if (aarch64_ra_sign_scope != AARCH64_FUNCTION_NONE && TARGET_ILP32) - sorry ("return address signing is only supported for -mabi=lp64"); + sorry ("return address signing is only supported for %<-mabi=lp64%>"); /* Make sure we properly set up the explicit options. */ if ((aarch64_cpu_string && valid_cpu) @@ -12119,7 +12119,7 @@ initialize_aarch64_code_model (struct gcc_options *opts) #endif break; case AARCH64_CMODEL_LARGE: - sorry ("code model %qs with -f%s", "large", + sorry ("code model %qs with %<-f%s%>", "large", opts->x_flag_pic > 1 ? "PIC" : "pic"); break; default: diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index f0e8124..984540f 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -417,7 +417,8 @@ alpha_option_override (void) else if (! strcmp (alpha_tp_string, "i")) alpha_tp = ALPHA_TP_INSN; else - error ("bad value %qs for -mtrap-precision switch", alpha_tp_string); + error ("bad value %qs for %<-mtrap-precision%> switch", + alpha_tp_string); } if (alpha_fprm_string) @@ -431,7 +432,7 @@ alpha_option_override (void) else if (! strcmp (alpha_fprm_string,"d")) alpha_fprm = ALPHA_FPRM_DYN; else - error ("bad value %qs for -mfp-rounding-mode switch", + error ("bad value %qs for %<-mfp-rounding-mode%> switch", alpha_fprm_string); } @@ -446,7 +447,8 @@ alpha_option_override (void) else if (strcmp (alpha_fptm_string, "sui") == 0) alpha_fptm = ALPHA_FPTM_SUI; else - error ("bad value %qs for -mfp-trap-mode switch", alpha_fptm_string); + error ("bad value %qs for %<-mfp-trap-mode%> switch", + alpha_fptm_string); } if (alpha_cpu_string) @@ -463,7 +465,7 @@ alpha_option_override (void) break; } if (i == ct_size) - error ("bad value %qs for -mcpu switch", alpha_cpu_string); + error ("bad value %qs for %<-mcpu%> switch", alpha_cpu_string); } if (alpha_tune_string) @@ -478,7 +480,7 @@ alpha_option_override (void) break; } if (i == ct_size) - error ("bad value %qs for -mtune switch", alpha_tune_string); + error ("bad value %qs for %<-mtune%> switch", alpha_tune_string); } if (line_size) @@ -499,7 +501,7 @@ alpha_option_override (void) if ((alpha_fptm == ALPHA_FPTM_SU || alpha_fptm == ALPHA_FPTM_SUI) && alpha_tp != ALPHA_TP_INSN && alpha_cpu != PROCESSOR_EV6) { - warning (0, "fp software completion requires -mtrap-precision=i"); + warning (0, "fp software completion requires %<-mtrap-precision=i%>"); alpha_tp = ALPHA_TP_INSN; } @@ -567,7 +569,8 @@ alpha_option_override (void) } else { - warning (0, "bad value %qs for -mmemory-latency", alpha_mlat_string); + warning (0, "bad value %qs for %<-mmemory-latency%>", + alpha_mlat_string); lat = 3; } diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 3b8c299..581833b 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -933,10 +933,10 @@ arc_init (void) /* MPY instructions valid only for ARC700 or ARCv2. */ if (TARGET_NOMPY_SET && TARGET_ARC600_FAMILY) - error ("-mno-mpy supported only for ARC700 or ARCv2"); + error ("%<-mno-mpy%> supported only for ARC700 or ARCv2"); if (!TARGET_DPFP && TARGET_DPFP_DISABLE_LRSR) - error ("-mno-dpfp-lrsr supported only with -mdpfp"); + error ("%<-mno-dpfp-lrsr%> supported only with %<-mdpfp%>"); /* FPX-1. No fast and compact together. */ if ((TARGET_DPFP_FAST_SET && TARGET_DPFP_COMPACT_SET) @@ -945,7 +945,7 @@ arc_init (void) /* FPX-2. No fast-spfp for arc600 or arc601. */ if (TARGET_SPFP_FAST_SET && TARGET_ARC600_FAMILY) - error ("-mspfp_fast not available on ARC600 or ARC601"); + error ("%<-mspfp_fast%> not available on ARC600 or ARC601"); /* FPX-4. No FPX extensions mixed with FPU extensions. */ if ((TARGET_DPFP_FAST_SET || TARGET_DPFP_COMPACT_SET || TARGET_SPFP) @@ -1110,7 +1110,7 @@ parse_mrgf_banked_regs_option (const char *arg) if (errno != 0 || *arg == '\0' || *end_ptr != '\0' || (val != 0 && val != 4 && val != 8 && val != 16 && val != 32)) { - error ("invalid number in -mrgf-banked-regs=%s " + error ("invalid number in %<-mrgf-banked-regs=%s%> " "valid values are 0, 4, 8, 16, or 32", arg); return; } @@ -1172,7 +1172,8 @@ arc_override_options (void) irq_range (opt->arg); else warning (OPT_mirq_ctrl_saved_, - "option -mirq-ctrl-saved valid only for ARC v2 processors"); + "option %<-mirq-ctrl-saved%> valid only " + "for ARC v2 processors"); break; case OPT_mrgf_banked_regs_: @@ -1180,7 +1181,8 @@ arc_override_options (void) parse_mrgf_banked_regs_option (opt->arg); else warning (OPT_mrgf_banked_regs_, - "option -mrgf-banked-regs valid only for ARC v2 processors"); + "option %<-mrgf-banked-regs%> valid only for " + "ARC v2 processors"); break; default: @@ -6791,7 +6793,7 @@ arc_expand_builtin_aligned (tree exp) /* If we can't fold the alignment to a constant integer whilst optimizing, this is probably a user error. */ if (optimize) - warning (0, "__builtin_arc_aligned with non-constant alignment"); + warning (0, "%<__builtin_arc_aligned%> with non-constant alignment"); } else { @@ -6799,7 +6801,7 @@ arc_expand_builtin_aligned (tree exp) /* Check alignTest is positive, and a power of two. */ if (alignTest <= 0 || alignTest != (alignTest & -alignTest)) { - error ("invalid alignment value for __builtin_arc_aligned"); + error ("invalid alignment value for %<__builtin_arc_aligned%>"); return NULL_RTX; } diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c index f646ab5..55bbb48 100644 --- a/gcc/config/arm/arm-builtins.c +++ b/gcc/config/arm/arm-builtins.c @@ -2514,7 +2514,7 @@ arm_expand_neon_builtin (int fcode, tree exp, rtx target) { fatal_error (input_location, "You must enable NEON instructions" - " (e.g. -mfloat-abi=softfp -mfpu=neon)" + " (e.g. %<-mfloat-abi=softfp%> %<-mfpu=neon%>)" " to use these intrinsics."); return const0_rtx; } @@ -2612,7 +2612,8 @@ arm_expand_builtin (tree exp, { fatal_error (input_location, "You must enable crypto instructions" - " (e.g. include -mfloat-abi=softfp -mfpu=crypto-neon...)" + " (e.g. include %<-mfloat-abi=softfp%> " + "%<-mfpu=crypto-neon%>)" " to use these intrinsics."); return const0_rtx; } diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 69b74a2..67f1a9c 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -2884,14 +2884,15 @@ arm_option_check_internal (struct gcc_options *opts) && write_symbols != NO_DEBUG && !TARGET_APCS_FRAME && (TARGET_DEFAULT & MASK_APCS_FRAME)) - warning (0, "-g with -mno-apcs-frame may not give sensible debugging"); + warning (0, "%<-g%> with %<-mno-apcs-frame%> may not give sensible " + "debugging"); /* iWMMXt unsupported under Thumb mode. */ if (TARGET_THUMB_P (flags) && TARGET_IWMMXT) error ("iWMMXt unsupported under Thumb mode"); if (TARGET_HARD_TP && TARGET_THUMB1_P (flags)) - error ("cannot use -mtp=cp15 with 16-bit Thumb"); + error ("cannot use %<-mtp=cp15%> with 16-bit Thumb"); if (TARGET_THUMB_P (flags) && TARGET_VXWORKS_RTP && flag_pic) { @@ -2913,7 +2914,7 @@ arm_option_check_internal (struct gcc_options *opts) /* Cannot load addresses: -mslow-flash-data forbids literal pool and -mword-relocations forbids relocation of MOVT/MOVW. */ if (target_word_relocations) - error ("%s incompatible with -mword-relocations", flag); + error ("%s incompatible with %<-mword-relocations%>", flag); } } @@ -3181,7 +3182,8 @@ arm_configure_build_target (struct arm_build_target *target, if (!bitmap_empty_p (isa_delta)) { if (warn_compatible) - warning (0, "switch -mcpu=%s conflicts with -march=%s switch", + warning (0, "switch %<-mcpu=%s%> conflicts " + "with %<-march=%s%> switch", arm_selected_cpu->common.name, arm_selected_arch->common.name); /* -march wins for code generation. @@ -3406,7 +3408,8 @@ arm_option_override (void) if (TARGET_APCS_STACK && !TARGET_APCS_FRAME) { - warning (0, "-mapcs-stack-check incompatible with -mno-apcs-frame"); + warning (0, "%<-mapcs-stack-check%> incompatible with " + "%<-mno-apcs-frame%>"); target_flags |= MASK_APCS_FRAME; } @@ -3414,7 +3417,7 @@ arm_option_override (void) target_flags |= MASK_APCS_FRAME; if (TARGET_APCS_REENT && flag_pic) - error ("-fpic and -mapcs-reent are incompatible"); + error ("%<-fpic%> and %<-mapcs-reent%> are incompatible"); if (TARGET_APCS_REENT) warning (0, "APCS reentrant code not supported. Ignored"); @@ -3475,7 +3478,7 @@ arm_option_override (void) if (flag_pic && TARGET_SINGLE_PIC_BASE) { if (TARGET_VXWORKS_RTP) - warning (0, "RTP PIC is incompatible with -msingle-pic-base"); + warning (0, "RTP PIC is incompatible with %<-msingle-pic-base%>"); arm_pic_register = (TARGET_APCS_STACK || TARGET_AAPCS_BASED) ? 9 : 10; } @@ -3487,7 +3490,7 @@ arm_option_override (void) int pic_register = decode_reg_name (arm_pic_register_string); if (!flag_pic) - warning (0, "-mpic-register= is useless without -fpic"); + warning (0, "%<-mpic-register=%> is useless without %<-fpic%>"); /* Prevent the user from choosing an obviously stupid PIC register. */ else if (pic_register < 0 || call_used_regs[pic_register] @@ -3518,7 +3521,8 @@ arm_option_override (void) if (flag_reorder_blocks_and_partition) { inform (input_location, - "-freorder-blocks-and-partition not supported on this architecture"); + "%<-freorder-blocks-and-partition%> not supported " + "on this architecture"); flag_reorder_blocks_and_partition = 0; flag_reorder_blocks = 1; } @@ -3733,10 +3737,10 @@ arm_options_perform_arch_sanity_checks (void) if (TARGET_AAPCS_BASED) { if (TARGET_CALLER_INTERWORKING) - error ("AAPCS does not support -mcaller-super-interworking"); + error ("AAPCS does not support %<-mcaller-super-interworking%>"); else if (TARGET_CALLEE_INTERWORKING) - error ("AAPCS does not support -mcallee-super-interworking"); + error ("AAPCS does not support %<-mcallee-super-interworking%>"); } /* __fp16 support currently assumes the core has ldrh. */ @@ -3760,7 +3764,7 @@ arm_options_perform_arch_sanity_checks (void) { arm_pcs_default = ARM_PCS_AAPCS_VFP; if (!bitmap_bit_p (arm_active_target.isa, isa_bit_vfpv2)) - error ("-mfloat-abi=hard: selected processor lacks an FPU"); + error ("%<-mfloat-abi=hard%>: selected processor lacks an FPU"); } else arm_pcs_default = ARM_PCS_AAPCS; @@ -3768,7 +3772,7 @@ arm_options_perform_arch_sanity_checks (void) else { if (arm_float_abi == ARM_FLOAT_ABI_HARD) - sorry ("-mfloat-abi=hard and VFP"); + sorry ("%<-mfloat-abi=hard%> and VFP"); if (arm_abi == ARM_ABI_APCS) arm_pcs_default = ARM_PCS_APCS; @@ -7039,8 +7043,8 @@ arm_handle_cmse_nonsecure_entry (tree *node, tree name, if (!use_cmse) { *no_add_attrs = true; - warning (OPT_Wattributes, "%qE attribute ignored without -mcmse option.", - name); + warning (OPT_Wattributes, "%qE attribute ignored without %<-mcmse%> " + "option.", name); return NULL_TREE; } @@ -7091,8 +7095,8 @@ arm_handle_cmse_nonsecure_call (tree *node, tree name, if (!use_cmse) { *no_add_attrs = true; - warning (OPT_Wattributes, "%qE attribute ignored without -mcmse option.", - name); + warning (OPT_Wattributes, "%qE attribute ignored without %<-mcmse%> " + "option.", name); return NULL_TREE; } @@ -8882,7 +8886,7 @@ arm_tls_referenced_p (rtx x) currently implement these if a literal pool is disabled. */ if (arm_disable_literal_pool) sorry ("accessing thread-local storage is not currently supported " - "with -mpure-code or -mslow-flash-data"); + "with %<-mpure-code%> or %<-mslow-flash-data%>"); return true; } @@ -25414,7 +25418,7 @@ thumb1_expand_prologue (void) if ((flag_stack_check == STATIC_BUILTIN_STACK_CHECK || flag_stack_clash_protection) && size) - sorry ("-fstack-check=specific for Thumb-1"); + sorry ("%<-fstack-check=specific%> for Thumb-1"); amount = offsets->outgoing_args - offsets->saved_regs; amount -= 4 * thumb1_extra_regs_pushed (offsets, true); diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index a53b909..a9f72b3 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -762,13 +762,13 @@ avr_option_override (void) } if (flag_pic == 1) - warning (OPT_fpic, "-fpic is not supported"); + warning (OPT_fpic, "%<-fpic%> is not supported"); if (flag_pic == 2) - warning (OPT_fPIC, "-fPIC is not supported"); + warning (OPT_fPIC, "%<-fPIC%> is not supported"); if (flag_pie == 1) - warning (OPT_fpie, "-fpie is not supported"); + warning (OPT_fpie, "%<-fpie%> is not supported"); if (flag_pie == 2) - warning (OPT_fPIE, "-fPIE is not supported"); + warning (OPT_fPIE, "%<-fPIE%> is not supported"); #if !defined (HAVE_AS_AVR_MGCCISR_OPTION) avr_gasisr_prologues = 0; diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index 51cfc51..97c2c12 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -2379,16 +2379,19 @@ bfin_option_override (void) #ifdef SUBTARGET_FDPIC_NOT_SUPPORTED if (TARGET_FDPIC) - error ("-mfdpic is not supported, please use a bfin-linux-uclibc target"); + error ("%<-mfdpic%> is not supported, please use a bfin-linux-uclibc " + "target"); #endif /* Library identification */ if (global_options_set.x_bfin_library_id && ! TARGET_ID_SHARED_LIBRARY) - error ("-mshared-library-id= specified without -mid-shared-library"); + error ("%<-mshared-library-id=%> specified without " + "%<-mid-shared-library%>"); if (stack_limit_rtx && TARGET_FDPIC) { - warning (0, "-fstack-limit- options are ignored with -mfdpic; use -mstack-check-l1"); + warning (0, "%<-fstack-limit-%> options are ignored with %<-mfdpic%>; " + "use %<-mstack-check-l1%>"); stack_limit_rtx = NULL_RTX; } @@ -2401,7 +2404,7 @@ bfin_option_override (void) /* Don't allow the user to specify -mid-shared-library and -msep-data together, as it makes little sense from a user's point of view... */ if (TARGET_SEP_DATA && TARGET_ID_SHARED_LIBRARY) - error ("cannot specify both -msep-data and -mid-shared-library"); + error ("cannot specify both %<-msep-data%> and %<-mid-shared-library%>"); /* ... internally, however, it's nearly the same. */ if (TARGET_SEP_DATA) target_flags |= MASK_ID_SHARED_LIBRARY | MASK_LEAF_ID_SHARED_LIBRARY; @@ -2421,16 +2424,16 @@ bfin_option_override (void) flag_pic = 0; if (TARGET_MULTICORE && bfin_cpu_type != BFIN_CPU_BF561) - error ("-mmulticore can only be used with BF561"); + error ("%<-mmulticore%> can only be used with BF561"); if (TARGET_COREA && !TARGET_MULTICORE) - error ("-mcorea should be used with -mmulticore"); + error ("%<-mcorea%> should be used with %<-mmulticore%>"); if (TARGET_COREB && !TARGET_MULTICORE) - error ("-mcoreb should be used with -mmulticore"); + error ("%<-mcoreb%> should be used with %<-mmulticore%>"); if (TARGET_COREA && TARGET_COREB) - error ("-mcorea and -mcoreb can%'t be used together"); + error ("%<-mcorea%> and %<-mcoreb%> can%'t be used together"); flag_schedule_insns = 0; diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c index 37f3021..9a07c40 100644 --- a/gcc/config/c6x/c6x.c +++ b/gcc/config/c6x/c6x.c @@ -239,7 +239,8 @@ c6x_option_override (void) if (flag_pic && !TARGET_DSBT) { - error ("-fpic and -fPIC not supported without -mdsbt on this target"); + error ("%<-fpic%> and %<-fPIC%> not supported without %<-mdsbt%> " + "on this target"); flag_pic = 0; } c6x_initial_flag_pic = flag_pic; diff --git a/gcc/config/cr16/cr16.c b/gcc/config/cr16/cr16.c index ffa45bb..42b9e04 100644 --- a/gcc/config/cr16/cr16.c +++ b/gcc/config/cr16/cr16.c @@ -306,7 +306,8 @@ cr16_override_options (void) error ("data-model=far not valid for cr16c architecture"); } else - error ("invalid data model option -mdata-model=%s", cr16_data_model); + error ("invalid data model option %<-mdata-model=%s%>", + cr16_data_model); } else data_model = DM_DEFAULT; diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 9b580ce..591941b 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -2651,7 +2651,8 @@ cris_option_override (void) /* Do some sanity checking. */ if (cris_max_stackframe < 0 || cris_max_stackframe > 0x20000000) - internal_error ("-max-stackframe=%d is not usable, not between 0 and %d", + internal_error ("%<-max-stackframe=%d%> is not usable, " + "not between 0 and %d", cris_max_stackframe, 0x20000000); } @@ -2679,8 +2680,8 @@ cris_option_override (void) cris_cpu_version = 10; if (cris_cpu_version < 0 || cris_cpu_version > 32) - error ("unknown CRIS version specification in -march= or -mcpu= : %s", - cris_cpu_str); + error ("unknown CRIS version specification in %<-march=%> or " + "%<-mcpu=%> : %s", cris_cpu_str); /* Set the target flags. */ if (cris_cpu_version >= CRIS_CPU_ETRAX4) @@ -2715,7 +2716,7 @@ cris_option_override (void) cris_tune = 10; if (cris_tune < 0 || cris_tune > 32) - error ("unknown CRIS cpu version specification in -mtune= : %s", + error ("unknown CRIS cpu version specification in %<-mtune=%> : %s", cris_tune_str); if (cris_tune >= CRIS_CPU_SVINTO) @@ -2736,7 +2737,8 @@ cris_option_override (void) further errors. */ if (! TARGET_LINUX) { - error ("-fPIC and -fpic are not supported in this configuration"); + error ("%<-fPIC%> and %<-fpic%> are not supported " + "in this configuration"); flag_pic = 0; } diff --git a/gcc/config/csky/csky.c b/gcc/config/csky/csky.c index 8a3c909..e4ac933 100644 --- a/gcc/config/csky/csky.c +++ b/gcc/config/csky/csky.c @@ -6035,7 +6035,7 @@ csky_handle_isr_attribute (tree *node, tree name, tree args, int flags, if (!TARGET_ISTACK) { - warning (OPT_Wattributes, "%qE attribute ignored without -mistack", + warning (OPT_Wattributes, "%qE attribute ignored without %<-mistack%>", name); *no_add_attrs = true; return NULL_TREE; diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c index ff91575..d74d9a5 100644 --- a/gcc/config/darwin-c.c +++ b/gcc/config/darwin-c.c @@ -715,7 +715,7 @@ macosx_version_as_macro (void) return version_macro; fail: - error ("unknown value %qs of -mmacosx-version-min", + error ("unknown value %qs of %<-mmacosx-version-min%>", darwin_macosx_version_min); return "1000"; } diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 9194811..f62f1c7 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -3173,7 +3173,7 @@ darwin_override_options (void) if (global_options_set.x_dwarf_split_debug_info) { inform (input_location, - "-gsplit-dwarf is not supported on this platform, ignored"); + "%<-gsplit-dwarf%> is not supported on this platform, ignored"); dwarf_split_debug_info = 0; global_options_set.x_dwarf_split_debug_info = 0; } @@ -3203,8 +3203,8 @@ darwin_override_options (void) && !global_options_set.x_flag_asynchronous_unwind_tables))) { inform (input_location, - "-freorder-blocks-and-partition does not work with exceptions " - "on this architecture"); + "%<-freorder-blocks-and-partition%> does not work with " + "exceptions on this architecture"); flag_reorder_blocks_and_partition = 0; flag_reorder_blocks = 1; } diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 1aa0938..71bf819 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -9115,7 +9115,7 @@ frv_expand_builtin (tree exp, if (fcode < FRV_BUILTIN_FIRST_NONMEDIA && !TARGET_MEDIA) { - error ("media functions are not available unless -mmedia is used"); + error ("media functions are not available unless %<-mmedia%> is used"); return NULL_RTX; } diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 805ed72..b68ee39 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -326,7 +326,7 @@ h8300_option_override (void) #ifndef OBJECT_FORMAT_ELF if (TARGET_H8300SX) { - error ("-msx is not supported in coff"); + error ("%<-msx%> is not supported in coff"); target_flags |= MASK_H8300S; } #endif @@ -348,44 +348,44 @@ h8300_option_override (void) if (!TARGET_H8300S && TARGET_MAC) { - error ("-ms2600 is used without -ms"); + error ("%<-ms2600%> is used without %<-ms%>"); target_flags |= MASK_H8300S_1; } if (TARGET_H8300 && TARGET_NORMAL_MODE) { - error ("-mn is used without -mh or -ms or -msx"); + error ("%<-mn%> is used without %<-mh%> or %<-ms%> or %<-msx%>"); target_flags ^= MASK_NORMAL_MODE; } if (! TARGET_H8300S && TARGET_EXR) { - error ("-mexr is used without -ms"); + error ("%<-mexr%> is used without %<-ms%>"); target_flags |= MASK_H8300S_1; } if (TARGET_H8300 && TARGET_INT32) { - error ("-mint32 is not supported for H8300 and H8300L targets"); + error ("%<-mint32%> is not supported for H8300 and H8300L targets"); target_flags ^= MASK_INT32; } if ((!TARGET_H8300S && TARGET_EXR) && (!TARGET_H8300SX && TARGET_EXR)) { - error ("-mexr is used without -ms or -msx"); + error ("%<-mexr%> is used without %<-ms%> or %<-msx%>"); target_flags |= MASK_H8300S_1; } if ((!TARGET_H8300S && TARGET_NEXR) && (!TARGET_H8300SX && TARGET_NEXR)) { - warning (OPT_mno_exr, "-mno-exr valid only with -ms or -msx \ - - Option ignored!"); + warning (OPT_mno_exr, "%<-mno-exr%> valid only with %<-ms%> or " + "%<-msx%> - Option ignored!"); } #ifdef H8300_LINUX if ((TARGET_NORMAL_MODE)) { - error ("-mn is not supported for linux targets"); + error ("%<-mn%> is not supported for linux targets"); target_flags ^= MASK_NORMAL_MODE; } #endif diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e50938c..a4a7fbc 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3553,8 +3553,8 @@ parse_mtune_ctrl_str (bool dump) } } if (i == X86_TUNE_LAST) - error ("unknown parameter to option -mtune-ctrl: %s", - clear ? curr_feature_string - 1 : curr_feature_string); + error ("unknown parameter to option %<-mtune-ctrl%>: %s", + clear ? curr_feature_string - 1 : curr_feature_string); curr_feature_string = next_feature_string; } while (curr_feature_string); @@ -3750,7 +3750,7 @@ ix86_option_override_internal (bool main_args_p, && !TARGET_64BIT_P (opts->x_ix86_isa_flags)) { /* rep; movq isn't available in 32-bit code. */ - error ("-mstringop-strategy=rep_8byte not supported for 32-bit code"); + error ("%<-mstringop-strategy=rep_8byte%> not supported for 32-bit code"); opts->x_ix86_stringop_alg = no_stringop; } @@ -3779,7 +3779,7 @@ ix86_option_override_internal (bool main_args_p, opts->x_ix86_abi = DEFAULT_ABI; if (opts->x_ix86_abi == MS_ABI && TARGET_X32_P (opts->x_ix86_isa_flags)) - error ("-mabi=ms not supported with X32 ABI"); + error ("%<-mabi=ms%> not supported with X32 ABI"); gcc_assert (opts->x_ix86_abi == SYSV_ABI || opts->x_ix86_abi == MS_ABI); if ((opts->x_flag_sanitize & SANITIZE_USER_ADDRESS) && opts->x_ix86_abi == MS_ABI) @@ -3871,7 +3871,7 @@ ix86_option_override_internal (bool main_args_p, } if (TARGET_MACHO && opts->x_ix86_asm_dialect == ASM_INTEL) { - error ("-masm=intel not supported in this configuration"); + error ("%<-masm=intel%> not supported in this configuration"); opts->x_ix86_asm_dialect = ASM_ATT; } if ((TARGET_64BIT_P (opts->x_ix86_isa_flags) != 0) @@ -4326,12 +4326,12 @@ ix86_option_override_internal (bool main_args_p, if (opts_set->x_ix86_regparm) { if (TARGET_64BIT_P (opts->x_ix86_isa_flags)) - warning (0, "-mregparm is ignored in 64-bit mode"); + warning (0, "%<-mregparm%> is ignored in 64-bit mode"); else if (TARGET_IAMCU_P (opts->x_target_flags)) - warning (0, "-mregparm is ignored for Intel MCU psABI"); + warning (0, "%<-mregparm%> is ignored for Intel MCU psABI"); if (opts->x_ix86_regparm > REGPARM_MAX) { - error ("-mregparm=%d is not between 0 and %d", + error ("%<-mregparm=%d%> is not between 0 and %d", opts->x_ix86_regparm, REGPARM_MAX); opts->x_ix86_regparm = 0; } @@ -4439,10 +4439,10 @@ ix86_option_override_internal (bool main_args_p, || opts->x_ix86_preferred_stack_boundary_arg > max) { if (min == max) - error ("-mpreferred-stack-boundary is not supported " + error ("%<-mpreferred-stack-boundary%> is not supported " "for this target"); else - error ("-mpreferred-stack-boundary=%d is not between %d and %d", + error ("%<-mpreferred-stack-boundary=%d%> is not between %d and %d", opts->x_ix86_preferred_stack_boundary_arg, min, max); } else @@ -4465,7 +4465,7 @@ ix86_option_override_internal (bool main_args_p, if (opts->x_ix86_incoming_stack_boundary_arg < min || opts->x_ix86_incoming_stack_boundary_arg > 12) - error ("-mincoming-stack-boundary=%d is not between %d and 12", + error ("%<-mincoming-stack-boundary=%d%> is not between %d and 12", opts->x_ix86_incoming_stack_boundary_arg, min); else { @@ -4478,10 +4478,10 @@ ix86_option_override_internal (bool main_args_p, #ifndef NO_PROFILE_COUNTERS if (flag_nop_mcount) - error ("-mnop-mcount is not compatible with this target"); + error ("%<-mnop-mcount%> is not compatible with this target"); #endif if (flag_nop_mcount && flag_pic) - error ("-mnop-mcount is not implemented for -fPIC"); + error ("%<-mnop-mcount%> is not implemented for %<-fPIC%>"); /* Accept -msseregparm only if at least SSE support is enabled. */ if (TARGET_SSEREGPARM_P (opts->x_target_flags) @@ -4683,14 +4683,14 @@ ix86_option_override_internal (bool main_args_p, { if (!TARGET_64BIT_P (opts->x_ix86_isa_flags) && opts->x_flag_pic && opts->x_flag_fentry) - sorry ("-mfentry isn%'t supported for 32-bit in combination " - "with -fpic"); + sorry ("%<-mfentry%> isn%'t supported for 32-bit in combination " + "with %<-fpic%>"); else if (TARGET_SEH && !opts->x_flag_fentry) - sorry ("-mno-fentry isn%'t compatible with SEH"); + sorry ("%<-mno-fentry%> isn%'t compatible with SEH"); } if (TARGET_SEH && TARGET_CALL_MS2SYSV_XLOGUES) - sorry ("-mcall-ms2sysv-xlogues isn%'t currently supported with SEH"); + sorry ("%<-mcall-ms2sysv-xlogues%> isn%'t currently supported with SEH"); if (!(opts_set->x_target_flags & MASK_VZEROUPPER) && TARGET_EMIT_VZEROUPPER) @@ -4755,7 +4755,7 @@ ix86_option_override_internal (bool main_args_p, if (i == ARRAY_SIZE (recip_options)) { - error ("unknown option for -mrecip=%s", q); + error ("unknown option for %<-mrecip=%s%>", q); invert = false; mask = RECIP_MASK_NONE; } @@ -4815,12 +4815,12 @@ ix86_option_override_internal (bool main_args_p, if (!*str || *endp || errno) error ("%qs is not a valid number " - "in -mstack-protector-guard-offset=", str); + "in %<-mstack-protector-guard-offset=%>", str); if (!IN_RANGE (offset, HOST_WIDE_INT_C (-0x80000000), HOST_WIDE_INT_C (0x7fffffff))) error ("%qs is not a valid offset " - "in -mstack-protector-guard-offset=", str); + "in %<-mstack-protector-guard-offset=%>", str); opts->x_ix86_stack_protector_guard_offset = offset; } @@ -4848,7 +4848,7 @@ ix86_option_override_internal (bool main_args_p, if (seg == ADDR_SPACE_GENERIC) error ("%qs is not a valid base register " - "in -mstack-protector-guard-reg=", + "in %<-mstack-protector-guard-reg=%>", opts->x_ix86_stack_protector_guard_reg_str); opts->x_ix86_stack_protector_guard_reg = seg; @@ -11336,7 +11336,7 @@ static void warn_once_call_ms2sysv_xlogues (const char *feature) static bool warned_once = false; if (!warned_once) { - warning (0, "-mcall-ms2sysv-xlogues is not compatible with %s", + warning (0, "%<-mcall-ms2sysv-xlogues%> is not compatible with %s", feature); warned_once = true; } @@ -13336,7 +13336,7 @@ ix86_expand_prologue (void) prologue variant. If so sorry. */ if (crtl->profile && flag_fentry != 0) sorry ("ms_hook_prologue attribute isn%'t compatible " - "with -mfentry for 32-bit"); + "with %<-mfentry%> for 32-bit"); /* In ix86_asm_output_function_label we emitted: 8b ff movl.s %edi,%edi @@ -14715,7 +14715,7 @@ split_stack_prologue_scratch_regno (void) { if (DECL_STATIC_CHAIN (cfun->decl)) { - sorry ("-fsplit-stack does not support fastcall with " + sorry ("%<-fsplit-stack%> does not support fastcall with " "nested function"); return INVALID_REGNUM; } @@ -14735,7 +14735,7 @@ split_stack_prologue_scratch_regno (void) { if (regparm >= 2) { - sorry ("-fsplit-stack does not support 2 register " + sorry ("%<-fsplit-stack%> does not support 2 register " "parameters for a nested function"); return INVALID_REGNUM; } @@ -14746,7 +14746,7 @@ split_stack_prologue_scratch_regno (void) { /* FIXME: We could make this work by pushing a register around the addition and comparison. */ - sorry ("-fsplit-stack does not support 3 register parameters"); + sorry ("%<-fsplit-stack%> does not support 3 register parameters"); return INVALID_REGNUM; } } @@ -29779,7 +29779,7 @@ ix86_warn_parameter_passing_abi (cumulative_args_t cum_v, tree type) return; warning (OPT_Wabi, "empty class %qT parameter passing ABI " - "changes in -fabi-version=12 (GCC 8)", type); + "changes in %<-fabi-version=12%> (GCC 8)", type); /* Only warn once. */ cum->warn_empty = false; diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 006f1d7..e8d905e 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -6024,7 +6024,7 @@ fix_range (const char *const_str) dash = strchr (str, '-'); if (!dash) { - warning (0, "value of -mfixed-range must have form REG1-REG2"); + warning (0, "value of %<-mfixed-range%> must have form REG1-REG2"); return; } *dash = '\0'; diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index bd389ea..7a0d6f7 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -524,7 +524,7 @@ m68k_option_override (void) if (m68k_arch_entry && (m68k_arch_entry->microarch != m68k_cpu_entry->microarch || (m68k_arch_entry->flags & ~m68k_cpu_entry->flags) != 0)) - warning (0, "-mcpu=%s conflicts with -march=%s", + warning (0, "%<-mcpu=%s%> conflicts with %<-march=%s%>", m68k_cpu_entry->name, m68k_arch_entry->name); entry = m68k_cpu_entry; @@ -583,7 +583,7 @@ m68k_option_override (void) * both specified together. Doing so simply doesn't make sense. */ if (TARGET_SEP_DATA && TARGET_ID_SHARED_LIBRARY) - error ("cannot specify both -msep-data and -mid-shared-library"); + error ("cannot specify both %<-msep-data%> and %<-mid-shared-library%>"); /* If we're generating code for a separate A5 relative data segment, * we've got to enable -fPIC as well. This might be relaxable to @@ -595,7 +595,7 @@ m68k_option_override (void) /* -mpcrel -fPIC uses 32-bit pc-relative displacements. Raise an error if the target does not support them. */ if (TARGET_PCREL && !TARGET_68020 && flag_pic == 2) - error ("-mpcrel -fPIC is not currently supported on selected cpu"); + error ("%<-mpcrel%> %<-fPIC%> is not currently supported on selected cpu"); /* ??? A historic way of turning on pic, or is this intended to be an embedded thing that doesn't have the same name binding @@ -659,14 +659,14 @@ m68k_option_override (void) int label_alignment = align_labels.levels[0].get_value (); if (label_alignment > 2) { - warning (0, "-falign-labels=%d is not supported", label_alignment); + warning (0, "%<-falign-labels=%d%> is not supported", label_alignment); str_align_labels = "1"; } int loop_alignment = align_loops.levels[0].get_value (); if (loop_alignment > 2) { - warning (0, "-falign-loops=%d is not supported", loop_alignment); + warning (0, "%<-falign-loops=%d%> is not supported", loop_alignment); str_align_loops = "1"; } #endif @@ -674,7 +674,7 @@ m68k_option_override (void) if ((opt_fstack_limit_symbol_arg != NULL || opt_fstack_limit_register_no >= 0) && !TARGET_68020) { - warning (0, "-fstack-limit- options are not supported on this cpu"); + warning (0, "%<-fstack-limit-%> options are not supported on this cpu"); opt_fstack_limit_symbol_arg = NULL; opt_fstack_limit_register_no = -1; } diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c index aa6ef44..70910fd 100644 --- a/gcc/config/microblaze/microblaze.c +++ b/gcc/config/microblaze/microblaze.c @@ -1759,7 +1759,7 @@ microblaze_option_override (void) flag_pic = 2; if (!TARGET_SUPPORTS_PIC) { - error ("-fPIC/-fpic not supported for this target"); + error ("%<-fPIC%>/%<-fpic%> not supported for this target"); /* Clear it to avoid further errors. */ flag_pic = 0; } @@ -1771,7 +1771,7 @@ microblaze_option_override (void) ver = microblaze_version_to_int (microblaze_select_cpu); if (ver == -1) { - error ("%qs is an invalid argument to -mcpu=", microblaze_select_cpu); + error ("%qs is an invalid argument to %<-mcpu=%>", microblaze_select_cpu); } ver = MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v3.00.a"); @@ -1820,7 +1820,8 @@ microblaze_option_override (void) { if (TARGET_MULTIPLY_HIGH) warning (0, - "-mxl-multiply-high can be used only with -mcpu=v6.00.a or greater"); + "%<-mxl-multiply-high%> can be used only with " + "%<-mcpu=v6.00.a%> or greater"); } ver = MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu, "v8.10.a"); @@ -1836,18 +1837,20 @@ microblaze_option_override (void) if (ver < 0) { if (TARGET_REORDER == 1) - warning (0, "-mxl-reorder can be used only with -mcpu=v8.30.a or greater"); + warning (0, "%<-mxl-reorder%> can be used only with " + "%<-mcpu=v8.30.a%> or greater"); TARGET_REORDER = 0; } else if ((ver == 0) && !TARGET_PATTERN_COMPARE) { if (TARGET_REORDER == 1) - warning (0, "-mxl-reorder requires -mxl-pattern-compare for -mcpu=v8.30.a"); + warning (0, "%<-mxl-reorder%> requires %<-mxl-pattern-compare%> for " + "%<-mcpu=v8.30.a%>"); TARGET_REORDER = 0; } if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL) - error ("-mxl-multiply-high requires -mno-xl-soft-mul"); + error ("%<-mxl-multiply-high%> requires %<-mno-xl-soft-mul%>"); /* Always use DFA scheduler. */ microblaze_sched_use_dfa = 1; diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index a8022b8..4b42077 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -11951,7 +11951,7 @@ static void mips_emit_probe_stack_range (HOST_WIDE_INT first, HOST_WIDE_INT size) { if (TARGET_MIPS16) - sorry ("-fstack-check=specific not implemented for MIPS16"); + sorry ("%<-fstack-check=specific%> not implemented for MIPS16"); /* See if we have a constant small number of probes to generate. If so, that's the easy case. */ @@ -19598,7 +19598,7 @@ mips_set_compression_mode (unsigned int compression_mode) sorry ("MIPS16 PIC for ABIs other than o32 and o64"); if (TARGET_XGOT) - sorry ("MIPS16 -mxgot code"); + sorry ("MIPS16 %<-mxgot%> code"); if (TARGET_HARD_FLOAT_ABI && !TARGET_OLDABI) sorry ("hard-float MIPS16 code for ABIs other than o32 and o64"); diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c index d8d219b..c2136e2 100644 --- a/gcc/config/mmix/mmix.c +++ b/gcc/config/mmix/mmix.c @@ -317,7 +317,8 @@ mmix_option_override (void) labels. */ if (flag_pic) { - warning (0, "-f%s not supported: ignored", (flag_pic > 1) ? "PIC" : "pic"); + warning (0, "%<-f%s%> not supported: ignored", + (flag_pic > 1) ? "PIC" : "pic"); flag_pic = 0; } } diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index 72e1256..51116f5 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -104,7 +104,7 @@ mn10300_option_override (void) else if (strcasecmp (mn10300_tune_string, "am34") == 0) mn10300_tune_cpu = PROCESSOR_AM34; else - error ("-mtune= expects mn10300, am33, am33-2, or am34"); + error ("%<-mtune=%> expects mn10300, am33, am33-2, or am34"); } } diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c index 15d97af..48d16a4 100644 --- a/gcc/config/msp430/msp430.c +++ b/gcc/config/msp430/msp430.c @@ -797,26 +797,31 @@ msp430_option_override (void) if (msp430_warn_mcu) { if (target_cpu&& msp430x != xisa) - warning (0, "MCU '%s' supports %s ISA but -mcpu option is set to %s", + warning (0, "MCU '%s' supports %s ISA but %<-mcpu%> option " + "is set to %s", target_mcu, xisa ? "430X" : "430", msp430x ? "430X" : "430"); if (msp430_mcu_data[i].hwmpy == 0 && msp430_hwmult_type != MSP430_HWMULT_AUTO && msp430_hwmult_type != MSP430_HWMULT_NONE) - warning (0, "MCU '%s' does not have hardware multiply support, but -mhwmult is set to %s", + warning (0, "MCU '%s' does not have hardware multiply " + "support, but %<-mhwmult%> is set to %s", target_mcu, msp430_hwmult_type == MSP430_HWMULT_SMALL ? "16-bit" : msp430_hwmult_type == MSP430_HWMULT_LARGE ? "32-bit" : "f5series"); else if (msp430_hwmult_type == MSP430_HWMULT_SMALL && msp430_mcu_data[i].hwmpy != 1 && msp430_mcu_data[i].hwmpy != 2 ) - warning (0, "MCU '%s' supports %s hardware multiply, but -mhwmult is set to 16-bit", + warning (0, "MCU '%s' supports %s hardware multiply, " + "but %<-mhwmult%> is set to 16-bit", target_mcu, hwmult_name (msp430_mcu_data[i].hwmpy)); else if (msp430_hwmult_type == MSP430_HWMULT_LARGE && msp430_mcu_data[i].hwmpy != 4) - warning (0, "MCU '%s' supports %s hardware multiply, but -mhwmult is set to 32-bit", + warning (0, "MCU '%s' supports %s hardware multiply, " + "but %<-mhwmult%> is set to 32-bit", target_mcu, hwmult_name (msp430_mcu_data[i].hwmpy)); else if (msp430_hwmult_type == MSP430_HWMULT_F5SERIES && msp430_mcu_data[i].hwmpy != 8) - warning (0, "MCU '%s' supports %s hardware multiply, but -mhwmult is set to f5series", + warning (0, "MCU '%s' supports %s hardware multiply, " + "but %<-mhwmult%> is set to f5series", target_mcu, hwmult_name (msp430_mcu_data[i].hwmpy)); } @@ -834,13 +839,13 @@ msp430_option_override (void) warning (0, "Unrecognized MCU name '%s', assuming that it is " "just a MSP430 with no hardware multiply.\n" - "Use the -mcpu and -mhwmult options to set " - "these explicitly.", + "Use the %<-mcpu%> and %<-mhwmult%> options to " + "set these explicitly.", target_mcu); else warning (0, "Unrecognized MCU name '%s', assuming that it " - "has no hardware multiply.\nUse the -mhwmult " + "has no hardware multiply.\nUse the %<-mhwmult%> " "option to set this explicitly.", target_mcu); } @@ -852,8 +857,8 @@ msp430_option_override (void) if (msp430_warn_mcu) warning (0, "Unrecognized MCU name '%s', assuming that it just " - "supports the MSP430 ISA.\nUse the -mcpu option to " - "set the ISA explicitly.", + "supports the MSP430 ISA.\nUse the %<-mcpu%> option " + "to set the ISA explicitly.", target_mcu); msp430x = false; @@ -868,12 +873,12 @@ msp430_option_override (void) msp430x = true; if (TARGET_LARGE && !msp430x) - error ("-mlarge requires a 430X-compatible -mmcu="); + error ("%<-mlarge%> requires a 430X-compatible %<-mmcu=%>"); if (msp430_code_region == MSP430_REGION_UPPER && ! msp430x) - error ("-mcode-region=upper requires 430X-compatible cpu"); + error ("%<-mcode-region=upper%> requires 430X-compatible cpu"); if (msp430_data_region == MSP430_REGION_UPPER && ! msp430x) - error ("-mdata-region=upper requires 430X-compatible cpu"); + error ("%<-mdata-region=upper%> requires 430X-compatible cpu"); if (flag_exceptions || flag_non_call_exceptions || flag_unwind_tables || flag_asynchronous_unwind_tables) diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c index 283e189..8bee154 100644 --- a/gcc/config/nds32/nds32.c +++ b/gcc/config/nds32/nds32.c @@ -4141,7 +4141,7 @@ nds32_option_override (void) target_flags &= ~MASK_EXT_STRING; if (flag_pic) - error ("not support -fpic option for v3m toolchain"); + error ("not support %<-fpic%> option for v3m toolchain"); } /* See if we are using reduced-set registers: diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c index 1114022..1f00b8a 100644 --- a/gcc/config/nios2/nios2.c +++ b/gcc/config/nios2/nios2.c @@ -1193,7 +1193,8 @@ nios2_custom_check_insns (void) for (i = 0; i < ARRAY_SIZE (nios2_fpu_insn); i++) if (N2FPU_ENABLED_P (i) && N2FPU_UNSAFE_P (i)) warning (0, "switch %<-mcustom-%s%> has no effect unless " - "-funsafe-math-optimizations is specified", N2FPU_NAME (i)); + "%<-funsafe-math-optimizations%> is specified", + N2FPU_NAME (i)); /* Warn if the user is trying to use -mcustom-fmins et. al, that won't get used without -ffinite-math-only. See fold_builtin_fmin_fmax () @@ -1202,7 +1203,7 @@ nios2_custom_check_insns (void) for (i = 0; i < ARRAY_SIZE (nios2_fpu_insn); i++) if (N2FPU_ENABLED_P (i) && N2FPU_FINITE_P (i)) warning (0, "switch %<-mcustom-%s%> has no effect unless " - "-ffinite-math-only is specified", N2FPU_NAME (i)); + "%<-ffinite-math-only%> is specified", N2FPU_NAME (i)); /* Warn if the user is trying to use a custom rounding instruction that won't get used without -fno-math-errno. See @@ -1211,12 +1212,12 @@ nios2_custom_check_insns (void) for (i = 0; i < ARRAY_SIZE (nios2_fpu_insn); i++) if (N2FPU_ENABLED_P (i) && N2FPU_NO_ERRNO_P (i)) warning (0, "switch %<-mcustom-%s%> has no effect unless " - "-fno-math-errno is specified", N2FPU_NAME (i)); + "%<-fno-math-errno%> is specified", N2FPU_NAME (i)); if (errors || custom_code_conflict) fatal_error (input_location, - "conflicting use of -mcustom switches, target attributes, " - "and/or __builtin_custom_ functions"); + "conflicting use of %<-mcustom%> switches, target attributes, " + "and/or %<__builtin_custom_%> functions"); } static void @@ -1362,7 +1363,7 @@ nios2_option_override (void) sorry ("position-independent code requires the Linux ABI"); if (flag_pic && stack_limit_rtx && GET_CODE (stack_limit_rtx) == SYMBOL_REF) - sorry ("PIC support for -fstack-limit-symbol"); + sorry ("PIC support for %<-fstack-limit-symbol%>"); /* Function to allocate machine-dependent function status. */ init_machine_status = &nios2_init_machine_status; @@ -1384,11 +1385,11 @@ nios2_option_override (void) if (flag_pic) { if (nios2_gpopt_option != gpopt_none) - error ("-mgpopt not supported with PIC."); + error ("%<-mgpopt%> not supported with PIC."); if (nios2_gprel_sec) - error ("-mgprel-sec= not supported with PIC."); + error ("%<-mgprel-sec=%> not supported with PIC."); if (nios2_r0rel_sec) - error ("-mr0rel-sec= not supported with PIC."); + error ("%<-mr0rel-sec=%> not supported with PIC."); } /* Process -mgprel-sec= and -m0rel-sec=. */ @@ -1396,13 +1397,13 @@ nios2_option_override (void) { if (regcomp (&nios2_gprel_sec_regex, nios2_gprel_sec, REG_EXTENDED | REG_NOSUB)) - error ("-mgprel-sec= argument is not a valid regular expression."); + error ("%<-mgprel-sec=%> argument is not a valid regular expression."); } if (nios2_r0rel_sec) { if (regcomp (&nios2_r0rel_sec_regex, nios2_r0rel_sec, REG_EXTENDED | REG_NOSUB)) - error ("-mr0rel-sec= argument is not a valid regular expression."); + error ("%<-mr0rel-sec=%> argument is not a valid regular expression."); } /* If we don't have mul, we don't have mulx either! */ @@ -3699,7 +3700,7 @@ nios2_expand_custom_builtin (tree exp, unsigned int index, rtx target) { if (!custom_insn_opcode (value, VOIDmode)) error ("custom instruction opcode must be compile time " - "constant in the range 0-255 for __builtin_custom_%s", + "constant in the range 0-255 for %<__builtin_custom_%s%>", custom_builtin_name[index]); } else diff --git a/gcc/config/nvptx/mkoffload.c b/gcc/config/nvptx/mkoffload.c index 1ab6b091..3770f72 100644 --- a/gcc/config/nvptx/mkoffload.c +++ b/gcc/config/nvptx/mkoffload.c @@ -488,7 +488,8 @@ main (int argc, char **argv) verbose = true; } if (!(fopenacc ^ fopenmp)) - fatal_error (input_location, "either -fopenacc or -fopenmp must be set"); + fatal_error (input_location, "either %<-fopenacc%> or %<-fopenmp%> " + "must be set"); struct obstack argv_obstack; obstack_init (&argv_obstack); diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 424b43a..a28099a 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -194,7 +194,7 @@ static void diagnose_openacc_conflict (bool optval, const char *optname) { if (flag_openacc && optval) - error ("option %s is not supported together with -fopenacc", optname); + error ("option %s is not supported together with %<-fopenacc%>", optname); } /* Implement TARGET_OPTION_OVERRIDE. */ diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 5b83031..532046c 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -453,7 +453,7 @@ fix_range (const char *const_str) dash = strchr (str, '-'); if (!dash) { - warning (0, "value of -mfixed-range must have form REG1-REG2"); + warning (0, "value of %<-mfixed-range%> must have form REG1-REG2"); return; } *dash = '\0'; @@ -539,8 +539,8 @@ pa_option_override (void) if (! TARGET_GAS && write_symbols != NO_DEBUG) { - warning (0, "-g is only supported when using GAS on this processor,"); - warning (0, "-g option disabled"); + warning (0, "%<-g%> is only supported when using GAS on this processor,"); + warning (0, "%<-g%> option disabled"); write_symbols = NO_DEBUG; } @@ -554,8 +554,8 @@ pa_option_override (void) if (flag_reorder_blocks_and_partition) { inform (input_location, - "-freorder-blocks-and-partition does not work " - "on this architecture"); + "%<-freorder-blocks-and-partition%> does not work " + "on this architecture"); flag_reorder_blocks_and_partition = 0; flag_reorder_blocks = 1; } diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c index f8b608b..8881f80 100644 --- a/gcc/config/riscv/riscv.c +++ b/gcc/config/riscv/riscv.c @@ -329,7 +329,7 @@ riscv_parse_cpu (const char *cpu_string) if (strcmp (riscv_cpu_info_table[i].name, cpu_string) == 0) return riscv_cpu_info_table + i; - error ("unknown cpu %qs for -mtune", cpu_string); + error ("unknown cpu %qs for %<-mtune%>", cpu_string); return riscv_cpu_info_table; } @@ -4316,7 +4316,7 @@ riscv_option_override (void) if (TARGET_MUL && (target_flags_explicit & MASK_DIV) == 0) target_flags |= MASK_DIV; else if (!TARGET_MUL && TARGET_DIV) - error ("-mdiv requires -march to subsume the % extension"); + error ("%<-mdiv%> requires %<-march%> to subsume the % extension"); /* Likewise floating-point division and square root. */ if (TARGET_HARD_FLOAT && (target_flags_explicit & MASK_FDIV) == 0) @@ -4356,7 +4356,7 @@ riscv_option_override (void) /* Require that the ISA supports the requested floating-point ABI. */ if (UNITS_PER_FP_ARG > (TARGET_HARD_FLOAT ? UNITS_PER_FP_REG : 0)) - error ("requested ABI requires -march to subsume the %qc extension", + error ("requested ABI requires %<-march%> to subsume the %qc extension", UNITS_PER_FP_ARG > 8 ? 'Q' : (UNITS_PER_FP_ARG > 4 ? 'D' : 'F')); if (TARGET_RVE && riscv_abi != ABI_ILP32E) @@ -4364,7 +4364,7 @@ riscv_option_override (void) /* We do not yet support ILP32 on RV64. */ if (BITS_PER_WORD != POINTER_SIZE) - error ("ABI requires -march=rv%d", POINTER_SIZE); + error ("ABI requires %<-march=rv%d%>", POINTER_SIZE); /* Validate -mpreferred-stack-boundary= value. */ riscv_stack_boundary = ABI_STACK_BOUNDARY; @@ -4374,7 +4374,7 @@ riscv_option_override (void) int max = 8; if (!IN_RANGE (riscv_preferred_stack_boundary_arg, min, max)) - error ("-mpreferred-stack-boundary=%d must be between %d and %d", + error ("%<-mpreferred-stack-boundary=%d%> must be between %d and %d", riscv_preferred_stack_boundary_arg, min, max); riscv_stack_boundary = 8 << riscv_preferred_stack_boundary_arg; @@ -4387,8 +4387,8 @@ riscv_option_override (void) riscv_emit_attribute_p = 0; if (riscv_emit_attribute_p) - error ("-mriscv-attribute RISC-V ELF attribute requires GNU as 2.32" - " [-mriscv-attribute]"); + error ("%<-mriscv-attribute%> RISC-V ELF attribute requires GNU as 2.32" + " [%<-mriscv-attribute%>]"); #endif } diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c index baf9b45..c127c50 100644 --- a/gcc/config/rl78/rl78.c +++ b/gcc/config/rl78/rl78.c @@ -372,7 +372,7 @@ rl78_option_override (void) /* Compiling with -flto results in a language of GNU GIMPLE being used... */ && strcmp (lang_hooks.name, "GNU GIMPLE")) /* Address spaces are currently only supported by C. */ - error ("-mes0 can only be used with C"); + error ("%<-mes0%> can only be used with C"); if (TARGET_SAVE_MDUC_REGISTERS && !(TARGET_G13 || RL78_MUL_G13)) warning (0, "mduc registers only saved for G13 target"); @@ -390,8 +390,10 @@ rl78_option_override (void) { case MUL_UNINIT: rl78_mul_type = MUL_NONE; break; case MUL_NONE: break; - case MUL_G13: error ("-mmul=g13 cannot be used with -mcpu=g10"); break; - case MUL_G14: error ("-mmul=g14 cannot be used with -mcpu=g10"); break; + case MUL_G13: error ("%<-mmul=g13%> cannot be used with " + "%<-mcpu=g10%>"); break; + case MUL_G14: error ("%<-mmul=g14%> cannot be used with " + "%<-mcpu=g10%>"); break; } break; @@ -402,7 +404,8 @@ rl78_option_override (void) case MUL_NONE: break; case MUL_G13: break; /* The S2 core does not have mul/div instructions. */ - case MUL_G14: error ("-mmul=g14 cannot be used with -mcpu=g13"); break; + case MUL_G14: error ("%<-mmul=g14%> cannot be used with " + "%<-mcpu=g13%>"); break; } break; @@ -414,7 +417,8 @@ rl78_option_override (void) case MUL_G14: break; /* The G14 core does not have the hardware multiply peripheral used by the G13 core, hence you cannot use G13 multipliy routines on G14 hardware. */ - case MUL_G13: error ("-mmul=g13 cannot be used with -mcpu=g14"); break; + case MUL_G13: error ("%<-mmul=g13%> cannot be used with " + "%<-mcpu=g14%>"); break; } break; } diff --git a/gcc/config/rs6000/aix61.h b/gcc/config/rs6000/aix61.h index bdd9c6a..57ea9ec 100644 --- a/gcc/config/rs6000/aix61.h +++ b/gcc/config/rs6000/aix61.h @@ -27,7 +27,7 @@ do { \ if (TARGET_64BIT && ! TARGET_POWERPC64) \ { \ rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ - warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \ + warning (0, "%<-maix64%> requires PowerPC64 architecture remain enabled"); \ } \ if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128) \ { \ @@ -37,14 +37,14 @@ do { \ } \ if (TARGET_POWERPC64 && ! TARGET_64BIT) \ { \ - error ("-maix64 required: 64-bit computation with 32-bit addressing not yet supported"); \ + error ("%<-maix64%> required: 64-bit computation with 32-bit addressing not yet supported"); \ } \ if ((rs6000_isa_flags_explicit \ & OPTION_MASK_MINIMAL_TOC) != 0) \ { \ if (global_options_set.x_rs6000_current_cmodel \ && rs6000_current_cmodel != CMODEL_SMALL) \ - error ("-mcmodel incompatible with other toc options"); \ + error ("%<-mcmodel%> incompatible with other toc options"); \ SET_CMODEL (CMODEL_SMALL); \ } \ if (rs6000_current_cmodel != CMODEL_SMALL) \ diff --git a/gcc/config/rs6000/aix71.h b/gcc/config/rs6000/aix71.h index d4170c5..b30e719 100644 --- a/gcc/config/rs6000/aix71.h +++ b/gcc/config/rs6000/aix71.h @@ -27,7 +27,7 @@ do { \ if (TARGET_64BIT && ! TARGET_POWERPC64) \ { \ rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ - warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \ + warning (0, "%<-maix64%> requires PowerPC64 architecture remain enabled"); \ } \ if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128) \ { \ @@ -37,14 +37,14 @@ do { \ } \ if (TARGET_POWERPC64 && ! TARGET_64BIT) \ { \ - error ("-maix64 required: 64-bit computation with 32-bit addressing not yet supported"); \ + error ("%<-maix64%> required: 64-bit computation with 32-bit addressing not yet supported"); \ } \ if ((rs6000_isa_flags_explicit \ & OPTION_MASK_MINIMAL_TOC) != 0) \ { \ if (global_options_set.x_rs6000_current_cmodel \ && rs6000_current_cmodel != CMODEL_SMALL) \ - error ("-mcmodel incompatible with other toc options"); \ + error ("%<-mcmodel%> incompatible with other toc options"); \ SET_CMODEL (CMODEL_SMALL); \ } \ if (rs6000_current_cmodel != CMODEL_SMALL) \ diff --git a/gcc/config/rs6000/aix72.h b/gcc/config/rs6000/aix72.h index 9d79e72..9f02aea 100644 --- a/gcc/config/rs6000/aix72.h +++ b/gcc/config/rs6000/aix72.h @@ -27,7 +27,7 @@ do { \ if (TARGET_64BIT && ! TARGET_POWERPC64) \ { \ rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ - warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \ + warning (0, "%<-maix64%> requires PowerPC64 architecture remain enabled"); \ } \ if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128) \ { \ @@ -37,14 +37,14 @@ do { \ } \ if (TARGET_POWERPC64 && ! TARGET_64BIT) \ { \ - error ("-maix64 required: 64-bit computation with 32-bit addressing not yet supported"); \ + error ("%<-maix64%> required: 64-bit computation with 32-bit addressing not yet supported"); \ } \ if ((rs6000_isa_flags_explicit \ & OPTION_MASK_MINIMAL_TOC) != 0) \ { \ if (global_options_set.x_rs6000_current_cmodel \ && rs6000_current_cmodel != CMODEL_SMALL) \ - error ("-mcmodel incompatible with other toc options"); \ + error ("%<-mcmodel%> incompatible with other toc options"); \ SET_CMODEL (CMODEL_SMALL); \ } \ if (rs6000_current_cmodel != CMODEL_SMALL) \ diff --git a/gcc/config/rs6000/driver-rs6000.c b/gcc/config/rs6000/driver-rs6000.c index 9368a53..b290eea 100644 --- a/gcc/config/rs6000/driver-rs6000.c +++ b/gcc/config/rs6000/driver-rs6000.c @@ -265,7 +265,8 @@ elf_platform (void) candidates_list_and_hint (cpu, s, candidates); fatal_error ( input_location, - "Unsupported cpu name returned from kernel for -mcpu=native: %s\n" + "Unsupported cpu name returned from kernel for " + "%<-mcpu=native%>: %s\n" "Please use an explicit cpu name. Valid cpu names are: %s", cpu, s); } diff --git a/gcc/config/rs6000/freebsd64.h b/gcc/config/rs6000/freebsd64.h index d1f1d61..7e819d1 100644 --- a/gcc/config/rs6000/freebsd64.h +++ b/gcc/config/rs6000/freebsd64.h @@ -95,7 +95,7 @@ extern int dot_symbols; { \ rs6000_current_abi = ABI_ELFv2; \ if (dot_symbols) \ - error ("-mcall-aixdesc incompatible with -mabi=elfv2"); \ + error ("%<-mcall-aixdesc%> incompatible with %<-mabi=elfv2%>"); \ } \ if (rs6000_isa_flags & OPTION_MASK_EABI) \ { \ @@ -110,14 +110,14 @@ extern int dot_symbols; if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0) \ { \ rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ - error ("-m64 requires a PowerPC64 cpu"); \ + error ("%<-m64%> requires a PowerPC64 cpu"); \ } \ if ((rs6000_isa_flags_explicit \ & OPTION_MASK_MINIMAL_TOC) != 0) \ { \ if (global_options_set.x_rs6000_current_cmodel \ && rs6000_current_cmodel != CMODEL_SMALL) \ - error ("-mcmodel incompatible with other toc options"); \ + error ("%<-mcmodel%> incompatible with other toc options"); \ SET_CMODEL (CMODEL_SMALL); \ } \ else \ diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index df1d8a9..5380f6a 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -112,7 +112,7 @@ extern int dot_symbols; { \ rs6000_current_abi = ABI_ELFv2; \ if (dot_symbols) \ - error ("-mcall-aixdesc incompatible with -mabi=elfv2"); \ + error ("%<-mcall-aixdesc%> incompatible with %<-mabi=elfv2%>"); \ } \ if (rs6000_isa_flags & OPTION_MASK_RELOCATABLE) \ { \ @@ -132,14 +132,14 @@ extern int dot_symbols; if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0) \ { \ rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ - error ("-m64 requires a PowerPC64 cpu"); \ + error ("%<-m64%> requires a PowerPC64 cpu"); \ } \ if ((rs6000_isa_flags_explicit \ & OPTION_MASK_MINIMAL_TOC) != 0) \ { \ if (global_options_set.x_rs6000_current_cmodel \ && rs6000_current_cmodel != CMODEL_SMALL) \ - error ("-mcmodel incompatible with other toc options"); \ + error ("%<-mcmodel incompatible with other toc options%>"); \ SET_CMODEL (CMODEL_SMALL); \ } \ else \ diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index d72a51a..a21f4f7 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3992,7 +3992,7 @@ rs6000_option_override_internal (bool global_init_p) if (!TARGET_HARD_FLOAT) { if (rs6000_isa_flags_explicit & OPTION_MASK_VSX) - msg = N_("-mvsx requires hardware floating point"); + msg = N_("%<-mvsx%> requires hardware floating point"); else { rs6000_isa_flags &= ~ OPTION_MASK_VSX; @@ -4000,14 +4000,14 @@ rs6000_option_override_internal (bool global_init_p) } } else if (TARGET_AVOID_XFORM > 0) - msg = N_("-mvsx needs indexed addressing"); + msg = N_("%<-mvsx%> needs indexed addressing"); else if (!TARGET_ALTIVEC && (rs6000_isa_flags_explicit & OPTION_MASK_ALTIVEC)) { if (rs6000_isa_flags_explicit & OPTION_MASK_VSX) - msg = N_("-mvsx and -mno-altivec are incompatible"); + msg = N_("%<-mvsx%> and %<-mno-altivec%> are incompatible"); else - msg = N_("-mno-altivec disables vsx"); + msg = N_("%<-mno-altivec%> disables vsx"); } if (msg) @@ -4133,10 +4133,10 @@ rs6000_option_override_internal (bool global_init_p) if ((TARGET_QUAD_MEMORY || TARGET_QUAD_MEMORY_ATOMIC) && !TARGET_POWERPC64) { if ((rs6000_isa_flags_explicit & OPTION_MASK_QUAD_MEMORY) != 0) - warning (0, N_("-mquad-memory requires 64-bit mode")); + warning (0, N_("%<-mquad-memory%> requires 64-bit mode")); if ((rs6000_isa_flags_explicit & OPTION_MASK_QUAD_MEMORY_ATOMIC) != 0) - warning (0, N_("-mquad-memory-atomic requires 64-bit mode")); + warning (0, N_("%<-mquad-memory-atomic%> requires 64-bit mode")); rs6000_isa_flags &= ~(OPTION_MASK_QUAD_MEMORY | OPTION_MASK_QUAD_MEMORY_ATOMIC); @@ -4148,7 +4148,7 @@ rs6000_option_override_internal (bool global_init_p) if (TARGET_QUAD_MEMORY && !WORDS_BIG_ENDIAN) { if ((rs6000_isa_flags_explicit & OPTION_MASK_QUAD_MEMORY) != 0) - warning (0, N_("-mquad-memory is not available in little endian " + warning (0, N_("%<-mquad-memory%> is not available in little endian " "mode")); rs6000_isa_flags &= ~OPTION_MASK_QUAD_MEMORY; @@ -4338,7 +4338,7 @@ rs6000_option_override_internal (bool global_init_p) if (!TARGET_VSX) { if ((rs6000_isa_flags_explicit & OPTION_MASK_FLOAT128_KEYWORD) != 0) - error ("%qs requires VSX support", "-mfloat128"); + error ("%qs requires VSX support", "%<-mfloat128%>"); TARGET_FLOAT128_TYPE = 0; rs6000_isa_flags &= ~(OPTION_MASK_FLOAT128_KEYWORD @@ -4347,7 +4347,7 @@ rs6000_option_override_internal (bool global_init_p) else if (!TARGET_FLOAT128_TYPE) { TARGET_FLOAT128_TYPE = 1; - warning (0, "The -mfloat128 option may not be fully supported"); + warning (0, "The %<-mfloat128%> option may not be fully supported"); } } @@ -4370,7 +4370,7 @@ rs6000_option_override_internal (bool global_init_p) && (rs6000_isa_flags & ISA_3_0_MASKS_IEEE) != ISA_3_0_MASKS_IEEE) { if ((rs6000_isa_flags_explicit & OPTION_MASK_FLOAT128_HW) != 0) - error ("%qs requires full ISA 3.0 support", "-mfloat128-hardware"); + error ("%qs requires full ISA 3.0 support", "%<-mfloat128-hardware%>"); rs6000_isa_flags &= ~OPTION_MASK_FLOAT128_HW; } @@ -4378,7 +4378,7 @@ rs6000_option_override_internal (bool global_init_p) if (TARGET_FLOAT128_HW && !TARGET_64BIT) { if ((rs6000_isa_flags_explicit & OPTION_MASK_FLOAT128_HW) != 0) - error ("%qs requires %qs", "-mfloat128-hardware", "-m64"); + error ("%qs requires %qs", "%<-mfloat128-hardware%>", "-m64"); rs6000_isa_flags &= ~OPTION_MASK_FLOAT128_HW; } @@ -13346,7 +13346,7 @@ rs6000_expand_zeroop_builtin (enum insn_code icode, rtx target) if (icode == CODE_FOR_rs6000_mffsl && rs6000_isa_flags & OPTION_MASK_SOFT_FLOAT) { - error ("__builtin_mffsl() not supported with -msoft-float"); + error ("%<__builtin_mffsl%> not supported with %<-msoft-float%>"); return const0_rtx; } @@ -13418,7 +13418,8 @@ rs6000_expand_mtfsb_builtin (enum insn_code icode, tree exp) if (rs6000_isa_flags & OPTION_MASK_SOFT_FLOAT) { - error ("__builtin_mtfsb0 and __builtin_mtfsb1 not supported with -msoft-float"); + error ("%<__builtin_mtfsb0%> and %<__builtin_mtfsb1%> not supported with " + "%<-msoft-float%>"); return const0_rtx; } @@ -13455,7 +13456,7 @@ rs6000_expand_set_fpscr_rn_builtin (enum insn_code icode, tree exp) if (rs6000_isa_flags & OPTION_MASK_SOFT_FLOAT) { - error ("__builtin_set_fpscr_rn not supported with -msoft-float"); + error ("%<__builtin_set_fpscr_rn%> not supported with %<-msoft-float%>"); return const0_rtx; } @@ -13495,11 +13496,12 @@ rs6000_expand_set_fpscr_drn_builtin (enum insn_code icode, tree exp) if (TARGET_32BIT) /* Builtin not supported in 32-bit mode. */ fatal_error (input_location, - "__builtin_set_fpscr_drn is not supported in 32-bit mode."); + "%<__builtin_set_fpscr_drn%> is not supported " + "in 32-bit mode."); if (rs6000_isa_flags & OPTION_MASK_SOFT_FLOAT) { - error ("__builtin_set_fpscr_drn not supported with -msoft-float"); + error ("%<__builtin_set_fpscr_drn%> not supported with %<-msoft-float%>"); return const0_rtx; } @@ -15236,7 +15238,8 @@ rs6000_invalid_builtin (enum rs6000_builtins fncode) error ("builtin function %qs requires ISA 3.0 IEEE 128-bit floating point", name); else if ((fnmask & RS6000_BTM_FLOAT128) != 0) - error ("builtin function %qs requires the %qs option", name, "-mfloat128"); + error ("builtin function %qs requires the %qs option", name, + "%<-mfloat128%>"); else if ((fnmask & (RS6000_BTM_POPCNTD | RS6000_BTM_POWERPC64)) == (RS6000_BTM_POPCNTD | RS6000_BTM_POWERPC64)) error ("builtin function %qs requires the %qs (or newer), and " @@ -29320,7 +29323,7 @@ rs6000_expand_split_stack_prologue (void) if (global_regs[29]) { - error ("%qs uses register r29", "-fsplit-stack"); + error ("%qs uses register r29", "%<-fsplit-stack%>"); inform (DECL_SOURCE_LOCATION (global_regs_decl[29]), "conflicts with %qD", global_regs_decl[29]); } @@ -29328,7 +29331,8 @@ rs6000_expand_split_stack_prologue (void) allocate = info->total_size; if (allocate > (unsigned HOST_WIDE_INT) 1 << 31) { - sorry ("Stack frame larger than 2G is not supported for -fsplit-stack"); + sorry ("Stack frame larger than 2G is not supported for " + "%<-fsplit-stack%>"); return; } if (morestack_ref == NULL_RTX) diff --git a/gcc/config/rs6000/rtems.h b/gcc/config/rs6000/rtems.h index f143781..401077d 100644 --- a/gcc/config/rs6000/rtems.h +++ b/gcc/config/rs6000/rtems.h @@ -111,14 +111,14 @@ if ((rs6000_isa_flags & OPTION_MASK_POWERPC64) == 0) \ { \ rs6000_isa_flags |= OPTION_MASK_POWERPC64; \ - error ("-m64 requires a PowerPC64 cpu"); \ + error ("%<-m64%> requires a PowerPC64 cpu"); \ } \ if ((rs6000_isa_flags_explicit \ & OPTION_MASK_MINIMAL_TOC) != 0) \ { \ if (global_options_set.x_rs6000_current_cmodel \ && rs6000_current_cmodel != CMODEL_SMALL) \ - error ("-mcmodel incompatible with other toc options"); \ + error ("%<-mcmodel%> incompatible with other toc options"); \ SET_CMODEL (CMODEL_SMALL); \ } \ else \ diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c index 5f422ed..dac05db 100644 --- a/gcc/config/rx/rx.c +++ b/gcc/config/rx/rx.c @@ -2593,9 +2593,9 @@ valid_psw_flag (rtx op, const char *which) return 1; } - error ("__builtin_rx_%s takes 'C', 'Z', 'S', 'O', 'I', or 'U'", which); + error ("%<__builtin_rx_%s%> takes 'C', 'Z', 'S', 'O', 'I', or 'U'", which); if (!mvtc_inform_done) - error ("use __builtin_rx_mvtc (0, ... ) to write arbitrary values to PSW"); + error ("use %<__builtin_rx_mvtc%> (0, ... ) to write arbitrary values to PSW"); mvtc_inform_done = 1; return 0; @@ -2642,7 +2642,8 @@ rx_expand_builtin (tree exp, if (rx_allow_string_insns) emit_insn (gen_rmpa ()); else - error ("-mno-allow-string-insns forbids the generation of the RMPA instruction"); + error ("%<-mno-allow-string-insns%> forbids the generation " + "of the RMPA instruction"); return NULL_RTX; case RX_BUILTIN_MVFC: return rx_expand_builtin_mvfc (arg, target); case RX_BUILTIN_MVTC: return rx_expand_builtin_mvtc (exp); diff --git a/gcc/config/s390/s390-c.c b/gcc/config/s390/s390-c.c index d2fb7ba..aafe346e 100644 --- a/gcc/config/s390/s390-c.c +++ b/gcc/config/s390/s390-c.c @@ -889,7 +889,7 @@ s390_resolve_overloaded_builtin (location_t loc, if (!TARGET_VX && (ob_flags & B_VX)) { - error_at (loc, "%qF requires -mvx", ob_fndecl); + error_at (loc, "%qF requires %<-mvx%>", ob_fndecl); return error_mark_node; } diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index b80d5e8..23255ef 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -799,14 +799,14 @@ s390_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, bflags = bflags_for_builtin (fcode); if ((bflags & B_HTM) && !TARGET_HTM) { - error ("builtin %qF is not supported without -mhtm " - "(default with -march=zEC12 and higher).", fndecl); + error ("builtin %qF is not supported without %<-mhtm%> " + "(default with %<-march=zEC12%> and higher).", fndecl); return const0_rtx; } if (((bflags & B_VX) || (bflags & B_VXE)) && !TARGET_VX) { - error ("builtin %qF requires -mvx " - "(default with -march=z13 and higher).", fndecl); + error ("builtin %qF requires %<-mvx%> " + "(default with %<-march=z13%> and higher).", fndecl); return const0_rtx; } @@ -12656,7 +12656,7 @@ s390_function_profiler (FILE *file, int labelno) output_asm_nops ("-mnop-mcount", /* brasl */ 3); else if (cfun->static_chain_decl) warning (OPT_Wcannot_profile, "nested functions cannot be profiled " - "with -mfentry on s390"); + "with %<-mfentry%> on s390"); else output_asm_insn ("brasl\t0,%4", op); } @@ -14829,7 +14829,7 @@ s390_option_override_internal (struct gcc_options *opts, || opts->x_s390_function_return == indirect_branch_thunk_inline || opts->x_s390_function_return_reg == indirect_branch_thunk_inline || opts->x_s390_function_return_mem == indirect_branch_thunk_inline) - error ("thunk-inline is only supported with -mindirect-branch-jump"); + error ("thunk-inline is only supported with %<-mindirect-branch-jump%>"); if (opts->x_s390_indirect_branch != indirect_branch_keep) { @@ -14867,7 +14867,8 @@ s390_option_override_internal (struct gcc_options *opts, error ("hardware vector support not available on %s", processor_table[(int)opts->x_s390_arch].name); if (TARGET_SOFT_FLOAT_P (opts->x_target_flags)) - error ("hardware vector support not available with -msoft-float"); + error ("hardware vector support not available with " + "%<-msoft-float%>"); } } else @@ -14911,7 +14912,8 @@ s390_option_override_internal (struct gcc_options *opts, { if (TARGET_HARD_DFP_P (opts_set->x_target_flags) && TARGET_HARD_DFP_P (opts->x_target_flags)) - error ("-mhard-dfp can%'t be used in conjunction with -msoft-float"); + error ("%<-mhard-dfp%> can%'t be used in conjunction with " + "%<-msoft-float%>"); opts->x_target_flags &= ~MASK_HARD_DFP; } @@ -14919,8 +14921,8 @@ s390_option_override_internal (struct gcc_options *opts, if (TARGET_BACKCHAIN_P (opts->x_target_flags) && TARGET_PACKED_STACK_P (opts->x_target_flags) && TARGET_HARD_FLOAT_P (opts->x_target_flags)) - error ("-mbackchain -mpacked-stack -mhard-float are not supported " - "in combination"); + error ("%<-mbackchain%> %<-mpacked-stack%> %<-mhard-float%> are not " + "supported in combination"); if (opts->x_s390_stack_size) { @@ -14930,7 +14932,7 @@ s390_option_override_internal (struct gcc_options *opts, error ("stack size must not be greater than 64k"); } else if (opts->x_s390_stack_guard) - error ("-mstack-guard implies use of -mstack-size"); + error ("%<-mstack-guard%> implies use of %<-mstack-size%>"); /* Our implementation of the stack probe requires the probe interval to be used as displacement in an address operand. The maximum @@ -15007,7 +15009,7 @@ s390_option_override_internal (struct gcc_options *opts, because 31-bit PLT stubs assume that %r12 contains GOT address, which is not the case when the code runs before the prolog. */ if (opts->x_flag_fentry && !TARGET_64BIT) - error ("-mfentry is supported only for 64-bit CPUs"); + error ("%<-mfentry%> is supported only for 64-bit CPUs"); } static void @@ -15080,7 +15082,8 @@ s390_option_override (void) flag_prefetch_loop_arrays = 1; if (!s390_pic_data_is_text_relative && !flag_pic) - error ("-mno-pic-data-is-text-relative cannot be used without -fpic/-fPIC"); + error ("%<-mno-pic-data-is-text-relative%> cannot be used without " + "%<-fpic%>/%<-fPIC%>"); if (TARGET_TPF) { diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index fcb7cff..8dc79a7 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -933,7 +933,7 @@ sh_option_override (void) else if (flag_exceptions) { if (flag_schedule_insns && global_options_set.x_flag_schedule_insns) - warning (0, "ignoring -fschedule-insns because of exception " + warning (0, "ignoring %<-fschedule-insns%> because of exception " "handling bug"); flag_schedule_insns = 0; } @@ -951,7 +951,7 @@ sh_option_override (void) && flag_omit_frame_pointer && !TARGET_ACCUMULATE_OUTGOING_ARGS) { warning (0, "unwind tables currently require either a frame pointer " - "or -maccumulate-outgoing-args for correctness"); + "or %<-maccumulate-outgoing-args%> for correctness"); TARGET_ACCUMULATE_OUTGOING_ARGS = 1; } @@ -7413,7 +7413,7 @@ sh_builtin_saveregs (void) if (!TARGET_FPU_ANY) { - error ("__builtin_saveregs not supported by this subtarget"); + error ("%<__builtin_saveregs%> not supported by this subtarget"); return const0_rtx; } @@ -8279,7 +8279,7 @@ sh_fix_range (const char *const_str) char* dash = strchr (str, '-'); if (!dash) { - warning (0, "value of -mfixed-range must have form REG1-REG2"); + warning (0, "value of %<-mfixed-range%> must have form REG1-REG2"); return; } *dash = '\0'; diff --git a/gcc/config/sh/vxworks.h b/gcc/config/sh/vxworks.h index 342c639..1ea24e0 100644 --- a/gcc/config/sh/vxworks.h +++ b/gcc/config/sh/vxworks.h @@ -40,7 +40,7 @@ along with GCC; see the file COPYING3. If not see appear in shared libraries, so relaxation is OK \ for RTP PIC. */ \ if (TARGET_RELAX && !(TARGET_VXWORKS_RTP && flag_pic)) \ - error ("-mrelax is only supported for RTP PIC"); \ + error ("%<-mrelax%> is only supported for RTP PIC"); \ } \ while (0) diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 7991bc2..93479ab 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -1740,7 +1740,7 @@ sparc_option_override (void) else if (! strcmp (q, "options")) mask = MASK_DEBUG_OPTIONS; else - error ("unknown -mdebug-%s switch", q); + error ("unknown %<-mdebug-%s%> switch", q); if (invert) sparc_debug &= ~mask; @@ -1774,7 +1774,7 @@ sparc_option_override (void) /* We force all 64bit archs to use 128 bit long double */ if (TARGET_ARCH64 && !TARGET_LONG_DOUBLE_128) { - error ("-mlong-double-64 not allowed with -m64"); + error ("%<-mlong-double-64%> not allowed with %<-m64%>"); target_flags |= MASK_LONG_DOUBLE_128; } @@ -1782,7 +1782,7 @@ sparc_option_override (void) for (i = 8; i < 16; i++) if (!call_used_regs [i]) { - error ("-fcall-saved-REG is not supported for out registers"); + error ("%<-fcall-saved-REG%> is not supported for out registers"); call_used_regs [i] = 1; } @@ -1906,7 +1906,7 @@ sparc_option_override (void) if (global_options_set.x_sparc_code_model) { if (TARGET_ARCH32) - error ("-mcmodel= is not supported in 32-bit mode"); + error ("%<-mcmodel=%> is not supported in 32-bit mode"); } else { diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index 8158584..8d7439e 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -259,7 +259,7 @@ spu_option_override (void) else if (strcmp (&spu_arch_string[0], "celledp") == 0) spu_arch = PROCESSOR_CELLEDP; else - error ("bad value (%s) for -march= switch", spu_arch_string); + error ("bad value (%s) for %<-march=%> switch", spu_arch_string); } /* Determine processor to tune for. */ @@ -270,7 +270,7 @@ spu_option_override (void) else if (strcmp (&spu_tune_string[0], "celledp") == 0) spu_tune = PROCESSOR_CELLEDP; else - error ("bad value (%s) for -mtune= switch", spu_tune_string); + error ("bad value (%s) for %<-mtune=%> switch", spu_tune_string); } /* Change defaults according to the processor architecture. */ @@ -4917,7 +4917,7 @@ fix_range (const char *const_str) dash = strchr (str, '-'); if (!dash) { - warning (0, "value of -mfixed-range must have form REG1-REG2"); + warning (0, "value of %<-mfixed-range%> must have form REG1-REG2"); return; } *dash = '\0'; diff --git a/gcc/config/visium/visium.c b/gcc/config/visium/visium.c index 67bc2d6..431f64c 100644 --- a/gcc/config/visium/visium.c +++ b/gcc/config/visium/visium.c @@ -419,9 +419,9 @@ static void visium_option_override (void) { if (flag_pic == 1) - warning (OPT_fpic, "-fpic is not supported"); + warning (OPT_fpic, "%<-fpic%> is not supported"); if (flag_pic == 2) - warning (OPT_fPIC, "-fPIC is not supported"); + warning (OPT_fPIC, "%<-fPIC%> is not supported"); /* MCM is the default in the GR5/GR6 era. */ target_flags |= MASK_MCM; @@ -728,7 +728,7 @@ visium_handle_interrupt_attr (tree *node, tree name, } else if (!TARGET_SV_MODE) { - error ("an interrupt handler cannot be compiled with -muser-mode"); + error ("an interrupt handler cannot be compiled with %<-muser-mode%>"); *no_add_attrs = true; } diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index f766764..19bd616 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -2256,7 +2256,7 @@ xtensa_option_override (void) /* Check PIC settings. PIC is only supported when using L32R instructions, and some targets need to always use PIC. */ if (flag_pic && TARGET_CONST16) - error ("-f%s is not supported with CONST16 instructions", + error ("%<-f%s%> is not supported with CONST16 instructions", (flag_pic > 1 ? "PIC" : "pic")); else if (TARGET_FORCE_NO_PIC) flag_pic = 0; diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2d58add..fd98347 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,53 @@ +2019-03-11 Martin Liska + + * call.c (convert_arg_to_ellipsis): Wrap an option name + in a string format message and fix GNU coding style. + (build_over_call): Likewise. + * class.c (check_field_decl): Likewise. + (layout_nonempty_base_or_field): Likewise. + * constexpr.c (cxx_eval_loop_expr): Likewise. + * cvt.c (type_promotes_to): Likewise. + * decl.c (cxx_init_decl_processing): Likewise. + (mark_inline_variable): Likewise. + (grokdeclarator): Likewise. + * decl2.c (record_mangling): Likewise. + * error.c (maybe_warn_cpp0x): Likewise. + * except.c (doing_eh): Likewise. + * mangle.c (maybe_check_abi_tags): Likewise. + * parser.c (cp_parser_diagnose_invalid_type_name): Likewise. + (cp_parser_userdef_numeric_literal): Likewise. + (cp_parser_primary_expression): Likewise. + (cp_parser_unqualified_id): Likewise. + (cp_parser_pseudo_destructor_name): Likewise. + (cp_parser_builtin_offsetof): Likewise. + (cp_parser_lambda_expression): Likewise. + (cp_parser_lambda_introducer): Likewise. + (cp_parser_lambda_declarator_opt): Likewise. + (cp_parser_selection_statement): Likewise. + (cp_parser_init_statement): Likewise. + (cp_parser_decomposition_declaration): Likewise. + (cp_parser_function_specifier_opt): Likewise. + (cp_parser_static_assert): Likewise. + (cp_parser_simple_type_specifier): Likewise. + (cp_parser_namespace_definition): Likewise. + (cp_parser_using_declaration): Likewise. + (cp_parser_ctor_initializer_opt_and_function_body): Likewise. + (cp_parser_initializer_list): Likewise. + (cp_parser_type_parameter_key): Likewise. + (cp_parser_member_declaration): Likewise. + (cp_parser_try_block): Likewise. + (cp_parser_std_attribute_spec): Likewise. + (cp_parser_requires_clause_opt): Likewise. + * pt.c (check_template_variable): Likewise. + (check_default_tmpl_args): Likewise. + (push_tinst_level_loc): Likewise. + (instantiate_pending_templates): Likewise. + (invalid_nontype_parm_type_p): Likewise. + * repo.c (get_base_filename): Likewise. + * rtti.c (typeid_ok_p): Likewise. + (build_dynamic_cast_1): Likewise. + * tree.c (maybe_warn_parm_abi): Likewise. + 2019-03-08 Jakub Jelinek PR other/80058 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index c50d9c8..98aa5ee 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -7499,7 +7499,7 @@ convert_arg_to_ellipsis (tree arg, tsubst_flags_t complain) && TYPE_MODE (TREE_TYPE (prom)) != TYPE_MODE (arg_type) && (complain & tf_warning)) warning_at (loc, OPT_Wabi, "scoped enum %qT passed through ... as " - "%qT before -fabi-version=6, %qT after", arg_type, + "%qT before %<-fabi-version=6%>, %qT after", arg_type, TREE_TYPE (prom), ENUM_UNDERLYING_TYPE (arg_type)); if (!abi_version_at_least (6)) arg = prom; @@ -8335,7 +8335,8 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) pedwarn (DECL_SOURCE_LOCATION (cand->fn), 0, " in call to %qD", cand->fn); pedwarn (input_location, 0, - " (you can disable this with -fno-deduce-init-list)"); + " (you can disable this with " + "%<-fno-deduce-init-list%>)"); } } diff --git a/gcc/cp/class.c b/gcc/cp/class.c index a70a852..712169c 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -3330,7 +3330,7 @@ check_field_decl (tree field, if (!warned && errorcount > oldcount) { inform (DECL_SOURCE_LOCATION (field), "unrestricted unions " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); warned = true; } } @@ -4143,11 +4143,12 @@ layout_nonempty_base_or_field (record_layout_info rli, { if (abi_version_at_least (9)) warning_at (DECL_SOURCE_LOCATION (decl), OPT_Wabi, - "alignment of %qD increased in -fabi-version=9 " + "alignment of %qD increased in %<-fabi-version=9%> " "(GCC 5.2)", decl); else warning_at (DECL_SOURCE_LOCATION (decl), OPT_Wabi, "alignment " - "of %qD will increase in -fabi-version=9", decl); + "of %qD will increase in %<-fabi-version=9%>", + decl); } break; } diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 783d1fc..b2b575d 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -4243,7 +4243,7 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t, if (!ctx->quiet) error_at (cp_expr_loc_or_loc (t, input_location), "% loop iteration count exceeds limit of %d " - "(use -fconstexpr-loop-limit= to increase the limit)", + "(use %<-fconstexpr-loop-limit=%> to increase the limit)", constexpr_loop_limit); *non_constant_p = true; break; diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 82a44f3..c10db92 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -1923,7 +1923,7 @@ type_promotes_to (tree type) if (abi_version_crosses (6) && TYPE_MODE (prom) != TYPE_MODE (type)) warning (OPT_Wabi, "scoped enum %qT passed through ... as " - "%qT before -fabi-version=6, %qT after", + "%qT before %<-fabi-version=6%>, %qT after", type, prom, ENUM_UNDERLYING_TYPE (type)); if (!abi_version_at_least (6)) type = prom; diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 081f37c..89edfe8 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4267,7 +4267,8 @@ cxx_init_decl_processing (void) if (aligned_new_threshold > 1 && !pow2p_hwi (aligned_new_threshold)) { - error ("-faligned-new=%d is not a power of two", aligned_new_threshold); + error ("%<-faligned-new=%d%> is not a power of two", + aligned_new_threshold); aligned_new_threshold = 1; } if (aligned_new_threshold == -1) @@ -10170,7 +10171,7 @@ mark_inline_variable (tree decl, location_t loc) } else if (cxx_dialect < cxx17) pedwarn (loc, 0, "inline variables are only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); if (inlinep) { retrofit_lang_decl (decl); @@ -10963,8 +10964,8 @@ grokdeclarator (const cp_declarator *declarator, gcc_rich_location richloc (declspecs->locations[ds_virtual]); richloc.add_range (declspecs->locations[ds_constexpr]); pedwarn (&richloc, OPT_Wpedantic, "member %qD can be declared both " - "% and % only in -std=c++2a or " - "-std=gnu++2a", dname); + "% and % only in %<-std=c++2a%> or " + "%<-std=gnu++2a%>", dname); } } friendp = decl_spec_seq_has_spec_p (declspecs, ds_friend); @@ -11331,7 +11332,7 @@ grokdeclarator (const cp_declarator *declarator, "trailing return type", name); inform (typespec_loc, "deduced return type only available " - "with -std=c++14 or -std=gnu++14"); + "with %<-std=c++14%> or %<-std=gnu++14%>"); } else if (virtualp) { @@ -11402,7 +11403,7 @@ grokdeclarator (const cp_declarator *declarator, always be an error. */ error_at (typespec_loc, "trailing return type only available " - "with -std=c++11 or -std=gnu++11"); + "with %<-std=c++11%> or %<-std=gnu++11%>"); else error_at (typespec_loc, "%qs function with trailing " "return type not declared with % " diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 4e4746e..f8637da 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -4608,7 +4608,7 @@ record_mangling (tree decl, bool need_warning) inform (DECL_SOURCE_LOCATION (*slot), "previous mangling %q#D", *slot); inform (DECL_SOURCE_LOCATION (decl), - "a later -fabi-version= (or =0)" + "a later %<-fabi-version=%> (or =0)" " avoids this error with a change in mangling"); *slot = decl; } diff --git a/gcc/cp/error.c b/gcc/cp/error.c index dd3a339..4a0aed2 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -4148,75 +4148,77 @@ maybe_warn_cpp0x (cpp0x_warn_str str) case CPP0X_INITIALIZER_LISTS: pedwarn (input_location, 0, "extended initializer lists " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_EXPLICIT_CONVERSION: pedwarn (input_location, 0, "explicit conversion operators " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_VARIADIC_TEMPLATES: pedwarn (input_location, 0, "variadic templates " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_LAMBDA_EXPR: pedwarn (input_location, 0, "lambda expressions " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_AUTO: pedwarn (input_location, 0, - "C++11 auto only available with -std=c++11 or -std=gnu++11"); + "C++11 auto only available with %<-std=c++11%> or " + "%<-std=gnu++11%>"); break; case CPP0X_SCOPED_ENUMS: pedwarn (input_location, 0, - "scoped enums only available with -std=c++11 or -std=gnu++11"); + "scoped enums only available with %<-std=c++11%> or " + "%<-std=gnu++11%>"); break; case CPP0X_DEFAULTED_DELETED: pedwarn (input_location, 0, "defaulted and deleted functions " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_INLINE_NAMESPACES: pedwarn (input_location, OPT_Wpedantic, "inline namespaces " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_OVERRIDE_CONTROLS: pedwarn (input_location, 0, "override controls (override/final) " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_NSDMI: pedwarn (input_location, 0, "non-static data member initializers " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_USER_DEFINED_LITERALS: pedwarn (input_location, 0, "user-defined literals " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_DELEGATING_CTORS: pedwarn (input_location, 0, "delegating constructors " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_INHERITING_CTORS: pedwarn (input_location, 0, "inheriting constructors " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_ATTRIBUTES: pedwarn (input_location, 0, "c++11 attributes " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; case CPP0X_REF_QUALIFIER: pedwarn (input_location, 0, "ref-qualifiers " - "only available with -std=c++11 or -std=gnu++11"); + "only available with %<-std=c++11%> or %<-std=gnu++11%>"); break; default: gcc_unreachable (); diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 139e871..40e973f 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -415,7 +415,7 @@ doing_eh (void) static int warned = 0; if (! warned) { - error ("exception handling disabled, use -fexceptions to enable"); + error ("exception handling disabled, use %<-fexceptions%> to enable"); warned = 1; } return 0; diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 777c477..f40c3e1 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -4155,18 +4155,18 @@ maybe_check_abi_tags (tree t, tree for_decl, int ver) if (for_decl && DECL_THUNK_P (for_decl)) warning_at (DECL_SOURCE_LOCATION (t), OPT_Wabi, "the mangled name of a thunk for %qD changes between " - "-fabi-version=%d and -fabi-version=%d", + "%<-fabi-version=%d%> and %<-fabi-version=%d%>", t, flag_abi_version, warn_abi_version); else if (for_decl) warning_at (DECL_SOURCE_LOCATION (for_decl), OPT_Wabi, "the mangled name of %qD changes between " - "-fabi-version=%d and -fabi-version=%d", + "%<-fabi-version=%d%> and %<-fabi-version=%d%>", for_decl, flag_abi_version, warn_abi_version); else warning_at (DECL_SOURCE_LOCATION (t), OPT_Wabi, "the mangled name of the initialization guard variable " - "for %qD changes between -fabi-version=%d and " - "-fabi-version=%d", + "for %qD changes between %<-fabi-version=%d%> and " + "%<-fabi-version=%d%>", t, flag_abi_version, warn_abi_version); } } diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index de2dd30..f951111 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -3288,7 +3288,7 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, tree id, decl); if (DECL_CLASS_TEMPLATE_P (decl) && cxx_dialect < cxx17) inform (location, "class template argument deduction is only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); inform (DECL_SOURCE_LOCATION (decl), "%qD declared here", decl); } else if (TREE_CODE (id) == BIT_NOT_EXPR) @@ -3322,17 +3322,17 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, tree id, The user should have said "typename A::X". */ if (cxx_dialect < cxx11 && id == ridpointers[(int)RID_CONSTEXPR]) inform (location, "C++11 % only available with " - "-std=c++11 or -std=gnu++11"); + "%<-std=c++11%> or %<-std=gnu++11%>"); else if (cxx_dialect < cxx11 && id == ridpointers[(int)RID_NOEXCEPT]) inform (location, "C++11 % only available with " - "-std=c++11 or -std=gnu++11"); + "%<-std=c++11%> or %<-std=gnu++11%>"); else if (cxx_dialect < cxx11 && TREE_CODE (id) == IDENTIFIER_NODE && id_equal (id, "thread_local")) inform (location, "C++11 % only available with " - "-std=c++11 or -std=gnu++11"); + "%<-std=c++11%> or %<-std=gnu++11%>"); else if (!flag_concepts && id == ridpointers[(int)RID_CONCEPT]) - inform (location, "% only available with -fconcepts"); + inform (location, "% only available with %<-fconcepts%>"); else if (processing_template_decl && current_class_type && TYPE_BINFO (current_class_type)) { @@ -4551,7 +4551,7 @@ cp_parser_userdef_numeric_literal (cp_parser *parser) "GNU built-in suffix"); } else if (!ext) - inform (token->location, "use -fext-numeric-literals " + inform (token->location, "use %<-fext-numeric-literals%> " "to enable more built-in suffixes"); if (kind == DK_ERROR) @@ -5331,7 +5331,7 @@ cp_parser_primary_expression (cp_parser *parser, && cxx_dialect < cxx17 && !in_system_header_at (input_location)) pedwarn (input_location, 0, "fold-expressions only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); } else /* Let the front end know that this expression was @@ -6069,7 +6069,7 @@ cp_parser_unqualified_id (cp_parser* parser, if (cxx_dialect < cxx14) pedwarn (loc, 0, "%<~auto%> only available with " - "-std=c++14 or -std=gnu++14"); + "%<-std=c++14%> or %<-std=gnu++14%>"); cp_lexer_consume_token (parser->lexer); return cp_expr (build_nt (BIT_NOT_EXPR, make_auto (), loc)); } @@ -8003,7 +8003,7 @@ cp_parser_pseudo_destructor_name (cp_parser* parser, if (cxx_dialect < cxx14) pedwarn (input_location, 0, "%<~auto%> only available with " - "-std=c++14 or -std=gnu++14"); + "%<-std=c++14%> or %<-std=gnu++14%>"); cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer); *scope = NULL_TREE; @@ -10100,7 +10100,7 @@ cp_parser_builtin_offsetof (cp_parser *parser) { const char *saved_message = parser->type_definition_forbidden_message; parser->type_definition_forbidden_message - = G_("types may not be defined within __builtin_offsetof"); + = G_("types may not be defined within %<__builtin_offsetof%>"); type = cp_parser_type_id (parser); parser->type_definition_forbidden_message = saved_message; } @@ -10390,7 +10390,7 @@ cp_parser_lambda_expression (cp_parser* parser) { error_at (LAMBDA_EXPR_LOCATION (lambda_expr), "lambda-expression in unevaluated context" - " only available with -std=c++2a or -std=gnu++2a"); + " only available with %<-std=c++2a%> or %<-std=gnu++2a%>"); token->error_reported = true; } ok = false; @@ -10400,7 +10400,7 @@ cp_parser_lambda_expression (cp_parser* parser) if (!token->error_reported) { error_at (token->location, "lambda-expression in template-argument" - " only available with -std=c++2a or -std=gnu++2a"); + " only available with %<-std=c++2a%> or %<-std=gnu++2a%>"); token->error_reported = true; } ok = false; @@ -10597,7 +10597,7 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr) location_t loc = cp_lexer_peek_token (parser->lexer)->location; if (cxx_dialect < cxx17) pedwarn (loc, 0, "%<*this%> capture only available with " - "-std=c++17 or -std=gnu++17"); + "%<-std=c++17%> or %<-std=gnu++17%>"); cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer); add_capture (lambda_expr, @@ -10614,7 +10614,7 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr) location_t loc = cp_lexer_peek_token (parser->lexer)->location; if (cxx_dialect < cxx2a) pedwarn (loc, 0, "pack init-capture only available with " - "-std=c++2a or -std=gnu++2a"); + "%<-std=c++2a%> or %<-std=gnu++2a%>"); cp_lexer_consume_token (parser->lexer); init_pack_expansion = true; } @@ -10653,7 +10653,7 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr) if (cxx_dialect < cxx14) pedwarn (input_location, 0, "lambda capture initializers " - "only available with -std=c++14 or -std=gnu++14"); + "only available with %<-std=c++14%> or %<-std=gnu++14%>"); capture_init_expr = cp_parser_initializer (parser, &direct, &non_constant, true); explicit_init_p = true; @@ -10791,11 +10791,11 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) if (cxx_dialect < cxx14) pedwarn (parser->lexer->next_token->location, 0, "lambda templates are only available with " - "-std=c++14 or -std=gnu++14"); + "%<-std=c++14%> or %<-std=gnu++14%>"); else if (cxx_dialect < cxx2a) pedwarn (parser->lexer->next_token->location, OPT_Wpedantic, "lambda templates are only available with " - "-std=c++2a or -std=gnu++2a"); + "%<-std=c++2a%> or %<-std=gnu++2a%>"); cp_lexer_consume_token (parser->lexer); @@ -10890,7 +10890,8 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) = lambda_specs.locations[ds_constexpr]; else error_at (lambda_specs.locations[ds_constexpr], "% " - "lambda only available with -std=c++17 or -std=gnu++17"); + "lambda only available with %<-std=c++17%> or " + "%<-std=gnu++17%>"); } p = obstack_alloc (&declarator_obstack, 0); @@ -11714,7 +11715,7 @@ cp_parser_selection_statement (cp_parser* parser, bool *if_p, cp_token *tok = cp_lexer_consume_token (parser->lexer); if (cxx_dialect < cxx17 && !in_system_header_at (tok->location)) pedwarn (tok->location, 0, "% only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); } /* Look for the `('. */ @@ -11741,7 +11742,7 @@ cp_parser_selection_statement (cp_parser* parser, bool *if_p, if (cxx_dialect < cxx17) pedwarn (cp_lexer_peek_token (parser->lexer)->location, 0, "init-statement in selection statements only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); cp_parser_init_statement (parser, &decl); } @@ -12728,7 +12729,7 @@ cp_parser_init_statement (cp_parser *parser, tree *decl) { pedwarn (cp_lexer_peek_token (parser->lexer)->location, 0, "range-based % loops with initializer only " - "available with -std=c++2a or -std=gnu++2a"); + "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); *decl = error_mark_node; } } @@ -12752,7 +12753,7 @@ cp_parser_init_statement (cp_parser *parser, tree *decl) if (cxx_dialect < cxx11) pedwarn (cp_lexer_peek_token (parser->lexer)->location, 0, "range-based % loops only available with " - "-std=c++11 or -std=gnu++11"); + "%<-std=c++11%> or %<-std=gnu++11%>"); } else /* The ';' is not consumed yet because we told @@ -13694,7 +13695,7 @@ cp_parser_decomposition_declaration (cp_parser *parser, if (cxx_dialect < cxx17) pedwarn (loc, 0, "structured bindings only available with " - "-std=c++17 or -std=gnu++17"); + "%<-std=c++17%> or %<-std=gnu++17%>"); tree pushed_scope; cp_declarator *declarator = make_declarator (cdk_decomp); @@ -14231,8 +14232,8 @@ cp_parser_function_specifier_opt (cp_parser* parser, if (cxx_dialect < cxx2a) pedwarn (token->location, 0, - "% only available with -std=c++2a " - "or -std=gnu++2a"); + "% only available with %<-std=c++2a%> " + "or %<-std=gnu++2a%>"); /* Parse the constant-expression. */ expr = cp_parser_constant_expression (parser); @@ -14400,7 +14401,7 @@ cp_parser_static_assert(cp_parser *parser, bool member_p) if (cxx_dialect < cxx17) pedwarn (input_location, OPT_Wpedantic, "static_assert without a message " - "only available with -std=c++17 or -std=gnu++17"); + "only available with %<-std=c++17%> or %<-std=gnu++17%>"); /* Eat the ')' */ cp_lexer_consume_token (parser->lexer); message = build_string (1, ""); @@ -17642,17 +17643,17 @@ cp_parser_simple_type_specifier (cp_parser* parser, error_at (token->location, "use of % in lambda parameter declaration " "only available with " - "-std=c++14 or -std=gnu++14"); + "%<-std=c++14%> or %<-std=gnu++14%>"); } else if (cxx_dialect < cxx14) error_at (token->location, "use of % in parameter declaration " "only available with " - "-std=c++14 or -std=gnu++14"); + "%<-std=c++14%> or %<-std=gnu++14%>"); else if (!flag_concepts) pedwarn (token->location, 0, "use of % in parameter declaration " - "only available with -fconcepts"); + "only available with %<-fconcepts%>"); } else type = make_auto (); @@ -19178,7 +19179,7 @@ cp_parser_namespace_definition (cp_parser* parser) if (cxx_dialect < cxx2a) pedwarn (cp_lexer_peek_token (parser->lexer)->location, OPT_Wpedantic, "nested inline namespace definitions only " - "available with -std=c++2a or -std=gnu++2a"); + "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); cp_lexer_consume_token (parser->lexer); } @@ -19207,8 +19208,8 @@ cp_parser_namespace_definition (cp_parser* parser) if (!nested_definition_count && cxx_dialect < cxx17) pedwarn (input_location, OPT_Wpedantic, - "nested namespace definitions only available with " - "-std=c++17 or -std=gnu++17"); + "nested namespace definitions only available with " + "%<-std=c++17%> or %<-std=gnu++17%>"); /* Nested namespace names can create new namespaces (unlike other qualified-ids). */ @@ -19444,7 +19445,7 @@ cp_parser_using_declaration (cp_parser* parser, && !in_system_header_at (ell->location)) pedwarn (ell->location, 0, "pack expansion in using-declaration only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); qscope = make_pack_expansion (qscope); } @@ -19506,7 +19507,7 @@ cp_parser_using_declaration (cp_parser* parser, if (cxx_dialect < cxx17) pedwarn (comma->location, 0, "comma-separated list in using-declaration only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); goto again; } @@ -22618,11 +22619,11 @@ cp_parser_ctor_initializer_opt_and_function_body (cp_parser *parser, if (DECL_CONSTRUCTOR_P (current_function_decl)) pedwarn (input_location, 0, "function-try-block body of % constructor only " - "available with -std=c++2a or -std=gnu++2a"); + "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); else pedwarn (input_location, 0, "function-try-block body of % function only " - "available with -std=c++2a or -std=gnu++2a"); + "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); } /* Begin the function body. */ @@ -22943,7 +22944,7 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p, if (cxx_dialect < cxx2a) pedwarn (loc, OPT_Wpedantic, "C++ designated initializers only available with " - "-std=c++2a or -std=gnu++2a"); + "%<-std=c++2a%> or %<-std=gnu++2a%>"); /* Consume the `.'. */ cp_lexer_consume_token (parser->lexer); /* Consume the identifier. */ @@ -24160,7 +24161,7 @@ cp_parser_type_parameter_key (cp_parser* parser) by the standard until C++17. */ pedwarn (token->location, OPT_Wpedantic, "ISO C++ forbids typename key in template template parameter;" - " use -std=c++17 or -std=gnu++17"); + " use %<-std=c++17%> or %<-std=gnu++17%>"); } else cp_parser_error (parser, "expected % or %"); @@ -24546,8 +24547,8 @@ cp_parser_member_declaration (cp_parser* parser) && identifier != NULL_TREE) pedwarn (loc, 0, "default member initializers for bit-fields " - "only available with -std=c++2a or " - "-std=gnu++2a"); + "only available with %<-std=c++2a%> or " + "%<-std=gnu++2a%>"); initializer = cp_parser_save_nsdmi (parser); if (identifier == NULL_TREE) @@ -25371,7 +25372,7 @@ cp_parser_try_block (cp_parser* parser) && cxx_dialect < cxx2a) pedwarn (input_location, 0, "% in % function only " - "available with -std=c++2a or -std=gnu++2a"); + "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); try_block = begin_try_block (); cp_parser_compound_statement (parser, NULL, BCS_TRY_BLOCK, false); @@ -26250,7 +26251,7 @@ cp_parser_std_attribute_spec (cp_parser *parser) && !in_system_header_at (input_location)) pedwarn (input_location, 0, "attribute using prefix only available " - "with -std=c++17 or -std=gnu++17"); + "with %<-std=c++17%> or %<-std=gnu++17%>"); cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer); @@ -26573,7 +26574,7 @@ cp_parser_requires_clause_opt (cp_parser *parser) && tok->u.value == ridpointers[RID_REQUIRES]) { error_at (cp_lexer_peek_token (parser->lexer)->location, - "% only available with -fconcepts"); + "% only available with %<-fconcepts%>"); /* Parse and discard the requires-clause. */ cp_lexer_consume_token (parser->lexer); cp_parser_requires_clause (parser); diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 906cfe0..f48f460 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -2616,8 +2616,8 @@ check_template_variable (tree decl) { if (cxx_dialect < cxx14) pedwarn (DECL_SOURCE_LOCATION (decl), 0, - "variable templates only available with " - "-std=c++14 or -std=gnu++14"); + "variable templates only available with " + "%<-std=c++14%> or %<-std=gnu++14%>"); // Namespace-scope variable templates should have a template header. ++wanted; @@ -5292,7 +5292,7 @@ check_default_tmpl_args (tree decl, tree parms, bool is_primary, "friend declarations"); else if (TREE_CODE (decl) == FUNCTION_DECL && (cxx_dialect == cxx98)) msg = G_("default template arguments may not be used in function templates " - "without -std=c++11 or -std=gnu++11"); + "without %<-std=c++11%> or %<-std=gnu++11%>"); else if (is_partial) msg = G_("default template arguments may not be used in " "partial specializations"); @@ -10191,7 +10191,7 @@ push_tinst_level_loc (tree tldcl, tree targs, location_t loc) at_eof = 2; fatal_error (input_location, "template instantiation depth exceeds maximum of %d" - " (use -ftemplate-depth= to increase the maximum)", + " (use %<-ftemplate-depth=%> to increase the maximum)", max_tinst_depth); return false; } @@ -24727,9 +24727,9 @@ instantiate_pending_templates (int retries) fatal_error (input_location, "template instantiation depth exceeds maximum of %d" - " instantiating %q+D, possibly from virtual table generation" - " (use -ftemplate-depth= to increase the maximum)", - max_tinst_depth, decl); + " instantiating %q+D, possibly from virtual table generation" + " (use %<-ftemplate-depth=%> to increase the maximum)", + max_tinst_depth, decl); if (TREE_CODE (decl) == FUNCTION_DECL) /* Pretend that we defined it. */ DECL_INITIAL (decl) = error_mark_node; @@ -25102,7 +25102,7 @@ invalid_nontype_parm_type_p (tree type, tsubst_flags_t complain) if (cxx_dialect < cxx2a) { error ("non-type template parameters of class type only available " - "with -std=c++2a or -std=gnu++2a"); + "with %<-std=c++2a%> or %<-std=gnu++2a%>"); return true; } if (!complete_type_or_else (type, NULL_TREE)) diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c index f83045a..5588e6a 100644 --- a/gcc/cp/repo.c +++ b/gcc/cp/repo.c @@ -110,7 +110,7 @@ get_base_filename (const char *filename) if (p && ! compiling) { - warning (0, "-frepo must be used with -c"); + warning (0, "%<-frepo%> must be used with %<-c%>"); flag_use_repository = 0; return NULL; } diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index c4aabea..3ca2b5e 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -310,7 +310,7 @@ typeid_ok_p (void) { if (! flag_rtti) { - error ("cannot use % with -fno-rtti"); + error ("cannot use % with %<-fno-rtti%>"); return false; } @@ -719,7 +719,7 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain) if (!flag_rtti) { if (complain & tf_error) - error ("% not permitted with -fno-rtti"); + error ("% not permitted with %<-fno-rtti%>"); return error_mark_node; } diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index eca6b52..af077e7 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -3990,11 +3990,11 @@ maybe_warn_parm_abi (tree t, location_t loc) bool w; auto_diagnostic_group d; if (flag_abi_version > 12) - w = warning_at (loc, OPT_Wabi, "-fabi-version=13 (GCC 8.2) fixes the " - "calling convention for %qT, which was accidentally " - "changed in 8.1", t); + w = warning_at (loc, OPT_Wabi, "%<-fabi-version=13%> (GCC 8.2) fixes " + "the calling convention for %qT, which was " + "accidentally changed in 8.1", t); else - w = warning_at (loc, OPT_Wabi, "-fabi-version=12 (GCC 8.1) accident" + w = warning_at (loc, OPT_Wabi, "%<-fabi-version=12%> (GCC 8.1) accident" "ally changes the calling convention for %qT", t); if (w) inform (location_of (t), " declared here"); @@ -4003,7 +4003,7 @@ maybe_warn_parm_abi (tree t, location_t loc) auto_diagnostic_group d; if (warning_at (loc, OPT_Wabi, "the calling convention for %qT changes in " - "-fabi-version=13 (GCC 8.2)", t)) + "%<-fabi-version=13%> (GCC 8.2)", t)) inform (location_of (t), " because all of its copy and move " "constructors are deleted"); } diff --git a/gcc/dbgcnt.c b/gcc/dbgcnt.c index 2838def..ebaa310 100644 --- a/gcc/dbgcnt.c +++ b/gcc/dbgcnt.c @@ -91,22 +91,22 @@ dbg_cnt_set_limit_by_name (const char *name, int low, int high) { if (high < low) { - error ("-fdbg-cnt=%s:%d:%d has smaller upper limit than the lower", + error ("%<-fdbg-cnt=%s:%d:%d%> has smaller upper limit than the lower", name, low, high); return false; } if (low < 0) { - error ("Lower limit %d of -fdbg-cnt=%s must be a non-negative number", low, - name); + error ("Lower limit %d of %<-fdbg-cnt=%s%> must be a non-negative " + "number", low, name); return false; } if (high < 0) { - error ("Upper limit %d of -fdbg-cnt=%s must be a non-negative number", high, - name); + error ("Upper limit %d of %<-fdbg-cnt=%s%> must be a non-negative " + "number", high, name); return false; } @@ -173,7 +173,7 @@ dbg_cnt_process_opt (const char *arg) char *buffer = XALLOCAVEC (char, start + 2); sprintf (buffer, "%*c", start + 1, '^'); error ("cannot find a valid counter:value pair:"); - error ("-fdbg-cnt=%s", next); + error ("%<-fdbg-cnt=%s%>", next); error (" %s", buffer); } } diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index e074ee3..8305555 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10982,8 +10982,8 @@ output_dwarf_version () static bool once; if (!once) { - warning (0, - "-gdwarf-6 is output as version 5 with incompatibilities"); + warning (0, "%<-gdwarf-6%> is output as version 5 with " + "incompatibilities"); once = true; } dw2_asm_output_data (2, 5, "DWARF version number"); diff --git a/gcc/except.c b/gcc/except.c index 29437f3..e760c44 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -2288,7 +2288,7 @@ expand_eh_return (void) if (rtx handler = EH_RETURN_HANDLER_RTX) emit_move_insn (handler, crtl->eh.ehr_handler); else - error ("__builtin_eh_return not supported on this target"); + error ("%<__builtin_eh_return%> not supported on this target"); } emit_label (around_label); diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 8ad4361..1c738ba 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,14 @@ +2019-03-11 Martin Liska + + * decl.c (match_record_decl): Wrap an option name + in a string format message and fix GNU coding style. + (gfc_match_pointer): Likewise. + * expr.c (find_array_section): Likewise. + * intrinsic.c (gfc_is_intrinsic): Likewise. + * options.c (gfc_post_options): Likewise. + * primary.c (match_integer_constant): Likewise. + * trans-common.c (translate_common): Likewise. + 2019-03-10 Thomas Koenig PR fortran/66089 diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 31c7fb6..a29e2db 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -3440,7 +3440,7 @@ match_record_decl (char *name) { gfc_current_locus = old_loc; gfc_error ("RECORD at %C is an extension, enable it with " - "-fdec-structure"); + "%<-fdec-structure%>"); return MATCH_ERROR; } m = gfc_match (" %n/", name); @@ -8651,8 +8651,8 @@ gfc_match_pointer (void) { if (!flag_cray_pointer) { - gfc_error ("Cray pointer declaration at %C requires -fcray-pointer " - "flag"); + gfc_error ("Cray pointer declaration at %C requires " + "%<-fcray-pointer%> flag"); return MATCH_ERROR; } return cray_pointer_decl (); diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 4e95f24..08bd8e0 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -1642,7 +1642,7 @@ find_array_section (gfc_expr *expr, gfc_ref *ref) { gfc_error ("The number of elements in the array constructor " "at %L requires an increase of the allowed %d " - "upper limit. See -fmax-array-constructor " + "upper limit. See %<-fmax-array-constructor%> " "option", &expr->where, flag_max_array_constructor); return false; } diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index f8d3a69..4797b3d 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -1125,8 +1125,8 @@ gfc_is_intrinsic (gfc_symbol* sym, int subroutine_flag, locus loc) gfc_warning_now (OPT_Wintrinsics_std, "The intrinsic %qs at %L is not " "included in the selected standard but %s and %qs will" " be treated as if declared EXTERNAL. Use an" - " appropriate -std=* option or define" - " -fall-intrinsics to allow this intrinsic.", + " appropriate %<-std=%>* option or define" + " %<-fall-intrinsics%> to allow this intrinsic.", sym->name, &loc, symstd, sym->name); return false; diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index f2a0151..02970d5 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -263,7 +263,7 @@ gfc_post_options (const char **pfilename) /* Excess precision other than "fast" requires front-end support. */ if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD) - sorry ("-fexcess-precision=standard for Fortran"); + sorry ("%<-fexcess-precision=standard%> for Fortran"); flag_excess_precision_cmdline = EXCESS_PRECISION_FAST; /* Fortran allows associative math - but we cannot reassociate if diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index fa764dc..5bfb90c 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -237,7 +237,7 @@ match_integer_constant (gfc_expr **result, int signflag) if (gfc_range_check (e) != ARITH_OK) { gfc_error ("Integer too big for its kind at %C. This check can be " - "disabled with the option -fno-range-check"); + "disabled with the option %<-fno-range-check%>"); gfc_free_expr (e); return MATCH_ERROR; diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c index 28732e4..debdbd9 100644 --- a/gcc/fortran/trans-common.c +++ b/gcc/fortran/trans-common.c @@ -1156,13 +1156,13 @@ translate_common (gfc_common_head *common, gfc_symbol *var_list) gfc_warning (OPT_Walign_commons, "Padding of %d bytes required before %qs in " "COMMON %qs at %L; reorder elements or use " - "-fno-align-commons", (int)offset, + "%<-fno-align-commons%>", (int)offset, s->sym->name, common->name, &common->where); else gfc_warning (OPT_Walign_commons, "Padding of %d bytes required before %qs in " "COMMON at %L; reorder elements or use " - "-fno-align-commons", (int)offset, + "%<-fno-align-commons%>", (int)offset, s->sym->name, &common->where); } } diff --git a/gcc/gcc.c b/gcc/gcc.c index 481e828..4f57765 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -3075,7 +3075,7 @@ execute (void) if (arg && strcmp (arg, "|") == 0) { /* each command. */ #if defined (__MSDOS__) || defined (OS2) || defined (VMS) - fatal_error (input_location, "-pipe not supported"); + fatal_error (input_location, "%<-pipe%> not supported"); #endif argbuf[i] = 0; /* Termination of command args. */ @@ -4148,7 +4148,7 @@ driver_handle_option (struct gcc_options *opts, || strcmp (arg, "object") == 0) save_temps_flag = SAVE_TEMPS_OBJ; else - fatal_error (input_location, "%qs is an unknown -save-temps option", + fatal_error (input_location, "%qs is an unknown %<-save-temps%> option", decoded->orig_option_with_args_text); break; @@ -4651,7 +4651,7 @@ process_command (unsigned int decoded_options_count, { /* -save-temps overrides -pipe, so that temp files are produced */ if (save_temps_flag) - warning (0, "-pipe ignored because -save-temps specified"); + warning (0, "%<-pipe%> ignored because %<-save-temps%> specified"); use_pipes = 0; } @@ -7243,7 +7243,7 @@ compare_files (char *cmpfile[]) if (!ret && length[0] != length[1]) { - error ("%s: -fcompare-debug failure (length)", gcc_input_filename); + error ("%s: %<-fcompare-debug%> failure (length)", gcc_input_filename); ret = 1; } @@ -7273,7 +7273,7 @@ compare_files (char *cmpfile[]) { if (memcmp (map[0], map[1], length[0]) != 0) { - error ("%s: -fcompare-debug failure", gcc_input_filename); + error ("%s: %<-fcompare-debug%> failure", gcc_input_filename); ret = 1; } } @@ -7310,7 +7310,7 @@ compare_files (char *cmpfile[]) if (c0 != c1) { - error ("%s: -fcompare-debug failure", + error ("%s: %<-fcompare-debug%> failure", gcc_input_filename); ret = 1; break; @@ -8086,7 +8086,8 @@ driver::prepare_infiles () if (!combine_inputs && have_c && have_o && lang_n_infiles > 1) fatal_error (input_location, - "cannot specify -o with -c, -S or -E with multiple files"); + "cannot specify %<-o%> with %<-c%>, %<-S%> or %<-E%> " + "with multiple files"); /* No early exit needed from main; we can continue. */ return false; @@ -8152,7 +8153,7 @@ driver::do_spec_on_infiles () const { if (verbose_flag) inform (UNKNOWN_LOCATION, - "recompiling with -fcompare-debug"); + "recompiling with %<-fcompare-debug%>"); compare_debug = -compare_debug; n_switches = n_switches_debug_check[1]; @@ -8168,7 +8169,7 @@ driver::do_spec_on_infiles () const if (value < 0) { - error ("during -fcompare-debug recompilation"); + error ("during %<-fcompare-debug%> recompilation"); this_file_error = 1; } @@ -8294,7 +8295,7 @@ driver::maybe_run_linker (const char *argv0) const false); if (!temp_spec) fatal_error (input_location, - "-fuse-linker-plugin, but %s not found", + "%<-fuse-linker-plugin%>, but %s not found", LTOPLUGINSONAME); linker_plugin_file_spec = convert_white_space (temp_spec); } diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 96d74b7..39c7b26 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,9 @@ +2019-03-11 Martin Liska + + * lto-lang.c (lto_post_options): Wrap an option name + in a string format message and fix GNU coding style. + * lto-symtab.c (lto_symtab_merge_decls_2): Likewise. + 2019-03-09 Jakub Jelinek PR target/79645 diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c index c6c3304..5a35d47 100644 --- a/gcc/lto/lto-lang.c +++ b/gcc/lto/lto-lang.c @@ -864,7 +864,7 @@ lto_post_options (const char **pfilename ATTRIBUTE_UNUSED) { /* -fltrans and -fwpa are mutually exclusive. Check for that here. */ if (flag_wpa && flag_ltrans) - error ("-fwpa and -fltrans are mutually exclusive"); + error ("%<-fwpa%> and %<-fltrans%> are mutually exclusive"); if (flag_ltrans) { @@ -898,7 +898,8 @@ lto_post_options (const char **pfilename ATTRIBUTE_UNUSED) lang_hooks.lto.append_data = lhd_append_data; lang_hooks.lto.end_section = lhd_end_section; if (flag_ltrans) - error ("-flinker-output=rel and -fltrans are mutually exclussive"); + error ("%<-flinker-output=rel%> and %<-fltrans%> are mutually " + "exclussive"); break; case LTO_LINKER_OUTPUT_NOLTOREL: /* .o: incremental link producing asm */ diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c index 343915c..ea9d21d 100644 --- a/gcc/lto/lto-symtab.c +++ b/gcc/lto/lto-symtab.c @@ -750,7 +750,7 @@ lto_symtab_merge_decls_2 (symtab_node *first, bool diagnosed_p) if (tbaa_p) inform (DECL_SOURCE_LOCATION (prevailing->decl), "code may be misoptimized unless " - "-fno-strict-aliasing is used"); + "%<-fno-strict-aliasing is used%>"); mismatches.release (); } diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c index 201c459..7c65b2b 100644 --- a/gcc/omp-offload.c +++ b/gcc/omp-offload.c @@ -639,7 +639,7 @@ oacc_parse_default_dims (const char *dims) { malformed: error_at (UNKNOWN_LOCATION, - "-fopenacc-dim operand is malformed at '%s'", pos); + "%<-fopenacc-dim%> operand is malformed at '%s'", pos); } } diff --git a/gcc/opts-global.c b/gcc/opts-global.c index 1c24c85..a5e9ef0 100644 --- a/gcc/opts-global.c +++ b/gcc/opts-global.c @@ -448,8 +448,8 @@ handle_common_deferred_options (void) case OPT_fasan_shadow_offset_: if (!(flag_sanitize & SANITIZE_KERNEL_ADDRESS)) - error ("-fasan-shadow-offset should only be used " - "with -fsanitize=kernel-address"); + error ("%<-fasan-shadow-offset%> should only be used " + "with %<-fsanitize=kernel-address%>"); if (!set_asan_shadow_offset (opt->arg)) error ("unrecognized shadow offset %qs", opt->arg); break; diff --git a/gcc/opts.c b/gcc/opts.c index 468abb1..3161e0b 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -1927,14 +1927,14 @@ parse_sanitizer_options (const char *p, location_t loc, int scode, if (hint) error_at (loc, - "unrecognized argument to -f%ssanitize%s= option: %q.*s;" - " did you mean %qs?", + "unrecognized argument to %<-f%ssanitize%s=%> " + "option: %q.*s; did you mean %qs?", value ? "" : "no-", suffix, (int) len, p, hint); else error_at (loc, - "unrecognized argument to -f%ssanitize%s= option: %q.*s", - value ? "" : "no-", + "unrecognized argument to %<-f%ssanitize%s=%> option: " + "%q.*s", value ? "" : "no-", suffix, (int) len, p); } @@ -2677,9 +2677,9 @@ common_handle_option (struct gcc_options *opts, case OPT_gdwarf: if (arg && strlen (arg) != 0) { - error_at (loc, "%<-gdwarf%s%> is ambiguous; " - "use %<-gdwarf-%s%> for DWARF version " - "or %<-gdwarf -g%s%> for debug level", arg, arg, arg); + error_at (loc, "%<-gdwarf%s%> is ambiguous; " + "use %<-gdwarf-%s%> for DWARF version " + "or %<-gdwarf%> %<-g%s%> for debug level", arg, arg, arg); break; } else @@ -3079,10 +3079,10 @@ enable_warning_as_error (const char *arg, int value, unsigned int lang_mask, strcpy (new_option + 1, arg); option_index = find_opt (new_option, lang_mask); if (option_index == OPT_SPECIAL_unknown) - error_at (loc, "-Werror=%s: no option -%s", arg, new_option); + error_at (loc, "%<-Werror=%s%>: no option -%s", arg, new_option); else if (!(cl_options[option_index].flags & CL_WARNING)) - error_at (loc, "-Werror=%s: -%s is not an option that controls warnings", - arg, new_option); + error_at (loc, "%<-Werror=%s%>: -%s is not an option that controls " + "warnings", arg, new_option); else { const diagnostic_t kind = value ? DK_ERROR : DK_WARNING; diff --git a/gcc/passes.c b/gcc/passes.c index 41aa765..02561f8 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -1021,9 +1021,9 @@ enable_disable_pass (const char *arg, bool is_enable) if (!*phase_name) { if (is_enable) - error ("unrecognized option -fenable"); + error ("unrecognized option %<-fenable%>"); else - error ("unrecognized option -fdisable"); + error ("unrecognized option %<-fdisable%>"); free (argstr); return; } @@ -1031,9 +1031,9 @@ enable_disable_pass (const char *arg, bool is_enable) if (!pass || pass->static_pass_number == -1) { if (is_enable) - error ("unknown pass %s specified in -fenable", phase_name); + error ("unknown pass %s specified in %<-fenable%>", phase_name); else - error ("unknown pass %s specified in -fdisable", phase_name); + error ("unknown pass %s specified in %<-fdisable%>", phase_name); free (argstr); return; } diff --git a/gcc/plugin.c b/gcc/plugin.c index f6c61d2..2896c6a 100644 --- a/gcc/plugin.c +++ b/gcc/plugin.c @@ -290,7 +290,7 @@ parse_plugin_arg_opt (const char *arg) if (!key_start) { - error ("malformed option -fplugin-arg-%s (missing -[=])", + error ("malformed option %<-fplugin-arg-%s%> (missing -[=])", arg); return; } @@ -353,7 +353,7 @@ parse_plugin_arg_opt (const char *arg) plugin->argv[plugin->argc - 1].value = value; } else - error ("plugin %s should be specified before -fplugin-arg-%s " + error ("plugin %s should be specified before %<-fplugin-arg-%s%> " "in the command line", name, arg); /* We don't need the plugin's name anymore. Just release it. */ @@ -1003,6 +1003,6 @@ default_plugin_dir_name (void) { if (!plugindir_string) fatal_error (input_location, - "-iplugindir option not passed from the gcc driver"); + "%<-iplugindir%> option not passed from the gcc driver"); return plugindir_string; } diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 529590b..318f7e9 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -188,7 +188,7 @@ default_const_not_ok_for_debug_p (rtx x) rtx default_expand_builtin_saveregs (void) { - error ("__builtin_saveregs not supported by this target"); + error ("%<__builtin_saveregs%> not supported by this target"); return const0_rtx; } @@ -2031,9 +2031,9 @@ default_pch_valid_p (const void *data_p, size_t len) /* -fpic and -fpie also usually make a PCH invalid. */ if (data[0] != flag_pic) - return _("created and used with different settings of -fpic"); + return _("created and used with different settings of %<-fpic%>"); if (data[1] != flag_pie) - return _("created and used with different settings of -fpie"); + return _("created and used with different settings of %<-fpie%>"); data += 2; /* Check target_flags. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5d09166..aec924f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,42 @@ +2019-03-11 Martin Liska + + * g++.dg/conversion/simd3.C (foo): Wrap option names + with apostrophe character. + * g++.dg/cpp1z/decomp3.C (test): Likewise. + (test3): Likewise. + * g++.dg/cpp1z/decomp4.C (test): Likewise. + * g++.dg/cpp1z/decomp44.C (foo): Likewise. + * g++.dg/cpp1z/decomp45.C (f): Likewise. + * g++.dg/opt/pr34036.C: Likewise. + * g++.dg/spellcheck-c++-11-keyword.C: Likewise. + * gcc.dg/c90-fordecl-1.c (foo): Likewise. + * gcc.dg/cpp/dir-only-4.c: Likewise. + * gcc.dg/cpp/dir-only-5.c: Likewise. + * gcc.dg/cpp/pr71591.c: Likewise. + * gcc.dg/format/opt-1.c: Likewise. + * gcc.dg/format/opt-2.c: Likewise. + * gcc.dg/format/opt-3.c: Likewise. + * gcc.dg/format/opt-4.c: Likewise. + * gcc.dg/format/opt-5.c: Likewise. + * gcc.dg/format/opt-6.c: Likewise. + * gcc.dg/pr22231.c: Likewise. + * gcc.dg/pr33007.c: Likewise. + * gcc.dg/simd-1.c (hanneke): Likewise. + * gcc.dg/simd-5.c: Likewise. + * gcc.dg/simd-6.c: Likewise. + * gcc.dg/spellcheck-options-14.c: Likewise. + * gcc.dg/spellcheck-options-15.c: Likewise. + * gcc.dg/spellcheck-options-16.c: Likewise. + * gcc.dg/spellcheck-options-17.c: Likewise. + * gcc.dg/tree-ssa/pr23109.c: Likewise. + * gcc.dg/tree-ssa/recip-5.c: Likewise. + * gcc.target/i386/cet-notrack-1a.c (func): Likewise. + (__attribute__): Likewise. + * gcc.target/i386/cet-notrack-icf-1.c (fn3): Likewise. + * gcc.target/i386/cet-notrack-icf-3.c (__attribute__): Likewise. + * gcc.target/powerpc/warn-1.c: Likewise. + * gcc.target/powerpc/warn-2.c: Likewise. + 2019-03-11 Andreas Krebbel * gcc.target/s390/zvector/vec-addc-u128.c: New test. diff --git a/gcc/testsuite/g++.dg/conversion/simd3.C b/gcc/testsuite/g++.dg/conversion/simd3.C index 8d96264..959ad50 100644 --- a/gcc/testsuite/g++.dg/conversion/simd3.C +++ b/gcc/testsuite/g++.dg/conversion/simd3.C @@ -10,6 +10,6 @@ unsigned int __attribute__((vector_size(16))) e; void foo() { b + d; /* { dg-error "invalid operands to binary" } */ - d += e; /* { dg-message "use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts.*cannot convert '__vector.4. unsigned int' to '__vector.4. int' in assignment" } */ + d += e; /* { dg-message "use '-flax-vector-conversions' to permit conversions between vectors with differing element types or numbers of subparts.*cannot convert '__vector.4. unsigned int' to '__vector.4. int' in assignment" } */ d2 += d; } diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp3.C b/gcc/testsuite/g++.dg/cpp1z/decomp3.C index 4d75e93..95e9f37 100644 --- a/gcc/testsuite/g++.dg/cpp1z/decomp3.C +++ b/gcc/testsuite/g++.dg/cpp1z/decomp3.C @@ -10,35 +10,35 @@ void test (A &b, B c) { int && [ d ] = c; // { dg-error "structured binding declaration cannot have type 'int'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } char & [ e, f, ff ] { b }; // { dg-error "structured binding declaration cannot have type 'char'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } - auto&[g,h,i]=b; // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } + auto&[g,h,i]=b; // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } } decltype (auto) [ j ] = c; // { dg-error "structured binding declaration cannot have type 'decltype.auto.'" "" { target c++14 } } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } // { dg-error "expected primary-expression before 'decltype'" "" { target c++11_down } .-2 } auto & & && & [ m, n, o ] = b; // { dg-error "multiple ref-qualifiers" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } constexpr auto [ p ] = c; // { dg-error "structured binding declaration cannot be 'constexpr'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } friend auto [ q ] = c; // { dg-error "'friend' used outside of class" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } typedef auto [ r ] = c; // { dg-error "structured binding declaration cannot be 'typedef'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } inline auto [ s ] = c; // { dg-error "structured binding declaration cannot be 'inline'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } __restrict auto [ t ] = c; // { dg-error "invalid use of 'restrict'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } long long auto [ u ] = c; // { dg-error "'long long' specified with 'auto'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } virtual auto [ v ] = c; // { dg-error "'virtual' outside class declaration" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } explicit auto [ w ] = c; // { dg-error "'explicit' outside class declaration" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } static auto [ x ] = c; // { dg-error "structured binding declaration cannot be 'static'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } extern auto [ y ] { c }; // { dg-error "structured binding declaration cannot be 'extern'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } } void @@ -53,19 +53,19 @@ test3 (A &b, B c) { auto [ d, e, f ] = arr; // { dg-error "only 3 names provided" } // { dg-message "while 'int .4.' decomposes into 4 elements" "" { target *-*-* } .-1 } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-2 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-2 } auto & [ g, h, i, j, k ] = arr; // { dg-error "5 names provided" } // { dg-message "while 'int .4.' decomposes into 4 elements" "" { target *-*-* } .-1 } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-2 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-2 } auto [ l, m ] = b; // { dg-error "only 2 names provided" } // { dg-message "while 'A' decomposes into 3 elements" "" { target *-*-* } .-1 } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-2 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-2 } auto & [ n, o, p, q ] = b; // { dg-error "4 names provided" } // { dg-message "while 'A' decomposes into 3 elements" "" { target *-*-* } .-1 } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-2 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-2 } auto [] { c }; // { dg-error "empty structured binding declaration" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } auto [ r, s ] = c; // { dg-error "2 names provided" } // { dg-message "while 'B' decomposes into 1 element" "" { target *-*-* } .-1 } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-2 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-2 } } diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp4.C b/gcc/testsuite/g++.dg/cpp1z/decomp4.C index 69b5455..f2d491f 100644 --- a/gcc/testsuite/g++.dg/cpp1z/decomp4.C +++ b/gcc/testsuite/g++.dg/cpp1z/decomp4.C @@ -15,18 +15,18 @@ void test (A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i) { auto [ j ] = a; // { dg-error "cannot decompose class type 'A' because it has an anonymous struct member" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } auto [ k ] { b }; // { dg-error "cannot decompose class type 'B' because it has an anonymous union member" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } auto [ l, l2 ] = c; // { dg-error "cannot decompose inaccessible member 'C::b' of 'C'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } - auto [ m ] = d; // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } + auto [ m ] = d; // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } } auto [ n ] { e }; // { dg-error "cannot decompose inaccessible member 'E::a' of 'E'" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } - auto [ o ] { f }; // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } + auto [ o ] { f }; // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } } auto & [ p ] { g }; // { dg-error "cannot decompose class type 'G': both it and its base class 'F' have non-static data members" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } - auto [ q ] { h }; // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } + auto [ q ] { h }; // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } } auto [ r ] { i }; // { dg-error "cannot decompose class type 'I': its base classes 'F' and 'H' have non-static data members" } - // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } + // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } } diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp44.C b/gcc/testsuite/g++.dg/cpp1z/decomp44.C index 168a13e..c797a1a 100644 --- a/gcc/testsuite/g++.dg/cpp1z/decomp44.C +++ b/gcc/testsuite/g++.dg/cpp1z/decomp44.C @@ -7,4 +7,4 @@ extern struct A a; template void foo() { auto[i] = a; // { dg-warning "incomplete" } -} // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } +} // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp45.C b/gcc/testsuite/g++.dg/cpp1z/decomp45.C index 27874fb..c79e7c9 100644 --- a/gcc/testsuite/g++.dg/cpp1z/decomp45.C +++ b/gcc/testsuite/g++.dg/cpp1z/decomp45.C @@ -8,7 +8,7 @@ template void f() { auto [x] = a; // { dg-warning "incomplete" } -} // { dg-warning "structured bindings only available with -std=c..17 or -std=gnu..17" "" { target c++14_down } .-1 } +} // { dg-warning "structured bindings only available with '-std=c..17' or '-std=gnu..17'" "" { target c++14_down } .-1 } struct A { int i; }; diff --git a/gcc/testsuite/g++.dg/opt/pr34036.C b/gcc/testsuite/g++.dg/opt/pr34036.C index f4e18c8..96f09cd 100644 --- a/gcc/testsuite/g++.dg/opt/pr34036.C +++ b/gcc/testsuite/g++.dg/opt/pr34036.C @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fnon-call-exceptions -ffast-math -fsignaling-nans" } */ -/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 0 } */ +/* { dg-warning "'-fassociative-math' disabled" "" { target *-*-* } 0 } */ template class ggStaticArray { diff --git a/gcc/testsuite/g++.dg/spellcheck-c++-11-keyword.C b/gcc/testsuite/g++.dg/spellcheck-c++-11-keyword.C index 0984af9..46124cb 100644 --- a/gcc/testsuite/g++.dg/spellcheck-c++-11-keyword.C +++ b/gcc/testsuite/g++.dg/spellcheck-c++-11-keyword.C @@ -3,13 +3,13 @@ // { dg-options "-std=c++98" } constexpr int a = 1; // { dg-bogus "did you mean" } -// { dg-error ".constexpr. does not name a type" "" { target *-*-* } .-1 } -// { dg-message "C\\+\\+11 .constexpr. only available with -std=c\\+\\+11 or -std=gnu\\+\\+11" "" { target *-*-* } .-2 } +// { dg-error "'constexpr' does not name a type" "" { target *-*-* } .-1 } +// { dg-message "C\\+\\+11 'constexpr' only available with '-std=c\\+\\+11' or '-std=gnu\\+\\+11'" "" { target *-*-* } .-2 } /* If the user typos "constexpr" (here as "consexpr"), don't offer it as a spelling suggestion in C++98 mode. */ consexpr int a = 1; // { dg-bogus "did you mean" } -// { dg-error ".consexpr. does not name a type" "" { target *-*-* } .-1 } +// { dg-error "'consexpr' does not name a type" "" { target *-*-* } .-1 } decltype i = 0; // { dg-bogus "did you mean" } -// { dg-error ".decltype. does not name a type" "" { target *-*-* } .-1 } +// { dg-error "'decltype' does not name a type" "" { target *-*-* } .-1 } diff --git a/gcc/testsuite/gcc.dg/c90-fordecl-1.c b/gcc/testsuite/gcc.dg/c90-fordecl-1.c index 0fb9b20..46ba16a 100644 --- a/gcc/testsuite/gcc.dg/c90-fordecl-1.c +++ b/gcc/testsuite/gcc.dg/c90-fordecl-1.c @@ -9,6 +9,6 @@ foo (void) int j = 0; for (int i = 1; i <= 10; i++) /* { dg-bogus "warning" "warning in place of error" } */ /* { dg-error "'for' loop initial declarations are only allowed in C99 or C11 mode" "declaration in for loop" { target *-*-* } .-1 } */ - /* { dg-message "note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code" "note" { target *-*-* } .-2 }} */ + /* { dg-message "note: use option '-std=c99', '-std=gnu99', '-std=c11' or '-std=gnu11' to compile your code" "note" { target *-*-* } .-2 }} */ j += i; } diff --git a/gcc/testsuite/gcc.dg/cpp/dir-only-4.c b/gcc/testsuite/gcc.dg/cpp/dir-only-4.c index a7b5f04..25f1b46 100644 --- a/gcc/testsuite/gcc.dg/cpp/dir-only-4.c +++ b/gcc/testsuite/gcc.dg/cpp/dir-only-4.c @@ -3,4 +3,4 @@ /* { dg-do preprocess } */ /* { dg-options "-fdirectives-only -Wunused-macros" } */ -/* { dg-error "-fdirectives-only is incompatible with -Wunused_macros\n" "-Wunused-macros check" { target *-*-* } 0 } */ +/* { dg-error "'-fdirectives-only' is incompatible with '-Wunused-macros'\n" "'-Wunused-macros' check" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/dir-only-5.c b/gcc/testsuite/gcc.dg/cpp/dir-only-5.c index 643a4d7..ad8e11e 100644 --- a/gcc/testsuite/gcc.dg/cpp/dir-only-5.c +++ b/gcc/testsuite/gcc.dg/cpp/dir-only-5.c @@ -3,4 +3,4 @@ /* { dg-do preprocess } */ /* { dg-options "-fdirectives-only -traditional" } */ -/* { dg-error "-fdirectives-only is incompatible with -traditional\n" "-traditional check" { target *-*-* } 0 } */ +/* { dg-error "'-fdirectives-only' is incompatible with '-traditional'\n" "'-traditional' check" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/pr71591.c b/gcc/testsuite/gcc.dg/cpp/pr71591.c index 0e3d7b1..8553396 100644 --- a/gcc/testsuite/gcc.dg/cpp/pr71591.c +++ b/gcc/testsuite/gcc.dg/cpp/pr71591.c @@ -2,4 +2,4 @@ /* { dg-do preprocess } */ /* { dg-options "-fself-test=fake-value" } */ -/* { dg-message "self-tests incompatible with -E" "" { target *-*-* } 0 } */ +/* { dg-message "self-tests incompatible with '-E'" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/format/opt-1.c b/gcc/testsuite/gcc.dg/format/opt-1.c index f8f3704..8800454 100644 --- a/gcc/testsuite/gcc.dg/format/opt-1.c +++ b/gcc/testsuite/gcc.dg/format/opt-1.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-Wformat-extra-args" } */ -/* { dg-warning "-Wformat-extra-args ignored without -Wformat" "ignored" { target *-*-* } 0 } */ +/* { dg-warning "'-Wformat-extra-args' ignored without '-Wformat'" "ignored" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/format/opt-2.c b/gcc/testsuite/gcc.dg/format/opt-2.c index 1ec9f01..1036773 100644 --- a/gcc/testsuite/gcc.dg/format/opt-2.c +++ b/gcc/testsuite/gcc.dg/format/opt-2.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-Wformat-nonliteral" } */ -/* { dg-warning "-Wformat-nonliteral ignored without -Wformat" "ignored" { target *-*-* } 0 } */ +/* { dg-warning "'-Wformat-nonliteral' ignored without '-Wformat'" "ignored" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/format/opt-3.c b/gcc/testsuite/gcc.dg/format/opt-3.c index 03f55e4..64a9242 100644 --- a/gcc/testsuite/gcc.dg/format/opt-3.c +++ b/gcc/testsuite/gcc.dg/format/opt-3.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-Wformat-security" } */ -/* { dg-warning "-Wformat-security ignored without -Wformat" "ignored" { target *-*-* } 0 } */ +/* { dg-warning "'-Wformat-security' ignored without '-Wformat'" "ignored" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/format/opt-4.c b/gcc/testsuite/gcc.dg/format/opt-4.c index f02b6c0..a82e41a 100644 --- a/gcc/testsuite/gcc.dg/format/opt-4.c +++ b/gcc/testsuite/gcc.dg/format/opt-4.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-Wformat-y2k" } */ -/* { dg-warning "-Wformat-y2k ignored without -Wformat" "ignored" { target *-*-* } 0 } */ +/* { dg-warning "'-Wformat-y2k' ignored without '-Wformat'" "ignored" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/format/opt-5.c b/gcc/testsuite/gcc.dg/format/opt-5.c index 3315e33..d031a25 100644 --- a/gcc/testsuite/gcc.dg/format/opt-5.c +++ b/gcc/testsuite/gcc.dg/format/opt-5.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-Wformat-zero-length" } */ -/* { dg-warning "-Wformat-zero-length ignored without -Wformat" "ignored" { target *-*-* } 0 } */ +/* { dg-warning "'-Wformat-zero-length' ignored without '-Wformat'" "ignored" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/format/opt-6.c b/gcc/testsuite/gcc.dg/format/opt-6.c index 29dedfa..6cabd81 100644 --- a/gcc/testsuite/gcc.dg/format/opt-6.c +++ b/gcc/testsuite/gcc.dg/format/opt-6.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-Wformat-contains-nul" } */ -/* { dg-warning "-Wformat-contains-nul ignored without -Wformat" "ignored" { target *-*-* } 0 } */ +/* { dg-warning "'-Wformat-contains-nul' ignored without '-Wformat'" "ignored" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/pr22231.c b/gcc/testsuite/gcc.dg/pr22231.c index 2107006..e879435 100644 --- a/gcc/testsuite/gcc.dg/pr22231.c +++ b/gcc/testsuite/gcc.dg/pr22231.c @@ -2,6 +2,6 @@ /* { dg-do compile } */ /* { dg-options "-MG -MD -c" } */ -/* { dg-error "may only be used with -M" "-MG incompatible with -c" { target *-*-* } 0 } */ +/* { dg-error "may only be used with .-M." ".-MG. incompatible with .-c." { target *-*-* } 0 } */ int anything; diff --git a/gcc/testsuite/gcc.dg/pr33007.c b/gcc/testsuite/gcc.dg/pr33007.c index cdc8c6a..c583ab6 100644 --- a/gcc/testsuite/gcc.dg/pr33007.c +++ b/gcc/testsuite/gcc.dg/pr33007.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O -ffast-math -ftrapping-math" } */ -/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 0 } */ +/* { dg-warning ".-fassociative-math. disabled" "" { target *-*-* } 0 } */ long foo (int i) diff --git a/gcc/testsuite/gcc.dg/simd-1.c b/gcc/testsuite/gcc.dg/simd-1.c index e92662e..d77f2bb 100644 --- a/gcc/testsuite/gcc.dg/simd-1.c +++ b/gcc/testsuite/gcc.dg/simd-1.c @@ -32,7 +32,7 @@ hanneke () e = (typeof (e)) a; /* Different signed SIMD assignment. */ - f = a; /* { dg-message "note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts" } */ + f = a; /* { dg-message "note: use .-flax-vector-conversions. to permit conversions between vectors with differing element types or numbers of subparts" } */ /* { dg-error "incompatible types when assigning" "" { target *-*-* } .-1 } */ /* Casted different signed SIMD assignment. */ diff --git a/gcc/testsuite/gcc.dg/simd-5.c b/gcc/testsuite/gcc.dg/simd-5.c index cacc469..f53e4ab 100644 --- a/gcc/testsuite/gcc.dg/simd-5.c +++ b/gcc/testsuite/gcc.dg/simd-5.c @@ -4,5 +4,5 @@ /* Ensure that we don't need a typedef to initialize a vector type. */ #define vector __attribute__ ((vector_size (8))) vector char x = (vector char) {1,2,3,4,5,6,7,8}; /* { dg-bogus "initializer" } */ -vector char y = (vector short) {1,2,3,4}; /* { dg-message "note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts" } */ +vector char y = (vector short) {1,2,3,4}; /* { dg-message "note: use .-flax-vector-conversions. to permit conversions between vectors with differing element types or numbers of subparts" } */ /* { dg-error "incompatible types when initializing" "" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/simd-6.c b/gcc/testsuite/gcc.dg/simd-6.c index 86363ae..ce5fcf5 100644 --- a/gcc/testsuite/gcc.dg/simd-6.c +++ b/gcc/testsuite/gcc.dg/simd-6.c @@ -4,5 +4,5 @@ /* Ensure that we don't need a typedef to initialize a vector type. */ #define vector __attribute__ ((vector_size (8))) vector char x = (vector char) {1,2,3,4,5,6,7,8}; /* { dg-bogus "initializer" } */ -vector char y = (vector short) {1,2,3,4}; /* { dg-message "note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts" } */ +vector char y = (vector short) {1,2,3,4}; /* { dg-message "note: use .-flax-vector-conversions. to permit conversions between vectors with differing element types or numbers of subparts" } */ /* { dg-error "incompatible types when initializing" "" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/spellcheck-options-14.c b/gcc/testsuite/gcc.dg/spellcheck-options-14.c index 5582460..3cd38ce 100644 --- a/gcc/testsuite/gcc.dg/spellcheck-options-14.c +++ b/gcc/testsuite/gcc.dg/spellcheck-options-14.c @@ -3,6 +3,6 @@ /* { dg-do compile } */ /* { dg-options "-fsanitize=addres,nul,this-is-not-a-sanitizer-option" } */ -/* { dg-error "unrecognized argument to -fsanitize= option: .addres.; did you mean .address." "" { target *-*-* } 0 } */ -/* { dg-error "unrecognized argument to -fsanitize= option: .nul.; did you mean .null." "" { target *-*-* } 0 } */ -/* { dg-error "unrecognized argument to -fsanitize= option: .this-is-not-a-sanitizer-option." "" { target *-*-* } 0 } */ +/* { dg-error "unrecognized argument to '-fsanitize=' option: 'addres'; did you mean 'address'" "" { target *-*-* } 0 } */ +/* { dg-error "unrecognized argument to '-fsanitize=' option: 'nul'; did you mean 'null'" "" { target *-*-* } 0 } */ +/* { dg-error "unrecognized argument to '-fsanitize=' option: 'this-is-not-a-sanitizer-option'" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/spellcheck-options-15.c b/gcc/testsuite/gcc.dg/spellcheck-options-15.c index 089e698..c190334 100644 --- a/gcc/testsuite/gcc.dg/spellcheck-options-15.c +++ b/gcc/testsuite/gcc.dg/spellcheck-options-15.c @@ -4,4 +4,4 @@ /* { dg-do compile } */ /* { dg-options "-fsanitize=al" } */ /* { dg-bogus "did you mean" "" { target *-*-* } 0 } */ -/* { dg-error "unrecognized argument to -fsanitize= option: .al." "" { target *-*-* } 0 } */ +/* { dg-error "unrecognized argument to '-fsanitize=' option: 'al'" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/spellcheck-options-16.c b/gcc/testsuite/gcc.dg/spellcheck-options-16.c index 7019576..f802e61 100644 --- a/gcc/testsuite/gcc.dg/spellcheck-options-16.c +++ b/gcc/testsuite/gcc.dg/spellcheck-options-16.c @@ -6,4 +6,4 @@ /* Ensure we don't offer non-recoverable "-fsanitize-recover=thread" as a suggestion. */ /* { dg-bogus "did you mean" "" { target *-*-* } 0 } */ -/* { dg-error "unrecognized argument to -fsanitize-recover= option: .threed." "" { target *-*-* } 0 } */ +/* { dg-error "unrecognized argument to '-fsanitize-recover=' option: 'threed'" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/spellcheck-options-17.c b/gcc/testsuite/gcc.dg/spellcheck-options-17.c index 1012dca..6be5d27 100644 --- a/gcc/testsuite/gcc.dg/spellcheck-options-17.c +++ b/gcc/testsuite/gcc.dg/spellcheck-options-17.c @@ -1,3 +1,3 @@ /* { dg-do compile } */ /* { dg-options "-fno-sanitize=threed" } */ -/* { dg-error "unrecognized argument to -fno-sanitize= option: .threed.; did you mean .thread." "" { target *-*-* } 0 } */ +/* { dg-error "unrecognized argument to '-fno-sanitize=' option: 'threed'; did you mean 'thread'" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c b/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c index 3ee6b7f..7cdf1d0 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -funsafe-math-optimizations -ftrapping-math -fdump-tree-recip -fdump-tree-lim2" } */ -/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 0 } */ +/* { dg-warning "'-fassociative-math' disabled" "" { target *-*-* } 0 } */ double F[2] = { 0., 0. }, e = 0.; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c b/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c index c45cf2f..6ac0559 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c @@ -1,6 +1,6 @@ /* { dg-options "-O1 -funsafe-math-optimizations -ftrapping-math -fdump-tree-recip -fdump-tree-optimized" } */ /* { dg-do compile } */ -/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 0 } */ +/* { dg-warning "'-fassociative-math' disabled" "" { target *-*-* } 0 } */ /* Test the reciprocal optimizations together with trapping math. */ diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-1a.c b/gcc/testsuite/gcc.target/i386/cet-notrack-1a.c index d8d2e5a..427df57 100644 --- a/gcc/testsuite/gcc.target/i386/cet-notrack-1a.c +++ b/gcc/testsuite/gcc.target/i386/cet-notrack-1a.c @@ -3,8 +3,8 @@ /* { dg-final { scan-assembler-not "endbr" } } */ /* { dg-final { scan-assembler-not "notrack call\[ \t]+" } } */ -int func (int a) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */ -int (*fptr) (int a) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */ +int func (int a) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use '-fcf-protection' option to enable it" } */ +int (*fptr) (int a) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use '-fcf-protection' option to enable it" } */ int foo (int arg) { @@ -16,7 +16,7 @@ int foo (int arg) int __attribute__ ((nocf_check)) func (int arg) -{ /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */ - int (*fptrl) (int a) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */ +{ /* { dg-warning "'nocf_check' attribute ignored. Use '-fcf-protection' option to enable it" } */ + int (*fptrl) (int a) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use '-fcf-protection' option to enable it" } */ return arg*(*fptrl)(arg); } diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c index 0bddf54..b90019f 100644 --- a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c +++ b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c @@ -20,7 +20,7 @@ fn2 (int x) static __attribute__((noinline, nocf_check)) int fn3 (int x) -{ /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */ +{ /* { dg-warning "'nocf_check' attribute ignored. Use '-fcf-protection' option to enable it" } */ return x + 12; } diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c index ed2d53a..3eec1e0 100644 --- a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c +++ b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c @@ -8,7 +8,7 @@ int (*foo)(int); -typedef int (*type1_t) (int) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use -fcf-protection option to enable it" } */ +typedef int (*type1_t) (int) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored. Use '-fcf-protection' option to enable it" } */ typedef int (*type2_t) (int); static __attribute__((noinline)) int diff --git a/gcc/testsuite/gcc.target/powerpc/warn-1.c b/gcc/testsuite/gcc.target/powerpc/warn-1.c index b9f744b..76ac0c4 100644 --- a/gcc/testsuite/gcc.target/powerpc/warn-1.c +++ b/gcc/testsuite/gcc.target/powerpc/warn-1.c @@ -3,7 +3,7 @@ /* { dg-require-effective-target powerpc_vsx_ok } */ /* { dg-options "-O -mvsx -mno-altivec" } */ -/* { dg-warning "-mvsx and -mno-altivec are incompatible" "" { target *-*-* } 0 } */ +/* { dg-warning "'-mvsx' and '-mno-altivec' are incompatible" "" { target *-*-* } 0 } */ double foo (double *x, double *y) diff --git a/gcc/testsuite/gcc.target/powerpc/warn-2.c b/gcc/testsuite/gcc.target/powerpc/warn-2.c index 427c694..29c6ce5 100644 --- a/gcc/testsuite/gcc.target/powerpc/warn-2.c +++ b/gcc/testsuite/gcc.target/powerpc/warn-2.c @@ -3,7 +3,7 @@ /* { dg-require-effective-target powerpc_vsx_ok } */ /* { dg-options "-O -mdejagnu-cpu=power7 -mno-altivec" } */ -/* { dg-warning "-mno-altivec disables vsx" "" { target *-*-* } 0 } */ +/* { dg-warning "'-mno-altivec' disables vsx" "" { target *-*-* } 0 } */ double foo (double *x, double *y) diff --git a/gcc/toplev.c b/gcc/toplev.c index d3719ff..397a164 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -901,7 +901,7 @@ init_asm_output (const char *name) } else inform (UNKNOWN_LOCATION, - "-frecord-gcc-switches is not supported by " + "%<-frecord-gcc-switches%> is not supported by " "the current target"); } @@ -1367,8 +1367,8 @@ process_options (void) || flag_graphite_identity || flag_loop_parallelize_all) sorry ("Graphite loop optimizations cannot be used (isl is not available) " - "(-fgraphite, -fgraphite-identity, -floop-nest-optimize, " - "-floop-parallelize-all)"); + "(%<-fgraphite%>, %<-fgraphite-identity%>, " + "%<-floop-nest-optimize%>, %<-floop-parallelize-all%>)"); #endif if (flag_cf_protection != CF_NONE @@ -1452,7 +1452,7 @@ process_options (void) } else warning_at (UNKNOWN_LOCATION, 0, - "-f%sleading-underscore not supported on this " + "%<-f%sleading-underscore%> not supported on this " "target machine", flag_leading_underscore ? "" : "no-"); } @@ -1619,8 +1619,9 @@ process_options (void) else if (debug_variable_location_views == -1 && dwarf_version != 5) { warning_at (UNKNOWN_LOCATION, 0, - "without -gdwarf-5, -gvariable-location-views=incompat5 " - "is equivalent to -gvariable-location-views"); + "without %<-gdwarf-5%>, " + "%<-gvariable-location-views=incompat5%> " + "is equivalent to %<-gvariable-location-views%>"); debug_variable_location_views = 1; } @@ -1634,8 +1635,8 @@ process_options (void) && !debug_variable_location_views) { warning_at (UNKNOWN_LOCATION, 0, - "-ginternal-reset-location-views is forced disabled " - "without -gvariable-location-views"); + "%<-ginternal-reset-location-views%> is forced disabled " + "without %<-gvariable-location-views%>"); debug_internal_reset_location_views = 0; } @@ -1644,8 +1645,8 @@ process_options (void) else if (debug_inline_points && !debug_nonbind_markers_p) { warning_at (UNKNOWN_LOCATION, 0, - "-ginline-points is forced disabled without " - "-gstatement-frontiers"); + "%<-ginline-points%> is forced disabled without " + "%<-gstatement-frontiers%>"); debug_inline_points = 0; } @@ -1673,13 +1674,13 @@ process_options (void) if (flag_function_sections) { warning_at (UNKNOWN_LOCATION, 0, - "-ffunction-sections not supported for this target"); + "%<-ffunction-sections%> not supported for this target"); flag_function_sections = 0; } if (flag_data_sections) { warning_at (UNKNOWN_LOCATION, 0, - "-fdata-sections not supported for this target"); + "%<-fdata-sections%> not supported for this target"); flag_data_sections = 0; } } @@ -1687,14 +1688,14 @@ process_options (void) if (flag_prefetch_loop_arrays > 0 && !targetm.code_for_prefetch) { warning_at (UNKNOWN_LOCATION, 0, - "-fprefetch-loop-arrays not supported for this target"); + "%<-fprefetch-loop-arrays%> not supported for this target"); flag_prefetch_loop_arrays = 0; } else if (flag_prefetch_loop_arrays > 0 && !targetm.have_prefetch ()) { warning_at (UNKNOWN_LOCATION, 0, - "-fprefetch-loop-arrays not supported for this target " - "(try -march switches)"); + "%<-fprefetch-loop-arrays%> not supported for this target " + "(try %<-march%> switches)"); flag_prefetch_loop_arrays = 0; } @@ -1703,7 +1704,7 @@ process_options (void) if (flag_prefetch_loop_arrays > 0 && optimize_size) { warning_at (UNKNOWN_LOCATION, 0, - "-fprefetch-loop-arrays is not supported with -Os"); + "%<-fprefetch-loop-arrays%> is not supported with %<-Os%>"); flag_prefetch_loop_arrays = 0; } @@ -1715,7 +1716,7 @@ process_options (void) if (flag_associative_math && (flag_trapping_math || flag_signed_zeros)) { warning_at (UNKNOWN_LOCATION, 0, - "-fassociative-math disabled; other options take " + "%<-fassociative-math%> disabled; other options take " "precedence"); flag_associative_math = 0; } @@ -1753,7 +1754,7 @@ process_options (void) if (!FRAME_GROWS_DOWNWARD && flag_stack_protect) { warning_at (UNKNOWN_LOCATION, 0, - "-fstack-protector not supported for this target"); + "%<-fstack-protector%> not supported for this target"); flag_stack_protect = 0; } if (!flag_stack_protect) @@ -1765,7 +1766,7 @@ process_options (void) && !FRAME_GROWS_DOWNWARD) { warning_at (UNKNOWN_LOCATION, 0, - "-fsanitize=address and -fsanitize=kernel-address " + "%<-fsanitize=address%> and %<-fsanitize=kernel-address%> " "are not supported for this target"); flag_sanitize &= ~SANITIZE_ADDRESS; } @@ -1774,7 +1775,7 @@ process_options (void) && targetm.asan_shadow_offset == NULL) { warning_at (UNKNOWN_LOCATION, 0, - "-fsanitize=address not supported for this target"); + "%<-fsanitize=address%> not supported for this target"); flag_sanitize &= ~SANITIZE_ADDRESS; } @@ -2255,7 +2256,7 @@ toplev::run_self_tests () { if (no_backend) { - error_at (UNKNOWN_LOCATION, "self-tests incompatible with -E"); + error_at (UNKNOWN_LOCATION, "self-tests incompatible with %<-E%>"); return; } #if CHECKING_P diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 7196614..c8d6d1b 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -3444,8 +3444,8 @@ verify_gimple_call (gcall *stmt) __builtin_unreachable internally, for example when IPA figures out a call cannot happen in a legal program. In such cases, we must make sure arguments are stripped off. */ - error ("__builtin_unreachable or __builtin_trap call with " - "arguments"); + error ("%<__builtin_unreachable%> or %<__builtin_trap%> call " + "with arguments"); return true; } break; diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 956e39f..829b984 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -3674,7 +3674,7 @@ inline_forbidden_p_stmt (gimple_stmt_iterator *gsi, bool *handled_ops_p, return from the function the inline has been inlined into. */ inline_forbidden_reason = G_("function %q+F can never be inlined because " - "it uses __builtin_return or __builtin_apply_args"); + "it uses %<__builtin_return%> or %<__builtin_apply_args%>"); *handled_ops_p = true; return t; @@ -3794,8 +3794,8 @@ tree_inlinable_function_p (tree fn) && always_inline == NULL) { if (do_warning) - warning (OPT_Winline, "function %q+F can never be inlined because it " - "is suppressed using -fno-inline", fn); + warning (OPT_Winline, "function %q+F can never be inlined because it " + "is suppressed using %<-fno-inline%>", fn); inlinable = false; } diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index ba97838..55ff354 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -7182,7 +7182,7 @@ vt_find_locations (void) if (MAY_HAVE_DEBUG_BIND_INSNS) inform (DECL_SOURCE_LOCATION (cfun->decl), "variable tracking size limit exceeded with " - "-fvar-tracking-assignments, retrying without"); + "%<-fvar-tracking-assignments%>, retrying without"); else inform (DECL_SOURCE_LOCATION (cfun->decl), "variable tracking size limit exceeded"); -- cgit v1.1 From 93964ebd2fec8d9e2132e118b02f93bea074ebd2 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 11 Mar 2019 14:59:04 +0100 Subject: Wrap apostrophes in gcc internal format with %'. 2019-03-11 Martin Liska * check-internal-format-escaping.py: Uncomment apostrophes check. 2019-03-11 Martin Liska * collect-utils.c (collect_wait): Wrap apostrophes in gcc internal format with %'. * collect2.c (main): Likewise. (scan_prog_file): Likewise. (scan_libraries): Likewise. * config/i386/i386.c (ix86_expand_call): Likewise. (ix86_handle_interrupt_attribute): Likewise. * config/nds32/nds32-intrinsic.c (nds32_expand_builtin_impl): Likewise. * config/nds32/nds32.c (nds32_insert_attributes): Likewise. * config/rl78/rl78.c (rl78_handle_saddr_attribute): Likewise. * lto-wrapper.c (find_crtoffloadtable): Likewise. * symtab.c (symtab_node::verify_base): Likewise. * tree-cfg.c (verify_gimple_label): Likewise. * tree.c (verify_type_variant): Likewise. 2019-03-11 Martin Liska * c-opts.c (c_common_post_options): Wrap apostrophes in gcc internal format with %'. 2019-03-11 Martin Liska * cvt.c (build_expr_type_conversion): Wrap apostrophes in gcc internal format with %'. * decl.c (check_no_redeclaration_friend_default_args): Likewise. (grokfndecl): Likewise. * name-lookup.c (do_pushtag): Likewise. * pt.c (unify_parameter_deduction_failure): Likewise. (unify_template_deduction_failure): Likewise. From-SVN: r269587 --- gcc/ChangeLog | 17 +++++++++++++++++ gcc/c-family/ChangeLog | 5 +++++ gcc/c-family/c-opts.c | 2 +- gcc/collect-utils.c | 2 +- gcc/collect2.c | 6 +++--- gcc/config/i386/i386.c | 6 +++--- gcc/config/nds32/nds32-intrinsic.c | 8 ++++---- gcc/config/nds32/nds32.c | 2 +- gcc/config/rl78/rl78.c | 2 +- gcc/cp/ChangeLog | 10 ++++++++++ gcc/cp/cvt.c | 2 +- gcc/cp/decl.c | 4 ++-- gcc/cp/name-lookup.c | 2 +- gcc/cp/pt.c | 4 ++-- gcc/lto-wrapper.c | 2 +- gcc/symtab.c | 8 ++++---- gcc/tree-cfg.c | 2 +- gcc/tree.c | 16 ++++++++-------- 18 files changed, 66 insertions(+), 34 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dd07096..61e23a6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,22 @@ 2019-03-11 Martin Liska + * collect-utils.c (collect_wait): Wrap apostrophes + in gcc internal format with %'. + * collect2.c (main): Likewise. + (scan_prog_file): Likewise. + (scan_libraries): Likewise. + * config/i386/i386.c (ix86_expand_call): Likewise. + (ix86_handle_interrupt_attribute): Likewise. + * config/nds32/nds32-intrinsic.c (nds32_expand_builtin_impl): Likewise. + * config/nds32/nds32.c (nds32_insert_attributes): Likewise. + * config/rl78/rl78.c (rl78_handle_saddr_attribute): Likewise. + * lto-wrapper.c (find_crtoffloadtable): Likewise. + * symtab.c (symtab_node::verify_base): Likewise. + * tree-cfg.c (verify_gimple_label): Likewise. + * tree.c (verify_type_variant): Likewise. + +2019-03-11 Martin Liska + * builtins.c (expand_builtin_thread_pointer): Wrap an option name in a string format message and fix GNU coding style. (expand_builtin_set_thread_pointer): Likewise. diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index e529538..885e326 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,5 +1,10 @@ 2019-03-11 Martin Liska + * c-opts.c (c_common_post_options): Wrap apostrophes + in gcc internal format with %'. + +2019-03-11 Martin Liska + * c-attribs.c (handle_nocf_check_attribute): Wrap an option name in a string format message and fix GNU coding style. * c-common.c (vector_types_convertible_p): Likewise. diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 3233fdb..daa02a5 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -945,7 +945,7 @@ c_common_post_options (const char **pfilename) if (flag_abi_version == latest_abi_version) { auto_diagnostic_group d; - if (warning (OPT_Wabi, "%<-Wabi%> won't warn about anything")) + if (warning (OPT_Wabi, "%<-Wabi%> won%'t warn about anything")) { inform (input_location, "%<-Wabi%> warns about differences " "from the most up-to-date ABI, which is also used " diff --git a/gcc/collect-utils.c b/gcc/collect-utils.c index fba3f74..1e03443 100644 --- a/gcc/collect-utils.c +++ b/gcc/collect-utils.c @@ -65,7 +65,7 @@ collect_wait (const char *prog, struct pex_obj *pex) int status; if (!pex_get_status (pex, 1, &status)) - fatal_error (input_location, "can't get program status: %m"); + fatal_error (input_location, "can%'t get program status: %m"); pex_free (pex); if (response_file && !save_temps) diff --git a/gcc/collect2.c b/gcc/collect2.c index da956bf..9d7de94 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -1396,7 +1396,7 @@ main (int argc, char **argv) stream = fopen (list_filename, "r"); if (stream == NULL) - fatal_error (input_location, "can't open %s: %m", + fatal_error (input_location, "can%'t open %s: %m", list_filename); while (fgets (buf, sizeof buf, stream) != NULL) @@ -2470,7 +2470,7 @@ scan_prog_file (const char *prog_name, scanpass which_pass, inf = pex_read_output (pex, 0); if (inf == NULL) - fatal_error (input_location, "can't open nm output: %m"); + fatal_error (input_location, "can%'t open nm output: %m"); if (debug) fprintf (stderr, "\nnm output with constructors/destructors.\n"); @@ -2639,7 +2639,7 @@ scan_libraries (const char *prog_name) inf = pex_read_output (pex, 0); if (inf == NULL) - fatal_error (input_location, "can't open ldd output: %m"); + fatal_error (input_location, "can%'t open ldd output: %m"); if (debug) notice ("\nldd output with constructors/destructors.\n"); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a4a7fbc..896c6f3 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -28399,7 +28399,7 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1, if (fndecl && (lookup_attribute ("interrupt", TYPE_ATTRIBUTES (TREE_TYPE (fndecl))))) - error ("interrupt service routine can't be called directly"); + error ("interrupt service routine can%'t be called directly"); } else fndecl = NULL_TREE; @@ -38375,7 +38375,7 @@ rdseed_step: mode0 = insn_data[icode].operand[0].mode; if (!insn_data[icode].operand[0].predicate (op0, mode0)) { - error ("the xabort's argument must be an 8-bit immediate"); + error ("xabort argument must be an 8-bit immediate"); return const0_rtx; } emit_insn (gen_xabort (op0)); @@ -41440,7 +41440,7 @@ ix86_handle_interrupt_attribute (tree *node, tree, tree, int, bool *) error ("interrupt service routine can only have a pointer argument " "and an optional integer argument"); if (! VOID_TYPE_P (return_type)) - error ("interrupt service routine can't have non-void return value"); + error ("interrupt service routine can%'t have non-void return value"); return NULL_TREE; } diff --git a/gcc/config/nds32/nds32-intrinsic.c b/gcc/config/nds32/nds32-intrinsic.c index 04aa290..c78dc93 100644 --- a/gcc/config/nds32/nds32-intrinsic.c +++ b/gcc/config/nds32/nds32-intrinsic.c @@ -1000,7 +1000,7 @@ nds32_expand_builtin_impl (tree exp, if (!NDS32_EXT_DSP_P () && fcode > NDS32_BUILTIN_DSP_BEGIN && fcode < NDS32_BUILTIN_DSP_END) - error ("don't support DSP extension instructions"); + error ("don%'t support DSP extension instructions"); switch (fcode) { @@ -1059,7 +1059,7 @@ nds32_expand_builtin_impl (tree exp, case NDS32_BUILTIN_CLO: if (!TARGET_EXT_PERF) { - error ("don't support performance extension instructions"); + error ("don%'t support performance extension instructions"); return NULL_RTX; } break; @@ -1071,7 +1071,7 @@ nds32_expand_builtin_impl (tree exp, case NDS32_BUILTIN_BSP: if (!TARGET_EXT_PERF2) { - error ("don't support performance extension " + error ("don%'t support performance extension " "version 2 instructions"); return NULL_RTX; } @@ -1083,7 +1083,7 @@ nds32_expand_builtin_impl (tree exp, case NDS32_BUILTIN_FLMISM: if (!TARGET_EXT_STRING) { - error ("don't support string extension instructions"); + error ("don%'t support string extension instructions"); return NULL_RTX; } break; diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c index 8bee154..f2723ea 100644 --- a/gcc/config/nds32/nds32.c +++ b/gcc/config/nds32/nds32.c @@ -3944,7 +3944,7 @@ nds32_insert_attributes (tree decl, tree *attributes) new_attrs = tree_cons (get_identifier ("noclone"), NULL, new_attrs); if (!TREE_PUBLIC (decl)) - error("indirect_call attribute can't apply for static function"); + error ("indirect_call attribute can%'t apply for static function"); *attributes = new_attrs; } diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c index c127c50..d2caa11 100644 --- a/gcc/config/rl78/rl78.c +++ b/gcc/config/rl78/rl78.c @@ -864,7 +864,7 @@ rl78_handle_saddr_attribute (tree * node, if (TREE_CODE (* node) == FUNCTION_DECL) { - warning (OPT_Wattributes, "%qE attribute doesn't apply to functions", + warning (OPT_Wattributes, "%qE attribute doesn%'t apply to functions", name); * no_add_attrs = true; } diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fd98347..8cad038 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,15 @@ 2019-03-11 Martin Liska + * cvt.c (build_expr_type_conversion): Wrap apostrophes + in gcc internal format with %'. + * decl.c (check_no_redeclaration_friend_default_args): Likewise. + (grokfndecl): Likewise. + * name-lookup.c (do_pushtag): Likewise. + * pt.c (unify_parameter_deduction_failure): Likewise. + (unify_template_deduction_failure): Likewise. + +2019-03-11 Martin Liska + * call.c (convert_arg_to_ellipsis): Wrap an option name in a string format message and fix GNU coding style. (build_over_call): Likewise. diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index c10db92..3b8656c 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -1822,7 +1822,7 @@ build_expr_type_conversion (int desires, tree expr, bool complain) if (TREE_CODE (cand) == TEMPLATE_DECL) { if (complain) - error ("default type conversion can't deduce template" + error ("default type conversion can%'t deduce template" " argument for %qD", cand); return error_mark_node; } diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 89edfe8..c8435e2 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -1305,7 +1305,7 @@ check_no_redeclaration_friend_default_args (tree olddecl, tree newdecl, auto_diagnostic_group d; if (permerror (DECL_SOURCE_LOCATION (newdecl), "friend declaration of %q#D specifies default " - "arguments and isn't the only declaration", newdecl)) + "arguments and isn%'t the only declaration", newdecl)) inform (DECL_SOURCE_LOCATION (olddecl), "previous declaration of %q#D", olddecl); return; @@ -8913,7 +8913,7 @@ grokfndecl (tree ctype, { permerror (DECL_SOURCE_LOCATION (decl), "friend declaration of %qD specifies default " - "arguments and isn't a definition", decl); + "arguments and isn%'t a definition", decl); break; } } diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 2ba888f..4ca976c 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -6897,7 +6897,7 @@ do_pushtag (tree name, tree type, tag_scope scope) && !CLASSTYPE_TEMPLATE_INFO (type)) { error ("declaration of % does not match " - "%<#include %>, isn't a template"); + "%<#include %>, isn%'t a template"); return error_mark_node; } } diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index f48f460..2ab6e27 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -6364,7 +6364,7 @@ unify_parameter_deduction_failure (bool explain_p, tree parm) { if (explain_p) inform (input_location, - " couldn't deduce template parameter %qD", parm); + " couldn%'t deduce template parameter %qD", parm); return unify_invalid (explain_p); } @@ -6540,7 +6540,7 @@ unify_template_deduction_failure (bool explain_p, tree parm, tree arg) { if (explain_p) inform (input_location, - " can't deduce a template for %qT from non-template type %qT", + " can%'t deduce a template for %qT from non-template type %qT", parm, arg); return unify_invalid (explain_p); } diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index c079c7b..2cd69f2 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -960,7 +960,7 @@ find_crtoffloadtable (void) } if (i == n_paths) fatal_error (input_location, - "installation error, can't find crtoffloadtable.o"); + "installation error, can%'t find crtoffloadtable.o"); free_array_of_ptrs ((void **) paths, n_paths); } diff --git a/gcc/symtab.c b/gcc/symtab.c index 16a2135..c3c057d 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -1155,7 +1155,7 @@ symtab_node::verify_base (void) } if (implicit_section && !get_section ()) { - error ("implicit_section flag is set but section isn't"); + error ("implicit_section flag is set but section isn%'t"); error_found = true; } if (get_section () && get_comdat_group () @@ -1174,14 +1174,14 @@ symtab_node::verify_base (void) || strcmp (get_section(), get_alias_target ()->get_section ()))) { - error ("Alias and target's section differs"); + error ("Alias and target%'s section differs"); get_alias_target ()->dump (stderr); error_found = true; } if (alias && definition && get_comdat_group () != get_alias_target ()->get_comdat_group ()) { - error ("Alias and target's comdat groups differs"); + error ("Alias and target%'s comdat groups differs"); get_alias_target ()->dump (stderr); error_found = true; } @@ -1196,7 +1196,7 @@ symtab_node::verify_base (void) ultimate_transparent_alias_target (DECL_ASSEMBLER_NAME (to->decl))); if (!symbol_table::assembler_names_equal_p (name1, name2)) { - error ("Transparent alias and target's assembler names differs"); + error ("Transparent alias and target%'s assembler names differs"); get_alias_target ()->dump (stderr); error_found = true; } diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index c8d6d1b..805e872 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4827,7 +4827,7 @@ verify_gimple_label (glabel *stmt) if (!DECL_NONLOCAL (decl) && !FORCED_LABEL (decl) && DECL_CONTEXT (decl) != current_function_decl) { - error ("label's context is not the current function decl"); + error ("label%'s context is not the current function decl"); err |= true; } diff --git a/gcc/tree.c b/gcc/tree.c index 6528057..02721cf 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -13815,9 +13815,9 @@ verify_type_variant (const_tree t, tree tv) TYPE_SIZE_UNIT (tv), 0)); error ("type variant has different TYPE_SIZE_UNIT"); debug_tree (tv); - error ("type variant's TYPE_SIZE_UNIT"); + error ("type variant%'s TYPE_SIZE_UNIT"); debug_tree (TYPE_SIZE_UNIT (tv)); - error ("type's TYPE_SIZE_UNIT"); + error ("type%'s TYPE_SIZE_UNIT"); debug_tree (TYPE_SIZE_UNIT (t)); return false; } @@ -13888,9 +13888,9 @@ verify_type_variant (const_tree t, tree tv) { error ("type variant has different TYPE_BINFO"); debug_tree (tv); - error ("type variant's TYPE_BINFO"); + error ("type variant%'s TYPE_BINFO"); debug_tree (TYPE_BINFO (tv)); - error ("type's TYPE_BINFO"); + error ("type%'s TYPE_BINFO"); debug_tree (TYPE_BINFO (t)); return false; } @@ -13952,9 +13952,9 @@ verify_type_variant (const_tree t, tree tv) { error ("type variant has different TREE_TYPE"); debug_tree (tv); - error ("type variant's TREE_TYPE"); + error ("type variant%'s TREE_TYPE"); debug_tree (TREE_TYPE (tv)); - error ("type's TREE_TYPE"); + error ("type%'s TREE_TYPE"); debug_tree (TREE_TYPE (t)); return false; } @@ -13963,9 +13963,9 @@ verify_type_variant (const_tree t, tree tv) { error ("type is not compatible with its variant"); debug_tree (tv); - error ("type variant's TREE_TYPE"); + error ("type variant%'s TREE_TYPE"); debug_tree (TREE_TYPE (tv)); - error ("type's TREE_TYPE"); + error ("type%'s TREE_TYPE"); debug_tree (TREE_TYPE (t)); return false; } -- cgit v1.1 From 63d42e89be8d5d2c22bff29981cdd419c4beb4a3 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 11 Mar 2019 21:56:07 +0100 Subject: Fix double string quoting. 2019-03-11 Martin Liska * config/aarch64/aarch64.c (aarch64_override_options_internal): Fix double string quoting. From-SVN: r269595 --- gcc/ChangeLog | 5 +++++ gcc/config/aarch64/aarch64.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 61e23a6..2d08753 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2019-03-11 Martin Liska + * config/aarch64/aarch64.c (aarch64_override_options_internal): + Fix double string quoting. + +2019-03-11 Martin Liska + * collect-utils.c (collect_wait): Wrap apostrophes in gcc internal format with %'. * collect2.c (main): Likewise. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 252bed7..b38505b 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -11455,7 +11455,7 @@ aarch64_override_options_internal (struct gcc_options *opts) && opts->x_aarch64_stack_protector_guard_offset_str) { error ("incompatible options %<-mstack-protector-guard=global%> and" - "%<-mstack-protector-guard-offset=%qs%>", + "%<-mstack-protector-guard-offset=%s%>", aarch64_stack_protector_guard_offset_str); } @@ -11482,7 +11482,7 @@ aarch64_override_options_internal (struct gcc_options *opts) long offs = strtol (aarch64_stack_protector_guard_offset_str, &end, 0); if (!*str || *end || errno) error ("%qs is not a valid offset in %qs", str, - "%<-mstack-protector-guard-offset=%>"); + "-mstack-protector-guard-offset="); aarch64_stack_protector_guard_offset = offs; } -- cgit v1.1 From 011acc898923f2511fc4ac2cbd21903cfe297a55 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Mon, 11 Mar 2019 21:04:02 +0000 Subject: [ARM] Fix availability of FP16-FP64 conversion instructions 2019-03-11 Christophe Lyon * gcc.target/arm/f16_f64_conv_no_dp.c: Add arm_fp16_ok effective target. From-SVN: r269596 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c | 1 + 2 files changed, 6 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index aec924f..6ae2749 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-11 Christophe Lyon + + * gcc.target/arm/f16_f64_conv_no_dp.c: Add arm_fp16_ok effective + target. + 2019-03-11 Martin Liska * g++.dg/conversion/simd3.C (foo): Wrap option names diff --git a/gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c b/gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c index 99b62a8..2620e57 100644 --- a/gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c +++ b/gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target arm_fp16_ok } */ /* { dg-skip-if "do not override fpu" { *-*-* } { "-mfpu=*" } { "-mfpu=fpv5-sp-d16" } } */ /* { dg-skip-if "do not disable fpu" { *-*-* } { "-mfloat-abi=soft" } { * } } */ /* { dg-skip-if "do not override fp16-format" { *-*-* } { "-mfp16-format=*" } { "-mfp16-format=ieee" } } */ -- cgit v1.1 From 4f150726cf236755158c3d895a31b4216336fae7 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 11 Mar 2019 22:58:43 +0100 Subject: re PR middle-end/89655 (GCC crashes building linux kernel for arm 32-bit (culprit r269453)) PR middle-end/89655 PR bootstrap/89656 * vr-values.c (vr_values::update_value_range): If old_vr->varying_p (), don't update it, make new_vr also VARYING and return false. * gcc.c-torture/compile/pr89655.c: New test. From-SVN: r269597 --- gcc/ChangeLog | 8 ++++++++ gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.c-torture/compile/pr89655.c | 15 +++++++++++++++ gcc/vr-values.c | 9 +++++++-- 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr89655.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2d08753..64bf601 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-03-11 Jakub Jelinek + + PR middle-end/89655 + PR bootstrap/89656 + * vr-values.c (vr_values::update_value_range): If + old_vr->varying_p (), don't update it, make new_vr also VARYING + and return false. + 2019-03-11 Martin Liska * config/aarch64/aarch64.c (aarch64_override_options_internal): diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6ae2749..fdc7c40 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-11 Jakub Jelinek + + PR middle-end/89655 + PR bootstrap/89656 + * gcc.c-torture/compile/pr89655.c: New test. + 2019-03-11 Christophe Lyon * gcc.target/arm/f16_f64_conv_no_dp.c: Add arm_fp16_ok effective diff --git a/gcc/testsuite/gcc.c-torture/compile/pr89655.c b/gcc/testsuite/gcc.c-torture/compile/pr89655.c new file mode 100644 index 0000000..f304c67 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr89655.c @@ -0,0 +1,15 @@ +/* PR middle-end/89655 */ + +int a, b, d; +char *c; + +void +foo (void) +{ + int f = a; + for (;;) + { + for (f = 0; f < (a > 3 ? : a); f++) + b = c[f] ? c[(f + 2 > a - 1 ? a - 1 : 2) * d] : 0; + } +} diff --git a/gcc/vr-values.c b/gcc/vr-values.c index a734ef9..0e10aca 100644 --- a/gcc/vr-values.c +++ b/gcc/vr-values.c @@ -189,8 +189,13 @@ vr_values::update_value_range (const_tree var, value_range *new_vr) because VR_RANGE and VR_ANTI_RANGE need to be considered the same. We may not have is_new when transitioning to UNDEFINED. If old_vr->type is VARYING, we shouldn't be - called. */ - if (new_vr->undefined_p ()) + called, if we are anyway, keep it VARYING. */ + if (old_vr->varying_p ()) + { + new_vr->set_varying (); + is_new = false; + } + else if (new_vr->undefined_p ()) { old_vr->set_varying (); new_vr->set_varying (); -- cgit v1.1 From a7b9de8b70a53cc6beb7d4cfee449a4cfc2dee20 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 11 Mar 2019 23:27:39 +0100 Subject: re PR fortran/89651 (OpenMP private array uninitialized warning with -O flag) PR fortran/89651 * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING on decl if adding COND_EXPR for allocatable. (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest. * gfortran.dg/gomp/pr89651.f90: New test. From-SVN: r269598 --- gcc/fortran/ChangeLog | 7 +++++++ gcc/fortran/trans-openmp.c | 6 ++++++ gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/gfortran.dg/gomp/pr89651.f90 | 21 +++++++++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/gomp/pr89651.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1c738ba..a3b47ac 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2019-03-11 Jakub Jelinek + + PR fortran/89651 + * trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING + on decl if adding COND_EXPR for allocatable. + (gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest. + 2019-03-11 Martin Liska * decl.c (match_record_decl): Wrap an option name diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c index 1fdb70e..0eb5956 100644 --- a/gcc/fortran/trans-openmp.c +++ b/gcc/fortran/trans-openmp.c @@ -558,6 +558,9 @@ gfc_omp_clause_default_ctor (tree clause, tree decl, tree outer) build3_loc (input_location, COND_EXPR, void_type_node, cond, then_b, else_b)); + /* Avoid -W*uninitialized warnings. */ + if (DECL_P (decl)) + TREE_NO_WARNING (decl) = 1; } else gfc_add_expr_to_block (&block, then_b); @@ -664,6 +667,9 @@ gfc_omp_clause_copy_ctor (tree clause, tree dest, tree src) gfc_add_expr_to_block (&block, build3_loc (input_location, COND_EXPR, void_type_node, cond, then_b, else_b)); + /* Avoid -W*uninitialized warnings. */ + if (DECL_P (dest)) + TREE_NO_WARNING (dest) = 1; return gfc_finish_block (&block); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fdc7c40..8c992a8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-03-11 Jakub Jelinek + PR fortran/89651 + * gfortran.dg/gomp/pr89651.f90: New test. + PR middle-end/89655 PR bootstrap/89656 * gcc.c-torture/compile/pr89655.c: New test. diff --git a/gcc/testsuite/gfortran.dg/gomp/pr89651.f90 b/gcc/testsuite/gfortran.dg/gomp/pr89651.f90 new file mode 100644 index 0000000..b5054fd --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/pr89651.f90 @@ -0,0 +1,21 @@ +! PR fortran/89651 +! { dg-do compile } +! { dg-additional-options "-Wuninitialized" } + +program pr89651 + integer :: n + real, allocatable :: t(:) + n = 10 + allocate (t(n), source = 0.0) +!$omp parallel firstprivate(t) + print *, sum (t) ! { dg-bogus "lbound' may be used uninitialized in this function" } + ! { dg-bogus "ubound' may be used uninitialized in this function" "" { target *-*-* } .-1 } + ! { dg-bogus "offset' may be used uninitialized in this function" "" { target *-*-* } .-2 } +!$omp end parallel +!$omp parallel private(t) + t = 0.0 + print *, sum (t) ! { dg-bogus "lbound' may be used uninitialized in this function" } + ! { dg-bogus "ubound' may be used uninitialized in this function" "" { target *-*-* } .-1 } + ! { dg-bogus "offset' may be used uninitialized in this function" "" { target *-*-* } .-2 } +!$omp end parallel +end program pr89651 -- cgit v1.1 From 6d5d5cb5b2e9be633aaa398cd90e6cff9ee06bc9 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 12 Mar 2019 00:16:11 +0000 Subject: Daily bump. From-SVN: r269601 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 6bb0d5a..8225281 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20190311 +20190312 -- cgit v1.1 From c7e936dbc7f59ad09c28ef57e5399a4256061747 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 11 Mar 2019 23:19:22 -0400 Subject: PR c++/86521 - wrong overload resolution with ref-qualifiers. Here we were wrongly treating binding a const lvalue ref to an xvalue as direct binding, which is wrong under [dcl.init.ref] and [over.match.ref]. * call.c (build_user_type_conversion_1): Don't use a conversion to a reference of the wrong rvalueness for direct binding. From-SVN: r269602 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/call.c | 8 ++++++++ gcc/testsuite/g++.dg/cpp0x/overload-conv-3.C | 21 +++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/overload-conv-3.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8cad038..3340239 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2019-03-11 Jason Merrill + + PR c++/86521 - wrong overload resolution with ref-qualifiers. + * call.c (build_user_type_conversion_1): Don't use a conversion to a + reference of the wrong rvalueness for direct binding. + 2019-03-11 Martin Liska * cvt.c (build_expr_type_conversion): Wrap apostrophes diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 98aa5ee..bf48ae2 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -4039,6 +4039,14 @@ build_user_type_conversion_1 (tree totype, tree expr, int flags, rettype, totype, EXPR_LOCATION (expr)); } + else if (TYPE_REF_P (totype) && !ics->rvaluedness_matches_p + && TREE_CODE (TREE_TYPE (totype)) != FUNCTION_TYPE) + { + /* If we are called to convert to a reference type, we are trying + to find a direct binding per [over.match.ref], so rvaluedness + must match for non-functions. */ + cand->viable = 0; + } else if (DECL_NONCONVERTING_P (cand->fn) && ics->rank > cr_exact) { diff --git a/gcc/testsuite/g++.dg/cpp0x/overload-conv-3.C b/gcc/testsuite/g++.dg/cpp0x/overload-conv-3.C new file mode 100644 index 0000000..42a135d --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/overload-conv-3.C @@ -0,0 +1,21 @@ +// PR c++/86521 +// { dg-do compile { target c++11 } } + +template T&& move (T&); + +struct Dest { + Dest() = default; + Dest( Dest && ) = default; + Dest( Dest const & ) = delete; +}; + +struct Source { + Dest val; + operator Dest () && { return move( val ); } + operator Dest const & () const & { return val; } +}; + +int main() { + Source x; + Dest d(move(x)); // { dg-error "ambiguous" } +} -- cgit v1.1 From 05073a0d54f65876f4aa827a3ae6b00b6dc74638 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 12 Mar 2019 07:34:39 +0000 Subject: Fix last entry. From-SVN: r269603 --- gcc/ada/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 1863f5b..6cb5389 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,7 +1,7 @@ 2019-03-11 Martin Liska - * gcc-interface/misc.c (gnat_post_options) Wrap an option name - in a string format message and fix GNU coding style.: + * gcc-interface/misc.c (gnat_post_options): Wrap option name in string + format message and fix GNU coding style. 2019-02-08 Eric Botcazou -- cgit v1.1 From d9e1f37fad2db0cd749cd5c6f9e94972c8472610 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 12 Mar 2019 07:56:23 +0000 Subject: re PR tree-optimization/89664 (ICE in free_bb, at tree-ssa-math-opts.c:522) 2019-03-12 Richard Biener PR tree-optimization/89664 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Properly free the occurance tree after the early out. * gfortran.dg/pr89664.f90: New testcase. From-SVN: r269604 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/pr89664.f90 | 24 ++++++++++++++++++++++++ gcc/tree-ssa-math-opts.c | 3 ++- 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/pr89664.f90 (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 64bf601..85d11c9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-12 Richard Biener + + PR tree-optimization/89664 + * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Properly + free the occurance tree after the early out. + 2019-03-11 Jakub Jelinek PR middle-end/89655 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8c992a8..c4f79ae 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-12 Richard Biener + + PR tree-optimization/89664 + * gfortran.dg/pr89664.f90: New testcase. + 2019-03-11 Jakub Jelinek PR fortran/89651 diff --git a/gcc/testsuite/gfortran.dg/pr89664.f90 b/gcc/testsuite/gfortran.dg/pr89664.f90 new file mode 100644 index 0000000..5557806 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr89664.f90 @@ -0,0 +1,24 @@ +! { dg-do compile } +! { dg-options "-Ofast" } + +subroutine s (x) + real :: x + call sub (x) +end +subroutine sub (x) + real :: x, y + logical :: a, b + real :: f1, f2, f3, f4 + y = f1() + a = .false. + if ( f2() > f3() ) a = .true. + b = .false. + if ( f2() > f4() ) b = .true. + if ( a ) then + x = 1.0 + else if ( b ) then + x = 1.0/y**2 + else + x = 1.0/y - y**2 + end if +end diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index 5f1b369..cb8a914 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -799,7 +799,7 @@ execute_cse_reciprocals_1 (gimple_stmt_iterator *def_gsi, tree def) /* If it is more profitable to optimize 1 / x, don't optimize 1 / (x * x). */ if (sqrt_recip_count > square_recip_count) - return; + goto out; /* Do the expensive part only if we can hope to optimize something. */ if (count + square_recip_count >= threshold && count >= 1) @@ -842,6 +842,7 @@ execute_cse_reciprocals_1 (gimple_stmt_iterator *def_gsi, tree def) } } +out: for (occ = occ_head; occ; ) occ = free_bb (occ); -- cgit v1.1 From 1c178a5af523f2baf7c0501f86190ea3e2a45cbf Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 12 Mar 2019 09:17:08 +0100 Subject: re PR middle-end/89663 (ICE in expand_builtin_int_roundingfn_2, at builtins.c:2831) PR middle-end/89663 * builtins.c (expand_builtin_int_roundingfn, expand_builtin_int_roundingfn_2): Return NULL_RTX instead of gcc_unreachable if validate_arglist fails. * gcc.c-torture/compile/pr89663-1.c: New test. * gcc.c-torture/compile/pr89663-2.c: New test. From-SVN: r269605 --- gcc/ChangeLog | 7 +++ gcc/builtins.c | 4 +- gcc/testsuite/ChangeLog | 6 ++ gcc/testsuite/gcc.c-torture/compile/pr89663-1.c | 81 ++++++++++++++++++++++++ gcc/testsuite/gcc.c-torture/compile/pr89663-2.c | 82 +++++++++++++++++++++++++ 5 files changed, 178 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr89663-1.c create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr89663-2.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 85d11c9..87aa2aa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-03-12 Jakub Jelinek + + PR middle-end/89663 + * builtins.c (expand_builtin_int_roundingfn, + expand_builtin_int_roundingfn_2): Return NULL_RTX instead of + gcc_unreachable if validate_arglist fails. + 2019-03-12 Richard Biener PR tree-optimization/89664 diff --git a/gcc/builtins.c b/gcc/builtins.c index a65eb88..93f829f 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -2692,7 +2692,7 @@ expand_builtin_int_roundingfn (tree exp, rtx target) tree arg; if (!validate_arglist (exp, REAL_TYPE, VOID_TYPE)) - gcc_unreachable (); + return NULL_RTX; arg = CALL_EXPR_ARG (exp, 0); @@ -2828,7 +2828,7 @@ expand_builtin_int_roundingfn_2 (tree exp, rtx target) enum built_in_function fallback_fn = BUILT_IN_NONE; if (!validate_arglist (exp, REAL_TYPE, VOID_TYPE)) - gcc_unreachable (); + return NULL_RTX; arg = CALL_EXPR_ARG (exp, 0); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c4f79ae..9b20bdf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-12 Jakub Jelinek + + PR middle-end/89663 + * gcc.c-torture/compile/pr89663-1.c: New test. + * gcc.c-torture/compile/pr89663-2.c: New test. + 2019-03-12 Richard Biener PR tree-optimization/89664 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr89663-1.c b/gcc/testsuite/gcc.c-torture/compile/pr89663-1.c new file mode 100644 index 0000000..4fc2d0d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr89663-1.c @@ -0,0 +1,81 @@ +/* PR middle-end/89663 */ + +int irint (); +long lrint (); +long long llrint (); +int iround (); +long lround (); +long long llround (); +int iceil (); +long lceil (); +long long llceil (); +int ifloor (); +long lfloor (); +long long llfloor (); +int irintf (); +long lrintf (); +long long llrintf (); +int iroundf (); +long lroundf (); +long long llroundf (); +int iceilf (); +long lceilf (); +long long llceilf (); +int ifloorf (); +long lfloorf (); +long long llfloorf (); +int irintl (); +long lrintl (); +long long llrintl (); +int iroundl (); +long lroundl (); +long long llroundl (); +int iceill (); +long lceill (); +long long llceill (); +int ifloorl (); +long lfloorl (); +long long llfloorl (); + +void +foo (long long *p) +{ + int n = 0; +#define T(f) p[n++] = f (1); + T (irint) + T (lrint) + T (llrint) + T (iround) + T (lround) + T (llround) + T (iceil) + T (lceil) + T (llceil) + T (ifloor) + T (lfloor) + T (llfloor) + T (irintf) + T (lrintf) + T (llrintf) + T (iroundf) + T (lroundf) + T (llroundf) + T (iceilf) + T (lceilf) + T (llceilf) + T (ifloorf) + T (lfloorf) + T (llfloorf) + T (irintl) + T (lrintl) + T (llrintl) + T (iroundl) + T (lroundl) + T (llroundl) + T (iceill) + T (lceill) + T (llceill) + T (ifloorl) + T (lfloorl) + T (llfloorl) +} diff --git a/gcc/testsuite/gcc.c-torture/compile/pr89663-2.c b/gcc/testsuite/gcc.c-torture/compile/pr89663-2.c new file mode 100644 index 0000000..052fe69 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr89663-2.c @@ -0,0 +1,82 @@ +/* PR middle-end/89663 */ + +int irint (double); +long lrint (double); +long long llrint (double); +int iround (double); +long lround (double); +long long llround (double); +int iceil (double); +long lceil (double); +long long llceil (double); +int ifloor (double); +long lfloor (double); +long long llfloor (double); +int irintf (float); +long lrintf (float); +long long llrintf (float); +int iroundf (float); +long lroundf (float); +long long llroundf (float); +int iceilf (float); +long lceilf (float); +long long llceilf (float); +int ifloorf (float); +long lfloorf (float); +long long llfloorf (float); +int irintl (long double); +long lrintl (long double); +long long llrintl (long double); +int iroundl (long double); +long lroundl (long double); +long long llroundl (long double); +int iceill (long double); +long lceill (long double); +long long llceill (long double); +int ifloorl (long double); +long lfloorl (long double); +long long llfloorl (long double); + +void +foo (long long *p) +{ + int (*fn) (int); + int n = 0; +#define T(f) fn = (int (*) (int)) f; p[n++] = fn (1); + T (irint) + T (lrint) + T (llrint) + T (iround) + T (lround) + T (llround) + T (iceil) + T (lceil) + T (llceil) + T (ifloor) + T (lfloor) + T (llfloor) + T (irintf) + T (lrintf) + T (llrintf) + T (iroundf) + T (lroundf) + T (llroundf) + T (iceilf) + T (lceilf) + T (llceilf) + T (ifloorf) + T (lfloorf) + T (llfloorf) + T (irintl) + T (lrintl) + T (llrintl) + T (iroundl) + T (lroundl) + T (llroundl) + T (iceill) + T (lceill) + T (llceill) + T (ifloorl) + T (lfloorl) + T (llfloorl) +} -- cgit v1.1 From 63c79a7509c1ce5e8439d23a8f2de096ce0dec7c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 12 Mar 2019 11:07:25 +0100 Subject: re PR target/52726 (Composed error message will not get translated) PR target/52726 * config/s390/s390.md (tabort): Use %wd instead of HOST_WIDE_INT_PRINT_DEC in error message, reword to avoid two capital letters and periods. * config/tilepro/tilepro.c (tilepro_print_operand): Use %wd in output_operand_lossage instead of HOST_WIDE_INT_PRINT_DEC, replace 's with %< and %>. From-SVN: r269607 --- gcc/ChangeLog | 8 ++++++++ gcc/config/s390/s390.md | 5 ++--- gcc/config/tilepro/tilepro.c | 3 +-- 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 87aa2aa..8eedde1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2019-03-12 Jakub Jelinek + PR target/52726 + * config/s390/s390.md (tabort): Use %wd instead of + HOST_WIDE_INT_PRINT_DEC in error message, reword to avoid two capital + letters and periods. + * config/tilepro/tilepro.c (tilepro_print_operand): Use %wd in + output_operand_lossage instead of HOST_WIDE_INT_PRINT_DEC, replace + 's with %< and %>. + PR middle-end/89663 * builtins.c (expand_builtin_int_roundingfn, expand_builtin_int_roundingfn_2): Return NULL_RTX instead of diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index a307e33..f1404ad5 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -11474,9 +11474,8 @@ if (CONST_INT_P (operands[0]) && INTVAL (operands[0]) >= 0 && INTVAL (operands[0]) <= 255) { - error ("invalid transaction abort code: " HOST_WIDE_INT_PRINT_DEC - ". Values in range 0 through 255 are reserved.", - INTVAL (operands[0])); + error ("invalid transaction abort code: %wd; values in range 0 " + "through 255 are reserved", INTVAL (operands[0])); FAIL; } }) diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c index e1ae7d8..0cbea45 100644 --- a/gcc/config/tilepro/tilepro.c +++ b/gcc/config/tilepro/tilepro.c @@ -4771,8 +4771,7 @@ tilepro_print_operand (FILE *file, rtx x, int code) i = exact_log2 (n); if (i < 0) { - output_operand_lossage ("invalid %%t operand '" - HOST_WIDE_INT_PRINT_DEC "'", n); + output_operand_lossage ("invalid %%t operand %<%wd%>", n); return; } -- cgit v1.1 From df2a91dece0ac6e410e3cf48b39cba8c3744c5f3 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Tue, 12 Mar 2019 13:39:18 +0100 Subject: Fix dumping of "former thunk" info in cgraph dump 2019-03-12 Martin Jambor * cgraph.c (cgraph_node::dump): Dump more info for former thunks, terminate with newline. From-SVN: r269608 --- gcc/ChangeLog | 5 +++++ gcc/cgraph.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8eedde1..8250ada 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-03-12 Martin Jambor + + * cgraph.c (cgraph_node::dump): Dump more info for former thunks, + terminate with newline. + 2019-03-12 Jakub Jelinek PR target/52726 diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 9f0d603..49d80ad 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -2110,7 +2110,12 @@ cgraph_node::dump (FILE *f) (int)thunk.virtual_offset_p); } else if (former_thunk_p ()) - fprintf (f, " Former thunk"); + fprintf (f, " Former thunk fixed offset %i virtual value %i " + "indirect_offset %i has virtual offset %i\n", + (int)thunk.fixed_offset, + (int)thunk.virtual_value, + (int)thunk.indirect_offset, + (int)thunk.virtual_offset_p); if (alias && thunk.alias && DECL_P (thunk.alias)) { -- cgit v1.1 From c9634470ba8b918c01a7680740cf9ea13ca06967 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Tue, 12 Mar 2019 13:29:16 +0000 Subject: d/dmd: Merge upstream dmd 7423993c9 Fixes C++ mangling for substituted basic types that are target-specific. Introduces a new method that currently does nothing, but could in future make use of flag_abi_version as extern(C++) integration improves in latter versions of the D front-end. Reviewed-on: https://github.com/dlang/dmd/pull/9439 gcc/d/ChangeLog: 2019-03-12 Iain Buclaw * d-lang.cc (d_init_options): Set global.params.cplusplus to C++14. * d-target.cc (Target::cppFundamentalType): New method. From-SVN: r269611 --- gcc/d/ChangeLog | 5 ++ gcc/d/d-lang.cc | 3 + gcc/d/d-target.cc | 9 +++ gcc/d/dmd/MERGE | 2 +- gcc/d/dmd/cppmangle.c | 64 ++++++++++++++++++---- gcc/d/dmd/globals.h | 9 +++ gcc/d/dmd/target.h | 1 + gcc/testsuite/gdc.test/runnable/cppa.d | 5 ++ .../gdc.test/runnable/extra-files/cppb.cpp | 6 ++ 9 files changed, 91 insertions(+), 13 deletions(-) (limited to 'gcc') diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index 4d9fb99..c91a050 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,8 @@ +2019-03-12 Iain Buclaw + + * d-lang.cc (d_init_options): Set global.params.cplusplus to C++14. + * d-target.cc (Target::cppFundamentalType): New method. + 2019-03-09 Iain Buclaw PR d/89041 diff --git a/gcc/d/d-lang.cc b/gcc/d/d-lang.cc index b53e56e..d97525a 100644 --- a/gcc/d/d-lang.cc +++ b/gcc/d/d-lang.cc @@ -282,6 +282,9 @@ d_init_options (unsigned int, cl_decoded_option *decoded_options) global.params.betterC = false; global.params.allInst = false; + /* Default extern(C++) mangling to C++14. */ + global.params.cplusplus = CppStdRevisionCpp14; + global.params.linkswitches = new Strings (); global.params.libfiles = new Strings (); global.params.objfiles = new Strings (); diff --git a/gcc/d/d-target.cc b/gcc/d/d-target.cc index de57d92..e0cfbaf 100644 --- a/gcc/d/d-target.cc +++ b/gcc/d/d-target.cc @@ -385,6 +385,15 @@ Target::cppParameterType (Parameter *arg) return t; } +/* Checks whether TYPE is a vendor-specific fundamental type. Stores the result + in IS_FUNDAMENTAL and returns true if the parameter was set. */ + +bool +Target::cppFundamentalType (const Type *, bool &) +{ + return false; +} + /* Return the default system linkage for the target. */ LINK diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index cf5a22f..f58b620 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -fcc235e8e25f7758266f7874edd5abefb9943e0b +7423993c996ed9f73d6ba6d58f625ad3c778ca1d The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/cppmangle.c b/gcc/d/dmd/cppmangle.c index b991417..9b24fd2 100644 --- a/gcc/d/dmd/cppmangle.c +++ b/gcc/d/dmd/cppmangle.c @@ -120,6 +120,40 @@ class CppMangleVisitor : public Visitor !getQualifier(s)); // at global level } + /************************ + * Determine if type is a C++ fundamental type. + * Params: + * t = type to check + * Returns: + * true if it is a fundamental type + */ + static bool isFundamentalType(Type *t) + { + // First check the target whether some specific ABI is being followed. + bool isFundamental; + if (Target::cppFundamentalType(t, isFundamental)) + return isFundamental; + if (t->ty == Tenum) + { + // Peel off enum type from special types. + TypeEnum *te = (TypeEnum *)t; + if (te->sym->isSpecial()) + t = te->sym->getMemtype(Loc()); + } + + // Fundamental arithmetic types: + // 1. integral types: bool, char, int, ... + // 2. floating point types: float, double, real + // 3. void + // 4. null pointer: std::nullptr_t (since C++11) + if (t->ty == Tvoid || t->ty == Tbool) + return true; + else if (t->ty == Tnull && global.params.cplusplus >= CppStdRevisionCpp11) + return true; + else + return t->isTypeBasic() && (t->isintegral() || t->isreal()); + } + /****************************** * Write the mangled representation of the template arguments. * Params: @@ -741,7 +775,8 @@ public: */ void writeBasicType(Type *t, char p, char c) { - if (p || t->isConst()) + // Only do substitutions for non-fundamental types. + if (!isFundamentalType(t) || t->isConst()) { if (substitute(t)) return; @@ -767,6 +802,22 @@ public: if (t->isImmutable() || t->isShared()) return error(t); + // Handle any target-specific basic types. + if (const char *tm = Target::cppTypeMangle(t)) + { + // Only do substitutions for non-fundamental types. + if (!isFundamentalType(t) || t->isConst()) + { + if (substitute(t)) + return; + else + append(t); + } + CV_qualifiers(t); + buf->writestring(tm); + return; + } + /* : * v void * w wchar_t @@ -832,17 +883,6 @@ public: case Tcomplex80: p = 'C'; c = 'e'; break; default: - // Handle any target-specific basic types. - if (const char *tm = Target::cppTypeMangle(t)) - { - if (substitute(t)) - return; - else - append(t); - CV_qualifiers(t); - buf->writestring(tm); - return; - } return error(t); } writeBasicType(t, p, c); diff --git a/gcc/d/dmd/globals.h b/gcc/d/dmd/globals.h index 6c37cca..e2d42c7 100644 --- a/gcc/d/dmd/globals.h +++ b/gcc/d/dmd/globals.h @@ -55,6 +55,14 @@ enum CPU native // the machine the compiler is being run on }; +enum CppStdRevision +{ + CppStdRevisionCpp98 = 199711, + CppStdRevisionCpp11 = 201103, + CppStdRevisionCpp14 = 201402, + CppStdRevisionCpp17 = 201703 +}; + // Put command line switches in here struct Param { @@ -114,6 +122,7 @@ struct Param bool check10378; // check for issues transitioning to 10738 bool bug10378; // use pre-bugzilla 10378 search strategy bool vsafe; // use enhanced @safe checking + unsigned cplusplus; // version of C++ name mangling to support bool showGaggedErrors; // print gagged errors anyway CPU cpu; // CPU instruction set to target diff --git a/gcc/d/dmd/target.h b/gcc/d/dmd/target.h index 66be201..1729bc3 100644 --- a/gcc/d/dmd/target.h +++ b/gcc/d/dmd/target.h @@ -71,5 +71,6 @@ struct Target static const char *cppTypeInfoMangle(ClassDeclaration *cd); static const char *cppTypeMangle(Type *t); static Type *cppParameterType(Parameter *p); + static bool cppFundamentalType(const Type *t, bool& isFundamental); static LINK systemLinkage(); }; diff --git a/gcc/testsuite/gdc.test/runnable/cppa.d b/gcc/testsuite/gdc.test/runnable/cppa.d index 82b93ad..6b2bafb 100644 --- a/gcc/testsuite/gdc.test/runnable/cppa.d +++ b/gcc/testsuite/gdc.test/runnable/cppa.d @@ -619,6 +619,7 @@ else alias c_long_double myld; extern (C++) myld testld(myld); +extern (C++) myld testldld(myld, myld); void test15() @@ -626,6 +627,10 @@ void test15() myld ld = 5.0; ld = testld(ld); assert(ld == 6.0); + + myld ld2 = 5.0; + ld2 = testldld(ld2, ld2); + assert(ld2 == 6.0); } /****************************************/ diff --git a/gcc/testsuite/gdc.test/runnable/extra-files/cppb.cpp b/gcc/testsuite/gdc.test/runnable/extra-files/cppb.cpp index 7574c5f..587145c 100644 --- a/gcc/testsuite/gdc.test/runnable/extra-files/cppb.cpp +++ b/gcc/testsuite/gdc.test/runnable/extra-files/cppb.cpp @@ -439,6 +439,12 @@ long double testld(long double ld) return ld + 1; } +long double testldld(long double ld1, long double ld2) +{ + assert(ld1 == 5); + return ld2 + 1; +} + long testl(long lng) { assert(lng == 5); -- cgit v1.1 From 0e3088806577e8050d6cc10215196d5f57cb5aa4 Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Tue, 12 Mar 2019 13:40:51 +0000 Subject: re PR fortran/89363 (RANK incorrect for unallocated allocatable) 2019-03-12 Paul Thomas PR fortran/89363 PR fortran/89364 * trans-expr.c (set_dtype_for_unallocated): New function. (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and pointer arguments. (gfc_conv_procedure_call): Likewise. Also, set the ubound of the final dimension to -1 for assumed rank formal args that are associated with assumed size arrays. * trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for the final dimension of assumed rank entities that are argument associated with assumed size arrays. (gfc_conv_intrinsic_shape): Likewise return -1 for the final dimension of the shape intrinsic. 2019-03-12 Paul Thomas PR fortran/89363 * gfortran.dg/assumed_rank_16.f90: New test. PR fortran/89364 * gfortran.dg/assumed_rank_17.f90: New test. From-SVN: r269612 --- gcc/fortran/ChangeLog | 16 ++++++ gcc/fortran/trans-expr.c | 79 ++++++++++++++++++++++++++ gcc/fortran/trans-intrinsic.c | 82 ++++++++++++++++++++++++++- gcc/testsuite/ChangeLog | 12 +++- gcc/testsuite/gfortran.dg/assumed_rank_16.f90 | 45 +++++++++++++++ gcc/testsuite/gfortran.dg/assumed_rank_17.f90 | 34 +++++++++++ 6 files changed, 264 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/assumed_rank_16.f90 create mode 100644 gcc/testsuite/gfortran.dg/assumed_rank_17.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index a3b47ac..9cefe39 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,19 @@ +2019-03-12 Paul Thomas + + PR fortran/89363 + PR fortran/89364 + * trans-expr.c (set_dtype_for_unallocated): New function. + (gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and + pointer arguments. + (gfc_conv_procedure_call): Likewise. Also, set the ubound of + the final dimension to -1 for assumed rank formal args that are + associated with assumed size arrays. + * trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for + the final dimension of assumed rank entities that are argument + associated with assumed size arrays. + (gfc_conv_intrinsic_shape): Likewise return -1 for the final + dimension of the shape intrinsic. + 2019-03-11 Jakub Jelinek PR fortran/89651 diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 0702713..1a48e73 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -4919,6 +4919,52 @@ expr_may_alias_variables (gfc_expr *e, bool array_may_alias) } +/* A helper function to set the dtype for unallocated or unassociated + entities. */ + +static void +set_dtype_for_unallocated (gfc_se *parmse, gfc_expr *e) +{ + tree tmp; + tree desc; + tree cond; + tree type; + stmtblock_t block; + + /* TODO Figure out how to handle optional dummies. */ + if (e && e->expr_type == EXPR_VARIABLE + && e->symtree->n.sym->attr.optional) + return; + + desc = parmse->expr; + if (desc == NULL_TREE) + return; + + if (POINTER_TYPE_P (TREE_TYPE (desc))) + desc = build_fold_indirect_ref_loc (input_location, desc); + + if (!GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (desc))) + return; + + gfc_init_block (&block); + tmp = gfc_conv_descriptor_data_get (desc); + cond = fold_build2_loc (input_location, EQ_EXPR, + logical_type_node, tmp, + build_int_cst (TREE_TYPE (tmp), 0)); + tmp = gfc_conv_descriptor_dtype (desc); + type = gfc_get_element_type (TREE_TYPE (desc)); + tmp = fold_build2_loc (input_location, MODIFY_EXPR, + TREE_TYPE (tmp), tmp, + gfc_get_dtype_rank_type (e->rank, type)); + gfc_add_expr_to_block (&block, tmp); + cond = build3_v (COND_EXPR, cond, + gfc_finish_block (&block), + build_empty_stmt (input_location)); + gfc_add_expr_to_block (&parmse->pre, cond); +} + + + /* Provide an interface between gfortran array descriptors and the F2018:18.4 ISO_Fortran_binding array descriptors. */ @@ -4958,6 +5004,15 @@ gfc_conv_gfc_desc_to_cfi_desc (gfc_se *parmse, gfc_expr *e, gfc_symbol *fsym) parmse->expr = build_fold_indirect_ref_loc (input_location, parmse->expr); + /* Unallocated allocatable arrays and unassociated pointer arrays + need their dtype setting if they are argument associated with + assumed rank dummies. */ + if (fsym && fsym->as + && fsym->as->type == AS_ASSUMED_RANK + && (gfc_expr_attr (e).pointer + || gfc_expr_attr (e).allocatable)) + set_dtype_for_unallocated (parmse, e); + /* All the temporary descriptors are marked as DECL_ARTIFICIAL. If the expression type is different from the descriptor type, then the offset must be found (eg. to a component ref or substring) @@ -5953,6 +6008,30 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, gfc_conv_array_parameter (&parmse, e, nodesc_arg, fsym, sym->name, NULL); + /* Unallocated allocatable arrays and unassociated pointer arrays + need their dtype setting if they are argument associated with + assumed rank dummies. */ + if (!sym->attr.is_bind_c && e && fsym && fsym->as + && fsym->as->type == AS_ASSUMED_RANK) + { + if (gfc_expr_attr (e).pointer + || gfc_expr_attr (e).allocatable) + set_dtype_for_unallocated (&parmse, e); + else if (e->expr_type == EXPR_VARIABLE + && e->symtree->n.sym->attr.dummy + && e->symtree->n.sym->as + && e->symtree->n.sym->as->type == AS_ASSUMED_SIZE) + { + tree minus_one; + tmp = build_fold_indirect_ref_loc (input_location, + parmse.expr); + minus_one = build_int_cst (gfc_array_index_type, -1); + gfc_conv_descriptor_ubound_set (&parmse.pre, tmp, + gfc_rank_cst[e->rank - 1], + minus_one); + } + } + /* If an ALLOCATABLE dummy argument has INTENT(OUT) and is allocated on entry, it must be deallocated. */ if (fsym && fsym->attr.allocatable diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 64d5258..2eb5d1a 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -2873,7 +2873,7 @@ gfc_conv_intrinsic_is_contiguous (gfc_se * se, gfc_expr * expr) gfc_add_block_to_block (&se->pre, &argse.pre); gfc_add_block_to_block (&se->post, &argse.post); desc = gfc_evaluate_now (argse.expr, &se->pre); - + stride = gfc_conv_descriptor_stride_get (desc, gfc_rank_cst[0]); cond = fold_build2_loc (input_location, EQ_EXPR, boolean_type_node, stride, build_int_cst (TREE_TYPE (stride), 1)); @@ -3103,6 +3103,29 @@ gfc_conv_intrinsic_bound (gfc_se * se, gfc_expr * expr, int upper) se->expr = gfc_index_one_node; } + /* According to F2018 16.9.172, para 5, an assumed rank object, argument + associated with and assumed size array, has the ubound of the final + dimension set to -1 and UBOUND must return this. */ + if (upper && as && as->type == AS_ASSUMED_RANK) + { + tree minus_one = build_int_cst (gfc_array_index_type, -1); + tree rank = fold_convert (gfc_array_index_type, + gfc_conv_descriptor_rank (desc)); + rank = fold_build2_loc (input_location, PLUS_EXPR, + gfc_array_index_type, rank, minus_one); + /* Fix the expression to stop it from becoming even more complicated. */ + se->expr = gfc_evaluate_now (se->expr, &se->pre); + cond = fold_build2_loc (input_location, NE_EXPR, + logical_type_node, bound, rank); + cond1 = fold_build2_loc (input_location, NE_EXPR, + logical_type_node, ubound, minus_one); + cond = fold_build2_loc (input_location, TRUTH_OR_EXPR, + logical_type_node, cond, cond1); + se->expr = fold_build3_loc (input_location, COND_EXPR, + gfc_array_index_type, cond, + se->expr, minus_one); + } + type = gfc_typenode_for_spec (&expr->ts); se->expr = convert (type, se->expr); } @@ -6243,6 +6266,8 @@ gfc_conv_intrinsic_shape (gfc_se *se, gfc_expr *expr) { gfc_actual_arglist *s, *k; gfc_expr *e; + gfc_array_spec *as; + gfc_ss *ss; /* Remove the KIND argument, if present. */ s = expr->value.function.actual; @@ -6252,6 +6277,59 @@ gfc_conv_intrinsic_shape (gfc_se *se, gfc_expr *expr) k->expr = NULL; gfc_conv_intrinsic_funcall (se, expr); + + as = gfc_get_full_arrayspec_from_expr (s->expr);; + ss = gfc_walk_expr (s->expr); + + /* According to F2018 16.9.172, para 5, an assumed rank entity, argument + associated with an assumed size array, has the ubound of the final + dimension set to -1 and SHAPE must return this. */ + if (as && as->type == AS_ASSUMED_RANK + && se->expr && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (se->expr)) + && ss && ss->info->type == GFC_SS_SECTION) + { + tree desc, rank, minus_one, cond, ubound, tmp; + stmtblock_t block; + gfc_se ase; + + minus_one = build_int_cst (gfc_array_index_type, -1); + + /* Recover the descriptor for the array. */ + gfc_init_se (&ase, NULL); + ase.descriptor_only = 1; + gfc_conv_expr_lhs (&ase, ss->info->expr); + + /* Obtain rank-1 so that we can address both descriptors. */ + rank = gfc_conv_descriptor_rank (ase.expr); + rank = fold_convert (gfc_array_index_type, rank); + rank = fold_build2_loc (input_location, PLUS_EXPR, + gfc_array_index_type, + rank, minus_one); + rank = gfc_evaluate_now (rank, &se->pre); + + /* The ubound for the final dimension will be tested for being -1. */ + ubound = gfc_conv_descriptor_ubound_get (ase.expr, rank); + ubound = gfc_evaluate_now (ubound, &se->pre); + cond = fold_build2_loc (input_location, EQ_EXPR, + logical_type_node, + ubound, minus_one); + + /* Obtain the last element of the result from the library shape + intrinsic and set it to -1 if that is the value of ubound. */ + desc = se->expr; + tmp = gfc_conv_array_data (desc); + tmp = build_fold_indirect_ref_loc (input_location, tmp); + tmp = gfc_build_array_ref (tmp, rank, NULL, NULL); + + gfc_init_block (&block); + gfc_add_modify (&block, tmp, build_int_cst (TREE_TYPE (tmp), -1)); + + cond = build3_v (COND_EXPR, cond, + gfc_finish_block (&block), + build_empty_stmt (input_location)); + gfc_add_expr_to_block (&se->pre, cond); + } + } static void @@ -10390,7 +10468,7 @@ gfc_inline_intrinsic_function_p (gfc_expr *expr) && maskexpr->symtree->n.sym->attr.dummy && maskexpr->symtree->n.sym->attr.optional) return false; - + return true; case GFC_ISYM_TRANSPOSE: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9b20bdf..baba609 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2019-03-12 Paul Thomas + + PR fortran/89363 + * gfortran.dg/assumed_rank_16.f90: New test. + + PR fortran/89364 + * gfortran.dg/assumed_rank_17.f90: New test. + 2019-03-12 Jakub Jelinek PR middle-end/89663 @@ -731,7 +739,7 @@ 2019-02-25 Dominique d'Humieres PR fortran/89282 - * gfortran.dg/overload_3.f90: New test. + * gfortran.dg/overload_3.f90: New test. 2019-02-25 Jakub Jelinek @@ -741,7 +749,7 @@ 2019-02-25 Dominique d'Humieres PR libfortran/89274 - * gfortran.dg/list_directed_large.f90: New test. + * gfortran.dg/list_directed_large.f90: New test. 2019-02-25 Jakub Jelinek diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_16.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_16.f90 new file mode 100644 index 0000000..6d8797e --- /dev/null +++ b/gcc/testsuite/gfortran.dg/assumed_rank_16.f90 @@ -0,0 +1,45 @@ +! { dg-do run } +! +! Tests the fix for PR89363, in which the rank of unallocated or unassociated +! entities, argument associated with assumed rank dummies, was not being set. +! +! Contributed by Reinhold Bader +! +module mod_ass_rank_02 + implicit none +contains + subroutine procr(this,flag) + real, allocatable :: this(..) + logical :: flag + if (rank(this) /= 2 .or. allocated(this)) then + write(*,*) 'FAIL procr', rank(this), allocated(this) + flag = .FALSE. + end if + end subroutine procr + subroutine procs(this,flag) + real, allocatable :: this(..) + logical :: flag + if (rank(this) /= 2 .or. .not. allocated(this)) then + write(*,*) 'FAIL procs status', rank(this), allocated(this) + flag = .FALSE. + end if + if (size(this,1) /= 2 .and. size(this,2) /= 5) then + write(*,*) 'FAIL procs shape', size(this) + flag = .FALSE. + end if + end subroutine procs +end module mod_ass_rank_02 +program ass_rank_02 + use mod_ass_rank_02 + implicit none + real, allocatable :: x(:,:) + logical :: flag + + flag = .TRUE. + call procr(x,flag) + if (.not.flag) stop 1 + allocate(x(2,5)) + call procs(x,flag) + if (.not.flag) stop 2 + deallocate(x) +end program ass_rank_02 diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_17.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_17.f90 new file mode 100644 index 0000000..ec78baf --- /dev/null +++ b/gcc/testsuite/gfortran.dg/assumed_rank_17.f90 @@ -0,0 +1,34 @@ +! { dg-do run } +! +! Tests the fix for PR89364, in which the ubound and the last element of +! shape were note returning -1 for assumed rank entities, argument +! associated with assumed size dummies. +! +! Contributed by Reinhold Bader +! +module mod_ass_rank_04 + implicit none +contains + subroutine si(this) + real :: this(4, *) + call sa(this) + end subroutine si + subroutine sa(this) + real :: this(..) + if (rank(this) /= 2) then + stop 1 + end if + if (maxval(abs(shape(this) - [4,-1])) > 0) then + stop 2 + end if + if (ubound(this,2) /= lbound(this,2) - 2) then + stop 3 + end if + end subroutine sa +end module mod_ass_rank_04 +program ass_rank_04 + use mod_ass_rank_04 + implicit none + real :: y(9) + call si(y(2)) +end program ass_rank_04 -- cgit v1.1 From 1fe61adfcc44c4e6bf4b02f1d4043ba708b2953d Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 12 Mar 2019 16:11:42 +0100 Subject: Replace can't in error messages for Fortran. 2019-03-12 Martin Liska * c-opts.c (c_common_handle_option): Wrap option with %< and %>. 2019-03-12 Martin Liska * decl.c (add_init_expr_to_sym): Replace usage of 'can't' with 'cannot'. (variable_decl): Likewise. (cray_pointer_decl): Likewise. (match_binding_attributes): Likewise. * f95-lang.c (gfc_init): Likewise. * interface.c (gfc_check_typebound_override): Likewise. * intrinsic.c (make_generic): Likewise. * module.c (dump_module): Likewise. (gfc_use_module): Likewise. * primary.c (gfc_convert_to_structure_constructor): Likewise. * resolve.c (resolve_entries): Likewise. (check_generic_tbp_ambiguity): Likewise. (get_checked_tb_operator_target): Likewise. * scanner.c (load_file): Likewise. * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise. 2019-03-12 Martin Liska * config/i386/i386.c: Reword an error message. 2019-03-12 Martin Liska * gfortran.dg/abstract_type_3.f03: Amend test-case scan patterns. * gfortran.dg/binding_label_tests_4.f03: Likewise. * gfortran.dg/c_f_pointer_tests_6.f90: Likewise. * gfortran.dg/c_funloc_tests_6.f90: Likewise. * gfortran.dg/c_loc_tests_17.f90: Likewise. * gfortran.dg/constructor_9.f90: Likewise. * gfortran.dg/dec_structure_8.f90: Likewise. * gfortran.dg/entry_4.f90: Likewise. * gfortran.dg/init_char_with_nonchar_ctr.f90: Likewise. * gfortran.dg/initialization_23.f90: Likewise. * gfortran.dg/logical_assignment_1.f90: Likewise. * gfortran.dg/pr80752.f90: Likewise. * gfortran.dg/pr88116_1.f90: Likewise. * gfortran.dg/pr88467.f90: Likewise. * gfortran.dg/typebound_call_7.f03: Likewise. * gfortran.dg/typebound_generic_1.f03: Likewise. * gfortran.dg/typebound_operator_2.f03: Likewise. * gfortran.dg/typebound_operator_4.f03: Likewise. * gfortran.dg/typebound_proc_9.f03: Likewise. * gfortran.dg/unlimited_polymorphic_2.f03: Likewise. From-SVN: r269616 --- gcc/ChangeLog | 4 ++++ gcc/c-family/ChangeLog | 4 ++++ gcc/c-family/c-opts.c | 2 +- gcc/config/i386/i386.c | 3 ++- gcc/fortran/ChangeLog | 19 +++++++++++++++++ gcc/fortran/decl.c | 10 ++++----- gcc/fortran/f95-lang.c | 2 +- gcc/fortran/interface.c | 2 +- gcc/fortran/intrinsic.c | 8 ++++---- gcc/fortran/module.c | 14 ++++++------- gcc/fortran/primary.c | 2 +- gcc/fortran/resolve.c | 18 ++++++++-------- gcc/fortran/scanner.c | 2 +- gcc/fortran/trans-expr.c | 4 ++-- gcc/testsuite/ChangeLog | 24 ++++++++++++++++++++++ gcc/testsuite/gfortran.dg/abstract_type_3.f03 | 2 +- .../gfortran.dg/binding_label_tests_4.f03 | 2 +- gcc/testsuite/gfortran.dg/c_f_pointer_tests_6.f90 | 2 +- gcc/testsuite/gfortran.dg/c_funloc_tests_6.f90 | 4 ++-- gcc/testsuite/gfortran.dg/c_loc_tests_17.f90 | 2 +- gcc/testsuite/gfortran.dg/constructor_9.f90 | 2 +- gcc/testsuite/gfortran.dg/dec_structure_8.f90 | 2 +- gcc/testsuite/gfortran.dg/entry_4.f90 | 8 ++++---- .../gfortran.dg/init_char_with_nonchar_ctr.f90 | 8 ++++---- gcc/testsuite/gfortran.dg/initialization_23.f90 | 2 +- gcc/testsuite/gfortran.dg/logical_assignment_1.f90 | 2 +- gcc/testsuite/gfortran.dg/pr80752.f90 | 2 +- gcc/testsuite/gfortran.dg/pr88116_1.f90 | 2 +- gcc/testsuite/gfortran.dg/pr88467.f90 | 2 +- gcc/testsuite/gfortran.dg/typebound_call_7.f03 | 2 +- gcc/testsuite/gfortran.dg/typebound_generic_1.f03 | 4 ++-- gcc/testsuite/gfortran.dg/typebound_operator_2.f03 | 4 ++-- gcc/testsuite/gfortran.dg/typebound_operator_4.f03 | 4 ++-- gcc/testsuite/gfortran.dg/typebound_proc_9.f03 | 2 +- .../gfortran.dg/unlimited_polymorphic_2.f03 | 2 +- 35 files changed, 115 insertions(+), 63 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8250ada..f9cc4c2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2019-03-12 Martin Liska + + * config/i386/i386.c: Reword an error message. + 2019-03-12 Martin Jambor * cgraph.c (cgraph_node::dump): Dump more info for former thunks, diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 885e326..910cee8 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,7 @@ +2019-03-12 Martin Liska + + * c-opts.c (c_common_handle_option): Wrap option with %< and %>. + 2019-03-11 Martin Liska * c-opts.c (c_common_post_options): Wrap apostrophes diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index daa02a5..454cfa0 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -324,7 +324,7 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, else { if (quote_chain_split) - error ("-I- specified twice"); + error ("%<-I-%> specified twice"); quote_chain_split = true; split_quote_chain (); inform (input_location, "obsolete option %<-I-%> used, " diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 896c6f3..fe45907 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -38375,7 +38375,8 @@ rdseed_step: mode0 = insn_data[icode].operand[0].mode; if (!insn_data[icode].operand[0].predicate (op0, mode0)) { - error ("xabort argument must be an 8-bit immediate"); + error ("the argument to % intrinsic must " + "be an 8-bit immediate"); return const0_rtx; } emit_insn (gen_xabort (op0)); diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 9cefe39..4982574 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,22 @@ +2019-03-12 Martin Liska + + * decl.c (add_init_expr_to_sym): Replace usage of 'can't' + with 'cannot'. + (variable_decl): Likewise. + (cray_pointer_decl): Likewise. + (match_binding_attributes): Likewise. + * f95-lang.c (gfc_init): Likewise. + * interface.c (gfc_check_typebound_override): Likewise. + * intrinsic.c (make_generic): Likewise. + * module.c (dump_module): Likewise. + (gfc_use_module): Likewise. + * primary.c (gfc_convert_to_structure_constructor): Likewise. + * resolve.c (resolve_entries): Likewise. + (check_generic_tbp_ambiguity): Likewise. + (get_checked_tb_operator_target): Likewise. + * scanner.c (load_file): Likewise. + * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise. + 2019-03-12 Paul Thomas PR fortran/89363 diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index a29e2db..f6411f1 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -1978,7 +1978,7 @@ add_init_expr_to_sym (const char *name, gfc_expr **initp, locus *var_locus) if (init->rank == 0) { - gfc_error ("Can't initialize implied-shape array at %L" + gfc_error ("Cannot initialize implied-shape array at %L" " with scalar", &sym->declared_at); return false; } @@ -2490,7 +2490,7 @@ variable_decl (int elem) if (as->type == AS_IMPLIED_SHAPE && current_attr.flavor != FL_PARAMETER) { m = MATCH_ERROR; - gfc_error ("Non-PARAMETER symbol %qs at %L can't be implied-shape", + gfc_error ("Non-PARAMETER symbol %qs at %L cannot be implied-shape", name, &var_locus); goto cleanup; } @@ -2668,7 +2668,7 @@ variable_decl (int elem) else { if (!gfc_set_array_spec (sym, cp_as, &var_locus)) - gfc_internal_error ("Couldn't set pointee array spec."); + gfc_internal_error ("Cannot set pointee array spec."); /* Fix the array spec. */ m = gfc_mod_pointee_as (sym->as); @@ -8538,7 +8538,7 @@ cray_pointer_decl (void) if (cpte->as == NULL) { if (!gfc_set_array_spec (cpte, as, &var_locus)) - gfc_internal_error ("Couldn't set Cray pointee array spec."); + gfc_internal_error ("Cannot set Cray pointee array spec."); } else if (as != NULL) { @@ -10706,7 +10706,7 @@ match_binding_attributes (gfc_typebound_proc* ba, bool generic, bool ppc) /* NON_OVERRIDABLE and DEFERRED exclude themselves. */ if (ba->non_overridable && ba->deferred) { - gfc_error ("NON_OVERRIDABLE and DEFERRED can't both appear at %C"); + gfc_error ("NON_OVERRIDABLE and DEFERRED cannot both appear at %C"); goto error; } diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index ad81f7d..3e3d304 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -248,7 +248,7 @@ gfc_init (void) gfc_init_1 (); if (!gfc_new_file ()) - fatal_error (input_location, "can't open input file: %s", gfc_source_file); + fatal_error (input_location, "cannot open input file: %s", gfc_source_file); if (flag_preprocess_only) return false; diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index a07e658d..c9781d7 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -4552,7 +4552,7 @@ gfc_check_typebound_override (gfc_symtree* proc, gfc_symtree* old) /* If the overwritten procedure is GENERIC, this is an error. */ if (old->n.tb->is_generic) { - gfc_error ("Can't overwrite GENERIC %qs at %L", + gfc_error ("Cannot overwrite GENERIC %qs at %L", old->name, &proc->n.tb->where); return false; } diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index 4797b3d..c21fbdd 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -1157,7 +1157,7 @@ make_generic (const char *name, gfc_isym_id id, int standard ATTRIBUTE_UNUSED) g = gfc_find_function (name); if (g == NULL) - gfc_internal_error ("make_generic(): Can't find generic symbol %qs", + gfc_internal_error ("make_generic(): Cannot find generic symbol %qs", name); gcc_assert (g->id == id); @@ -4217,7 +4217,7 @@ keywords: gfc_error ("The argument list functions %%VAL, %%LOC or %%REF " "are not allowed in this context at %L", where); else - gfc_error ("Can't find keyword named %qs in call to %qs at %L", + gfc_error ("Cannot find keyword named %qs in call to %qs at %L", a->name, name, where); return false; } @@ -5179,12 +5179,12 @@ gfc_convert_type_warn (gfc_expr *expr, gfc_typespec *ts, int eflag, int wflag) bad: if (eflag == 1) { - gfc_error ("Can't convert %s to %s at %L", + gfc_error ("Cannot convert %s to %s at %L", gfc_typename (&from_ts), gfc_typename (ts), &expr->where); return false; } - gfc_internal_error ("Can't convert %qs to %qs at %L", + gfc_internal_error ("Cannot convert %qs to %qs at %L", gfc_typename (&from_ts), gfc_typename (ts), &expr->where); /* Not reached */ diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 320b30c..0572b8e 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -6170,7 +6170,7 @@ dump_module (const char *name, int dump_flag) /* Write the module to the temporary file. */ module_fp = gzopen (filename_tmp, "w"); if (module_fp == NULL) - gfc_fatal_error ("Can't open module file %qs for writing at %C: %s", + gfc_fatal_error ("Cannot open module file %qs for writing at %C: %s", filename_tmp, xstrerror (errno)); /* Use lbasename to ensure module files are reproducible regardless @@ -6202,16 +6202,16 @@ dump_module (const char *name, int dump_flag) { /* Module file have changed, replace the old one. */ if (remove (filename) && errno != ENOENT) - gfc_fatal_error ("Can't delete module file %qs: %s", filename, + gfc_fatal_error ("Cannot delete module file %qs: %s", filename, xstrerror (errno)); if (rename (filename_tmp, filename)) - gfc_fatal_error ("Can't rename module file %qs to %qs: %s", + gfc_fatal_error ("Cannot rename module file %qs to %qs: %s", filename_tmp, filename, xstrerror (errno)); } else { if (remove (filename_tmp)) - gfc_fatal_error ("Can't delete temporary module file %qs: %s", + gfc_fatal_error ("Cannot delete temporary module file %qs: %s", filename_tmp, xstrerror (errno)); } } @@ -7000,7 +7000,7 @@ gfc_use_module (gfc_use_list *module) module_fp = gzopen_intrinsic_module (filename); if (module_fp == NULL && module->intrinsic) - gfc_fatal_error ("Can't find an intrinsic module named %qs at %C", + gfc_fatal_error ("Cannot find an intrinsic module named %qs at %C", module_name); /* Check for the IEEE modules, so we can mark their symbols @@ -7028,7 +7028,7 @@ gfc_use_module (gfc_use_list *module) { if (gfc_state_stack->state != COMP_SUBMODULE && module->submodule_name == NULL) - gfc_fatal_error ("Can't open module file %qs for reading at %C: %s", + gfc_fatal_error ("Cannot open module file %qs for reading at %C: %s", filename, xstrerror (errno)); else gfc_fatal_error ("Module file %qs has not been generated, either " @@ -7088,7 +7088,7 @@ gfc_use_module (gfc_use_list *module) for (p = gfc_state_stack; p; p = p->previous) if ((p->state == COMP_MODULE || p->state == COMP_SUBMODULE) && strcmp (p->sym->name, module_name) == 0) - gfc_fatal_error ("Can't USE the same %smodule we're building", + gfc_fatal_error ("Cannot USE the same %smodule we're building", p->state == COMP_SUBMODULE ? "sub" : ""); init_pi_tree (); diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index 5bfb90c..e918372 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -2979,7 +2979,7 @@ gfc_convert_to_structure_constructor (gfc_expr *e, gfc_symbol *sym, gfc_expr **c if (!parent && sym->attr.abstract) { - gfc_error ("Can't construct ABSTRACT type %qs at %L", + gfc_error ("Cannot construct ABSTRACT type %qs at %L", sym->name, &expr->where); goto cleanup; } diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 1cf9cba..6677deb 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -838,22 +838,22 @@ resolve_entries (gfc_namespace *ns) if (sym->attr.dimension) { if (el == ns->entries) - gfc_error ("FUNCTION result %s can't be an array in " + gfc_error ("FUNCTION result %s cannot be an array in " "FUNCTION %s at %L", sym->name, ns->entries->sym->name, &sym->declared_at); else - gfc_error ("ENTRY result %s can't be an array in " + gfc_error ("ENTRY result %s cannot be an array in " "FUNCTION %s at %L", sym->name, ns->entries->sym->name, &sym->declared_at); } else if (sym->attr.pointer) { if (el == ns->entries) - gfc_error ("FUNCTION result %s can't be a POINTER in " + gfc_error ("FUNCTION result %s cannot be a POINTER in " "FUNCTION %s at %L", sym->name, ns->entries->sym->name, &sym->declared_at); else - gfc_error ("ENTRY result %s can't be a POINTER in " + gfc_error ("ENTRY result %s cannot be a POINTER in " "FUNCTION %s at %L", sym->name, ns->entries->sym->name, &sym->declared_at); } @@ -891,12 +891,12 @@ resolve_entries (gfc_namespace *ns) if (sym) { if (el == ns->entries) - gfc_error ("FUNCTION result %s can't be of type %s " + gfc_error ("FUNCTION result %s cannot be of type %s " "in FUNCTION %s at %L", sym->name, gfc_typename (ts), ns->entries->sym->name, &sym->declared_at); else - gfc_error ("ENTRY result %s can't be of type %s " + gfc_error ("ENTRY result %s cannot be of type %s " "in FUNCTION %s at %L", sym->name, gfc_typename (ts), ns->entries->sym->name, &sym->declared_at); @@ -13115,7 +13115,7 @@ check_generic_tbp_ambiguity (gfc_tbp_generic* t1, gfc_tbp_generic* t2, if (sym1->attr.subroutine != sym2->attr.subroutine || sym1->attr.function != sym2->attr.function) { - gfc_error ("%qs and %qs can't be mixed FUNCTION/SUBROUTINE for" + gfc_error ("%qs and %qs cannot be mixed FUNCTION/SUBROUTINE for" " GENERIC %qs at %L", sym1->name, sym2->name, generic_name, &where); return false; @@ -13250,7 +13250,7 @@ specific_found: /* If we attempt to "overwrite" a specific binding, this is an error. */ if (p->overridden && !p->overridden->is_generic) { - gfc_error ("GENERIC %qs at %L can't overwrite specific binding with" + gfc_error ("GENERIC %qs at %L cannot overwrite specific binding with" " the same name", name, &p->where); return false; } @@ -13306,7 +13306,7 @@ get_checked_tb_operator_target (gfc_tbp_generic* target, locus where) /* F08:C468. All operator bindings must have a passed-object dummy argument. */ if (target->specific->nopass) { - gfc_error ("Type-bound operator at %L can't be NOPASS", &where); + gfc_error ("Type-bound operator at %L cannot be NOPASS", &where); return NULL; } diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index 08e4521..eeba2ab 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -2469,7 +2469,7 @@ load_file (const char *realfilename, const char *displayedname, bool initial) if (input == NULL) { - gfc_error_now ("Can't open file %qs", filename); + gfc_error_now ("Cannot open file %qs", filename); return false; } } diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 1a48e73..9019c55 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -926,8 +926,8 @@ gfc_conv_intrinsic_to_class (gfc_se *parmse, gfc_expr *e, } else { - gfc_error ("Can't compute the length of the char array at %L.", - &e->where); + gfc_error ("Cannot compute the length of the char array " + "at %L.", &e->where); } } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index baba609..bf50d9d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,27 @@ +2019-03-12 Martin Liska + + * gfortran.dg/abstract_type_3.f03: Amend test-case scan + patterns. + * gfortran.dg/binding_label_tests_4.f03: Likewise. + * gfortran.dg/c_f_pointer_tests_6.f90: Likewise. + * gfortran.dg/c_funloc_tests_6.f90: Likewise. + * gfortran.dg/c_loc_tests_17.f90: Likewise. + * gfortran.dg/constructor_9.f90: Likewise. + * gfortran.dg/dec_structure_8.f90: Likewise. + * gfortran.dg/entry_4.f90: Likewise. + * gfortran.dg/init_char_with_nonchar_ctr.f90: Likewise. + * gfortran.dg/initialization_23.f90: Likewise. + * gfortran.dg/logical_assignment_1.f90: Likewise. + * gfortran.dg/pr80752.f90: Likewise. + * gfortran.dg/pr88116_1.f90: Likewise. + * gfortran.dg/pr88467.f90: Likewise. + * gfortran.dg/typebound_call_7.f03: Likewise. + * gfortran.dg/typebound_generic_1.f03: Likewise. + * gfortran.dg/typebound_operator_2.f03: Likewise. + * gfortran.dg/typebound_operator_4.f03: Likewise. + * gfortran.dg/typebound_proc_9.f03: Likewise. + * gfortran.dg/unlimited_polymorphic_2.f03: Likewise. + 2019-03-12 Paul Thomas PR fortran/89363 diff --git a/gcc/testsuite/gfortran.dg/abstract_type_3.f03 b/gcc/testsuite/gfortran.dg/abstract_type_3.f03 index e7a9d9b..5420373 100644 --- a/gcc/testsuite/gfortran.dg/abstract_type_3.f03 +++ b/gcc/testsuite/gfortran.dg/abstract_type_3.f03 @@ -41,7 +41,7 @@ CONTAINS SUBROUTINE sub (arg) ! { dg-error "is of the ABSTRACT type 'again_abst_t'" } IMPLICIT NONE TYPE(again_abst_t) :: arg - arg = again_abst_t () ! { dg-error "Can't construct ABSTRACT type 'again_abst_t'" } + arg = again_abst_t () ! { dg-error "Cannot construct ABSTRACT type 'again_abst_t'" } END SUBROUTINE sub SUBROUTINE impl () diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_4.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_4.f03 index 7214289..f8c0f04 100644 --- a/gcc/testsuite/gfortran.dg/binding_label_tests_4.f03 +++ b/gcc/testsuite/gfortran.dg/binding_label_tests_4.f03 @@ -18,6 +18,6 @@ end module B module C use A -use B ! { dg-error "Can't open module file" } +use B ! { dg-error "Cannot open module file" } end module C ! { dg-excess-errors "compilation terminated" } diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_tests_6.f90 b/gcc/testsuite/gfortran.dg/c_f_pointer_tests_6.f90 index 6dc4397..23ca88b 100644 --- a/gcc/testsuite/gfortran.dg/c_f_pointer_tests_6.f90 +++ b/gcc/testsuite/gfortran.dg/c_f_pointer_tests_6.f90 @@ -12,7 +12,7 @@ procedure(), pointer :: bar integer, pointer :: bari call c_f_procpointer(fptr,bar) ! { dg-error "Argument CPTR at .1. to C_F_PROCPOINTER shall have the type TYPE.C_FUNPTR." } call c_f_pointer(fun,bari) ! { dg-error "Argument CPTR at .1. to C_F_POINTER shall have the type TYPE.C_PTR." } -fun = fptr ! { dg-error "Can't convert TYPE.c_ptr. to TYPE.c_funptr." } +fun = fptr ! { dg-error "Cannot convert TYPE.c_ptr. to TYPE.c_funptr." } end subroutine test() diff --git a/gcc/testsuite/gfortran.dg/c_funloc_tests_6.f90 b/gcc/testsuite/gfortran.dg/c_funloc_tests_6.f90 index 669a119..45d0955 100644 --- a/gcc/testsuite/gfortran.dg/c_funloc_tests_6.f90 +++ b/gcc/testsuite/gfortran.dg/c_funloc_tests_6.f90 @@ -20,8 +20,8 @@ procedure(sub), pointer :: fsub integer, external :: noCsub procedure(integer), pointer :: fint -cp = c_funloc (sub) ! { dg-error "Can't convert TYPE.c_funptr. to TYPE.c_ptr." }) -cfp = c_loc (int) ! { dg-error "Can't convert TYPE.c_ptr. to TYPE.c_funptr." } +cp = c_funloc (sub) ! { dg-error "Cannot convert TYPE.c_funptr. to TYPE.c_ptr." }) +cfp = c_loc (int) ! { dg-error "Cannot convert TYPE.c_ptr. to TYPE.c_funptr." } call c_f_pointer (cfp, int) ! { dg-error "Argument CPTR at .1. to C_F_POINTER shall have the type TYPE.C_PTR." } call c_f_procpointer (cp, fsub) ! { dg-error "Argument CPTR at .1. to C_F_PROCPOINTER shall have the type TYPE.C_FUNPTR." } diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_17.f90 b/gcc/testsuite/gfortran.dg/c_loc_tests_17.f90 index 5e4eb8a..2ed8307 100644 --- a/gcc/testsuite/gfortran.dg/c_loc_tests_17.f90 +++ b/gcc/testsuite/gfortran.dg/c_loc_tests_17.f90 @@ -10,5 +10,5 @@ program aaaa use iso_c_binding, only : c_loc integer, target :: i type(C_PTR) :: f_ptr ! { dg-error "being used before it is defined" } - f_ptr=c_loc(i) ! { dg-error "Can't convert" } + f_ptr=c_loc(i) ! { dg-error "Cannot convert" } end program aaaa diff --git a/gcc/testsuite/gfortran.dg/constructor_9.f90 b/gcc/testsuite/gfortran.dg/constructor_9.f90 index a8e8821..a61b63a 100644 --- a/gcc/testsuite/gfortran.dg/constructor_9.f90 +++ b/gcc/testsuite/gfortran.dg/constructor_9.f90 @@ -15,6 +15,6 @@ module cf contains subroutine cfi() type(cfmde), pointer :: cfd - cfd=cfmde() ! { dg-error "Can't convert" } + cfd=cfmde() ! { dg-error "Cannot convert" } end subroutine end module diff --git a/gcc/testsuite/gfortran.dg/dec_structure_8.f90 b/gcc/testsuite/gfortran.dg/dec_structure_8.f90 index f84bf15..70faabf 100644 --- a/gcc/testsuite/gfortran.dg/dec_structure_8.f90 +++ b/gcc/testsuite/gfortran.dg/dec_structure_8.f90 @@ -11,7 +11,7 @@ structure /t1/ ! { dg-error "Type definition.*T1" } integer b // ! { dg-error "Empty old style initializer list" } integer c /2*3/ ! { dg-error "Repeat spec invalid in scalar" } integer d /1,2,3/ ! { dg-error "End of scalar initializer expected" } - integer e /"HI"/ ! { dg-error "Can't convert" } + integer e /"HI"/ ! { dg-error "Cannot convert" } integer f(as) /4*9/ ! { dg-error "Too many elements" } integer g(3) /1,3/ ! { dg-error "Not enough elements" } integer h(3) /1,3,5,7/ ! { dg-error "Too many elements" } diff --git a/gcc/testsuite/gfortran.dg/entry_4.f90 b/gcc/testsuite/gfortran.dg/entry_4.f90 index 9a3b89a..22d411b 100644 --- a/gcc/testsuite/gfortran.dg/entry_4.f90 +++ b/gcc/testsuite/gfortran.dg/entry_4.f90 @@ -1,5 +1,5 @@ ! { dg-do compile { target i?86-*-* x86_64-*-* } } -function f1 () result (r) ! { dg-error "can't be a POINTER" } +function f1 () result (r) ! { dg-error "cannot be a POINTER" } integer, pointer :: r real e1 allocate (r) @@ -11,14 +11,14 @@ entry e1a () e1a = 13 end function function f2 () -integer, dimension (2, 7, 6) :: e2 ! { dg-error "can't be an array" } +integer, dimension (2, 7, 6) :: e2 ! { dg-error "cannot be an array" } f2 = 6 return entry e2 () e2 (:, :, :) = 2 end function -integer(kind=8) function f3 () ! { dg-error "can't be of type" } -complex(kind=8) e3 ! { dg-error "can't be of type" } +integer(kind=8) function f3 () ! { dg-error "cannot be of type" } +complex(kind=8) e3 ! { dg-error "cannot be of type" } f3 = 1 return entry e3 () diff --git a/gcc/testsuite/gfortran.dg/init_char_with_nonchar_ctr.f90 b/gcc/testsuite/gfortran.dg/init_char_with_nonchar_ctr.f90 index b84a9a8..3011182 100644 --- a/gcc/testsuite/gfortran.dg/init_char_with_nonchar_ctr.f90 +++ b/gcc/testsuite/gfortran.dg/init_char_with_nonchar_ctr.f90 @@ -7,7 +7,7 @@ subroutine s1 integer :: n = 0 end type type t2 - character :: c = t() ! { dg-error "Can't convert TYPE\\(t\\) to CHARACTER\\(1\\)" } + character :: c = t() ! { dg-error "Cannot convert TYPE\\(t\\) to CHARACTER\\(1\\)" } end type end subroutine @@ -15,20 +15,20 @@ subroutine s2 type t end type type t2 - character :: c(1) = [t()] ! { dg-error "Can't convert TYPE\\(t\\) to CHARACTER\\(1\\)" } + character :: c(1) = [t()] ! { dg-error "Cannot convert TYPE\\(t\\) to CHARACTER\\(1\\)" } end type end subroutine subroutine s3 type t integer :: a = 1 - character :: c = t() ! { dg-error "Can't convert TYPE\\(t\\) to CHARACTER\\(1\\)" } + character :: c = t() ! { dg-error "Cannot convert TYPE\\(t\\) to CHARACTER\\(1\\)" } end type end subroutine subroutine s4 type t integer, allocatable :: a - character :: c = t() ! { dg-error "Can't convert TYPE\\(t\\) to CHARACTER\\(1\\)" } + character :: c = t() ! { dg-error "Cannot convert TYPE\\(t\\) to CHARACTER\\(1\\)" } end type end subroutine diff --git a/gcc/testsuite/gfortran.dg/initialization_23.f90 b/gcc/testsuite/gfortran.dg/initialization_23.f90 index 1931bca..a4683a3 100644 --- a/gcc/testsuite/gfortran.dg/initialization_23.f90 +++ b/gcc/testsuite/gfortran.dg/initialization_23.f90 @@ -9,6 +9,6 @@ TYPE :: one_parameter CHARACTER :: name END TYPE one_parameter - CHARACTER, PARAMETER :: the_alpha = one_parameter('c') ! { dg-error "Can't convert TYPE" } + CHARACTER, PARAMETER :: the_alpha = one_parameter('c') ! { dg-error "Cannot convert TYPE" } CHARACTER, PARAMETER :: the_beta = (/one_parameter('c')/) ! { dg-error "Incompatible ranks" } END MODULE cdf_aux_mod diff --git a/gcc/testsuite/gfortran.dg/logical_assignment_1.f90 b/gcc/testsuite/gfortran.dg/logical_assignment_1.f90 index c228980..e3c14f5 100644 --- a/gcc/testsuite/gfortran.dg/logical_assignment_1.f90 +++ b/gcc/testsuite/gfortran.dg/logical_assignment_1.f90 @@ -5,6 +5,6 @@ program emptyarray5 implicit none real a(0) - a = [logical::] ! { dg-error "Can't convert LOGICAL" } + a = [logical::] ! { dg-error "Cannot convert LOGICAL" } print *,size(a) end program emptyarray5 diff --git a/gcc/testsuite/gfortran.dg/pr80752.f90 b/gcc/testsuite/gfortran.dg/pr80752.f90 index 00a4b33..710065c 100644 --- a/gcc/testsuite/gfortran.dg/pr80752.f90 +++ b/gcc/testsuite/gfortran.dg/pr80752.f90 @@ -7,7 +7,7 @@ module exchange_utils integer, parameter, public :: knd = 8 type, private :: a - logical :: add_vs98 = 0.0_knd ! { dg-error "Can't convert" } + logical :: add_vs98 = 0.0_knd ! { dg-error "Cannot convert" } end type a type, private :: x_param_t diff --git a/gcc/testsuite/gfortran.dg/pr88116_1.f90 b/gcc/testsuite/gfortran.dg/pr88116_1.f90 index a64c818..67c6a26 100644 --- a/gcc/testsuite/gfortran.dg/pr88116_1.f90 +++ b/gcc/testsuite/gfortran.dg/pr88116_1.f90 @@ -1,4 +1,4 @@ ! { dg-do compile } program p - print *, [integer :: 1, [integer(8) :: 2, ['3']]] ! { dg-error "Can't convert" } + print *, [integer :: 1, [integer(8) :: 2, ['3']]] ! { dg-error "Cannot convert" } end diff --git a/gcc/testsuite/gfortran.dg/pr88467.f90 b/gcc/testsuite/gfortran.dg/pr88467.f90 index 6a96662..5424c06 100644 --- a/gcc/testsuite/gfortran.dg/pr88467.f90 +++ b/gcc/testsuite/gfortran.dg/pr88467.f90 @@ -1,4 +1,4 @@ ! { dg-do compile } program foo - print *, [integer :: 1, [integer(8) :: 2, '3']] ! { dg-error "Can't convert" } + print *, [integer :: 1, [integer(8) :: 2, '3']] ! { dg-error "Cannot convert" } end program foo diff --git a/gcc/testsuite/gfortran.dg/typebound_call_7.f03 b/gcc/testsuite/gfortran.dg/typebound_call_7.f03 index 7e7209c19..81d8162 100644 --- a/gcc/testsuite/gfortran.dg/typebound_call_7.f03 +++ b/gcc/testsuite/gfortran.dg/typebound_call_7.f03 @@ -38,7 +38,7 @@ CONTAINS REAL :: resArr(3), resSmall(2) res = sys%solve1 () ! { dg-error "Incompatible rank" } - res = sys%solve2 () ! { dg-error "Can't convert" } + res = sys%solve2 () ! { dg-error "Cannot convert" } resSmall = sys%solve1 () ! { dg-error "Different shape" } res = sys%solve3 () diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_1.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_1.f03 index f9c471a..dd54e66 100644 --- a/gcc/testsuite/gfortran.dg/typebound_generic_1.f03 +++ b/gcc/testsuite/gfortran.dg/typebound_generic_1.f03 @@ -55,10 +55,10 @@ MODULE m CONTAINS GENERIC :: gen2 => p1a ! { dg-error "are ambiguous" } GENERIC :: gen2 => p3 - GENERIC :: p1 => p2 ! { dg-error "can't overwrite specific" } + GENERIC :: p1 => p2 ! { dg-error "cannot overwrite specific" } GENERIC :: gensub => p2 ! { dg-error "mixed FUNCTION/SUBROUTINE" } - PROCEDURE, NOPASS :: gen1 => intf1 ! { dg-error "Can't overwrite GENERIC" } + PROCEDURE, NOPASS :: gen1 => intf1 ! { dg-error "Cannot overwrite GENERIC" } END TYPE t CONTAINS diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_2.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_2.f03 index 67b6b5e..bdef47d 100644 --- a/gcc/testsuite/gfortran.dg/typebound_operator_2.f03 +++ b/gcc/testsuite/gfortran.dg/typebound_operator_2.f03 @@ -31,8 +31,8 @@ MODULE m GENERIC :: OPERATOR(.UNARY.) => onearg_alt GENERIC, PRIVATE :: OPERATOR(.UNARY.) => onearg_alt2 ! { dg-error "must have the same access" } - GENERIC :: OPERATOR(.UNARYPRIME.) => nopassed ! { dg-error "can't be NOPASS" } - GENERIC :: OPERATOR(-) => nopassed ! { dg-error "can't be NOPASS" } + GENERIC :: OPERATOR(.UNARYPRIME.) => nopassed ! { dg-error "cannot be NOPASS" } + GENERIC :: OPERATOR(-) => nopassed ! { dg-error "cannot be NOPASS" } END TYPE t CONTAINS diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_4.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_4.f03 index cd0e8f6..3dc3cae 100644 --- a/gcc/testsuite/gfortran.dg/typebound_operator_4.f03 +++ b/gcc/testsuite/gfortran.dg/typebound_operator_4.f03 @@ -54,7 +54,7 @@ CONTAINS SUBROUTINE in_module () TYPE(myint) :: x - x = 0 ! { dg-bogus "Can't convert" } + x = 0 ! { dg-bogus "Cannot convert" } x = x + 42 ! { dg-bogus "Operands of" } x = x .PLUS. 5 ! { dg-bogus "Unknown operator" } END SUBROUTINE in_module @@ -83,7 +83,7 @@ PROGRAM main IMPLICIT NONE TYPE(myint) :: x - x = 0 ! { dg-error "Can't convert" } + x = 0 ! { dg-error "Cannot convert" } x = x + 42 ! { dg-error "binary intrinsic numeric operator" } x = x .PLUS. 5 ! { dg-error "Unknown operator" } END PROGRAM main diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_9.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_9.f03 index a6ca35b..e3dc786 100644 --- a/gcc/testsuite/gfortran.dg/typebound_proc_9.f03 +++ b/gcc/testsuite/gfortran.dg/typebound_proc_9.f03 @@ -20,7 +20,7 @@ MODULE testmod CONTAINS PROCEDURE, DEFERRED :: p2 ! { dg-error "Interface must be specified" } PROCEDURE(intf), NOPASS :: p3 ! { dg-error "should be declared DEFERRED" } - PROCEDURE(intf), DEFERRED, NON_OVERRIDABLE :: p4 ! { dg-error "can't both" } + PROCEDURE(intf), DEFERRED, NON_OVERRIDABLE :: p4 ! { dg-error "cannot both" } PROCEDURE(unknown), DEFERRED :: p5 ! { dg-error "has no IMPLICIT|must be explicit" } PROCEDURE(intf), DEFERRED, DEFERRED :: p6 ! { dg-error "Duplicate DEFERRED" } PROCEDURE(intf), DEFERRED :: p6 => proc ! { dg-error "is invalid for DEFERRED" } diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f03 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f03 index 13d7f8e..ee4523d 100644 --- a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f03 +++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f03 @@ -20,7 +20,7 @@ ! F2008: C4106 u2 = [u1] ! { dg-error "shall not be unlimited polymorphic" } - i = u2 ! { dg-error "Can\\'t convert CLASS\\(\\*\\)" } + i = u2 ! { dg-error "Cannot convert CLASS\\(\\*\\)" } ! Repeats same_type_as_1.f03 for unlimited polymorphic u2 flag = same_type_as (i, u2) ! { dg-error "cannot be of type INTEGER" } -- cgit v1.1 From 8451f4a52e71cf93d20313fb067efb14894d1cc9 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Tue, 12 Mar 2019 16:31:48 +0000 Subject: Use libiberty's lrealpath to avoid portability problems. The dmd front-end function FileName::canonicalName could be called during the semantic pass of import("file") expressions, so still requires that realpath() be redefined. Initial patch by Rainer Orth. gcc/d/ChangeLog: 2019-03-12 Iain Buclaw PR d/87866 * d-system.h (realpath): Redefine as lrealpath. From-SVN: r269619 --- gcc/d/ChangeLog | 5 +++++ gcc/d/d-system.h | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'gcc') diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index c91a050..6c96ec4 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,5 +1,10 @@ 2019-03-12 Iain Buclaw + PR d/87866 + * d-system.h (realpath): Redefine as lrealpath. + +2019-03-12 Iain Buclaw + * d-lang.cc (d_init_options): Set global.params.cplusplus to C++14. * d-target.cc (Target::cppFundamentalType): New method. diff --git a/gcc/d/d-system.h b/gcc/d/d-system.h index c32825d..efece15 100644 --- a/gcc/d/d-system.h +++ b/gcc/d/d-system.h @@ -31,6 +31,10 @@ #undef assert #define assert(EXPR) gcc_assert(EXPR) +/* Use libiberty's lrealpath to avoid portability problems. */ +#undef realpath +#define realpath(a, b) lrealpath((a)) + /* Forward ctype.h macros used by the dmd front-end to safe-ctype.h. */ #undef isalpha #define isalpha(c) ISALPHA(c) -- cgit v1.1 From 2380e042774fb2d6c3ab9d3f5fc97bad3b831684 Mon Sep 17 00:00:00 2001 From: Robin Dapp Date: Tue, 12 Mar 2019 16:57:08 +0000 Subject: S/390: Change z13 pipeline description. This patch adapts the z13 pipeline description. From-SVN: r269620 --- gcc/ChangeLog | 10 ++ gcc/config/s390/2964.md | 372 +++++++++++++++++++++++++++--------------------- gcc/config/s390/s390.c | 39 +++-- 3 files changed, 236 insertions(+), 185 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f9cc4c2..b39322d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2019-03-12 Robin Dapp + + * config/s390/2964.md: Update pipeline description. + * config/s390/s390.c (MAX_SCHED_UNITS): Increase. + (LONGRUNNING_THRESHOLD): Remove. + (LATENCY_FACTOR): Remove. + (s390_get_unit_mask): Add unit. + (s390_sched_score): Use fxd/fpd. + (s390_sched_variable_issue): Use fxd/fpd. + 2019-03-12 Martin Liska * config/i386/i386.c: Reword an error message. diff --git a/gcc/config/s390/2964.md b/gcc/config/s390/2964.md index 19e641b..a7897bc 100644 --- a/gcc/config/s390/2964.md +++ b/gcc/config/s390/2964.md @@ -18,215 +18,257 @@ ;; along with GCC; see the file COPYING3. If not see ;; . +(define_attr "z13_unit_fpd" "" +(cond [(eq_attr "mnemonic" "ddb,ddbr,deb,debr,dxbr,sqdb,sqdbr,sqeb,\ +sqebr,sqxbr,vfddb,vfdsb,vfsqdb,vfsqsb,wfddb,wfdsb,wfdxb,wfsqdb,wfsqxb") + (const_int 1)] (const_int 0))) -; generator options: vector_ecycs=12 cracked_ecycs=6 scale_ecycs=5 +(define_attr "z13_unit_fxa" "" +(cond [(eq_attr "mnemonic" "a,afi,ag,agf,agfi,agfr,aghi,aghik,agr,\ +agrk,ahi,ahik,al,alc,alcg,alcgr,alcr,alfi,alg,algf,algfi,algfr,alghsik,\ +algr,alhsik,alr,alrk,aly,ark,ay,bras,brasl,etnd,exrl,flogr,ic,icm,icmh,\ +icmy,icy,iihf,iilf,ipm,la,larl,lay,lb,lbr,lcgr,lcr,lgb,lgbr,lgf,lgfi,lgfr,\ +lgfrl,lgh,lghi,lghr,lghrl,lgr,lh,lhi,lhr,lhrl,lhy,llcr,llgfr,llghr,llgtr,\ +llhr,llihf,llihh,llihl,llilf,llilh,llill,lngr,lnr,loc,locg,locghi,locgr,\ +lochi,locr,lpgr,lpr,lr,lrv,lrvg,lrvgr,lrvh,lrvr,lt,ltg,ltgf,ltgfr,ltgr,ltr,\ +m,mfy,mghi,mh,mhi,mhy,ml,mlg,mlgr,mlr,mr,ms,msfi,msg,msgf,msgfi,msgfr,\ +msgr,msr,msy,n,ng,ngr,ngrk,nihf,nihh,nihl,nilf,nilh,nill,nr,nrk,ny,o,og,\ +ogr,ogrk,oihf,oihh,oihl,oilf,oilh,oill,or,ork,oy,pfpo,popcnt,ppa,risbg,\ +risbgn,rll,rllg,s,sg,sgf,sgfr,sgr,sgrk,sh,shy,sl,slb,slbg,slbgr,slbr,slfi,\ +slg,slgf,slgfi,slgfr,slgr,slgrk,sll,sllg,sllk,slr,slrk,sly,sr,sra,srag,\ +srak,srl,srlg,srlk,sy,x,xg,xgr,xgrk,xihf,xilf,xr,xrk,xy") + (const_int 1)] (const_int 0))) + +(define_attr "z13_unit_fxb" "" +(cond [(eq_attr "mnemonic" "agsi,algsi,alsi,asi,b,bc,bcr,br,brcl,c,\ +cfi,cg,cgf,cgfi,cgfr,cgfrl,cgh,cghi,cghrl,cghsi,cgit,cgr,cgrl,cgrt,ch,chi,\ +chrl,chsi,chy,cit,cl,clfhsi,clfi,clfit,clg,clgf,clgfi,clgfr,clgfrl,clghsi,\ +clgit,clgr,clgrl,clgrt,clgt,clhhsi,clhrl,cli,cliy,clm,clmy,clr,clrl,clrt,\ +clt,cly,cr,crl,crt,cy,j,jg,laa,laag,lan,lang,lao,laog,lat,lax,laxg,lcdfr,\ +ldgr,ldr,lgat,lgdr,lndfr,lpdfr,lzdr,lzer,mvghi,mvhhi,mvhi,mvi,mviy,ni,niy,\ +nop,nopr,ntstg,oi,oiy,st,stc,stcy,std,stdy,ste,stey,stg,stgrl,sth,sthrl,\ +sthy,stoc,stocg,strl,strv,strvg,strvh,sty,tend,tm,tmh,tmhh,tmhl,tml,tmlh,\ +tmll,tmy,vlgvf,vlgvg,vlgvh,vlr,vlvgb,vlvgf,vlvgg,vlvgh,vlvgp,vst,vstl,xi,\ +xiy") + (const_int 1)] (const_int 0))) + +(define_attr "z13_unit_fxd" "" +(cond [(eq_attr "mnemonic" "dlgr,dlr,dr,dsgfr,dsgr") + (const_int 1)] (const_int 0))) + +(define_attr "z13_unit_lsu" "" +(cond [(eq_attr "mnemonic" "a,adb,aeb,ag,agf,agsi,al,alc,alcg,alg,\ +algf,algsi,alsi,aly,asi,ay,c,cdb,cg,cgf,cgfrl,cgh,cghrl,cghsi,cgrl,ch,chrl,\ +chsi,chy,cl,clc,clfhsi,clg,clgf,clgfrl,clghsi,clgrl,clgt,clhhsi,clhrl,cli,\ +cliy,clm,clmy,clrl,clt,cly,crl,cy,ddb,deb,ear,ic,icm,icmh,icmy,icy,l,laa,\ +laag,lan,lang,lao,laog,lat,lax,laxg,lb,lcbb,ld,lde,ldeb,ldy,le,ley,lg,lgat,\ +lgb,lgf,lgfrl,lgh,lghrl,lgrl,lh,lhrl,lhy,llc,llgc,llgf,llgfrl,llgh,llghrl,\ +llgt,llh,llhrl,loc,locg,lrl,lrv,lrvg,lrvh,lt,ltg,ltgf,ly,m,madb,maeb,meeb,\ +mfy,mh,mhy,ml,mlg,ms,msdb,mseb,msg,msgf,msy,mvghi,mvhhi,mvhi,mvi,mviy,n,\ +ng,ni,niy,ntstg,ny,o,og,oi,oiy,oy,s,sar,sdb,seb,sfpc,sg,sgf,sh,shy,sl,\ +slb,slbg,slg,slgf,sly,sqdb,sqeb,st,stc,stcy,std,stdy,ste,stey,stg,stgrl,\ +sth,sthrl,sthy,stoc,stocg,strl,strv,strvg,strvh,sty,sy,tabort,tm,tmy,vl,\ +vlbb,vleb,vlef,vleg,vleh,vll,vllezb,vllezf,vllezg,vllezh,vllezlf,vlrepb,\ +vlrepf,vlrepg,vlreph,vst,vstl,x,xg,xi,xiy,xy") + (const_int 1)] (const_int 0))) + +(define_attr "z13_unit_vfu" "" +(cond [(eq_attr "mnemonic" "adb,adbr,adtr,aeb,aebr,axbr,axtr,cdb,\ +cdbr,cdtr,cebr,cpsdr,cxbr,cxtr,ddtr,dxtr,fidbr,fidbra,fidtr,fiebr,fiebra,\ +fixbr,fixbra,fixtr,lcdbr,lcebr,lcxbr,ldeb,ldebr,ldetr,le,ledbr,ledtr,ler,\ +ley,lndbr,lnebr,lnxbr,lpdbr,lpebr,lpxbr,ltdbr,ltebr,ltxbr,ltxtr,lxdb,\ +lxdbr,lxdtr,lxeb,lxebr,madb,madbr,maeb,maebr,mdbr,mdtr,meeb,meebr,msdb,\ +msdbr,mseb,msebr,mxbr,mxtr,sdb,sdbr,sdtr,seb,sebr,sxbr,sxtr,tcdb,tceb,tcxb,\ +tdcdt,tdcet,tdcxt,vab,vaccb,vacccq,vaccf,vaccg,vacch,vaccq,vacq,vaf,vag,vah,\ +vaq,vavgb,vavgf,vavgg,vavgh,vavglb,vavglf,vavglg,vavglh,vcdgb,vcdlgb,\ +vceqb,vceqbs,vceqf,vceqfs,vceqg,vceqgs,vceqh,vceqhs,vcgdb,vchb,vchbs,vchf,\ +vchfs,vchg,vchgs,vchh,vchhs,vchlb,vchlbs,vchlf,vchlfs,vchlg,vchlgs,vchlh,\ +vchlhs,vcksm,vclgdb,vclzf,vctzb,vctzf,vctzg,vctzh,verimb,verimf,verimg,\ +verimh,verllb,verllf,verllg,verllh,verllvb,verllvf,verllvg,verllvh,veslb,\ +veslf,veslg,veslh,veslvb,veslvf,veslvg,veslvh,vesrab,vesraf,vesrag,vesrah,\ +vesravb,vesravf,vesravg,vesravh,vesrlb,vesrlf,vesrlg,vesrlh,vesrlvb,vesrlvf,\ +vesrlvg,vesrlvh,vfadb,vfasb,vfcedb,vfcedbs,vfcesb,vfcesbs,vfchdb,vfchdbs,\ +vfchedb,vfchedbs,vfchesb,vfchesbs,vfchsb,vfchsbs,vfeeb,vfeef,vfeeh,vfeezbs,\ +vfeezhs,vfeneb,vfenef,vfeneh,vfenezb,vfenezf,vfenezh,vfidb,vfisb,vflcdb,\ +vflcsb,vflndb,vflnsb,vflpdb,vfmadb,vfmasb,vfmdb,vfmsb,vfmsdb,vfmssb,vfsdb,\ +vfssb,vftcidb,vftcisb,vgbm,vgfmab,vgfmaf,vgfmag,vgfmah,vgfmb,vgfmf,vgfmg,\ +vgfmh,vgm,vgmb,vgmf,vgmg,vgmh,vistrb,vistrbs,vistrf,vistrfs,vistrh,vlcb,\ +vlcf,vlcg,vlch,vldeb,vleb,vledb,vlef,vleg,vleh,vleib,vleif,vleig,vleih,\ +vlpb,vlpf,vlpg,vlph,vmaeb,vmaef,vmaeh,vmahb,vmahf,vmahh,vmalb,vmaleb,\ +vmalef,vmaleh,vmalf,vmalhb,vmalhf,vmalhh,vmalhw,vmalob,vmalof,vmaloh,vmaob,\ +vmaof,vmaoh,vmeb,vmef,vmeh,vmhb,vmhf,vmhh,vmlb,vmleb,vmlef,vmleh,vmlf,vmlhb,\ +vmlhf,vmlhh,vmlhw,vmlob,vmlof,vmloh,vmnb,vmnf,vmng,vmnh,vmnlb,vmnlf,vmnlg,\ +vmnlh,vmob,vmof,vmoh,vmrhb,vmrhf,vmrhg,vmrhh,vmrlb,vmrlf,vmrlg,vmrlh,vmxb,\ +vmxf,vmxg,vmxh,vn,vnc,vno,vnot,vo,vone,vpdi,vperm,vpkf,vpkg,vpkh,vpklsf,\ +vpklsfs,vpklsg,vpklsgs,vpklsh,vpklshs,vpksf,vpksfs,vpksg,vpksgs,vpksh,vpkshs,\ +vpopct,vpopctb,vpopctf,vpopctg,vpopcth,vrepb,vrepf,vrepg,vreph,vrepib,vrepif,\ +vrepig,vrepih,vsb,vsbiq,vscbib,vscbif,vscbig,vscbih,vscbiq,vsegb,vsegf,vsegh,\ +vsel,vsf,vsg,vsh,vsl,vslb,vsldb,vsq,vsra,vsrab,vsrl,vsrlb,vsumb,vsumgf,\ +vsumgh,vsumh,vsumqf,vsumqg,vtm,vuphb,vuphf,vuphh,vuplb,vuplf,vuplhb,vuplhf,\ +vuplhh,vuplhw,vupllb,vupllf,vupllh,vx,vzero,wcdgb,wcdlgb,wcgdb,wclgdb,wfadb,\ +wfasb,wfaxb,wfcdb,wfcedb,wfcesb,wfcexbs,wfchdb,wfchedb,wfchesb,wfchexb,\ +wfchexbs,wfchsb,wfchxb,wfchxbs,wfcsb,wfisb,wfixb,wflcdb,wflcsb,wflcxb,wflld,\ +wflndb,wflnsb,wflnxb,wflpdb,wflpsb,wflpxb,wfmadb,wfmasb,wfmaxb,wfmdb,wfmsb,\ +wfmsdb,wfmssb,wfmsxb,wfmxb,wfsdb,wfssb,wfsxb,wldeb,wledb") + (const_int 1)] (const_int 0))) (define_attr "z13_cracked" "" - (cond [(eq_attr "mnemonic" "celgbr,vscef,vsceg,exrl,clfebr,cefbr,chhsi,\ -vgef,vgeg,cdlftr,lcgfr,cfdbr,cgdbr,lzxr,cfxbr,rnsbg,cgdtr,cegbr,rxsbg,ex,\ -cgxtr,clfxtr,cdlgtr,brasl,efpc,cfebr,tbeginc,celfbr,clgxbr,vsteb,vsteh,\ -clfdtr,cdfbr,lngfr,clgebr,stpq,cs,lpgfr,cdlgbr,lpq,cdgtr,d,cgxbr,cdftr,\ -rosbg,clgdbr,cdgbr,bras,tbegin,clfdbr,cdlfbr,cgebr,clfxbr,lxr,csy,csg,clgdtr,\ -clgxtr") (const_int 1)] - (const_int 0))) +(cond [(eq_attr "mnemonic" "bas,basr,cdfbr,cdftr,cdgbr,cdgtr,cdlfbr,\ +cdlftr,cdlgbr,cdlgtr,cefbr,cegbr,celfbr,celgbr,cfdbr,cfebr,cfxbr,cgdbr,cgdtr,\ +cgebr,cgxbr,cgxtr,chhsi,clfdbr,clfebr,clfxbr,clfxtr,clgdbr,clgdtr,clgebr,\ +clgxbr,clgxtr,cs,csg,csy,d,efpc,ex,lcgfr,lngfr,lpgfr,lpq,lxr,lzxr,rnsbg,\ +rosbg,rxsbg,stpq,vgef,vgeg,vscef,vsceg,vsteb") + (const_int 1)] (const_int 0))) (define_attr "z13_expanded" "" - (cond [(eq_attr "mnemonic" "cxlftr,cdsg,cdsy,stam,lam,dsgf,lmg,cxlgtr,\ -dl,cxftr,sldl,dsg,cxlfbr,cxgtr,stmg,stmy,stm,lm,cds,lmy,cxfbr,cxlgbr,srda,\ -srdl,cxgbr,dlg") (const_int 1)] - (const_int 0))) +(cond [(eq_attr "mnemonic" "cds,cdsg,cdsy,cxfbr,cxftr,cxgbr,cxgtr,\ +cxlftr,cxlgbr,cxlgtr,dl,dlg,dsg,dsgf,lam,lm,lmg,lmy,sldl,srda,srdl,stam,stm,\ +stmg,stmy,tbegin,tbeginc") + (const_int 1)] (const_int 0))) (define_attr "z13_groupalone" "" - (cond [(eq_attr "mnemonic" "mvc,dxbr,lxebr,axtr,cxtr,alcr,lxdb,lxeb,mxtr,\ -mfy,cxbr,dsgr,lcxbr,slb,mr,dr,alc,slbr,maebr,mlgr,dsgfr,sxtr,tdcxt,tabort,\ -msebr,lxdtr,ltxtr,slbg,ml,mxbr,maeb,oc,dxtr,msdb,sqxbr,mseb,xc,m,clc,mlg,\ -mlr,fixbra,alcgr,nc,sfpc,dlgr,fixbr,slbgr,fixtr,lpxbr,axbr,lxdbr,ltxbr,\ -tcxb,dlr,lnxbr,sxbr,flogr,alcg,tend,madb,bcr_flush") (const_int 1)] - (const_int 0))) +(cond [(eq_attr "mnemonic" "alc,alcg,alcgr,alcr,axbr,axtr,clc,cxbr,\ +cxtr,dlgr,dlr,dr,dsgfr,dsgr,dxbr,dxtr,fixbr,fixbra,fixtr,flogr,lcxbr,lnxbr,\ +lpxbr,ltxbr,ltxtr,lxdb,lxdbr,lxdtr,lxeb,lxebr,m,madb,maeb,maebr,mfy,ml,mlg,\ +mlgr,mlr,mr,msdb,mseb,msebr,mvc,mxbr,mxtr,oc,sfpc,slb,slbg,slbgr,slbr,\ +sqxbr,sxbr,sxtr,tabort,tcxb,tdcxt,tend,xc") + (const_int 1)] (const_int 0))) (define_attr "z13_endgroup" "" - (cond [(eq_attr "mnemonic" "ipm") (const_int 1)] - (const_int 0))) - -(define_attr "z13_unit_lsu" "" - (cond [(eq_attr "mnemonic" "vlbb,mvc,llgc,llc,llhrl,vl,llghrl,vlrepf,\ -vlrepg,vlreph,lde,ldy,tabort,l,llh,ld,lg,ly,vlrepb,vllezb,vllezf,vllezg,\ -vllezh,oc,xc,clc,lrl,ear,nc,lgrl,sfpc,llgf,llgfrl,llgh,llgt,lcbb,vll,sar") (const_int 1)] - (const_int 0))) - -(define_attr "z13_unit_fxu" "" - (cond [(eq_attr "mnemonic" "s,lcgr,x,nop,oiy,ppa,ng,msy,sgrk,vstl,aghik,\ -msgf,ipm,mvi,stocg,rll,srlg,cghsi,clgit,srlk,alrk,sg,sh,sl,st,sy,vst,ark,\ -xgr,agsi,tm,nrk,shy,llhr,agf,alcr,slgfr,sr,clgrt,laa,sgf,lan,llilf,\ -llilh,ag,llill,lay,al,n,laxg,ar,ahi,sgr,ntstg,ay,stcy,nopr,mfy,ngrk,lbr,\ -br,dsgr,stdy,ork,ldgr,lcr,cg,ch,lgfrl,cl,stoc,cr,agfr,stgrl,cy,alfi,xg,\ -cgfi,xi,clfhsi,cgfr,xr,slb,mghi,clfi,slg,clhhsi,agfi,clfit,sly,mr,ldr,nihf,\ -nihh,algfi,dr,nihl,algf,algfr,algr,clgf,clgr,clgt,aghi,alc,alg,locg,alr,\ -locr,cghi,aly,alghsik,slbr,clgfrl,mhy,cit,nr,ny,xiy,mlgr,sthy,cly,dsgfr,\ -rllg,cgit,lgb,lgf,clgrl,lgh,lrvgr,cliy,cgrl,lgr,slrk,clrt,icy,laog,og,agr,\ -mvhi,lhrl,or,lhr,vlvgp,lhy,nilf,oy,nilh,nill,lcdfr,mviy,tmhh,tmhl,sthrl,\ -ltgf,ltgr,srk,clghrl,ahy,vstef,vsteg,ah,vlgvb,llgcr,tmh,tml,clmy,slr,cfi,\ -stc,std,ste,stg,sth,locgr,slbg,sty,tmlh,la,lb,mvghi,lh,risbgn,lrvg,lr,asi,\ -lt,ahik,lrvr,cgf,cgh,cgr,clhrl,lzdr,tmll,mh,ml,vlvgb,ms,lrv,vlvgf,xgrk,\ -vlvgg,llgfr,vlvgh,slfi,chi,chy,mhi,lzer,alhsik,ni,ltgfr,loc,icm,oi,cgfrl,\ -agrk,lgat,oilh,llghr,lghrl,oill,xihf,lpgr,cgrt,clrl,sgfr,lpr,lgbr,strl,\ -algrk,alsi,srak,slgf,a,b,c,slgr,m,o,algsi,icmh,srag,iilf,ogrk,clg,icmy,\ -cli,clm,clr,clt,slgrk,mlg,lao,mlr,risbg,mvhhi,lat,etnd,lax,iihf,sra,alcgr,\ -msgr,clghsi,stey,ngr,xilf,laag,oihf,oihh,oihl,ltg,ltr,niy,lgfi,dlgr,lgfr,\ -slgfi,llcr,slbgr,chrl,lgdr,pfpo,lang,basr,sllg,sllk,lghi,lghr,vlgvf,vlgvg,\ -vlgvh,vlr,chsi,lngr,cghrl,srl,lhi,oilf,crl,crt,afi,xrk,llgtr,llihf,llihh,\ -llihl,dlr,msgfi,msgfr,msg,flogr,xy,msr,clgfi,clgfr,ogr,popcnt,alcg,lndfr,\ -larl,sll,tmy,msfi,ic,lpdfr,tend,lnr") (const_int 1)] - (const_int 0))) +(cond [(eq_attr "mnemonic" "bras,brasl,exrl,ipm") + (const_int 1)] (const_int 0))) -(define_attr "z13_unit_vfu" "" - (cond [(eq_attr "mnemonic" "seb,vcksm,vfadb,vleib,vchgs,vleif,vleig,vleih,\ -vgbm,verimb,vone,verimf,verimg,verimh,dxbr,verllvb,lpebr,verllvf,verllvg,\ -verllvh,vfeneb,wcdgb,vfenef,vfeneh,vchhs,vctzb,vctzf,vctzg,vctzh,vlcb,aeb,\ -vlcf,vlcg,vlch,vfmsdb,vgfmab,ltebr,vgfmaf,vgfmag,vgfmah,vmaeh,vsb,vsf,vsg,\ -vsh,vsl,vsq,lxebr,cdtr,fiebr,vupllb,vupllf,vupllh,vmrhb,madbr,vtm,vmrhf,\ -vmrhg,vmrhh,axtr,fiebra,vleb,cxtr,vlef,vleg,vleh,vpkf,vpkg,vpkh,vmlob,vmlof,\ -vmloh,lxdb,ldeb,mdtr,vceqfs,adb,wflndb,lxeb,vn,vo,vchlb,vx,mxtr,vchlf,vchlg,\ -vchlh,vfcedbs,vfcedb,vceqgs,cxbr,msdbr,vcdgb,debr,vceqhs,meeb,lcxbr,vavglb,\ -vavglf,vavglg,vavglh,vmrlb,vmrlf,vmrlg,vmrlh,vmxb,tcdb,\ -vmahh,vsrlb,wcgdb,lcdbr,vistrbs,vrepb,wfmdb,vrepf,vrepg,vreph,ler,wcdlgb,\ -ley,vistrb,vistrf,vistrh,tceb,wfsqdb,sqeb,vsumqf,vsumqg,vesrlb,vfeezbs,\ -maebr,vesrlf,vesrlg,vesrlh,vmeb,vmef,vmeh,meebr,vflcdb,wfmadb,vperm,sxtr,\ -vclzf,vgm,vgmb,vgmf,vgmg,vgmh,tdcxt,vzero,msebr,veslb,veslf,veslg,vfenezb,\ -vfenezf,vfenezh,vistrfs,vchf,vchg,vchh,vmhb,vmhf,vmhh,cdb,veslvb,ledbr,\ -veslvf,veslvg,veslvh,wclgdb,vfmdb,vmnlb,vmnlf,vmnlg,vmnlh,vclzb,vfeezfs,\ -vclzg,vclzh,mdb,vmxlb,vmxlf,vmxlg,vmxlh,ltdtr,vsbcbiq,ceb,wfddb,sebr,vistrhs,\ -lxdtr,lcebr,vab,vaf,vag,vah,ltxtr,vlpf,vlpg,vsegb,vaq,vsegf,vsegh,\ -sdtr,cdbr,vfeezhs,le,wldeb,vfmadb,vchlbs,vacccq,vmaleb,vsel,vmalef,vmaleh,\ -vflndb,mdbr,vmlb,wflpdb,ldetr,vpksfs,vpksf,vpksg,vpksh,sqdb,mxbr,sqdbr,\ -vmaeb,veslh,vmaef,vpklsf,vpklsg,vpklsh,verllb,vchb,ddtr,verllf,verllg,verllh,\ -wfsdb,maeb,vclgdb,vftcidb,vpksgs,vmxf,vmxg,vmxh,fidbra,vmnb,vmnf,vmng,vfchedbs,\ -lnebr,vfidb,dxtr,ddb,msdb,vmalhb,vfddb,vmalhf,vmalhh,vpkshs,vfsdb,sqxbr,\ -vmalhw,ltdbr,vmob,vmof,vmoh,deb,vchlfs,mseb,vcdlgb,vlpb,wfmsdb,vlph,vmahb,\ -vldeb,vmahf,vgfmb,fidbr,vfsqdb,aebr,wledb,vchlgs,vesravb,vfchdbs,cebr,vesravf,\ -vesravg,vesravh,vcgdb,fixbra,vrepib,vrepif,vrepig,vrepih,tdcdt,vchlhs,vceqb,\ -vscbib,vceqf,vceqg,vscbif,vscbig,vscbih,vmlhw,vscbiq,vuphb,vuphf,vuphh,\ -vfchedb,tdcet,vslb,vpklsfs,adbr,sqebr,vfchdb,fixbr,vpklsgs,vsldb,vmleb,\ -vmlef,vmleh,cpsdr,vmalb,vmalf,vavgb,vmlf,vavgf,vavgg,vavgh,vgfmf,vgfmg,\ -vgfmh,fidtr,vpklshs,lndbr,vno,lpdbr,vacq,vledb,vchbs,vfeeb,vfeef,vfeeh,\ -fixtr,vaccb,wfadb,vaccf,vaccg,vacch,vnot,vmalob,vaccq,vmalof,vmaloh,lpxbr,\ -ledtr,vuplb,vuplf,axbr,lxdbr,ltxbr,vpopct,vpdi,vmlhb,vmlhf,vmlhh,sdbr,vnc,\ -vsumb,vsrab,vsumh,vmaob,vmaof,vmaoh,vesrlvb,vesrlvf,vesrlvg,vesrlvh,tcxb,\ -vceqbs,vceqh,lnxbr,sxbr,vesrab,wflcdb,vesraf,vesrag,vesrah,vflpdb,vmnh,\ -vsbiq,adtr,vsra,vsrl,vuplhb,sdb,vuplhf,vuplhh,vsumgf,vsumgh,ldebr,vuplhw,\ -vchfs,madb,ddbr") (const_int 1)] - (const_int 0))) +(define_attr "z13_groupoftwo" "" +(cond [(eq_attr "mnemonic" "vacccq,vacq,vfmadb,vfmasb,vfmsdb,vfmssb,\ +vgfmab,vgfmaf,vgfmag,vgfmah,vmaeb,vmaef,vmaeh,vmahb,vmahf,vmahh,vmalb,vmaleb,\ +vmalef,vmaleh,vmalf,vmalhb,vmalhf,vmalhh,vmalhw,vmalob,vmalof,vmaloh,vmaob,\ +vmaof,vmaoh,vperm,vsbiq,vsel,wfmadb,wfmasb,wfmaxb,wfmsdb,wfmssb,wfmsxb") + (const_int 1)] (const_int 0))) (define_insn_reservation "z13_0" 0 (and (eq_attr "cpu" "z13") - (eq_attr "mnemonic" "s,lcgr,x,nop,oiy,vlbb,ppa,ng,sgrk,vstl,aghik,\ -mvc,ipm,llgc,mvi,stocg,rll,jg,srlg,cghsi,clgit,srlk,alrk,sg,sh,sl,st,sy,\ -vst,ark,xgr,agsi,tm,nrk,shy,llhr,agf,alcr,slgfr,sr,clgrt,llc,laa,sgf,\ -lan,llhrl,llilf,llilh,ag,llill,lay,al,n,laxg,ar,ahi,sgr,ntstg,ay,stcy,vl,\ -nopr,ngrk,lbr,br,stdy,ork,ldgr,lcr,cg,ch,llghrl,lgfrl,cl,stoc,cr,agfr,stgrl,\ -cy,alfi,xg,cgfi,xi,vlrepf,vlrepg,vlreph,clfhsi,cgfr,xr,slb,mghi,clfi,slg,\ -lde,clhhsi,agfi,clfit,sly,ldr,ldy,nihf,nihh,algfi,nihl,algf,algfr,algr,\ -clgf,clgr,clgt,aghi,alc,alg,locg,alr,locr,cghi,aly,alghsik,slbr,clgfrl,\ -mhy,cit,nr,ny,xiy,sthy,cly,rllg,cgit,lgb,lgf,clgrl,lgh,lrvgr,cliy,cgrl,\ -lgr,slrk,clrt,icy,laog,og,agr,mvhi,lhrl,or,lhr,vlvgp,lhy,nilf,oy,nilh,tabort,\ -nill,lcdfr,mviy,tmhh,tmhl,sthrl,ltgf,ltgr,srk,clghrl,ahy,vstef,vsteg,ah,\ -vlgvb,llgcr,tmh,tml,clmy,slr,cfi,stc,std,ste,stg,sth,l,locgr,llh,slbg,sty,\ -tmlh,la,lb,ld,mvghi,lg,lh,risbgn,lrvg,lr,asi,lt,ahik,ly,lrvr,vlrepb,vllezb,\ -cgf,cgh,vllezf,vllezg,vllezh,cgr,clhrl,lzdr,tmll,mh,vlvgb,lrv,vlvgf,xgrk,\ -vlvgg,llgfr,vlvgh,slfi,chi,chy,mhi,lzer,alhsik,ni,ltgfr,loc,icm,oc,oi,cgfrl,\ -agrk,lgat,oilh,llghr,lghrl,oill,xihf,lpgr,cgrt,clrl,sgfr,lpr,lgbr,strl,\ -algrk,alsi,srak,brcl,slgf,xc,a,b,c,slgr,j,o,algsi,icmh,srag,iilf,ogrk,clc,\ -clg,icmy,cli,clm,clr,clt,slgrk,lrl,lao,risbg,mvhhi,lat,etnd,lax,iihf,sra,\ -alcgr,clghsi,ear,nc,lgrl,stey,ngr,xilf,laag,oihf,oihh,oihl,ltg,ltr,niy,\ -lgfi,sfpc,lgfr,slgfi,llcr,llgf,llgfrl,llgh,slbgr,llgt,chrl,lgdr,pfpo,lang,\ -basr,lcbb,sllg,sllk,lghi,vll,lghr,vlgvf,vlgvg,vlgvh,vlr,chsi,lngr,cghrl,\ -srl,sar,lhi,oilf,crl,crt,afi,xrk,llgtr,llihf,llihh,llihl,xy,clgfi,clgfr,\ -ogr,popcnt,alcg,lndfr,larl,sll,tmy,ic,lpdfr,tend,lnr,bcr_flush")) "nothing") +(eq_attr "mnemonic" "a,afi,ag,agfi,aghi,aghik,agr,agrk,ahi,ahik,al,\ +alfi,alg,algf,algfi,algfr,alghsik,algr,alhsik,alr,alrk,aly,ark,ay,b,bc,bcr,\ +br,bras,brasl,brcl,c,cfi,cg,cgfi,cghi,cghsi,cgit,cgr,cgrl,cgrt,chi,chsi,\ +cit,cl,clfhsi,clfi,clfit,clg,clgf,clgfi,clgfr,clgfrl,clghsi,clgit,clgr,\ +clgrl,clgrt,clgt,clhhsi,clhrl,cli,cliy,clr,clrl,clrt,clt,cly,cr,crl,crt,cy,\ +etnd,exrl,ic,icm,icmh,icmy,icy,iihf,iilf,j,jg,la,larl,lat,lay,lb,lbr,lcdfr,\ +lcgr,lcr,ldgr,ldr,lgat,lgb,lgbr,lgf,lgfi,lgfr,lgfrl,lgh,lghi,lghr,lghrl,\ +lgr,lh,lhi,lhr,lhrl,lhy,llcr,llgfr,llghr,llgtr,llhr,llihf,llihh,llihl,\ +llilf,llilh,llill,lndfr,lpdfr,lr,lrv,lrvg,lrvgr,lrvh,lrvr,lt,ltg,ltgf,ltgfr,\ +ltgr,ltr,lzdr,lzer,n,ng,ngr,ngrk,nihf,nihh,nihl,nilf,nilh,nill,nop,nopr,nr,\ +nrk,ny,o,og,ogr,ogrk,oihf,oihh,oihl,oilf,oilh,oill,or,ork,oy,pfpo,ppa,\ +risbg,risbgn,rll,rllg,s,sg,sgr,sgrk,sl,sldl,slfi,slg,slgf,slgfi,slgfr,slgr,\ +slgrk,sll,sllg,sllk,slr,slrk,sly,sr,sra,srag,srak,srda,srdl,srl,srlg,srlk,\ +sy,tm,tmh,tmhh,tmhl,tml,tmlh,tmll,tmy,vlr,vlvgb,vlvgf,vlvgg,vlvgh,x,xg,\ +xgr,xgrk,xihf,xilf,xr,xrk,xy")) "nothing") (define_insn_reservation "z13_1" 1 (and (eq_attr "cpu" "z13") - (eq_attr "mnemonic" "celgbr,vscef,vsceg,msy,msgf,cxlftr,cdsg,cdsy,\ -exrl,clfebr,cefbr,chhsi,stam,vgef,vgeg,cdlftr,lam,mfy,lcgfr,cfdbr,dsgf,\ -cgdbr,lzxr,lmg,cfxbr,rnsbg,cxlgtr,mr,dl,cxftr,sldl,cgdtr,cegbr,rxsbg,ex,\ -cgxtr,clfxtr,mlgr,cdlgtr,brasl,dsg,efpc,cfebr,tbeginc,celfbr,clgxbr,vsteb,\ -vsteh,cxlfbr,clfdtr,cxgtr,stmg,stmy,stm,lm,cds,cdfbr,ml,ms,lngfr,clgebr,\ -stpq,lmy,cs,lpgfr,cdlgbr,lpq,cxfbr,cxlgbr,cdgtr,d,m,mlg,mlr,cgxbr,cdftr,\ -msgr,rosbg,clgdbr,cdgbr,srda,bras,srdl,tbegin,clfdbr,cdlfbr,cxgbr,cgebr,\ -dlg,clfxbr,lxr,csy,msgfi,msgfr,msg,flogr,msr,csg,msfi,clgdtr,clgxtr")) "nothing") +(eq_attr "mnemonic" "agf,agfr,agsi,algsi,alsi,asi,cgf,cgfr,cgfrl,cgh,\ +cghrl,ch,chrl,chy,clm,clmy,cpsdr,laa,laag,lan,lang,lao,laog,lax,laxg,le,ler,\ +ley,lngr,lnr,loc,locg,locghi,locgr,lochi,locr,lpgr,lpr,mvghi,mvhhi,mvhi,\ +mvi,mviy,ni,niy,ntstg,oi,oiy,sgf,sgfr,sh,shy,st,stc,stcy,stg,stgrl,sth,\ +sthrl,sthy,stoc,stocg,strl,strv,strvg,strvh,sty,vab,vaccb,vacccq,vaccf,\ +vaccg,vacch,vaccq,vacq,vaf,vag,vah,vaq,vavgb,vavgf,vavgg,vavgh,vavglb,\ +vavglf,vavglg,vavglh,vceqb,vceqf,vceqg,vceqh,vchb,vchf,vchg,vchh,vchlb,vchlf,\ +vchlg,vchlh,vclzf,vctzb,vctzf,vctzg,vctzh,verimb,verimf,verimg,verimh,\ +verllb,verllf,verllg,verllh,verllvb,verllvf,verllvg,verllvh,veslb,veslf,\ +veslg,veslh,veslvb,veslvf,veslvg,veslvh,vesrab,vesraf,vesrag,vesrah,vesravb,\ +vesravf,vesravg,vesravh,vesrlb,vesrlf,vesrlg,vesrlh,vesrlvb,vesrlvf,vesrlvg,\ +vesrlvh,vfcedb,vfcesb,vfchdb,vfchedb,vfchesb,vfchsb,vflcdb,vflcsb,vflndb,\ +vflnsb,vflpdb,vgbm,vgm,vgmb,vgmf,vgmg,vgmh,vlcb,vlcf,vlcg,vlch,vleb,vlef,\ +vleg,vleh,vleib,vleif,vleig,vleih,vlpb,vlpf,vlpg,vlph,vmnb,vmnf,vmng,vmnh,\ +vmnlb,vmnlf,vmnlg,vmnlh,vmrhb,vmrhf,vmrhg,vmrhh,vmrlb,vmrlf,vmrlg,vmrlh,\ +vmxb,vmxf,vmxg,vmxh,vn,vnc,vno,vnot,vo,vone,vpdi,vperm,vpkf,vpkg,vpkh,\ +vpklsf,vpklsg,vpklsh,vpksf,vpksg,vpksh,vpopct,vpopctb,vpopctf,vpopctg,\ +vpopcth,vrepb,vrepf,vrepg,vreph,vrepib,vrepif,vrepig,vrepih,vsb,vsbiq,vscbib,\ +vscbif,vscbig,vscbih,vscbiq,vsegb,vsegf,vsegh,vsel,vsf,vsg,vsh,vsl,vsldb,vsq,\ +vsra,vsrl,vuphb,vuphf,vuphh,vuplb,vuplf,vuplhb,vuplhf,vuplhh,vuplhw,vupllb,\ +vupllf,vupllh,vx,vzero,wfcedb,wfcesb,wfchdb,wfchedb,wfchesb,wfchexb,wfchsb,\ +wfchxb,wflcdb,wflcsb,wflcxb,wflndb,wflnsb,wflnxb,wflpdb,wflpsb,wflpxb,xi,xiy")) "nothing") (define_insn_reservation "z13_2" 2 (and (eq_attr "cpu" "z13") - (eq_attr "mnemonic" "seb,vcksm,vfadb,vleib,vchgs,vleif,vleig,vleih,\ -vgbm,verimb,vone,verimf,verimg,verimh,verllvb,lpebr,verllvf,verllvg,verllvh,\ -vfeneb,wcdgb,vfenef,vfeneh,vchhs,vctzb,vctzf,vctzg,vctzh,vlcb,aeb,vlcf,\ -vlcg,vlch,vfmsdb,vgfmab,ltebr,vgfmaf,vgfmag,vgfmah,vmaeh,vsb,vsf,vsg,vsh,\ -vsl,vsq,lxebr,cdtr,fiebr,vupllb,vupllf,vupllh,vmrhb,madbr,vtm,vmrhf,vmrhg,\ -vmrhh,axtr,fiebra,vleb,cxtr,vlef,vleg,vleh,vpkf,vpkg,vpkh,vmlob,vmlof,vmloh,\ -lxdb,ldeb,vceqfs,adb,wflndb,lxeb,vn,vo,vchlb,vx,vchlf,vchlg,vchlh,vfcedbs,\ -vfcedb,vceqgs,cxbr,msdbr,vcdgb,vceqhs,meeb,lcxbr,vavglb,vavglf,vavglg,vavglh,\ -vmrlb,vmrlf,vmrlg,vmrlh,vmxb,tcdb,vmahh,vsrlb,wcgdb,lcdbr,\ -vistrbs,vrepb,wfmdb,vrepf,vrepg,vreph,ler,wcdlgb,ley,vistrb,vistrf,vistrh,\ -tceb,vsumqf,vsumqg,vesrlb,vfeezbs,maebr,vesrlf,vesrlg,vesrlh,vmeb,vmef,\ -vmeh,meebr,vflcdb,wfmadb,vperm,sxtr,vclzf,vgm,vgmb,vgmf,vgmg,vgmh,tdcxt,\ -vzero,msebr,veslb,veslf,veslg,vfenezb,vfenezf,vfenezh,vistrfs,vchf,vchg,\ -vchh,vmhb,vmhf,vmhh,cdb,veslvb,ledbr,veslvf,veslvg,veslvh,wclgdb,vfmdb,\ -vmnlb,vmnlf,vmnlg,vmnlh,vclzb,vfeezfs,vclzg,vclzh,mdb,vmxlb,vmxlf,vmxlg,\ -vmxlh,ltdtr,vsbcbiq,ceb,sebr,vistrhs,lxdtr,lcebr,vab,vaf,vag,vah,ltxtr,\ -vlpf,vlpg,vsegb,vaq,vsegf,vsegh,sdtr,cdbr,vfeezhs,le,wldeb,vfmadb,\ -vchlbs,vacccq,vmaleb,vsel,vmalef,vmaleh,vflndb,mdbr,vmlb,wflpdb,ldetr,vpksfs,\ -vpksf,vpksg,vpksh,vmaeb,veslh,vmaef,vpklsf,vpklsg,vpklsh,verllb,vchb,verllf,\ -verllg,verllh,wfsdb,maeb,vclgdb,vftcidb,vpksgs,vmxf,vmxg,vmxh,fidbra,vmnb,\ -vmnf,vmng,vfchedbs,lnebr,vfidb,msdb,vmalhb,vmalhf,vmalhh,vpkshs,vfsdb,vmalhw,\ -ltdbr,vmob,vmof,vmoh,vchlfs,mseb,vcdlgb,vlpb,wfmsdb,vlph,vmahb,vldeb,vmahf,\ -vgfmb,fidbr,aebr,wledb,vchlgs,vesravb,vfchdbs,cebr,vesravf,vesravg,vesravh,\ -vcgdb,fixbra,vrepib,vrepif,vrepig,vrepih,tdcdt,vchlhs,vceqb,vscbib,vceqf,\ -vceqg,vscbif,vscbig,vscbih,vmlhw,vscbiq,vuphb,vuphf,vuphh,vfchedb,tdcet,\ -vslb,vpklsfs,adbr,vfchdb,fixbr,vpklsgs,vsldb,vmleb,vmlef,vmleh,cpsdr,vmalb,\ -vmalf,vavgb,vmlf,vavgf,vavgg,vavgh,vgfmf,vgfmg,vgfmh,fidtr,vpklshs,lndbr,\ -vno,lpdbr,vacq,vledb,vchbs,vfeeb,vfeef,vfeeh,fixtr,vaccb,wfadb,vaccf,vaccg,\ -vacch,vnot,vmalob,vaccq,vmalof,vmaloh,lpxbr,vuplb,vuplf,axbr,lxdbr,ltxbr,\ -vpopct,vpdi,vmlhb,vmlhf,vmlhh,sdbr,vnc,vsumb,vsrab,vsumh,vmaob,vmaof,vmaoh,\ -vesrlvb,vesrlvf,vesrlvg,vesrlvh,tcxb,vceqbs,vceqh,lnxbr,sxbr,vesrab,wflcdb,\ -vesraf,vesrag,vesrah,vflpdb,vmnh,vsbiq,adtr,vsra,vsrl,vuplhb,sdb,vuplhf,\ -vuplhh,vsumgf,vsumgh,ldebr,vuplhw,vchfs,madb")) "nothing") +(eq_attr "mnemonic" "cdb,cdbr,cebr,ear,ipm,l,lcbb,lcdbr,lcebr,ld,lde,\ +ldy,lg,lgdr,lgrl,llc,llgc,llgf,llgfrl,llgh,llghrl,llgt,llh,llhrl,lm,lmg,\ +lmy,lndbr,lnebr,lpdbr,lpebr,lrl,ltdbr,ltebr,ly,popcnt,sar,tcdb,tceb,\ +vceqbs,vceqfs,vceqgs,vceqhs,vchbs,vchfs,vchgs,vchhs,vchlbs,vchlfs,vchlgs,\ +vchlhs,vfcedbs,vfcesbs,vfchdbs,vfchedbs,vfchesbs,vfchsbs,vfeeb,vfeef,vfeeh,\ +vfeneb,vfenef,vfeneh,vfenezb,vfenezf,vfenezh,vftcidb,vftcisb,vistrb,vistrf,\ +vistrh,vllezb,vllezf,vllezg,vllezh,vllezlf,vlrepb,vlrepf,vlrepg,vlreph,vlvgp,\ +vpklsfs,vpklsgs,vpklshs,vpksfs,vpksgs,vpkshs,vslb,vsrab,vsrlb,wfcdb,wfcexbs,\ +wfchexbs,wfchxbs,wfcsb")) "nothing") (define_insn_reservation "z13_3" 3 (and (eq_attr "cpu" "z13") - (eq_attr "mnemonic" "ledtr")) "nothing") +(eq_attr "mnemonic" "cds,cdsy,std,stdy,ste,stey,vcksm,vfeezbs,\ +vfeezhs,vgfmab,vgfmaf,vgfmag,vgfmah,vgfmb,vgfmf,vgfmg,vgfmh,vistrbs,vistrfs,\ +vl,vlbb,vlgvf,vlgvg,vlgvh,vll,vmaeb,vmaef,vmaeh,vmahb,vmahf,vmahh,vmalb,\ +vmaleb,vmalef,vmaleh,vmalf,vmalhb,vmalhf,vmalhh,vmalhw,vmalob,vmalof,vmaloh,\ +vmaob,vmaof,vmaoh,vmeb,vmef,vmeh,vmhb,vmhf,vmhh,vmlb,vmleb,vmlef,vmleh,vmlf,\ +vmlhb,vmlhf,vmlhh,vmlhw,vmlob,vmlof,vmloh,vmob,vmof,vmoh,vsumb,vsumgf,\ +vsumgh,vsumh,vsumqf,vsumqg,vtm")) "nothing") (define_insn_reservation "z13_4" 4 (and (eq_attr "cpu" "z13") - (eq_attr "mnemonic" "dr,mxbr,dlr")) "nothing") +(eq_attr "mnemonic" "bas,basr,chhsi,clc,ex,lam,lcgfr,lxr,lzxr,mghi,\ +mh,mhi,mhy,mvc,oc,tabort,tbegin,tbeginc,tend,vst,vstl,xc")) "nothing") + +(define_insn_reservation "z13_5" 5 + (and (eq_attr "cpu" "z13") +(eq_attr "mnemonic" "alc,alcg,alcgr,alcr,cs,csg,csy,lngfr,lpgfr,ms,\ +msfi,msgf,msgfi,msgfr,msr,msy,rnsbg,rosbg,rxsbg,slb,slbg,slbgr,slbr,stm,\ +stmg,stmy")) "nothing") (define_insn_reservation "z13_6" 6 (and (eq_attr "cpu" "z13") - (eq_attr "mnemonic" "debr,sqeb,deb,sqebr")) "nothing") +(eq_attr "mnemonic" "adb,adbr,aeb,aebr,fidbr,fidbra,fiebr,fiebra,\ +ldeb,ldebr,ledbr,madbr,mdbr,meeb,meebr,msdbr,sdb,sdbr,seb,sebr,sfpc,wcdgb,\ +wcdlgb,wcgdb,wclgdb,wfadb,wfasb,wfaxb,wfisb,wfixb,wflld,wfmadb,wfmasb,wfmaxb,\ +wfmdb,wfmsb,wfmsdb,wfmssb,wfmsxb,wfmxb,wfsdb,wfssb,wfsxb,wldeb,wledb")) "nothing") (define_insn_reservation "z13_7" 7 (and (eq_attr "cpu" "z13") - (eq_attr "mnemonic" "mdtr")) "nothing") +(eq_attr "mnemonic" "adtr,cdtr,fidtr,ldetr,msg,msgr,sdtr,tdcdt,tdcet,\ +vcdgb,vcdlgb,vcgdb,vclgdb,vfadb,vfasb,vfidb,vfisb,vfmadb,vfmasb,vfmdb,vfmsb,\ +vfmsdb,vfmssb,vfsdb,vfssb,vldeb,vledb")) "nothing") (define_insn_reservation "z13_8" 8 (and (eq_attr "cpu" "z13") - (eq_attr "mnemonic" "wfddb,ddb,vfddb,ddbr")) "nothing") +(eq_attr "mnemonic" "cdsg,lpq,stpq,vgef,vgeg,vsteb")) "nothing") (define_insn_reservation "z13_9" 9 (and (eq_attr "cpu" "z13") - (eq_attr "mnemonic" "dsgr,wfsqdb,dsgfr,sqdb,sqdbr,vfsqdb")) "nothing") +(eq_attr "mnemonic" "cxfbr,cxgbr,cxlgbr,stam")) "nothing") -(define_insn_reservation "z13_13" 13 +(define_insn_reservation "z13_10" 10 + (and (eq_attr "cpu" "z13") +(eq_attr "mnemonic" "cdfbr,cdgbr,cdlfbr,cdlgbr,cefbr,cegbr,celfbr,\ +celgbr,flogr,m,madb,maeb,maebr,mfy,ml,mlr,mr,msdb,mseb,msebr")) "nothing") + +(define_insn_reservation "z13_11" 11 + (and (eq_attr "cpu" "z13") +(eq_attr "mnemonic" "lxdb,lxdbr,lxeb,lxebr,vscef,vsceg")) "nothing") + +(define_insn_reservation "z13_12" 12 (and (eq_attr "cpu" "z13") - (eq_attr "mnemonic" "mxtr,ddtr")) "nothing") +(eq_attr "mnemonic" "cfdbr,cfebr,cgdbr,cgebr,clfdbr,clfebr,clgdbr,\ +clgebr,cxbr,cxtr,mlg,mlgr,tcxb,tdcxt")) "nothing") -(define_insn_reservation "z13_16" 16 +(define_insn_reservation "z13_13" 13 (and (eq_attr "cpu" "z13") - (eq_attr "mnemonic" "sqxbr")) "nothing") +(eq_attr "mnemonic" "axbr,axtr,fixbr,fixbra,fixtr,lcxbr,lnxbr,lpxbr,\ +ltxbr,ltxtr,lxdtr,sxbr,sxtr")) "nothing") -(define_insn_reservation "z13_17" 17 +(define_insn_reservation "z13_14" 14 (and (eq_attr "cpu" "z13") - (eq_attr "mnemonic" "dxtr")) "nothing") +(eq_attr "mnemonic" "cfxbr,cgxbr,clfxbr,clgxbr,ledtr")) "nothing") (define_insn_reservation "z13_20" 20 (and (eq_attr "cpu" "z13") - (eq_attr "mnemonic" "dxbr,dlgr")) "nothing") +(eq_attr "mnemonic" "cdftr,cdgtr,cdlftr,cdlgtr,cgdtr,cgxtr,clfxtr,\ +clgdtr,clgxtr,cxftr,cxgtr,cxlftr,cxlgtr,d,ddb,ddbr,ddtr,deb,debr,dl,dlg,dlgr,\ +dlr,dr,dsg,dsgf,dsgfr,dsgr,dxbr,dxtr,efpc,mdtr,mxbr,mxtr,sqdb,sqdbr,sqeb,\ +sqebr,sqxbr,vfddb,vfdsb,vfsqdb,vfsqsb,wfddb,wfdsb,wfdxb,wfsqdb,wfsqxb")) "nothing") diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 23255ef..6ee5a6e 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -344,20 +344,17 @@ extern int reload_completed; /* Kept up to date using the SCHED_VARIABLE_ISSUE hook. */ static rtx_insn *last_scheduled_insn; -#define MAX_SCHED_UNITS 3 +#define MAX_SCHED_UNITS 4 static int last_scheduled_unit_distance[MAX_SCHED_UNITS]; #define NUM_SIDES 2 static int current_side = 1; -#define LONGRUNNING_THRESHOLD 5 +#define LONGRUNNING_THRESHOLD 20 /* Estimate of number of cycles a long-running insn occupies an execution unit. */ -static unsigned fxu_longrunning[NUM_SIDES]; -static unsigned vfu_longrunning[NUM_SIDES]; - -/* Factor to scale latencies by, determined by measurements. */ -#define LATENCY_FACTOR 4 +static unsigned fxd_longrunning[NUM_SIDES]; +static unsigned fpd_longrunning[NUM_SIDES]; /* The maximum score added for an instruction whose unit hasn't been in use for MAX_SCHED_MIX_DISTANCE steps. Increase this value to @@ -14328,13 +14325,15 @@ s390_get_unit_mask (rtx_insn *insn, int *units) { case PROCESSOR_2964_Z13: case PROCESSOR_3906_Z14: - *units = 3; + *units = 4; if (get_attr_z13_unit_lsu (insn)) mask |= 1 << 0; - if (get_attr_z13_unit_fxu (insn)) + if (get_attr_z13_unit_fxa (insn)) mask |= 1 << 1; - if (get_attr_z13_unit_vfu (insn)) + if (get_attr_z13_unit_fxb (insn)) mask |= 1 << 2; + if (get_attr_z13_unit_vfu (insn)) + mask |= 1 << 3; break; default: gcc_unreachable (); @@ -14424,12 +14423,12 @@ s390_sched_score (rtx_insn *insn) /* Try to delay long-running insns when side is busy. */ if (latency > LONGRUNNING_THRESHOLD) { - if (get_attr_z13_unit_fxu (insn) && fxu_longrunning[current_side] - && fxu_longrunning[other_side] <= fxu_longrunning[current_side]) + if (get_attr_z13_unit_fxu (insn) && fxd_longrunning[current_side] + && fxd_longrunning[other_side] <= fxd_longrunning[current_side]) score = MAX (0, score - 10); - if (get_attr_z13_unit_vfu (insn) && vfu_longrunning[current_side] - && vfu_longrunning[other_side] <= vfu_longrunning[current_side]) + if (get_attr_z13_unit_vfu (insn) && fpd_longrunning[current_side] + && fpd_longrunning[other_side] <= fpd_longrunning[current_side]) score = MAX (0, score - 10); } } @@ -14614,19 +14613,19 @@ s390_sched_variable_issue (FILE *file, int verbose, rtx_insn *insn, int more) for (int i = 0; i < 2; i++) { - if (fxu_longrunning[i] >= 1) - fxu_longrunning[i] -= 1; - if (vfu_longrunning[i] >= 1) - vfu_longrunning[i] -= 1; + if (fxd_longrunning[i] >= 1) + fxd_longrunning[i] -= 1; + if (fpd_longrunning[i] >= 1) + fpd_longrunning[i] -= 1; } unsigned latency = insn_default_latency (insn); if (latency > LONGRUNNING_THRESHOLD) { if (get_attr_z13_unit_fxu (insn)) - fxu_longrunning[current_side] = latency * LATENCY_FACTOR; + fxd_longrunning[current_side] = latency; else - vfu_longrunning[current_side] = latency * LATENCY_FACTOR; + fpd_longrunning[current_side] = latency; } if (verbose > 5) -- cgit v1.1 From ff99338ce375620258e8ebba222d6c224914b7d2 Mon Sep 17 00:00:00 2001 From: Robin Dapp Date: Tue, 12 Mar 2019 17:08:27 +0000 Subject: S/390: Rework instruction scheduling. This patch set adds new pipeline descriptions for z13 and z14. Based on that, the scoring and some properties are handled differently in the scheduler hooks. The patch before (r269620) also belongs to this set but I accidentally applied it separately. From-SVN: r269622 --- gcc/ChangeLog | 24 +++ gcc/config/s390/3906.md | 282 +++++++++++++++++++++++++++++ gcc/config/s390/s390.c | 297 +++++++++++++++++++------------ gcc/config/s390/s390.h | 2 +- gcc/config/s390/s390.md | 3 + gcc/testsuite/ChangeLog | 4 + gcc/testsuite/gcc.target/s390/memset-1.c | 6 +- 7 files changed, 503 insertions(+), 115 deletions(-) create mode 100644 gcc/config/s390/3906.md (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b39322d..3c2499b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,29 @@ 2019-03-12 Robin Dapp + * config/s390/3906.md: New file. + * config/s390/s390.c (MAX_SCHED_UNITS): Increase. + (LONGRUNNING_THRESHOLD): Remove. + (MAX_SCHED_MIX_SCORE): Decrease. + (MAX_SCHED_MIX_DISTANCE): Decrease. + (s390_bb_fallthru_entry_likely): Assume fallthru for less than likely. + (struct s390_sched_state): New struct to hold scheduling state. + (S390_SCHED_STATE_NORMAL): Remove. + (S390_SCHED_STATE_CRACKED): Remove. + (S390_SCHED_ATTR_MASK_GROUPOFTWO): Add. + (s390_get_sched_attrmask): Use new attribute. + (s390_get_unit_mask): Use new units. + (s390_is_fpd): New function. + (s390_is_fxd): New function. + (s390_is_longrunning): New function. + (s390_sched_score): Use new functions. + (s390_sched_reorder): Likewise. + (s390_sched_variable_issue): Rework and use new functions. + (s390_sched_init): Use new functions. + * config/s390/s390.h (s390_tune_attr): Add z14. + * config/s390/s390.md: Add z14. + +2019-03-12 Robin Dapp + * config/s390/2964.md: Update pipeline description. * config/s390/s390.c (MAX_SCHED_UNITS): Increase. (LONGRUNNING_THRESHOLD): Remove. diff --git a/gcc/config/s390/3906.md b/gcc/config/s390/3906.md new file mode 100644 index 0000000..8cb4565 --- /dev/null +++ b/gcc/config/s390/3906.md @@ -0,0 +1,282 @@ +;; Scheduling description for z14. +;; Copyright (C) 2019 Free Software Foundation, Inc. +;; Contributed by Robin Dapp (rdapp@linux.ibm.com) + +;; This file is part of GCC. + +;; GCC is free software; you can redistribute it and/or modify it under +;; the terms of the GNU General Public License as published by the Free +;; Software Foundation; either version 3, or (at your option) any later +;; version. + +;; GCC is distributed in the hope that it will be useful, but WITHOUT ANY +;; WARRANTY; without even the implied warranty of MERCHANTABILITY or +;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +;; for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GCC; see the file COPYING3. If not see +;; . + +(define_attr "z14_unit_fpd" "" +(cond [(eq_attr "mnemonic" "ddb,ddbr,deb,debr,dxbr,sqdb,sqdbr,sqeb,\ +sqebr,sqxbr,vfddb,vfdsb,vfsqdb,vfsqsb,wfddb,wfdsb,wfdxb,wfsqdb,wfsqxb") + (const_int 1)] (const_int 0))) + +(define_attr "z14_unit_fxa" "" +(cond [(eq_attr "mnemonic" "a,afi,ag,agf,agfi,agfr,agh,aghi,aghik,\ +agr,agrk,ahi,ahik,al,alc,alcg,alcgr,alcr,alfi,alg,algf,algfi,algfr,\ +alghsik,algr,alhsik,alr,alrk,aly,ark,ay,bras,brasl,etnd,exrl,flogr,ic,icm,\ +icmh,icmy,icy,iihf,iilf,ipm,la,larl,lay,lb,lbr,lcgr,lcr,lgb,lgbr,lgf,lgfi,\ +lgfr,lgfrl,lgh,lghi,lghr,lghrl,lgr,lh,lhi,lhr,lhrl,lhy,llcr,llgfr,llghr,\ +llgtr,llhr,llihf,llihh,llihl,llilf,llilh,llill,lngr,lnr,loc,locg,locghi,\ +locgr,lochi,locr,lpgr,lpr,lr,lrv,lrvg,lrvgr,lrvh,lrvr,lt,ltg,ltgf,ltgfr,\ +ltgr,ltr,m,mfy,mg,mgh,mghi,mgrk,mh,mhi,mhy,ml,mlg,mlgr,mlr,mr,ms,msfi,msg,\ +msgf,msgfi,msgfr,msgr,msgrkc,msr,msrkc,msy,n,ng,ngr,ngrk,nihf,nihh,nihl,\ +nilf,nilh,nill,nr,nrk,ny,o,og,ogr,ogrk,oihf,oihh,oihl,oilf,oilh,oill,or,\ +ork,oy,pfpo,popcnt,risbg,risbgn,rll,rllg,s,sg,sgf,sgfr,sgh,sgr,sgrk,sh,\ +shy,sl,slb,slbg,slbgr,slbr,slfi,slg,slgf,slgfi,slgfr,slgr,slgrk,sll,sllg,\ +sllk,slr,slrk,sly,sr,sra,srag,srak,srl,srlg,srlk,sy,x,xg,xgr,xgrk,xihf,\ +xilf,xr,xrk,xy") + (const_int 1)] (const_int 0))) + +(define_attr "z14_unit_fxb" "" +(cond [(eq_attr "mnemonic" "agsi,algsi,alsi,asi,b,bc,bcr,bi,br,brcl,\ +c,cfi,cg,cgf,cgfi,cgfr,cgfrl,cgh,cghi,cghrl,cghsi,cgit,cgr,cgrl,cgrt,ch,\ +chi,chrl,chsi,chy,cit,cl,clfhsi,clfi,clfit,clg,clgf,clgfi,clgfr,clgfrl,\ +clghsi,clgit,clgr,clgrl,clgrt,clgt,clhhsi,clhrl,cli,cliy,clm,clmy,clr,clrl,\ +clrt,clt,cly,cr,crl,crt,cy,j,jg,laa,laag,lan,lang,lao,laog,lat,lax,laxg,\ +lcdfr,ldgr,ldr,lgat,lgdr,lndfr,lpdfr,lzdr,lzer,mvghi,mvhhi,mvhi,mvi,mviy,ni,\ +niy,nop,nopr,ntstg,oi,oiy,ppa,st,stc,stcy,std,stdy,ste,stey,stg,stgrl,sth,\ +sthrl,sthy,stoc,stocg,strl,strv,strvg,strvh,sty,tend,tm,tmh,tmhh,tmhl,tml,\ +tmlh,tmll,tmy,vlgvf,vlgvg,vlgvh,vlr,vlvgb,vlvgf,vlvgg,vlvgh,vlvgp,vst,vstl,\ +vstrl,vstrlr,xi,xiy") + (const_int 1)] (const_int 0))) + +(define_attr "z14_unit_fxd" "" +(cond [(eq_attr "mnemonic" "dlgr,dlr,dr,dsgfr,dsgr") + (const_int 1)] (const_int 0))) + +(define_attr "z14_unit_lsu" "" +(cond [(eq_attr "mnemonic" "a,adb,aeb,ag,agf,agh,agsi,al,alc,alcg,\ +alg,algf,algsi,alsi,aly,asi,ay,c,cdb,cg,cgf,cgfrl,cgh,cghrl,cghsi,cgrl,ch,\ +chrl,chsi,chy,cl,clc,clfhsi,clg,clgf,clgfrl,clghsi,clgrl,clgt,clhhsi,clhrl,\ +cli,cliy,clm,clmy,clrl,clt,cly,crl,cy,ddb,deb,ear,ic,icm,icmh,icmy,icy,l,\ +laa,laag,lan,lang,lao,laog,lat,lax,laxg,lb,lcbb,ld,lde,ldeb,ldy,le,ley,lg,\ +lgat,lgb,lgf,lgfrl,lgh,lghrl,lgrl,lh,lhrl,lhy,llc,llgc,llgf,llgfrl,llgh,\ +llghrl,llgt,llh,llhrl,loc,locg,lrl,lrv,lrvg,lrvh,lt,ltg,ltgf,ly,m,madb,maeb,\ +meeb,mfy,mg,mgh,mh,mhy,ml,mlg,ms,msdb,mseb,msg,msgf,msy,mvghi,mvhhi,mvhi,\ +mvi,mviy,n,ng,ni,niy,ntstg,ny,o,og,oi,oiy,oy,s,sar,sdb,seb,sfpc,sg,sgf,\ +sgh,sh,shy,sl,slb,slbg,slg,slgf,sly,sqdb,sqeb,st,stc,stcy,std,stdy,ste,\ +stey,stg,stgrl,sth,sthrl,sthy,stoc,stocg,strl,strv,strvg,strvh,sty,sy,\ +tabort,tm,tmy,vl,vlbb,vleb,vlef,vleg,vleh,vll,vllezb,vllezf,vllezg,vllezh,\ +vllezlf,vlrepb,vlrepf,vlrepg,vlreph,vlrl,vlrlr,vst,vstl,vstrl,vstrlr,x,xg,xi,\ +xiy,xy") + (const_int 1)] (const_int 0))) + +(define_attr "z14_unit_vfu" "" +(cond [(eq_attr "mnemonic" "adb,adbr,adtr,aeb,aebr,axbr,axtr,cdb,\ +cdbr,cdtr,cebr,cpsdr,cxbr,cxtr,ddtr,dxtr,fidbr,fidbra,fidtr,fiebr,fiebra,\ +fixbr,fixbra,fixtr,lcdbr,lcebr,lcxbr,ldeb,ldebr,ldetr,le,ledbr,ledtr,ler,\ +ley,lndbr,lnebr,lnxbr,lpdbr,lpebr,lpxbr,ltdbr,ltebr,ltxbr,ltxtr,lxdb,\ +lxdbr,lxdtr,lxeb,lxebr,madb,madbr,maeb,maebr,mdbr,mdtr,meeb,meebr,msdb,\ +msdbr,mseb,msebr,mxbr,mxtr,sdb,sdbr,sdtr,seb,sebr,sxbr,sxtr,tcdb,tceb,tcxb,\ +tdcdt,tdcet,tdcxt,vab,vaccb,vacccq,vaccf,vaccg,vacch,vaccq,vacq,vaf,vag,vah,\ +vaq,vavgb,vavgf,vavgg,vavgh,vavglb,vavglf,vavglg,vavglh,vbperm,vcdgb,\ +vcdlgb,vceqb,vceqbs,vceqf,vceqfs,vceqg,vceqgs,vceqh,vceqhs,vcgdb,vchb,vchbs,\ +vchf,vchfs,vchg,vchgs,vchh,vchhs,vchlb,vchlbs,vchlf,vchlfs,vchlg,vchlgs,\ +vchlh,vchlhs,vcksm,vclgdb,vclzf,vctzb,vctzf,vctzg,vctzh,verimb,verimf,\ +verimg,verimh,verllb,verllf,verllg,verllh,verllvb,verllvf,verllvg,verllvh,\ +veslb,veslf,veslg,veslh,veslvb,veslvf,veslvg,veslvh,vesrab,vesraf,vesrag,\ +vesrah,vesravb,vesravf,vesravg,vesravh,vesrlb,vesrlf,vesrlg,vesrlh,vesrlvb,\ +vesrlvf,vesrlvg,vesrlvh,vfadb,vfasb,vfcedb,vfcedbs,vfcesb,vfcesbs,vfchdb,\ +vfchdbs,vfchedb,vfchedbs,vfchesb,vfchesbs,vfchsb,vfchsbs,vfeeb,vfeef,vfeeh,\ +vfeezbs,vfeezhs,vfeneb,vfenef,vfeneh,vfenezb,vfenezf,vfenezh,vfidb,vfisb,\ +vflcdb,vflcsb,vflndb,vflnsb,vflpdb,vfmadb,vfmasb,vfmaxdb,vfmaxsb,vfmdb,\ +vfmindb,vfminsb,vfmsb,vfmsdb,vfmssb,vfnmadb,vfnmsdb,vfnmssb,vfsdb,vfssb,\ +vftcidb,vftcisb,vgbm,vgfmab,vgfmaf,vgfmag,vgfmah,vgfmb,vgfmf,vgfmg,vgfmh,vgm,\ +vgmb,vgmf,vgmg,vgmh,vistrb,vistrbs,vistrf,vistrfs,vistrh,vlcb,vlcf,vlcg,\ +vlch,vldeb,vleb,vledb,vlef,vleg,vleh,vleib,vleif,vleig,vleih,vlpb,vlpf,\ +vlpg,vlph,vmaeb,vmaef,vmaeh,vmahb,vmahf,vmahh,vmalb,vmaleb,vmalef,vmaleh,\ +vmalf,vmalhb,vmalhf,vmalhh,vmalhw,vmalob,vmalof,vmaloh,vmaob,vmaof,vmaoh,\ +vmeb,vmef,vmeh,vmhb,vmhf,vmhh,vmlb,vmleb,vmlef,vmleh,vmlf,vmlhb,vmlhf,\ +vmlhh,vmlhw,vmlob,vmlof,vmloh,vmnb,vmnf,vmng,vmnh,vmnlb,vmnlf,vmnlg,vmnlh,\ +vmob,vmof,vmoh,vmrhb,vmrhf,vmrhg,vmrhh,vmrlb,vmrlf,vmrlg,vmrlh,vmxb,vmxf,\ +vmxg,vmxh,vn,vnc,vnn,vno,vnot,vnx,vo,voc,vone,vpdi,vperm,vpkf,vpkg,vpkh,\ +vpklsf,vpklsfs,vpklsg,vpklsgs,vpklsh,vpklshs,vpksf,vpksfs,vpksg,vpksgs,vpksh,\ +vpkshs,vpopct,vpopctb,vpopctf,vpopctg,vpopcth,vrepb,vrepf,vrepg,vreph,vrepib,\ +vrepif,vrepig,vrepih,vsb,vsbiq,vscbib,vscbif,vscbig,vscbih,vscbiq,vsegb,\ +vsegf,vsegh,vsel,vsf,vsg,vsh,vsl,vslb,vsldb,vsq,vsra,vsrab,vsrl,vsrlb,vsumb,\ +vsumgf,vsumgh,vsumh,vsumqf,vsumqg,vtm,vuphb,vuphf,vuphh,vuplb,vuplf,vuplhb,\ +vuplhf,vuplhh,vuplhw,vupllb,vupllf,vupllh,vx,vzero,wcdgb,wcdlgb,wcgdb,wclgdb,\ +wfadb,wfasb,wfaxb,wfcdb,wfcedb,wfcesb,wfcexbs,wfchdb,wfchedb,wfchesb,\ +wfchexb,wfchexbs,wfchsb,wfchxb,wfchxbs,wfcsb,wfisb,wfixb,wflcdb,wflcsb,wflcxb,\ +wflld,wflndb,wflnsb,wflnxb,wflpdb,wflpsb,wflpxb,wfmadb,wfmasb,wfmaxb,\ +wfmaxxb,wfmdb,wfminxb,wfmsb,wfmsdb,wfmssb,wfmsxb,wfmxb,wfnmaxb,wfnmsxb,wfsdb,\ +wfssb,wfsxb,wldeb,wledb") + (const_int 1)] (const_int 0))) + +(define_attr "z14_cracked" "" +(cond [(eq_attr "mnemonic" "bas,basr,cdfbr,cdftr,cdgbr,cdgtr,cdlfbr,\ +cdlftr,cdlgbr,cdlgtr,cefbr,cegbr,celfbr,celgbr,cfdbr,cfebr,cfxbr,cgdbr,cgdtr,\ +cgebr,cgxbr,cgxtr,chhsi,clfdbr,clfebr,clfxbr,clfxtr,clgdbr,clgdtr,clgebr,\ +clgxbr,clgxtr,cs,csg,csy,d,efpc,ex,lcgfr,lngfr,lpgfr,lpq,lxr,lzxr,rxsbg,stpq,\ +vgef,vgeg,vscef,vsceg,vsteb") + (const_int 1)] (const_int 0))) + +(define_attr "z14_expanded" "" +(cond [(eq_attr "mnemonic" "cds,cdsg,cdsy,cxfbr,cxftr,cxgbr,cxgtr,\ +cxlftr,cxlgbr,cxlgtr,dl,dlg,dsg,dsgf,lam,lm,lmg,lmy,sldl,srda,srdl,stam,stm,\ +stmg,stmy,tbegin,tbeginc") + (const_int 1)] (const_int 0))) + +(define_attr "z14_groupalone" "" +(cond [(eq_attr "mnemonic" "alc,alcg,alcgr,alcr,axbr,axtr,clc,cxbr,\ +cxtr,dlgr,dlr,dr,dsgfr,dsgr,dxbr,dxtr,fixbr,fixbra,fixtr,flogr,lcxbr,lnxbr,\ +lpxbr,ltxbr,ltxtr,lxdb,lxdbr,lxdtr,lxeb,lxebr,m,madb,maeb,maebr,mfy,mg,mgrk,\ +ml,mlg,mlgr,mlr,mr,msdb,mseb,msebr,mvc,mxbr,mxtr,oc,ppa,sfpc,slb,slbg,\ +slbgr,slbr,sqxbr,sxbr,sxtr,tabort,tcxb,tdcxt,tend,xc") + (const_int 1)] (const_int 0))) + +(define_attr "z14_endgroup" "" +(cond [(eq_attr "mnemonic" "bras,brasl,exrl,ipm") + (const_int 1)] (const_int 0))) + +(define_attr "z14_groupoftwo" "" +(cond [(eq_attr "mnemonic" "vacccq,vacq,vfmadb,vfmasb,vfmsdb,vfmssb,\ +vfnmadb,vfnmsdb,vfnmssb,vgfmab,vgfmaf,vgfmag,vgfmah,vmaeb,vmaef,vmaeh,vmahb,\ +vmahf,vmahh,vmalb,vmaleb,vmalef,vmaleh,vmalf,vmalhb,vmalhf,vmalhh,vmalhw,\ +vmalob,vmalof,vmaloh,vmaob,vmaof,vmaoh,vperm,vsbiq,vsel,wfmadb,wfmasb,wfmaxb,\ +wfmsdb,wfmssb,wfmsxb,wfnmaxb,wfnmsxb") + (const_int 1)] (const_int 0))) + +(define_insn_reservation "z14_0" 0 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "a,afi,ag,agfi,aghi,aghik,agr,agrk,ahi,ahik,al,\ +alfi,alg,algf,algfi,algfr,alghsik,algr,alhsik,alr,alrk,aly,ark,ay,b,bc,bcr,\ +bi,br,bras,brasl,brcl,c,cfi,cg,cgfi,cghi,cghsi,cgit,cgr,cgrl,cgrt,chi,\ +chsi,cit,cl,clfhsi,clfi,clfit,clg,clgf,clgfi,clgfr,clgfrl,clghsi,clgit,\ +clgr,clgrl,clgrt,clgt,clhhsi,clhrl,cli,cliy,clr,clrl,clrt,clt,cly,cr,crl,\ +crt,cy,etnd,exrl,ic,icm,icmh,icmy,icy,iihf,iilf,j,jg,la,larl,lat,lay,lb,\ +lbr,lcdfr,lcgr,lcr,ldgr,ldr,lgat,lgb,lgbr,lgf,lgfi,lgfr,lgfrl,lgh,lghi,\ +lghr,lghrl,lgr,lh,lhi,lhr,lhrl,lhy,llcr,llgfr,llghr,llgtr,llhr,llihf,llihh,\ +llihl,llilf,llilh,llill,lndfr,lngr,lnr,lpdfr,lpgr,lpr,lr,lrv,lrvg,lrvgr,\ +lrvh,lrvr,lt,ltg,ltgf,ltgfr,ltgr,ltr,lzdr,lzer,n,ng,ngr,ngrk,nihf,nihh,\ +nihl,nilf,nilh,nill,nop,nopr,nr,nrk,ny,o,og,ogr,ogrk,oihf,oihh,oihl,oilf,\ +oilh,oill,or,ork,oy,pfpo,risbg,risbgn,rll,rllg,rnsbg,rosbg,s,sg,sgr,sgrk,\ +sl,sldl,slfi,slg,slgf,slgfi,slgfr,slgr,slgrk,sll,sllg,sllk,slr,slrk,sly,\ +sr,sra,srag,srak,srda,srdl,srl,srlg,srlk,sy,tm,tmh,tmhh,tmhl,tml,tmlh,\ +tmll,tmy,vlr,vlvgb,vlvgf,vlvgg,vlvgh,x,xg,xgr,xgrk,xihf,xilf,xr,xrk,xy")) "nothing") + +(define_insn_reservation "z14_1" 1 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "agf,agfr,agh,agsi,algsi,alsi,asi,cgf,cgfr,cgfrl,\ +cgh,cghrl,ch,chrl,chy,clm,clmy,cpsdr,laa,laag,lan,lang,lao,laog,lax,laxg,\ +le,ler,ley,loc,locg,locghi,locgr,lochi,locr,mvghi,mvhhi,mvhi,mvi,mviy,ni,\ +niy,ntstg,oi,oiy,sgf,sgfr,sgh,sh,shy,st,stc,stcy,stg,stgrl,sth,sthrl,sthy,\ +stoc,stocg,strl,strv,strvg,strvh,sty,vab,vaccb,vacccq,vaccf,vaccg,vacch,\ +vaccq,vacq,vaf,vag,vah,vaq,vavgb,vavgf,vavgg,vavgh,vavglb,vavglf,vavglg,\ +vavglh,vbperm,vceqb,vceqf,vceqg,vceqh,vchb,vchf,vchg,vchh,vchlb,vchlf,vchlg,\ +vchlh,vclzf,vctzb,vctzf,vctzg,vctzh,verimb,verimf,verimg,verimh,verllb,\ +verllf,verllg,verllh,verllvb,verllvf,verllvg,verllvh,veslb,veslf,veslg,veslh,\ +veslvb,veslvf,veslvg,veslvh,vesrab,vesraf,vesrag,vesrah,vesravb,vesravf,\ +vesravg,vesravh,vesrlb,vesrlf,vesrlg,vesrlh,vesrlvb,vesrlvf,vesrlvg,vesrlvh,\ +vfcedb,vfcesb,vfchdb,vfchedb,vfchesb,vfchsb,vflcdb,vflcsb,vflndb,vflnsb,\ +vflpdb,vfmaxdb,vfmaxsb,vfmindb,vfminsb,vgbm,vgm,vgmb,vgmf,vgmg,vgmh,vlcb,\ +vlcf,vlcg,vlch,vleb,vlef,vleg,vleh,vleib,vleif,vleig,vleih,vlpb,vlpf,vlpg,\ +vlph,vmnb,vmnf,vmng,vmnh,vmnlb,vmnlf,vmnlg,vmnlh,vmrhb,vmrhf,vmrhg,vmrhh,\ +vmrlb,vmrlf,vmrlg,vmrlh,vmxb,vmxf,vmxg,vmxh,vn,vnc,vnn,vno,vnot,vnx,vo,voc,\ +vone,vpdi,vperm,vpkf,vpkg,vpkh,vpklsf,vpklsg,vpklsh,vpksf,vpksg,vpksh,\ +vpopct,vpopctb,vpopctf,vpopctg,vpopcth,vrepb,vrepf,vrepg,vreph,vrepib,vrepif,\ +vrepig,vrepih,vsb,vsbiq,vscbib,vscbif,vscbig,vscbih,vscbiq,vsegb,vsegf,vsegh,\ +vsel,vsf,vsg,vsh,vsl,vslb,vsldb,vsq,vsra,vsrab,vsrl,vsrlb,vuphb,vuphf,\ +vuphh,vuplb,vuplf,vuplhb,vuplhf,vuplhh,vuplhw,vupllb,vupllf,vupllh,vx,vzero,\ +wfcedb,wfcesb,wfchdb,wfchedb,wfchesb,wfchexb,wfchsb,wfchxb,wflcdb,wflcsb,\ +wflcxb,wflndb,wflnsb,wflnxb,wflpdb,wflpsb,wflpxb,wfmaxxb,wfminxb,xi,xiy")) "nothing") + +(define_insn_reservation "z14_2" 2 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "cdb,cdbr,cebr,ear,ipm,l,lcbb,lcdbr,lcebr,ld,lde,\ +ldy,lg,lgdr,lgrl,llc,llgc,llgf,llgfrl,llgh,llghrl,llgt,llh,llhrl,lm,lmg,\ +lmy,lndbr,lnebr,lpdbr,lpebr,lrl,ltdbr,ltebr,ly,popcnt,sar,tcdb,tceb,\ +vceqbs,vceqfs,vceqgs,vceqhs,vchbs,vchfs,vchgs,vchhs,vchlbs,vchlfs,vchlgs,\ +vchlhs,vfcedbs,vfcesbs,vfchdbs,vfchedbs,vfchesbs,vfchsbs,vfeeb,vfeef,vfeeh,\ +vfeneb,vfenef,vfeneh,vfenezb,vfenezf,vfenezh,vftcidb,vftcisb,vistrb,vistrf,\ +vistrh,vlgvf,vlgvg,vlgvh,vllezb,vllezf,vllezg,vllezh,vllezlf,vlrepb,vlrepf,\ +vlrepg,vlreph,vlrl,vlvgp,vpklsfs,vpklsgs,vpklshs,vpksfs,vpksgs,vpkshs,wfcdb,\ +wfcexbs,wfchexbs,wfchxbs,wfcsb")) "nothing") + +(define_insn_reservation "z14_3" 3 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "cds,cdsy,mgh,mghi,mh,mhi,mhy,std,stdy,ste,stey,\ +vcksm,vfeezbs,vfeezhs,vgfmab,vgfmaf,vgfmag,vgfmah,vgfmb,vgfmf,vgfmg,vgfmh,\ +vistrbs,vistrfs,vl,vlbb,vll,vlrlr,vmaeb,vmaef,vmaeh,vmahb,vmahf,vmahh,vmalb,\ +vmaleb,vmalef,vmaleh,vmalf,vmalhb,vmalhf,vmalhh,vmalhw,vmalob,vmalof,vmaloh,\ +vmaob,vmaof,vmaoh,vmeb,vmef,vmeh,vmhb,vmhf,vmhh,vmlb,vmleb,vmlef,vmleh,vmlf,\ +vmlhb,vmlhf,vmlhh,vmlhw,vmlob,vmlof,vmloh,vmob,vmof,vmoh,vsumb,vsumgf,\ +vsumgh,vsumh,vsumqf,vsumqg,vtm")) "nothing") + +(define_insn_reservation "z14_4" 4 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "bas,basr,chhsi,clc,ex,lam,lcgfr,lngfr,lpgfr,lxr,\ +lzxr,ms,msfi,msgf,msgfi,msgfr,msr,msy,mvc,oc,ppa,rxsbg,tabort,tbegin,\ +tbeginc,tend,vst,vstl,vstrl,vstrlr,xc")) "nothing") + +(define_insn_reservation "z14_5" 5 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "alc,alcg,alcgr,alcr,cs,csg,csy,msrkc,slb,slbg,\ +slbgr,slbr,stm,stmg,stmy")) "nothing") + +(define_insn_reservation "z14_6" 6 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "adb,adbr,aeb,aebr,fidbr,fidbra,fiebr,fiebra,\ +ldeb,ldebr,ledbr,madbr,mdbr,meeb,meebr,msdbr,msg,msgr,sdb,sdbr,seb,sebr,\ +sfpc,vcdgb,vcdlgb,vcgdb,vclgdb,vfadb,vfidb,vfmadb,vfmdb,vfmsdb,vfnmadb,\ +vfnmsdb,vfsdb,vldeb,vledb,wcdgb,wcdlgb,wcgdb,wclgdb,wfadb,wfasb,wfisb,wfmadb,\ +wfmasb,wfmdb,wfmsb,wfmsdb,wfmssb,wfsdb,wfssb,wldeb,wledb")) "nothing") + +(define_insn_reservation "z14_7" 7 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "adtr,cdtr,fidtr,ldetr,msgrkc,sdtr,tdcdt,tdcet,\ +vfasb,vfisb,vfmasb,vfmsb,vfmssb,vfnmssb,vfssb,vgef,vgeg,wflld")) "nothing") + +(define_insn_reservation "z14_8" 8 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "cdsg,flogr,lpq,stpq,vsteb")) "nothing") + +(define_insn_reservation "z14_9" 9 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "cxfbr,cxgbr,cxlgbr,m,mfy,ml,mlr,mr,stam,wfaxb,\ +wfixb,wfsxb")) "nothing") + +(define_insn_reservation "z14_10" 10 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "cdfbr,cdgbr,cdlfbr,cdlgbr,cefbr,cegbr,celfbr,\ +celgbr,madb,maeb,maebr,msdb,mseb,msebr,vscef,vsceg")) "nothing") + +(define_insn_reservation "z14_11" 11 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "lxdb,lxdbr,lxeb,lxebr,mg,mgrk,mlg,mlgr")) "nothing") + +(define_insn_reservation "z14_12" 12 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "cfdbr,cfebr,cgdbr,cgebr,clfdbr,clfebr,clgdbr,\ +clgebr,cxbr,cxtr,tcxb,tdcxt")) "nothing") + +(define_insn_reservation "z14_13" 13 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "axbr,axtr,fixbr,fixbra,fixtr,lcxbr,lnxbr,lpxbr,\ +ltxbr,ltxtr,lxdtr,sxbr,sxtr")) "nothing") + +(define_insn_reservation "z14_14" 14 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "cfxbr,cgxbr,clfxbr,clgxbr,ledtr")) "nothing") + +(define_insn_reservation "z14_20" 20 + (and (eq_attr "cpu" "z14") +(eq_attr "mnemonic" "cdftr,cdgtr,cdlftr,cdlgtr,cgdtr,cgxtr,clfxtr,\ +clgdtr,clgxtr,cxftr,cxgtr,cxlftr,cxlgtr,d,ddb,ddbr,ddtr,deb,debr,dl,dlg,dlgr,\ +dlr,dr,dsg,dsgf,dsgfr,dsgr,dxbr,dxtr,efpc,mdtr,mxbr,mxtr,sqdb,sqdbr,sqeb,\ +sqebr,sqxbr,vfddb,vfdsb,vfsqdb,vfsqsb,wfddb,wfdsb,wfdxb,wfmaxb,wfmsxb,wfmxb,\ +wfnmaxb,wfnmsxb,wfsqdb,wfsqxb")) "nothing") + diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 6ee5a6e..70a7034 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -344,28 +344,26 @@ extern int reload_completed; /* Kept up to date using the SCHED_VARIABLE_ISSUE hook. */ static rtx_insn *last_scheduled_insn; -#define MAX_SCHED_UNITS 4 -static int last_scheduled_unit_distance[MAX_SCHED_UNITS]; - #define NUM_SIDES 2 -static int current_side = 1; -#define LONGRUNNING_THRESHOLD 20 + +#define MAX_SCHED_UNITS 4 +static int last_scheduled_unit_distance[MAX_SCHED_UNITS][NUM_SIDES]; /* Estimate of number of cycles a long-running insn occupies an execution unit. */ -static unsigned fxd_longrunning[NUM_SIDES]; -static unsigned fpd_longrunning[NUM_SIDES]; +static int fxd_longrunning[NUM_SIDES]; +static int fpd_longrunning[NUM_SIDES]; /* The maximum score added for an instruction whose unit hasn't been in use for MAX_SCHED_MIX_DISTANCE steps. Increase this value to give instruction mix scheduling more priority over instruction grouping. */ -#define MAX_SCHED_MIX_SCORE 8 +#define MAX_SCHED_MIX_SCORE 2 /* The maximum distance up to which individual scores will be calculated. Everything beyond this gives MAX_SCHED_MIX_SCORE. Increase this with the OOO windows size of the machine. */ -#define MAX_SCHED_MIX_DISTANCE 100 +#define MAX_SCHED_MIX_DISTANCE 70 /* Structure used to hold the components of a S/390 memory address. A legitimate address on S/390 is of the general @@ -14243,7 +14241,7 @@ s390_z10_prevent_earlyload_conflicts (rtx_insn **ready, int *nready_p) } /* Returns TRUE if BB is entered via a fallthru edge and all other - incoming edges are less than unlikely. */ + incoming edges are less than likely. */ static bool s390_bb_fallthru_entry_likely (basic_block bb) { @@ -14259,28 +14257,29 @@ s390_bb_fallthru_entry_likely (basic_block bb) FOR_EACH_EDGE (e, ei, bb->preds) if (e != fallthru_edge - && e->probability >= profile_probability::unlikely ()) + && e->probability >= profile_probability::likely ()) return false; return true; } -/* The s390_sched_state variable tracks the state of the current or - the last instruction group. - - 0,1,2 number of instructions scheduled in the current group - 3 the last group is complete - normal insns - 4 the last group was a cracked/expanded insn */ - -static int s390_sched_state = 0; +struct s390_sched_state +{ + /* Number of insns in the group. */ + int group_state; + /* Execution side of the group. */ + int side; + /* Group can only hold two insns. */ + bool group_of_two; +} s390_sched_state; -#define S390_SCHED_STATE_NORMAL 3 -#define S390_SCHED_STATE_CRACKED 4 +static struct s390_sched_state sched_state = {0, 1, false}; #define S390_SCHED_ATTR_MASK_CRACKED 0x1 #define S390_SCHED_ATTR_MASK_EXPANDED 0x2 #define S390_SCHED_ATTR_MASK_ENDGROUP 0x4 #define S390_SCHED_ATTR_MASK_GROUPALONE 0x8 +#define S390_SCHED_ATTR_MASK_GROUPOFTWO 0x10 static unsigned int s390_get_sched_attrmask (rtx_insn *insn) @@ -14300,7 +14299,6 @@ s390_get_sched_attrmask (rtx_insn *insn) mask |= S390_SCHED_ATTR_MASK_GROUPALONE; break; case PROCESSOR_2964_Z13: - case PROCESSOR_3906_Z14: if (get_attr_z13_cracked (insn)) mask |= S390_SCHED_ATTR_MASK_CRACKED; if (get_attr_z13_expanded (insn)) @@ -14309,6 +14307,20 @@ s390_get_sched_attrmask (rtx_insn *insn) mask |= S390_SCHED_ATTR_MASK_ENDGROUP; if (get_attr_z13_groupalone (insn)) mask |= S390_SCHED_ATTR_MASK_GROUPALONE; + if (get_attr_z13_groupoftwo (insn)) + mask |= S390_SCHED_ATTR_MASK_GROUPOFTWO; + break; + case PROCESSOR_3906_Z14: + if (get_attr_z14_cracked (insn)) + mask |= S390_SCHED_ATTR_MASK_CRACKED; + if (get_attr_z14_expanded (insn)) + mask |= S390_SCHED_ATTR_MASK_EXPANDED; + if (get_attr_z14_endgroup (insn)) + mask |= S390_SCHED_ATTR_MASK_ENDGROUP; + if (get_attr_z14_groupalone (insn)) + mask |= S390_SCHED_ATTR_MASK_GROUPALONE; + if (get_attr_z14_groupoftwo (insn)) + mask |= S390_SCHED_ATTR_MASK_GROUPOFTWO; break; default: gcc_unreachable (); @@ -14324,7 +14336,6 @@ s390_get_unit_mask (rtx_insn *insn, int *units) switch (s390_tune) { case PROCESSOR_2964_Z13: - case PROCESSOR_3906_Z14: *units = 4; if (get_attr_z13_unit_lsu (insn)) mask |= 1 << 0; @@ -14335,22 +14346,62 @@ s390_get_unit_mask (rtx_insn *insn, int *units) if (get_attr_z13_unit_vfu (insn)) mask |= 1 << 3; break; + case PROCESSOR_3906_Z14: + *units = 4; + if (get_attr_z14_unit_lsu (insn)) + mask |= 1 << 0; + if (get_attr_z14_unit_fxa (insn)) + mask |= 1 << 1; + if (get_attr_z14_unit_fxb (insn)) + mask |= 1 << 2; + if (get_attr_z14_unit_vfu (insn)) + mask |= 1 << 3; + break; default: gcc_unreachable (); } return mask; } +static bool +s390_is_fpd (rtx_insn *insn) +{ + if (insn == NULL_RTX) + return false; + + return get_attr_z13_unit_fpd (insn) || get_attr_z14_unit_fpd (insn); +} + +static bool +s390_is_fxd (rtx_insn *insn) +{ + if (insn == NULL_RTX) + return false; + + return get_attr_z13_unit_fxd (insn) || get_attr_z14_unit_fxd (insn); +} + +/* Returns TRUE if INSN is a long-running instruction. */ +static bool +s390_is_longrunning (rtx_insn *insn) +{ + if (insn == NULL_RTX) + return false; + + return s390_is_fxd (insn) || s390_is_fpd (insn); +} + + /* Return the scheduling score for INSN. The higher the score the better. The score is calculated from the OOO scheduling attributes - of INSN and the scheduling state s390_sched_state. */ + of INSN and the scheduling state sched_state. */ static int s390_sched_score (rtx_insn *insn) { unsigned int mask = s390_get_sched_attrmask (insn); int score = 0; - switch (s390_sched_state) + switch (sched_state.group_state) { case 0: /* Try to put insns into the first slot which would otherwise @@ -14360,7 +14411,7 @@ s390_sched_score (rtx_insn *insn) score += 5; if ((mask & S390_SCHED_ATTR_MASK_GROUPALONE) != 0) score += 10; - /* fallthrough */ + break; case 1: /* Prefer not cracked insns while trying to put together a group. */ @@ -14370,6 +14421,11 @@ s390_sched_score (rtx_insn *insn) score += 10; if ((mask & S390_SCHED_ATTR_MASK_ENDGROUP) == 0) score += 5; + /* If we are in a group of two already, try to schedule another + group-of-two insn to avoid shortening another group. */ + if (sched_state.group_of_two + && (mask & S390_SCHED_ATTR_MASK_GROUPOFTWO) != 0) + score += 15; break; case 2: /* Prefer not cracked insns while trying to put together a @@ -14381,21 +14437,10 @@ s390_sched_score (rtx_insn *insn) /* Prefer endgroup insns in the last slot. */ if ((mask & S390_SCHED_ATTR_MASK_ENDGROUP) != 0) score += 10; - break; - case S390_SCHED_STATE_NORMAL: - /* Prefer not cracked insns if the last was not cracked. */ - if ((mask & S390_SCHED_ATTR_MASK_CRACKED) == 0 - && (mask & S390_SCHED_ATTR_MASK_EXPANDED) == 0) - score += 5; - if ((mask & S390_SCHED_ATTR_MASK_GROUPALONE) != 0) - score += 10; - break; - case S390_SCHED_STATE_CRACKED: - /* Try to keep cracked insns together to prevent them from - interrupting groups. */ - if ((mask & S390_SCHED_ATTR_MASK_CRACKED) != 0 - || (mask & S390_SCHED_ATTR_MASK_EXPANDED) != 0) - score += 5; + /* Try to avoid group-of-two insns in the last slot as they will + shorten this group as well as the next one. */ + if ((mask & S390_SCHED_ATTR_MASK_GROUPOFTWO) != 0) + score = MAX (0, score - 15); break; } @@ -14413,23 +14458,37 @@ s390_sched_score (rtx_insn *insn) CPU. */ for (i = 0; i < units; i++, m <<= 1) if (m & unit_mask) - score += (last_scheduled_unit_distance[i] * MAX_SCHED_MIX_SCORE / - MAX_SCHED_MIX_DISTANCE); - - unsigned latency = insn_default_latency (insn); + score += (last_scheduled_unit_distance[i][sched_state.side] + * MAX_SCHED_MIX_SCORE / MAX_SCHED_MIX_DISTANCE); - int other_side = 1 - current_side; + int other_side = 1 - sched_state.side; /* Try to delay long-running insns when side is busy. */ - if (latency > LONGRUNNING_THRESHOLD) + if (s390_is_longrunning (insn)) { - if (get_attr_z13_unit_fxu (insn) && fxd_longrunning[current_side] - && fxd_longrunning[other_side] <= fxd_longrunning[current_side]) - score = MAX (0, score - 10); + if (s390_is_fxd (insn)) + { + if (fxd_longrunning[sched_state.side] + && fxd_longrunning[other_side] + <= fxd_longrunning[sched_state.side]) + score = MAX (0, score - 10); + + else if (fxd_longrunning[other_side] + >= fxd_longrunning[sched_state.side]) + score += 10; + } - if (get_attr_z13_unit_vfu (insn) && fpd_longrunning[current_side] - && fpd_longrunning[other_side] <= fpd_longrunning[current_side]) - score = MAX (0, score - 10); + if (s390_is_fpd (insn)) + { + if (fpd_longrunning[sched_state.side] + && fpd_longrunning[other_side] + <= fpd_longrunning[sched_state.side]) + score = MAX (0, score - 10); + + else if (fpd_longrunning[other_side] + >= fpd_longrunning[sched_state.side]) + score += 10; + } } } @@ -14500,7 +14559,7 @@ s390_sched_reorder (FILE *file, int verbose, if (verbose > 5) { fprintf (file, "ready list ooo attributes - sched state: %d\n", - s390_sched_state); + sched_state.group_state); for (i = last_index; i >= 0; i--) { @@ -14551,7 +14610,7 @@ s390_sched_variable_issue (FILE *file, int verbose, rtx_insn *insn, int more) { last_scheduled_insn = insn; - bool starts_group = false; + bool ends_group = false; if (s390_tune >= PROCESSOR_2827_ZEC12 && reload_completed @@ -14559,37 +14618,31 @@ s390_sched_variable_issue (FILE *file, int verbose, rtx_insn *insn, int more) { unsigned int mask = s390_get_sched_attrmask (insn); - if ((mask & S390_SCHED_ATTR_MASK_CRACKED) != 0 - || (mask & S390_SCHED_ATTR_MASK_EXPANDED) != 0 - || (mask & S390_SCHED_ATTR_MASK_GROUPALONE) != 0) - starts_group = true; + if ((mask & S390_SCHED_ATTR_MASK_GROUPOFTWO) != 0) + sched_state.group_of_two = true; - if ((mask & S390_SCHED_ATTR_MASK_CRACKED) != 0 - || (mask & S390_SCHED_ATTR_MASK_EXPANDED) != 0) - s390_sched_state = S390_SCHED_STATE_CRACKED; - else if ((mask & S390_SCHED_ATTR_MASK_ENDGROUP) != 0 - || (mask & S390_SCHED_ATTR_MASK_GROUPALONE) != 0) - s390_sched_state = S390_SCHED_STATE_NORMAL; - else + /* If this is a group-of-two insn, we actually ended the last group + and this insn is the first one of the new group. */ + if (sched_state.group_state == 2 && sched_state.group_of_two) { - /* Only normal insns are left (mask == 0). */ - switch (s390_sched_state) - { - case 0: - starts_group = true; - /* fallthrough */ - case 1: - case 2: - s390_sched_state++; - break; - case S390_SCHED_STATE_NORMAL: - starts_group = true; - s390_sched_state = 1; - break; - case S390_SCHED_STATE_CRACKED: - s390_sched_state = S390_SCHED_STATE_NORMAL; - break; - } + sched_state.side = sched_state.side ? 0 : 1; + sched_state.group_state = 0; + } + + /* Longrunning and side bookkeeping. */ + for (int i = 0; i < 2; i++) + { + fxd_longrunning[i] = MAX (0, fxd_longrunning[i] - 1); + fpd_longrunning[i] = MAX (0, fpd_longrunning[i] - 1); + } + + unsigned latency = insn_default_latency (insn); + if (s390_is_longrunning (insn)) + { + if (s390_is_fxd (insn)) + fxd_longrunning[sched_state.side] = latency; + else + fpd_longrunning[sched_state.side] = latency; } if (s390_tune >= PROCESSOR_2964_Z13) @@ -14602,30 +14655,40 @@ s390_sched_variable_issue (FILE *file, int verbose, rtx_insn *insn, int more) for (i = 0; i < units; i++, m <<= 1) if (m & unit_mask) - last_scheduled_unit_distance[i] = 0; - else if (last_scheduled_unit_distance[i] < MAX_SCHED_MIX_DISTANCE) - last_scheduled_unit_distance[i]++; + last_scheduled_unit_distance[i][sched_state.side] = 0; + else if (last_scheduled_unit_distance[i][sched_state.side] + < MAX_SCHED_MIX_DISTANCE) + last_scheduled_unit_distance[i][sched_state.side]++; } - /* If this insn started a new group, the side flipped. */ - if (starts_group) - current_side = current_side ? 0 : 1; - - for (int i = 0; i < 2; i++) + if ((mask & S390_SCHED_ATTR_MASK_CRACKED) != 0 + || (mask & S390_SCHED_ATTR_MASK_EXPANDED) != 0 + || (mask & S390_SCHED_ATTR_MASK_GROUPALONE) != 0 + || (mask & S390_SCHED_ATTR_MASK_ENDGROUP) != 0) { - if (fxd_longrunning[i] >= 1) - fxd_longrunning[i] -= 1; - if (fpd_longrunning[i] >= 1) - fpd_longrunning[i] -= 1; + sched_state.group_state = 0; + ends_group = true; } - - unsigned latency = insn_default_latency (insn); - if (latency > LONGRUNNING_THRESHOLD) + else { - if (get_attr_z13_unit_fxu (insn)) - fxd_longrunning[current_side] = latency; - else - fpd_longrunning[current_side] = latency; + switch (sched_state.group_state) + { + case 0: + sched_state.group_state++; + break; + case 1: + sched_state.group_state++; + if (sched_state.group_of_two) + { + sched_state.group_state = 0; + ends_group = true; + } + break; + case 2: + sched_state.group_state++; + ends_group = true; + break; + } } if (verbose > 5) @@ -14654,7 +14717,7 @@ s390_sched_variable_issue (FILE *file, int verbose, rtx_insn *insn, int more) fprintf (file, " %d", j); fprintf (file, ")"); } - fprintf (file, " sched state: %d\n", s390_sched_state); + fprintf (file, " sched state: %d\n", sched_state.group_state); if (s390_tune >= PROCESSOR_2964_Z13) { @@ -14662,12 +14725,21 @@ s390_sched_variable_issue (FILE *file, int verbose, rtx_insn *insn, int more) s390_get_unit_mask (insn, &units); - fprintf (file, ";;\t\tBACKEND: units unused for: "); + fprintf (file, ";;\t\tBACKEND: units on this side unused for: "); for (j = 0; j < units; j++) - fprintf (file, "%d:%d ", j, last_scheduled_unit_distance[j]); + fprintf (file, "%d:%d ", j, + last_scheduled_unit_distance[j][sched_state.side]); fprintf (file, "\n"); } } + + /* If this insn ended a group, the next will be on the other side. */ + if (ends_group) + { + sched_state.group_state = 0; + sched_state.side = sched_state.side ? 0 : 1; + sched_state.group_of_two = false; + } } if (GET_CODE (PATTERN (insn)) != USE @@ -14682,13 +14754,10 @@ s390_sched_init (FILE *file ATTRIBUTE_UNUSED, int verbose ATTRIBUTE_UNUSED, int max_ready ATTRIBUTE_UNUSED) { - last_scheduled_insn = NULL; - memset (last_scheduled_unit_distance, 0, MAX_SCHED_UNITS * sizeof (int)); - /* If the next basic block is most likely entered via a fallthru edge we keep the last sched state. Otherwise we start a new group. The scheduler traverses basic blocks in "instruction stream" ordering - so if we see a fallthru edge here, s390_sched_state will be of its + so if we see a fallthru edge here, sched_state will be of its source block. current_sched_info->prev_head is the insn before the first insn of the @@ -14698,7 +14767,13 @@ s390_sched_init (FILE *file ATTRIBUTE_UNUSED, ? NEXT_INSN (current_sched_info->prev_head) : NULL; basic_block bb = insn ? BLOCK_FOR_INSN (insn) : NULL; if (s390_tune < PROCESSOR_2964_Z13 || !s390_bb_fallthru_entry_likely (bb)) - s390_sched_state = 0; + { + last_scheduled_insn = NULL; + memset (last_scheduled_unit_distance, 0, + MAX_SCHED_UNITS * NUM_SIDES * sizeof (int)); + sched_state.group_state = 0; + sched_state.group_of_two = false; + } } /* This target hook implementation for TARGET_LOOP_UNROLL_ADJUST calculates diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index 3ea7c38..fcb85d6 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -44,7 +44,7 @@ enum processor_flags /* This is necessary to avoid a warning about comparing different enum types. */ -#define s390_tune_attr ((enum attr_cpu)(s390_tune > PROCESSOR_2964_Z13 ? PROCESSOR_2964_Z13 : s390_tune )) +#define s390_tune_attr ((enum attr_cpu)(s390_tune > PROCESSOR_3906_Z14 ? PROCESSOR_3906_Z14 : s390_tune )) /* These flags indicate that the generated code should run on a cpu providing the respective hardware facility regardless of the diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index f1404ad5..b455b63 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -595,6 +595,9 @@ ;; Pipeline description for z13 (include "2964.md") +;; Pipeline description for z14 +(include "3906.md") + ;; Predicates (include "predicates.md") diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bf50d9d..a640b6a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-03-12 Robin Dapp + + * gcc.target/s390/memset-1.c: Adapt test case for new scheduling. + 2019-03-12 Martin Liska * gfortran.dg/abstract_type_3.f03: Amend test-case scan diff --git a/gcc/testsuite/gcc.target/s390/memset-1.c b/gcc/testsuite/gcc.target/s390/memset-1.c index 3e201df..9463a77 100644 --- a/gcc/testsuite/gcc.target/s390/memset-1.c +++ b/gcc/testsuite/gcc.target/s390/memset-1.c @@ -74,7 +74,7 @@ void return __builtin_memset (s, c, 1029); } -/* 2 stc 1 stcy 3 mvc - displacement overflow after the first */ +/* 3 stc 3 mvc - displacement overflow after the first */ void *memset10(void *s, int c) { @@ -172,6 +172,6 @@ void /* { dg-final { scan-assembler-times "mvi\\s" 1 } } */ /* { dg-final { scan-assembler-times "mvc\\s" 20 } } */ /* { dg-final { scan-assembler-times "xc\\s" 28 } } */ -/* { dg-final { scan-assembler-times "stc\\s" 21 } } */ -/* { dg-final { scan-assembler-times "stcy\\s" 1 } } */ +/* { dg-final { scan-assembler-times "stc\\s" 22 } } */ +/* { dg-final { scan-assembler-times "stcy\\s" 0 } } */ /* { dg-final { scan-assembler-times "pfd\\s" 2 } } */ -- cgit v1.1 From 6684d2dbff7b3ba4a8ef1bef3446dd9df581444f Mon Sep 17 00:00:00 2001 From: Robin Dapp Date: Tue, 12 Mar 2019 17:12:56 +0000 Subject: S/390: Perform more aggressive inlining This patch sets the inlining parameters for z13 and later to rather aggressive values in response to PR85103 that caused performance regressions in SPEC2006's sjeng and gobmk benchmarks. From-SVN: r269623 --- gcc/ChangeLog | 5 +++++ gcc/config/s390/s390.c | 12 ++++++++++++ 2 files changed, 17 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3c2499b..bb58b30 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2019-03-12 Robin Dapp + * config/s390/s390.c (s390_option_override_internal): Use more + aggressive inlining parameters. + +2019-03-12 Robin Dapp + * config/s390/3906.md: New file. * config/s390/s390.c (MAX_SCHED_UNITS): Increase. (LONGRUNNING_THRESHOLD): Remove. diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 70a7034..41f2665 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -15072,6 +15072,18 @@ s390_option_override_internal (struct gcc_options *opts, opts->x_param_values, opts_set->x_param_values); + /* Use aggressive inlining parameters. */ + if (opts->x_s390_tune >= PROCESSOR_2964_Z13) + { + maybe_set_param_value (PARAM_INLINE_MIN_SPEEDUP, 2, + opts->x_param_values, + opts_set->x_param_values); + + maybe_set_param_value (PARAM_MAX_INLINE_INSNS_AUTO, 80, + opts->x_param_values, + opts_set->x_param_values); + } + /* Set the default alignment. */ s390_default_align (opts); -- cgit v1.1 From 1eabf876d50f6b9041fb36b5229a8b6634773d3e Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Tue, 12 Mar 2019 17:22:28 +0000 Subject: re PR fortran/87673 (Errors caused by using function for character length in allocate with typespec) 2019-03-12 Thomas Koenig PR fortran/87673 * match.c (gfc_match_type_spec): Remove call to gfc_resolve_expr for character length. 2019-03-12 Thomas Koenig PR fortran/87673 * gfortran.dg/charlen_17.f90: New test. From-SVN: r269624 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/match.c | 2 -- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/charlen_17.f90 | 14 ++++++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/charlen_17.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 4982574..edcacf5 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2019-03-12 Thomas Koenig + + PR fortran/87673 + * match.c (gfc_match_type_spec): Remove call to + gfc_resolve_expr for character length. + 2019-03-12 Martin Liska * decl.c (add_init_expr_to_sym): Replace usage of 'can't' diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 9ff1c35..eba428f 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -2122,8 +2122,6 @@ gfc_match_type_spec (gfc_typespec *ts) ts->type = BT_CHARACTER; m = gfc_match_char_spec (ts); - if (ts->u.cl && ts->u.cl->length) - gfc_resolve_expr (ts->u.cl->length); if (m == MATCH_NO) m = MATCH_YES; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a640b6a..edde1c1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-12 Thomas Koenig + + PR fortran/87673 + * gfortran.dg/charlen_17.f90: New test. + 2019-03-12 Robin Dapp * gcc.target/s390/memset-1.c: Adapt test case for new scheduling. diff --git a/gcc/testsuite/gfortran.dg/charlen_17.f90 b/gcc/testsuite/gfortran.dg/charlen_17.f90 new file mode 100644 index 0000000..6b766d8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/charlen_17.f90 @@ -0,0 +1,14 @@ +! { dg-do compile } +! PR 87673 - used to cause errors about non-pure functions. + +module x + implicit none +contains + pure function foo() result(res) + character(len=:), allocatable :: res + allocate (character(bar()) :: res) + end function foo + pure integer function bar() + bar = 1 + end function bar +end module x -- cgit v1.1 From 035f5b9e0b9fd181aea5d228ddfd91a5a7161dcf Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Tue, 12 Mar 2019 19:37:31 +0100 Subject: re PR d/87824 (x86_64-linux multilib issues) PR d/87824 * lib/gdc.exp (gdc_include_flags): Find C++ headers by calling libstdc++v3/scripts/testsuite_flags. Filter out unsupported -nostdinc++ flag. From-SVN: r269625 --- gcc/testsuite/ChangeLog | 10 ++++++++-- gcc/testsuite/lib/gdc.exp | 13 ++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index edde1c1..893953d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-03-12 Uroš Bizjak + + PR d/87824 + * lib/gdc.exp (gdc_include_flags): Find C++ headers by calling + libstdc++v3/scripts/testsuite_flags. Filter out unsupported + -nostdinc++ flag. + 2019-03-12 Thomas Koenig PR fortran/87673 @@ -9,8 +16,7 @@ 2019-03-12 Martin Liska - * gfortran.dg/abstract_type_3.f03: Amend test-case scan - patterns. + * gfortran.dg/abstract_type_3.f03: Amend test-case scan patterns. * gfortran.dg/binding_label_tests_4.f03: Likewise. * gfortran.dg/c_f_pointer_tests_6.f90: Likewise. * gfortran.dg/c_funloc_tests_6.f90: Likewise. diff --git a/gcc/testsuite/lib/gdc.exp b/gcc/testsuite/lib/gdc.exp index 59aec67..f5957c3 100644 --- a/gcc/testsuite/lib/gdc.exp +++ b/gcc/testsuite/lib/gdc.exp @@ -88,14 +88,13 @@ proc gdc_include_flags { paths } { append flags "-I${srcdir}/../../libphobos/libdruntime " append flags "-I${srcdir}/../../libphobos/src " - # For the tests that mix C++ and D, we should try and handle this better. - if { $gccpath != "" } { - if [file exists "${gccpath}/libstdc++-v3/include"] { - append flags "-I${gccpath}/libstdc++-v3/include " - append flags "-I${gccpath}/libstdc++-v3/include/$target " - } + # For the tests that mix C++ and D, need to know where headers are located. + set odir [lookfor_file ${gccpath} libstdc++-v3] + if { ${odir} != "" } { + set cxxflags [exec sh ${odir}/scripts/testsuite_flags --build-includes] + set idx [lsearch $cxxflags "-nostdinc++"] + append flags [lreplace $cxxflags $idx $idx] } - append flags "-I${srcdir}/../../libstdc++-v3/libsupc++" } # -- cgit v1.1 From b9da0278667b43843b750a1ad35a9d6dbc1d1b54 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Tue, 12 Mar 2019 23:10:49 +0000 Subject: d/dmd: Merge upstream dmd 19b1454b5 Backports fixes for many ICEs that occurred when using the vector .array property in both CTFE and code generation passes. Fixes https://gcc.gnu.org/PR88957 Reviewed-on: https://github.com/dlang/dmd/pull/9438 gcc/d/ChangeLog: 2019-03-13 Iain Buclaw PR d/88957 * expr.cc (ExprVisitor::visit(VectorArrayExp)): New override. gcc/testsuite/ChangeLog: 2019-03-13 Iain Buclaw PR d/88957 * gdc.dg/pr88957.d: New test. * gdc.dg/simd.d: Add new vector tests. From-SVN: r269627 --- gcc/d/ChangeLog | 5 + gcc/d/dmd/MERGE | 2 +- gcc/d/dmd/ctfeexpr.c | 2 +- gcc/d/dmd/dinterpret.c | 127 ++++++++++++++++++++++-- gcc/d/dmd/expression.c | 19 ++++ gcc/d/dmd/expression.h | 11 +++ gcc/d/dmd/expressionsem.c | 19 ++++ gcc/d/dmd/hdrgen.c | 6 ++ gcc/d/dmd/mtype.c | 4 +- gcc/d/dmd/parse.c | 1 + gcc/d/dmd/tokens.c | 1 + gcc/d/dmd/tokens.h | 2 + gcc/d/dmd/visitor.h | 2 + gcc/d/expr.cc | 8 ++ gcc/testsuite/ChangeLog | 6 ++ gcc/testsuite/gdc.dg/pr88957.d | 18 ++++ gcc/testsuite/gdc.dg/simd.d | 219 ++++++++++++++++++++++++++++++++++++++++- 17 files changed, 437 insertions(+), 15 deletions(-) create mode 100644 gcc/testsuite/gdc.dg/pr88957.d (limited to 'gcc') diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index 6c96ec4..8e45c7f 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,8 @@ +2019-03-13 Iain Buclaw + + PR d/88957 + * expr.cc (ExprVisitor::visit(VectorArrayExp)): New override. + 2019-03-12 Iain Buclaw PR d/87866 diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index f58b620..5e4abe6 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -7423993c996ed9f73d6ba6d58f625ad3c778ca1d +19b1454b5ca7b1036ea5fde197d91d4a7d05c0a5 The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/ctfeexpr.c b/gcc/d/dmd/ctfeexpr.c index 1050e93..1b38223 100644 --- a/gcc/d/dmd/ctfeexpr.c +++ b/gcc/d/dmd/ctfeexpr.c @@ -517,7 +517,7 @@ Expression *resolveSlice(Expression *e, UnionExp *pue) uinteger_t resolveArrayLength(Expression *e) { if (e->op == TOKvector) - e = ((VectorExp *)e)->e1; + return ((VectorExp *)e)->dim; if (e->op == TOKnull) return 0; diff --git a/gcc/d/dmd/dinterpret.c b/gcc/d/dmd/dinterpret.c index 140abfd..777f89c 100644 --- a/gcc/d/dmd/dinterpret.c +++ b/gcc/d/dmd/dinterpret.c @@ -2920,7 +2920,6 @@ public: case TOKneg: *pue = Neg(e->type, e1); break; case TOKtilde: *pue = Com(e->type, e1); break; case TOKnot: *pue = Not(e->type, e1); break; - case TOKvector: result = e; return; // do nothing default: assert(0); } result = (*pue).exp(); @@ -3839,8 +3838,6 @@ public: Expression *aggregate; dinteger_t firstIndex; - if (e1->op == TOKvector) - e1 = ((VectorExp *)e1)->e1; if (e1->op == TOKslice) { // ------------------------------ @@ -4893,6 +4890,87 @@ public: result = pue->exp(); } + /** + * Interpret the vector expression as an array literal. + * Params: + * pue = non-null pointer to temporary storage that can be used to store the return value + * e = Expression to interpret + * Returns: + * resulting array literal or 'e' if unable to interpret + */ + static Expression *interpretVectorToArray(UnionExp *pue, VectorExp *e) + { + if (e->e1->op == TOKarrayliteral) + return (ArrayLiteralExp *)e->e1; + if (e->e1->op == TOKint64 || e->e1->op == TOKfloat64) + { + // Convert literal __vector(int) -> __vector([array]) + Expressions *elements = new Expressions(); + elements->setDim(e->dim); + for (size_t i = 0; i < elements->dim; i++) + (*elements)[i] = copyLiteral(e->e1).copy(); + TypeSArray *type = NULL; + if (e->type->ty == Tvector) + { + TypeVector *tv = (TypeVector *)e->type; + if (tv->basetype->ty == Tsarray) + type = (TypeSArray *)tv->basetype; + } + else if (e->type->ty == Tsarray) + type = (TypeSArray *)e->type; + assert(type); + new(pue) ArrayLiteralExp(e->loc, type, elements); + ArrayLiteralExp *ale = (ArrayLiteralExp *)pue->exp(); + ale->ownedByCtfe = OWNEDctfe; + return ale; + } + return e; + } + + void visit(VectorExp *e) + { + if (e->ownedByCtfe >= OWNEDctfe) // We've already interpreted all the elements + { + result = e; + return; + } + Expression *e1 = interpret(pue, e->e1, istate); + assert(e1); + if (exceptionOrCant(e1)) + return; + if (e1->op != TOKarrayliteral && e1->op != TOKint64 && e1->op != TOKfloat64) + { + e->error("`%s` cannot be evaluated at compile time", e->toChars()); + result = CTFEExp::cantexp; + return; + } + if (e1 == pue->exp()) + e1 = pue->copy(); + new(pue) VectorExp(e->loc, e1, e->to); + VectorExp *ve = (VectorExp *)pue->exp(); + ve->type = e->type; + ve->dim = e->dim; + ve->ownedByCtfe = OWNEDctfe; + result = ve; + } + + void visit(VectorArrayExp *e) + { + Expression *e1 = interpret(pue, e->e1, istate); + assert(e1); + if (exceptionOrCant(e1)) + return; + if (e1->op == TOKvector) + { + VectorExp *ve = (VectorExp *)e1; + result = interpretVectorToArray(pue, ve); + if (result->op != TOKvector) + return; + } + e->error("`%s` cannot be evaluated at compile time", e->toChars()); + result = CTFEExp::cantexp; + } + void visit(DelegatePtrExp *e) { Expression *e1 = interpret(pue, e->e1, istate); @@ -4984,12 +5062,17 @@ public: return false; } if (e1->op == TOKvector) - e1 = ((VectorExp *)e1)->e1; + { + UnionExp ue; + e1 = interpretVectorToArray(&ue, (VectorExp *)e1); + e1 = (e1 == ue.exp()) ? ue.copy() : e1; + } // Set the $ variable, and find the array literal to modify if (e1->op != TOKarrayliteral && e1->op != TOKstring && - e1->op != TOKslice) + e1->op != TOKslice && + e1->op != TOKvector) { e->error("cannot determine length of %s at compile time", e->e1->toChars()); @@ -5239,9 +5322,15 @@ public: return; } + if (e1->op == TOKvector) + { + e1 = interpretVectorToArray(pue, (VectorExp *)e1); + e1 = (e1 == pue->exp()) ? pue->copy() : e1; + } + /* Set the $ variable */ - if (e1->op != TOKarrayliteral && e1->op != TOKstring && e1->op != TOKnull && e1->op != TOKslice) + if (e1->op != TOKarrayliteral && e1->op != TOKstring && e1->op != TOKnull && e1->op != TOKslice && e1->op != TOKvector) { e->error("cannot determine length of %s at compile time", e1->toChars()); result = CTFEExp::cantexp; @@ -5715,7 +5804,7 @@ public: if (exceptionOrCant(e1)) return; assert(e1->op == TOKvector); - e1 = ((VectorExp *)e1)->e1; + e1 = interpretVectorToArray(pue, (VectorExp *)e1); } if (e->to->ty == Tarray && e1->op == TOKslice) { @@ -6165,6 +6254,18 @@ Expression *scrubReturnValue(Loc loc, Expression *e) return ex; aae->type = toBuiltinAAType(aae->type); } + else if (e->op == TOKvector) + { + VectorExp *ve = (VectorExp *)e; + ve->ownedByCtfe = OWNEDcode; + if (ve->e1->op == TOKarrayliteral) + { + ArrayLiteralExp *ale = (ArrayLiteralExp *)ve->e1; + ale->ownedByCtfe = OWNEDcode; + if (Expression *ex = scrubArray(loc, ale->elements)) + return ex; + } + } return e; } @@ -6282,6 +6383,18 @@ Expression *scrubCacheValue(Expression *e) if (Expression *ex = scrubArrayCache(aae->values)) return ex; } + else if (e->op == TOKvector) + { + VectorExp *ve = (VectorExp *)e; + ve->ownedByCtfe = OWNEDcache; + if (ve->e1->op == TOKarrayliteral) + { + ArrayLiteralExp *ale = (ArrayLiteralExp *)ve->e1; + ale->ownedByCtfe = OWNEDcache; + if (Expression *ex = scrubArrayCache(ale->elements)) + return ex; + } + } return e; } diff --git a/gcc/d/dmd/expression.c b/gcc/d/dmd/expression.c index df37392..af762eb 100644 --- a/gcc/d/dmd/expression.c +++ b/gcc/d/dmd/expression.c @@ -5744,6 +5744,7 @@ VectorExp::VectorExp(Loc loc, Expression *e, Type *t) assert(t->ty == Tvector); to = (TypeVector *)t; dim = ~0; + ownedByCtfe = OWNEDcode; } VectorExp *VectorExp::create(Loc loc, Expression *e, Type *t) @@ -5758,6 +5759,24 @@ Expression *VectorExp::syntaxCopy() /************************************************************/ +VectorArrayExp::VectorArrayExp(Loc loc, Expression *e1) + : UnaExp(loc, TOKvectorarray, sizeof(VectorExp), e1) +{ +} + +bool VectorArrayExp::isLvalue() +{ + return e1->isLvalue(); +} + +Expression *VectorArrayExp::toLvalue(Scope *sc, Expression *e) +{ + e1 = e1->toLvalue(sc, e); + return this; +} + +/************************************************************/ + SliceExp::SliceExp(Loc loc, Expression *e1, IntervalExp *ie) : UnaExp(loc, TOKslice, sizeof(SliceExp), e1) { diff --git a/gcc/d/dmd/expression.h b/gcc/d/dmd/expression.h index 2dd0b24..b460e8c 100644 --- a/gcc/d/dmd/expression.h +++ b/gcc/d/dmd/expression.h @@ -959,6 +959,7 @@ class VectorExp : public UnaExp public: TypeVector *to; // the target vector type before semantic() unsigned dim; // number of elements in the vector + OwnedBy ownedByCtfe; VectorExp(Loc loc, Expression *e, Type *t); static VectorExp *create(Loc loc, Expression *e, Type *t); @@ -966,6 +967,15 @@ public: void accept(Visitor *v) { v->visit(this); } }; +class VectorArrayExp : public UnaExp +{ +public: + VectorArrayExp(Loc loc, Expression *e1); + bool isLvalue(); + Expression *toLvalue(Scope *sc, Expression *e); + void accept(Visitor *v) { v->visit(this); } +}; + class SliceExp : public UnaExp { public: @@ -1515,6 +1525,7 @@ private: char addrexp [sizeof(AddrExp)]; char indexexp [sizeof(IndexExp)]; char sliceexp [sizeof(SliceExp)]; + char vectorexp [sizeof(VectorExp)]; } u; #if defined(__DMC__) #pragma pack() diff --git a/gcc/d/dmd/expressionsem.c b/gcc/d/dmd/expressionsem.c index bcc1ac9..a88ff88 100644 --- a/gcc/d/dmd/expressionsem.c +++ b/gcc/d/dmd/expressionsem.c @@ -4299,6 +4299,25 @@ public: result = e; } + void visit(VectorArrayExp *e) + { + if (!e->type) + { + unaSemantic(e, sc); + e->e1 = resolveProperties(sc, e->e1); + + if (e->e1->op == TOKerror) + { + result = e->e1; + return; + } + assert(e->e1->type->ty == Tvector); + TypeVector *tv = (TypeVector *)e->e1->type; + e->type = tv->basetype; + } + result = e; + } + void visit(SliceExp *exp) { if (exp->type) diff --git a/gcc/d/dmd/hdrgen.c b/gcc/d/dmd/hdrgen.c index e638097..4eaa1ae 100644 --- a/gcc/d/dmd/hdrgen.c +++ b/gcc/d/dmd/hdrgen.c @@ -2833,6 +2833,12 @@ public: expToBuffer(e->e1, precedence[e->op]); } + void visit(VectorArrayExp *e) + { + expToBuffer(e->e1, PREC_primary); + buf->writestring(".array"); + } + void visit(SliceExp *e) { expToBuffer(e->e1, precedence[e->op]); diff --git a/gcc/d/dmd/mtype.c b/gcc/d/dmd/mtype.c index 900f172..d0e7396 100644 --- a/gcc/d/dmd/mtype.c +++ b/gcc/d/dmd/mtype.c @@ -3766,8 +3766,8 @@ Expression *TypeVector::dotExp(Scope *sc, Expression *e, Identifier *ident, int { //e = e->castTo(sc, basetype); // Keep lvalue-ness - e = e->copy(); - e->type = basetype; + e = new VectorArrayExp(e->loc, e); + e = ::semantic(e, sc); return e; } if (ident == Id::_init || ident == Id::offsetof || ident == Id::stringof || ident == Id::__xalignof) diff --git a/gcc/d/dmd/parse.c b/gcc/d/dmd/parse.c index 701c314..e0ee299 100644 --- a/gcc/d/dmd/parse.c +++ b/gcc/d/dmd/parse.c @@ -7929,6 +7929,7 @@ PrecedenceInitializer::PrecedenceInitializer() precedence[TOKdefault] = PREC_primary; precedence[TOKoverloadset] = PREC_primary; precedence[TOKvoid] = PREC_primary; + precedence[TOKvectorarray] = PREC_primary; // post precedence[TOKdotti] = PREC_primary; diff --git a/gcc/d/dmd/tokens.c b/gcc/d/dmd/tokens.c index 89feffa..c9c7ab4 100644 --- a/gcc/d/dmd/tokens.c +++ b/gcc/d/dmd/tokens.c @@ -472,4 +472,5 @@ TokenInitializer::TokenInitializer() Token::tochars[TOKon_scope_success] = "scope(success)"; Token::tochars[TOKon_scope_failure] = "scope(failure)"; Token::tochars[TOKdelegateptr] = "delegateptr"; + Token::tochars[TOKvectorarray] = "vectorarray"; } diff --git a/gcc/d/dmd/tokens.h b/gcc/d/dmd/tokens.h index 453683f..567e802 100644 --- a/gcc/d/dmd/tokens.h +++ b/gcc/d/dmd/tokens.h @@ -179,6 +179,8 @@ enum TOK TOKvoidexp, TOKcantexp, + TOKvectorarray, + TOKMAX }; diff --git a/gcc/d/dmd/visitor.h b/gcc/d/dmd/visitor.h index 25ebba8..4c92670 100644 --- a/gcc/d/dmd/visitor.h +++ b/gcc/d/dmd/visitor.h @@ -226,6 +226,7 @@ class NotExp; class DeleteExp; class CastExp; class VectorExp; +class VectorArrayExp; class SliceExp; class ArrayLengthExp; class IntervalExp; @@ -517,6 +518,7 @@ public: virtual void visit(DeleteExp *e) { visit((UnaExp *)e); } virtual void visit(CastExp *e) { visit((UnaExp *)e); } virtual void visit(VectorExp *e) { visit((UnaExp *)e); } + virtual void visit(VectorArrayExp *e) { visit((UnaExp *)e); } virtual void visit(SliceExp *e) { visit((UnaExp *)e); } virtual void visit(ArrayLengthExp *e) { visit((UnaExp *)e); } virtual void visit(IntervalExp *e) { visit((Expression *)e); } diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc index 4bfdde5..acf81a6 100644 --- a/gcc/d/expr.cc +++ b/gcc/d/expr.cc @@ -2992,6 +2992,14 @@ public: } } + /* Build a static array representation of a vector expression. */ + + void visit (VectorArrayExp *e) + { + this->result_ = convert_expr (build_expr (e->e1, this->constp_), + e->e1->type, e->type); + } + /* Build a static class literal, return its reference. */ void visit (ClassReferenceExp *e) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 893953d..94144c9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-13 Iain Buclaw + + PR d/88957 + * gdc.dg/pr88957.d: New test. + * gdc.dg/simd.d: Add new vector tests. + 2019-03-12 Uroš Bizjak PR d/87824 diff --git a/gcc/testsuite/gdc.dg/pr88957.d b/gcc/testsuite/gdc.dg/pr88957.d new file mode 100644 index 0000000..e6366d4 --- /dev/null +++ b/gcc/testsuite/gdc.dg/pr88957.d @@ -0,0 +1,18 @@ +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88957 +// { dg-do compile } +// { dg-additional-options "-fsanitize=undefined" } + +alias int4 = __vector(int[4]); + +int fn(const int[4] x) +{ + int sum = 0; + foreach (i; x) sum += i; + return sum; +} + +void pr88957() +{ + auto x = fn(int4.init.array); + auto y = fn(int4(2).array); +} diff --git a/gcc/testsuite/gdc.dg/simd.d b/gcc/testsuite/gdc.dg/simd.d index e4361a6..812b366 100644 --- a/gcc/testsuite/gdc.dg/simd.d +++ b/gcc/testsuite/gdc.dg/simd.d @@ -1108,7 +1108,6 @@ float bug8060(float x) { } /*****************************************/ -/+ // https://issues.dlang.org/show_bug.cgi?id=9200 void bar9200(double[2] a) @@ -1130,7 +1129,6 @@ void test9200() bar9200(a.array); } -+/ /*****************************************/ // https://issues.dlang.org/show_bug.cgi?id=9304 @@ -1686,7 +1684,6 @@ void test17720() } /*****************************************/ - // https://issues.dlang.org/show_bug.cgi?id=17695 void test17695(__vector(ubyte[16]) a) @@ -1695,6 +1692,217 @@ void test17695(__vector(ubyte[16]) a) } /*****************************************/ +// https://issues.dlang.org/show_bug.cgi?id=19223 + +int test19223a(const int[4] x) +{ + int sum = 0; + foreach (i; x) sum += i; + return sum; +} + +void test19223() +{ + int4 v1 = int4.init; + assert(test19223a(v1.array) == 0); + assert(test19223a(int4.init.array) == 0); +} + +/*****************************************/ +// https://issues.dlang.org/show_bug.cgi?id=19224 + +float test19224(const float[4] val) +{ + float sum = 0; + foreach (x; val) sum += x; + return sum; +} + +enum x19224 = test19224(float4.init.array); +static assert(x19224 is float.nan); + +enum y19224 = test19224(float4(1).array); +static assert(y19224 == 4); + +/*****************************************/ +// https://issues.dlang.org/show_bug.cgi?id=19607 + +int test19607a(const int[4] x) +{ + int sum = 0; + foreach (i; x) sum += i; + return sum; +} + +void test19607() +{ + int4 v1 = 1; + assert(test19607a(v1.array) == 4); + assert(test19607a(int4(2).array) == 8); +} + +/*****************************************/ +// https://issues.dlang.org/show_bug.cgi?id=19627 + +enum int[4] fail19627 = cast(int[4])int4(0); + +/*****************************************/ +// https://issues.dlang.org/show_bug.cgi?id=19628 + +enum ice19628a = int4.init[0]; +enum ice19628b = int4.init.array[0]; +enum ice19628c = (cast(int[4])int4.init.array)[0]; +enum ice19628d = (cast(int[4])int4.init)[0]; + +enum int4 v19628a = int4.init; +enum idx19628a = v19628a[0]; +static assert(idx19628a == 0); + +enum int[4] v19628b = int4.init.array; +enum idx19628b = v19628b[0]; +static assert(idx19628b == 0); + +enum int[4] v19628c = cast(int[4])int4.init.array; +enum idx19628c = v19628c[0]; +static assert(idx19628c == 0); + +enum int[4] v19628d = cast(int[4])int4.init; +enum idx19628d = v19628d[0]; +static assert(idx19628d == 0); + +immutable int4 v19628e = int4.init; +immutable idx19628e = v19628e[0]; +static assert(idx19628e == 0); + +immutable int[4] v19628f = int4.init.array; +immutable idx19628f = v19628f[0]; +static assert(idx19628f == 0); + +immutable int[4] v19628g = cast(int[4])int4.init.array; +immutable idx19628g = v19628g[0]; +static assert(idx19628g == 0); + +immutable idx19628h = v19628h[0]; +immutable int[4] v19628h = cast(int[4])int4.init; +static assert(idx19628h == 0); + +/*****************************************/ +// https://issues.dlang.org/show_bug.cgi?id=19629 + +enum fail19629a = int4(0)[0]; +enum fail19629b = int4(0).array[0]; +enum fail19629c = (cast(int[4])int4(0).array)[0]; +enum fail19628d = (cast(int[4])int4(0))[0]; + +enum int4 v19629a = int4(0); +enum idx19629a = v19629a[0]; +static assert(idx19629a == 0); + +enum int[4] v19629b = int4(0).array; +enum idx19629b = v19629b[0]; +static assert(idx19629b == 0); + +enum int[4] v19629c = cast(int[4])int4(0).array; +enum idx19629c = v19629c[0]; +static assert(idx19629c == 0); + +enum int[4] v19629d = cast(int[4])int4(0); +enum idx19629d = v19629d[0]; +static assert(idx19629d == 0); + +immutable int4 v19629e = int4(0); +immutable idx19629e = v19629e[0]; +static assert(idx19629e == 0); + +immutable int[4] v19629f = int4(0).array; +immutable idx19629f = v19629f[0]; +static assert(idx19629f == 0); + +immutable int[4] v19629g = cast(int[4])int4(0).array; +immutable idx19629g = v19629g[0]; +static assert(idx19629g == 0); + +immutable int[4] v19629h = cast(int[4])int4(0); +immutable idx19629h = v19629h[0]; +static assert(idx19629h == 0); + +/*****************************************/ +// https://issues.dlang.org/show_bug.cgi?id=19630 + +enum fail19630a = int4.init[1..2]; +enum fail19630b = int4.init.array[1..2]; +enum fail19630c = (cast(int[4])int4.init.array)[1..2]; +enum fail19630d = (cast(int[4])int4.init)[1..2]; +enum fail19630e = int4(0)[1..2]; +enum fail19630f = int4(0).array[1..2]; +enum fail19630g = (cast(int[4])int4(0).array)[1..2]; +enum fail19630h = (cast(int[4])int4(0))[1..2]; + +enum int4 v19630a = int4.init; +enum slice19630a = v19630a[1..2]; +static assert(slice19630a == [0]); + +enum int[4] v19630b = int4.init.array; +enum slice19630b = v19630b[1..2]; +static assert(slice19630b == [0]); + +enum int[4] v19630c = cast(int[4])int4.init.array; +enum slice19630c = v19630c[1..2]; +static assert(slice19630c == [0]); + +enum int[4] v19630d = cast(int[4])int4.init; +enum slice19630d = v19630d[1..2]; +static assert(slice19630d == [0]); + +enum int4 v19630e = int4(0); +enum slice19630e = v19630e[1..2]; +static assert(slice19630e == [0]); + +enum int[4] v19630f = int4(0).array; +enum slice19630f = v19630f[1..2]; +static assert(slice19630f == [0]); + +enum int[4] v19630g = cast(int[4])int4(0).array; +enum slice19630g = v19630g[1..2]; +static assert(slice19630g == [0]); + +enum int[4] v19630h = cast(int[4])int4(0); +enum slice19630h = v19630h[1..2]; +static assert(slice19630h == [0]); + +immutable int4 v19630i = int4.init; +immutable slice19630i = v19630i[1..2]; +static assert(slice19630i == [0]); + +immutable int[4] v19630j = int4.init.array; +immutable slice19630j = v19630j[1..2]; +static assert(slice19630j == [0]); + +immutable int[4] v19630k = cast(int[4])int4.init.array; +immutable slice19630k = v19630k[1..2]; +static assert(slice19630k == [0]); + +immutable int[4] v19630l = cast(int[4])int4.init; +immutable slice19630l = v19630l[1..2]; +static assert(slice19630l == [0]); + +immutable int4 v19630m = int4(0); +immutable slice19630m = v19630m[1..2]; +static assert(slice19630m == [0]); + +immutable int[4] v19630n = int4(0).array; +immutable slice19630n = v19630n[1..2]; +static assert(slice19630n == [0]); + +immutable int[4] v19630o = cast(int[4])int4(0).array; +immutable slice19630o = v19630o[1..2]; +static assert(slice19630o == [0]); + +immutable int[4] v19630p = cast(int[4])int4(0); +immutable slice19630p = v19630p[1..2]; +static assert(slice19630p == [0]); + +/*****************************************/ int main() { @@ -1718,7 +1926,7 @@ int main() test7414(); test7413(); test7413_2(); -// test9200(); + test9200(); test9304(); test9910(); test12852(); @@ -1731,5 +1939,8 @@ int main() testOPvecunsto(); test10447(); + test19223(); + test19607(); + return 0; } -- cgit v1.1 From 1ad43ab9a39f20819ea8d237878ed64adc8f7941 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 13 Mar 2019 00:16:13 +0000 Subject: Daily bump. From-SVN: r269631 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 8225281..7e9d41b 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20190312 +20190313 -- cgit v1.1 From 50e021a590c75eae2ad86d3874b29eedf63b9646 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Wed, 13 Mar 2019 00:18:37 +0000 Subject: pr88957.d: Move to gdc.dg/ubsan. gcc/testsuite/ChangeLog: 2019-03-13 Iain Buclaw * gdc.dg/pr88957.d: Move to gdc.dg/ubsan. * gdc.dg/ubsan/ubsan.exp: New file. * lib/gdc.exp (gdc_include_flags): Remove unused target variable. Explicitly return flags from procedure. From-SVN: r269632 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gdc.dg/pr88957.d | 18 ------------------ gcc/testsuite/gdc.dg/ubsan/pr88957.d | 18 ++++++++++++++++++ gcc/testsuite/gdc.dg/ubsan/ubsan.exp | 32 ++++++++++++++++++++++++++++++++ gcc/testsuite/lib/gdc.exp | 3 ++- 5 files changed, 59 insertions(+), 19 deletions(-) delete mode 100644 gcc/testsuite/gdc.dg/pr88957.d create mode 100644 gcc/testsuite/gdc.dg/ubsan/pr88957.d create mode 100644 gcc/testsuite/gdc.dg/ubsan/ubsan.exp (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 94144c9..d09651c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2019-03-13 Iain Buclaw + * gdc.dg/pr88957.d: Move to gdc.dg/ubsan. + * gdc.dg/ubsan/ubsan.exp: New file. + * lib/gdc.exp (gdc_include_flags): Remove unused target variable. + Explicitly return flags from procedure. + +2019-03-13 Iain Buclaw + PR d/88957 * gdc.dg/pr88957.d: New test. * gdc.dg/simd.d: Add new vector tests. diff --git a/gcc/testsuite/gdc.dg/pr88957.d b/gcc/testsuite/gdc.dg/pr88957.d deleted file mode 100644 index e6366d4..0000000 --- a/gcc/testsuite/gdc.dg/pr88957.d +++ /dev/null @@ -1,18 +0,0 @@ -// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88957 -// { dg-do compile } -// { dg-additional-options "-fsanitize=undefined" } - -alias int4 = __vector(int[4]); - -int fn(const int[4] x) -{ - int sum = 0; - foreach (i; x) sum += i; - return sum; -} - -void pr88957() -{ - auto x = fn(int4.init.array); - auto y = fn(int4(2).array); -} diff --git a/gcc/testsuite/gdc.dg/ubsan/pr88957.d b/gcc/testsuite/gdc.dg/ubsan/pr88957.d new file mode 100644 index 0000000..e6366d4 --- /dev/null +++ b/gcc/testsuite/gdc.dg/ubsan/pr88957.d @@ -0,0 +1,18 @@ +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88957 +// { dg-do compile } +// { dg-additional-options "-fsanitize=undefined" } + +alias int4 = __vector(int[4]); + +int fn(const int[4] x) +{ + int sum = 0; + foreach (i; x) sum += i; + return sum; +} + +void pr88957() +{ + auto x = fn(int4.init.array); + auto y = fn(int4(2).array); +} diff --git a/gcc/testsuite/gdc.dg/ubsan/ubsan.exp b/gcc/testsuite/gdc.dg/ubsan/ubsan.exp new file mode 100644 index 0000000..a2e2da0 --- /dev/null +++ b/gcc/testsuite/gdc.dg/ubsan/ubsan.exp @@ -0,0 +1,32 @@ +# Copyright (C) 2019 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . + +# Load support procs. +load_lib gdc-dg.exp +load_lib ubsan-dg.exp + +# Initialize `dg'. +dg-init +ubsan_init + +# Main loop. +if [check_effective_target_fsanitize_undefined] { + gdc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.d]] "" "" +} + +# All done. +ubsan_finish +dg-finish diff --git a/gcc/testsuite/lib/gdc.exp b/gcc/testsuite/lib/gdc.exp index f5957c3..e09f5ee 100644 --- a/gcc/testsuite/lib/gdc.exp +++ b/gcc/testsuite/lib/gdc.exp @@ -78,7 +78,6 @@ proc gdc_include_flags { paths } { } set gccpath ${paths} - set target [file tail [file normalize ${paths}]] if { $gccpath != "" } { if [file exists "${gccpath}/libphobos/libdruntime"] { @@ -95,6 +94,8 @@ proc gdc_include_flags { paths } { set idx [lsearch $cxxflags "-nostdinc++"] append flags [lreplace $cxxflags $idx $idx] } + + return "$flags" } # -- cgit v1.1 From f4390da0c537d637e6aa582f68c65bac13396196 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 13 Mar 2019 04:43:33 +0000 Subject: compiler: add new debugging helper function debug_go_type() Add a new debugging utility routine debug_go_type(), intended to display the contents of a Type object in a way useful to debugging a run of the compiler. Prior to this the only useful alternative for debugging types was invoking the mangled_name() method, which has problems (for example, won't work on interface types prior to finalizing of methods). This is a "deep" dump, meaning that all types reachable from the type passed to debug_go_type() will be printed out. Example: (gdb) print debug_go_type(t1) T0 0x535f300 'net/http.Header' -> T1 T1 0x535d3d0 map ['string' -> string] T4 T2 0x5304bb0 'string' -> string T3 0x331f900 string T4 0x535d370 array [] 'string' -> string Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166637 From-SVN: r269633 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/ast-dump.cc | 380 ++++++++++++++++++++++++++++++++++++++++++ gcc/go/gofrontend/types.cc | 2 +- gcc/go/gofrontend/types.h | 7 +- 4 files changed, 388 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 3c0ee14..5104e7b 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -3106ec19626d75d8275be16c86421132548fa13e +565b5cd0f49a00ca20941ea042c07ebe6ddf3553 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/ast-dump.cc b/gcc/go/gofrontend/ast-dump.cc index 9b4d708..0e90373 100644 --- a/gcc/go/gofrontend/ast-dump.cc +++ b/gcc/go/gofrontend/ast-dump.cc @@ -8,6 +8,7 @@ #include #include +#include #include "gogo.h" #include "expressions.h" @@ -580,3 +581,382 @@ debug_go_block_deep(const Block* block) Block* ncblock = const_cast(block); adc.dump_block(ncblock); } + +class Type_dumper +{ + typedef Unordered_map(const Type*, unsigned) idx_map; + public: + Type_dumper(const Type* type) + : top_(type), ntypes_(0) + { + this->worklist_.push_back(type); + } + + void visit(); + + std::string stringResult() { return ss_.str(); } + + private: + void emitpre(unsigned tag, const Type* addr); + void typeref(const char*, const Type*, const char *); + void visit_forward_declaration_type(const Forward_declaration_type* fdt); + void visit_function_type(const Function_type* ft); + void visit_struct_type(const Struct_type* st); + void visit_array_type(const Array_type* at); + void visit_map_type(const Map_type* mt); + void visit_channel_type(const Channel_type* mt); + void visit_interface_type(const Interface_type* mt); + void visit_methods(const Typed_identifier_list* methods, + const char *tag); + std::pair lookup(const Type*); + + static constexpr unsigned notag = 0xffffffff; + + private: + const Type* top_; + idx_map types_; + unsigned ntypes_; + std::list worklist_; + std::ostringstream ss_; +}; + +// Look up a type, installing it in 'types_'. Return is +// where 'found' is true if type had been previously recorded, and N +// is the index/tag assigned to N. The input argument is appended to +// the work list if this is the first time we've seen it. + +std::pair Type_dumper::lookup(const Type* t) +{ + std::pair entry = std::make_pair(t, this->ntypes_); + std::pair ins = this->types_.insert(entry); + if (ins.second) + { + this->ntypes_++; + if (t != this->top_) + this->worklist_.push_back(t); + } + return std::make_pair(ins.second, ins.first->second); +} + +// Emit preamble prior to dumping a type, including the type +// pointer itself and the tag we've assigned it. If no +// tag is specified (via special "notag" value) and/or the +// pointer is null, then just emit an equivalent amount +// of spaces. + +void Type_dumper::emitpre(unsigned tag, const Type* ptr) +{ + char tbuf[50], pbuf[50], buf[200]; + + tbuf[0] = '\0'; + if (tag != notag) + snprintf(tbuf, sizeof tbuf, "T%u", tag); + + pbuf[0] = '\0'; + if (ptr != NULL) + snprintf(pbuf, sizeof pbuf, "%p", (const void*) ptr); + + snprintf(buf, sizeof buf, "%8s %16s ", tbuf, pbuf); + this->ss_ << buf; +} + +// Emit a reference to a type into the dump buffer. In most cases this means +// just the type tag, but for named types we also emit the name, and for +// simple/primitive types (ex: int64) we emit the type itself. If "pref" is +// non-NULL, emit the string prior to the reference, and if "suf" is non-NULL, +// emit it following the reference. + +void Type_dumper::typeref(const char* pref, const Type* t, const char* suf) +{ + if (pref != NULL) + this->ss_ << pref; + std::pair p = this->lookup(t); + unsigned tag = p.second; + switch (t->classification()) + { + case Type::TYPE_NAMED: + { + const Named_type* nt = t->named_type(); + const Named_object* no = nt->named_object(); + this->ss_ << "'" << no->message_name() << "' -> "; + const Type* underlying = nt->real_type(); + this->typeref(NULL, underlying, NULL); + break; + } + case Type::TYPE_POINTER: + this->typeref("*", t->points_to(), NULL); + break; + case Type::TYPE_ERROR: + this->ss_ << "error_type"; + break; + case Type::TYPE_INTEGER: + { + const Integer_type* it = t->integer_type(); + if (it->is_abstract()) + this->ss_ << "abstract_int"; + else + this->ss_ << (it->is_unsigned() ? "u" : "") << "int" << it->bits(); + break; + } + case Type::TYPE_FLOAT: + { + const Float_type* ft = t->float_type(); + if (ft->is_abstract()) + this->ss_ << "abstract_float"; + else + this->ss_ << "float" << ft->bits(); + break; + } + case Type::TYPE_COMPLEX: + { + const Complex_type* ct = t->complex_type(); + if (ct->is_abstract()) + this->ss_ << "abstract_complex"; + else + this->ss_ << "complex" << ct->bits(); + break; + } + case Type::TYPE_BOOLEAN: + this->ss_ << "bool"; + break; + case Type::TYPE_STRING: + this->ss_ << "string"; + break; + case Type::TYPE_NIL: + this->ss_ << "nil_type"; + break; + case Type::TYPE_VOID: + this->ss_ << "void_type"; + break; + case Type::TYPE_FUNCTION: + case Type::TYPE_STRUCT: + case Type::TYPE_ARRAY: + case Type::TYPE_MAP: + case Type::TYPE_CHANNEL: + case Type::TYPE_FORWARD: + case Type::TYPE_INTERFACE: + this->ss_ << "T" << tag; + break; + + default: + // This is a debugging routine, so instead of a go_unreachable() + // issue a warning/error, to allow for the possibility that the + // compiler we're debugging is in a bad state. + this->ss_ << "classification()) << "> " + << "T" << tag; + } + if (suf != NULL) + this->ss_ << suf; +} + +void Type_dumper::visit_forward_declaration_type(const Forward_declaration_type* fdt) +{ + this->ss_ << "forward_declaration_type "; + if (fdt->is_defined()) + this->typeref("-> ", fdt->real_type(), NULL); + else + this->ss_ << "'" << fdt->name() << "'"; + this->ss_ << "\n"; +} + +void Type_dumper::visit_function_type(const Function_type* ft) +{ + this->ss_ << "function\n"; + const Typed_identifier* rec = ft->receiver(); + if (rec != NULL) + { + this->emitpre(notag, NULL); + this->typeref("receiver ", rec->type(), NULL); + } + const Typed_identifier_list* parameters = ft->parameters(); + if (parameters != NULL) + { + for (Typed_identifier_list::const_iterator p = parameters->begin(); + p != parameters->end(); + ++p) + { + this->emitpre(notag, NULL); + this->typeref(" param ", p->type(), "\n"); + } + } + const Typed_identifier_list* results = ft->results(); + if (results != NULL) + { + for (Typed_identifier_list::const_iterator p = results->begin(); + p != results->end(); + ++p) + { + this->emitpre(notag, NULL); + this->typeref(" result ", p->type(), "\n"); + } + } +} + +void Type_dumper::visit_struct_type(const Struct_type* st) +{ + this->ss_ << "struct\n"; + const Struct_field_list* fields = st->fields(); + if (fields != NULL) + { + for (Struct_field_list::const_iterator p = fields->begin(); + p != fields->end(); + ++p) + { + this->emitpre(notag, NULL); + this->typeref(" field ", p->type(), "\n"); + } + } +} + +void Type_dumper::visit_array_type(const Array_type* at) +{ + this->ss_ << "array ["; + if (at->length() != NULL) + { + int64_t len = 0; + if (at->int_length(&len)) + this->ss_ << len; + } + this->typeref("] ", at->element_type(), "\n"); +} + +void Type_dumper::visit_map_type(const Map_type* mt) +{ + this->ss_ << "map ["; + this->typeref(NULL, mt->key_type(), NULL); + this->typeref("] ", mt->val_type(), "\n"); +} + +void Type_dumper::visit_methods(const Typed_identifier_list* methods, + const char *tag) +{ + if (tag != NULL) + { + this->emitpre(notag, NULL); + this->ss_ << tag << "\n"; + } + for (Typed_identifier_list::const_iterator p = methods->begin(); + p != methods->end(); + ++p) + { + this->emitpre(notag, NULL); + if (p->name().empty()) + this->typeref(" embedded method ", p->type(), "\n"); + else + { + this->ss_ << " method '" << p->name() << "' "; + this->typeref(NULL, p->type(), "\n"); + } + } +} + +void Type_dumper::visit_interface_type(const Interface_type* it) +{ + const Typed_identifier_list* methods = + (it->methods_are_finalized() ? it->methods() : it->local_methods()); + if (methods == NULL) + { + this->ss_ << "empty_interface\n"; + return; + } + this->ss_ << "interface"; + if (! it->methods_are_finalized()) + { + this->ss_ << " [unfinalized]\n"; + visit_methods(it->local_methods(), NULL); + } + else + { + this->ss_ << "\n"; + visit_methods(it->local_methods(), "[parse_methods]"); + visit_methods(it->methods(), "[all_methods]"); + } +} + +void Type_dumper::visit_channel_type(const Channel_type* ct) +{ + this->ss_ << "channel {"; + if (ct->may_send()) + this->ss_ << " send"; + if (ct->may_receive()) + this->ss_ << " receive"; + this->typeref(" } ", ct->element_type(), "\n"); +} + +void Type_dumper::visit() +{ + while (! this->worklist_.empty()) { + const Type* t = this->worklist_.front(); + this->worklist_.pop_front(); + + std::pair p = this->lookup(t); + unsigned tag = p.second; + this->emitpre(tag, t); + + switch(t->classification()) + { + case Type::TYPE_ERROR: + case Type::TYPE_INTEGER: + case Type::TYPE_FLOAT: + case Type::TYPE_COMPLEX: + case Type::TYPE_BOOLEAN: + case Type::TYPE_STRING: + case Type::TYPE_VOID: + case Type::TYPE_POINTER: + case Type::TYPE_NIL: + case Type::TYPE_NAMED: + this->typeref(NULL, t, "\n"); + break; + case Type::TYPE_FORWARD: + this->visit_forward_declaration_type(t->forward_declaration_type()); + break; + + case Type::TYPE_FUNCTION: + this->visit_function_type(t->function_type()); + break; + case Type::TYPE_STRUCT: + this->visit_struct_type(t->struct_type()); + break; + case Type::TYPE_ARRAY: + this->visit_array_type(t->array_type()); + break; + case Type::TYPE_MAP: + this->visit_map_type(t->map_type()); + break; + case Type::TYPE_CHANNEL: + this->visit_channel_type(t->channel_type()); + break; + case Type::TYPE_INTERFACE: + this->visit_interface_type(t->interface_type()); + break; + default: + // This is a debugging routine, so instead of a go_unreachable() + // issue a warning/error, to allow for the possibility that the + // compiler we're debugging is in a bad state. + this->ss_ << "classification()) << ">\n"; + } + } +} + +// Dump a Go type for debugging purposes. This is a deep as opposed +// to shallow dump; all of the types reachable from the specified +// type will be dumped in addition to the type itself. + +void debug_go_type(const Type* type) +{ + if (type == NULL) + { + std::cerr << "\n"; + return; + } + Type_dumper dumper(type); + dumper.visit(); + std::cerr << dumper.stringResult(); +} + +void debug_go_type(Type* type) +{ + const Type* ctype = type; + debug_go_type(ctype); +} diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index 2d34a28..e12e670 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -6951,7 +6951,7 @@ Type::make_struct_type(Struct_field_list* fields, // called for a slice. bool -Array_type::int_length(int64_t* plen) +Array_type::int_length(int64_t* plen) const { go_assert(this->length_ != NULL); Numeric_constant nc; diff --git a/gcc/go/gofrontend/types.h b/gcc/go/gofrontend/types.h index e3343cf..976d41a 100644 --- a/gcc/go/gofrontend/types.h +++ b/gcc/go/gofrontend/types.h @@ -2706,7 +2706,7 @@ class Array_type : public Type // length can not be determined. This will assert if called for a // slice. bool - int_length(int64_t* plen); + int_length(int64_t* plen) const; // Whether this type is identical with T. bool @@ -3160,6 +3160,11 @@ class Interface_type : public Type static Type* make_interface_type_descriptor_type(); + // Return whether methods are finalized for this interface. + bool + methods_are_finalized() const + { return this->methods_are_finalized_; } + protected: int do_traverse(Traverse*); -- cgit v1.1 From 599b9f723e42b0efdf580c45bc03e12dec377edd Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 13 Mar 2019 05:12:05 +0000 Subject: compiler: compare parse methods when indexing interface types for export This change fixes a bug in which two interface types were being incorrectly commoned (considered identical) in the initial stages of writing out types to export data. The indexer does a walk to collect candidates for export, inserting types into a table to eliminate duplicates; as part of this process a local interface type T1 was being commoned with a different interface type T2. This caused a cycle in the exported type graph due to the way embedded interfaces are handled. The fix was to add a new flag to the Type::is_identical utility routine to request that interface type comparison be done by examining the original parse methods, as opposed to the expanded method set, then use the new flag when creating the hash map for the exporter. Fixes golang/go#30659. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166638 From-SVN: r269634 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/export.cc | 15 +++++++++++++++ gcc/go/gofrontend/types.cc | 21 +++++++++++++++------ gcc/go/gofrontend/types.h | 14 ++++++++++++++ 4 files changed, 45 insertions(+), 7 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 5104e7b..f3c52bf 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -565b5cd0f49a00ca20941ea042c07ebe6ddf3553 +946aa5ab2e82d045a2a3b2f18ba2c5b00e957c4b The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/export.cc b/gcc/go/gofrontend/export.cc index d021ac4..963f0bf 100644 --- a/gcc/go/gofrontend/export.cc +++ b/gcc/go/gofrontend/export.cc @@ -60,6 +60,7 @@ class Type_hash_alias_identical return type->hash_for_method(NULL, (Type::COMPARE_ERRORS | Type::COMPARE_TAGS + | Type::COMPARE_EMBEDDED_INTERFACES | Type::COMPARE_ALIASES)); } }; @@ -73,6 +74,7 @@ class Type_alias_identical return Type::are_identical(t1, t2, (Type::COMPARE_ERRORS | Type::COMPARE_TAGS + | Type::COMPARE_EMBEDDED_INTERFACES | Type::COMPARE_ALIASES), NULL); } @@ -295,6 +297,16 @@ Find_types_to_prepare::type(Type* type) if (type->is_abstract()) return TRAVERSE_SKIP_COMPONENTS; + // For interfaces make sure that embedded methods are sorted, since the + // comparison function we use for indexing types relies on it (this call has + // to happen before the set_type_index call below). + if (type->classification() == Type::TYPE_INTERFACE) + { + Interface_type* it = type->interface_type(); + if (it != NULL) + it->sort_embedded(); + } + if (!this->exp_->set_type_index(type)) { // We've already seen this type. @@ -408,6 +420,9 @@ Export::prepare_types(const std::vector* exports, { if (!(*p)->is_type()) continue; + Interface_type* it = (*p)->type_value()->interface_type(); + if (it != NULL) + it->sort_embedded(); this->set_type_index((*p)->type_value()); } diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index e12e670..e9cbfd8 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -8808,10 +8808,19 @@ Interface_type::is_identical(const Interface_type* t, int flags) const if (!this->methods_are_finalized_ || !t->methods_are_finalized_) return false; + // Consult a flag to see whether we need to compare based on + // parse methods or all methods. + Typed_identifier_list* methods = (((flags & COMPARE_EMBEDDED_INTERFACES) != 0) + ? this->parse_methods_ + : this->all_methods_); + Typed_identifier_list* tmethods = (((flags & COMPARE_EMBEDDED_INTERFACES) != 0) + ? t->parse_methods_ + : t->all_methods_); + // We require the same methods with the same types. The methods // have already been sorted. - if (this->all_methods_ == NULL || t->all_methods_ == NULL) - return this->all_methods_ == t->all_methods_; + if (methods == NULL || tmethods == NULL) + return methods == tmethods; if (this->assume_identical(this, t) || t->assume_identical(t, this)) return true; @@ -8823,11 +8832,11 @@ Interface_type::is_identical(const Interface_type* t, int flags) const ai.next = hold_ai; this->assume_identical_ = &ai; - Typed_identifier_list::const_iterator p1 = this->all_methods_->begin(); + Typed_identifier_list::const_iterator p1 = methods->begin(); Typed_identifier_list::const_iterator p2; - for (p2 = t->all_methods_->begin(); p2 != t->all_methods_->end(); ++p1, ++p2) + for (p2 = tmethods->begin(); p2 != tmethods->end(); ++p1, ++p2) { - if (p1 == this->all_methods_->end()) + if (p1 == methods->end()) break; if (p1->name() != p2->name() || !Type::are_identical(p1->type(), p2->type(), flags, NULL)) @@ -8836,7 +8845,7 @@ Interface_type::is_identical(const Interface_type* t, int flags) const this->assume_identical_ = hold_ai; - return p1 == this->all_methods_->end() && p2 == t->all_methods_->end(); + return p1 == methods->end() && p2 == tmethods->end(); } // Return true if T1 and T2 are assumed to be identical during a type diff --git a/gcc/go/gofrontend/types.h b/gcc/go/gofrontend/types.h index 976d41a..07121dd 100644 --- a/gcc/go/gofrontend/types.h +++ b/gcc/go/gofrontend/types.h @@ -577,6 +577,11 @@ class Type // Compare aliases: treat an alias to T as distinct from T. static const int COMPARE_ALIASES = 4; + // When comparing interface types compare the interface embedding heirarchy, + // if any, rather than only comparing method sets. Useful primarily when + // exporting types. + static const int COMPARE_EMBEDDED_INTERFACES = 8; + // Return true if two types are identical. If this returns false, // and REASON is not NULL, it may set *REASON. static bool @@ -3165,6 +3170,15 @@ class Interface_type : public Type methods_are_finalized() const { return this->methods_are_finalized_; } + // Sort embedded interfaces by name. Needed when we are preparing + // to emit types into the export data. + void + sort_embedded() + { + if (parse_methods_ != NULL) + parse_methods_->sort_by_name(); + } + protected: int do_traverse(Traverse*); -- cgit v1.1 From 55b9c612573a120ea39f0a80a51b3b1757248f12 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Wed, 13 Mar 2019 07:21:33 +0000 Subject: [multiple changes] 2019-03-13 Thomas Koenig PR fortran/66695 PR fortran/77746 PR fortran/79485 * gfortran.h (gfc_symbol): Add bind_c component. (gfc_get_gsymbol): Add argument bind_c. * decl.c (add_global_entry): Add bind_c argument to gfc_get_symbol. * parse.c (parse_block_data): Likewise. (parse_module): Likewise. (add_global_procedure): Likewise. (add_global_program): Likewise. * resolve.c (resolve_common_blocks): Likewise. (resolve_global_procedure): Likewise. (gfc_verify_binding_labels): Likewise. * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c in gsym. * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument to gfc_get_symbol. (gfc_get_extern_function_decl): If the sym has a binding label and it cannot be found in the global symbol tabel, it is the wrong one and vice versa. 2019-03-13 Thomas Koenig PR fortran/66695 PR fortran/77746 PR fortran/79485 * gfortran.dg/binding_label_tests_30.f90: New test. * gfortran.dg/binding_label_tests_31.f90: New test. * gfortran.dg/binding_label_tests_32.f90: New test. * gfortran.dg/binding_label_tests_33.f90: New test. From-SVN: r269635 --- gcc/fortran/ChangeLog | 24 +++++++++++++ gcc/fortran/decl.c | 4 +-- gcc/fortran/gfortran.h | 3 +- gcc/fortran/parse.c | 10 +++--- gcc/fortran/resolve.c | 9 ++--- gcc/fortran/symbol.c | 3 +- gcc/fortran/trans-decl.c | 21 +++++++++--- gcc/testsuite/ChangeLog | 10 ++++++ .../gfortran.dg/binding_label_tests_30.f90 | 7 ++++ .../gfortran.dg/binding_label_tests_31.f90 | 19 +++++++++++ .../gfortran.dg/binding_label_tests_32.f90 | 35 +++++++++++++++++++ .../gfortran.dg/binding_label_tests_33.f90 | 39 ++++++++++++++++++++++ 12 files changed, 167 insertions(+), 17 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/binding_label_tests_30.f90 create mode 100644 gcc/testsuite/gfortran.dg/binding_label_tests_31.f90 create mode 100644 gcc/testsuite/gfortran.dg/binding_label_tests_32.f90 create mode 100644 gcc/testsuite/gfortran.dg/binding_label_tests_33.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index edcacf5..ee39ad8 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,27 @@ +2019-03-13 Thomas Koenig + + PR fortran/66695 + PR fortran/77746 + PR fortran/79485 + * gfortran.h (gfc_symbol): Add bind_c component. + (gfc_get_gsymbol): Add argument bind_c. + * decl.c (add_global_entry): Add bind_c argument to + gfc_get_symbol. + * parse.c (parse_block_data): Likewise. + (parse_module): Likewise. + (add_global_procedure): Likewise. + (add_global_program): Likewise. + * resolve.c (resolve_common_blocks): Likewise. + (resolve_global_procedure): Likewise. + (gfc_verify_binding_labels): Likewise. + * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c + in gsym. + * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument + to gfc_get_symbol. + (gfc_get_extern_function_decl): If the sym has a binding label + and it cannot be found in the global symbol tabel, it is the wrong + one and vice versa. + 2019-03-12 Thomas Koenig PR fortran/87673 diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index f6411f1..2f335b2 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -7248,7 +7248,7 @@ add_global_entry (const char *name, const char *binding_label, bool sub, name is a global identifier. */ if (!binding_label || gfc_notification_std (GFC_STD_F2008)) { - s = gfc_get_gsymbol (name); + s = gfc_get_gsymbol (name, false); if (s->defined || (s->type != GSYM_UNKNOWN && s->type != type)) { @@ -7270,7 +7270,7 @@ add_global_entry (const char *name, const char *binding_label, bool sub, && (!gfc_notification_std (GFC_STD_F2008) || strcmp (name, binding_label) != 0)) { - s = gfc_get_gsymbol (binding_label); + s = gfc_get_gsymbol (binding_label, true); if (s->defined || (s->type != GSYM_UNKNOWN && s->type != type)) { diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 3e0f634..dd959e6 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -1891,6 +1891,7 @@ typedef struct gfc_gsymbol enum gfc_symbol_type type; int defined, used; + bool bind_c; locus where; gfc_namespace *ns; } @@ -3114,7 +3115,7 @@ void gfc_enforce_clean_symbol_state (void); void gfc_free_dt_list (void); -gfc_gsymbol *gfc_get_gsymbol (const char *); +gfc_gsymbol *gfc_get_gsymbol (const char *, bool bind_c); gfc_gsymbol *gfc_find_gsymbol (gfc_gsymbol *, const char *); gfc_gsymbol *gfc_find_case_gsymbol (gfc_gsymbol *, const char *); diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 5dcd91a..14cda5f 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -5839,7 +5839,7 @@ parse_block_data (void) } else { - s = gfc_get_gsymbol (gfc_new_block->name); + s = gfc_get_gsymbol (gfc_new_block->name, false); if (s->defined || (s->type != GSYM_UNKNOWN && s->type != GSYM_BLOCK_DATA)) gfc_global_used (s, &gfc_new_block->declared_at); @@ -5921,7 +5921,7 @@ parse_module (void) gfc_gsymbol *s; bool error; - s = gfc_get_gsymbol (gfc_new_block->name); + s = gfc_get_gsymbol (gfc_new_block->name, false); if (s->defined || (s->type != GSYM_UNKNOWN && s->type != GSYM_MODULE)) gfc_global_used (s, &gfc_new_block->declared_at); else @@ -5985,7 +5985,7 @@ add_global_procedure (bool sub) name is a global identifier. */ if (!gfc_new_block->binding_label || gfc_notification_std (GFC_STD_F2008)) { - s = gfc_get_gsymbol (gfc_new_block->name); + s = gfc_get_gsymbol (gfc_new_block->name, false); if (s->defined || (s->type != GSYM_UNKNOWN @@ -6010,7 +6010,7 @@ add_global_procedure (bool sub) && (!gfc_notification_std (GFC_STD_F2008) || strcmp (gfc_new_block->name, gfc_new_block->binding_label) != 0)) { - s = gfc_get_gsymbol (gfc_new_block->binding_label); + s = gfc_get_gsymbol (gfc_new_block->binding_label, true); if (s->defined || (s->type != GSYM_UNKNOWN @@ -6042,7 +6042,7 @@ add_global_program (void) if (gfc_new_block == NULL) return; - s = gfc_get_gsymbol (gfc_new_block->name); + s = gfc_get_gsymbol (gfc_new_block->name, false); if (s->defined || (s->type != GSYM_UNKNOWN && s->type != GSYM_PROGRAM)) gfc_global_used (s, &gfc_new_block->declared_at); diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 6677deb..62c7d37 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -1050,7 +1050,7 @@ resolve_common_blocks (gfc_symtree *common_root) } if (!gsym) { - gsym = gfc_get_gsymbol (common_root->n.common->name); + gsym = gfc_get_gsymbol (common_root->n.common->name, false); gsym->type = GSYM_COMMON; gsym->where = common_root->n.common->where; gsym->defined = 1; @@ -1072,7 +1072,7 @@ resolve_common_blocks (gfc_symtree *common_root) } if (!gsym) { - gsym = gfc_get_gsymbol (common_root->n.common->binding_label); + gsym = gfc_get_gsymbol (common_root->n.common->binding_label, true); gsym->type = GSYM_COMMON; gsym->where = common_root->n.common->where; gsym->defined = 1; @@ -2487,7 +2487,8 @@ resolve_global_procedure (gfc_symbol *sym, locus *where, type = sub ? GSYM_SUBROUTINE : GSYM_FUNCTION; - gsym = gfc_get_gsymbol (sym->binding_label ? sym->binding_label : sym->name); + gsym = gfc_get_gsymbol (sym->binding_label ? sym->binding_label : sym->name, + sym->binding_label != NULL); if ((gsym->type != GSYM_UNKNOWN && gsym->type != type)) gfc_global_used (gsym, where); @@ -11847,7 +11848,7 @@ gfc_verify_binding_labels (gfc_symbol *sym) && (gsym->type == GSYM_FUNCTION || gsym->type == GSYM_SUBROUTINE))) { if (!gsym) - gsym = gfc_get_gsymbol (sym->binding_label); + gsym = gfc_get_gsymbol (sym->binding_label, true); gsym->where = sym->declared_at; gsym->sym_name = sym->name; gsym->binding_label = sym->binding_label; diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 4dfa836..882a4f3 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -4330,7 +4330,7 @@ gsym_compare (void *_s1, void *_s2) /* Get a global symbol, creating it if it doesn't exist. */ gfc_gsymbol * -gfc_get_gsymbol (const char *name) +gfc_get_gsymbol (const char *name, bool bind_c) { gfc_gsymbol *s; @@ -4341,6 +4341,7 @@ gfc_get_gsymbol (const char *name) s = XCNEW (gfc_gsymbol); s->type = GSYM_UNKNOWN; s->name = gfc_get_string ("%s", name); + s->bind_c = bind_c; gfc_insert_bbt (&gfc_gsym_root, s, gsym_compare); diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 36b7fdd..ada6370 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -843,7 +843,7 @@ gfc_get_module_backend_decl (gfc_symbol *sym) { if (!gsym) { - gsym = gfc_get_gsymbol (sym->module); + gsym = gfc_get_gsymbol (sym->module, false); gsym->type = GSYM_MODULE; gsym->ns = gfc_get_namespace (NULL, 0); } @@ -2002,9 +2002,22 @@ gfc_get_extern_function_decl (gfc_symbol * sym, gfc_actual_arglist *actual_args) return get_proc_pointer_decl (sym); /* See if this is an external procedure from the same file. If so, - return the backend_decl. */ - gsym = gfc_find_gsymbol (gfc_gsym_root, sym->binding_label - ? sym->binding_label : sym->name); + return the backend_decl. If we are looking at a BIND(C) + procedure and the symbol is not BIND(C), or vice versa, we + haven't found the right procedure. */ + + if (sym->binding_label) + { + gsym = gfc_find_gsymbol (gfc_gsym_root, sym->binding_label); + if (gsym && !gsym->bind_c) + gsym = NULL; + } + else + { + gsym = gfc_find_gsymbol (gfc_gsym_root, sym->name); + if (gsym && gsym->bind_c) + gsym = NULL; + } if (gsym && !gsym->defined) gsym = NULL; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d09651c..c41914e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2019-03-13 Thomas Koenig + + PR fortran/66695 + PR fortran/77746 + PR fortran/79485 + * gfortran.dg/binding_label_tests_30.f90: New test. + * gfortran.dg/binding_label_tests_31.f90: New test. + * gfortran.dg/binding_label_tests_32.f90: New test. + * gfortran.dg/binding_label_tests_33.f90: New test. + 2019-03-13 Iain Buclaw * gdc.dg/pr88957.d: Move to gdc.dg/ubsan. diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_30.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_30.f90 new file mode 100644 index 0000000..168d4b5 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/binding_label_tests_30.f90 @@ -0,0 +1,7 @@ +! { dg-do compile } +! Make sure this error is flagged. +subroutine foo() ! { dg-error "is already being used as a SUBROUTINE" } +end subroutine foo + +subroutine bar() bind(C,name="foo") ! { dg-error "is already being used as a SUBROUTINE" } +end subroutine bar diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_31.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_31.f90 new file mode 100644 index 0000000..e914c66 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/binding_label_tests_31.f90 @@ -0,0 +1,19 @@ +! { dg-do compile } +! PR fortran/66695 - this used to ICE. +! Original test case by Vladimir Fuka. +module mod + implicit none +contains + integer function F() + end function +end module + +module mod_C + use mod + implicit none +contains + subroutine s() bind(C, name="f") + integer :: x + x = F() + end subroutine +end module diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_32.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_32.f90 new file mode 100644 index 0000000..f18df66 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/binding_label_tests_32.f90 @@ -0,0 +1,35 @@ +! { dg-do run } +! PR 77746 - this used to crash during execution. +! Original test case by Vladimir Fuka. +module first + private + public execute + + interface execute + module procedure random_name + end interface + +contains + + subroutine random_name() + end subroutine +end module + +module test + use first + + implicit none + +contains + + subroutine p_execute(i) bind(C, name="random_name") + integer :: i + + call execute() + end subroutine + +end module + + use test + call p_execute(1) +end diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_33.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_33.f90 new file mode 100644 index 0000000..fdb9a88 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/binding_label_tests_33.f90 @@ -0,0 +1,39 @@ +! { dg-do run } +! PR 79485 - used to crash because the wrong routine was called. +module fmod1 + + contains + + subroutine foo(i) + implicit none + + integer, intent(inout) :: i + + i=i+1 + + end subroutine foo + +end module fmod1 + +module fmod2 + use iso_c_binding + use fmod1, only : foo_first => foo + + contains + + subroutine foo(i) bind(c) + implicit none + + integer, intent(inout) :: i + + i=i+2 + call foo_first(i) + + end subroutine foo + +end module fmod2 + + use fmod2 + + call foo(i) +end -- cgit v1.1 From 33813f1d703c95d4fc87d16a17f6c834135ab209 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 13 Mar 2019 09:24:41 +0100 Subject: re PR middle-end/88588 (ICE in make_decl_rtl, at varasm.c:1329) PR middle-end/88588 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Handle PHI args. (ipa_simd_modify_function_body): Handle PHIs. * c-c++-common/gomp/pr88588.c: New test. From-SVN: r269636 --- gcc/ChangeLog | 6 ++++ gcc/omp-simd-clone.c | 50 ++++++++++++++++++++++++++++++- gcc/testsuite/ChangeLog | 7 ++++- gcc/testsuite/c-c++-common/gomp/pr88588.c | 18 +++++++++++ 4 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/c-c++-common/gomp/pr88588.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bb58b30..74ed267 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-13 Jakub Jelinek + + PR middle-end/88588 + * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Handle PHI args. + (ipa_simd_modify_function_body): Handle PHIs. + 2019-03-12 Robin Dapp * config/s390/s390.c (s390_option_override_internal): Use more diff --git a/gcc/omp-simd-clone.c b/gcc/omp-simd-clone.c index 388198b..472e202 100644 --- a/gcc/omp-simd-clone.c +++ b/gcc/omp-simd-clone.c @@ -866,6 +866,18 @@ ipa_simd_modify_stmt_ops (tree *tp, int *walk_subtrees, void *data) if (tp != orig_tp) { + if (gimple_code (info->stmt) == GIMPLE_PHI + && cand + && TREE_CODE (*orig_tp) == ADDR_EXPR + && TREE_CODE (TREE_OPERAND (*orig_tp, 0)) == PARM_DECL + && cand->alias_ptr_type) + { + gcc_assert (TREE_CODE (cand->alias_ptr_type) == SSA_NAME); + *orig_tp = cand->alias_ptr_type; + info->modified = true; + return NULL_TREE; + } + repl = build_fold_addr_expr (repl); gimple *stmt; if (is_gimple_debug (info->stmt)) @@ -882,7 +894,18 @@ ipa_simd_modify_stmt_ops (tree *tp, int *walk_subtrees, void *data) stmt = gimple_build_assign (make_ssa_name (TREE_TYPE (repl)), repl); repl = gimple_assign_lhs (stmt); } - gimple_stmt_iterator gsi = gsi_for_stmt (info->stmt); + gimple_stmt_iterator gsi; + if (gimple_code (info->stmt) == GIMPLE_PHI) + { + gsi = gsi_after_labels (single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun))); + /* Cache SSA_NAME for next time. */ + if (cand + && TREE_CODE (*orig_tp) == ADDR_EXPR + && TREE_CODE (TREE_OPERAND (*orig_tp, 0)) == PARM_DECL) + cand->alias_ptr_type = repl; + } + else + gsi = gsi_for_stmt (info->stmt); gsi_insert_before (&gsi, stmt, GSI_SAME_STMT); *orig_tp = repl; } @@ -983,6 +1006,31 @@ ipa_simd_modify_function_body (struct cgraph_node *node, { gimple_stmt_iterator gsi; + for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi)) + { + gphi *phi = as_a (gsi_stmt (gsi)); + int i, n = gimple_phi_num_args (phi); + info.stmt = phi; + struct walk_stmt_info wi; + memset (&wi, 0, sizeof (wi)); + info.modified = false; + wi.info = &info; + for (i = 0; i < n; ++i) + { + int walk_subtrees = 1; + tree arg = gimple_phi_arg_def (phi, i); + tree op = arg; + ipa_simd_modify_stmt_ops (&op, &walk_subtrees, &wi); + if (op != arg) + { + SET_PHI_ARG_DEF (phi, i, op); + gcc_assert (TREE_CODE (op) == SSA_NAME); + if (gimple_phi_arg_edge (phi, i)->flags & EDGE_ABNORMAL) + SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op) = 1; + } + } + } + gsi = gsi_start_bb (bb); while (!gsi_end_p (gsi)) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c41914e..5ba400f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,9 @@ -2019-03-13 Thomas Koenig +2019-03-13 Jakub Jelinek + + PR middle-end/88588 + * c-c++-common/gomp/pr88588.c: New test. + +2019-03-13 Thomas Koenig PR fortran/66695 PR fortran/77746 diff --git a/gcc/testsuite/c-c++-common/gomp/pr88588.c b/gcc/testsuite/c-c++-common/gomp/pr88588.c new file mode 100644 index 0000000..fb1a671 --- /dev/null +++ b/gcc/testsuite/c-c++-common/gomp/pr88588.c @@ -0,0 +1,18 @@ +/* PR middle-end/88588 */ +/* { dg-do compile } */ +/* { dg-options "-fopenmp -O1" } */ + +int *v; + +#pragma omp declare simd +void +foo (int x) +{ + int *a = &x; + + for (;;) + { + *v = *a; + a = v; + } +} -- cgit v1.1 From 6e089cc3f64dd9b5acce75914897b99ababcaaa5 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 13 Mar 2019 09:48:56 +0100 Subject: ipa-param-manipulation.h (struct ipa_parm_adjustment): Remove nonlocal_value member. * ipa-param-manipulation.h (struct ipa_parm_adjustment): Remove nonlocal_value member. From-SVN: r269637 --- gcc/ChangeLog | 3 +++ gcc/ipa-param-manipulation.h | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 74ed267..310f8f8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2019-03-13 Jakub Jelinek + * ipa-param-manipulation.h (struct ipa_parm_adjustment): Remove + nonlocal_value member. + PR middle-end/88588 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Handle PHI args. (ipa_simd_modify_function_body): Handle PHIs. diff --git a/gcc/ipa-param-manipulation.h b/gcc/ipa-param-manipulation.h index e2b543a..71fc4a2 100644 --- a/gcc/ipa-param-manipulation.h +++ b/gcc/ipa-param-manipulation.h @@ -75,10 +75,6 @@ struct ipa_parm_adjustment non-default-def ssa names when a parm decl is going away. */ tree new_ssa_base; - /* If non-NULL and the original parameter is to be removed (copy_param below - is NULL), this is going to be its nonlocalized vars value. */ - tree nonlocal_value; - /* This holds the prefix to be used for the new DECL_NAME. */ const char *arg_prefix; -- cgit v1.1 From 31ba0418a27bb61df31bb5fcdbe380288f3b10cf Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 13 Mar 2019 10:32:29 +0000 Subject: re PR c++/85558 (ICE in make_rtl_for_nonlocal_decl when using static member of template class) 2019-03-13 Paolo Carlini PR c++/85558 * g++.dg/other/friend16.C: New. * g++.dg/other/friend17.C: Likewise. From-SVN: r269644 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/g++.dg/other/friend16.C | 12 ++++++++++++ gcc/testsuite/g++.dg/other/friend17.C | 12 ++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 gcc/testsuite/g++.dg/other/friend16.C create mode 100644 gcc/testsuite/g++.dg/other/friend17.C (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5ba400f..2439836 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-13 Paolo Carlini + + PR c++/85558 + * g++.dg/other/friend16.C: New. + * g++.dg/other/friend17.C: Likewise. + 2019-03-13 Jakub Jelinek PR middle-end/88588 diff --git a/gcc/testsuite/g++.dg/other/friend16.C b/gcc/testsuite/g++.dg/other/friend16.C new file mode 100644 index 0000000..8c62ef6 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/friend16.C @@ -0,0 +1,12 @@ +// PR c++/85558 + +template +struct triggerBug { + friend void doInitUser(bool = triggerBug::doInit); // { dg-error "definition" } + static bool doInit; +}; + +template +bool triggerBug::doInit = true; + +triggerBug bug; diff --git a/gcc/testsuite/g++.dg/other/friend17.C b/gcc/testsuite/g++.dg/other/friend17.C new file mode 100644 index 0000000..81269af --- /dev/null +++ b/gcc/testsuite/g++.dg/other/friend17.C @@ -0,0 +1,12 @@ +// PR c++/85558 + +template +struct triggerBug { + friend void doInitUser(bool = triggerBug::doInit) {} + static bool doInit; +}; + +template +bool triggerBug::doInit = true; + +triggerBug bug; -- cgit v1.1 From c045ea5763f0148e0d38dc71174b523c84143d68 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 13 Mar 2019 10:56:32 +0000 Subject: tree-pretty-print.c (dump_generic_node): For -gimple properly dump negative integer constants using _Literal (type) -num. 2019-03-14 Richard Biener * tree-pretty-print.c (dump_generic_node): For -gimple properly dump negative integer constants using _Literal (type) -num. From-SVN: r269645 --- gcc/ChangeLog | 5 +++++ gcc/tree-pretty-print.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 310f8f8..73b62b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-03-14 Richard Biener + + * tree-pretty-print.c (dump_generic_node): For -gimple properly + dump negative integer constants using _Literal (type) -num. + 2019-03-13 Jakub Jelinek * ipa-param-manipulation.h (struct ipa_parm_adjustment): Remove diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index ccebfc2..ae0a6c1 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -1830,7 +1830,8 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags, && (POINTER_TYPE_P (TREE_TYPE (node)) || (TYPE_PRECISION (TREE_TYPE (node)) < TYPE_PRECISION (integer_type_node)) - || exact_log2 (TYPE_PRECISION (TREE_TYPE (node))) == -1)) + || exact_log2 (TYPE_PRECISION (TREE_TYPE (node))) == -1 + || tree_int_cst_sgn (node) < 0)) { pp_string (pp, "_Literal ("); dump_generic_node (pp, TREE_TYPE (node), spc, flags, false); -- cgit v1.1 From cd5091f1eab0b6f19a1f0557bf40d1aa9ec34dd4 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 13 Mar 2019 11:32:11 +0000 Subject: re PR middle-end/89677 (internal compiler error: in wide_int_to_tree_1, at tree.c:1549) 2019-03-13 Richard Biener PR middle-end/89677 * tree-scalar-evolution.c (simplify_peeled_chrec): Do not throw FP expressions at tree-affine. * gcc.dg/torture/pr89677.c: New testcase. From-SVN: r269646 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/torture/pr89677.c | 15 +++++++++++++++ gcc/tree-scalar-evolution.c | 5 +++++ 4 files changed, 31 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/torture/pr89677.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 73b62b2..86e210b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-13 Richard Biener + + PR middle-end/89677 + * tree-scalar-evolution.c (simplify_peeled_chrec): Do not + throw FP expressions at tree-affine. + 2019-03-14 Richard Biener * tree-pretty-print.c (dump_generic_node): For -gimple properly diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2439836..a61b668 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-13 Richard Biener + + PR middle-end/89677 + * gcc.dg/torture/pr89677.c: New testcase. + 2019-03-13 Paolo Carlini PR c++/85558 diff --git a/gcc/testsuite/gcc.dg/torture/pr89677.c b/gcc/testsuite/gcc.dg/torture/pr89677.c new file mode 100644 index 0000000..a45ca1f --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr89677.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target int32plus } */ + +int a, b, d; +unsigned c; +float e, f, g; +void h() { + float *i = &g; + for (; c < 10; c += 3) + for (; d; d += 3) { + a = *i; + g = f + 0; + f = b + *i + (b - e + 305219) + -b + 3; + } +} diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c index 3de5590..c814437 100644 --- a/gcc/tree-scalar-evolution.c +++ b/gcc/tree-scalar-evolution.c @@ -1456,6 +1456,11 @@ simplify_peeled_chrec (struct loop *loop, tree arg, tree init_cond) return build_polynomial_chrec (loop->num, init_cond, right); } + /* The affine code only deals with pointer and integer types. */ + if (!POINTER_TYPE_P (type) + && !INTEGRAL_TYPE_P (type)) + return chrec_dont_know; + /* Try harder to check if they are equal. */ tree_to_aff_combination_expand (left, type, &aff1, &peeled_chrec_map); tree_to_aff_combination_expand (step_val, type, &aff2, &peeled_chrec_map); -- cgit v1.1 From bd8ea483131f0f92f10703d9ca00e5e8708d1d3c Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 13 Mar 2019 15:01:00 +0000 Subject: re PR c++/63508 (ICE when using bracketed initializer on pointer to member function of a templated class) 2019-03-13 Paolo Carlini PR c++/63508 * g++.dg/cpp0x/auto53.C: New. From-SVN: r269651 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/auto53.C | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/auto53.C (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a61b668..dc261ed 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-13 Paolo Carlini + + PR c++/63508 + * g++.dg/cpp0x/auto53.C: New. + 2019-03-13 Richard Biener PR middle-end/89677 diff --git a/gcc/testsuite/g++.dg/cpp0x/auto53.C b/gcc/testsuite/g++.dg/cpp0x/auto53.C new file mode 100644 index 0000000..68b408e --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/auto53.C @@ -0,0 +1,13 @@ +// PR c++/63508 +// { dg-do compile { target c++11 } } + +template class c { + void mf() { } + using m = void (c::*) (); +public: + c() { + auto x = m{&c::mf}; + } +}; + +int main() { c o{}; } -- cgit v1.1 From 129ef157d4c0f369de9a5966b9f64bf9634e7d83 Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Wed, 13 Mar 2019 17:19:43 +0000 Subject: PR tree-optimization/89662 - -Warray-bounds ICE on void* arithmetic gcc/ChangeLog: PR tree-optimization/89662 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid assuming every type has a size. gcc/testsuite/ChangeLog: PR tree-optimization/89662 * gcc.dg/Warray-bounds-41.c: New test. From-SVN: r269655 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/Warray-bounds-41.c | 33 +++++++++++++++++++++++++++++++++ gcc/tree-vrp.c | 11 +++++++---- 4 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/Warray-bounds-41.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 86e210b..cda44b8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-13 Martin Sebor + + PR tree-optimization/89662 + * tree-vrp.c (vrp_prop::check_mem_ref): Avoid assuming every type + has a size. + 2019-03-13 Richard Biener PR middle-end/89677 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dc261ed..f4dc0a0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-13 Martin Sebor + + PR tree-optimization/89662 + * gcc.dg/Warray-bounds-41.c: New test. + 2019-03-13 Paolo Carlini PR c++/63508 diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-41.c b/gcc/testsuite/gcc.dg/Warray-bounds-41.c new file mode 100644 index 0000000..fd79590 --- /dev/null +++ b/gcc/testsuite/gcc.dg/Warray-bounds-41.c @@ -0,0 +1,33 @@ +/* PR tree-optimization/89662- -Warray-bounds ICE on void* arithmetic + { dg-do compile } + { dg-options "-O2 -Wall" } */ + +void* vptr (void *c) +{ + return c; +} + +void sink (void*); + +void test_vptr_arith_vla_cst (void) +{ + int n = 1; + char c[n]; + sink (vptr (c) - 1); /* { dg-warning "\\\[-Warray-bounds" } */ +} + +void test_vptr_arith_vla_range (int n) +{ + if (n < 1 || 4 < n) + return; + + char c[n]; + sink (vptr (c) - 1); /* { dg-warning "\\\[-Warray-bounds" "pr82608" { xfail *-*-* } } */ +} + +void test_vptr_arith_vla_var (int n) +{ + char c[n]; + sink (vptr (c) - 1); /* { dg-warning "\\\[-Warray-bounds" "pr82608" { xfail *-*-* } } */ +} + diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index bf1d947..1092fe0 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -4718,13 +4718,16 @@ vrp_prop::check_mem_ref (location_t location, tree ref, { /* Extract the element type out of MEM_REF and use its size to compute the index to print in the diagnostic; arrays - in MEM_REF don't mean anything. */ + in MEM_REF don't mean anything. A type with no size like + void is as good as having a size of 1. */ tree type = TREE_TYPE (ref); while (TREE_CODE (type) == ARRAY_TYPE) type = TREE_TYPE (type); - tree size = TYPE_SIZE_UNIT (type); - offrange[0] = offrange[0] / wi::to_offset (size); - offrange[1] = offrange[1] / wi::to_offset (size); + if (tree size = TYPE_SIZE_UNIT (type)) + { + offrange[0] = offrange[0] / wi::to_offset (size); + offrange[1] = offrange[1] / wi::to_offset (size); + } } else { -- cgit v1.1 From cbfa3ec327c44491ec9c141c6476ba1d6df639e9 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 13 Mar 2019 18:38:45 +0000 Subject: PR c++/88979 - further P0634 fix for constructors. * parser.c (cp_parser_decl_specifier_seq): Pass flags to cp_parser_constructor_declarator_p. (cp_parser_direct_declarator): Allow missing typename for constructor parameters. (cp_parser_constructor_declarator_p): Add FLAGS parameter. Pass it to cp_parser_type_specifier. * g++.dg/cpp2a/typename15.C: New test. From-SVN: r269656 --- gcc/cp/ChangeLog | 10 ++++++++++ gcc/cp/parser.c | 24 +++++++++++++++++------- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp2a/typename15.C | 15 +++++++++++++++ 4 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp2a/typename15.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3340239..2e06623 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,13 @@ +2019-03-13 Marek Polacek + + PR c++/88979 - further P0634 fix for constructors. + * parser.c (cp_parser_decl_specifier_seq): Pass flags to + cp_parser_constructor_declarator_p. + (cp_parser_direct_declarator): Allow missing typename for constructor + parameters. + (cp_parser_constructor_declarator_p): Add FLAGS parameter. Pass it to + cp_parser_type_specifier. + 2019-03-11 Jason Merrill PR c++/86521 - wrong overload resolution with ref-qualifiers. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index f951111..8244366 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -2506,7 +2506,7 @@ static cp_expr cp_parser_simple_cast_expression static tree cp_parser_global_scope_opt (cp_parser *, bool); static bool cp_parser_constructor_declarator_p - (cp_parser *, bool); + (cp_parser *, cp_parser_flags, bool); static tree cp_parser_function_definition_from_specifiers_and_declarator (cp_parser *, cp_decl_specifier_seq *, tree, const cp_declarator *); static tree cp_parser_function_definition_after_declarator @@ -14052,7 +14052,8 @@ cp_parser_decl_specifier_seq (cp_parser* parser, = (!found_decl_spec && constructor_possible_p && (cp_parser_constructor_declarator_p - (parser, decl_spec_seq_has_spec_p (decl_specs, ds_friend)))); + (parser, flags, decl_spec_seq_has_spec_p (decl_specs, + ds_friend)))); /* If we don't have a DECL_SPEC yet, then we must be looking at a type-specifier. */ @@ -21160,7 +21161,13 @@ cp_parser_direct_declarator (cp_parser* parser, tree decl = cp_parser_lookup_name_simple (parser, unqualified_name, token->location); - if (!is_overloaded_fn (decl)) + if (!is_overloaded_fn (decl) + /* Allow + template + A::A(T::type) { } */ + && !(MAYBE_CLASS_TYPE_P (qualifying_scope) + && constructor_name_p (unqualified_name, + qualifying_scope))) flags &= ~CP_PARSER_FLAGS_TYPENAME_OPTIONAL; } } @@ -27380,10 +27387,12 @@ cp_parser_global_scope_opt (cp_parser* parser, bool current_scope_valid_p) /* Returns TRUE if the upcoming token sequence is the start of a constructor declarator or C++17 deduction guide. If FRIEND_P is true, the - declarator is preceded by the `friend' specifier. */ + declarator is preceded by the `friend' specifier. The parser flags FLAGS + is used to control type-specifier parsing. */ static bool -cp_parser_constructor_declarator_p (cp_parser *parser, bool friend_p) +cp_parser_constructor_declarator_p (cp_parser *parser, cp_parser_flags flags, + bool friend_p) { bool constructor_p; bool outside_class_specifier_p; @@ -27562,9 +27571,10 @@ cp_parser_constructor_declarator_p (cp_parser *parser, bool friend_p) = parser->num_template_parameter_lists; parser->num_template_parameter_lists = 0; - /* Look for the type-specifier. */ + /* Look for the type-specifier. It's not optional, but its typename + might be. */ cp_parser_type_specifier (parser, - CP_PARSER_FLAGS_NONE, + (flags & ~CP_PARSER_FLAGS_OPTIONAL), /*decl_specs=*/NULL, /*is_declarator=*/true, /*declares_class_or_enum=*/NULL, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f4dc0a0..0abb39b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-13 Marek Polacek + + PR c++/88979 - further P0634 fix for constructors. + * g++.dg/cpp2a/typename15.C: New test. + 2019-03-13 Martin Sebor PR tree-optimization/89662 diff --git a/gcc/testsuite/g++.dg/cpp2a/typename15.C b/gcc/testsuite/g++.dg/cpp2a/typename15.C new file mode 100644 index 0000000..9094190 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/typename15.C @@ -0,0 +1,15 @@ +// PR c++/88979 +// { dg-do compile { target c++2a } } + +template +struct B { + B(T::type); +}; + +template +struct A { + A(T::type); +}; + +template +A::A(T::type) { } -- cgit v1.1 From 84083a711ee6b84f42a6d33c45784d660cf4f514 Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Wed, 13 Mar 2019 20:52:23 +0100 Subject: re PR fortran/89601 ([PDT] ICE: Segmentation fault (in resolve_component)) fix PR 89601 2019-03-13 Janus Weil PR fortran/89601 * decl.c (gfc_match_formal_arglist): Reject empty type parameter lists. (gfc_match_derived_decl): Mark as PDT only if type parameter list was matched successfully. 2019-03-13 Janus Weil PR fortran/89601 * gfortran.dg/pdt_16.f03: Modified to avoid follow-up errors. * gfortran.dg/pdt_30.f90: New test case. From-SVN: r269658 --- gcc/fortran/ChangeLog | 7 +++++++ gcc/fortran/decl.c | 14 ++++++++++++-- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gfortran.dg/pdt_16.f03 | 1 - gcc/testsuite/gfortran.dg/pdt_30.f90 | 17 +++++++++++++++++ 5 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/pdt_30.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ee39ad8..281c29f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2019-03-13 Janus Weil + + PR fortran/89601 + * decl.c (gfc_match_formal_arglist): Reject empty type parameter lists. + (gfc_match_derived_decl): Mark as PDT only if type parameter list was + matched successfully. + 2019-03-13 Thomas Koenig PR fortran/66695 diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 2f335b2..749faf9 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -6275,7 +6275,16 @@ gfc_match_formal_arglist (gfc_symbol *progname, int st_flag, } if (gfc_match_char (')') == MATCH_YES) - goto ok; + { + if (typeparam) + { + gfc_error_now ("A type parameter list is required at %C"); + m = MATCH_ERROR; + goto cleanup; + } + else + goto ok; + } for (;;) { @@ -10217,13 +10226,14 @@ gfc_match_derived_decl (void) m = gfc_match_formal_arglist (sym, 0, 0, true); if (m != MATCH_YES) gfc_error_recovery (); + else + sym->attr.pdt_template = 1; m = gfc_match_eos (); if (m != MATCH_YES) { gfc_error_recovery (); gfc_error_now ("Garbage after PARAMETERIZED TYPE declaration at %C"); } - sym->attr.pdt_template = 1; } if (extended && !sym->components) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0abb39b..afb61b4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-13 Janus Weil + + PR fortran/89601 + * gfortran.dg/pdt_16.f03: Modified to avoid follow-up errors. + * gfortran.dg/pdt_30.f90: New test case. + 2019-03-13 Marek Polacek PR c++/88979 - further P0634 fix for constructors. diff --git a/gcc/testsuite/gfortran.dg/pdt_16.f03 b/gcc/testsuite/gfortran.dg/pdt_16.f03 index 067d87d..22c6b83 100644 --- a/gcc/testsuite/gfortran.dg/pdt_16.f03 +++ b/gcc/testsuite/gfortran.dg/pdt_16.f03 @@ -12,7 +12,6 @@ end program p type t(a ! { dg-error "Expected parameter list" } integer, kind :: a - real(a) :: x end type type u(a, a) ! { dg-error "Duplicate name" } integer, kind :: a ! { dg-error "already declared" } diff --git a/gcc/testsuite/gfortran.dg/pdt_30.f90 b/gcc/testsuite/gfortran.dg/pdt_30.f90 new file mode 100644 index 0000000..47f7c77 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pdt_30.f90 @@ -0,0 +1,17 @@ +! { dg-do compile } +! +! PR 89601: [8/9 Regression] [PDT] ICE: Segmentation fault (in resolve_component) +! +! Contributed by Arseny Solokha + +program vw + interface + real function ul (ki) + real :: ki + end function ul + end interface + type :: q8 () ! { dg-error "A type parameter list is required" } + procedure (ul), pointer, nopass :: pj + end type q8 + type (q8) :: ki +end program vw -- cgit v1.1 From 2b0a62741e675068c13e81690758855846c88726 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 13 Mar 2019 19:58:20 +0000 Subject: PR c++/89686 - mixing init-capture and simple-capture in lambda. * parser.c (cp_parser_lambda_introducer): Give error when combining init-capture and simple-capture. * g++.dg/cpp2a/lambda-pack-init2.C: New test. From-SVN: r269659 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/parser.c | 20 +++++++++++++++++--- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp2a/lambda-pack-init2.C | 22 ++++++++++++++++++++++ 4 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp2a/lambda-pack-init2.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2e06623..fa0fdea 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -8,6 +8,10 @@ (cp_parser_constructor_declarator_p): Add FLAGS parameter. Pass it to cp_parser_type_specifier. + PR c++/89686 - mixing init-capture and simple-capture in lambda. + * parser.c (cp_parser_lambda_introducer): Give error when combining + init-capture and simple-capture. + 2019-03-11 Jason Merrill PR c++/86521 - wrong overload resolution with ref-qualifiers. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 8244366..14da1a1 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -10609,12 +10609,13 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr) } bool init_pack_expansion = false; + location_t ellipsis_loc = UNKNOWN_LOCATION; if (cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS)) { - location_t loc = cp_lexer_peek_token (parser->lexer)->location; + ellipsis_loc = cp_lexer_peek_token (parser->lexer)->location; if (cxx_dialect < cxx2a) - pedwarn (loc, 0, "pack init-capture only available with " - "%<-std=c++2a%> or %<-std=gnu++2a%>"); + pedwarn (ellipsis_loc, 0, "pack init-capture only available with " + "%<-std=c++2a%> or %<-std=gnu++2a%>"); cp_lexer_consume_token (parser->lexer); init_pack_expansion = true; } @@ -10719,8 +10720,21 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr) if (cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS)) { + location_t loc = cp_lexer_peek_token (parser->lexer)->location; cp_lexer_consume_token (parser->lexer); capture_init_expr = make_pack_expansion (capture_init_expr); + if (init_pack_expansion) + { + /* If what follows is an initializer, the second '...' is + invalid. But for cases like [...xs...], the first one + is invalid. */ + if (cp_lexer_next_token_is (parser->lexer, CPP_EQ) + || cp_lexer_next_token_is (parser->lexer, CPP_OPEN_PAREN) + || cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE)) + ellipsis_loc = loc; + error_at (ellipsis_loc, "too many %<...%> in lambda capture"); + continue; + } } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index afb61b4..ed025c9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-13 Marek Polacek + + PR c++/89686 - mixing init-capture and simple-capture in lambda. + * g++.dg/cpp2a/lambda-pack-init2.C: New test. + 2019-03-13 Janus Weil PR fortran/89601 diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init2.C b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init2.C new file mode 100644 index 0000000..55d689d --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init2.C @@ -0,0 +1,22 @@ +// PR c++/89686 +// { dg-do compile { target c++2a } } + +template +void foo(Ts... xs) +{ + int i = 10; + [...xs...]{}(); // { dg-error "4:too many ..... in lambda capture" } + [...xs...=xs]{}(); // { dg-error "9:too many ..... in lambda capture|expected" } + [xs...]{}(); + [...xs=xs]{}(); + + [i, ...xs...]{}(); // { dg-error "7:too many ..... in lambda capture" } + [i, ...xs...=xs]{}(); // { dg-error "12:too many ..... in lambda capture|expected" } + [i, xs...]{}(); + [i, ...xs=xs]{}(); +} + +int main() +{ + foo(0, 1, 2); +} -- cgit v1.1 From ef7e79a3672d1b013646a1a6f8cd5931ef6bcd07 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 13 Mar 2019 20:04:33 +0000 Subject: PR c++/89660 - bogus error with -Wredundant-move. * typeck.c (maybe_warn_pessimizing_move): Only accept (T &) &arg as the std::move's argument. Don't call convert_for_initialization when warn_redundant_move isn't on. * g++.dg/cpp0x/Wredundant-move8.C: New test. * g++.dg/cpp0x/Wredundant-move9.C: New test. From-SVN: r269660 --- gcc/cp/ChangeLog | 5 ++ gcc/cp/typeck.c | 9 ++- gcc/testsuite/ChangeLog | 4 + gcc/testsuite/g++.dg/cpp0x/Wredundant-move8.C | 38 +++++++++ gcc/testsuite/g++.dg/cpp0x/Wredundant-move9.C | 108 ++++++++++++++++++++++++++ 5 files changed, 161 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/Wredundant-move8.C create mode 100644 gcc/testsuite/g++.dg/cpp0x/Wredundant-move9.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fa0fdea..ca8bc03 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -12,6 +12,11 @@ * parser.c (cp_parser_lambda_introducer): Give error when combining init-capture and simple-capture. + PR c++/89660 - bogus error with -Wredundant-move. + * typeck.c (maybe_warn_pessimizing_move): Only accept (T &) &arg + as the std::move's argument. Don't call convert_for_initialization + when warn_redundant_move isn't on. + 2019-03-11 Jason Merrill PR c++/86521 - wrong overload resolution with ref-qualifiers. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 51f4781..f77e9c6 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -9409,7 +9409,7 @@ maybe_warn_pessimizing_move (tree retval, tree functype) if (!CLASS_TYPE_P (functype)) return; - /* We're looking for *std::move (&arg). */ + /* We're looking for *std::move ((T &) &arg). */ if (REFERENCE_REF_P (retval) && TREE_CODE (TREE_OPERAND (retval, 0)) == CALL_EXPR) { @@ -9417,7 +9417,9 @@ maybe_warn_pessimizing_move (tree retval, tree functype) if (is_std_move_p (fn)) { tree arg = CALL_EXPR_ARG (fn, 0); - STRIP_NOPS (arg); + if (TREE_CODE (arg) != NOP_EXPR) + return; + arg = TREE_OPERAND (arg, 0); if (TREE_CODE (arg) != ADDR_EXPR) return; arg = TREE_OPERAND (arg, 0); @@ -9433,7 +9435,8 @@ maybe_warn_pessimizing_move (tree retval, tree functype) } /* Warn if the move is redundant. It is redundant when we would do maybe-rvalue overload resolution even without std::move. */ - else if (treat_lvalue_as_rvalue_p (arg, /*parm_ok*/true)) + else if (warn_redundant_move + && treat_lvalue_as_rvalue_p (arg, /*parm_ok*/true)) { /* Make sure that the overload resolution would actually succeed if we removed the std::move call. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ed025c9..5f72cc2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -3,6 +3,10 @@ PR c++/89686 - mixing init-capture and simple-capture in lambda. * g++.dg/cpp2a/lambda-pack-init2.C: New test. + PR c++/89660 - bogus error with -Wredundant-move. + * g++.dg/cpp0x/Wredundant-move8.C: New test. + * g++.dg/cpp0x/Wredundant-move9.C: New test. + 2019-03-13 Janus Weil PR fortran/89601 diff --git a/gcc/testsuite/g++.dg/cpp0x/Wredundant-move8.C b/gcc/testsuite/g++.dg/cpp0x/Wredundant-move8.C new file mode 100644 index 0000000..c290585 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/Wredundant-move8.C @@ -0,0 +1,38 @@ +// PR c++/89660 +// { dg-do compile { target c++11 } } +// { dg-options "-Wredundant-move" } + +// Define std::move. +namespace std { + template + struct remove_reference + { typedef _Tp type; }; + + template + struct remove_reference<_Tp&> + { typedef _Tp type; }; + + template + struct remove_reference<_Tp&&> + { typedef _Tp type; }; + + template + constexpr typename std::remove_reference<_Tp>::type&& + move(_Tp&& __t) noexcept + { return static_cast::type&&>(__t); } +} + +template struct D { + template D (D x) : k(&x.foo ()) {} + S &foo (); + int *k; +}; + +D bar (); + +struct F { + D baz () { + D f = bar (); + return std::move (*reinterpret_cast *> (&f)); // { dg-bogus "redundant move in return statement" } + } +}; diff --git a/gcc/testsuite/g++.dg/cpp0x/Wredundant-move9.C b/gcc/testsuite/g++.dg/cpp0x/Wredundant-move9.C new file mode 100644 index 0000000..fdd3ce1 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/Wredundant-move9.C @@ -0,0 +1,108 @@ +// { dg-do compile { target c++11 } } +// { dg-options "-Wredundant-move" } + +// Define std::move. +namespace std { + template + struct remove_reference + { typedef _Tp type; }; + + template + struct remove_reference<_Tp&> + { typedef _Tp type; }; + + template + struct remove_reference<_Tp&&> + { typedef _Tp type; }; + + template + constexpr typename std::remove_reference<_Tp>::type&& + move(_Tp&& __t) noexcept + { return static_cast::type&&>(__t); } +} + +template +struct T { + T() { } + T(const T&) { } + T(T&&) { } +}; + +template +struct U { + U() { } + U(const U&) { } + U(U&&) { } + U(T) { } +}; + +T +fn1 (T t) +{ + return t; +} + +T +fn2 (T t) +{ + // Will use move even without std::move. + return std::move (t); // { dg-warning "redundant move in return statement" } +} + +T +fn3 (const T t) +{ + // t is const: will decay into copy. + return t; +} + +T +fn4 (const T t) +{ + // t is const: will decay into copy despite std::move, so it's redundant. + // We used to warn about this, but no longer since c++/87378. + return std::move (t); +} + +int +fn5 (int i) +{ + // Not a class type. + return std::move (i); +} + +T +fn6 (T t, bool b) +{ + if (b) + throw std::move (t); + return std::move (t); // { dg-warning "redundant move in return statement" } +} + +U +fn7 (T t) +{ + // Core 1579 means we'll get a move here. + return t; +} + +U +fn8 (T t) +{ + // Core 1579 means we'll get a move here. Even without std::move. + return std::move (t); // { dg-warning "redundant move in return statement" } +} + +T +fn9 (T& t) +{ + // T is a reference and the move isn't redundant. + return std::move (t); +} + +T +fn10 (T&& t) +{ + // T is a reference and the move isn't redundant. + return std::move (t); +} -- cgit v1.1 From 43fb4c8056854b37dfcddf4b48886130628e8c0a Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 13 Mar 2019 21:22:15 +0100 Subject: re PR debug/89498 (ICE in AT_loc_list, at dwarf2out.c:4871) PR debug/89498 * dwarf2out.c (size_of_die): For dw_val_class_view_list always use DWARF_OFFSET_SIZE. (value_format): For dw_val_class_view_list never use DW_FORM_loclistx. From-SVN: r269661 --- gcc/ChangeLog | 7 +++++++ gcc/dwarf2out.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cda44b8..7c5bda1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-03-13 Jakub Jelinek + + PR debug/89498 + * dwarf2out.c (size_of_die): For dw_val_class_view_list always use + DWARF_OFFSET_SIZE. + (value_format): For dw_val_class_view_list never use DW_FORM_loclistx. + 2019-03-13 Martin Sebor PR tree-optimization/89662 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 8305555..c9f1e31 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -9369,7 +9369,6 @@ size_of_die (dw_die_ref die) } break; case dw_val_class_loc_list: - case dw_val_class_view_list: if (dwarf_split_debug_info && dwarf_version >= 5) { gcc_assert (AT_loc_list (a)->num_assigned); @@ -9378,6 +9377,9 @@ size_of_die (dw_die_ref die) else size += DWARF_OFFSET_SIZE; break; + case dw_val_class_view_list: + size += DWARF_OFFSET_SIZE; + break; case dw_val_class_range_list: if (value_format (a) == DW_FORM_rnglistx) { @@ -9751,12 +9753,12 @@ value_format (dw_attr_node *a) gcc_unreachable (); } case dw_val_class_loc_list: - case dw_val_class_view_list: if (dwarf_split_debug_info && dwarf_version >= 5 && AT_loc_list (a)->num_assigned) return DW_FORM_loclistx; /* FALLTHRU */ + case dw_val_class_view_list: case dw_val_class_range_list: /* For range lists in DWARF 5, use DW_FORM_rnglistx from .debug_info.dwo but in .debug_info use DW_FORM_sec_offset, which is shorter if we -- cgit v1.1 From 1e05d1854cd6d63cda5828c50735d029ce198ff2 Mon Sep 17 00:00:00 2001 From: Vladimir Makarov Date: Wed, 13 Mar 2019 20:35:18 +0000 Subject: re PR target/85860 (ICE: in lra_split_hard_reg_for, at lra-assigns.c:1810: unable to find a register to spill with -flive-range-shrinkage -mbmi2) 2019-03-13 Vladimir Makarov PR target/85860 * lra-constraints.c (inherit_in_ebb): Update potential_reload_hard_regs along with live_hard_regs. 2019-03-13 Vladimir Makarov PR target/85860 * gcc.target/i386/pr85860.c: New. From-SVN: r269662 --- gcc/ChangeLog | 6 ++++++ gcc/lra-constraints.c | 1 + gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr85860.c | 23 +++++++++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr85860.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7c5bda1..baed65f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-13 Vladimir Makarov + + PR target/85860 + * lra-constraints.c (inherit_in_ebb): Update + potential_reload_hard_regs along with live_hard_regs. + 2019-03-13 Jakub Jelinek PR debug/89498 diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index afbd5d0..d7d69c6 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -6365,6 +6365,7 @@ inherit_in_ebb (rtx_insn *head, rtx_insn *tail) add_to_hard_reg_set (&s, PSEUDO_REGNO_MODE (dst_regno), reg_renumber[dst_regno]); AND_COMPL_HARD_REG_SET (live_hard_regs, s); + AND_COMPL_HARD_REG_SET (potential_reload_hard_regs, s); } /* We should invalidate potential inheritance or splitting for the current insn usages to the next diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5f72cc2..f4d25f1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-13 Vladimir Makarov + + PR target/85860 + * gcc.target/i386/pr85860.c: New. + 2019-03-13 Marek Polacek PR c++/89686 - mixing init-capture and simple-capture in lambda. diff --git a/gcc/testsuite/gcc.target/i386/pr85860.c b/gcc/testsuite/gcc.target/i386/pr85860.c new file mode 100644 index 0000000..aef78a4 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr85860.c @@ -0,0 +1,23 @@ +/* { dg-do compile { target lp64 } } */ +/* { dg-options "-O2 -fno-guess-branch-probability -flive-range-shrinkage -mbmi2" } */ + +int a, b, c, d, e; + +extern int bar(void); + +__int128 +foo (unsigned g, int h, long i, __int128 j, short k, __int128 l) +{ + unsigned __int128 m = j; + do + { + j %= 5; + c = c >> (m & 31); + e = __builtin_sub_overflow (b, 0, &m); + d = bar (); + l *= __builtin_mul_overflow_p ((unsigned) d, ~(unsigned __int128) 1, + (unsigned __int128) 0); + } + while (a); + return m + j + k + l; +} -- cgit v1.1 From edaff7c9448c4e4bdc4e4a42f5813ee543a1df31 Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Wed, 13 Mar 2019 21:33:27 +0000 Subject: re PR fortran/87045 (pointer to array of character) 2019-03-13 Harald Anlauf PR fortran/87045 * trans-expr.c (gfc_trans_pointer_assignment): Move check for same string length so that we do not get false errors for deferred length. PR fortran/87045 * gfortran.dg/pr87045.f90: New test. From-SVN: r269664 --- gcc/fortran/ChangeLog | 7 +++++++ gcc/fortran/trans-expr.c | 20 ++++++++++---------- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/pr87045.f90 | 19 +++++++++++++++++++ 4 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/pr87045.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 281c29f..8264e59 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2019-03-13 Harald Anlauf + + PR fortran/87045 + * trans-expr.c (gfc_trans_pointer_assignment): Move check for same + string length so that we do not get false errors for deferred + length. + 2019-03-13 Janus Weil PR fortran/89601 diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 9019c55..9575f39 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -9278,16 +9278,6 @@ gfc_trans_pointer_assignment (gfc_expr * expr1, gfc_expr * expr2) } } - /* Check string lengths if applicable. The check is only really added - to the output code if -fbounds-check is enabled. */ - if (expr1->ts.type == BT_CHARACTER && expr2->expr_type != EXPR_NULL) - { - gcc_assert (expr2->ts.type == BT_CHARACTER); - gcc_assert (strlen_lhs && strlen_rhs); - gfc_trans_same_strlen_check ("pointer assignment", &expr1->where, - strlen_lhs, strlen_rhs, &block); - } - /* If rank remapping was done, check with -fcheck=bounds that the target is at least as large as the pointer. */ if (rank_remap && (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)) @@ -9322,6 +9312,16 @@ gfc_trans_pointer_assignment (gfc_expr * expr1, gfc_expr * expr2) gfc_add_modify (&block, tmp, build_zero_cst (TREE_TYPE (tmp))); } + /* Check string lengths if applicable. The check is only really added + to the output code if -fbounds-check is enabled. */ + if (expr1->ts.type == BT_CHARACTER && expr2->expr_type != EXPR_NULL) + { + gcc_assert (expr2->ts.type == BT_CHARACTER); + gcc_assert (strlen_lhs && strlen_rhs); + gfc_trans_same_strlen_check ("pointer assignment", &expr1->where, + strlen_lhs, strlen_rhs, &block); + } + gfc_add_block_to_block (&block, &lse.post); if (rank_remap) gfc_add_block_to_block (&block, &rse.post); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f4d25f1..b7550a2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-13 Harald Anlauf + + PR fortran/87045 + * gfortran.dg/pr87045.f90: New test. + 2019-03-13 Vladimir Makarov PR target/85860 diff --git a/gcc/testsuite/gfortran.dg/pr87045.f90 b/gcc/testsuite/gfortran.dg/pr87045.f90 new file mode 100644 index 0000000..46b11f9 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr87045.f90 @@ -0,0 +1,19 @@ +! { dg-do run } +! { dg-additional-options "-fcheck=bounds" } +! +! PR fortran/87045 - pointer to array of character +! Contributed by Valery Weber +! This used to give an invalid run-time error + +program test + character(:), dimension(:), allocatable, target :: t + character(:), pointer, dimension(:) :: p + allocate( character(3) :: t(2) ) + t(1) = "abc" + t(2) = "123" + p => t + if (size (p) /= 2) stop 1 + if (len (p) /= 3) stop 2 + if (p(1) /= "abc") stop 3 + if (p(2) /= "123") stop 4 +end program test -- cgit v1.1 From dcfa8518868d9eb836971c8ff315a048defc28ec Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 13 Mar 2019 19:34:51 -0400 Subject: PR c++/86521 - C++17 copy elision in initialization by constructor. This is an overlooked case in C++17 mandatory copy elision: We want overload resolution to reflect that initializing an object from a prvalue does not involve a copy or move constructor even when [over.match.ctor] says that only constructors are candidates. Here I implement that by looking through the copy/move constructor in joust. * call.c (joust_maybe_elide_copy): New. (joust): Call it. From-SVN: r269667 --- gcc/cp/ChangeLog | 6 ++++ gcc/cp/call.c | 53 ++++++++++++++++++++++++++++ gcc/testsuite/g++.dg/cpp0x/overload-conv-3.C | 2 +- gcc/testsuite/g++.dg/overload/conv-op2.C | 6 ++-- 4 files changed, 63 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ca8bc03..1164652 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2019-03-13 Jason Merrill + + PR c++/86521 - C++17 copy elision in initialization by constructor. + * call.c (joust_maybe_elide_copy): New. + (joust): Call it. + 2019-03-13 Marek Polacek PR c++/88979 - further P0634 fix for constructors. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index bf48ae2..d1f5055 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -10508,6 +10508,33 @@ add_warning (struct z_candidate *winner, struct z_candidate *loser) winner->warnings = cw; } +/* CAND is a constructor candidate in joust in C++17 and up. If it copies a + prvalue returned from a conversion function, replace CAND with the candidate + for the conversion and return true. Otherwise, return false. */ + +static bool +joust_maybe_elide_copy (z_candidate *&cand) +{ + tree fn = cand->fn; + if (!DECL_COPY_CONSTRUCTOR_P (fn) && !DECL_MOVE_CONSTRUCTOR_P (fn)) + return false; + conversion *conv = cand->convs[0]; + gcc_checking_assert (conv->kind == ck_ref_bind); + conv = next_conversion (conv); + if (conv->kind == ck_user && !TYPE_REF_P (conv->type)) + { + gcc_checking_assert (same_type_ignoring_top_level_qualifiers_p + (conv->type, DECL_CONTEXT (fn))); + z_candidate *uc = conv->cand; + if (DECL_CONV_FN_P (uc->fn)) + { + cand = uc; + return true; + } + } + return false; +} + /* Compare two candidates for overloading as described in [over.match.best]. Return values: @@ -10588,6 +10615,27 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn, } } + /* Handle C++17 copy elision in [over.match.ctor] (direct-init) context. The + standard currently says that only constructors are candidates, but if one + copies a prvalue returned by a conversion function we want to treat the + conversion as the candidate instead. + + Clang does something similar, as discussed at + http://lists.isocpp.org/core/2017/10/3166.php + http://lists.isocpp.org/core/2019/03/5721.php */ + int elided_tiebreaker = 0; + if (len == 1 && cxx_dialect >= cxx17 + && DECL_P (cand1->fn) + && DECL_COMPLETE_CONSTRUCTOR_P (cand1->fn) + && !(cand1->flags & LOOKUP_ONLYCONVERTING)) + { + bool elided1 = joust_maybe_elide_copy (cand1); + bool elided2 = joust_maybe_elide_copy (cand2); + /* As a tiebreaker below we will prefer a constructor to a conversion + operator exposed this way. */ + elided_tiebreaker = elided2 - elided1; + } + for (i = 0; i < len; ++i) { conversion *t1 = cand1->convs[i + off1]; @@ -10697,6 +10745,11 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn, if (winner) return winner; + /* Put this tiebreaker first, so that we don't try to look at second_conv of + a constructor candidate that doesn't have one. */ + if (elided_tiebreaker) + return elided_tiebreaker; + /* DR 495 moved this tiebreaker above the template ones. */ /* or, if not that, the context is an initialization by user-defined conversion (see diff --git a/gcc/testsuite/g++.dg/cpp0x/overload-conv-3.C b/gcc/testsuite/g++.dg/cpp0x/overload-conv-3.C index 42a135d..ae587f9 100644 --- a/gcc/testsuite/g++.dg/cpp0x/overload-conv-3.C +++ b/gcc/testsuite/g++.dg/cpp0x/overload-conv-3.C @@ -17,5 +17,5 @@ struct Source { int main() { Source x; - Dest d(move(x)); // { dg-error "ambiguous" } + Dest d(move(x)); // { dg-error "ambiguous" "" { target c++14_down } } } diff --git a/gcc/testsuite/g++.dg/overload/conv-op2.C b/gcc/testsuite/g++.dg/overload/conv-op2.C index e8e533b..cc5ebe7 100644 --- a/gcc/testsuite/g++.dg/overload/conv-op2.C +++ b/gcc/testsuite/g++.dg/overload/conv-op2.C @@ -1,5 +1,5 @@ // PR c++/81311 -// { dg-do link } +// { dg-do compile { target c++11 } } struct function { @@ -8,12 +8,12 @@ struct function struct ref { - operator function&() const; + operator function&() const = delete; } r; struct val { - operator function() const; + operator function() const = delete; } v; int main() -- cgit v1.1 From 7da0bca130c98fa219b81f58da44f5e1222b321a Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 14 Mar 2019 00:16:19 +0000 Subject: Daily bump. From-SVN: r269670 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 7e9d41b..0449c25 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20190313 +20190314 -- cgit v1.1 From 0ee285909bcef729415995e16c68e8713c59996f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 14 Mar 2019 09:13:09 +0100 Subject: re PR c++/89652 (ICE during constexpr evaluation) PR c++/89652 * constexpr.c (struct constexpr_ctx): Change save_exprs type from hash_set to vec. (cxx_eval_call_expression): Adjust for save_exprs being a vec instead of hash_set. (cxx_eval_loop_expr): Likewise. Truncate the vector after each removal of SAVE_EXPRs from values. (cxx_eval_constant_expression) : Call safe_push method on save_exprs instead of add. * g++.dg/cpp1y/constexpr-89652.C: New test. From-SVN: r269671 --- gcc/cp/ChangeLog | 12 ++++++++++ gcc/cp/constexpr.c | 30 +++++++++++++---------- gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/g++.dg/cpp1y/constexpr-89652.C | 36 ++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 13 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp1y/constexpr-89652.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1164652..7c0b4f4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,15 @@ +2019-03-14 Jakub Jelinek + + PR c++/89652 + * constexpr.c (struct constexpr_ctx): Change save_exprs type from + hash_set to vec. + (cxx_eval_call_expression): Adjust for save_exprs being a vec instead + of hash_set. + (cxx_eval_loop_expr): Likewise. Truncate the vector after each + removal of SAVE_EXPRs from values. + (cxx_eval_constant_expression) : Call safe_push + method on save_exprs instead of add. + 2019-03-13 Jason Merrill PR c++/86521 - C++17 copy elision in initialization by constructor. diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index b2b575d..68e78d0 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -1024,7 +1024,7 @@ struct constexpr_ctx { hash_map *values; /* SAVE_EXPRs that we've seen within the current LOOP_EXPR. NULL if we aren't inside a loop. */ - hash_set *save_exprs; + vec *save_exprs; /* The CONSTRUCTOR we're currently building up for an aggregate initializer. */ tree ctor; @@ -1831,7 +1831,7 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, /* Track the callee's evaluated SAVE_EXPRs so that we can forget their values after the call. */ constexpr_ctx ctx_with_save_exprs = *ctx; - hash_set save_exprs; + auto_vec save_exprs; ctx_with_save_exprs.save_exprs = &save_exprs; ctx_with_save_exprs.call = &new_call; @@ -1862,9 +1862,10 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, } /* Forget the saved values of the callee's SAVE_EXPRs. */ - for (hash_set::iterator iter = save_exprs.begin(); - iter != save_exprs.end(); ++iter) - ctx_with_save_exprs.values->remove (*iter); + unsigned int i; + tree save_expr; + FOR_EACH_VEC_ELT (save_exprs, i, save_expr) + ctx_with_save_exprs.values->remove (save_expr); /* Remove the parms/result from the values map. Is it worth bothering to do this when the map itself is only live for @@ -4190,7 +4191,7 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t, default: gcc_unreachable (); } - hash_set save_exprs; + auto_vec save_exprs; new_ctx.save_exprs = &save_exprs; do { @@ -4234,9 +4235,11 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t, } /* Forget saved values of SAVE_EXPRs. */ - for (hash_set::iterator iter = save_exprs.begin(); - iter != save_exprs.end(); ++iter) - new_ctx.values->remove (*iter); + unsigned int i; + tree save_expr; + FOR_EACH_VEC_ELT (save_exprs, i, save_expr) + new_ctx.values->remove (save_expr); + save_exprs.truncate (0); if (++count >= constexpr_loop_limit) { @@ -4256,9 +4259,10 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t, && !*non_constant_p); /* Forget saved values of SAVE_EXPRs. */ - for (hash_set::iterator iter = save_exprs.begin(); - iter != save_exprs.end(); ++iter) - new_ctx.values->remove (*iter); + unsigned int i; + tree save_expr; + FOR_EACH_VEC_ELT (save_exprs, i, save_expr) + new_ctx.values->remove (save_expr); return NULL_TREE; } @@ -4616,7 +4620,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t, non_constant_p, overflow_p); ctx->values->put (t, r); if (ctx->save_exprs) - ctx->save_exprs->add (t); + ctx->save_exprs->safe_push (t); } break; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b7550a2..73ac51a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-14 Jakub Jelinek + + PR c++/89652 + * g++.dg/cpp1y/constexpr-89652.C: New test. + 2019-03-13 Harald Anlauf PR fortran/87045 diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-89652.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-89652.C new file mode 100644 index 0000000..8d0631e --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-89652.C @@ -0,0 +1,36 @@ +// PR c++/89652 +// { dg-do compile { target c++14 } } +// { dg-options "" } + +template constexpr auto foo (T &e) { return e.foo (); } +template constexpr auto bar (T &e) { return foo (e); } +template struct A { typedef T a[N]; }; +template struct B { + typedef T *b; + typename A::a d; + constexpr b foo () { return d; } +}; +template struct C { long m; }; +struct D { long n; }; +template struct E { + B, 1>::b p; + constexpr D operator* () { return {p->m}; } + constexpr E operator++ (int) { auto a{*this}; ++p; return a; } +}; +template +constexpr bool operator!= (E a, E) { return a.p; } +template +constexpr auto baz (B s, B) +{ + B t{}; + auto q{foo (t)}; + using u = E; + auto v = u{bar (s)}; + auto w = u{}; + while (v != w) + *q++ = *v++; + return t; +} +constexpr auto a = B, 5>{}; +auto b = B{}; +auto c = baz (a, b); -- cgit v1.1 From b2725ea5df920e68591375847c0310254020eec7 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 14 Mar 2019 09:14:48 +0100 Subject: re PR c++/89512 (ICE in get_expr_operands, at tree-ssa-operands.c:882) PR c++/89512 * semantics.c (finish_qualified_id_expr): Reject variable templates. * g++.dg/cpp1y/var-templ61.C: New test. From-SVN: r269672 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/semantics.c | 8 ++++++++ gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/g++.dg/cpp1y/var-templ61.C | 20 ++++++++++++++++++++ 4 files changed, 34 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp1y/var-templ61.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7c0b4f4..054a891 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2019-03-14 Jakub Jelinek + PR c++/89512 + * semantics.c (finish_qualified_id_expr): Reject variable templates. + PR c++/89652 * constexpr.c (struct constexpr_ctx): Change save_exprs type from hash_set to vec. diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 798a2b3..fcf0606 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2112,6 +2112,14 @@ finish_qualified_id_expr (tree qualifying_class, expr = build_offset_ref (qualifying_class, expr, /*address_p=*/false, complain); } + else if (!template_p + && TREE_CODE (expr) == TEMPLATE_DECL + && !DECL_FUNCTION_TEMPLATE_P (expr)) + { + if (complain & tf_error) + error ("%qE missing template arguments", expr); + return error_mark_node; + } else { /* In a template, return a SCOPE_REF for most qualified-ids diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 73ac51a..dbd918c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-03-14 Jakub Jelinek + PR c++/89512 + * g++.dg/cpp1y/var-templ61.C: New test. + PR c++/89652 * g++.dg/cpp1y/constexpr-89652.C: New test. diff --git a/gcc/testsuite/g++.dg/cpp1y/var-templ61.C b/gcc/testsuite/g++.dg/cpp1y/var-templ61.C new file mode 100644 index 0000000..be2fe0f --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/var-templ61.C @@ -0,0 +1,20 @@ +// PR c++/89512 +// { dg-do compile { target c++14 } } + +struct A { + template + static const int a = 0; +}; + +struct B { + template + static int foo () + { + return T::a; // { dg-error "missing template arguments" } + } +}; + +int bar () +{ + return B::foo (); // { dg-message "required from here" } +} -- cgit v1.1 From fb055f4b745b1b56d84ad920508ebed2d22d3616 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 14 Mar 2019 08:49:54 +0000 Subject: x32: Add addr32 prefix to VSIB address 32-bit indices in VSIB address are sign-extended to 64 bits. In x32, when 32-bit indices are used as addresses, like in vgatherdps %ymm7, 0(,%ymm9,1), %ymm6 32-bit indices, 0xf7fa3010, is sign-extended to 0xfffffffff7fa3010 which is invalid address. Add addr32 prefix to UNSPEC_VSIBADDR instructions for x32 if there is no base register nor symbol. This fixes 175.vpr and 254.gap in SPEC CPU 2000 on x32 with -Ofast -funroll-loops -march=haswell gcc/ PR target/89523 * config/i386/i386.c (ix86_print_operand): Handle 'M' to add addr32 prefix to VSIB address for X32. * config/i386/sse.md (*avx512pf_gatherpfsf_mask): Prepend "%M2" to opcode. (*avx512pf_gatherpfdf_mask): Likewise. (*avx512pf_scatterpfsf_mask): Likewise. (*avx512pf_scatterpfdf_mask): Likewise. (*avx2_gathersi): Prepend "%M3" to opcode. (*avx2_gathersi_2): Prepend "%M2" to opcode. (*avx2_gatherdi): Prepend "%M3" to opcode. (*avx2_gatherdi_2): Prepend "%M2" to opcode. (*avx2_gatherdi_3): Prepend "%M3" to opcode. (*avx2_gatherdi_4): Prepend "%M2" to opcode.` (*avx512f_gathersi): Prepend "%M4" to opcode. (*avx512f_gathersi_2): Prepend "%M3" to opcode. (*avx512f_gatherdi): Prepend "%M4" to opcode. (*avx512f_gatherdi_2): Prepend "%M3" to opcode. (*avx512f_scattersi): Prepend "%M0" to opcode. (*avx512f_scatterdi): Likewise. gcc/testsuite/ PR target/89523 * gcc.target/i386/pr89523-1a.c: New test. * gcc.target/i386/pr89523-1b.c: Likewise. * gcc.target/i386/pr89523-2.c: Likewise. * gcc.target/i386/pr89523-3.c: Likewise. * gcc.target/i386/pr89523-4.c: Likewise. * gcc.target/i386/pr89523-5.c: Likewise. * gcc.target/i386/pr89523-6.c: Likewise. * gcc.target/i386/pr89523-7.c: Likewise. * gcc.target/i386/pr89523-8.c: Likewise. * gcc.target/i386/pr89523-9.c: Likewise. From-SVN: r269673 --- gcc/ChangeLog | 23 +++++++++++++++ gcc/config/i386/i386.c | 21 ++++++++++++++ gcc/config/i386/sse.md | 46 +++++++++++++++--------------- gcc/testsuite/ChangeLog | 14 +++++++++ gcc/testsuite/gcc.target/i386/pr89523-1a.c | 24 ++++++++++++++++ gcc/testsuite/gcc.target/i386/pr89523-1b.c | 7 +++++ gcc/testsuite/gcc.target/i386/pr89523-2.c | 37 ++++++++++++++++++++++++ gcc/testsuite/gcc.target/i386/pr89523-3.c | 36 +++++++++++++++++++++++ gcc/testsuite/gcc.target/i386/pr89523-4.c | 36 +++++++++++++++++++++++ gcc/testsuite/gcc.target/i386/pr89523-5.c | 39 +++++++++++++++++++++++++ gcc/testsuite/gcc.target/i386/pr89523-6.c | 38 ++++++++++++++++++++++++ gcc/testsuite/gcc.target/i386/pr89523-7.c | 42 +++++++++++++++++++++++++++ gcc/testsuite/gcc.target/i386/pr89523-8.c | 41 ++++++++++++++++++++++++++ gcc/testsuite/gcc.target/i386/pr89523-9.c | 30 +++++++++++++++++++ 14 files changed, 411 insertions(+), 23 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr89523-1a.c create mode 100644 gcc/testsuite/gcc.target/i386/pr89523-1b.c create mode 100644 gcc/testsuite/gcc.target/i386/pr89523-2.c create mode 100644 gcc/testsuite/gcc.target/i386/pr89523-3.c create mode 100644 gcc/testsuite/gcc.target/i386/pr89523-4.c create mode 100644 gcc/testsuite/gcc.target/i386/pr89523-5.c create mode 100644 gcc/testsuite/gcc.target/i386/pr89523-6.c create mode 100644 gcc/testsuite/gcc.target/i386/pr89523-7.c create mode 100644 gcc/testsuite/gcc.target/i386/pr89523-8.c create mode 100644 gcc/testsuite/gcc.target/i386/pr89523-9.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index baed65f..927fd9e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,26 @@ +2019-03-14 H.J. Lu + + PR target/89523 + * config/i386/i386.c (ix86_print_operand): Handle 'M' to add + addr32 prefix to VSIB address for X32. + * config/i386/sse.md (*avx512pf_gatherpfsf_mask): Prepend + "%M2" to opcode. + (*avx512pf_gatherpfdf_mask): Likewise. + (*avx512pf_scatterpfsf_mask): Likewise. + (*avx512pf_scatterpfdf_mask): Likewise. + (*avx2_gathersi): Prepend "%M3" to opcode. + (*avx2_gathersi_2): Prepend "%M2" to opcode. + (*avx2_gatherdi): Prepend "%M3" to opcode. + (*avx2_gatherdi_2): Prepend "%M2" to opcode. + (*avx2_gatherdi_3): Prepend "%M3" to opcode. + (*avx2_gatherdi_4): Prepend "%M2" to opcode.` + (*avx512f_gathersi): Prepend "%M4" to opcode. + (*avx512f_gathersi_2): Prepend "%M3" to opcode. + (*avx512f_gatherdi): Prepend "%M4" to opcode. + (*avx512f_gatherdi_2): Prepend "%M3" to opcode. + (*avx512f_scattersi): Prepend "%M0" to opcode. + (*avx512f_scatterdi): Likewise. + 2019-03-13 Vladimir Makarov PR target/85860 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index fe45907..1f94a45 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -17813,6 +17813,7 @@ print_reg (rtx x, int code, FILE *file) ; -- print a semicolon (after prefixes due to bug in older gas). ~ -- print "i" if TARGET_AVX2, "f" otherwise. ^ -- print addr32 prefix if TARGET_64BIT and Pmode != word_mode + M -- print addr32 prefix for TARGET_X32 with VSIB address. ! -- print NOTRACK prefix for jxx/call/ret instructions if required. */ @@ -18360,6 +18361,26 @@ ix86_print_operand (FILE *file, rtx x, int code) putc (TARGET_AVX2 ? 'i' : 'f', file); return; + case 'M': + if (TARGET_X32) + { + /* NB: 32-bit indices in VSIB address are sign-extended + to 64 bits. In x32, if 32-bit address 0xf7fa3010 is + sign-extended to 0xfffffffff7fa3010 which is invalid + address. Add addr32 prefix if there is no base + register nor symbol. */ + bool ok; + struct ix86_address parts; + ok = ix86_decompose_address (x, &parts); + gcc_assert (ok && parts.index == NULL_RTX); + if (parts.base == NULL_RTX + && (parts.disp == NULL_RTX + || !symbolic_operand (parts.disp, + GET_MODE (parts.disp)))) + fputs ("addr32 ", file); + } + return; + case '^': if (TARGET_64BIT && Pmode != word_mode) fputs ("addr32 ", file); diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index d4c0140..86bf866 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -17486,9 +17486,9 @@ case 3: /* %X5 so that we don't emit any *WORD PTR for -masm=intel, as gas changed what it requires incompatibly. */ - return "vgatherpf0ps\t{%5%{%0%}|%X5%{%0%}}"; + return "%M2vgatherpf0ps\t{%5%{%0%}|%X5%{%0%}}"; case 2: - return "vgatherpf1ps\t{%5%{%0%}|%X5%{%0%}}"; + return "%M2vgatherpf1ps\t{%5%{%0%}|%X5%{%0%}}"; default: gcc_unreachable (); } @@ -17533,9 +17533,9 @@ case 3: /* %X5 so that we don't emit any *WORD PTR for -masm=intel, as gas changed what it requires incompatibly. */ - return "vgatherpf0pd\t{%5%{%0%}|%X5%{%0%}}"; + return "%M2vgatherpf0pd\t{%5%{%0%}|%X5%{%0%}}"; case 2: - return "vgatherpf1pd\t{%5%{%0%}|%X5%{%0%}}"; + return "%M2vgatherpf1pd\t{%5%{%0%}|%X5%{%0%}}"; default: gcc_unreachable (); } @@ -17581,10 +17581,10 @@ case 7: /* %X5 so that we don't emit any *WORD PTR for -masm=intel, as gas changed what it requires incompatibly. */ - return "vscatterpf0ps\t{%5%{%0%}|%X5%{%0%}}"; + return "%M2vscatterpf0ps\t{%5%{%0%}|%X5%{%0%}}"; case 2: case 6: - return "vscatterpf1ps\t{%5%{%0%}|%X5%{%0%}}"; + return "%M2vscatterpf1ps\t{%5%{%0%}|%X5%{%0%}}"; default: gcc_unreachable (); } @@ -17630,10 +17630,10 @@ case 7: /* %X5 so that we don't emit any *WORD PTR for -masm=intel, as gas changed what it requires incompatibly. */ - return "vscatterpf0pd\t{%5%{%0%}|%X5%{%0%}}"; + return "%M2vscatterpf0pd\t{%5%{%0%}|%X5%{%0%}}"; case 2: case 6: - return "vscatterpf1pd\t{%5%{%0%}|%X5%{%0%}}"; + return "%M2vscatterpf1pd\t{%5%{%0%}|%X5%{%0%}}"; default: gcc_unreachable (); } @@ -20377,7 +20377,7 @@ UNSPEC_GATHER)) (clobber (match_scratch:VEC_GATHER_MODE 1 "=&x"))] "TARGET_AVX2" - "vgatherd\t{%1, %7, %0|%0, %7, %1}" + "%M3vgatherd\t{%1, %7, %0|%0, %7, %1}" [(set_attr "type" "ssemov") (set_attr "prefix" "vex") (set_attr "mode" "")]) @@ -20397,7 +20397,7 @@ UNSPEC_GATHER)) (clobber (match_scratch:VEC_GATHER_MODE 1 "=&x"))] "TARGET_AVX2" - "vgatherd\t{%1, %6, %0|%0, %6, %1}" + "%M2vgatherd\t{%1, %6, %0|%0, %6, %1}" [(set_attr "type" "ssemov") (set_attr "prefix" "vex") (set_attr "mode" "")]) @@ -20438,7 +20438,7 @@ UNSPEC_GATHER)) (clobber (match_scratch:VEC_GATHER_MODE 1 "=&x"))] "TARGET_AVX2" - "vgatherq\t{%5, %7, %2|%2, %7, %5}" + "%M3vgatherq\t{%5, %7, %2|%2, %7, %5}" [(set_attr "type" "ssemov") (set_attr "prefix" "vex") (set_attr "mode" "")]) @@ -20460,8 +20460,8 @@ "TARGET_AVX2" { if (mode != mode) - return "vgatherq\t{%4, %6, %x0|%x0, %6, %4}"; - return "vgatherq\t{%4, %6, %0|%0, %6, %4}"; + return "%M2vgatherq\t{%4, %6, %x0|%x0, %6, %4}"; + return "%M2vgatherq\t{%4, %6, %0|%0, %6, %4}"; } [(set_attr "type" "ssemov") (set_attr "prefix" "vex") @@ -20485,7 +20485,7 @@ (const_int 2) (const_int 3)]))) (clobber (match_scratch:VI4F_256 1 "=&x"))] "TARGET_AVX2" - "vgatherq\t{%5, %7, %0|%0, %7, %5}" + "%M3vgatherq\t{%5, %7, %0|%0, %7, %5}" [(set_attr "type" "ssemov") (set_attr "prefix" "vex") (set_attr "mode" "")]) @@ -20508,7 +20508,7 @@ (const_int 2) (const_int 3)]))) (clobber (match_scratch:VI4F_256 1 "=&x"))] "TARGET_AVX2" - "vgatherq\t{%4, %6, %0|%0, %6, %4}" + "%M2vgatherq\t{%4, %6, %0|%0, %6, %4}" [(set_attr "type" "ssemov") (set_attr "prefix" "vex") (set_attr "mode" "")]) @@ -20548,7 +20548,7 @@ "TARGET_AVX512F" ;; %X6 so that we don't emit any *WORD PTR for -masm=intel, as ;; gas changed what it requires incompatibly. - "vgatherd\t{%6, %0%{%2%}|%0%{%2%}, %X6}" + "%M4vgatherd\t{%6, %0%{%2%}|%0%{%2%}, %X6}" [(set_attr "type" "ssemov") (set_attr "prefix" "evex") (set_attr "mode" "")]) @@ -20569,7 +20569,7 @@ "TARGET_AVX512F" ;; %X5 so that we don't emit any *WORD PTR for -masm=intel, as ;; gas changed what it requires incompatibly. - "vgatherd\t{%5, %0%{%1%}|%0%{%1%}, %X5}" + "%M3vgatherd\t{%5, %0%{%1%}|%0%{%1%}, %X5}" [(set_attr "type" "ssemov") (set_attr "prefix" "evex") (set_attr "mode" "")]) @@ -20610,7 +20610,7 @@ "TARGET_AVX512F" ;; %X6 so that we don't emit any *WORD PTR for -masm=intel, as ;; gas changed what it requires incompatibly. - "vgatherq\t{%6, %1%{%2%}|%1%{%2%}, %X6}" + "%M4vgatherq\t{%6, %1%{%2%}|%1%{%2%}, %X6}" [(set_attr "type" "ssemov") (set_attr "prefix" "evex") (set_attr "mode" "")]) @@ -20635,11 +20635,11 @@ if (mode != mode) { if ( != 64) - return "vgatherq\t{%5, %x0%{%1%}|%x0%{%1%}, %X5}"; + return "%M3vgatherq\t{%5, %x0%{%1%}|%x0%{%1%}, %X5}"; else - return "vgatherq\t{%5, %t0%{%1%}|%t0%{%1%}, %X5}"; + return "%M3vgatherq\t{%5, %t0%{%1%}|%t0%{%1%}, %X5}"; } - return "vgatherq\t{%5, %0%{%1%}|%0%{%1%}, %X5}"; + return "%M3vgatherq\t{%5, %0%{%1%}|%0%{%1%}, %X5}"; } [(set_attr "type" "ssemov") (set_attr "prefix" "evex") @@ -20678,7 +20678,7 @@ "TARGET_AVX512F" ;; %X5 so that we don't emit any *WORD PTR for -masm=intel, as ;; gas changed what it requires incompatibly. - "vscatterd\t{%3, %5%{%1%}|%X5%{%1%}, %3}" + "%M0vscatterd\t{%3, %5%{%1%}|%X5%{%1%}, %3}" [(set_attr "type" "ssemov") (set_attr "prefix" "evex") (set_attr "mode" "")]) @@ -20716,7 +20716,7 @@ "TARGET_AVX512F" ;; %X5 so that we don't emit any *WORD PTR for -masm=intel, as ;; gas changed what it requires incompatibly. - "vscatterq\t{%3, %5%{%1%}|%X5%{%1%}, %3}" + "%M0vscatterq\t{%3, %5%{%1%}|%X5%{%1%}, %3}" [(set_attr "type" "ssemov") (set_attr "prefix" "evex") (set_attr "mode" "")]) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dbd918c..0776c67 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,17 @@ +2019-03-14 H.J. Lu + + PR target/89523 + * gcc.target/i386/pr89523-1a.c: New test. + * gcc.target/i386/pr89523-1b.c: Likewise. + * gcc.target/i386/pr89523-2.c: Likewise. + * gcc.target/i386/pr89523-3.c: Likewise. + * gcc.target/i386/pr89523-4.c: Likewise. + * gcc.target/i386/pr89523-5.c: Likewise. + * gcc.target/i386/pr89523-6.c: Likewise. + * gcc.target/i386/pr89523-7.c: Likewise. + * gcc.target/i386/pr89523-8.c: Likewise. + * gcc.target/i386/pr89523-9.c: Likewise. + 2019-03-14 Jakub Jelinek PR c++/89512 diff --git a/gcc/testsuite/gcc.target/i386/pr89523-1a.c b/gcc/testsuite/gcc.target/i386/pr89523-1a.c new file mode 100644 index 0000000..0d0edab --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89523-1a.c @@ -0,0 +1,24 @@ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-maddress-mode=short -mx32 -Ofast -funroll-loops -march=haswell" } */ +/* { dg-final { scan-assembler-not "\tvgather" } } */ +/* { dg-final { scan-assembler "addr32 vgather" } } */ + +void foo (void); + +extern float *ncost; + +float +bar (int type, int num) +{ + int i; + float cost; + + cost = 0; + for (i = 0; i < num; i++) + if (type) + cost += ncost[i]; + else + foo (); + return (cost); +} diff --git a/gcc/testsuite/gcc.target/i386/pr89523-1b.c b/gcc/testsuite/gcc.target/i386/pr89523-1b.c new file mode 100644 index 0000000..6a5c1d4 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89523-1b.c @@ -0,0 +1,7 @@ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-maddress-mode=long -mx32 -Ofast -funroll-loops -march=haswell" } */ +/* { dg-final { scan-assembler-not "\tvgather" } } */ +/* { dg-final { scan-assembler "addr32 vgather" } } */ + +#include "pr89523-1a.c" diff --git a/gcc/testsuite/gcc.target/i386/pr89523-2.c b/gcc/testsuite/gcc.target/i386/pr89523-2.c new file mode 100644 index 0000000..2ffbffe --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89523-2.c @@ -0,0 +1,37 @@ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-mx32 -O2 -march=haswell" } */ +/* { dg-final { scan-assembler "\tvgather" } } */ +/* { dg-final { scan-assembler-not "addr32 vgather" } } */ + +typedef double __v2df __attribute__ ((__vector_size__ (16))); +typedef int __v4si __attribute__ ((__vector_size__ (16))); +typedef long long __v2di __attribute__ ((__vector_size__ (16))); + +typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); +typedef double __m128d __attribute__ ((__vector_size__ (16), __may_alias__)); + +extern __inline __m128d +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_i32gather_pd (double const *__base, __m128i __index, const int __scale) +{ + __v2df __zero = { 0.0, 0.0 }; + __v2df __mask = __builtin_ia32_cmpeqpd (__zero, __zero); + __v2df x = x; + + return (__m128d) __builtin_ia32_gathersiv2df (x, + __base, + (__v4si)__index, + __mask, + __scale); +} + +__m128d x; +double *base; +__m128i idx; + +void extern +avx2_test (void) +{ + x = _mm_i32gather_pd (base, idx, 1); +} diff --git a/gcc/testsuite/gcc.target/i386/pr89523-3.c b/gcc/testsuite/gcc.target/i386/pr89523-3.c new file mode 100644 index 0000000..fc3631b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89523-3.c @@ -0,0 +1,36 @@ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-mx32 -O2 -march=haswell" } */ +/* { dg-final { scan-assembler "\tvgather" } } */ +/* { dg-final { scan-assembler-not "addr32 vgather" } } */ + +typedef double __v2df __attribute__ ((__vector_size__ (16))); +typedef int __v4si __attribute__ ((__vector_size__ (16))); +typedef long long __v2di __attribute__ ((__vector_size__ (16))); + +typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); +typedef double __m128d __attribute__ ((__vector_size__ (16), __may_alias__)); + +extern __inline __m128d +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_i64gather_pd (double const *__base, __m128i __index, const int __scale) +{ + __v2df __zero = { 0.0, 0.0 }; + __v2df __mask = __builtin_ia32_cmpeqpd (__zero, __zero); + + return (__m128d) __builtin_ia32_gatherdiv2df (__zero, + __base, + (__v2di)__index, + __mask, + __scale); +} + +__m128d x; +double *base; +__m128i idx; + +void extern +avx2_test (void) +{ + x = _mm_i64gather_pd (base, idx, 1); +} diff --git a/gcc/testsuite/gcc.target/i386/pr89523-4.c b/gcc/testsuite/gcc.target/i386/pr89523-4.c new file mode 100644 index 0000000..3436e5d --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89523-4.c @@ -0,0 +1,36 @@ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-mx32 -O2 -march=haswell" } */ +/* { dg-final { scan-assembler-not "\tvgather" } } */ +/* { dg-final { scan-assembler "addr32 vgather" } } */ + +typedef double __v2df __attribute__ ((__vector_size__ (16))); +typedef int __v4si __attribute__ ((__vector_size__ (16))); +typedef long long __v2di __attribute__ ((__vector_size__ (16))); + +typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); +typedef double __m128d __attribute__ ((__vector_size__ (16), __may_alias__)); + +extern __inline __m128d +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_i32gather_pd (double const *__base, __m128i __index, const int __scale) +{ + __v2df __zero = { 0.0, 0.0 }; + __v2df __mask = __builtin_ia32_cmpeqpd (__zero, __zero); + __v2df x = x; + + return (__m128d) __builtin_ia32_gathersiv2df (x, + __base, + (__v4si)__index, + __mask, + __scale); +} + +__m128d x; +__m128i idx; + +void extern +avx2_test (void) +{ + x = _mm_i32gather_pd ((void *) 0, idx, 1); +} diff --git a/gcc/testsuite/gcc.target/i386/pr89523-5.c b/gcc/testsuite/gcc.target/i386/pr89523-5.c new file mode 100644 index 0000000..6a769c7 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89523-5.c @@ -0,0 +1,39 @@ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-mx32 -O2 -mavx512pf" } */ +/* { dg-final { scan-assembler "\tvgather" } } */ +/* { dg-final { scan-assembler-not "addr32 vgather" } } */ + +typedef int __v8si __attribute__ ((__vector_size__ (32))); +typedef long long __m256i __attribute__ ((__vector_size__ (32), + __may_alias__)); +typedef unsigned char __mmask8; + +extern __inline void +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm512_prefetch_i32gather_pd (__m256i __index, void const *__addr, + int __scale, int __hint) +{ + __builtin_ia32_gatherpfdpd ((__mmask8) 0xFF, (__v8si) __index, __addr, + __scale, __hint); +} + +extern __inline void +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm512_mask_prefetch_i32gather_pd (__m256i __index, __mmask8 __mask, + void const *__addr, int __scale, int __hint) +{ + __builtin_ia32_gatherpfdpd (__mask, (__v8si) __index, __addr, __scale, + __hint); +} + +volatile __m256i idx; +volatile __mmask8 m8; +void *base; + +void extern +avx512pf_test (void) +{ + _mm512_prefetch_i32gather_pd (idx, base, 8, 3); + _mm512_mask_prefetch_i32gather_pd (idx, m8, base, 8, 3); +} diff --git a/gcc/testsuite/gcc.target/i386/pr89523-6.c b/gcc/testsuite/gcc.target/i386/pr89523-6.c new file mode 100644 index 0000000..82f795e --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89523-6.c @@ -0,0 +1,38 @@ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-mx32 -O2 -mavx512pf" } */ +/* { dg-final { scan-assembler-not "\tvgather" } } */ +/* { dg-final { scan-assembler "addr32 vgather" } } */ + +typedef int __v8si __attribute__ ((__vector_size__ (32))); +typedef long long __m256i __attribute__ ((__vector_size__ (32), + __may_alias__)); +typedef unsigned char __mmask8; + +extern __inline void +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm512_prefetch_i32gather_pd (__m256i __index, void const *__addr, + int __scale, int __hint) +{ + __builtin_ia32_gatherpfdpd ((__mmask8) 0xFF, (__v8si) __index, __addr, + __scale, __hint); +} + +extern __inline void +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm512_mask_prefetch_i32gather_pd (__m256i __index, __mmask8 __mask, + void const *__addr, int __scale, int __hint) +{ + __builtin_ia32_gatherpfdpd (__mask, (__v8si) __index, __addr, __scale, + __hint); +} + +volatile __m256i idx; +volatile __mmask8 m8; + +void extern +avx512pf_test (void) +{ + _mm512_prefetch_i32gather_pd (idx, (void *) 0, 8, 3); + _mm512_mask_prefetch_i32gather_pd (idx, m8, (void *) 0, 8, 3); +} diff --git a/gcc/testsuite/gcc.target/i386/pr89523-7.c b/gcc/testsuite/gcc.target/i386/pr89523-7.c new file mode 100644 index 0000000..030b00d --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89523-7.c @@ -0,0 +1,42 @@ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-mx32 -O2 -mavx512f" } */ +/* { dg-final { scan-assembler "\tvscatter" } } */ +/* { dg-final { scan-assembler-not "addr32 vscatter" } } */ + +typedef int __v8si __attribute__ ((__vector_size__ (32))); +typedef double __v8df __attribute__ ((__vector_size__ (64))); +typedef long long __m256i __attribute__ ((__vector_size__ (32), + __may_alias__)); +typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__)); +typedef unsigned char __mmask8; + +extern __inline void +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm512_i32scatter_pd (void *__addr, __m256i __index, __m512d __v1, + int __scale) +{ + __builtin_ia32_scattersiv8df (__addr, (__mmask8) 0xFF, + (__v8si) __index, (__v8df) __v1, __scale); +} + +extern __inline void +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm512_mask_i32scatter_pd (void *__addr, __mmask8 __mask, + __m256i __index, __m512d __v1, int __scale) +{ + __builtin_ia32_scattersiv8df (__addr, __mask, (__v8si) __index, + (__v8df) __v1, __scale); +} + +volatile __m512d src; +volatile __m256i idx; +volatile __mmask8 m8; +double *addr; + +void extern +avx512f_test (void) +{ + _mm512_i32scatter_pd (addr, idx, src, 8); + _mm512_mask_i32scatter_pd (addr, m8, idx, src, 8); +} diff --git a/gcc/testsuite/gcc.target/i386/pr89523-8.c b/gcc/testsuite/gcc.target/i386/pr89523-8.c new file mode 100644 index 0000000..465c985 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89523-8.c @@ -0,0 +1,41 @@ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-mx32 -O2 -mavx512f" } */ +/* { dg-final { scan-assembler "\tvscatter" } } */ +/* { dg-final { scan-assembler-not "addr32 vscatter" } } */ + +typedef long long __v8di __attribute__ ((__vector_size__ (64))); +typedef double __v8df __attribute__ ((__vector_size__ (64))); +typedef long long __m512i __attribute__ ((__vector_size__ (64), __may_alias__)); +typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__)); +typedef unsigned char __mmask8; + +extern __inline void +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm512_i64scatter_pd (void *__addr, __m512i __index, __m512d __v1, + int __scale) +{ + __builtin_ia32_scatterdiv8df (__addr, (__mmask8) 0xFF, + (__v8di) __index, (__v8df) __v1, __scale); +} + +extern __inline void +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm512_mask_i64scatter_pd (void *__addr, __mmask8 __mask, + __m512i __index, __m512d __v1, int __scale) +{ + __builtin_ia32_scatterdiv8df (__addr, __mask, (__v8di) __index, + (__v8df) __v1, __scale); +} + +volatile __m512d src; +volatile __m512i idx; +volatile __mmask8 m8; +double *addr; + +void extern +avx512f_test (void) +{ + _mm512_i64scatter_pd (addr, idx, src, 8); + _mm512_mask_i64scatter_pd (addr, m8, idx, src, 8); +} diff --git a/gcc/testsuite/gcc.target/i386/pr89523-9.c b/gcc/testsuite/gcc.target/i386/pr89523-9.c new file mode 100644 index 0000000..e932312 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89523-9.c @@ -0,0 +1,30 @@ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-mx32 -O2 -mavx512f" } */ +/* { dg-final { scan-assembler-not "\tvscatter" } } */ +/* { dg-final { scan-assembler "addr32 vscatter" } } */ + +typedef int __v8si __attribute__ ((__vector_size__ (32))); +typedef double __v8df __attribute__ ((__vector_size__ (64))); +typedef long long __m256i __attribute__ ((__vector_size__ (32), + __may_alias__)); +typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__)); +typedef unsigned char __mmask8; + +extern __inline void +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm512_i32scatter_pd (void *__addr, __m256i __index, __m512d __v1, + int __scale) +{ + __builtin_ia32_scattersiv8df (__addr, (__mmask8) 0xFF, + (__v8si) __index, (__v8df) __v1, __scale); +} + +volatile __m512d src; +volatile __m256i idx; + +void extern +avx512f_test (void) +{ + _mm512_i32scatter_pd ((void *) 0, idx, src, 8); +} -- cgit v1.1 From f54e63dfa34c4c9922a4cb35d2f8c28c92135b8c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 14 Mar 2019 09:56:47 +0100 Subject: re PR tree-optimization/89703 (ICE in compare_values_warnv, at tree-vrp.c:997) PR tree-optimization/89703 * tree-ssa-strlen.c (valid_builtin_call): Punt if stmt call types aren't compatible also with builtin_decl_explicit. Check pure or non-pure status of BUILT_IN_STR{{,N}CMP,N{LEN,{CAT,CPY}{,_CHK}}} and BUILT_IN_STPNCPY{,_CHK}. * gcc.c-torture/compile/pr89703-1.c: New test. * gcc.c-torture/compile/pr89703-2.c: New test. From-SVN: r269674 --- gcc/ChangeLog | 8 ++++++++ gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.c-torture/compile/pr89703-1.c | 13 +++++++++++++ gcc/testsuite/gcc.c-torture/compile/pr89703-2.c | 13 +++++++++++++ gcc/tree-ssa-strlen.c | 15 +++++++++++++++ 5 files changed, 55 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr89703-1.c create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr89703-2.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 927fd9e..8c3a6b9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-03-14 Jakub Jelinek + + PR tree-optimization/89703 + * tree-ssa-strlen.c (valid_builtin_call): Punt if stmt call types + aren't compatible also with builtin_decl_explicit. Check pure + or non-pure status of BUILT_IN_STR{{,N}CMP,N{LEN,{CAT,CPY}{,_CHK}}} + and BUILT_IN_STPNCPY{,_CHK}. + 2019-03-14 H.J. Lu PR target/89523 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0776c67..db45dc4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-14 Jakub Jelinek + + PR tree-optimization/89703 + * gcc.c-torture/compile/pr89703-1.c: New test. + * gcc.c-torture/compile/pr89703-2.c: New test. + 2019-03-14 H.J. Lu PR target/89523 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr89703-1.c b/gcc/testsuite/gcc.c-torture/compile/pr89703-1.c new file mode 100644 index 0000000..958cc77 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr89703-1.c @@ -0,0 +1,13 @@ +/* PR tree-optimization/89703 */ + +typedef __SIZE_TYPE__ size_t; +extern char *strlen (const char *); +extern char *strnlen (const char *, size_t); +extern char c[2]; + +void +foo (char **q) +{ + q[0] = strlen (c); + q[1] = strnlen (c, 2); +} diff --git a/gcc/testsuite/gcc.c-torture/compile/pr89703-2.c b/gcc/testsuite/gcc.c-torture/compile/pr89703-2.c new file mode 100644 index 0000000..d2676de --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr89703-2.c @@ -0,0 +1,13 @@ +/* PR tree-optimization/89703 */ + +typedef __SIZE_TYPE__ size_t; +extern void *memcpy (void *, const void *, size_t); +extern char *strlen (const char *); +extern char c[2]; + +void +foo (char **q) +{ + memcpy (c, "a", 2); + q[0] = strlen (c); +} diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index 721832e..1eaed66 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tree-ssa-strlen.c @@ -971,12 +971,21 @@ valid_builtin_call (gimple *stmt) return false; tree callee = gimple_call_fndecl (stmt); + tree decl = builtin_decl_explicit (DECL_FUNCTION_CODE (callee)); + if (decl + && decl != callee + && !gimple_builtin_call_types_compatible_p (stmt, decl)) + return false; + switch (DECL_FUNCTION_CODE (callee)) { case BUILT_IN_MEMCMP: case BUILT_IN_MEMCMP_EQ: + case BUILT_IN_STRCMP: + case BUILT_IN_STRNCMP: case BUILT_IN_STRCHR: case BUILT_IN_STRLEN: + case BUILT_IN_STRNLEN: /* The above functions should be pure. Punt if they aren't. */ if (gimple_vdef (stmt) || gimple_vuse (stmt) == NULL_TREE) return false; @@ -991,10 +1000,16 @@ valid_builtin_call (gimple *stmt) case BUILT_IN_MEMSET: case BUILT_IN_STPCPY: case BUILT_IN_STPCPY_CHK: + case BUILT_IN_STPNCPY: + case BUILT_IN_STPNCPY_CHK: case BUILT_IN_STRCAT: case BUILT_IN_STRCAT_CHK: case BUILT_IN_STRCPY: case BUILT_IN_STRCPY_CHK: + case BUILT_IN_STRNCAT: + case BUILT_IN_STRNCAT_CHK: + case BUILT_IN_STRNCPY: + case BUILT_IN_STRNCPY_CHK: /* The above functions should be neither const nor pure. Punt if they aren't. */ if (gimple_vdef (stmt) == NULL_TREE || gimple_vuse (stmt) == NULL_TREE) -- cgit v1.1 From ea9d9d749c3203e9fb01267fabecad93b7f1c06c Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 14 Mar 2019 09:24:21 +0000 Subject: re PR c++/89698 (Run-time error due to optimization of field access after cast at -Os/-O2 and higher) 2019-03-14 Richard Biener PR middle-end/89698 * fold-const.c (operand_equal_p): For INDIRECT_REF check that the access types are similar. * g++.dg/torture/pr89698.C: New testcase. From-SVN: r269677 --- gcc/ChangeLog | 6 ++++++ gcc/fold-const.c | 14 ++++++++++---- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/torture/pr89698.C | 28 ++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/g++.dg/torture/pr89698.C (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8c3a6b9..2d2495c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-14 Richard Biener + + PR middle-end/89698 + * fold-const.c (operand_equal_p): For INDIRECT_REF check + that the access types are similar. + 2019-03-14 Jakub Jelinek PR tree-optimization/89703 diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 571566a..dbc9679 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3220,10 +3220,16 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags) switch (TREE_CODE (arg0)) { case INDIRECT_REF: - if (!(flags & OEP_ADDRESS_OF) - && (TYPE_ALIGN (TREE_TYPE (arg0)) - != TYPE_ALIGN (TREE_TYPE (arg1)))) - return 0; + if (!(flags & OEP_ADDRESS_OF)) + { + if (TYPE_ALIGN (TREE_TYPE (arg0)) + != TYPE_ALIGN (TREE_TYPE (arg1))) + return 0; + /* Verify that the access types are compatible. */ + if (TYPE_MAIN_VARIANT (TREE_TYPE (arg0)) + != TYPE_MAIN_VARIANT (TREE_TYPE (arg1))) + return 0; + } flags &= ~OEP_ADDRESS_OF; return OP_SAME (0); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index db45dc4..b0f9efa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-14 Richard Biener + + PR middle-end/89698 + * g++.dg/torture/pr89698.C: New testcase. + 2019-03-14 Jakub Jelinek PR tree-optimization/89703 diff --git a/gcc/testsuite/g++.dg/torture/pr89698.C b/gcc/testsuite/g++.dg/torture/pr89698.C new file mode 100644 index 0000000..fbeb797 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr89698.C @@ -0,0 +1,28 @@ +/* { dg-do run } */ + +extern "C" void abort (void); + +class A { + virtual void f(){}; +public: + int x; + A(int in): x(in) {}; +}; + +class B: public A { +public: + int y; + B(int in):A(in-1), y(in) {}; +}; + +int test(void) +{ + int res; + B b(2); + A* bp = &b; + void* vp = dynamic_cast(bp); + if (((A*)vp)->x == 1 && ((B*)vp)->y == 2) + return 1; + return 0; +} +int main() { if (test() != 1) abort (); return 0; } -- cgit v1.1 From b81547179688b601af97fc2185489dbea1cd86b2 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 14 Mar 2019 10:33:54 +0100 Subject: GCOV: print {start,end}_column in JSON file and gcov-dump tool. 2019-03-14 Martin Liska * coverage.c (coverage_begin_function): Stream also end_column. * doc/gcov.texi: Document 2 new fields in JSON file. Improve documentation about function declaration location. * gcov-dump.c (tag_function): Print whole range of function declaration. * gcov.c (struct function_info): Add end_column field. (function_info::function_info): Initialize it. (output_json_intermediate_file): Output {start,end}_column fields. (read_graph_file): Read end_column. From-SVN: r269678 --- gcc/ChangeLog | 14 ++++++++++++++ gcc/coverage.c | 2 ++ gcc/doc/gcov.texi | 15 ++++++++++++++- gcc/gcov-dump.c | 4 +++- gcc/gcov.c | 10 +++++++++- 5 files changed, 42 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2d2495c..86a2319 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2019-03-14 Martin Liska + + * coverage.c (coverage_begin_function): Stream also + end_column. + * doc/gcov.texi: Document 2 new fields in JSON file. Improve + documentation about function declaration location. + * gcov-dump.c (tag_function): Print whole range + of function declaration. + * gcov.c (struct function_info): Add end_column field. + (function_info::function_info): Initialize it. + (output_json_intermediate_file): Output {start,end}_column + fields. + (read_graph_file): Read end_column. + 2019-03-14 Richard Biener PR middle-end/89698 diff --git a/gcc/coverage.c b/gcc/coverage.c index a34c5da..1ffefd5 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -652,8 +652,10 @@ coverage_begin_function (unsigned lineno_checksum, unsigned cfg_checksum) /* Function can start in a single file and end in another one. */ int end_line = endloc.file == xloc.file ? endloc.line : xloc.line; + int end_column = endloc.file == xloc.file ? endloc.column: xloc.column; gcc_assert (xloc.line <= end_line); gcov_write_unsigned (end_line); + gcov_write_unsigned (end_column); gcov_write_length (offset); return !gcov_is_error (); diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi index 0960e4a..ecad5d1 100644 --- a/gcc/doc/gcov.texi +++ b/gcc/doc/gcov.texi @@ -236,9 +236,11 @@ Each @var{function} has the following form: "blocks": @var{blocks}, "blocks_executed": @var{blocks_executed}, "demangled_name": "@var{demangled_name}, + "end_column": @var{end_column}, "end_line": @var{end_line}, "execution_count": @var{execution_count}, "name": @var{name}, + "start_column": @var{start_column} "start_line": @var{start_line} @} @end smallexample @@ -256,6 +258,9 @@ Fields of the @var{function} element have following semantics: @var{demangled_name}: demangled name of the function @item +@var{end_column}: column in the source file where the function ends + +@item @var{end_line}: line in the source file where the function ends @item @@ -265,9 +270,17 @@ Fields of the @var{function} element have following semantics: @var{name}: name of the function @item +@var{start_column}: column in the source file where the function begins + +@item @var{start_line}: line in the source file where the function begins @end itemize +Note that line numbers and column numbers number from 1. In the current +implementation, @var{start_line} and @var{start_column} do not include +any template parameters and the leading return type but that +this is likely to be fixed in the future. + Each @var{line} has the following form: @smallexample @@ -293,11 +306,11 @@ Fields of the @var{line} element have following semantics: @item @var{unexecuted_block}: flag whether the line contains an unexecuted block (not all statements on the line are executed) -@end itemize @item @var{function_name}: a name of a function this @var{line} belongs to (for a line with an inlined statements can be not set) +@end itemize Each @var{branch} has the following form: diff --git a/gcc/gcov-dump.c b/gcc/gcov-dump.c index 72d94d9..67b1e88 100644 --- a/gcc/gcov-dump.c +++ b/gcc/gcov-dump.c @@ -315,7 +315,9 @@ tag_function (const char *filename ATTRIBUTE_UNUSED, unsigned line_start = gcov_read_unsigned (); unsigned column_start = gcov_read_unsigned (); unsigned line_end = gcov_read_unsigned (); - printf (":%u:%u:%u", line_start, column_start, line_end); + unsigned column_end = gcov_read_unsigned (); + printf (":%u:%u-%u:%u", line_start, column_start, + line_end, column_end); if (artificial) printf (", artificial"); } diff --git a/gcc/gcov.c b/gcc/gcov.c index 37e787a..1d57655 100644 --- a/gcc/gcov.c +++ b/gcc/gcov.c @@ -283,6 +283,9 @@ struct function_info /* Last line number. */ unsigned end_line; + /* Last line column. */ + unsigned end_column; + /* Index of source file where the function is defined. */ unsigned src; @@ -631,7 +634,8 @@ function_info::function_info (): m_name (NULL), m_demangled_name (NULL), ident (0), lineno_checksum (0), cfg_checksum (0), has_catch (0), artificial (0), is_group (0), blocks (), blocks_executed (0), counts (), - start_line (0), start_column (), end_line (0), src (0), lines (), next (NULL) + start_line (0), start_column (0), end_line (0), end_column (0), + src (0), lines (), next (NULL) { } @@ -1131,7 +1135,9 @@ output_json_intermediate_file (json::array *json_files, source_info *src) function->set ("demangled_name", new json::string ((*it)->get_demangled_name ())); function->set ("start_line", new json::number ((*it)->start_line)); + function->set ("start_column", new json::number ((*it)->start_column)); function->set ("end_line", new json::number ((*it)->end_line)); + function->set ("end_column", new json::number ((*it)->end_column)); function->set ("blocks", new json::number ((*it)->get_block_count ())); function->set ("blocks_executed", @@ -1726,6 +1732,7 @@ read_graph_file (void) unsigned start_line = gcov_read_unsigned (); unsigned start_column = gcov_read_unsigned (); unsigned end_line = gcov_read_unsigned (); + unsigned end_column = gcov_read_unsigned (); fn = new function_info (); functions.push_back (fn); @@ -1739,6 +1746,7 @@ read_graph_file (void) fn->start_line = start_line; fn->start_column = start_column; fn->end_line = end_line; + fn->end_column = end_column; fn->artificial = artificial; current_tag = tag; -- cgit v1.1 From df6d3ac9aa35d4d9cd23bc70e961490c19e2477d Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 14 Mar 2019 11:07:41 +0000 Subject: re PR tree-optimization/89710 (ICE in dyn_cast(gimple*) / should_duplicate_loop_header_p) 2019-03-14 Richard Biener PR tree-optimization/89710 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Use safe_dyn_cast. * gcc.dg/torture/pr89710.c: New testcase. From-SVN: r269679 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/torture/pr89710.c | 30 ++++++++++++++++++++++++++++++ gcc/tree-ssa-loop-ch.c | 2 +- 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/torture/pr89710.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 86a2319..329954b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-14 Richard Biener + + PR tree-optimization/89710 + * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Use + safe_dyn_cast. + 2019-03-14 Martin Liska * coverage.c (coverage_begin_function): Stream also diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b0f9efa..3536cf1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2019-03-14 Richard Biener + PR tree-optimization/89710 + * gcc.dg/torture/pr89710.c: New testcase. + +2019-03-14 Richard Biener + PR middle-end/89698 * g++.dg/torture/pr89698.C: New testcase. diff --git a/gcc/testsuite/gcc.dg/torture/pr89710.c b/gcc/testsuite/gcc.dg/torture/pr89710.c new file mode 100644 index 0000000..01e875e --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr89710.c @@ -0,0 +1,30 @@ +/* { dg-do compile } */ + +void +gm (int *); + +__attribute__ ((returns_twice)) void +jg (void) +{ +} + +void +eb (void) +{ + int r6 = 0; + + if (r6 != 0) + gm (&r6); +} + +void +gm (int *r6) +{ + jg (); + + for (;;) + { + eb (); + *r6 = 0; + } +} diff --git a/gcc/tree-ssa-loop-ch.c b/gcc/tree-ssa-loop-ch.c index f65e2b5..25f562b 100644 --- a/gcc/tree-ssa-loop-ch.c +++ b/gcc/tree-ssa-loop-ch.c @@ -100,7 +100,7 @@ should_duplicate_loop_header_p (basic_block header, struct loop *loop, return false; } - gcond *last = dyn_cast (last_stmt (header)); + gcond *last = safe_dyn_cast (last_stmt (header)); if (!last) { if (dump_file && (dump_flags & TDF_DETAILS)) -- cgit v1.1 From 87654f1813a0f582645f72d87f7fb8c78b92ee6a Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 14 Mar 2019 13:21:36 +0100 Subject: re PR rtl-optimization/89679 (wrong code with -Og -frerun-cse-after-loop -fno-tree-fre) PR rtl-optimization/89679 * expmed.c (expand_mult_const): Don't add a REG_EQUAL note if it would contain a paradoxical SUBREG. * gcc.dg/pr89679.c: New test. From-SVN: r269680 --- gcc/ChangeLog | 6 ++++++ gcc/expmed.c | 21 ++++++++++++++------- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/pr89679.c | 26 ++++++++++++++++++++++++++ 4 files changed, 51 insertions(+), 7 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/pr89679.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 329954b..fb9a555 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-14 Jakub Jelinek + + PR rtl-optimization/89679 + * expmed.c (expand_mult_const): Don't add a REG_EQUAL note if it + would contain a paradoxical SUBREG. + 2019-03-14 Richard Biener PR tree-optimization/89710 diff --git a/gcc/expmed.c b/gcc/expmed.c index b7f55a7..d7f8e9a 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -3356,13 +3356,20 @@ expand_mult_const (machine_mode mode, rtx op0, HOST_WIDE_INT val, tem = gen_lowpart (nmode, op0); } - insn = get_last_insn (); - wide_int wval_so_far - = wi::uhwi (val_so_far, - GET_MODE_PRECISION (as_a (nmode))); - rtx c = immed_wide_int_const (wval_so_far, nmode); - set_dst_reg_note (insn, REG_EQUAL, gen_rtx_MULT (nmode, tem, c), - accum_inner); + /* Don't add a REG_EQUAL note if tem is a paradoxical SUBREG. + In that case, only the low bits of accum would be guaranteed to + be equal to the content of the REG_EQUAL note, the upper bits + can be anything. */ + if (!paradoxical_subreg_p (tem)) + { + insn = get_last_insn (); + wide_int wval_so_far + = wi::uhwi (val_so_far, + GET_MODE_PRECISION (as_a (nmode))); + rtx c = immed_wide_int_const (wval_so_far, nmode); + set_dst_reg_note (insn, REG_EQUAL, gen_rtx_MULT (nmode, tem, c), + accum_inner); + } } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3536cf1..19c319e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-14 Jakub Jelinek + + PR rtl-optimization/89679 + * gcc.dg/pr89679.c: New test. + 2019-03-14 Richard Biener PR tree-optimization/89710 diff --git a/gcc/testsuite/gcc.dg/pr89679.c b/gcc/testsuite/gcc.dg/pr89679.c new file mode 100644 index 0000000..0d6e2d2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr89679.c @@ -0,0 +1,26 @@ +/* PR rtl-optimization/89679 */ +/* { dg-do run } */ +/* { dg-options "-Og -frerun-cse-after-loop -fno-tree-fre" } */ + +unsigned short g; + +void +foo (unsigned long long x) +{ + if (x != 0xffff) + __builtin_abort (); +} + +int +main () +{ +#if __SIZEOF_SHORT__ == 2 && __SIZEOF_INT__ == 4 && __CHAR_BIT__ == 8 + unsigned short d = 0; + unsigned long long x, c = ~0; + c = c >> d; + __builtin_memset (&d, c, 2); + x = d + g; + foo (x); +#endif + return 0; +} -- cgit v1.1 From 27814aed3462d6bdce3c653e5e66d5e58cf4a5e7 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 14 Mar 2019 14:05:34 +0100 Subject: re PR ipa/89684 (ICE in gsi_for_stmt, at gimple-iterator.c:613) PR ipa/89684 * multiple_target.c (create_dispatcher_calls): Change references_to_redirect from vector of ipa_ref * to vector of ipa_ref. In the node->iterate_referring loop, push *ref rather than ref, call ref->remove_reference () and always pass 0 to iterate_referring. * gcc.target/i386/pr89684.c: New test. From-SVN: r269681 --- gcc/ChangeLog | 6 ++++++ gcc/multiple_target.c | 14 +++++++++----- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/gcc.target/i386/pr89684.c | 23 +++++++++++++++++++++++ 4 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr89684.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fb9a555..a401575 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2019-03-14 Jakub Jelinek + PR ipa/89684 + * multiple_target.c (create_dispatcher_calls): Change + references_to_redirect from vector of ipa_ref * to vector of ipa_ref. + In the node->iterate_referring loop, push *ref rather than ref, call + ref->remove_reference () and always pass 0 to iterate_referring. + PR rtl-optimization/89679 * expmed.c (expand_mult_const): Don't add a REG_EQUAL note if it would contain a paradoxical SUBREG. diff --git a/gcc/multiple_target.c b/gcc/multiple_target.c index 6126f42..fd983cc 100644 --- a/gcc/multiple_target.c +++ b/gcc/multiple_target.c @@ -103,10 +103,16 @@ create_dispatcher_calls (struct cgraph_node *node) inode->resolve_alias (cgraph_node::get (resolver_decl)); auto_vec edges_to_redirect; - auto_vec references_to_redirect; + /* We need to capture the references by value rather than just pointers to them + and remove them right away, as removing them later would invalidate what + some other reference pointers point to. */ + auto_vec references_to_redirect; - for (unsigned i = 0; node->iterate_referring (i, ref); i++) - references_to_redirect.safe_push (ref); + while (node->iterate_referring (0, ref)) + { + references_to_redirect.safe_push (*ref); + ref->remove_reference (); + } /* We need to remember NEXT_CALLER as it could be modified in the loop. */ for (cgraph_edge *e = node->callers; e ; e = e->next_caller) @@ -146,13 +152,11 @@ create_dispatcher_calls (struct cgraph_node *node) } symtab_node *source = ref->referring; - ref->remove_reference (); source->create_reference (inode, IPA_REF_ADDR); } else if (ref->use == IPA_REF_ALIAS) { symtab_node *source = ref->referring; - ref->remove_reference (); source->create_reference (inode, IPA_REF_ALIAS); source->add_to_same_comdat_group (inode); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 19c319e..a9c52a9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-03-14 Jakub Jelinek + PR ipa/89684 + * gcc.target/i386/pr89684.c: New test. + PR rtl-optimization/89679 * gcc.dg/pr89679.c: New test. diff --git a/gcc/testsuite/gcc.target/i386/pr89684.c b/gcc/testsuite/gcc.target/i386/pr89684.c new file mode 100644 index 0000000..85801bf --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89684.c @@ -0,0 +1,23 @@ +/* PR ipa/89684 */ +/* { dg-do compile } */ +/* { dg-require-ifunc "" } */ + +void bar (int, void (*) (void)); + +__attribute__((target_clones ("default", "avx"))) +void foo (void) +{ + bar (0, foo); + bar (0, foo); +} + +__attribute__((target_clones ("default", "avx", "avx2"))) +void baz (void) +{ + bar (0, foo); + bar (0, foo); + bar (0, foo); + bar (0, foo); + bar (0, foo); + bar (0, foo); +} -- cgit v1.1 From baa09dc5c951213452446689466ad889656b9936 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 14 Mar 2019 13:25:27 +0000 Subject: c-tree.h (enum c_declspec_il): New. 2019-03-14 Richard Biener c/ * c-tree.h (enum c_declspec_il): New. (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il enum bitfield. * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly. Pass start pass and declspec_il to c_parser_parse_gimple_body. (c_parser_declspecs): Adjust. * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h, gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h and bitmap.h. (struct gimple_parser): New. (gimple_parser::push_edge): New method. (c_parser_gimple_parse_bb_spec): New helper. (c_parser_parse_gimple_body): Get start pass and IL specification. Initialize SSA and CFG. (c_parser_gimple_compound_statement): Handle CFG and SSA build. Build a gimple_parser parsing state and pass it along. (c_parser_gimple_statement): Change intermittend __PHI internal function argument for the edge. (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags. (c_parser_gimple_goto_stmt): Record edges to build. (c_parser_gimple_if_stmt): Likewise. * gimple-parser.h (c_parser_parse_gimple_body): Adjust. (c_parser_gimple_or_rtl_pass_list): Likewise. * gimple-pretty-print.c: Include cfgloop.h. (dump_gimple_phi): Adjust. (dump_gimple_bb_header): Dump loop header for GIMPLE. (pp_cfg_jump): Adjust. (dump_implicit_edges): Dump fallthru to next block for GIMPLE as well. * tree-cfg.c (build_gimple_cfg): Remove lower_phi_internal_fn call. (lower_phi_internal_fn): Remove. (verify_gimple_call): Remove IFN_PHI special-casing. (dump_function_to_file): Dump IL state. * tree-into-ssa.c (rewrite_add_phi_arguments): Revert changes done to deal with PHI nodes being present in non-SSA state. * gcc.dg/gimplefe-13.c: Adjust. * gcc.dg/gimplefe-14.c: Likewise. * gcc.dg/gimplefe-17.c: Likewise. * gcc.dg/gimplefe-18.c: Likewise. * gcc.dg/gimplefe-7.c: Likewise. * gcc.dg/torture/pr89595.c: Likewise. * gcc.dg/tree-ssa/cunroll-13.c: Likewise. * gcc.dg/tree-ssa/ivopt_mult_1g.c: Likewise. * gcc.dg/tree-ssa/ivopt_mult_2g.c: Likewise. * gcc.dg/tree-ssa/scev-3.c: Likewise. * gcc.dg/tree-ssa/scev-4.c: Likewise. * gcc.dg/tree-ssa/scev-5.c: Likewise. * gcc.dg/vect/vect-cond-arith-2.c: Likewise. * gcc.target/aarch64/sve/loop_add_6.c: Likewise. From-SVN: r269682 --- gcc/ChangeLog | 14 + gcc/c/ChangeLog | 26 ++ gcc/c/c-parser.c | 36 +- gcc/c/c-tree.h | 13 +- gcc/c/gimple-parser.c | 532 +++++++++++++++++----- gcc/c/gimple-parser.h | 5 +- gcc/gimple-pretty-print.c | 27 +- gcc/testsuite/ChangeLog | 17 + gcc/testsuite/gcc.dg/gimplefe-13.c | 21 +- gcc/testsuite/gcc.dg/gimplefe-14.c | 16 +- gcc/testsuite/gcc.dg/gimplefe-17.c | 23 +- gcc/testsuite/gcc.dg/gimplefe-18.c | 19 +- gcc/testsuite/gcc.dg/gimplefe-7.c | 21 +- gcc/testsuite/gcc.dg/torture/pr89595.c | 24 +- gcc/testsuite/gcc.dg/tree-ssa/cunroll-13.c | 28 +- gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_1g.c | 63 +-- gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_2g.c | 65 +-- gcc/testsuite/gcc.dg/tree-ssa/scev-3.c | 26 +- gcc/testsuite/gcc.dg/tree-ssa/scev-4.c | 26 +- gcc/testsuite/gcc.dg/tree-ssa/scev-5.c | 26 +- gcc/testsuite/gcc.dg/vect/vect-cond-arith-2.c | 26 +- gcc/testsuite/gcc.target/aarch64/sve/loop_add_6.c | 26 +- gcc/tree-cfg.c | 54 +-- gcc/tree-into-ssa.c | 12 +- 24 files changed, 746 insertions(+), 400 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a401575..58c8a28 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2019-03-14 Richard Biener + + * gimple-pretty-print.c: Include cfgloop.h. + (dump_gimple_phi): Adjust. + (dump_gimple_bb_header): Dump loop header for GIMPLE. + (pp_cfg_jump): Adjust. + (dump_implicit_edges): Dump fallthru to next block for GIMPLE as well. + * tree-cfg.c (build_gimple_cfg): Remove lower_phi_internal_fn call. + (lower_phi_internal_fn): Remove. + (verify_gimple_call): Remove IFN_PHI special-casing. + (dump_function_to_file): Dump IL state. + * tree-into-ssa.c (rewrite_add_phi_arguments): Revert changes + done to deal with PHI nodes being present in non-SSA state. + 2019-03-14 Jakub Jelinek PR ipa/89684 diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 5859f5b..fafc6a5 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,29 @@ +2019-03-14 Richard Biener + + * c-tree.h (enum c_declspec_il): New. + (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il + enum bitfield. + * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly. + Pass start pass and declspec_il to c_parser_parse_gimple_body. + (c_parser_declspecs): Adjust. + * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h, + gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h + and bitmap.h. + (struct gimple_parser): New. + (gimple_parser::push_edge): New method. + (c_parser_gimple_parse_bb_spec): New helper. + (c_parser_parse_gimple_body): Get start pass and IL specification. + Initialize SSA and CFG. + (c_parser_gimple_compound_statement): Handle CFG and SSA build. + Build a gimple_parser parsing state and pass it along. + (c_parser_gimple_statement): Change intermittend __PHI internal + function argument for the edge. + (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags. + (c_parser_gimple_goto_stmt): Record edges to build. + (c_parser_gimple_if_stmt): Likewise. + * gimple-parser.h (c_parser_parse_gimple_body): Adjust. + (c_parser_gimple_or_rtl_pass_list): Likewise. + 2019-03-11 Martin Liska * c-decl.c (check_for_loop_decls): Wrap an option name diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index 5134e95..741d172 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -2324,19 +2324,9 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok, DECL_STRUCT_FUNCTION (current_function_decl)->function_start_locus = c_parser_peek_token (parser)->location; - /* If the definition was marked with __GIMPLE then parse the - function body as GIMPLE. */ - if (specs->gimple_p) - { - cfun->pass_startwith = specs->gimple_or_rtl_pass; - bool saved = in_late_binary_op; - in_late_binary_op = true; - c_parser_parse_gimple_body (parser); - in_late_binary_op = saved; - } - /* Similarly, if it was marked with __RTL, use the RTL parser now, + /* If the definition was marked with __RTL, use the RTL parser now, consuming the function body. */ - else if (specs->rtl_p) + if (specs->declspec_il == cdil_rtl) { c_parser_parse_rtl_body (parser, specs->gimple_or_rtl_pass); @@ -2350,6 +2340,16 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok, finish_function (); return; } + /* If the definition was marked with __GIMPLE then parse the + function body as GIMPLE. */ + else if (specs->declspec_il != cdil_none) + { + bool saved = in_late_binary_op; + in_late_binary_op = true; + c_parser_parse_gimple_body (parser, specs->gimple_or_rtl_pass, + specs->declspec_il); + in_late_binary_op = saved; + } else fnbody = c_parser_compound_statement (parser); tree fndecl = current_function_decl; @@ -2372,8 +2372,8 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok, add_stmt (fnbody); finish_function (); } - /* Get rid of the empty stmt list for GIMPLE. */ - if (specs->gimple_p) + /* Get rid of the empty stmt list for GIMPLE/RTL. */ + if (specs->declspec_il != cdil_none) DECL_SAVED_TREE (fndecl) = NULL_TREE; break; @@ -2882,15 +2882,15 @@ c_parser_declspecs (c_parser *parser, struct c_declspecs *specs, if (! flag_gimple) error_at (loc, "%<__GIMPLE%> only valid with %<-fgimple%>"); c_parser_consume_token (parser); - specs->gimple_p = true; + specs->declspec_il = cdil_gimple; specs->locations[cdw_gimple] = loc; - specs->gimple_or_rtl_pass = c_parser_gimple_or_rtl_pass_list (parser); + c_parser_gimple_or_rtl_pass_list (parser, specs); break; case RID_RTL: c_parser_consume_token (parser); - specs->rtl_p = true; + specs->declspec_il = cdil_rtl; specs->locations[cdw_rtl] = loc; - specs->gimple_or_rtl_pass = c_parser_gimple_or_rtl_pass_list (parser); + c_parser_gimple_or_rtl_pass_list (parser, specs); break; default: goto out; diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h index b69ef33..d6e345a 100644 --- a/gcc/c/c-tree.h +++ b/gcc/c/c-tree.h @@ -288,6 +288,14 @@ enum c_declspec_word { enumerator. */ }; +enum c_declspec_il { + cdil_none, + cdil_gimple, /* __GIMPLE */ + cdil_gimple_cfg, /* __GIMPLE(cfg) */ + cdil_gimple_ssa, /* __GIMPLE(ssa) */ + cdil_rtl /* __RTL */ +}; + /* A sequence of declaration specifiers in C. When a new declaration specifier is added, please update the enum c_declspec_word above accordingly. */ @@ -326,6 +334,7 @@ struct c_declspecs { /* The kind of type specifier if one has been seen, ctsk_none otherwise. */ ENUM_BITFIELD (c_typespec_kind) typespec_kind : 3; + ENUM_BITFIELD (c_declspec_il) declspec_il : 3; /* Whether any expressions in typeof specifiers may appear in constant expressions. */ BOOL_BITFIELD expr_const_operands : 1; @@ -381,10 +390,6 @@ struct c_declspecs { /* Whether any alignment specifier (even with zero alignment) was specified. */ BOOL_BITFIELD alignas_p : 1; - /* Whether any __GIMPLE specifier was specified. */ - BOOL_BITFIELD gimple_p : 1; - /* Whether any __RTL specifier was specified. */ - BOOL_BITFIELD rtl_p : 1; /* The address space that the declaration belongs to. */ addr_space_t address_space; }; diff --git a/gcc/c/gimple-parser.c b/gcc/c/gimple-parser.c index c67b966..fff3460 100644 --- a/gcc/c/gimple-parser.c +++ b/gcc/c/gimple-parser.c @@ -54,45 +54,133 @@ along with GCC; see the file COPYING3. If not see #include "gimple-ssa.h" #include "tree-dfa.h" #include "internal-fn.h" +#include "cfg.h" +#include "cfghooks.h" +#include "cfganal.h" +#include "tree-cfg.h" +#include "gimple-iterator.h" +#include "cfgloop.h" +#include "tree-phinodes.h" +#include "tree-into-ssa.h" +#include "bitmap.h" + + +/* GIMPLE parser state. */ + +struct gimple_parser +{ + gimple_parser (c_parser *p) : parser (p), edges(), current_bb(NULL) {} + /* c_parser is not visible here, use composition and fake inheritance + via a conversion operator. */ + operator c_parser *() { return parser; } + c_parser *parser; + + /* CFG build state. */ + struct gimple_parser_edge + { + int src; + int dest; + int flags; + }; + auto_vec edges; + basic_block current_bb; + + void push_edge (int, int, int); +}; + +void +gimple_parser::push_edge (int src, int dest, int flags) +{ + gimple_parser_edge e; + e.src = src; + e.dest = dest; + e.flags = flags; + edges.safe_push (e); +} /* Gimple parsing functions. */ -static bool c_parser_gimple_compound_statement (c_parser *, gimple_seq *); -static void c_parser_gimple_label (c_parser *, gimple_seq *); -static void c_parser_gimple_statement (c_parser *, gimple_seq *); -static struct c_expr c_parser_gimple_binary_expression (c_parser *); -static struct c_expr c_parser_gimple_unary_expression (c_parser *); -static struct c_expr c_parser_gimple_postfix_expression (c_parser *); -static struct c_expr c_parser_gimple_postfix_expression_after_primary (c_parser *, - location_t, - struct c_expr); -static void c_parser_gimple_declaration (c_parser *); -static void c_parser_gimple_goto_stmt (location_t, tree, gimple_seq *); -static void c_parser_gimple_if_stmt (c_parser *, gimple_seq *); -static void c_parser_gimple_switch_stmt (c_parser *, gimple_seq *); -static void c_parser_gimple_return_stmt (c_parser *, gimple_seq *); +static bool c_parser_gimple_compound_statement (gimple_parser &, gimple_seq *); +static void c_parser_gimple_label (gimple_parser &, gimple_seq *); +static void c_parser_gimple_statement (gimple_parser &, gimple_seq *); +static struct c_expr c_parser_gimple_binary_expression (gimple_parser &); +static struct c_expr c_parser_gimple_unary_expression (gimple_parser &); +static struct c_expr c_parser_gimple_postfix_expression (gimple_parser &); +static struct c_expr c_parser_gimple_postfix_expression_after_primary + (gimple_parser &, location_t, struct c_expr); +static void c_parser_gimple_declaration (gimple_parser &); +static void c_parser_gimple_goto_stmt (gimple_parser &, location_t, + tree, gimple_seq *); +static void c_parser_gimple_if_stmt (gimple_parser &, gimple_seq *); +static void c_parser_gimple_switch_stmt (gimple_parser &, gimple_seq *); +static void c_parser_gimple_return_stmt (gimple_parser &, gimple_seq *); static void c_finish_gimple_return (location_t, tree); -static tree c_parser_gimple_paren_condition (c_parser *); -static void c_parser_gimple_expr_list (c_parser *, vec *); +static tree c_parser_gimple_paren_condition (gimple_parser &); +static void c_parser_gimple_expr_list (gimple_parser &, vec *); +/* See if VAL is an identifier matching __BB and return + in *INDEX. Return true if so. */ + +static bool +c_parser_gimple_parse_bb_spec (tree val, int *index) +{ + if (strncmp (IDENTIFIER_POINTER (val), "__BB", 4) != 0) + return false; + for (const char *p = IDENTIFIER_POINTER (val) + 4; *p; ++p) + if (!ISDIGIT (*p)) + return false; + *index = atoi (IDENTIFIER_POINTER (val) + 4); + return *index > 0; +} + /* Parse the body of a function declaration marked with "__GIMPLE". */ void -c_parser_parse_gimple_body (c_parser *parser) +c_parser_parse_gimple_body (c_parser *cparser, char *gimple_pass, + enum c_declspec_il cdil) { + gimple_parser parser (cparser); gimple_seq seq = NULL; gimple_seq body = NULL; tree stmt = push_stmt_list (); push_scope (); location_t loc1 = c_parser_peek_token (parser)->location; + cfun->pass_startwith = gimple_pass; init_tree_ssa (cfun); - if (! c_parser_gimple_compound_statement (parser, &seq)) + if (cdil == cdil_gimple) + /* While we have SSA names in the IL we do not have a CFG built yet + and PHIs are represented using a PHI internal function. We do + have lowered control flow and exception handling (well, we do not + have parser support for EH yet). But as we still have BINDs + we have to go through lowering again. */ + cfun->curr_properties = PROP_gimple_any; + else + { + /* We have at least cdil_gimple_cfg. */ + gimple_register_cfg_hooks (); + init_empty_tree_cfg (); + /* Initialize the bare loop structure - we are going to only + mark headers and leave the rest to fixup. */ + set_loops_for_fn (cfun, ggc_cleared_alloc ()); + init_loops_structure (cfun, loops_for_fn (cfun), 1); + loops_state_set (cfun, LOOPS_NEED_FIXUP|LOOPS_MAY_HAVE_MULTIPLE_LATCHES); + cfun->curr_properties + |= PROP_gimple_lcf | PROP_gimple_leh | PROP_cfg | PROP_loops; + if (cdil == cdil_gimple_ssa) + { + init_ssa_operands (cfun); + cfun->curr_properties |= PROP_ssa; + } + } + + if (! c_parser_gimple_compound_statement (parser, &seq) + && cdil == cdil_gimple) { gimple *ret = gimple_build_return (NULL); - gimple_seq_add_stmt (&seq, ret); + gimple_seq_add_stmt_without_update (&seq, ret); } tree block = pop_scope (); @@ -104,18 +192,87 @@ c_parser_parse_gimple_body (c_parser *parser) BLOCK_CHAIN (block) = NULL_TREE; TREE_ASM_WRITTEN (block) = 1; - gbind *bind_stmt = gimple_build_bind (BIND_EXPR_VARS (stmt), NULL, - BIND_EXPR_BLOCK (stmt)); - gimple_bind_set_body (bind_stmt, seq); - gimple_seq_add_stmt (&body, bind_stmt); - gimple_set_body (current_function_decl, body); + if (cdil == cdil_gimple) + { + gbind *bind_stmt = gimple_build_bind (BIND_EXPR_VARS (stmt), NULL, + BIND_EXPR_BLOCK (stmt)); + gimple_bind_set_body (bind_stmt, seq); + gimple_seq_add_stmt_without_update (&body, bind_stmt); + gimple_set_body (current_function_decl, body); + } + else + { + /* Control-flow and binds are lowered, record local decls. */ + for (tree var = BIND_EXPR_VARS (stmt); var; var = DECL_CHAIN (var)) + if (VAR_P (var) + && !DECL_EXTERNAL (var)) + add_local_decl (cfun, var); + /* We have a CFG. Build the edges. */ + for (unsigned i = 0; i < parser.edges.length (); ++i) + make_edge (BASIC_BLOCK_FOR_FN (cfun, parser.edges[i].src), + BASIC_BLOCK_FOR_FN (cfun, parser.edges[i].dest), + parser.edges[i].flags); + /* Add edges for case labels. */ + basic_block bb; + FOR_EACH_BB_FN (bb, cfun) + if (EDGE_COUNT (bb->succs) == 0) + { + gimple *last = last_stmt (bb); + if (gswitch *sw = safe_dyn_cast (last)) + for (unsigned i = 0; i < gimple_switch_num_labels (sw); ++i) + { + basic_block label_bb = gimple_switch_label_bb (cfun, sw, i); + make_edge (bb, label_bb, 0); + } + } + /* Need those for loop fixup. */ + calculate_dominance_info (CDI_DOMINATORS); + /* With SSA lower PHIs parsed as internal function calls and + update stmts. */ + if (cdil == cdil_gimple_ssa) + { + /* Create PHI nodes, they are parsed into __PHI internal calls. */ + FOR_EACH_BB_FN (bb, cfun) + for (gimple_stmt_iterator gsi = gsi_start_bb (bb); + !gsi_end_p (gsi);) + { + gimple *stmt = gsi_stmt (gsi); + if (!gimple_call_internal_p (stmt, IFN_PHI)) + break; - /* While we have SSA names in the IL we do not have a CFG built yet - and PHIs are represented using a PHI internal function. We do - have lowered control flow and exception handling (well, we do not - have parser support for EH yet). But as we still have BINDs - we have to go through lowering again. */ - cfun->curr_properties = PROP_gimple_any; + gphi *phi = create_phi_node (gimple_call_lhs (stmt), bb); + for (unsigned i = 0; i < gimple_call_num_args (stmt); i += 2) + { + int srcidx = TREE_INT_CST_LOW (gimple_call_arg (stmt, i)); + edge e = find_edge (BASIC_BLOCK_FOR_FN (cfun, srcidx), bb); + if (!e) + c_parser_error (parser, "edge not found"); + else + add_phi_arg (phi, gimple_call_arg (stmt, i + 1), e, + UNKNOWN_LOCATION); + } + gsi_remove (&gsi, false); + } + /* Fill SSA name gaps, putting them on the freelist. */ + for (unsigned i = 1; i < num_ssa_names; ++i) + if (!ssa_name (i)) + { + tree name = make_ssa_name_fn (cfun, integer_type_node, NULL, i); + release_ssa_name_fn (cfun, name); + } + /* No explicit virtual operands (yet). */ + bitmap_obstack_initialize (NULL); + update_ssa (TODO_update_ssa_only_virtuals); + bitmap_obstack_release (NULL); + /* ??? By flushing the freelist after virtual operand SSA rewrite + we keep the gaps available for re-use like needed for the + PR89595 testcase but then usually virtual operands would have + taken most of them. The fix is obviously to make virtual + operands explicit in the SSA IL. */ + flush_ssaname_freelist (); + } + fix_loop_structure (NULL); + } dump_function (TDI_gimple, current_function_decl); } @@ -135,7 +292,7 @@ c_parser_parse_gimple_body (c_parser *parser) */ static bool -c_parser_gimple_compound_statement (c_parser *parser, gimple_seq *seq) +c_parser_gimple_compound_statement (gimple_parser &parser, gimple_seq *seq) { bool return_p = false; @@ -180,7 +337,7 @@ c_parser_gimple_compound_statement (c_parser *parser, gimple_seq *seq) c_parser_consume_token (parser); if (c_parser_next_token_is (parser, CPP_NAME)) { - c_parser_gimple_goto_stmt (loc, + c_parser_gimple_goto_stmt (parser, loc, c_parser_peek_token (parser)->value, seq); @@ -197,6 +354,8 @@ c_parser_gimple_compound_statement (c_parser *parser, gimple_seq *seq) if (! c_parser_require (parser, CPP_SEMICOLON, "expected %<;%>")) return return_p; + if (cfun->curr_properties & PROP_cfg) + parser.push_edge (parser.current_bb->index, EXIT_BLOCK, 0); break; default: goto expr_stmt; @@ -208,6 +367,142 @@ c_parser_gimple_compound_statement (c_parser *parser, gimple_seq *seq) c_parser_gimple_label (parser, seq); break; } + /* Basic block specification. + __BB (index, ...) */ + if ((cfun->curr_properties & PROP_cfg) + && !strcmp (IDENTIFIER_POINTER + (c_parser_peek_token (parser)->value), "__BB")) + { + c_parser_consume_token (parser); + if (! c_parser_require (parser, CPP_OPEN_PAREN, + "expected %<(%>")) + return return_p; + if (c_parser_next_token_is_not (parser, CPP_NUMBER)) + { + c_parser_error (parser, "expected block index"); + return return_p; + } + tree tnum = c_parser_peek_token (parser)->value; + if (TREE_CODE (tnum) != INTEGER_CST) + { + c_parser_error (parser, "expected block index"); + return return_p; + } + int index = TREE_INT_CST_LOW (tnum); + if (index < NUM_FIXED_BLOCKS + || (index < last_basic_block_for_fn (cfun) + && BASIC_BLOCK_FOR_FN (cfun, index) != NULL)) + { + c_parser_error (parser, "invalid block index"); + return return_p; + } + int is_loop_header_of = -1; + c_parser_consume_token (parser); + while (c_parser_next_token_is (parser, CPP_COMMA)) + { + c_parser_consume_token (parser); + if (! c_parser_next_token_is (parser, CPP_NAME)) + { + c_parser_error (parser, "expected block specifier"); + return return_p; + } + /* loop_header (NUM) */ + if (!strcmp (IDENTIFIER_POINTER + (c_parser_peek_token (parser)->value), + "loop_header")) + { + c_parser_consume_token (parser); + if (! c_parser_require (parser, CPP_OPEN_PAREN, + "expected %<(%>")) + return return_p; + tree loop_num; + if (! c_parser_next_token_is (parser, CPP_NUMBER) + || TREE_CODE (loop_num + = c_parser_peek_token (parser)->value) + != INTEGER_CST) + { + c_parser_error (parser, "expected loop number"); + return return_p; + } + c_parser_consume_token (parser); + is_loop_header_of = TREE_INT_CST_LOW (loop_num); + if (! c_parser_require (parser, CPP_CLOSE_PAREN, + "expected %<)%>")) + return return_p; + } + else + { + c_parser_error (parser, "unknown block specifier"); + return return_p; + } + } + if (! c_parser_require (parser, CPP_CLOSE_PAREN, + "expected %<)%>") + || ! c_parser_require (parser, CPP_COLON, + "expected %<:%>")) + return return_p; + + /* Put stmts parsed in the current block. */ + if (!gimple_seq_empty_p (*seq)) + { + if (!parser.current_bb) + c_parser_error (parser, "stmts without block"); + else + { + gimple_stmt_iterator gsi + = gsi_start_bb (parser.current_bb); + gsi_insert_seq_after (&gsi, *seq, GSI_CONTINUE_LINKING); + } + *seq = NULL; + } + + /* Build an empty block with specified index, linking them + in source order. */ + basic_block bb = alloc_block (); + bb->index = index; + link_block (bb, (parser.current_bb ? parser.current_bb + : ENTRY_BLOCK_PTR_FOR_FN (cfun))); + if (basic_block_info_for_fn (cfun)->length () <= (size_t)index) + vec_safe_grow_cleared (basic_block_info_for_fn (cfun), + index + 1); + SET_BASIC_BLOCK_FOR_FN (cfun, index, bb); + if (last_basic_block_for_fn (cfun) <= index) + last_basic_block_for_fn (cfun) = index + 1; + n_basic_blocks_for_fn (cfun)++; + if (!parser.current_bb) + parser.push_edge (ENTRY_BLOCK, bb->index, EDGE_FALLTHRU); + + /* We leave the proper setting to fixup. */ + struct loop *loop_father = loops_for_fn (cfun)->tree_root; + /* If the new block is a loop header, allocate a loop + struct. Fixup will take care of proper placement within + the loop tree. */ + if (is_loop_header_of != -1) + { + if (number_of_loops (cfun) > (unsigned)is_loop_header_of + && get_loop (cfun, is_loop_header_of) != NULL) + { + c_parser_error (parser, "duplicate loop header"); + } + else + { + struct loop *loop = alloc_loop (); + loop->num = is_loop_header_of; + loop->header = bb; + vec_safe_grow_cleared (loops_for_fn (cfun)->larray, + is_loop_header_of + 1); + (*loops_for_fn (cfun)->larray)[is_loop_header_of] = loop; + flow_loop_tree_node_add (loops_for_fn (cfun)->tree_root, + loop); + } + loop_father = get_loop (cfun, is_loop_header_of); + } + bb->loop_father = loop_father; + + /* Stmts now go to the new block. */ + parser.current_bb = bb; + break; + } goto expr_stmt; case CPP_SEMICOLON: @@ -217,7 +512,7 @@ c_parser_gimple_compound_statement (c_parser *parser, gimple_seq *seq) c_parser_consume_token (parser); gimple *nop = gimple_build_nop (); gimple_set_location (nop, loc); - gimple_seq_add_stmt (seq, nop); + gimple_seq_add_stmt_without_update (seq, nop); break; } @@ -229,6 +524,21 @@ expr_stmt: } } c_parser_consume_token (parser); + + /* Put stmts parsed in the current block. */ + if ((cfun->curr_properties & PROP_cfg) + && !gimple_seq_empty_p (*seq)) + { + if (!parser.current_bb) + c_parser_error (parser, "stmts without block"); + else + { + gimple_stmt_iterator gsi = gsi_start_bb (parser.current_bb); + gsi_insert_seq_after (&gsi, *seq, GSI_CONTINUE_LINKING); + } + *seq = NULL; + } + return return_p; } @@ -260,7 +570,7 @@ expr_stmt: */ static void -c_parser_gimple_statement (c_parser *parser, gimple_seq *seq) +c_parser_gimple_statement (gimple_parser &parser, gimple_seq *seq) { struct c_expr lhs, rhs; gimple *assign = NULL; @@ -278,7 +588,7 @@ c_parser_gimple_statement (c_parser *parser, gimple_seq *seq) { gimple *call; call = gimple_build_call_from_tree (lhs.value, NULL); - gimple_seq_add_stmt (seq, call); + gimple_seq_add_stmt_without_update (seq, call); gimple_set_location (call, loc); return; } @@ -316,7 +626,7 @@ c_parser_gimple_statement (c_parser *parser, gimple_seq *seq) && FLOAT_TYPE_P (TREE_TYPE (rhs.value))) code = FIX_TRUNC_EXPR; assign = gimple_build_assign (lhs.value, code, rhs.value); - gimple_seq_add_stmt (seq, assign); + gimple_seq_add_stmt_without_update (seq, assign); gimple_set_location (assign, loc); return; } @@ -350,7 +660,7 @@ c_parser_gimple_statement (c_parser *parser, gimple_seq *seq) { assign = gimple_build_assign (lhs.value, rhs.value); gimple_set_location (assign, loc); - gimple_seq_add_stmt (seq, assign); + gimple_seq_add_stmt_without_update (seq, assign); } return; @@ -373,13 +683,14 @@ c_parser_gimple_statement (c_parser *parser, gimple_seq *seq) if (c_parser_next_token_is (parser, CPP_NAME) && c_parser_peek_2nd_token (parser)->type == CPP_COLON) { - arg = lookup_label_for_goto (loc, - c_parser_peek_token (parser)->value); + arg = c_parser_peek_token (parser)->value; c_parser_consume_token (parser); - if (c_parser_next_token_is (parser, CPP_COLON)) c_parser_consume_token (parser); - vargs.safe_push (arg); + int src_index = -1; + if (!c_parser_gimple_parse_bb_spec (arg, &src_index)) + c_parser_error (parser, "invalid source block specification"); + vargs.safe_push (size_int (src_index)); } else if (c_parser_next_token_is (parser, CPP_COMMA)) c_parser_consume_token (parser); @@ -397,7 +708,7 @@ c_parser_gimple_statement (c_parser *parser, gimple_seq *seq) gcall *call_stmt = gimple_build_call_internal_vec (IFN_PHI, vargs); gimple_call_set_lhs (call_stmt, lhs.value); gimple_set_location (call_stmt, UNKNOWN_LOCATION); - gimple_seq_add_stmt (seq, call_stmt); + gimple_seq_add_stmt_without_update (seq, call_stmt); return; } @@ -412,7 +723,7 @@ c_parser_gimple_statement (c_parser *parser, gimple_seq *seq) { gimple *call = gimple_build_call_from_tree (rhs.value, NULL); gimple_call_set_lhs (call, lhs.value); - gimple_seq_add_stmt (seq, call); + gimple_seq_add_stmt_without_update (seq, call); gimple_set_location (call, loc); } return; @@ -440,7 +751,7 @@ c_parser_gimple_statement (c_parser *parser, gimple_seq *seq) rhs.value, trueval.value, falseval.value); } assign = gimple_build_assign (lhs.value, rhs.value); - gimple_seq_add_stmt (seq, assign); + gimple_seq_add_stmt_without_update (seq, assign); gimple_set_location (assign, loc); } return; @@ -470,7 +781,7 @@ c_parser_gimple_statement (c_parser *parser, gimple_seq *seq) */ static c_expr -c_parser_gimple_binary_expression (c_parser *parser) +c_parser_gimple_binary_expression (gimple_parser &parser) { /* Location of the binary operator. */ struct c_expr ret, lhs, rhs; @@ -578,7 +889,7 @@ c_parser_gimple_binary_expression (c_parser *parser) */ static c_expr -c_parser_gimple_unary_expression (c_parser *parser) +c_parser_gimple_unary_expression (gimple_parser &parser) { struct c_expr ret, op; location_t op_loc = c_parser_peek_token (parser)->location; @@ -687,7 +998,7 @@ c_parser_parse_ssa_name_id (tree id, unsigned *version, unsigned *ver_offset) TYPE is the type if the SSA name is being declared. */ static tree -c_parser_parse_ssa_name (c_parser *parser, +c_parser_parse_ssa_name (gimple_parser &parser, tree id, tree type, unsigned version, unsigned ver_offset) { @@ -752,7 +1063,7 @@ c_parser_parse_ssa_name (c_parser *parser, . identifier ( gimple-argument-expression-list[opt] ) */ static struct c_expr -c_parser_gimple_call_internal (c_parser *parser) +c_parser_gimple_call_internal (gimple_parser &parser) { struct c_expr expr; expr.set_error (); @@ -812,7 +1123,7 @@ c_parser_gimple_call_internal (c_parser *parser) */ static struct c_expr -c_parser_gimple_postfix_expression (c_parser *parser) +c_parser_gimple_postfix_expression (gimple_parser &parser) { location_t loc = c_parser_peek_token (parser)->location; source_range tok_range = c_parser_peek_token (parser)->get_range (); @@ -1102,7 +1413,7 @@ c_parser_gimple_postfix_expression (c_parser *parser) literal. */ static struct c_expr -c_parser_gimple_postfix_expression_after_primary (c_parser *parser, +c_parser_gimple_postfix_expression_after_primary (gimple_parser &parser, location_t expr_loc, struct c_expr expr) { @@ -1245,7 +1556,7 @@ c_parser_gimple_postfix_expression_after_primary (c_parser *parser, */ static void -c_parser_gimple_expr_list (c_parser *parser, vec *ret) +c_parser_gimple_expr_list (gimple_parser &parser, vec *ret) { struct c_expr expr; @@ -1269,7 +1580,7 @@ c_parser_gimple_expr_list (c_parser *parser, vec *ret) */ static void -c_parser_gimple_label (c_parser *parser, gimple_seq *seq) +c_parser_gimple_label (gimple_parser &parser, gimple_seq *seq) { tree name = c_parser_peek_token (parser)->value; location_t loc1 = c_parser_peek_token (parser)->location; @@ -1278,58 +1589,67 @@ c_parser_gimple_label (c_parser *parser, gimple_seq *seq) gcc_assert (c_parser_next_token_is (parser, CPP_COLON)); c_parser_consume_token (parser); tree label = define_label (loc1, name); - gimple_seq_add_stmt (seq, gimple_build_label (label)); + gimple_seq_add_stmt_without_update (seq, gimple_build_label (label)); return; } /* Parse gimple/RTL pass list. gimple-or-rtl-pass-list: - startwith("pass-name") + startwith("pass-name")[,{cfg,ssa}] */ -char * -c_parser_gimple_or_rtl_pass_list (c_parser *parser) +void +c_parser_gimple_or_rtl_pass_list (c_parser *parser, c_declspecs *specs) { char *pass = NULL; /* Accept __GIMPLE/__RTL. */ if (c_parser_next_token_is_not (parser, CPP_OPEN_PAREN)) - return NULL; + return; c_parser_consume_token (parser); - if (c_parser_next_token_is (parser, CPP_NAME)) + while (c_parser_next_token_is (parser, CPP_NAME)) { const char *op = IDENTIFIER_POINTER (c_parser_peek_token (parser)->value); c_parser_consume_token (parser); if (! strcmp (op, "startwith")) { if (! c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) - return NULL; + return; if (c_parser_next_token_is_not (parser, CPP_STRING)) { error_at (c_parser_peek_token (parser)->location, "expected pass name"); - return NULL; + return; } pass = xstrdup (TREE_STRING_POINTER (c_parser_peek_token (parser)->value)); c_parser_consume_token (parser); - if (! c_parser_require (parser, CPP_CLOSE_PAREN, "expected %<)%>")) - return NULL; + if (! c_parser_require (parser, CPP_CLOSE_PAREN, "expected %<(%>")) + return; } + else if (specs->declspec_il != cdil_gimple) + /* Allow only one IL specifier and none on RTL. */ + ; + else if (! strcmp (op, "cfg")) + specs->declspec_il = cdil_gimple_cfg; + else if (! strcmp (op, "ssa")) + specs->declspec_il = cdil_gimple_ssa; else { error_at (c_parser_peek_token (parser)->location, "invalid operation"); - return NULL; + return; } + if (c_parser_next_token_is (parser, CPP_COMMA)) + c_parser_consume_token (parser); } if (! c_parser_require (parser, CPP_CLOSE_PAREN, "expected %<)%>")) - return NULL; + return; - return pass; + specs->gimple_or_rtl_pass = pass; } /* Parse gimple local declaration. @@ -1371,7 +1691,7 @@ c_parser_gimple_or_rtl_pass_list (c_parser *parser) */ static void -c_parser_gimple_declaration (c_parser *parser) +c_parser_gimple_declaration (gimple_parser &parser) { struct c_declarator *declarator; struct c_declspecs *specs = build_null_declspecs (); @@ -1431,11 +1751,21 @@ c_parser_gimple_declaration (c_parser *parser) /* Parse gimple goto statement. */ static void -c_parser_gimple_goto_stmt (location_t loc, tree label, gimple_seq *seq) +c_parser_gimple_goto_stmt (gimple_parser &parser, + location_t loc, tree label, gimple_seq *seq) { + if (cfun->curr_properties & PROP_cfg) + { + int dest_index; + if (c_parser_gimple_parse_bb_spec (label, &dest_index)) + { + parser.push_edge (parser.current_bb->index, dest_index, + EDGE_FALLTHRU); + return; + } + } tree decl = lookup_label_for_goto (loc, label); - gimple_seq_add_stmt (seq, gimple_build_goto (decl)); - return; + gimple_seq_add_stmt_without_update (seq, gimple_build_goto (decl)); } /* Parse a parenthesized condition. @@ -1443,7 +1773,7 @@ c_parser_gimple_goto_stmt (location_t loc, tree label, gimple_seq *seq) ( gimple-binary-expression ) */ static tree -c_parser_gimple_paren_condition (c_parser *parser) +c_parser_gimple_paren_condition (gimple_parser &parser) { if (! c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) return error_mark_node; @@ -1462,9 +1792,9 @@ c_parser_gimple_paren_condition (c_parser *parser) */ static void -c_parser_gimple_if_stmt (c_parser *parser, gimple_seq *seq) +c_parser_gimple_if_stmt (gimple_parser &parser, gimple_seq *seq) { - tree t_label, f_label, label; + tree t_label = NULL_TREE, f_label = NULL_TREE, label; location_t loc; c_parser_consume_token (parser); tree cond = c_parser_gimple_paren_condition (parser); @@ -1480,7 +1810,13 @@ c_parser_gimple_if_stmt (c_parser *parser, gimple_seq *seq) } label = c_parser_peek_token (parser)->value; c_parser_consume_token (parser); - t_label = lookup_label_for_goto (loc, label); + int dest_index; + if ((cfun->curr_properties & PROP_cfg) + && c_parser_gimple_parse_bb_spec (label, &dest_index)) + parser.push_edge (parser.current_bb->index, dest_index, + EDGE_TRUE_VALUE); + else + t_label = lookup_label_for_goto (loc, label); if (! c_parser_require (parser, CPP_SEMICOLON, "expected %<;%>")) return; } @@ -1508,7 +1844,13 @@ c_parser_gimple_if_stmt (c_parser *parser, gimple_seq *seq) return; } label = c_parser_peek_token (parser)->value; - f_label = lookup_label_for_goto (loc, label); + int dest_index; + if ((cfun->curr_properties & PROP_cfg) + && c_parser_gimple_parse_bb_spec (label, &dest_index)) + parser.push_edge (parser.current_bb->index, dest_index, + EDGE_FALSE_VALUE); + else + f_label = lookup_label_for_goto (loc, label); c_parser_consume_token (parser); if (! c_parser_require (parser, CPP_SEMICOLON, "expected %<;%>")) return; @@ -1520,7 +1862,7 @@ c_parser_gimple_if_stmt (c_parser *parser, gimple_seq *seq) } if (cond != error_mark_node) - gimple_seq_add_stmt (seq, gimple_build_cond_from_tree (cond, t_label, + gimple_seq_add_stmt_without_update (seq, gimple_build_cond_from_tree (cond, t_label, f_label)); } @@ -1535,13 +1877,12 @@ c_parser_gimple_if_stmt (c_parser *parser, gimple_seq *seq) */ static void -c_parser_gimple_switch_stmt (c_parser *parser, gimple_seq *seq) +c_parser_gimple_switch_stmt (gimple_parser &parser, gimple_seq *seq) { c_expr cond_expr; tree case_label, label; auto_vec labels; tree default_label = NULL_TREE; - gimple_seq switch_body = NULL; c_parser_consume_token (parser); if (! c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) @@ -1629,32 +1970,8 @@ c_parser_gimple_switch_stmt (c_parser *parser, gimple_seq *seq) return; break; } - case RID_GOTO: - { - location_t loc = c_parser_peek_token (parser)->location; - c_parser_consume_token (parser); - if (c_parser_next_token_is (parser, CPP_NAME)) - { - c_parser_gimple_goto_stmt (loc, - c_parser_peek_token - (parser)->value, - &switch_body); - c_parser_consume_token (parser); - if (c_parser_next_token_is (parser, CPP_SEMICOLON)) - c_parser_consume_token (parser); - else - { - c_parser_error (parser, "expected semicolon"); - return; - } - } - else if (! c_parser_require (parser, CPP_NAME, - "expected label")) - return; - break; - } default: - c_parser_error (parser, "expected case label or goto statement"); + c_parser_error (parser, "expected case label"); return; } @@ -1664,16 +1981,15 @@ c_parser_gimple_switch_stmt (c_parser *parser, gimple_seq *seq) if (cond_expr.value != error_mark_node) { - gimple_seq_add_stmt (seq, gimple_build_switch (cond_expr.value, - default_label, labels)); - gimple_seq_add_seq (seq, switch_body); + gswitch *s = gimple_build_switch (cond_expr.value, default_label, labels); + gimple_seq_add_stmt_without_update (seq, s); } } /* Parse gimple return statement. */ static void -c_parser_gimple_return_stmt (c_parser *parser, gimple_seq *seq) +c_parser_gimple_return_stmt (gimple_parser &parser, gimple_seq *seq) { location_t loc = c_parser_peek_token (parser)->location; gimple *ret = NULL; @@ -1682,7 +1998,7 @@ c_parser_gimple_return_stmt (c_parser *parser, gimple_seq *seq) { c_finish_gimple_return (loc, NULL_TREE); ret = gimple_build_return (NULL); - gimple_seq_add_stmt (seq, ret); + gimple_seq_add_stmt_without_update (seq, ret); } else { @@ -1692,7 +2008,7 @@ c_parser_gimple_return_stmt (c_parser *parser, gimple_seq *seq) { c_finish_gimple_return (xloc, expr.value); ret = gimple_build_return (expr.value); - gimple_seq_add_stmt (seq, ret); + gimple_seq_add_stmt_without_update (seq, ret); } } } diff --git a/gcc/c/gimple-parser.h b/gcc/c/gimple-parser.h index ae912ee..383ad76 100644 --- a/gcc/c/gimple-parser.h +++ b/gcc/c/gimple-parser.h @@ -21,7 +21,8 @@ along with GCC; see the file COPYING3. If not see #define GCC_GIMPLE_PARSER_H /* Gimple parsing functions. */ -extern void c_parser_parse_gimple_body (c_parser *); -extern char *c_parser_gimple_or_rtl_pass_list (c_parser *); +extern void c_parser_parse_gimple_body (c_parser *, char *, + enum c_declspec_il); +extern void c_parser_gimple_or_rtl_pass_list (c_parser *, c_declspecs *); #endif diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c index 45ef09e..69bae0d 100644 --- a/gcc/gimple-pretty-print.c +++ b/gcc/gimple-pretty-print.c @@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see #include "stringpool.h" #include "attribs.h" #include "asan.h" +#include "cfgloop.h" #define INDENT(SPACE) \ do { int i; for (i = 0; i < SPACE; i++) pp_space (buffer); } while (0) @@ -2221,18 +2222,11 @@ dump_gimple_phi (pretty_printer *buffer, gphi *phi, int spc, bool comment, { if ((flags & TDF_LINENO) && gimple_phi_arg_has_location (phi, i)) dump_location (buffer, gimple_phi_arg_location (phi, i)); + basic_block src = gimple_phi_arg_edge (phi, i)->src; if (flags & TDF_GIMPLE) { - basic_block src = gimple_phi_arg_edge (phi, i)->src; - gimple *stmt = first_stmt (src); - if (!stmt || gimple_code (stmt) != GIMPLE_LABEL) - { - pp_string (buffer, "bb_"); - pp_decimal_int (buffer, src->index); - } - else - dump_generic_node (buffer, gimple_label_label (as_a (stmt)), 0, flags, - false); + pp_string (buffer, "__BB"); + pp_decimal_int (buffer, src->index); pp_string (buffer, ": "); } dump_generic_node (buffer, gimple_phi_arg_def (phi, i), spc, flags, @@ -2240,7 +2234,7 @@ dump_gimple_phi (pretty_printer *buffer, gphi *phi, int spc, bool comment, if (! (flags & TDF_GIMPLE)) { pp_left_paren (buffer); - pp_decimal_int (buffer, gimple_phi_arg_edge (phi, i)->src->index); + pp_decimal_int (buffer, src->index); pp_right_paren (buffer); } if (i < gimple_phi_num_args (phi) - 1) @@ -2706,7 +2700,12 @@ dump_gimple_bb_header (FILE *outf, basic_block bb, int indent, else { if (flags & TDF_GIMPLE) - fprintf (outf, "%*sbb_%d:\n", indent, "", bb->index); + { + fprintf (outf, "%*s__BB(%d", indent, "", bb->index); + if (bb->loop_father->header == bb) + fprintf (outf, ",loop_header(%d)", bb->loop_father->num); + fprintf (outf, "):\n"); + } else fprintf (outf, "%*s %s:\n", indent, "", bb->index, dump_profile (bb->count)); @@ -2759,7 +2758,7 @@ pp_cfg_jump (pretty_printer *buffer, edge e, dump_flags_t flags) { if (flags & TDF_GIMPLE) { - pp_string (buffer, "goto bb_"); + pp_string (buffer, "goto __BB"); pp_decimal_int (buffer, e->dest->index); pp_semicolon (buffer); } @@ -2812,7 +2811,7 @@ dump_implicit_edges (pretty_printer *buffer, basic_block bb, int indent, goto to the dump. */ e = find_fallthru_edge (bb->succs); - if (e && e->dest != bb->next_bb) + if (e && (e->dest != bb->next_bb || (flags & TDF_GIMPLE))) { INDENT (indent); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a9c52a9..34f41e5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,20 @@ +2019-03-14 Richard Biener + + * gcc.dg/gimplefe-13.c: Adjust. + * gcc.dg/gimplefe-14.c: Likewise. + * gcc.dg/gimplefe-17.c: Likewise. + * gcc.dg/gimplefe-18.c: Likewise. + * gcc.dg/gimplefe-7.c: Likewise. + * gcc.dg/torture/pr89595.c: Likewise. + * gcc.dg/tree-ssa/cunroll-13.c: Likewise. + * gcc.dg/tree-ssa/ivopt_mult_1g.c: Likewise. + * gcc.dg/tree-ssa/ivopt_mult_2g.c: Likewise. + * gcc.dg/tree-ssa/scev-3.c: Likewise. + * gcc.dg/tree-ssa/scev-4.c: Likewise. + * gcc.dg/tree-ssa/scev-5.c: Likewise. + * gcc.dg/vect/vect-cond-arith-2.c: Likewise. + * gcc.target/aarch64/sve/loop_add_6.c: Likewise. + 2019-03-14 Jakub Jelinek PR ipa/89684 diff --git a/gcc/testsuite/gcc.dg/gimplefe-13.c b/gcc/testsuite/gcc.dg/gimplefe-13.c index f0af761..dc32686 100644 --- a/gcc/testsuite/gcc.dg/gimplefe-13.c +++ b/gcc/testsuite/gcc.dg/gimplefe-13.c @@ -1,25 +1,26 @@ /* { dg-do compile } */ /* { dg-options "-O -fgimple" } */ -void __GIMPLE (startwith ("dse2")) foo () +void __GIMPLE (ssa,startwith ("dse2")) foo () { int a; -bb_2: - if (a > 4) - goto bb_3; +__BB(2): + if (a_5(D) > 4) + goto __BB3; else - goto bb_4; + goto __BB4; -bb_3: +__BB(3): a_2 = 10; - goto bb_5; + goto __BB5; -bb_4: +__BB(4): a_3 = 20; + goto __BB5; -bb_5: - a_1 = __PHI (bb_3: a_2, bb_4: a_3); +__BB(5): + a_1 = __PHI (__BB3: a_2, __BB4: a_3); a_4 = a_1 + 4; return; diff --git a/gcc/testsuite/gcc.dg/gimplefe-14.c b/gcc/testsuite/gcc.dg/gimplefe-14.c index 1502229..a9e9d81 100644 --- a/gcc/testsuite/gcc.dg/gimplefe-14.c +++ b/gcc/testsuite/gcc.dg/gimplefe-14.c @@ -1,29 +1,33 @@ /* { dg-do run } */ /* { dg-options "-O -fgimple" } */ -int __GIMPLE () +int __GIMPLE (ssa) main (int argc, char * * argv) { int a; - bb_2: + __BB(2): /* Because of PR82114 we need to handle also 0 as base metal can have argc == 0. */ switch (argc_2(D)) {default: L2; case 0: L0; case 1: L0; case 2: L1; } + __BB(3): L0: a_4 = 0; - goto bb_6; + goto __BB6; + __BB(4): L1: a_3 = 3; - goto bb_6; + goto __BB6; + __BB(5): L2: a_5 = -1; + goto __BB6; - bb_6: - a_1 = __PHI (L0: a_4, L1: a_3, L2: a_5); + __BB(6): + a_1 = __PHI (__BB3: a_4, __BB4: a_3, __BB5: a_5); return a_1; } diff --git a/gcc/testsuite/gcc.dg/gimplefe-17.c b/gcc/testsuite/gcc.dg/gimplefe-17.c index c5633ee..eceefd1 100644 --- a/gcc/testsuite/gcc.dg/gimplefe-17.c +++ b/gcc/testsuite/gcc.dg/gimplefe-17.c @@ -1,26 +1,31 @@ /* { dg-do compile } */ -/* { dg-options "-fgimple -fdump-tree-ssa" } */ +/* { dg-options "-fgimple -fdump-tree-fixup_cfg2" } */ int -__GIMPLE () * +__GIMPLE (ssa) * foo () { int _1; int j; int *b; + +__BB(5): _1 = 1; -bb1: + goto __BB2; + +__BB(2): if (_1) - goto bb3; + goto __BB4; else - goto bb2; + goto __BB3; -bb2: +__BB(3): b_2 = (int *)0; + goto __BB4; -bb3: - b_4 = __PHI (bb1: b_3(D), bb2: b_2); +__BB(4): + b_4 = __PHI (__BB2: b_3(D), __BB3: b_2); return b_4; } -/* { dg-final { scan-tree-dump-not "_1_" "ssa" } } */ +/* { dg-final { scan-tree-dump-not "_1_" "fixup_cfg2" } } */ diff --git a/gcc/testsuite/gcc.dg/gimplefe-18.c b/gcc/testsuite/gcc.dg/gimplefe-18.c index ba918b2..18fabbe 100644 --- a/gcc/testsuite/gcc.dg/gimplefe-18.c +++ b/gcc/testsuite/gcc.dg/gimplefe-18.c @@ -2,23 +2,28 @@ /* { dg-options "-fgimple" } */ int -__GIMPLE () * +__GIMPLE (ssa) * foo () { int _1; int j; int *b; + +__BB(2): _1 = 1; -bb1: + goto __BB3; + +__BB(3): if (_1) - goto bb3; + goto __BB5; else - goto bb2; + goto __BB4; -bb2: +__BB(4): b_2 = (int *)0; + goto __BB5; -bb3: - b_4 = __PHI (bb1: &j, bb2: b_2); +__BB(5): + b_4 = __PHI (__BB3: &j, __BB4: b_2); return b_4; } diff --git a/gcc/testsuite/gcc.dg/gimplefe-7.c b/gcc/testsuite/gcc.dg/gimplefe-7.c index 6125541..ad34e85 100644 --- a/gcc/testsuite/gcc.dg/gimplefe-7.c +++ b/gcc/testsuite/gcc.dg/gimplefe-7.c @@ -1,25 +1,26 @@ /* { dg-do compile } */ /* { dg-options "-fgimple" } */ -void __GIMPLE () foo () +void __GIMPLE (ssa) foo () { int a; -bb_2: - if (a > 4) - goto bb_3; +__BB(2): + if (a_5(D) > 4) + goto __BB3; else - goto bb_4; + goto __BB4; -bb_3: +__BB(3): a_2 = 10; - goto bb_5; + goto __BB5; -bb_4: +__BB(4): a_3 = 20; + goto __BB5; -bb_5: - a_1 = __PHI (bb_3: a_2, bb_4: a_3); +__BB(5): + a_1 = __PHI (__BB3: a_2, __BB4: a_3); a_4 = a_1 + 4; return; diff --git a/gcc/testsuite/gcc.dg/torture/pr89595.c b/gcc/testsuite/gcc.dg/torture/pr89595.c index ebd834f..f45dc98 100644 --- a/gcc/testsuite/gcc.dg/torture/pr89595.c +++ b/gcc/testsuite/gcc.dg/torture/pr89595.c @@ -2,33 +2,35 @@ /* { dg-additional-options "-fgimple" } */ int __attribute__((noipa)) -__GIMPLE(startwith("dom")) bar(int cond, int val) +__GIMPLE(ssa,startwith("dom")) bar(int cond, int val) { int i; +__BB(3): if (0 != 0) - goto bb_6; + goto __BB6; else - goto bb_2; + goto __BB2; -bb_2: +__BB(2): if (cond_5(D) != 0) - goto bb_4; + goto __BB4; else - goto bb_5; + goto __BB5; -bb_4: +__BB(4): i_6 = val_2(D); i_1 = val_2(D) > 0 ? i_6 : 0; + goto __BB5; -bb_5: - i_3 = __PHI (bb_4: i_1, bb_2: 0); +__BB(5): + i_3 = __PHI (__BB4: i_1, __BB2: 0); return i_3; -bb_6: +__BB(6): i_4 = 1; i_9 = 2; - goto bb_2; + goto __BB2; } int main() diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-13.c b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-13.c index 096380a..98cb56a 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-13.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-13.c @@ -9,7 +9,7 @@ typedef int i32; struct a {i32 a[8];i32 b;}; -void __GIMPLE (startwith("fix_loops")) +void __GIMPLE (ssa,startwith("fix_loops")) t (struct a * a) { i32 i; @@ -18,37 +18,37 @@ t (struct a * a) i32 _9; i32 _11; -bb_2: +__BB(2): _11 = a_6(D)->a[0]; if (_11 != _Literal (i32) 0) - goto bb_6; + goto __BB6; else - goto bb_3; + goto __BB3; -bb_3: +__BB(3): return; -bb_4: +__BB(4): _1 = _2 + _Literal (i32) 1; a_6(D)->a[i_19] = _1; i_8 = i_19 + _Literal (i32) 1; if (i_8 <= _Literal (i32) 123455) - goto bb_5; + goto __BB5; else - goto bb_3; + goto __BB3; -bb_5: - i_19 = __PHI (bb_6: _Literal (i32) 1, bb_4: i_8); +__BB(5): + i_19 = __PHI (__BB6: _Literal (i32) 1, __BB4: i_8); _2 = a_6(D)->a[i_19]; if (_2 != _Literal (i32) 0) - goto bb_4; + goto __BB4; else - goto bb_3; + goto __BB3; -bb_6: +__BB(6): _9 = _11 + _Literal (i32) 1; a_6(D)->a[0] = _9; - goto bb_5; + goto __BB5; } /* This testcase relies on the fact that we do not eliminate the redundant test diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_1g.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_1g.c index ac1346c..43554c2 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_1g.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_1g.c @@ -3,7 +3,7 @@ /* The test 'if (p2 > p_limit2)' can be replaced, so iv p2 can be * eliminated. */ -long int __GIMPLE (startwith("fix_loops")) +long int __GIMPLE (ssa,startwith("fix_loops")) foo (long int * p, long int * p2, int N1, int N2) { long int s; @@ -15,7 +15,7 @@ foo (long int * p, long int * p2, int N1, int N2) long unsigned int _4; long int _5; - bb_2: + __BB(2): _1 = (long unsigned int) N1_10(D); _2 = _1 * 8ul; p_limit_12 = p_11(D) + _2; @@ -23,59 +23,60 @@ foo (long int * p, long int * p2, int N1, int N2) _4 = _3 * 8ul; p_limit2_15 = p2_14(D) + _4; if (p_11(D) <= p_limit_12) - goto bb_3; + goto __BB3; else - goto bb_13; + goto __BB13; - bb_13: + __BB(13): + goto __BB9; - bb_9: - goto bb_6; + __BB(9): + goto __BB6; - bb_3: + __BB(3): p_20 = p_11(D) + 8ul; p2_23 = p2_14(D) + 8ul; if (p_limit2_15 < p2_23) - goto bb_14; + goto __BB14; else - goto bb_7; + goto __BB7; - bb_14: - goto bb_9; + __BB(14): + goto __BB9; - bb_7: - goto bb_5; + __BB(7): + goto __BB5; - bb_4: + __BB(4): p_16 = p_26 + 8ul; p2_17 = p2_27 + 8ul; if (p_limit2_15 < p2_17) - goto bb_11; + goto __BB11; else - goto bb_8; + goto __BB8; - bb_11: - goto bb_6; + __BB(11): + goto __BB6; - bb_8: - ; + __BB(8): + goto __BB5; - bb_5: - s_24 = __PHI (bb_7: 0l, bb_8: s_19); - p_26 = __PHI (bb_7: p_20, bb_8: p_16); - p2_27 = __PHI (bb_7: p2_23, bb_8: p2_17); + __BB(5): + s_24 = __PHI (__BB7: 0l, __BB8: s_19); + p_26 = __PHI (__BB7: p_20, __BB8: p_16); + p2_27 = __PHI (__BB7: p2_23, __BB8: p2_17); _5 = __MEM (p_26); s_19 = _5 + s_24; if (p_limit_12 >= p_26) - goto bb_4; + goto __BB4; else - goto bb_12; + goto __BB12; - bb_12: - ; + __BB(12): + goto __BB6; - bb_6: - s_25 = __PHI (bb_12: s_19, bb_11: s_19, bb_9: 0l); + __BB(6): + s_25 = __PHI (__BB12: s_19, __BB11: s_19, __BB9: 0l); return s_25; } diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_2g.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_2g.c index 38f5476..dd06e59 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_2g.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_2g.c @@ -3,7 +3,7 @@ /* Exit tests 'i < N1' and 'p2 > p_limit2' can be replaced, so * two ivs i and p2 can be eliminate. */ -long int __GIMPLE (startwith("fix_loops")) +long int __GIMPLE (ssa,startwith("fix_loops")) foo (long int * p, long int * p2, int N1, int N2) { long int s; @@ -13,66 +13,67 @@ foo (long int * p, long int * p2, int N1, int N2) long unsigned int _2; long int _3; - bb_2: + __BB(2): _1 = (long unsigned int) N2_9(D); _2 = _1 * 8ul; p_limit2_11 = p2_10(D) + _2; if (N1_13(D) > 0) - goto bb_3; + goto __BB3; else - goto bb_13; + goto __BB13; - bb_13: + __BB(13): + goto __BB9; - bb_9: - goto bb_6; + __BB(9): + goto __BB6; - bb_3: + __BB(3): p_22 = p_12(D) + 8ul; p2_23 = p2_10(D) + 8ul; if (p_limit2_11 < p2_23) - goto bb_14; + goto __BB14; else - goto bb_7; + goto __BB7; - bb_14: - goto bb_9; + __BB(14): + goto __BB9; - bb_7: - goto bb_5; + __BB(7): + goto __BB5; - bb_4: + __BB(4): p_14 = p_27 + 8ul; p2_15 = p2_28 + 8ul; i_16 = i_29 + 1; if (p_limit2_11 < p2_15) - goto bb_11; + goto __BB11; else - goto bb_8; + goto __BB8; - bb_11: - goto bb_6; + __BB(11): + goto __BB6; - bb_8: - ; + __BB(8): + goto __BB5; - bb_5: - s_25 = __PHI (bb_7: 0l, bb_8: s_18); - p_27 = __PHI (bb_7: p_22, bb_8: p_14); - p2_28 = __PHI (bb_7: p2_23, bb_8: p2_15); - i_29 = __PHI (bb_7: 1, bb_8: i_16); + __BB(5): + s_25 = __PHI (__BB7: 0l, __BB8: s_18); + p_27 = __PHI (__BB7: p_22, __BB8: p_14); + p2_28 = __PHI (__BB7: p2_23, __BB8: p2_15); + i_29 = __PHI (__BB7: 1, __BB8: i_16); _3 = __MEM (p_27); s_18 = _3 + s_25; if (N1_13(D) > i_29) - goto bb_4; + goto __BB4; else - goto bb_12; + goto __BB12; - bb_12: - ; + __BB(12): + goto __BB6; - bb_6: - s_26 = __PHI (bb_12: s_18, bb_11: s_18, bb_9: 0l); + __BB(6): + s_26 = __PHI (__BB12: s_18, __BB11: s_18, __BB9: 0l); return s_26; } diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-3.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-3.c index fed1011..4babd33 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/scev-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-3.c @@ -4,39 +4,39 @@ int *a_p; int a[1000]; -void __GIMPLE (startwith ("loop")) +void __GIMPLE (ssa,startwith ("loop")) f (int k) { int i; int * _1; -bb_2: +__BB(2): i_5 = k_4(D); if (i_5 <= 999) - goto bb_4; + goto __BB4; else - goto bb_3; + goto __BB3; -bb_3: +__BB(3): return; -bb_4: - ; +__BB(4): + goto __BB5; -bb_5: - i_12 = __PHI (bb_6: i_9, bb_4: i_5); +__BB(5): + i_12 = __PHI (__BB6: i_9, __BB4: i_5); _1 = &a[i_12]; a_p = _1; __MEM ((int *)&a)[i_12] = 100; i_9 = i_5 + i_12; if (i_9 <= 999) - goto bb_6; + goto __BB6; else - goto bb_3; + goto __BB3; -bb_6: +__BB(6): ; - goto bb_5; + goto __BB5; } diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-4.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-4.c index 94ebfae..57cb021 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/scev-4.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-4.c @@ -9,39 +9,39 @@ typedef struct { int *a_p; S a[1000]; -void __GIMPLE (startwith ("loop")) +void __GIMPLE (ssa, startwith ("loop")) f (int k) { int i; int * _1; -bb_2: +__BB(2): i_5 = k_4(D); if (i_5 <= 999) - goto bb_4; + goto __BB4; else - goto bb_3; + goto __BB3; -bb_3: +__BB(3): return; -bb_4: - ; +__BB(4): + goto __BB5; -bb_5: - i_12 = __PHI (bb_6: i_9, bb_4: i_5); +__BB(5): + i_12 = __PHI (__BB6: i_9, __BB4: i_5); _1 = &a[i_12].y; a_p = _1; __MEM ((int *)&a)[i_12].y = 100; i_9 = i_5 + i_12; if (i_9 <= 999) - goto bb_6; + goto __BB6; else - goto bb_3; + goto __BB3; -bb_6: +__BB(6): ; - goto bb_5; + goto __BB5; } diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-5.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-5.c index 8cced51..c2feebd 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/scev-5.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-5.c @@ -4,39 +4,39 @@ int *a_p; int a[1000]; -void __GIMPLE (startwith ("loop")) +void __GIMPLE (ssa,startwith ("loop")) f (int k) { long long int i; int * _1; -bb_2: +__BB(2): i_5 = (long long int) k_4(D); if (i_5 <= 999ll) - goto bb_4; + goto __BB4; else - goto bb_3; + goto __BB3; -bb_3: +__BB(3): return; -bb_4: - ; +__BB(4): + goto __BB5; -bb_5: - i_12 = __PHI (bb_6: i_9, bb_4: i_5); +__BB(5): + i_12 = __PHI (__BB6: i_9, __BB4: i_5); _1 = &a[i_12]; a_p = _1; __MEM ((int *)&a)[i_12] = 100; i_9 = i_5 + i_12; if (i_9 <= 999ll) - goto bb_6; + goto __BB6; else - goto bb_3; + goto __BB3; -bb_6: +__BB(6): ; - goto bb_5; + goto __BB5; } diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-arith-2.c b/gcc/testsuite/gcc.dg/vect/vect-cond-arith-2.c index 15ec005..38994ea 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-cond-arith-2.c +++ b/gcc/testsuite/gcc.dg/vect/vect-cond-arith-2.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-additional-options "-fgimple -fdump-tree-optimized -ffast-math" } */ -double __GIMPLE (startwith("loop")) +double __GIMPLE (ssa, startwith("loop")) neg_xi (double *x) { int i; @@ -13,13 +13,13 @@ neg_xi (double *x) double res; unsigned int ivtmp; - bb_1: - goto bb_2; + __BB(5): + goto __BB2; - bb_2: - res_1 = __PHI (bb_1: 0.0, bb_3: res_2); - i_4 = __PHI (bb_1: 0, bb_3: i_5); - ivtmp_6 = __PHI (bb_1: 100U, bb_3: ivtmp_7); + __BB(2): + res_1 = __PHI (__BB5: 0.0, __BB3: res_2); + i_4 = __PHI (__BB5: 0, __BB3: i_5); + ivtmp_6 = __PHI (__BB5: 100U, __BB3: ivtmp_7); index = (long unsigned int) i_4; offset = index * 8UL; xi_ptr = x_8(D) + offset; @@ -29,15 +29,15 @@ neg_xi (double *x) i_5 = i_4 + 1; ivtmp_7 = ivtmp_6 - 1U; if (ivtmp_7 != 0U) - goto bb_3; + goto __BB3; else - goto bb_4; + goto __BB4; - bb_3: - goto bb_2; + __BB(3): + goto __BB2; - bb_4: - res_3 = __PHI (bb_2: res_2); + __BB(4): + res_3 = __PHI (__BB2: res_2); return res_3; } diff --git a/gcc/testsuite/gcc.target/aarch64/sve/loop_add_6.c b/gcc/testsuite/gcc.target/aarch64/sve/loop_add_6.c index aab5edd..e7416eb 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve/loop_add_6.c +++ b/gcc/testsuite/gcc.target/aarch64/sve/loop_add_6.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -ftree-vectorize -fgimple -ffast-math" } */ -double __GIMPLE (startwith("loop")) +double __GIMPLE (ssa, startwith("loop")) neg_xi (double *x) { int i; @@ -13,13 +13,13 @@ neg_xi (double *x) double res; unsigned int ivtmp; - bb_1: - goto bb_2; + __BB(5): + goto __BB2; - bb_2: - res_1 = __PHI (bb_1: 0.0, bb_3: res_2); - i_4 = __PHI (bb_1: 0, bb_3: i_5); - ivtmp_6 = __PHI (bb_1: 100U, bb_3: ivtmp_7); + __BB(2): + res_1 = __PHI (__BB5: 0.0, __BB3: res_2); + i_4 = __PHI (__BB5: 0, __BB3: i_5); + ivtmp_6 = __PHI (__BB5: 100U, __BB3: ivtmp_7); index = (long unsigned int) i_4; offset = index * 8UL; xi_ptr = x_8(D) + offset; @@ -29,15 +29,15 @@ neg_xi (double *x) i_5 = i_4 + 1; ivtmp_7 = ivtmp_6 - 1U; if (ivtmp_7 != 0U) - goto bb_3; + goto __BB3; else - goto bb_4; + goto __BB4; - bb_3: - goto bb_2; + __BB(3): + goto __BB2; - bb_4: - res_3 = __PHI (bb_2: res_2); + __BB(4): + res_3 = __PHI (__BB2: res_2); return res_3; } diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 805e872..0dc94ea 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -171,7 +171,6 @@ static bool gimple_can_merge_blocks_p (basic_block, basic_block); static void remove_bb (basic_block); static edge find_taken_edge_computed_goto (basic_block, tree); static edge find_taken_edge_cond_expr (const gcond *, tree); -static void lower_phi_internal_fn (); void init_empty_tree_cfg_for_function (struct function *fn) @@ -246,7 +245,6 @@ build_gimple_cfg (gimple_seq seq) discriminator_per_locus = new hash_table (13); make_edges (); assign_discriminators (); - lower_phi_internal_fn (); cleanup_dead_labels (); delete discriminator_per_locus; discriminator_per_locus = NULL; @@ -359,47 +357,6 @@ replace_loop_annotate (void) } } -/* Lower internal PHI function from GIMPLE FE. */ - -static void -lower_phi_internal_fn () -{ - basic_block bb, pred = NULL; - gimple_stmt_iterator gsi; - tree lhs; - gphi *phi_node; - gimple *stmt; - - /* After edge creation, handle __PHI function from GIMPLE FE. */ - FOR_EACH_BB_FN (bb, cfun) - { - for (gsi = gsi_after_labels (bb); !gsi_end_p (gsi);) - { - stmt = gsi_stmt (gsi); - if (! gimple_call_internal_p (stmt, IFN_PHI)) - break; - - lhs = gimple_call_lhs (stmt); - phi_node = create_phi_node (lhs, bb); - - /* Add arguments to the PHI node. */ - for (unsigned i = 0; i < gimple_call_num_args (stmt); ++i) - { - tree arg = gimple_call_arg (stmt, i); - if (TREE_CODE (arg) == LABEL_DECL) - pred = label_to_block (cfun, arg); - else - { - edge e = find_edge (pred, bb); - add_phi_arg (phi_node, arg, e, UNKNOWN_LOCATION); - } - } - - gsi_remove (&gsi, true); - } - } -} - static unsigned int execute_build_cfg (void) { @@ -3337,11 +3294,6 @@ verify_gimple_call (gcall *stmt) debug_generic_stmt (fn); return true; } - /* FIXME : for passing label as arg in internal fn PHI from GIMPLE FE*/ - else if (gimple_call_internal_fn (stmt) == IFN_PHI) - { - return false; - } } else { @@ -7922,7 +7874,11 @@ dump_function_to_file (tree fndecl, FILE *file, dump_flags_t flags) { print_generic_expr (file, TREE_TYPE (TREE_TYPE (fndecl)), dump_flags | TDF_SLIM); - fprintf (file, " __GIMPLE ()\n%s (", function_name (fun)); + fprintf (file, " __GIMPLE (%s)\n%s (", + (fun->curr_properties & PROP_ssa) ? "ssa" + : (fun->curr_properties & PROP_cfg) ? "cfg" + : "", + function_name (fun)); } else fprintf (file, "%s %s(", function_name (fun), tmclone ? "[tm-clone] " : ""); diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c index dad071d..061521d 100644 --- a/gcc/tree-into-ssa.c +++ b/gcc/tree-into-ssa.c @@ -1436,20 +1436,12 @@ rewrite_add_phi_arguments (basic_block bb) for (gsi = gsi_start_phis (e->dest); !gsi_end_p (gsi); gsi_next (&gsi)) { - tree currdef, res, argvar; + tree currdef, res; location_t loc; phi = gsi.phi (); res = gimple_phi_result (phi); - /* If we have pre-existing PHI (via the GIMPLE FE) its args may - be different vars than existing vars and they may be constants - as well. Note the following supports partial SSA for PHI args. */ - argvar = gimple_phi_arg_def (phi, e->dest_idx); - if (argvar && ! DECL_P (argvar)) - continue; - if (!argvar) - argvar = SSA_NAME_VAR (res); - currdef = get_reaching_def (argvar); + currdef = get_reaching_def (SSA_NAME_VAR (res)); /* Virtual operand PHI args do not need a location. */ if (virtual_operand_p (res)) loc = UNKNOWN_LOCATION; -- cgit v1.1 From 6965fa6db5b9755aff7d65084b3904fd04d717a8 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 14 Mar 2019 14:05:26 +0000 Subject: re PR target/89711 (ICE in insert_vi_for_tree, at tree-ssa-structalias.c:2832) 2019-03-14 Richard Biener PR target/89711 * config/i386/i386.c (make_resolver_func): Properly set DECL_CONTEXT on the RESULT_DECL. * config/rs6000/rs6000.c (make_resolver_func): Likewise. From-SVN: r269683 --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/i386.c | 1 + gcc/config/rs6000/rs6000.c | 1 + 3 files changed, 9 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 58c8a28..0c4f57f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2019-03-14 Richard Biener + PR target/89711 + * config/i386/i386.c (make_resolver_func): Properly set + DECL_CONTEXT on the RESULT_DECL. + * config/rs6000/rs6000.c (make_resolver_func): Likewise. + +2019-03-14 Richard Biener + * gimple-pretty-print.c: Include cfgloop.h. (dump_gimple_phi): Adjust. (dump_gimple_bb_header): Dump loop header for GIMPLE. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 1f94a45..783a810 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -32572,6 +32572,7 @@ make_resolver_func (const tree default_decl, } /* Build result decl and add to function_decl. */ t = build_decl (UNKNOWN_LOCATION, RESULT_DECL, NULL_TREE, ptr_type_node); + DECL_CONTEXT (t) = decl; DECL_ARTIFICIAL (t) = 1; DECL_IGNORED_P (t) = 1; DECL_RESULT (decl) = t; diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index a21f4f7..14d39ba 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -37467,6 +37467,7 @@ make_resolver_func (const tree default_decl, /* Build result decl and add to function_decl. */ tree t = build_decl (UNKNOWN_LOCATION, RESULT_DECL, NULL_TREE, ptr_type_node); + DECL_CONTEXT (t) = decl; DECL_ARTIFICIAL (t) = 1; DECL_IGNORED_P (t) = 1; DECL_RESULT (decl) = t; -- cgit v1.1 From 3ce5bdf77c33cb0b4be3fe9bd4584ce32e22b8dc Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 14 Mar 2019 15:19:33 +0100 Subject: Remove dead option from manual (PR other/89712). 2019-03-14 Martin Liska PR other/89712 * doc/invoke.texi: Remove -fdump-class-hierarchy option. From-SVN: r269684 --- gcc/ChangeLog | 5 +++++ gcc/doc/invoke.texi | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0c4f57f..aa4d8ed 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-03-14 Martin Liska + + PR other/89712 + * doc/invoke.texi: Remove -fdump-class-hierarchy option. + 2019-03-14 Richard Biener PR target/89711 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index df0883f..0a94151 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -583,7 +583,6 @@ Objective-C and Objective-C++ Dialects}. -fdisable-tree-@var{pass-name}=@var{range-list} @gol -fdump-debug -fdump-earlydebug @gol -fdump-noaddr -fdump-unnumbered -fdump-unnumbered-links @gol --fdump-class-hierarchy@r{[}-@var{n}@r{]} @gol -fdump-final-insns@r{[}=@var{file}@r{]} @gol -fdump-ipa-all -fdump-ipa-cgraph -fdump-ipa-inline @gol -fdump-lang-all @gol -- cgit v1.1 From c27722368bb7d52f6018a5d5861a7ca1b1ecdb98 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Thu, 14 Mar 2019 17:31:18 +0000 Subject: gfortran.texi: Document Q edit descriptor under " Extensions not implemented in GNU Fortran". 2019-03-14 Thomas Koenig * gfortran.texi: Document Q edit descriptor under " Extensions not implemented in GNU Fortran". From-SVN: r269690 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/gfortran.texi | 24 ++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 8264e59..c46d399 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2019-03-14 Thomas Koenig + + * gfortran.texi: Document Q edit descriptor under + " Extensions not implemented in GNU Fortran". + 2019-03-13 Harald Anlauf PR fortran/87045 diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index 0a26809..76c1f2d 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -2889,13 +2889,13 @@ code that uses them running with the GNU Fortran compiler. @menu * ENCODE and DECODE statements:: * Variable FORMAT expressions:: -@c * Q edit descriptor:: @c * TYPE and ACCEPT I/O Statements:: @c * DEFAULTFILE, DISPOSE and RECORDTYPE I/O specifiers:: @c * Omitted arguments in procedure call:: * Alternate complex function syntax:: * Volatile COMMON blocks:: * OPEN( ... NAME=):: +* Q edit descriptor:: @end menu @node ENCODE and DECODE statements @@ -3018,7 +3018,7 @@ invalid standard Fortran syntax and is not supported by @node OPEN( ... NAME=) @subsection @code{OPEN( ... NAME=)} -@cindex @code{NAM} +@cindex @code{NAME} Some Fortran compilers, including @command{g77}, let the user declare @code{OPEN( ... NAME=)}. This is @@ -3026,6 +3026,26 @@ invalid standard Fortran syntax and is not supported by @command{gfortran}. @code{OPEN( ... NAME=)} should be replaced with @code{OPEN( ... FILE=)}. +@node Q edit descriptor +@subsection @code{Q} edit descriptor +@cindex @code{Q} edit descriptor + +Some Fortran compilers provide the @code{Q} edit descriptor, which +transfers the number of characters left within an input record into an +integer variable. + +A direct replacement of the @code{Q} edit descriptor is not available +in @command{gfortran}. How to replicate its functionality using +standard-conforming code depends on what the intent of the original +code is. + +Options to replace @code{Q} may be to read the whole line into a +character variable and then counting the number of non-blank +characters left using @code{LEN_TRIM}. Another method may be to use +formatted stream, read the data up to the position where the @code{Q} +descriptor occurred, use @code{INQUIRE} to get the file position, +count the characters up to the next @code{NEW_LINE} and then start +reading from the position marked previously. @c --------------------------------------------------------------------- -- cgit v1.1 From aa9cedb4edf6b09b1b4f15ba837e387d72c347e8 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 14 Mar 2019 19:39:44 +0100 Subject: * gcc.target/i386/pr85860.c: Use target int128 instead of lp64. From-SVN: r269691 --- gcc/testsuite/gcc.target/i386/pr85860.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.target/i386/pr85860.c b/gcc/testsuite/gcc.target/i386/pr85860.c index aef78a4..a0982dc 100644 --- a/gcc/testsuite/gcc.target/i386/pr85860.c +++ b/gcc/testsuite/gcc.target/i386/pr85860.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target lp64 } } */ +/* { dg-do compile { target int128 } } */ /* { dg-options "-O2 -fno-guess-branch-probability -flive-range-shrinkage -mbmi2" } */ int a, b, c, d, e; -- cgit v1.1 From f869f40780836d1744ec973e6d0e9d948947d509 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 14 Mar 2019 15:53:04 -0400 Subject: Don't require 'bool' in a concept definition. * parser.c (cp_parser_decl_specifier_seq): Support C++20 concept-definition syntax without 'bool'. From-SVN: r269692 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/parser.c | 9 +++++++++ gcc/testsuite/g++.dg/concepts/no-bool1.C | 4 ++++ 3 files changed, 18 insertions(+) create mode 100644 gcc/testsuite/g++.dg/concepts/no-bool1.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 054a891..6c96c24 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2019-03-14 Jason Merrill + + * parser.c (cp_parser_decl_specifier_seq): Support C++20 + concept-definition syntax without 'bool'. + 2019-03-14 Jakub Jelinek PR c++/89512 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 14da1a1..b8a0245 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -13964,6 +13964,15 @@ cp_parser_decl_specifier_seq (cp_parser* parser, case RID_CONCEPT: ds = ds_concept; cp_lexer_consume_token (parser->lexer); + /* In C++20 a concept definition is just 'concept name = expr;' + Support that syntax by pretending we've seen 'bool'. */ + if (cp_lexer_next_token_is (parser->lexer, CPP_NAME) + && cp_lexer_nth_token_is (parser->lexer, 2, CPP_EQ)) + { + cp_parser_set_decl_spec_type (decl_specs, boolean_type_node, + token, /*type_definition*/false); + decl_specs->any_type_specifiers_p = true; + } break; /* function-specifier: diff --git a/gcc/testsuite/g++.dg/concepts/no-bool1.C b/gcc/testsuite/g++.dg/concepts/no-bool1.C new file mode 100644 index 0000000..be9b73a --- /dev/null +++ b/gcc/testsuite/g++.dg/concepts/no-bool1.C @@ -0,0 +1,4 @@ +// { dg-do compile { target c++14 } } +// { dg-additional-options -fconcepts } + +template concept True = true; -- cgit v1.1 From 12fb7712a8a20fce6f3dac80251e67251c01c209 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 14 Mar 2019 20:38:52 +0000 Subject: i386: Handle REG_EH_REGION note When we split: (insn 18 17 76 2 (set (reg:SF 88 [ _19 ]) (float:SF (mem/c:SI (symbol_ref:DI ("d") [flags 0x2] ) [1 d+0 S4 A32]))) "x.ii":4:20 170 {*floatsisf2} (expr_list:REG_EH_REGION (const_int 2 [0x2]) (nil))) to (insn 94 17 18 2 (set (reg:V4SF 115) (vec_merge:V4SF (vec_duplicate:V4SF (float:SF (mem/c:SI (symbol_ref:DI ("d") [flags 0x2] ) [1 d+0 S4 A32]))) (reg:V4SF 114) (const_int 1 [0x1]))) "x.ii":4:20 -1 (nil)) (insn 18 94 76 2 (set (reg:SF 88 [ _19 ]) (subreg:SF (reg:V4SF 115) 0)) "x.ii":4:20 112 {*movsf_internal} (expr_list:REG_EH_REGION (const_int 2 [0x2]) (nil))) we must copy the REG_EH_REGION note to the first insn and split the block after the newly added insn. The REG_EH_REGION on the second insn will be removed later since it no longer traps. gcc/ PR target/89650 * config/i386/i386.c (remove_partial_avx_dependency): Handle REG_EH_REGION note. gcc/testsuite/ PR target/89650 * g++.target/i386/pr89650.C: New test. From-SVN: r269694 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 30 ++++++++++++++++++++++++++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.target/i386/pr89650.C | 19 +++++++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 gcc/testsuite/g++.target/i386/pr89650.C (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aa4d8ed..4890c75 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-15 H.J. Lu + + PR target/89650 + * config/i386/i386.c (remove_partial_avx_dependency): Handle + REG_EH_REGION note. + 2019-03-14 Martin Liska PR other/89712 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 783a810..70e1011 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -2819,6 +2819,8 @@ remove_partial_avx_dependency (void) rtx set; rtx v4sf_const0 = NULL_RTX; + auto_vec control_flow_insns; + FOR_EACH_BB_FN (bb, cfun) { FOR_BB_INSNS (bb, insn) @@ -2875,6 +2877,17 @@ remove_partial_avx_dependency (void) set_insn = emit_insn_before (set, insn); df_insn_rescan (set_insn); + if (cfun->can_throw_non_call_exceptions) + { + /* Handle REG_EH_REGION note. */ + rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX); + if (note) + { + control_flow_insns.safe_push (set_insn); + add_reg_note (set_insn, REG_EH_REGION, XEXP (note, 0)); + } + } + src = gen_rtx_SUBREG (dest_mode, vec, 0); set = gen_rtx_SET (dest, src); @@ -2925,6 +2938,23 @@ remove_partial_avx_dependency (void) df_insn_rescan (set_insn); df_process_deferred_rescans (); loop_optimizer_finalize (); + + if (!control_flow_insns.is_empty ()) + { + free_dominance_info (CDI_DOMINATORS); + + unsigned int i; + FOR_EACH_VEC_ELT (control_flow_insns, i, insn) + if (control_flow_insn_p (insn)) + { + /* Split the block after insn. There will be a fallthru + edge, which is OK so we keep it. We have to create + the exception edges ourselves. */ + bb = BLOCK_FOR_INSN (insn); + split_block (bb, insn); + rtl_make_eh_edge (NULL, bb, BB_END (bb)); + } + } } bitmap_obstack_release (NULL); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 34f41e5..8f7288e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-15 H.J. Lu + + PR target/89650 + * g++.target/i386/pr89650.C: New test. + 2019-03-14 Richard Biener * gcc.dg/gimplefe-13.c: Adjust. diff --git a/gcc/testsuite/g++.target/i386/pr89650.C b/gcc/testsuite/g++.target/i386/pr89650.C new file mode 100644 index 0000000..4b253cb --- /dev/null +++ b/gcc/testsuite/g++.target/i386/pr89650.C @@ -0,0 +1,19 @@ +// { dg-do compile { target c++11 } } +// { dg-options "-O2 -flive-range-shrinkage -fno-tree-dce -fno-dce -fnon-call-exceptions -mavx" } + +int d, e; +struct g { + float f; + g(float h) : f(h + d) {} + ~g() {} +}; +struct i { + int a; + int b : 4; + int &c; + i(int h) : a(), b(), c(h) {} +}; +int main() { + i j(e); + g k[]{1, 2}; +} -- cgit v1.1 From 62de703f1990d2c4dd7ee0c41bfa886b5c589793 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 14 Mar 2019 18:47:01 -0400 Subject: hash-table.h (remove_elt_with_hash): Return if slot is NULL rather than if is_empty (*slot). * hash-table.h (remove_elt_with_hash): Return if slot is NULL rather than if is_empty (*slot). * hash-set-tests.c (test_set_of_strings): Add tests for addition of existing elt and for elt removal. * hash-map-tests.c (test_map_of_strings_to_int): Add test for removal of already removed elt. * hashtab.c (htab_remove_elt_with_hash): Return if slot is NULL rather than if *slot is HTAB_EMPTY_ENTRY. Co-Authored-By: Jakub Jelinek From-SVN: r269695 --- gcc/ChangeLog | 10 ++++++++++ gcc/hash-map-tests.c | 4 ++++ gcc/hash-set-tests.c | 15 +++++++++++++++ gcc/hash-table.h | 2 +- 4 files changed, 30 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4890c75..394271f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2019-03-14 Jason Merrill + Jakub Jelinek + + * hash-table.h (remove_elt_with_hash): Return if slot is NULL rather + than if is_empty (*slot). + * hash-set-tests.c (test_set_of_strings): Add tests for addition of + existing elt and for elt removal. + * hash-map-tests.c (test_map_of_strings_to_int): Add test for removal + of already removed elt. + 2019-03-15 H.J. Lu PR target/89650 diff --git a/gcc/hash-map-tests.c b/gcc/hash-map-tests.c index 2137464..acbfdb9 100644 --- a/gcc/hash-map-tests.c +++ b/gcc/hash-map-tests.c @@ -78,6 +78,10 @@ test_map_of_strings_to_int () ASSERT_EQ (5, m.elements ()); ASSERT_EQ (NULL, m.get (eric)); + m.remove (eric); + ASSERT_EQ (5, m.elements ()); + ASSERT_EQ (NULL, m.get (eric)); + /* A plain char * key is hashed based on its value (address), rather than the string it points to. */ char *another_ant = static_cast (xcalloc (4, 1)); diff --git a/gcc/hash-set-tests.c b/gcc/hash-set-tests.c index 5ca1e4e..f75d41a 100644 --- a/gcc/hash-set-tests.c +++ b/gcc/hash-set-tests.c @@ -48,11 +48,26 @@ test_set_of_strings () ASSERT_EQ (false, s.add (red)); ASSERT_EQ (false, s.add (green)); ASSERT_EQ (false, s.add (blue)); + ASSERT_EQ (true, s.add (green)); /* Verify that the values are now within the set. */ ASSERT_EQ (true, s.contains (red)); ASSERT_EQ (true, s.contains (green)); ASSERT_EQ (true, s.contains (blue)); + ASSERT_EQ (3, s.elements ()); + + /* Test removal. */ + s.remove (red); + ASSERT_EQ (false, s.contains (red)); + ASSERT_EQ (true, s.contains (green)); + ASSERT_EQ (true, s.contains (blue)); + ASSERT_EQ (2, s.elements ()); + + s.remove (red); + ASSERT_EQ (false, s.contains (red)); + ASSERT_EQ (true, s.contains (green)); + ASSERT_EQ (true, s.contains (blue)); + ASSERT_EQ (2, s.elements ()); } /* Run all of the selftests within this file. */ diff --git a/gcc/hash-table.h b/gcc/hash-table.h index 1fd3694..9e09fa4 100644 --- a/gcc/hash-table.h +++ b/gcc/hash-table.h @@ -940,7 +940,7 @@ hash_table ::remove_elt_with_hash (const compare_type &comparable, hashval_t hash) { value_type *slot = find_slot_with_hash (comparable, hash, NO_INSERT); - if (is_empty (*slot)) + if (slot == NULL) return; Descriptor::remove (*slot); -- cgit v1.1 From 928499cfeee9cba7cc63e4c8547f88306d8d45fb Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 15 Mar 2019 00:16:11 +0000 Subject: Daily bump. From-SVN: r269698 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 0449c25..5f83f80 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20190314 +20190315 -- cgit v1.1 From b1403b691a24fae2a96fa7ce5b93c3395e7bfd05 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 15 Mar 2019 04:34:43 +0000 Subject: compiler: eliminate bound checks in append expression The compiler generates two array index expressions when lowering an append expression. Currently they generate bound checks. Bound checks are not necessary in this case, as we know the slice has, or will grow to, enough length and capacity. Eliminate them. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166817 From-SVN: r269699 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/expressions.cc | 146 +++++++++++++++++++++------------------ gcc/go/gofrontend/expressions.h | 28 +++++--- 3 files changed, 99 insertions(+), 77 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index f3c52bf..61bcab2 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -946aa5ab2e82d045a2a3b2f18ba2c5b00e957c4b +80a7f6dae0861a06407a44c501b6346a4abd119c The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index f32b7a4..f41647a 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -8008,8 +8008,8 @@ Builtin_call_expression::flatten_append(Gogo* gogo, Named_object* function, ref = Expression::make_temporary_reference(s1tmp, loc); Expression* zero = Expression::make_integer_ul(0, int_type, loc); Expression* ref2 = Expression::make_temporary_reference(ntmp, loc); - // FIXME: Mark this index as not requiring bounds checks. - ref = Expression::make_index(ref, zero, ref2, NULL, loc); + ref = Expression::make_array_index(ref, zero, ref2, NULL, loc); + ref->array_index_expression()->set_needs_bounds_check(false); if (assign_lhs == NULL) { @@ -8058,8 +8058,8 @@ Builtin_call_expression::flatten_append(Gogo* gogo, Named_object* function, a1 = Expression::make_temporary_reference(s1tmp, loc); ref = Expression::make_temporary_reference(l1tmp, loc); Expression* nil = Expression::make_nil(loc); - // FIXME: Mark this index as not requiring bounds checks. - a1 = Expression::make_index(a1, ref, nil, NULL, loc); + a1 = Expression::make_array_index(a1, ref, nil, NULL, loc); + a1->array_index_expression()->set_needs_bounds_check(false); a2 = Expression::make_temporary_reference(s2tmp, loc); @@ -8086,9 +8086,9 @@ Builtin_call_expression::flatten_append(Gogo* gogo, Named_object* function, ref2 = Expression::make_temporary_reference(l1tmp, loc); Expression* off = Expression::make_integer_ul(i, int_type, loc); ref2 = Expression::make_binary(OPERATOR_PLUS, ref2, off, loc); - // FIXME: Mark this index as not requiring bounds checks. - Expression* lhs = Expression::make_index(ref, ref2, NULL, NULL, - loc); + Expression* lhs = Expression::make_array_index(ref, ref2, NULL, + NULL, loc); + lhs->array_index_expression()->set_needs_bounds_check(false); gogo->lower_expression(function, inserter, &lhs); gogo->flatten_expression(function, inserter, &lhs); // The flatten pass runs after the write barrier pass, so we @@ -11328,15 +11328,6 @@ Array_index_expression::do_get_backend(Translate_context* context) if (length == NULL) length = cap_arg; - int code = (array_type->length() != NULL - ? (this->end_ == NULL - ? RUNTIME_ERROR_ARRAY_INDEX_OUT_OF_BOUNDS - : RUNTIME_ERROR_ARRAY_SLICE_OUT_OF_BOUNDS) - : (this->end_ == NULL - ? RUNTIME_ERROR_SLICE_INDEX_OUT_OF_BOUNDS - : RUNTIME_ERROR_SLICE_SLICE_OUT_OF_BOUNDS)); - Bexpression* crash = gogo->runtime_error(code, loc)->get_backend(context); - if (this->start_->type()->integer_type() == NULL && !Type::are_convertible(int_type, this->start_->type(), NULL)) { @@ -11344,31 +11335,46 @@ Array_index_expression::do_get_backend(Translate_context* context) return context->backend()->error_expression(); } - Bexpression* bad_index = - Expression::check_bounds(this->start_, loc)->get_backend(context); - Bexpression* start = this->start_->get_backend(context); start = gogo->backend()->convert_expression(int_btype, start, loc); - Bexpression* start_too_large = - gogo->backend()->binary_expression((this->end_ == NULL - ? OPERATOR_GE - : OPERATOR_GT), - start, - (this->end_ == NULL - ? length - : capacity), - loc); - bad_index = gogo->backend()->binary_expression(OPERATOR_OROR, start_too_large, - bad_index, loc); + + Bexpression* crash = NULL; + Bexpression* bad_index = NULL; + if (this->needs_bounds_check_) + { + int code = (array_type->length() != NULL + ? (this->end_ == NULL + ? RUNTIME_ERROR_ARRAY_INDEX_OUT_OF_BOUNDS + : RUNTIME_ERROR_ARRAY_SLICE_OUT_OF_BOUNDS) + : (this->end_ == NULL + ? RUNTIME_ERROR_SLICE_INDEX_OUT_OF_BOUNDS + : RUNTIME_ERROR_SLICE_SLICE_OUT_OF_BOUNDS)); + crash = gogo->runtime_error(code, loc)->get_backend(context); + bad_index = Expression::check_bounds(this->start_, loc)->get_backend(context); + Bexpression* start_too_large = + gogo->backend()->binary_expression((this->end_ == NULL + ? OPERATOR_GE + : OPERATOR_GT), + start, + (this->end_ == NULL + ? length + : capacity), + loc); + bad_index = gogo->backend()->binary_expression(OPERATOR_OROR, + start_too_large, + bad_index, loc); + } + Bfunction* bfn = context->function()->func_value()->get_decl(); if (this->end_ == NULL) { // Simple array indexing. This has to return an l-value, so // wrap the index check into START. - start = - gogo->backend()->conditional_expression(bfn, int_btype, bad_index, - crash, start, loc); + if (this->needs_bounds_check_) + start = + gogo->backend()->conditional_expression(bfn, int_btype, bad_index, + crash, start, loc); Bexpression* ret; if (array_type->length() != NULL) @@ -11396,22 +11402,26 @@ Array_index_expression::do_get_backend(Translate_context* context) if (this->cap_ != NULL) { - Bexpression* bounds_bcheck = - Expression::check_bounds(this->cap_, loc)->get_backend(context); - bad_index = - gogo->backend()->binary_expression(OPERATOR_OROR, bounds_bcheck, - bad_index, loc); cap_arg = gogo->backend()->convert_expression(int_btype, cap_arg, loc); - Bexpression* cap_too_small = - gogo->backend()->binary_expression(OPERATOR_LT, cap_arg, start, loc); - Bexpression* cap_too_large = - gogo->backend()->binary_expression(OPERATOR_GT, cap_arg, capacity, loc); - Bexpression* bad_cap = - gogo->backend()->binary_expression(OPERATOR_OROR, cap_too_small, - cap_too_large, loc); - bad_index = gogo->backend()->binary_expression(OPERATOR_OROR, bad_cap, - bad_index, loc); + if (this->needs_bounds_check_) + { + Bexpression* bounds_bcheck = + Expression::check_bounds(this->cap_, loc)->get_backend(context); + bad_index = + gogo->backend()->binary_expression(OPERATOR_OROR, bounds_bcheck, + bad_index, loc); + + Bexpression* cap_too_small = + gogo->backend()->binary_expression(OPERATOR_LT, cap_arg, start, loc); + Bexpression* cap_too_large = + gogo->backend()->binary_expression(OPERATOR_GT, cap_arg, capacity, loc); + Bexpression* bad_cap = + gogo->backend()->binary_expression(OPERATOR_OROR, cap_too_small, + cap_too_large, loc); + bad_index = gogo->backend()->binary_expression(OPERATOR_OROR, bad_cap, + bad_index, loc); + } } Bexpression* end; @@ -11419,24 +11429,26 @@ Array_index_expression::do_get_backend(Translate_context* context) end = length; else { - Bexpression* bounds_bcheck = - Expression::check_bounds(this->end_, loc)->get_backend(context); - - bad_index = - gogo->backend()->binary_expression(OPERATOR_OROR, bounds_bcheck, - bad_index, loc); - end = this->end_->get_backend(context); end = gogo->backend()->convert_expression(int_btype, end, loc); - Bexpression* end_too_small = - gogo->backend()->binary_expression(OPERATOR_LT, end, start, loc); - Bexpression* end_too_large = - gogo->backend()->binary_expression(OPERATOR_GT, end, cap_arg, loc); - Bexpression* bad_end = - gogo->backend()->binary_expression(OPERATOR_OROR, end_too_small, - end_too_large, loc); - bad_index = gogo->backend()->binary_expression(OPERATOR_OROR, bad_end, - bad_index, loc); + if (this->needs_bounds_check_) + { + Bexpression* bounds_bcheck = + Expression::check_bounds(this->end_, loc)->get_backend(context); + bad_index = + gogo->backend()->binary_expression(OPERATOR_OROR, bounds_bcheck, + bad_index, loc); + + Bexpression* end_too_small = + gogo->backend()->binary_expression(OPERATOR_LT, end, start, loc); + Bexpression* end_too_large = + gogo->backend()->binary_expression(OPERATOR_GT, end, cap_arg, loc); + Bexpression* bad_end = + gogo->backend()->binary_expression(OPERATOR_OROR, end_too_small, + end_too_large, loc); + bad_index = gogo->backend()->binary_expression(OPERATOR_OROR, bad_end, + bad_index, loc); + } } Bexpression* result_length = @@ -11468,10 +11480,12 @@ Array_index_expression::do_get_backend(Translate_context* context) init.push_back(result_length); init.push_back(result_capacity); - Bexpression* ctor = + Bexpression* ret = gogo->backend()->constructor_expression(struct_btype, init, loc); - return gogo->backend()->conditional_expression(bfn, struct_btype, bad_index, - crash, ctor, loc); + if (this->needs_bounds_check_) + ret = gogo->backend()->conditional_expression(bfn, struct_btype, bad_index, + crash, ret, loc); + return ret; } // Dump ast representation for an array index expression. diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h index 5d61b69..c521d9b 100644 --- a/gcc/go/gofrontend/expressions.h +++ b/gcc/go/gofrontend/expressions.h @@ -2854,7 +2854,7 @@ class Array_index_expression : public Expression Expression* end, Expression* cap, Location location) : Expression(EXPRESSION_ARRAY_INDEX, location), array_(array), start_(start), end_(end), cap_(cap), type_(NULL), - is_lvalue_(false) + is_lvalue_(false), needs_bounds_check_(true) { } // Return the array. @@ -2898,6 +2898,10 @@ class Array_index_expression : public Expression set_is_lvalue() { this->is_lvalue_ = true; } + void + set_needs_bounds_check(bool b) + { this->needs_bounds_check_ = b; } + protected: int do_traverse(Traverse*); @@ -2917,15 +2921,17 @@ class Array_index_expression : public Expression Expression* do_copy() { - return Expression::make_array_index(this->array_->copy(), - this->start_->copy(), - (this->end_ == NULL - ? NULL - : this->end_->copy()), - (this->cap_ == NULL - ? NULL - : this->cap_->copy()), - this->location()); + Expression* ret = Expression::make_array_index(this->array_->copy(), + this->start_->copy(), + (this->end_ == NULL + ? NULL + : this->end_->copy()), + (this->cap_ == NULL + ? NULL + : this->cap_->copy()), + this->location()); + ret->array_index_expression()->set_needs_bounds_check(this->needs_bounds_check_); + return ret; } bool @@ -2962,6 +2968,8 @@ class Array_index_expression : public Expression Type* type_; // Whether expr appears in an lvalue context. bool is_lvalue_; + // Whether bounds check is needed. + bool needs_bounds_check_; }; // A string index. This is used for both indexing and slicing. -- cgit v1.1 From 8eb2215d8dc2662c3edad179b842097e0dce2722 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 15 Mar 2019 09:00:46 +0100 Subject: re PR debug/89704 (ICE in add_const_value_attribute, at dwarf2out.c:19685) PR debug/89704 * dwarf2out.c (add_const_value_attribute): Return false for MINUS, SIGN_EXTEND and ZERO_EXTEND. * gcc.dg/debug/pr89704.c: New test. From-SVN: r269700 --- gcc/ChangeLog | 6 ++++++ gcc/dwarf2out.c | 3 +++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/debug/pr89704.c | 14 ++++++++++++++ 4 files changed, 28 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/debug/pr89704.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 394271f..5bd943b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-15 Jakub Jelinek + + PR debug/89704 + * dwarf2out.c (add_const_value_attribute): Return false for MINUS, + SIGN_EXTEND and ZERO_EXTEND. + 2019-03-14 Jason Merrill Jakub Jelinek diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index c9f1e31..d9cefd3 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -19670,6 +19670,9 @@ add_const_value_attribute (dw_die_ref die, rtx rtl) case HIGH: case CONST_FIXED: + case MINUS: + case SIGN_EXTEND: + case ZERO_EXTEND: return false; case MEM: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8f7288e..8780192 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-15 Jakub Jelinek + + PR debug/89704 + * gcc.dg/debug/pr89704.c: New test. + 2019-03-15 H.J. Lu PR target/89650 diff --git a/gcc/testsuite/gcc.dg/debug/pr89704.c b/gcc/testsuite/gcc.dg/debug/pr89704.c new file mode 100644 index 0000000..4a8cf4f --- /dev/null +++ b/gcc/testsuite/gcc.dg/debug/pr89704.c @@ -0,0 +1,14 @@ +/* PR debug/89704 */ +/* { dg-do compile } */ + +typedef __INTPTR_TYPE__ intptr_t; + +int +foo (void) +{ + lab1:; + lab2:; + static int i = (intptr_t) &&lab1 - (intptr_t) &&lab2; + static int j = (intptr_t) &&lab1 - (intptr_t) &&lab2; + return i; +} -- cgit v1.1 From 4e6482d05be433b819e3ec9ab6f058d575f084ea Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 15 Mar 2019 10:23:11 +0100 Subject: re PR c++/89709 (ICE with constexpr and "-O") PR c++/89709 * tree.c (inchash::add_expr): Strip any location wrappers. * fold-const.c (operand_equal_p): Move stripping of location wrapper after hash verification. * g++.dg/cpp0x/constexpr-89709.C: New test. From-SVN: r269702 --- gcc/ChangeLog | 5 +++++ gcc/fold-const.c | 6 +++--- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/g++.dg/cpp0x/constexpr-89709.C | 18 ++++++++++++++++++ gcc/tree.c | 2 ++ 5 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-89709.C (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5bd943b..d7a4f38 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2019-03-15 Jakub Jelinek + PR c++/89709 + * tree.c (inchash::add_expr): Strip any location wrappers. + * fold-const.c (operand_equal_p): Move stripping of location wrapper + after hash verification. + PR debug/89704 * dwarf2out.c (add_const_value_attribute): Return false for MINUS, SIGN_EXTEND and ZERO_EXTEND. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index dbc9679..ec28b43 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -2942,9 +2942,6 @@ combine_comparisons (location_t loc, int operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags) { - STRIP_ANY_LOCATION_WRAPPER (arg0); - STRIP_ANY_LOCATION_WRAPPER (arg1); - /* When checking, verify at the outermost operand_equal_p call that if operand_equal_p returns non-zero then ARG0 and ARG1 has the same hash value. */ @@ -2967,6 +2964,9 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags) return 0; } + STRIP_ANY_LOCATION_WRAPPER (arg0); + STRIP_ANY_LOCATION_WRAPPER (arg1); + /* If either is ERROR_MARK, they aren't equal. */ if (TREE_CODE (arg0) == ERROR_MARK || TREE_CODE (arg1) == ERROR_MARK || TREE_TYPE (arg0) == error_mark_node diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8780192..4e267d3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-03-15 Jakub Jelinek + PR c++/89709 + * g++.dg/cpp0x/constexpr-89709.C: New test. + PR debug/89704 * gcc.dg/debug/pr89704.c: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-89709.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-89709.C new file mode 100644 index 0000000..30b319a --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-89709.C @@ -0,0 +1,18 @@ +// PR c++/89709 +// { dg-do compile { target c++11 } } +// { dg-options "-O" } + +struct A { int i; }; +A a; + +constexpr int * +foo () +{ + return &a.i; +} + +bool +bar () +{ + return foo () == &a.i; +} diff --git a/gcc/tree.c b/gcc/tree.c index 02721cf..d061a04 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -7743,6 +7743,8 @@ add_expr (const_tree t, inchash::hash &hstate, unsigned int flags) return; } + STRIP_ANY_LOCATION_WRAPPER (t); + if (!(flags & OEP_ADDRESS_OF)) STRIP_NOPS (t); -- cgit v1.1 From 03570b241091ca95d95c28e95bc48d52aa2d6c8d Mon Sep 17 00:00:00 2001 From: Kyrylo Tkachov Date: Fri, 15 Mar 2019 09:50:11 +0000 Subject: [AArch64] PR target/89719 Adjust gcc.target/aarch64/spellcheck*.c tests As of recently the -march,-mcpu,-mtune strings in the error messages are now quoted. This patch adjusts the testcases in gcc.target/aarch64/ that had started failing due to that change. PR target/89719 * gcc.target/aarch64/spellcheck_4.c: Adjust dg-error string. * gcc.target/aarch64/spellcheck_5.c: Likewise. * gcc.target/aarch64/spellcheck_6.c: Likewise. From-SVN: r269703 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.target/aarch64/spellcheck_4.c | 2 +- gcc/testsuite/gcc.target/aarch64/spellcheck_5.c | 2 +- gcc/testsuite/gcc.target/aarch64/spellcheck_6.c | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4e267d3..bb03f14 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-03-15 Kyrylo Tkachov + + PR target/89719 + * gcc.target/aarch64/spellcheck_4.c: Adjust dg-error string. + * gcc.target/aarch64/spellcheck_5.c: Likewise. + * gcc.target/aarch64/spellcheck_6.c: Likewise. + 2019-03-15 Jakub Jelinek PR c++/89709 diff --git a/gcc/testsuite/gcc.target/aarch64/spellcheck_4.c b/gcc/testsuite/gcc.target/aarch64/spellcheck_4.c index 37c9d3c..4e77e56 100644 --- a/gcc/testsuite/gcc.target/aarch64/spellcheck_4.c +++ b/gcc/testsuite/gcc.target/aarch64/spellcheck_4.c @@ -7,5 +7,5 @@ foo () { } -/* { dg-error "unknown value 'armv8-a-typo' for -march" "" { target *-*-* } 0 } */ +/* { dg-error "unknown value 'armv8-a-typo' for '-march'" "" { target *-*-* } 0 } */ /* { dg-message "valid arguments are: \[^\n\r]*(; did you mean 'armv*'?)?" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.target/aarch64/spellcheck_5.c b/gcc/testsuite/gcc.target/aarch64/spellcheck_5.c index 8ec581f..bf93adb 100644 --- a/gcc/testsuite/gcc.target/aarch64/spellcheck_5.c +++ b/gcc/testsuite/gcc.target/aarch64/spellcheck_5.c @@ -7,5 +7,5 @@ foo () { } -/* { dg-error "unknown value 'cortex-a17' for -mcpu" "" { target *-*-* } 0 } */ +/* { dg-error "unknown value 'cortex-a17' for '-mcpu'" "" { target *-*-* } 0 } */ /* { dg-message "valid arguments are: \[^\n\r]*; did you mean 'cortex-a57'?" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.target/aarch64/spellcheck_6.c b/gcc/testsuite/gcc.target/aarch64/spellcheck_6.c index 8fa491b..2ab2bee 100644 --- a/gcc/testsuite/gcc.target/aarch64/spellcheck_6.c +++ b/gcc/testsuite/gcc.target/aarch64/spellcheck_6.c @@ -7,5 +7,5 @@ foo () { } -/* { dg-error "unknown value 'cortex-a72-typo' for -mtune" "" { target *-*-* } 0 } */ +/* { dg-error "unknown value 'cortex-a72-typo' for '-mtune'" "" { target *-*-* } 0 } */ /* { dg-message "valid arguments are: \[^\n\r]*; did you mean 'cortex-a72'?" "" { target *-*-* } 0 } */ -- cgit v1.1 From ec15654627d34bf9fb4f7624c7659ac4912bef17 Mon Sep 17 00:00:00 2001 From: Robin Dapp Date: Fri, 15 Mar 2019 13:19:10 +0000 Subject: S/390: Fix tests that expect unquoted option names r269586 puts single quotes around option names. This patch fixes tests that expect the old format. From-SVN: r269706 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.target/s390/target-attribute/tattr-1.c | 2 +- gcc/testsuite/gcc.target/s390/target-attribute/tattr-2.c | 6 +++--- gcc/testsuite/gcc.target/s390/target-attribute/tattr-3.c | 2 +- gcc/testsuite/gcc.target/s390/target-attribute/tattr-4.c | 4 ++-- 5 files changed, 14 insertions(+), 7 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bb03f14..285dc51 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-03-15 Robin Dapp + + * gcc.target/s390/target-attribute/tattr-1.c (htm0): -mhtm -> '-mhtm'. + * gcc.target/s390/target-attribute/tattr-2.c: Likewise. + * gcc.target/s390/target-attribute/tattr-3.c (vx0): -mvx -> '-mvx'. + * gcc.target/s390/target-attribute/tattr-4.c: Likewise. + 2019-03-15 Kyrylo Tkachov PR target/89719 diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-1.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-1.c index 3164349..ff57344 100644 --- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-1.c +++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-1.c @@ -13,7 +13,7 @@ void htm1(void) __attribute__ ((target("arch=z10"))) void htm0(void) { - __builtin_tend(); /* { dg-error "is not supported without -mhtm" } */ + __builtin_tend(); /* { dg-error "is not supported without '-mhtm'" } */ } void htmd(void) diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-2.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-2.c index f0d282f..739c2ea 100644 --- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-2.c +++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-2.c @@ -20,7 +20,7 @@ void p0(void) #ifdef __HTM__ #error __HTM__ is defined #endif - __builtin_tend (); /* { dg-error "is not supported without -mhtm" } */ + __builtin_tend (); /* { dg-error "is not supported without '-mhtm'" } */ } #pragma GCC reset_options @@ -39,7 +39,7 @@ void a0(void) #ifdef __HTM__ #error __HTM__ is defined #endif - __builtin_tend (); /* { dg-error "is not supported without -mhtm" } */ + __builtin_tend (); /* { dg-error "is not supported without '-mhtm'" } */ } void htmd(void) @@ -47,5 +47,5 @@ void htmd(void) #ifdef __HTM__ #error __HTM__ is defined #endif - __builtin_tend (); /* { dg-error "is not supported without -mhtm" } */ + __builtin_tend (); /* { dg-error "is not supported without '-mhtm'" } */ } diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-3.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-3.c index 1af2274..769690e 100644 --- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-3.c +++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-3.c @@ -16,7 +16,7 @@ void vx1(void) __attribute__ ((target("arch=z10"))) void vx0(void) { - __builtin_s390_vll ((unsigned int)0, (const void *)8); /* { dg-error "requires -mvx" } */ + __builtin_s390_vll ((unsigned int)0, (const void *)8); /* { dg-error "requires '-mvx'" } */ } void vxd(void) diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-4.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-4.c index c501eca..cd813d9 100644 --- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-4.c +++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-4.c @@ -24,7 +24,7 @@ void a0(void) #ifdef __VEC__ #error __VEC__ is defined #endif - __builtin_s390_vll ((unsigned int)0, (const void *)8); /* { dg-error "requires -mvx" } */ + __builtin_s390_vll ((unsigned int)0, (const void *)8); /* { dg-error "requires '-mvx'" } */ } void d(void) @@ -32,5 +32,5 @@ void d(void) #ifdef __VEC__ #error __VEC__ is defined #endif - __builtin_s390_vll ((unsigned int)0, (const void *)8); /* { dg-error "requires -mvx" } */ + __builtin_s390_vll ((unsigned int)0, (const void *)8); /* { dg-error "requires '-mvx'" } */ } -- cgit v1.1 From d2025512b3fb357768d85ccde8e21f571481d00f Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Fri, 15 Mar 2019 13:37:07 +0000 Subject: re PR d/88990 (ICE in get_symbol_decl, at d/decl.cc:1097) PR d/88990 d/dmd: Merge upstream dmd 8d4c876c6 The extern storage class flag was wrongly propagated to function scope when starting the semantic pass on the body. Fixes https://gcc.gnu.org/PR88990 Reviewed-on: https://github.com/dlang/dmd/pull/9452 From-SVN: r269708 --- gcc/d/dmd/MERGE | 2 +- gcc/d/dmd/declaration.c | 1 + gcc/d/dmd/func.c | 2 +- gcc/testsuite/gdc.test/runnable/test19734.d | 38 +++++++++++++++++++++++++++++ gcc/testsuite/gdc.test/runnable/test19735.d | 22 +++++++++++++++++ 5 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gdc.test/runnable/test19734.d create mode 100644 gcc/testsuite/gdc.test/runnable/test19735.d (limited to 'gcc') diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index 5e4abe6..230fd12 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -19b1454b5ca7b1036ea5fde197d91d4a7d05c0a5 +8d4c876c658608e8f6e653803c534a9e15618f57 The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/declaration.c b/gcc/d/dmd/declaration.c index 6372e39..835c6ae 100644 --- a/gcc/d/dmd/declaration.c +++ b/gcc/d/dmd/declaration.c @@ -2008,6 +2008,7 @@ bool VarDeclaration::isDataseg() else if (storage_class & (STCstatic | STCextern | STCtls | STCgshared) || parent->isModule() || parent->isTemplateInstance() || parent->isNspace()) { + assert(!isParameter() && !isResult()); isdataseg = 1; // It is in the DataSegment } } diff --git a/gcc/d/dmd/func.c b/gcc/d/dmd/func.c index 4b7c223..afba82a 100644 --- a/gcc/d/dmd/func.c +++ b/gcc/d/dmd/func.c @@ -1437,7 +1437,7 @@ void FuncDeclaration::semantic3(Scope *sc) sc2->sw = NULL; sc2->fes = fes; sc2->linkage = LINKd; - sc2->stc &= ~(STCauto | STCscope | STCstatic | STCabstract | + sc2->stc &= ~(STCauto | STCscope | STCstatic | STCextern | STCabstract | STCdeprecated | STCoverride | STC_TYPECTOR | STCfinal | STCtls | STCgshared | STCref | STCreturn | STCproperty | STCnothrow | STCpure | STCsafe | STCtrusted | STCsystem); diff --git a/gcc/testsuite/gdc.test/runnable/test19734.d b/gcc/testsuite/gdc.test/runnable/test19734.d new file mode 100644 index 0000000..efa7da3 --- /dev/null +++ b/gcc/testsuite/gdc.test/runnable/test19734.d @@ -0,0 +1,38 @@ +// https://issues.dlang.org/show_bug.cgi?id=19734 +// REQUIRED_ARGS: -main + +class C19734 +{ + import core.stdc.stdarg; + + extern + { + // Invalid 'this' parameter because of applied 'extern' storage class. + void testin(typeof(this) p) + in { assert(this is p); } + body + { + } + + // Undefined reference to __result. + int testout() + out { assert(__result == 2); } + body + { + return 2; + } + + // Undefined reference to var. + int testlocal() + { + int var; + return var + 2; + } + + // Variable _argptr cannot have initializer. + int testvarargs(...) + { + return 0; + } + } +} diff --git a/gcc/testsuite/gdc.test/runnable/test19735.d b/gcc/testsuite/gdc.test/runnable/test19735.d new file mode 100644 index 0000000..8a1a5e7 --- /dev/null +++ b/gcc/testsuite/gdc.test/runnable/test19735.d @@ -0,0 +1,22 @@ +// https://issues.dlang.org/show_bug.cgi?id=19735 + +extern int test1(int par) +{ + int var = 42; + return var + par; +} + +extern +{ + int test2(int par) + { + int var = 42; + return var + par; + } +} + +void main() +{ + assert(test1(1) == test2(1)); +} + -- cgit v1.1 From ca7f909fba59f79d85f74ee0846bc9ed121ba7b2 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 15 Mar 2019 13:56:55 +0000 Subject: [PR88534] accept VAR_DECL in class literal template parms P0732R2 / C++ 2a introduce class literals as template parameters. The front-end uses VAR_DECLs constructed from such literals to bind the template PARM_DECLs, but dwarf2out.c used to reject such VAR_DECLs. Taking DECL_INITIAL from such VAR_DECLs enables the generation of DW_AT_const_value for them, at least when the class literal can actually be represented as such. for gcc/ChangeLog PR c++/88534 PR c++/88537 * dwarf2out.c (generic_parameter_die): Follow DECL_INITIAL of VAR_DECL args. for gcc/testsuite/ChangeLog PR c++/88534 PR c++/88537 * g++.dg/cpp2a/pr88534.C: New. * g++.dg/cpp2a/pr88537.C: New. From-SVN: r269709 --- gcc/ChangeLog | 7 ++++ gcc/dwarf2out.c | 7 ++++ gcc/testsuite/ChangeLog | 7 ++++ gcc/testsuite/g++.dg/cpp2a/pr88534.C | 65 ++++++++++++++++++++++++++++++++++++ gcc/testsuite/g++.dg/cpp2a/pr88537.C | 16 +++++++++ 5 files changed, 102 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp2a/pr88534.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/pr88537.C (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d7a4f38..dfec589 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-03-15 Alexandre Oliva + + PR c++/88534 + PR c++/88537 + * dwarf2out.c (generic_parameter_die): Follow DECL_INITIAL of + VAR_DECL args. + 2019-03-15 Jakub Jelinek PR c++/89709 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index d9cefd3..251fff7 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -13603,6 +13603,13 @@ generic_parameter_die (tree parm, tree arg, dw_die_ref tmpl_die = NULL; const char *name = NULL; + /* C++2a accepts class literals as template parameters, and var + decls with initializers represent them. The VAR_DECLs would be + rejected, but we can take the DECL_INITIAL constructor and + attempt to expand it. */ + if (arg && VAR_P (arg)) + arg = DECL_INITIAL (arg); + if (!parm || !DECL_NAME (parm) || !arg) return NULL; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 285dc51..139e45a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-03-15 Alexandre Oliva + + PR c++/88534 + PR c++/88537 + * g++.dg/cpp2a/pr88534.C: New. + * g++.dg/cpp2a/pr88537.C: New. + 2019-03-15 Robin Dapp * gcc.target/s390/target-attribute/tattr-1.c (htm0): -mhtm -> '-mhtm'. diff --git a/gcc/testsuite/g++.dg/cpp2a/pr88534.C b/gcc/testsuite/g++.dg/cpp2a/pr88534.C new file mode 100644 index 0000000..54faf38 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/pr88534.C @@ -0,0 +1,65 @@ +// { dg-do compile { target c++2a } } +// { dg-options "-g" } + +typedef __SIZE_TYPE__ size_t; + +namespace std +{ + +template +struct integer_sequence +{ + typedef T value_type; + static constexpr size_t size () noexcept { return sizeof...(I); } +}; + +template +using make_integer_sequence = integer_sequence; + +template +using index_sequence = integer_sequence; + +template +using make_index_sequence = make_integer_sequence; +} + +template struct S +{ + T content[N]; + using char_type = T; + template + constexpr S (const T (&input)[N], std::index_sequence) noexcept : content{input[I]...} { } + constexpr S (const T (&input)[N]) noexcept : S (input, std::make_index_sequence ()) { } + constexpr size_t size () const noexcept + { + if (content[N - 1] == '\0') + return N - 1; + else + return N; + } + constexpr T operator[] (size_t i) const noexcept + { + return content[i]; + } + constexpr const T *begin () const noexcept + { + return content; + } + constexpr const T *end () const noexcept + { + return content + size (); + } +}; + +template S (const T (&)[N]) -> S; + +template +struct F +{ +}; + +auto +foo () +{ + F<"test"> f; +} diff --git a/gcc/testsuite/g++.dg/cpp2a/pr88537.C b/gcc/testsuite/g++.dg/cpp2a/pr88537.C new file mode 100644 index 0000000..d558d45 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/pr88537.C @@ -0,0 +1,16 @@ +// { dg-do compile { target c++2a } } +// { dg-options "-g" } + +struct pair { + unsigned a; + unsigned b; + constexpr pair(unsigned _a, unsigned _b) noexcept: a{_a}, b{_b} { } +}; + +template void fnc() { + +} + +void f() { + fnc(); +} -- cgit v1.1 From 1cd04969e3067235f1ad9932f44b6df462f9f854 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 15 Mar 2019 15:50:34 +0000 Subject: compiler: use const rather than constexpr Fixes bootstrap with a C++98 compiler. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167762 From-SVN: r269710 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/ast-dump.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 61bcab2..18050a2 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -80a7f6dae0861a06407a44c501b6346a4abd119c +a99959e6a4a899cfcc4d46e6b54da15d23c58a14 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/ast-dump.cc b/gcc/go/gofrontend/ast-dump.cc index 0e90373..48e0065 100644 --- a/gcc/go/gofrontend/ast-dump.cc +++ b/gcc/go/gofrontend/ast-dump.cc @@ -610,7 +610,7 @@ class Type_dumper const char *tag); std::pair lookup(const Type*); - static constexpr unsigned notag = 0xffffffff; + static const unsigned notag = 0xffffffff; private: const Type* top_; -- cgit v1.1 From 167727579b725adba2e262129f664db474445273 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 15 Mar 2019 16:58:14 +0000 Subject: compiler: preserve nointerface property when inlining methods When an inline function (with body) is imported from another package, make that the "nointerface" property (if set) is preserved. Fixes golang/go#30862. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167742 From-SVN: r269713 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/gogo.cc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 18050a2..13c12e7 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -a99959e6a4a899cfcc4d46e6b54da15d23c58a14 +cc70be24502faeffefb66fd0abeb7f20a6c7792a The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index 757758e..a9630b2 100644 --- a/gcc/go/gofrontend/gogo.cc +++ b/gcc/go/gofrontend/gogo.cc @@ -6899,6 +6899,8 @@ Function_declaration::import_function_body(Gogo* gogo, Named_object* no) if (fntype->is_method()) { + if (this->nointerface()) + fn->set_nointerface(); const Typed_identifier* receiver = fntype->receiver(); Variable* recv_param = new Variable(receiver->type(), NULL, false, true, true, start_loc); -- cgit v1.1 From 30bb0e44d3893b27c6cd74c72a077e5a0d96a244 Mon Sep 17 00:00:00 2001 From: Kelvin Nilsen Date: Fri, 15 Mar 2019 19:52:43 +0000 Subject: re PR target/87532 (bad results from vec_extract(unsigned char, foo) dependent upon function inline) gcc/ChangeLog: 2019-03-15 Kelvin Nilsen PR target/87532 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): When handling vec_extract, use modular arithmetic to allow constant selectors greater than vector length. * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Allow V1TImode vectors to have constant selector values greater than 0. Use modular arithmetic to compute vector index. (rs6000_split_vec_extract_var): Use modular arithmetic to compute index for in-memory vectors. Correct code generation for in-register vectors. (altivec_expand_vec_ext_builtin): Use modular arithmetic to compute index. gcc/testsuite/ChangeLog: 2019-03-15 Kelvin Nilsen PR target/87532 * gcc.target/powerpc/fold-vec-extract-char.p8.c: Modify expected instruction selection. * gcc.target/powerpc/fold-vec-extract-int.p8.c: Likewise. * gcc.target/powerpc/fold-vec-extract-short.p8.c: Likewise. * gcc.target/powerpc/pr87532-mc.c: New test. * gcc.target/powerpc/pr87532.c: New test. * gcc.target/powerpc/vec-extract-v16qiu-v2.h: New test. * gcc.target/powerpc/vec-extract-v16qiu-v2a.c: New test. * gcc.target/powerpc/vec-extract-v16qiu-v2b.c: New test. * gcc.target/powerpc/vsx-builtin-10a.c: New test. * gcc.target/powerpc/vsx-builtin-10b.c: New test. * gcc.target/powerpc/vsx-builtin-11a.c: New test. * gcc.target/powerpc/vsx-builtin-11b.c: New test. * gcc.target/powerpc/vsx-builtin-12a.c: New test. * gcc.target/powerpc/vsx-builtin-12b.c: New test. * gcc.target/powerpc/vsx-builtin-13a.c: New test. * gcc.target/powerpc/vsx-builtin-13b.c: New test. * gcc.target/powerpc/vsx-builtin-14a.c: New test. * gcc.target/powerpc/vsx-builtin-14b.c: New test. * gcc.target/powerpc/vsx-builtin-15a.c: New test. * gcc.target/powerpc/vsx-builtin-15b.c: New test. * gcc.target/powerpc/vsx-builtin-16a.c: New test. * gcc.target/powerpc/vsx-builtin-16b.c: New test. * gcc.target/powerpc/vsx-builtin-17a.c: New test. * gcc.target/powerpc/vsx-builtin-17b.c: New test. * gcc.target/powerpc/vsx-builtin-18a.c: New test. * gcc.target/powerpc/vsx-builtin-18b.c: New test. * gcc.target/powerpc/vsx-builtin-19a.c: New test. * gcc.target/powerpc/vsx-builtin-19b.c: New test. * gcc.target/powerpc/vsx-builtin-20a.c: New test. * gcc.target/powerpc/vsx-builtin-20b.c: New test. * gcc.target/powerpc/vsx-builtin-9a.c: New test. * gcc.target/powerpc/vsx-builtin-9b.c: New test. From-SVN: r269715 --- gcc/ChangeLog | 15 ++ gcc/config/rs6000/rs6000-c.c | 12 +- gcc/config/rs6000/rs6000.c | 53 +++-- gcc/testsuite/ChangeLog | 37 +++ .../gcc.target/powerpc/fold-vec-extract-char.p8.c | 2 +- .../gcc.target/powerpc/fold-vec-extract-int.p8.c | 2 +- .../gcc.target/powerpc/fold-vec-extract-short.p8.c | 6 +- gcc/testsuite/gcc.target/powerpc/pr87532-mc.c | 258 +++++++++++++++++++++ gcc/testsuite/gcc.target/powerpc/pr87532.c | 72 ++++++ .../gcc.target/powerpc/vec-extract-v16qiu-v2.h | 253 ++++++++++++++++++++ .../gcc.target/powerpc/vec-extract-v16qiu-v2a.c | 14 ++ .../gcc.target/powerpc/vec-extract-v16qiu-v2b.c | 14 ++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-10a.c | 155 +++++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-10b.c | 155 +++++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-11a.c | 149 ++++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-11b.c | 149 ++++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-12a.c | 109 +++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-12b.c | 109 +++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-13a.c | 124 ++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-13b.c | 124 ++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-14a.c | 126 ++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-14b.c | 126 ++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-15a.c | 113 +++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-15b.c | 113 +++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-16a.c | 165 +++++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-16b.c | 165 +++++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-17a.c | 155 +++++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-17b.c | 155 +++++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-18a.c | 149 ++++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-18b.c | 149 ++++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-19a.c | 109 +++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-19b.c | 109 +++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-20a.c | 115 +++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-20b.c | 115 +++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-9a.c | 164 +++++++++++++ gcc/testsuite/gcc.target/powerpc/vsx-builtin-9b.c | 164 +++++++++++++ 36 files changed, 3981 insertions(+), 23 deletions(-) create mode 100644 gcc/testsuite/gcc.target/powerpc/pr87532-mc.c create mode 100644 gcc/testsuite/gcc.target/powerpc/pr87532.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-v2.h create mode 100644 gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-v2a.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-v2b.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-10a.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-10b.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-11a.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-11b.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-12a.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-12b.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-13a.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-13b.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-14a.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-14b.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-15a.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-15b.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-16a.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-16b.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-17a.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-17b.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-18a.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-18b.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-19a.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-19b.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-20a.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-20b.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-9a.c create mode 100644 gcc/testsuite/gcc.target/powerpc/vsx-builtin-9b.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dfec589..55d80e5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2019-03-15 Kelvin Nilsen + + PR target/87532 + * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): + When handling vec_extract, use modular arithmetic to allow + constant selectors greater than vector length. + * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Allow + V1TImode vectors to have constant selector values greater than 0. + Use modular arithmetic to compute vector index. + (rs6000_split_vec_extract_var): Use modular arithmetic to compute + index for in-memory vectors. Correct code generation for + in-register vectors. + (altivec_expand_vec_ext_builtin): Use modular arithmetic to + compute index. + 2019-03-15 Alexandre Oliva PR c++/88534 diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index ae39eb7..063d4ac 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -6565,12 +6565,14 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl, arg2 = fold_for_warn (arg2); - /* If the second argument is an integer constant, if the value is in - the expected range, generate the built-in code if we can. We need - 64-bit and direct move to extract the small integer vectors. */ - if (TREE_CODE (arg2) == INTEGER_CST - && wi::ltu_p (wi::to_wide (arg2), nunits)) + /* If the second argument is an integer constant, generate + the built-in code if we can. We need 64-bit and direct + move to extract the small integer vectors. */ + if (TREE_CODE (arg2) == INTEGER_CST) { + wide_int selector = wi::to_wide (arg2); + selector = wi::umod_trunc (selector, nunits); + arg2 = wide_int_to_tree (TREE_TYPE (arg2), selector); switch (mode) { default: diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 14d39ba..734c386 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -6894,7 +6894,6 @@ rs6000_expand_vector_extract (rtx target, rtx vec, rtx elt) default: break; case E_V1TImode: - gcc_assert (INTVAL (elt) == 0 && inner_mode == TImode); emit_move_insn (target, gen_lowpart (TImode, vec)); break; case E_V2DFmode: @@ -6974,18 +6973,32 @@ rs6000_expand_vector_extract (rtx target, rtx vec, rtx elt) } } - gcc_assert (CONST_INT_P (elt)); - /* Allocate mode-sized buffer. */ mem = assign_stack_temp (mode, GET_MODE_SIZE (mode)); emit_move_insn (mem, vec); + if (CONST_INT_P (elt)) + { + int modulo_elt = INTVAL (elt) % GET_MODE_NUNITS (mode); - /* Add offset to field within buffer matching vector element. */ - mem = adjust_address_nv (mem, inner_mode, - INTVAL (elt) * GET_MODE_SIZE (inner_mode)); + /* Add offset to field within buffer matching vector element. */ + mem = adjust_address_nv (mem, inner_mode, + modulo_elt * GET_MODE_SIZE (inner_mode)); + emit_move_insn (target, adjust_address_nv (mem, inner_mode, 0)); + } + else + { + unsigned int ele_size = GET_MODE_SIZE (inner_mode); + rtx num_ele_m1 = GEN_INT (GET_MODE_NUNITS (mode) - 1); + rtx new_addr = gen_reg_rtx (Pmode); - emit_move_insn (target, adjust_address_nv (mem, inner_mode, 0)); + elt = gen_rtx_AND (Pmode, elt, num_ele_m1); + if (ele_size > 1) + elt = gen_rtx_MULT (Pmode, elt, GEN_INT (ele_size)); + new_addr = gen_rtx_PLUS (Pmode, XEXP (mem, 0), elt); + new_addr = change_address (mem, inner_mode, new_addr); + emit_move_insn (target, new_addr); + } } /* Adjust a memory address (MEM) of a vector type to point to a scalar field @@ -7165,6 +7178,10 @@ rs6000_split_vec_extract_var (rtx dest, rtx src, rtx element, rtx tmp_gpr, systems. */ if (MEM_P (src)) { + int num_elements = GET_MODE_NUNITS (mode); + rtx num_ele_m1 = GEN_INT (num_elements - 1); + + emit_insn (gen_anddi3 (element, element, num_ele_m1)); gcc_assert (REG_P (tmp_gpr)); emit_move_insn (dest, rs6000_adjust_vec_address (dest, src, element, tmp_gpr, scalar_mode)); @@ -7173,7 +7190,9 @@ rs6000_split_vec_extract_var (rtx dest, rtx src, rtx element, rtx tmp_gpr, else if (REG_P (src) || SUBREG_P (src)) { - int bit_shift = byte_shift + 3; + int num_elements = GET_MODE_NUNITS (mode); + int bits_in_element = mode_to_bits (GET_MODE_INNER (mode)); + int bit_shift = 7 - exact_log2 (num_elements); rtx element2; unsigned int dest_regno = reg_or_subregno (dest); unsigned int src_regno = reg_or_subregno (src); @@ -7249,7 +7268,7 @@ rs6000_split_vec_extract_var (rtx dest, rtx src, rtx element, rtx tmp_gpr, { if (!BYTES_BIG_ENDIAN) { - rtx num_ele_m1 = GEN_INT (GET_MODE_NUNITS (mode) - 1); + rtx num_ele_m1 = GEN_INT (num_elements - 1); emit_insn (gen_anddi3 (tmp_gpr, element, num_ele_m1)); emit_insn (gen_subdi3 (tmp_gpr, num_ele_m1, tmp_gpr)); @@ -7307,8 +7326,8 @@ rs6000_split_vec_extract_var (rtx dest, rtx src, rtx element, rtx tmp_gpr, emit_insn (gen_vsx_vslo_v2di (tmp_altivec_di, src_v2di, tmp_altivec)); emit_move_insn (tmp_gpr_di, tmp_altivec_di); - emit_insn (gen_ashrdi3 (tmp_gpr_di, tmp_gpr_di, - GEN_INT (64 - (8 * scalar_size)))); + emit_insn (gen_lshrdi3 (tmp_gpr_di, tmp_gpr_di, + GEN_INT (64 - bits_in_element))); return; } @@ -14725,9 +14744,17 @@ altivec_expand_vec_ext_builtin (tree exp, rtx target) op0 = expand_normal (arg0); op1 = expand_normal (arg1); - /* Call get_element_number to validate arg1 if it is a constant. */ if (TREE_CODE (arg1) == INTEGER_CST) - (void) get_element_number (TREE_TYPE (arg0), arg1); + { + unsigned HOST_WIDE_INT elt; + unsigned HOST_WIDE_INT size = TYPE_VECTOR_SUBPARTS (TREE_TYPE (arg0)); + unsigned int truncated_selector; + /* Even if !tree_fits_uhwi_p (arg1)), TREE_INT_CST_LOW (arg0) + returns low-order bits of INTEGER_CST for modulo indexing. */ + elt = TREE_INT_CST_LOW (arg1); + truncated_selector = elt % size; + op1 = GEN_INT (truncated_selector); + } tmode = TYPE_MODE (TREE_TYPE (TREE_TYPE (arg0))); mode0 = TYPE_MODE (TREE_TYPE (arg0)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 139e45a..7acb52b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,40 @@ +2019-03-15 Kelvin Nilsen + + PR target/87532 + * gcc.target/powerpc/fold-vec-extract-char.p8.c: Modify expected + instruction selection. + * gcc.target/powerpc/fold-vec-extract-int.p8.c: Likewise. + * gcc.target/powerpc/fold-vec-extract-short.p8.c: Likewise. + * gcc.target/powerpc/pr87532-mc.c: New test. + * gcc.target/powerpc/pr87532.c: New test. + * gcc.target/powerpc/vec-extract-v16qiu-v2.h: New test. + * gcc.target/powerpc/vec-extract-v16qiu-v2a.c: New test. + * gcc.target/powerpc/vec-extract-v16qiu-v2b.c: New test. + * gcc.target/powerpc/vsx-builtin-10a.c: New test. + * gcc.target/powerpc/vsx-builtin-10b.c: New test. + * gcc.target/powerpc/vsx-builtin-11a.c: New test. + * gcc.target/powerpc/vsx-builtin-11b.c: New test. + * gcc.target/powerpc/vsx-builtin-12a.c: New test. + * gcc.target/powerpc/vsx-builtin-12b.c: New test. + * gcc.target/powerpc/vsx-builtin-13a.c: New test. + * gcc.target/powerpc/vsx-builtin-13b.c: New test. + * gcc.target/powerpc/vsx-builtin-14a.c: New test. + * gcc.target/powerpc/vsx-builtin-14b.c: New test. + * gcc.target/powerpc/vsx-builtin-15a.c: New test. + * gcc.target/powerpc/vsx-builtin-15b.c: New test. + * gcc.target/powerpc/vsx-builtin-16a.c: New test. + * gcc.target/powerpc/vsx-builtin-16b.c: New test. + * gcc.target/powerpc/vsx-builtin-17a.c: New test. + * gcc.target/powerpc/vsx-builtin-17b.c: New test. + * gcc.target/powerpc/vsx-builtin-18a.c: New test. + * gcc.target/powerpc/vsx-builtin-18b.c: New test. + * gcc.target/powerpc/vsx-builtin-19a.c: New test. + * gcc.target/powerpc/vsx-builtin-19b.c: New test. + * gcc.target/powerpc/vsx-builtin-20a.c: New test. + * gcc.target/powerpc/vsx-builtin-20b.c: New test. + * gcc.target/powerpc/vsx-builtin-9a.c: New test. + * gcc.target/powerpc/vsx-builtin-9b.c: New test. + 2019-03-15 Alexandre Oliva PR c++/88534 diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-char.p8.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-char.p8.c index 234740c..81a7a02 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-char.p8.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-char.p8.c @@ -18,7 +18,7 @@ /* { dg-final { scan-assembler-times {\mxxpermdi\M} 3 { target lp64 } } } */ /* { dg-final { scan-assembler-times {\mvslo\M} 3 { target lp64 } } } */ /* { dg-final { scan-assembler-times {\mmfvsrd\M} 6 { target lp64 } } } */ -/* { dg-final { scan-assembler-times {\msradi\M} 3 { target lp64 } } } */ +/* { dg-final { scan-assembler-times {\msrdi\M} 3 { target lp64 } } } */ /* { dg-final { scan-assembler-times "extsb" 2 } } */ /* { dg-final { scan-assembler-times {\mvspltb\M} 3 { target lp64 } } } */ /* { dg-final { scan-assembler-times {\mrlwinm\M} 2 { target lp64} } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-int.p8.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-int.p8.c index b23476e..637cdce 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-int.p8.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-int.p8.c @@ -21,7 +21,7 @@ /* { dg-final { scan-assembler-times {\mxxpermdi\M} 3 { target lp64 } } } */ /* { dg-final { scan-assembler-times {\mvslo\M} 3 { target lp64 } } } */ /* { dg-final { scan-assembler-times {\mmfvsrd\M} 3 { target lp64 } } } */ -/* { dg-final { scan-assembler-times {\msradi\M} 3 { target lp64 } } } */ +/* { dg-final { scan-assembler-times {\msrdi\M} 3 { target lp64 } } } */ /* { dg-final { scan-assembler-times {\mextsw\M} 2 { target lp64 } } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-short.p8.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-short.p8.c index 7ab0fc4..e9dd113 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-short.p8.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-extract-short.p8.c @@ -6,9 +6,9 @@ /* { dg-options "-mdejagnu-cpu=power8 -O2" } */ // six tests total. Targeting P8, both LE and BE. -// p8 (le) variable offset: rldicl, subfic, sldi, mtvsrd, xxpermdi, vslo, mfvsrd, sradi, *extsh +// p8 (le) variable offset: rldicl, subfic, sldi, mtvsrd, xxpermdi, vslo, mfvsrd, srdi, *extsh // p8 (le) const offset: mtvsrd, *extsh/rlwinm -// p8 (be) var offset: sldi, mtvsrd, xxpermdi, vslo, mfvsrd, sradi, *extsh +// p8 (be) var offset: sldi, mtvsrd, xxpermdi, vslo, mfvsrd, srdi, *extsh // p8 (be) const offset: vsplth, mfvsrd, *extsh/rlwinm // * - each of the above will have an extsh if the argument is signed. @@ -22,7 +22,7 @@ /* { dg-final { scan-assembler-times "xxpermdi" 3 { target lp64 } } } */ /* { dg-final { scan-assembler-times "vslo" 3 { target lp64 } } } */ /* { dg-final { scan-assembler-times "mfvsrd" 6 { target lp64 } } } */ -/* { dg-final { scan-assembler-times "sradi" 3 { target lp64 } } } */ +/* { dg-final { scan-assembler-times "srdi" 3 { target lp64 } } } */ /* { dg-final { scan-assembler-times "extsh" 2 { target lp64 } } } */ /* { dg-final { scan-assembler-times "rlwinm" 2 { target lp64 } } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr87532-mc.c b/gcc/testsuite/gcc.target/powerpc/pr87532-mc.c new file mode 100644 index 0000000..400df7f --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr87532-mc.c @@ -0,0 +1,258 @@ +/* { dg-do run { target int128 } } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec -O2" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include +#include +#include + +#include + +static vector unsigned __int128 +deoptimize_uint128 (vector unsigned __int128 a) +{ + __asm__ (" # %x0" : "+v" (a)); + return a; +} + +static vector unsigned long long int +deoptimize_ulong (vector unsigned long long int a) +{ + __asm__ (" # %x0" : "+v" (a)); + return a; +} + +static vector unsigned int +deoptimize_uint (vector unsigned int a) +{ + __asm__ (" # %x0" : "+v" (a)); + return a; +} + +static vector unsigned char +deoptimize_uchar (vector unsigned char a) +{ + __asm__ (" # %x0" : "+v" (a)); + return a; +} + +static vector unsigned short +deoptimize_ushort (vector unsigned short a) +{ + __asm__ (" # %x0" : "+v" (a)); + return a; +} + +__attribute ((noinline)) unsigned __int128 +get_auto_n_uint128 (vector unsigned __int128 a, int n) +{ + return __builtin_vec_extract (a, n); +} + +__attribute ((noinline)) unsigned long long int +get_auto_n_ulong (vector unsigned long long int a, int n) +{ + return __builtin_vec_extract (a, n); +} + +__attribute ((noinline)) +unsigned int get_auto_n_uint (vector unsigned int a, int n) +{ + return __builtin_vec_extract (a, n); +} + +__attribute ((noinline)) +unsigned char get_auto_n_uchar (vector unsigned char a, int n) +{ + return __builtin_vec_extract (a, n); +} + +__attribute ((noinline)) +unsigned short get_auto_n_ushort (vector unsigned short a, int n) +{ + return __builtin_vec_extract (a, n); +} + + +int check_uint128_element (int i, unsigned __int128 entry) +{ + printf ("checking uint128 entry at index %d\n", i); + + return (entry == ((((unsigned __int128) 0xffeeddccbbaa9988ULL) << 64) + | 0x0706050403020100ULL)); +} + +int check_ulong_element (int i, unsigned long long int entry) +{ + printf ("checking ulong entry 0x%llx at index %d\n", entry, i); + + switch (i % 2) + { + case 0: return (entry == 0x9999901010ULL); + case 1: return (entry == 0x7777733333ULL); + default: + return 0; + } +} + +int check_uint_element (int i, unsigned int entry) +{ + printf ("checking uint entry 0x%x at index %d\n", entry, i); + + switch (i % 4) + { + case 0: return (entry == 0x99999); + case 1: return (entry == 0x01010); + case 2: return (entry == 0x77777); + case 3: return (entry == 0x33333); + default: + return 0; + } +} + +int check_uchar_element (int i, unsigned char entry) +{ + printf ("checking uchar entry 0x%x at index %d\n", entry, i); + switch (i % 16) + { + case 0: return (entry == 0x90); + case 1: return (entry == 0x80); + case 2: return (entry == 0x70); + case 3: return (entry == 0x60); + case 4: return (entry == 0x50); + case 5: return (entry == 0x40); + case 6: return (entry == 0x30); + case 7: return (entry == 0x20); + case 8: return (entry == 0x10); + case 9: return (entry == 0xf0); + case 10: return (entry == 0xe0); + case 11: return (entry == 0xd0); + case 12: return (entry == 0xc0); + case 13: return (entry == 0xb0); + case 14: return (entry == 0xa0); + case 15: return (entry == 0xff); + default: + return 0; + } +} + +int check_ushort_element (int i, unsigned short entry) +{ + printf ("checking ushort entry 0x%x at index %d\n", entry, i); + switch (i % 8) + { + case 0: return (entry == 0x9988); + case 1: return (entry == 0x8877); + case 2: return (entry == 0x7766); + case 3: return (entry == 0x6655); + case 4: return (entry == 0x5544); + case 5: return (entry == 0x4433); + case 6: return (entry == 0x3322); + case 7: return (entry == 0x2211); + default: + return 0; + } +} + +void do_auto_uint128 ( vector unsigned __int128 a ) +{ + int i; + unsigned __int128 c; + for (i = 0; i < 32; i += 3) + { + c = get_auto_n_uint128 (a,i); + if (!check_uint128_element (i, c)) abort (); + } + } + +void do_auto_ulong ( vector unsigned long long int a ) +{ + int i; + unsigned long long int c; + for (i = 0; i < 32; i += 3) + { + c = get_auto_n_ulong (a,i); + if (!check_ulong_element (i, c)) abort (); + } + } + +void do_auto_uint ( vector unsigned int a ) +{ + int i; + unsigned int c; + for (i = 0; i < 32; i += 3) + { + c = get_auto_n_uint (a,i); + if (!check_uint_element (i, c)) abort (); + } + } + +void do_auto_ushort ( vector unsigned short a ) +{ + int i; + unsigned short c; + for (i = 0; i < 32; i += 3) + { + c = get_auto_n_ushort (a,i); + if (!check_ushort_element (i, c)) abort (); + } +} + +void do_auto_uchar ( vector unsigned char a ) +{ + int i; + unsigned char c; + for (i = 0; i < 32; i += 3) + { + c = get_auto_n_uchar (a,i); + if (!check_uchar_element (i, c)) abort (); + } +} + +int +main (void) +{ + size_t i; + + vector unsigned __int128 u = { + ((((unsigned __int128) 0xffeeddccbbaa9988ULL) << 64) + | 0x0706050403020100ULL) }; + vector unsigned __int128 du; + + vector unsigned long long int v = { 0x9999901010ULL, 0x7777733333ULL }; + vector unsigned long long int dv; + + vector unsigned int x = { 0x99999, 0x01010, 0x77777, 0x33333 }; + vector unsigned int dx; + + vector unsigned char y = { 0x90, 0x80, 0x70, 0x60, 0x50, 0x40, 0x30, 0x20, + 0x10, 0xf0, 0xe0, 0xd0, 0xc0, 0xb0, 0xa0, 0xff }; + vector unsigned char dy; + + vector unsigned short z = { 0x9988, 0x8877, 0x7766, 0x6655, + 0x5544, 0x4433, 0x3322, 0x2211 }; + vector unsigned short dz; + + do_auto_uint128 (u); + do_auto_ulong (v); + do_auto_uint (x); + do_auto_uchar (y); + do_auto_ushort (z); + + du = deoptimize_uint128 (u); + dv = deoptimize_ulong (v); + dx = deoptimize_uint (x); + dy = deoptimize_uchar (y); + dz = deoptimize_ushort (z); + + do_auto_uint128 (du); + do_auto_ulong (dv); + do_auto_uint (dx); + do_auto_uchar (dy); + do_auto_ushort (dz); + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/pr87532.c b/gcc/testsuite/gcc.target/powerpc/pr87532.c new file mode 100644 index 0000000..4b07f07 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr87532.c @@ -0,0 +1,72 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include +#include +#include +#include + +static void +check (unsigned char, unsigned char) __attribute__((__noinline__)); + +static __attribute__((altivec(vector__))) unsigned char +deoptimize (__attribute__((altivec(vector__))) unsigned char) +__attribute__((__noinline__)); + +static __attribute__((altivec(vector__))) unsigned char +deoptimize (__attribute__((altivec(vector__))) unsigned char a) +{ + __asm__ (" # %x0" : "+v" (a)); + return a; +} + +// Toggle this attribute inline/noinline to see pass/fail. +// fails with the noinline attribute applied. +__attribute__ ((__noinline__)) +unsigned char +get_auto_n (__attribute__((altivec(vector__))) unsigned char a, size_t n) +{ + return (unsigned char) __builtin_vec_extract (a, n); +} + +void +do_auto (__attribute__((altivec(vector__))) unsigned char a) +{ + size_t i; + for (i = 1; i < 3 ; i++) + { + do + { + printf ("get_auto_n (a, %d) produces 0x0%x\n", + i, (int) get_auto_n (a, i)); + + if ((int) get_auto_n (a,i) > 250) abort(); + } while (0); + } +} + +int +main (void) +{ + size_t i; + __attribute__((altivec(vector__))) unsigned char x = + { 3, 2, 3, 8, 5, 6, 7, 8, 240, 241, 242, 243, 244, 245, 246, 247 }; + __attribute__((altivec(vector__))) unsigned char a; + + printf (" first elements of x are: %d %d %d %d %d\n", + x[0], x[1], x[2], x[3], x[4]); + + a = deoptimize (x); + + printf (" after deoptimization, first elements of a are: %d %d %d %d %d\n", + a[0], a[1], a[2], a[3], a[4]); + + do_auto (a); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-v2.h b/gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-v2.h new file mode 100644 index 0000000..d115759 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-v2.h @@ -0,0 +1,253 @@ +#include +#include +#include + +#ifndef RTYPE +#define RTYPE TYPE +#endif + +#ifdef DO_TRACE +#include + +#define TRACE(STRING, NUM) \ +do \ + { \ + fprintf (stderr, "%s: %2d\n", STRING, (int) NUM); \ + fflush (stderr); \ + } \ +while (0) + +#ifndef FAIL_FORMAT +#define FAIL_FORMAT "%ld" +#define FAIL_CAST(X) ((long)(X)) +#endif + +#define FAIL(EXP, GOT) \ +do \ + { \ + fprintf (stderr, "Expected: " FAIL_FORMAT ", got " FAIL_FORMAT "\n", \ + FAIL_CAST (EXP), FAIL_CAST (GOT)); \ + fflush (stderr); \ + abort (); \ + } \ +while (0) + +#else +#define TRACE(STRING, NUM) +#define FAIL(EXP, GOT) abort () +#endif + +static void +check (RTYPE, RTYPE) __attribute__((__noinline__)); + +static vector TYPE +deoptimize (vector TYPE) __attribute__((__noinline__)); + +static vector TYPE +*deoptimize_ptr (vector TYPE *) __attribute__((__noinline__)); + +static void +check (RTYPE expected, RTYPE got) +{ + if (expected != got) + FAIL (expected, got); +} + +static vector TYPE +deoptimize (vector TYPE a) +{ + __asm__ (" # %x0" : "+v" (a)); + return a; +} + +static vector TYPE * +deoptimize_ptr (vector TYPE *p) +{ + __asm__ (" # %0" : "+r" (p)); + return p; +} + + +RTYPE +get_auto_0 (vector TYPE a) +{ + TRACE ("get_auto_", 0); + return (RTYPE) vec_extract (a, 0); +} + +RTYPE +get_auto_1 (vector TYPE a) +{ + TRACE ("get_auto_", 1); + return (RTYPE) vec_extract (a, 1); +} + +#if ELEMENTS >= 4 +RTYPE +get_auto_2 (vector TYPE a) +{ + return (RTYPE) vec_extract (a, 2); +} + +RTYPE +get_auto_3 (vector TYPE a) +{ + return (RTYPE) vec_extract (a, 3); +} + +#if ELEMENTS >= 8 +RTYPE +get_auto_4 (vector TYPE a) +{ + return (RTYPE) vec_extract (a, 4); +} + +RTYPE +get_auto_5 (vector TYPE a) +{ + return (RTYPE) vec_extract (a, 5); +} + +RTYPE +get_auto_6 (vector TYPE a) +{ + return (RTYPE) vec_extract (a, 6); +} + +RTYPE +get_auto_7 (vector TYPE a) +{ + return (RTYPE) vec_extract (a, 7); +} + +#if ELEMENTS >= 16 +RTYPE +get_auto_8 (vector TYPE a) +{ + return (RTYPE) vec_extract (a, 8); +} + +RTYPE +get_auto_9 (vector TYPE a) +{ + return (RTYPE) vec_extract (a, 9); +} + +RTYPE +get_auto_10 (vector TYPE a) +{ + return (RTYPE) vec_extract (a, 10); +} + +RTYPE +get_auto_11 (vector TYPE a) +{ + return (RTYPE) vec_extract (a, 11); +} + +RTYPE +get_auto_12 (vector TYPE a) +{ + return (RTYPE) vec_extract (a, 12); +} + +RTYPE +get_auto_13 (vector TYPE a) +{ + return (RTYPE) vec_extract (a, 13); +} + +RTYPE +get_auto_14 (vector TYPE a) +{ + return (RTYPE) vec_extract (a, 14); +} + +RTYPE +get_auto_15 (vector TYPE a) +{ + return (RTYPE) vec_extract (a, 15); +} + +#endif +#endif +#endif + + +/* Tests for the normal case of vec_extract where the vector is in a register + and returning the result in a register as a return value. */ +#ifdef DISABLE_INLINE_OF_GET_AUTO_N +__attribute__ ((__noinline__)) +#else +/* gcc issues warning: always_inline function might not be inlinable + + __attribute__ ((__always_inline__)) +*/ +#endif +RTYPE +get_auto_n (vector TYPE a, ssize_t n) +{ + return (RTYPE) vec_extract (a, n); +} + +typedef RTYPE (*auto_func_type) (vector TYPE); + +static auto_func_type get_auto_const[] = { + get_auto_0, + get_auto_1, +#if ELEMENTS >= 4 + get_auto_2, + get_auto_3, +#if ELEMENTS >= 8 + get_auto_4, + get_auto_5, + get_auto_6, + get_auto_7, +#if ELEMENTS >= 16 + get_auto_8, + get_auto_9, + get_auto_10, + get_auto_11, + get_auto_12, + get_auto_13, + get_auto_14, + get_auto_15, +#endif +#endif +#endif +}; + +extern void do_auto (vector TYPE a) __attribute__((__noinline__)); + +void +do_auto (vector TYPE a) +{ + size_t i; + + for (i = 1; i < 40; i += 3) + { + TRACE ("do_auto, i: ", i); + TRACE (" get_auto_const[i] returns: ", + (*get_auto_const [i % ELEMENTS]) (a)); + TRACE (" get_auto_n returns", get_auto_n (a, i)); + check (get_auto_n (a, i), (*get_auto_const [i % ELEMENTS]) (a)); + } +} + + + +/* Main program to test all of the possibilities. */ +int +main (void) +{ + size_t i; + vector TYPE x = INITIAL; + vector TYPE *p, *p2, a, y; + vector TYPE z[2]; + + a = deoptimize (x); + + do_auto (a); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-v2a.c b/gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-v2a.c new file mode 100644 index 0000000..05082b7 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-v2a.c @@ -0,0 +1,14 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vsx_hw } */ +/* { dg-options "-O2 -mvsx" } */ + +#define TYPE unsigned char +/* ELEMENTS is number of elements in a vector of TYPE. */ +#define ELEMENTS 16 +#define INITIAL \ + { 3, 2, 3, 4, 5, 6, 7, 8, 240, 241, 242, 243, 244, 245, 246, 247 } + +#define DO_TRACE +#define DISABLE_INLINE_OF_GET_AUTO_N + +#include "vec-extract-v16qiu-v2.h" diff --git a/gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-v2b.c b/gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-v2b.c new file mode 100644 index 0000000..87a3aa4 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-v2b.c @@ -0,0 +1,14 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vsx_hw } */ +/* { dg-options "-O2 -mvsx" } */ + +#define TYPE unsigned char +/* ELEMENTS is number of elements in a vector of TYPE. */ +#define ELEMENTS 16 +#define INITIAL \ + { 3, 2, 3, 4, 5, 6, 7, 8, 240, 241, 242, 243, 244, 245, 246, 247 } + +#define DO_TRACE +#undef DISABLE_INLINE_OF_GET_AUTO_N + +#include "vec-extract-v16qiu-v2.h" diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-10a.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-10a.c new file mode 100644 index 0000000..e8516de --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-10a.c @@ -0,0 +1,155 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (0) +#define CONST1 (1) +#define CONST2 (2) +#define CONST3 (3) +#define CONST4 (4) +#define CONST5 (5) +#define CONST6 (6) +#define CONST7 (7) + + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +short s3 (vector short v) +{ + return __builtin_vec_ext_v8hi (v, 3); +} + +short s7 (vector short v) +{ + return __builtin_vec_ext_v8hi (v, 7); +} + +short s21 (vector short v) +{ + return __builtin_vec_ext_v8hi (v, 21); +} + +short s30 (vector short v) +{ + return __builtin_vec_ext_v8hi (v, 30); +} + +/* Test for vector residing in memory. */ +short ms3 (vector short *vp) +{ + return __builtin_vec_ext_v8hi (*vp, 3); +} + +short ms7 (vector short *vp) +{ + return __builtin_vec_ext_v8hi (*vp, 7); +} + +short ms21 (vector short *vp) +{ + return __builtin_vec_ext_v8hi (*vp, 21); +} + +short ms30 (vector short *vp) +{ + return __builtin_vec_ext_v8hi (*vp, 30); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +short ci (vector short v, int i) +{ + return __builtin_vec_ext_v8hi (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +__attribute__((noinline)) +short mci (vector short *vp, int i) +{ + return __builtin_vec_ext_v8hi (*vp, i); +} + + +int main (int argc, short *argv[]) { + vector short sv = { + CONST0, CONST1, CONST2, CONST3, CONST4, CONST5, CONST6, CONST7 }; + short s; + + s = s3 (sv); + if (s != CONST3) + abort (); + + s = s7 (sv); + if (s != CONST7) + abort (); + + s = s21 (sv); + if (s != CONST5) + abort (); + + s = s30 (sv); + if (s != CONST6) + abort (); + + s = ms3 (&sv); + if (s != CONST3) + abort (); + + s = ms7 (&sv); + if (s != CONST7) + abort (); + + s = ms21 (&sv); + if (s != CONST5) + abort (); + + s = ms30 (&sv); + if (s != CONST6) + abort (); + + s = ci (sv, 5); + if (s != CONST5) + abort (); + + s = ci (sv, 2); + if (s != CONST2) + abort (); + + s = ci (sv, 15); + if (s != CONST7) + abort (); + + s = ci (sv, 28); + if (s != CONST4) + abort (); + + s = mci (&sv, 5); + if (s != CONST5) + abort (); + + s = mci (&sv, 12); + if (s != CONST4) + abort (); + + s = mci (&sv, 25); + if (s != CONST1) + abort (); + + s = mci (&sv, 16); + if (s != CONST0) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-10b.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-10b.c new file mode 100644 index 0000000..6300b0e --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-10b.c @@ -0,0 +1,155 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec -O3" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (0) +#define CONST1 (1) +#define CONST2 (2) +#define CONST3 (3) +#define CONST4 (4) +#define CONST5 (5) +#define CONST6 (6) +#define CONST7 (7) + + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +short s3 (vector short v) +{ + return __builtin_vec_ext_v8hi (v, 3); +} + +short s7 (vector short v) +{ + return __builtin_vec_ext_v8hi (v, 7); +} + +short s21 (vector short v) +{ + return __builtin_vec_ext_v8hi (v, 21); +} + +short s30 (vector short v) +{ + return __builtin_vec_ext_v8hi (v, 30); +} + +/* Test for vector residing in memory. */ +short ms3 (vector short *vp) +{ + return __builtin_vec_ext_v8hi (*vp, 3); +} + +short ms7 (vector short *vp) +{ + return __builtin_vec_ext_v8hi (*vp, 7); +} + +short ms21 (vector short *vp) +{ + return __builtin_vec_ext_v8hi (*vp, 21); +} + +short ms30 (vector short *vp) +{ + return __builtin_vec_ext_v8hi (*vp, 30); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +short ci (vector short v, int i) +{ + return __builtin_vec_ext_v8hi (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +__attribute__((noinline)) +short mci (vector short *vp, int i) +{ + return __builtin_vec_ext_v8hi (*vp, i); +} + + +int main (int argc, short *argv[]) { + vector short sv = { + CONST0, CONST1, CONST2, CONST3, CONST4, CONST5, CONST6, CONST7 }; + short s; + + s = s3 (sv); + if (s != CONST3) + abort (); + + s = s7 (sv); + if (s != CONST7) + abort (); + + s = s21 (sv); + if (s != CONST5) + abort (); + + s = s30 (sv); + if (s != CONST6) + abort (); + + s = ms3 (&sv); + if (s != CONST3) + abort (); + + s = ms7 (&sv); + if (s != CONST7) + abort (); + + s = ms21 (&sv); + if (s != CONST5) + abort (); + + s = ms30 (&sv); + if (s != CONST6) + abort (); + + s = ci (sv, 5); + if (s != CONST5) + abort (); + + s = ci (sv, 2); + if (s != CONST2) + abort (); + + s = ci (sv, 15); + if (s != CONST7) + abort (); + + s = ci (sv, 28); + if (s != CONST4) + abort (); + + s = mci (&sv, 5); + if (s != CONST5) + abort (); + + s = mci (&sv, 12); + if (s != CONST4) + abort (); + + s = mci (&sv, 25); + if (s != CONST1) + abort (); + + s = mci (&sv, 16); + if (s != CONST0) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-11a.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-11a.c new file mode 100644 index 0000000..e962e12 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-11a.c @@ -0,0 +1,149 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (0) +#define CONST1 (1) +#define CONST2 (2) +#define CONST3 (3) + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +int s3 (vector int v) +{ + return __builtin_vec_ext_v4si (v, 3); +} + +int s1 (vector int v) +{ + return __builtin_vec_ext_v4si (v, 1); +} + +int s21 (vector int v) +{ + return __builtin_vec_ext_v4si (v, 21); +} + +int s30 (vector int v) +{ + return __builtin_vec_ext_v4si (v, 30); +} + +/* Test for vector residing in memory. */ +int ms3 (vector int *vp) +{ + return __builtin_vec_ext_v4si (*vp, 3); +} + +int ms1(vector int *vp) +{ + return __builtin_vec_ext_v4si (*vp, 1); +} + +int ms21(vector int *vp) +{ + return __builtin_vec_ext_v4si (*vp, 21); +} + +int ms30(vector int *vp) +{ + return __builtin_vec_ext_v4si (*vp, 30); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +int ci (vector int v, int i) +{ + return __builtin_vec_ext_v4si (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +__attribute__((noinline)) +int mci(vector int *vp, int i) +{ + return __builtin_vec_ext_v4si (*vp, i); +} + + +int main (int argc, int *argv[]) { + vector int sv = { CONST0, CONST1, CONST2, CONST3 }; + int s; + + s = s3 (sv); + if (s != CONST3) + abort (); + + s = s1 (sv); + if (s != CONST1) + abort (); + + s = s21 (sv); + if (s != CONST1) + abort (); + + s = s30 (sv); + if (s != CONST2) + abort (); + + s = ms3 (&sv); + if (s != CONST3) + abort (); + + s = ms1 (&sv); + if (s != CONST1) + abort (); + + s = ms21 (&sv); + if (s != CONST1) + abort (); + + s = ms30 (&sv); + if (s != CONST2) + abort (); + + s = ci (sv, 5); + if (s != CONST1) + abort (); + + s = ci (sv, 2); + if (s != CONST2) + abort (); + + s = ci (sv, 15); + if (s != CONST3) + abort (); + + s = ci (sv, 28); + if (s != CONST0) + abort (); + + s = mci (&sv, 5); + if (s != CONST1) + abort (); + + s = mci (&sv, 12); + if (s != CONST0) + abort (); + + s = mci (&sv, 25); + if (s != CONST1) + abort (); + + s = mci (&sv, 16); + if (s != CONST0) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-11b.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-11b.c new file mode 100644 index 0000000..fafdd10 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-11b.c @@ -0,0 +1,149 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec -O3" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (0) +#define CONST1 (1) +#define CONST2 (2) +#define CONST3 (3) + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +int s3 (vector int v) +{ + return __builtin_vec_ext_v4si (v, 3); +} + +int s1 (vector int v) +{ + return __builtin_vec_ext_v4si (v, 1); +} + +int s21 (vector int v) +{ + return __builtin_vec_ext_v4si (v, 21); +} + +int s30 (vector int v) +{ + return __builtin_vec_ext_v4si (v, 30); +} + +/* Test for vector residing in memory. */ +int ms3 (vector int *vp) +{ + return __builtin_vec_ext_v4si (*vp, 3); +} + +int ms1(vector int *vp) +{ + return __builtin_vec_ext_v4si (*vp, 1); +} + +int ms21(vector int *vp) +{ + return __builtin_vec_ext_v4si (*vp, 21); +} + +int ms30(vector int *vp) +{ + return __builtin_vec_ext_v4si (*vp, 30); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +int ci (vector int v, int i) +{ + return __builtin_vec_ext_v4si (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +__attribute__((noinline)) +int mci(vector int *vp, int i) +{ + return __builtin_vec_ext_v4si (*vp, i); +} + + +int main (int argc, int *argv[]) { + vector int sv = { CONST0, CONST1, CONST2, CONST3 }; + int s; + + s = s3 (sv); + if (s != CONST3) + abort (); + + s = s1 (sv); + if (s != CONST1) + abort (); + + s = s21 (sv); + if (s != CONST1) + abort (); + + s = s30 (sv); + if (s != CONST2) + abort (); + + s = ms3 (&sv); + if (s != CONST3) + abort (); + + s = ms1 (&sv); + if (s != CONST1) + abort (); + + s = ms21 (&sv); + if (s != CONST1) + abort (); + + s = ms30 (&sv); + if (s != CONST2) + abort (); + + s = ci (sv, 5); + if (s != CONST1) + abort (); + + s = ci (sv, 2); + if (s != CONST2) + abort (); + + s = ci (sv, 15); + if (s != CONST3) + abort (); + + s = ci (sv, 28); + if (s != CONST0) + abort (); + + s = mci (&sv, 5); + if (s != CONST1) + abort (); + + s = mci (&sv, 12); + if (s != CONST0) + abort (); + + s = mci (&sv, 25); + if (s != CONST1) + abort (); + + s = mci (&sv, 16); + if (s != CONST0) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-12a.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-12a.c new file mode 100644 index 0000000..a79bc7f --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-12a.c @@ -0,0 +1,109 @@ +/* { dg-do run { target int128 } } */ +/* { dg-require-effective-target vsx_hw } */ +/* { dg-options "-mvsx" } */ + +/* This test should run the same on any target that supports vsx + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (31415926539LL) +#define CONST1 (2 * 31415926539LL) + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +long long int e0 (vector long long int v) +{ + return __builtin_vec_ext_v2di (v, 0); +} + +long long int e3 (vector long long int v) +{ + return __builtin_vec_ext_v2di (v, 3); +} + +/* Test for vector residing in memory. */ +long long int me0 (vector long long int *vp) +{ + return __builtin_vec_ext_v2di (*vp, 0); +} + +long long int me3 (vector long long int *vp) +{ + return __builtin_vec_ext_v2di (*vp, 3); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +long long int ei (vector long long int v, int i) +{ + return __builtin_vec_ext_v2di (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +long long int mei (vector long long int *vp, int i) +{ + return __builtin_vec_ext_v2di (*vp, i); +} + +int main (int argc, char *argv[]) { + vector long long int dv = { CONST0, CONST1 }; + long long int d; + + d = e0 (dv); + if (d != CONST0) + abort (); + + d = e3 (dv); + if (d != CONST1) + abort (); + + d = me0 (&dv); + if (d != CONST0) + abort (); + + d = me3 (&dv); + if (d != CONST1) + abort (); + + d = ei (dv, 0); + if (d != CONST0) + abort (); + + d = ei (dv, 1); + if (d != CONST1) + abort (); + + d = ei (dv, 2); + if (d != CONST0) + abort (); + + d = ei (dv, 3); + if (d != CONST1) + abort (); + + d = mei (&dv, 0); + if (d != CONST0) + abort (); + + d = mei (&dv, 1); + if (d != CONST1) + abort (); + + d = mei (&dv, 2); + if (d != CONST0) + abort (); + + d = mei (&dv, 3); + if (d != CONST1) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-12b.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-12b.c new file mode 100644 index 0000000..2b63624 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-12b.c @@ -0,0 +1,109 @@ +/* { dg-do run { target int128 } } */ +/* { dg-require-effective-target vsx_hw } */ +/* { dg-options "-mvsx -O3" } */ + +/* This test should run the same on any target that supports vsx + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (31415926539LL) +#define CONST1 (2 * 31415926539LL) + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +long long int e0 (vector long long int v) +{ + return __builtin_vec_ext_v2di (v, 0); +} + +long long int e3 (vector long long int v) +{ + return __builtin_vec_ext_v2di (v, 3); +} + +/* Test for vector residing in memory. */ +long long int me0 (vector long long int *vp) +{ + return __builtin_vec_ext_v2di (*vp, 0); +} + +long long int me3 (vector long long int *vp) +{ + return __builtin_vec_ext_v2di (*vp, 3); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +long long int ei (vector long long int v, int i) +{ + return __builtin_vec_ext_v2di (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +long long int mei (vector long long int *vp, int i) +{ + return __builtin_vec_ext_v2di (*vp, i); +} + +int main (int argc, char *argv[]) { + vector long long int dv = { CONST0, CONST1 }; + long long int d; + + d = e0 (dv); + if (d != CONST0) + abort (); + + d = e3 (dv); + if (d != CONST1) + abort (); + + d = me0 (&dv); + if (d != CONST0) + abort (); + + d = me3 (&dv); + if (d != CONST1) + abort (); + + d = ei (dv, 0); + if (d != CONST0) + abort (); + + d = ei (dv, 1); + if (d != CONST1) + abort (); + + d = ei (dv, 2); + if (d != CONST0) + abort (); + + d = ei (dv, 3); + if (d != CONST1) + abort (); + + d = mei (&dv, 0); + if (d != CONST0) + abort (); + + d = mei (&dv, 1); + if (d != CONST1) + abort (); + + d = mei (&dv, 2); + if (d != CONST0) + abort (); + + d = mei (&dv, 3); + if (d != CONST1) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-13a.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-13a.c new file mode 100644 index 0000000..907bcce --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-13a.c @@ -0,0 +1,124 @@ +/* { dg-do run { target int128 } } */ +/* { dg-require-effective-target vsx_hw } */ +/* { dg-options "-mvsx" } */ + +/* This test should run the same on any target that supports vsx + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +/* Define this after PR89424 is addressed. */ +#undef PR89424 + +/* Define this after PR89626 is addressed. */ +#undef PR89626 + +#ifdef PR89626 +#define SIGNED +#else +#define SIGNED signed +#endif + +extern void abort (void); + +#define CONST0 (((SIGNED __int128) 31415926539) << 60) + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +SIGNED __int128 e0 (vector SIGNED __int128 v) +{ + return __builtin_vec_ext_v1ti (v, 0); +} + +SIGNED __int128 e3 (vector SIGNED __int128 v) +{ + return __builtin_vec_ext_v1ti (v, 3); +} + +/* Test for vector residing in memory. */ +SIGNED __int128 me0 (vector SIGNED __int128 *vp) +{ + return __builtin_vec_ext_v1ti (*vp, 0); +} + +SIGNED __int128 me3 (vector SIGNED __int128 *vp) +{ + return __builtin_vec_ext_v1ti (*vp, 3); +} + +/* Test the same with variable indices. */ + +#ifdef PR89424 +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +SIGNED __int128 ei (vector SIGNED __int128 v, int i) +{ + return __builtin_vec_ext_v1ti (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +SIGNED __int128 mei (vector SIGNED __int128 *vp, int i) +{ + return __builtin_vec_ext_v1ti (*vp, i); +} +#endif + +int main (int argc, char *argv[]) { + vector SIGNED __int128 dv = { CONST0 }; + SIGNED __int128 d; + + d = e0 (dv); + if (d != CONST0) + abort (); + + d = e3 (dv); + if (d != CONST0) + abort (); + + d = me0 (&dv); + if (d != CONST0) + abort (); + + d = me3 (&dv); + if (d != CONST0) + abort (); + +#ifdef PR89424 + d = ei (dv, 0); + if (d != CONST0) + abort (); + + d = ei (dv, 1); + if (d != CONST0) + abort (); + + d = ei (dv, 2); + if (d != CONST0) + abort (); + + d = ei (dv, 3); + if (d != CONST0) + abort (); + + d = mei (&dv, 0); + if (d != CONST0) + abort (); + + d = mei (&dv, 1); + if (d != CONST0) + abort (); + + d = mei (&dv, 2); + if (d != CONST0) + abort (); + + d = mei (&dv, 3); + if (d != CONST0) + abort (); +#endif + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-13b.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-13b.c new file mode 100644 index 0000000..e1d791d --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-13b.c @@ -0,0 +1,124 @@ +/* { dg-do run { target int128 } } */ +/* { dg-require-effective-target vsx_hw } */ +/* { dg-options "-mvsx -O3" } */ + +/* This test should run the same on any target that supports vsx + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +/* Define this after PR89424 is addressed. */ +#undef PR89424 + +/* Define this after PR89626 is addressed. */ +#undef PR89626 + +#ifdef PR89626 +#define SIGNED +#else +#define SIGNED signed +#endif + +extern void abort (void); + +#define CONST0 (((SIGNED __int128) 31415926539) << 60) + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +SIGNED __int128 e0 (vector SIGNED __int128 v) +{ + return __builtin_vec_ext_v1ti (v, 0); +} + +SIGNED __int128 e3 (vector SIGNED __int128 v) +{ + return __builtin_vec_ext_v1ti (v, 3); +} + +/* Test for vector residing in memory. */ +SIGNED __int128 me0 (vector SIGNED __int128 *vp) +{ + return __builtin_vec_ext_v1ti (*vp, 0); +} + +SIGNED __int128 me3 (vector SIGNED __int128 *vp) +{ + return __builtin_vec_ext_v1ti (*vp, 3); +} + +/* Test the same with variable indices. */ + +#ifdef PR89424 +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +SIGNED __int128 ei (vector SIGNED __int128 v, int i) +{ + return __builtin_vec_ext_v1ti (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +SIGNED __int128 mei (vector SIGNED __int128 *vp, int i) +{ + return __builtin_vec_ext_v1ti (*vp, i); +} +#endif + +int main (int argc, char *argv[]) { + vector SIGNED __int128 dv = { CONST0 }; + SIGNED __int128 d; + + d = e0 (dv); + if (d != CONST0) + abort (); + + d = e3 (dv); + if (d != CONST0) + abort (); + + d = me0 (&dv); + if (d != CONST0) + abort (); + + d = me3 (&dv); + if (d != CONST0) + abort (); + +#ifdef PR89424 + d = ei (dv, 0); + if (d != CONST0) + abort (); + + d = ei (dv, 1); + if (d != CONST0) + abort (); + + d = ei (dv, 2); + if (d != CONST0) + abort (); + + d = ei (dv, 3); + if (d != CONST0) + abort (); + + d = mei (&dv, 0); + if (d != CONST0) + abort (); + + d = mei (&dv, 1); + if (d != CONST0) + abort (); + + d = mei (&dv, 2); + if (d != CONST0) + abort (); + + d = mei (&dv, 3); + if (d != CONST0) + abort (); +#endif + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-14a.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-14a.c new file mode 100644 index 0000000..8eb8eb6 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-14a.c @@ -0,0 +1,126 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 ((float) (3.1415926539)) +#define CONST1 ((float) (3.1415926539 * 2)) +#define CONST2 ((float) (3.1415926539 * 3)) +#define CONST3 ((float) (3.1415926539 * 4)) + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +float e0(vector float v){ return __builtin_vec_ext_v4sf (v, 0); } +float e1(vector float v){ return __builtin_vec_ext_v4sf (v, 1); } +float e7(vector float v){ return __builtin_vec_ext_v4sf (v, 7); } +float e8(vector float v){ return __builtin_vec_ext_v4sf (v, 8); } + +/* Test for vector residing in memory. */ +float me0(vector float *vp){ return __builtin_vec_ext_v4sf (*vp, 0); } +float me1(vector float *vp){ return __builtin_vec_ext_v4sf (*vp, 1); } + +float me13(vector float *vp) +{ + return __builtin_vec_ext_v4sf (*vp, 13); +} + +float me15(vector float *vp) +{ + return __builtin_vec_ext_v4sf (*vp, 15); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +float ei(vector float v, int i) +{ + return __builtin_vec_ext_v4sf (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +float mei(vector float *vp, int i) +{ + return __builtin_vec_ext_v4sf (*vp, i); +} + + +int main (int argc, char *argv[]) { + vector float dv = { CONST0, CONST1, CONST2, CONST3 }; + float d; + + d = e0 (dv); + if (d != CONST0) + abort (); + + d = e1 (dv); + if (d != CONST1) + abort (); + + d = e7 (dv); + if (d != CONST3) + abort (); + + d = e8 (dv); + if (d != CONST0) + abort (); + + d = me0 (&dv); + if (d != CONST0) + abort (); + + d = me1 (&dv); + if (d != CONST1) + abort (); + + d = me13 (&dv); + if (d != CONST1) + abort (); + + d = me15 (&dv); + if (d != CONST3) + abort (); + + d = ei (dv, 0); + if (d != CONST0) + abort (); + + d = ei (dv, 2); + if (d != CONST2) + abort (); + + d = ei (dv, 11); + if (d != CONST3) + abort (); + + d = ei (dv, 17); + if (d != CONST1) + abort (); + + d = mei (&dv, 0); + if (d != CONST0) + abort (); + + d = mei (&dv, 1); + if (d != CONST1) + abort (); + + d = mei (&dv, 15); + if (d != CONST3) + abort (); + + d = mei (&dv, 6); + if (d != CONST2) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-14b.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-14b.c new file mode 100644 index 0000000..84bc8a2 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-14b.c @@ -0,0 +1,126 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec -O3" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 ((float) (3.1415926539)) +#define CONST1 ((float) (3.1415926539 * 2)) +#define CONST2 ((float) (3.1415926539 * 3)) +#define CONST3 ((float) (3.1415926539 * 4)) + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +float e0(vector float v){ return __builtin_vec_ext_v4sf (v, 0); } +float e1(vector float v){ return __builtin_vec_ext_v4sf (v, 1); } +float e7(vector float v){ return __builtin_vec_ext_v4sf (v, 7); } +float e8(vector float v){ return __builtin_vec_ext_v4sf (v, 8); } + +/* Test for vector residing in memory. */ +float me0(vector float *vp){ return __builtin_vec_ext_v4sf (*vp, 0); } +float me1(vector float *vp){ return __builtin_vec_ext_v4sf (*vp, 1); } + +float me13(vector float *vp) +{ + return __builtin_vec_ext_v4sf (*vp, 13); +} + +float me15(vector float *vp) +{ + return __builtin_vec_ext_v4sf (*vp, 15); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +float ei(vector float v, int i) +{ + return __builtin_vec_ext_v4sf (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +float mei(vector float *vp, int i) +{ + return __builtin_vec_ext_v4sf (*vp, i); +} + + +int main (int argc, char *argv[]) { + vector float dv = { CONST0, CONST1, CONST2, CONST3 }; + float d; + + d = e0 (dv); + if (d != CONST0) + abort (); + + d = e1 (dv); + if (d != CONST1) + abort (); + + d = e7 (dv); + if (d != CONST3) + abort (); + + d = e8 (dv); + if (d != CONST0) + abort (); + + d = me0 (&dv); + if (d != CONST0) + abort (); + + d = me1 (&dv); + if (d != CONST1) + abort (); + + d = me13 (&dv); + if (d != CONST1) + abort (); + + d = me15 (&dv); + if (d != CONST3) + abort (); + + d = ei (dv, 0); + if (d != CONST0) + abort (); + + d = ei (dv, 2); + if (d != CONST2) + abort (); + + d = ei (dv, 11); + if (d != CONST3) + abort (); + + d = ei (dv, 17); + if (d != CONST1) + abort (); + + d = mei (&dv, 0); + if (d != CONST0) + abort (); + + d = mei (&dv, 1); + if (d != CONST1) + abort (); + + d = mei (&dv, 15); + if (d != CONST3) + abort (); + + d = mei (&dv, 6); + if (d != CONST2) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-15a.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-15a.c new file mode 100644 index 0000000..b8bff5c --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-15a.c @@ -0,0 +1,113 @@ +/* { dg-do run { target int128 } } */ +/* { dg-require-effective-target vsx_hw } */ +/* { dg-options "-mvsx" } */ + +/* This test should run the same on any target that supports vsx + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (3.1415926539) +#define CONST1 (3.1415926539 * 2) + + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +double e0(vector double v){ return __builtin_vec_ext_v2df (v, 0); } +double e1(vector double v){ return __builtin_vec_ext_v2df (v, 1); } +double e2(vector double v){ return __builtin_vec_ext_v2df (v, 2); } +double e3(vector double v){ return __builtin_vec_ext_v2df (v, 3); } + +/* Test for vector residing in memory. */ +double me0(vector double *vp){ return __builtin_vec_ext_v2df (*vp, 0); } +double me1(vector double *vp){ return __builtin_vec_ext_v2df (*vp, 1); } +double me2(vector double *vp){ return __builtin_vec_ext_v2df (*vp, 2); } +double me3(vector double *vp){ return __builtin_vec_ext_v2df (*vp, 3); } + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +double ei(vector double v, int i){ return __builtin_vec_ext_v2df (v, i); } + +/* Test for variable selector and vector residing in memory. */ +double mei(vector double *vp, int i){ return __builtin_vec_ext_v2df (*vp, i); } + + +int main (int argc, char *argv[]) { + vector double dv; + double d; + dv[0] = CONST0; + dv[1] = CONST1; + + d = e0 (dv); + if (d != CONST0) + abort (); + + d = e1 (dv); + if (d != CONST1) + abort (); + + d = e2 (dv); + if (d != CONST0) + abort (); + + d = e3 (dv); + if (d != CONST1) + abort (); + + d = me0 (&dv); + if (d != CONST0) + abort (); + + d = me1 (&dv); + if (d != CONST1) + abort (); + + d = me2 (&dv); + if (d != CONST0) + abort (); + + d = me3 (&dv); + if (d != CONST1) + abort (); + + d = ei (dv, 0); + if (d != CONST0) + abort (); + + d = ei (dv, 1); + if (d != CONST1) + abort (); + + d = ei (dv, 2); + if (d != CONST0) + abort (); + + d = ei (dv, 3); + if (d != CONST1) + abort (); + + d = mei (&dv, 0); + if (d != CONST0) + abort (); + + d = mei (&dv, 1); + if (d != CONST1) + abort (); + + d = mei (&dv, 2); + if (d != CONST0) + abort (); + + d = mei (&dv, 3); + if (d != CONST1) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-15b.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-15b.c new file mode 100644 index 0000000..402cde7 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-15b.c @@ -0,0 +1,113 @@ +/* { dg-do run { target int128 } } */ +/* { dg-require-effective-target vsx_hw } */ +/* { dg-options "-mvsx -O3" } */ + +/* This test should run the same on any target that supports vsx + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (3.1415926539) +#define CONST1 (3.1415926539 * 2) + + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +double e0(vector double v){ return __builtin_vec_ext_v2df (v, 0); } +double e1(vector double v){ return __builtin_vec_ext_v2df (v, 1); } +double e2(vector double v){ return __builtin_vec_ext_v2df (v, 2); } +double e3(vector double v){ return __builtin_vec_ext_v2df (v, 3); } + +/* Test for vector residing in memory. */ +double me0(vector double *vp){ return __builtin_vec_ext_v2df (*vp, 0); } +double me1(vector double *vp){ return __builtin_vec_ext_v2df (*vp, 1); } +double me2(vector double *vp){ return __builtin_vec_ext_v2df (*vp, 2); } +double me3(vector double *vp){ return __builtin_vec_ext_v2df (*vp, 3); } + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +double ei(vector double v, int i){ return __builtin_vec_ext_v2df (v, i); } + +/* Test for variable selector and vector residing in memory. */ +double mei(vector double *vp, int i){ return __builtin_vec_ext_v2df (*vp, i); } + + +int main (int argc, char *argv[]) { + vector double dv; + double d; + dv[0] = CONST0; + dv[1] = CONST1; + + d = e0 (dv); + if (d != CONST0) + abort (); + + d = e1 (dv); + if (d != CONST1) + abort (); + + d = e2 (dv); + if (d != CONST0) + abort (); + + d = e3 (dv); + if (d != CONST1) + abort (); + + d = me0 (&dv); + if (d != CONST0) + abort (); + + d = me1 (&dv); + if (d != CONST1) + abort (); + + d = me2 (&dv); + if (d != CONST0) + abort (); + + d = me3 (&dv); + if (d != CONST1) + abort (); + + d = ei (dv, 0); + if (d != CONST0) + abort (); + + d = ei (dv, 1); + if (d != CONST1) + abort (); + + d = ei (dv, 2); + if (d != CONST0) + abort (); + + d = ei (dv, 3); + if (d != CONST1) + abort (); + + d = mei (&dv, 0); + if (d != CONST0) + abort (); + + d = mei (&dv, 1); + if (d != CONST1) + abort (); + + d = mei (&dv, 2); + if (d != CONST0) + abort (); + + d = mei (&dv, 3); + if (d != CONST1) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-16a.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-16a.c new file mode 100644 index 0000000..465296a --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-16a.c @@ -0,0 +1,165 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (0) +#define CONST1 (1) +#define CONST2 (2) +#define CONST3 (3) +#define CONST4 (4) +#define CONST5 (5) +#define CONST6 (6) +#define CONST7 (7) +#define CONST8 (8) +#define CONST9 (9) +#define CONSTA (10) +#define CONSTB (11) +#define CONSTC (12) +#define CONSTD (13) +#define CONSTE (14) +#define CONSTF (15) + + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +unsigned char c0 (vector unsigned char v) +{ + return __builtin_vec_extract (v, 0); +} + +unsigned char c9 (vector unsigned char v) +{ + return __builtin_vec_extract (v, 9); +} + +unsigned char c21 (vector unsigned char v) +{ + return __builtin_vec_extract (v, 21); +} + +unsigned char c30 (vector unsigned char v) +{ + return __builtin_vec_extract (v, 30); +} + +/* Test for vector residing in memory. */ +unsigned char mc0 (vector unsigned char *vp) +{ + return __builtin_vec_extract (*vp, 0); +} + +unsigned char mc9 (vector unsigned char *vp) +{ + return __builtin_vec_extract (*vp, 9); +} + +unsigned char mc21 (vector unsigned char *vp) +{ + return __builtin_vec_extract (*vp, 21); +} + +unsigned char mc30 (vector unsigned char *vp) +{ + return __builtin_vec_extract (*vp, 30); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +unsigned char ci (vector unsigned char v, int i) +{ + return __builtin_vec_extract (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +__attribute__((noinline)) +unsigned char mci (vector unsigned char *vp, int i) +{ + return __builtin_vec_extract (*vp, i); +} + + +int main (int argc, char *argv[]) { + vector unsigned char cv = { CONST0, CONST1, CONST2, CONST3, + CONST4, CONST5, CONST6, CONST7, + CONST8, CONST9, CONSTA, CONSTB, + CONSTC, CONSTD, CONSTE, CONSTF }; + unsigned char c; + + c = c0 (cv); + if (c != CONST0) + abort (); + + c = c9 (cv); + if (c != CONST9) + abort (); + + c = c21 (cv); + if (c != CONST5) + abort (); + + c = c30 (cv); + if (c != CONSTE) + abort (); + + c = mc0 (&cv); + if (c != CONST0) + abort (); + + c = mc9 (&cv); + if (c != CONST9) + abort (); + + c = mc21 (&cv); + if (c != CONST5) + abort (); + + c = mc30 (&cv); + if (c != CONSTE) + abort (); + + c = ci (cv, 8); + if (c != CONST8) + abort (); + + c = ci (cv, 13); + if (c != CONSTD) + abort (); + + c = ci (cv, 23); + if (c != CONST7) + abort (); + + c = ci (cv, 31); + if (c != CONSTF) + abort (); + + c = mci (&cv, 5); + if (c != CONST5) + abort (); + + c = mci (&cv, 12); + if (c != CONSTC) + abort (); + + c = mci (&cv, 25); + if (c != CONST9) + abort (); + + c = mci (&cv, 16); + if (c != CONST0) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-16b.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-16b.c new file mode 100644 index 0000000..b646fb1 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-16b.c @@ -0,0 +1,165 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec -O3" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (0) +#define CONST1 (1) +#define CONST2 (2) +#define CONST3 (3) +#define CONST4 (4) +#define CONST5 (5) +#define CONST6 (6) +#define CONST7 (7) +#define CONST8 (8) +#define CONST9 (9) +#define CONSTA (10) +#define CONSTB (11) +#define CONSTC (12) +#define CONSTD (13) +#define CONSTE (14) +#define CONSTF (15) + + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +unsigned char c0 (vector unsigned char v) +{ + return __builtin_vec_extract (v, 0); +} + +unsigned char c9 (vector unsigned char v) +{ + return __builtin_vec_extract (v, 9); +} + +unsigned char c21 (vector unsigned char v) +{ + return __builtin_vec_extract (v, 21); +} + +unsigned char c30 (vector unsigned char v) +{ + return __builtin_vec_extract (v, 30); +} + +/* Test for vector residing in memory. */ +unsigned char mc0 (vector unsigned char *vp) +{ + return __builtin_vec_extract (*vp, 0); +} + +unsigned char mc9 (vector unsigned char *vp) +{ + return __builtin_vec_extract (*vp, 9); +} + +unsigned char mc21 (vector unsigned char *vp) +{ + return __builtin_vec_extract (*vp, 21); +} + +unsigned char mc30 (vector unsigned char *vp) +{ + return __builtin_vec_extract (*vp, 30); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +unsigned char ci (vector unsigned char v, int i) +{ + return __builtin_vec_extract (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +__attribute__((noinline)) +unsigned char mci (vector unsigned char *vp, int i) +{ + return __builtin_vec_extract (*vp, i); +} + + +int main (int argc, char *argv[]) { + vector unsigned char cv = { CONST0, CONST1, CONST2, CONST3, + CONST4, CONST5, CONST6, CONST7, + CONST8, CONST9, CONSTA, CONSTB, + CONSTC, CONSTD, CONSTE, CONSTF }; + unsigned char c; + + c = c0 (cv); + if (c != CONST0) + abort (); + + c = c9 (cv); + if (c != CONST9) + abort (); + + c = c21 (cv); + if (c != CONST5) + abort (); + + c = c30 (cv); + if (c != CONSTE) + abort (); + + c = mc0 (&cv); + if (c != CONST0) + abort (); + + c = mc9 (&cv); + if (c != CONST9) + abort (); + + c = mc21 (&cv); + if (c != CONST5) + abort (); + + c = mc30 (&cv); + if (c != CONSTE) + abort (); + + c = ci (cv, 8); + if (c != CONST8) + abort (); + + c = ci (cv, 13); + if (c != CONSTD) + abort (); + + c = ci (cv, 23); + if (c != CONST7) + abort (); + + c = ci (cv, 31); + if (c != CONSTF) + abort (); + + c = mci (&cv, 5); + if (c != CONST5) + abort (); + + c = mci (&cv, 12); + if (c != CONSTC) + abort (); + + c = mci (&cv, 25); + if (c != CONST9) + abort (); + + c = mci (&cv, 16); + if (c != CONST0) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-17a.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-17a.c new file mode 100644 index 0000000..afb6934 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-17a.c @@ -0,0 +1,155 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (0) +#define CONST1 (1) +#define CONST2 (2) +#define CONST3 (3) +#define CONST4 (4) +#define CONST5 (5) +#define CONST6 (6) +#define CONST7 (7) + + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +unsigned short s3 (vector unsigned short v) +{ + return __builtin_vec_extract (v, 3); +} + +unsigned short s7 (vector unsigned short v) +{ + return __builtin_vec_extract (v, 7); +} + +unsigned short s21 (vector unsigned short v) +{ + return __builtin_vec_extract (v, 21); +} + +unsigned short s30 (vector unsigned short v) +{ + return __builtin_vec_extract (v, 30); +} + +/* Test for vector residing in memory. */ +unsigned short ms3 (vector unsigned short *vp) +{ + return __builtin_vec_extract (*vp, 3); +} + +unsigned short ms7 (vector unsigned short *vp) +{ + return __builtin_vec_extract (*vp, 7); +} + +unsigned short ms21 (vector unsigned short *vp) +{ + return __builtin_vec_extract (*vp, 21); +} + +unsigned short ms30 (vector unsigned short *vp) +{ + return __builtin_vec_extract (*vp, 30); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +unsigned short ci (vector unsigned short v, int i) +{ + return __builtin_vec_extract (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +__attribute__((noinline)) +unsigned short mci (vector unsigned short *vp, int i) +{ + return __builtin_vec_extract (*vp, i); +} + + +int main (int argc, unsigned short *argv[]) { + vector unsigned short sv = { + CONST0, CONST1, CONST2, CONST3, CONST4, CONST5, CONST6, CONST7 }; + unsigned short s; + + s = s3 (sv); + if (s != CONST3) + abort (); + + s = s7 (sv); + if (s != CONST7) + abort (); + + s = s21 (sv); + if (s != CONST5) + abort (); + + s = s30 (sv); + if (s != CONST6) + abort (); + + s = ms3 (&sv); + if (s != CONST3) + abort (); + + s = ms7 (&sv); + if (s != CONST7) + abort (); + + s = ms21 (&sv); + if (s != CONST5) + abort (); + + s = ms30 (&sv); + if (s != CONST6) + abort (); + + s = ci (sv, 5); + if (s != CONST5) + abort (); + + s = ci (sv, 2); + if (s != CONST2) + abort (); + + s = ci (sv, 15); + if (s != CONST7) + abort (); + + s = ci (sv, 28); + if (s != CONST4) + abort (); + + s = mci (&sv, 5); + if (s != CONST5) + abort (); + + s = mci (&sv, 12); + if (s != CONST4) + abort (); + + s = mci (&sv, 25); + if (s != CONST1) + abort (); + + s = mci (&sv, 16); + if (s != CONST0) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-17b.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-17b.c new file mode 100644 index 0000000..63814ee --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-17b.c @@ -0,0 +1,155 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec -O3" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (0) +#define CONST1 (1) +#define CONST2 (2) +#define CONST3 (3) +#define CONST4 (4) +#define CONST5 (5) +#define CONST6 (6) +#define CONST7 (7) + + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +unsigned short s3 (vector unsigned short v) +{ + return __builtin_vec_extract (v, 3); +} + +unsigned short s7 (vector unsigned short v) +{ + return __builtin_vec_extract (v, 7); +} + +unsigned short s21 (vector unsigned short v) +{ + return __builtin_vec_extract (v, 21); +} + +unsigned short s30 (vector unsigned short v) +{ + return __builtin_vec_extract (v, 30); +} + +/* Test for vector residing in memory. */ +unsigned short ms3 (vector unsigned short *vp) +{ + return __builtin_vec_extract (*vp, 3); +} + +unsigned short ms7 (vector unsigned short *vp) +{ + return __builtin_vec_extract (*vp, 7); +} + +unsigned short ms21 (vector unsigned short *vp) +{ + return __builtin_vec_extract (*vp, 21); +} + +unsigned short ms30 (vector unsigned short *vp) +{ + return __builtin_vec_extract (*vp, 30); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +unsigned short ci (vector unsigned short v, int i) +{ + return __builtin_vec_extract (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +__attribute__((noinline)) +unsigned short mci (vector unsigned short *vp, int i) +{ + return __builtin_vec_extract (*vp, i); +} + + +int main (int argc, unsigned short *argv[]) { + vector unsigned short sv = { + CONST0, CONST1, CONST2, CONST3, CONST4, CONST5, CONST6, CONST7 }; + unsigned short s; + + s = s3 (sv); + if (s != CONST3) + abort (); + + s = s7 (sv); + if (s != CONST7) + abort (); + + s = s21 (sv); + if (s != CONST5) + abort (); + + s = s30 (sv); + if (s != CONST6) + abort (); + + s = ms3 (&sv); + if (s != CONST3) + abort (); + + s = ms7 (&sv); + if (s != CONST7) + abort (); + + s = ms21 (&sv); + if (s != CONST5) + abort (); + + s = ms30 (&sv); + if (s != CONST6) + abort (); + + s = ci (sv, 5); + if (s != CONST5) + abort (); + + s = ci (sv, 2); + if (s != CONST2) + abort (); + + s = ci (sv, 15); + if (s != CONST7) + abort (); + + s = ci (sv, 28); + if (s != CONST4) + abort (); + + s = mci (&sv, 5); + if (s != CONST5) + abort (); + + s = mci (&sv, 12); + if (s != CONST4) + abort (); + + s = mci (&sv, 25); + if (s != CONST1) + abort (); + + s = mci (&sv, 16); + if (s != CONST0) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-18a.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-18a.c new file mode 100644 index 0000000..3681ad9 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-18a.c @@ -0,0 +1,149 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Unsigned Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (0) +#define CONST1 (1) +#define CONST2 (2) +#define CONST3 (3) + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +unsigned int s3 (vector unsigned int v) +{ + return __builtin_vec_extract (v, 3); +} + +unsigned int s1 (vector unsigned int v) +{ + return __builtin_vec_extract (v, 1); +} + +unsigned int s21 (vector unsigned int v) +{ + return __builtin_vec_extract (v, 21); +} + +unsigned int s30 (vector unsigned int v) +{ + return __builtin_vec_extract (v, 30); +} + +/* Test for vector residing in memory. */ +unsigned int ms3 (vector unsigned int *vp) +{ + return __builtin_vec_extract (*vp, 3); +} + +unsigned int ms1(vector unsigned int *vp) +{ + return __builtin_vec_extract (*vp, 1); +} + +unsigned int ms21(vector unsigned int *vp) +{ + return __builtin_vec_extract (*vp, 21); +} + +unsigned int ms30(vector unsigned int *vp) +{ + return __builtin_vec_extract (*vp, 30); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +unsigned int ci (vector unsigned int v, int i) +{ + return __builtin_vec_extract (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +__attribute__((noinline)) +unsigned int mci(vector unsigned int *vp, int i) +{ + return __builtin_vec_extract (*vp, i); +} + + +unsigned int main (int argc, unsigned char *argv[]) { + vector unsigned int sv = { CONST0, CONST1, CONST2, CONST3 }; + unsigned int s; + + s = s3 (sv); + if (s != CONST3) + abort (); + + s = s1 (sv); + if (s != CONST1) + abort (); + + s = s21 (sv); + if (s != CONST1) + abort (); + + s = s30 (sv); + if (s != CONST2) + abort (); + + s = ms3 (&sv); + if (s != CONST3) + abort (); + + s = ms1 (&sv); + if (s != CONST1) + abort (); + + s = ms21 (&sv); + if (s != CONST1) + abort (); + + s = ms30 (&sv); + if (s != CONST2) + abort (); + + s = ci (sv, 5); + if (s != CONST1) + abort (); + + s = ci (sv, 2); + if (s != CONST2) + abort (); + + s = ci (sv, 15); + if (s != CONST3) + abort (); + + s = ci (sv, 28); + if (s != CONST0) + abort (); + + s = mci (&sv, 5); + if (s != CONST1) + abort (); + + s = mci (&sv, 12); + if (s != CONST0) + abort (); + + s = mci (&sv, 25); + if (s != CONST1) + abort (); + + s = mci (&sv, 16); + if (s != CONST0) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-18b.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-18b.c new file mode 100644 index 0000000..57b5c43 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-18b.c @@ -0,0 +1,149 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec -O3" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Unsigned Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (0) +#define CONST1 (1) +#define CONST2 (2) +#define CONST3 (3) + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +unsigned int s3 (vector unsigned int v) +{ + return __builtin_vec_extract (v, 3); +} + +unsigned int s1 (vector unsigned int v) +{ + return __builtin_vec_extract (v, 1); +} + +unsigned int s21 (vector unsigned int v) +{ + return __builtin_vec_extract (v, 21); +} + +unsigned int s30 (vector unsigned int v) +{ + return __builtin_vec_extract (v, 30); +} + +/* Test for vector residing in memory. */ +unsigned int ms3 (vector unsigned int *vp) +{ + return __builtin_vec_extract (*vp, 3); +} + +unsigned int ms1(vector unsigned int *vp) +{ + return __builtin_vec_extract (*vp, 1); +} + +unsigned int ms21(vector unsigned int *vp) +{ + return __builtin_vec_extract (*vp, 21); +} + +unsigned int ms30(vector unsigned int *vp) +{ + return __builtin_vec_extract (*vp, 30); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +unsigned int ci (vector unsigned int v, int i) +{ + return __builtin_vec_extract (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +__attribute__((noinline)) +unsigned int mci(vector unsigned int *vp, int i) +{ + return __builtin_vec_extract (*vp, i); +} + + +unsigned int main (int argc, unsigned char *argv[]) { + vector unsigned int sv = { CONST0, CONST1, CONST2, CONST3 }; + unsigned int s; + + s = s3 (sv); + if (s != CONST3) + abort (); + + s = s1 (sv); + if (s != CONST1) + abort (); + + s = s21 (sv); + if (s != CONST1) + abort (); + + s = s30 (sv); + if (s != CONST2) + abort (); + + s = ms3 (&sv); + if (s != CONST3) + abort (); + + s = ms1 (&sv); + if (s != CONST1) + abort (); + + s = ms21 (&sv); + if (s != CONST1) + abort (); + + s = ms30 (&sv); + if (s != CONST2) + abort (); + + s = ci (sv, 5); + if (s != CONST1) + abort (); + + s = ci (sv, 2); + if (s != CONST2) + abort (); + + s = ci (sv, 15); + if (s != CONST3) + abort (); + + s = ci (sv, 28); + if (s != CONST0) + abort (); + + s = mci (&sv, 5); + if (s != CONST1) + abort (); + + s = mci (&sv, 12); + if (s != CONST0) + abort (); + + s = mci (&sv, 25); + if (s != CONST1) + abort (); + + s = mci (&sv, 16); + if (s != CONST0) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-19a.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-19a.c new file mode 100644 index 0000000..dee8319 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-19a.c @@ -0,0 +1,109 @@ +/* { dg-do run { target int128 } } */ +/* { dg-require-effective-target vsx_hw } */ +/* { dg-options "-mvsx" } */ + +/* This test should run the same on any target that supports vsx + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (31415926539LL) +#define CONST1 (2 * 31415926539LL) + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +unsigned long long int e0 (vector unsigned long long int v) +{ + return __builtin_vec_extract (v, 0); +} + +unsigned long long int e3 (vector unsigned long long int v) +{ + return __builtin_vec_extract (v, 3); +} + +/* Test for vector residing in memory. */ +unsigned long long int me0 (vector unsigned long long int *vp) +{ + return __builtin_vec_extract (*vp, 0); +} + +unsigned long long int me3 (vector unsigned long long int *vp) +{ + return __builtin_vec_extract (*vp, 3); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +unsigned long long int ei (vector unsigned long long int v, int i) +{ + return __builtin_vec_extract (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +unsigned long long int mei (vector unsigned long long int *vp, int i) +{ + return __builtin_vec_extract (*vp, i); +} + +int main (int argc, char *argv[]) { + vector unsigned long long int dv = { CONST0, CONST1 }; + unsigned long long int d; + + d = e0 (dv); + if (d != CONST0) + abort (); + + d = e3 (dv); + if (d != CONST1) + abort (); + + d = me0 (&dv); + if (d != CONST0) + abort (); + + d = me3 (&dv); + if (d != CONST1) + abort (); + + d = ei (dv, 0); + if (d != CONST0) + abort (); + + d = ei (dv, 1); + if (d != CONST1) + abort (); + + d = ei (dv, 2); + if (d != CONST0) + abort (); + + d = ei (dv, 3); + if (d != CONST1) + abort (); + + d = mei (&dv, 0); + if (d != CONST0) + abort (); + + d = mei (&dv, 1); + if (d != CONST1) + abort (); + + d = mei (&dv, 2); + if (d != CONST0) + abort (); + + d = mei (&dv, 3); + if (d != CONST1) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-19b.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-19b.c new file mode 100644 index 0000000..c39923e --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-19b.c @@ -0,0 +1,109 @@ +/* { dg-do run { target int128 } } */ +/* { dg-require-effective-target vsx_hw } */ +/* { dg-options "-mvsx -O3" } */ + +/* This test should run the same on any target that supports vsx + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (31415926539LL) +#define CONST1 (2 * 31415926539LL) + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +unsigned long long int e0 (vector unsigned long long int v) +{ + return __builtin_vec_extract (v, 0); +} + +unsigned long long int e3 (vector unsigned long long int v) +{ + return __builtin_vec_extract (v, 3); +} + +/* Test for vector residing in memory. */ +unsigned long long int me0 (vector unsigned long long int *vp) +{ + return __builtin_vec_extract (*vp, 0); +} + +unsigned long long int me3 (vector unsigned long long int *vp) +{ + return __builtin_vec_extract (*vp, 3); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +unsigned long long int ei (vector unsigned long long int v, int i) +{ + return __builtin_vec_extract (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +unsigned long long int mei (vector unsigned long long int *vp, int i) +{ + return __builtin_vec_extract (*vp, i); +} + +int main (int argc, char *argv[]) { + vector unsigned long long int dv = { CONST0, CONST1 }; + unsigned long long int d; + + d = e0 (dv); + if (d != CONST0) + abort (); + + d = e3 (dv); + if (d != CONST1) + abort (); + + d = me0 (&dv); + if (d != CONST0) + abort (); + + d = me3 (&dv); + if (d != CONST1) + abort (); + + d = ei (dv, 0); + if (d != CONST0) + abort (); + + d = ei (dv, 1); + if (d != CONST1) + abort (); + + d = ei (dv, 2); + if (d != CONST0) + abort (); + + d = ei (dv, 3); + if (d != CONST1) + abort (); + + d = mei (&dv, 0); + if (d != CONST0) + abort (); + + d = mei (&dv, 1); + if (d != CONST1) + abort (); + + d = mei (&dv, 2); + if (d != CONST0) + abort (); + + d = mei (&dv, 3); + if (d != CONST1) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-20a.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-20a.c new file mode 100644 index 0000000..638f5a1 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-20a.c @@ -0,0 +1,115 @@ +/* { dg-do run { target int128 } } */ +/* { dg-require-effective-target vsx_hw } */ +/* { dg-options "-mvsx" } */ + +/* This test should run the same on any target that supports vsx + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +/* Define this after PR89424 is addressed. */ +#undef PR89424 + +extern void abort (void); + +#define CONST0 (((unsigned __int128) 31415926539) << 60) + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +unsigned __int128 e0 (vector unsigned __int128 v) +{ + return __builtin_vec_extract (v, 0); +} + +unsigned __int128 e3 (vector unsigned __int128 v) +{ + return __builtin_vec_extract (v, 3); +} + +/* Test for vector residing in memory. */ +unsigned __int128 me0 (vector unsigned __int128 *vp) +{ + return __builtin_vec_extract (*vp, 0); +} + +unsigned __int128 me3 (vector unsigned __int128 *vp) +{ + return __builtin_vec_extract (*vp, 3); +} + +/* Test the same with variable indices. */ + +#ifdef PR89424 +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +unsigned __int128 ei (vector unsigned __int128 v, int i) +{ + return __builtin_vec_extract (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +unsigned __int128 mei (vector unsigned __int128 *vp, int i) +{ + return __builtin_vec_extract (*vp, i); +} +#endif + +int main (int argc, char *argv[]) { + vector unsigned __int128 dv = { CONST0 }; + unsigned __int128 d; + + d = e0 (dv); + if (d != CONST0) + abort (); + + d = e3 (dv); + if (d != CONST0) + abort (); + + d = me0 (&dv); + if (d != CONST0) + abort (); + + d = me3 (&dv); + if (d != CONST0) + abort (); + +#ifdef PR89424 + d = ei (dv, 0); + if (d != CONST0) + abort (); + + d = ei (dv, 1); + if (d != CONST0) + abort (); + + d = ei (dv, 2); + if (d != CONST0) + abort (); + + d = ei (dv, 3); + if (d != CONST0) + abort (); + + d = mei (&dv, 0); + if (d != CONST0) + abort (); + + d = mei (&dv, 1); + if (d != CONST0) + abort (); + + d = mei (&dv, 2); + if (d != CONST0) + abort (); + + d = mei (&dv, 3); + if (d != CONST0) + abort (); +#endif + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-20b.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-20b.c new file mode 100644 index 0000000..7b127a0 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-20b.c @@ -0,0 +1,115 @@ +/* { dg-do run { target int128 } } */ +/* { dg-require-effective-target vsx_hw } */ +/* { dg-options "-mvsx -O3" } */ + +/* This test should run the same on any target that supports vsx + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +/* Define this after PR89424 is addressed. */ +#undef PR89424 + +extern void abort (void); + +#define CONST0 (((unsigned __int128) 31415926539) << 60) + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +unsigned __int128 e0 (vector unsigned __int128 v) +{ + return __builtin_vec_extract (v, 0); +} + +unsigned __int128 e3 (vector unsigned __int128 v) +{ + return __builtin_vec_extract (v, 3); +} + +/* Test for vector residing in memory. */ +unsigned __int128 me0 (vector unsigned __int128 *vp) +{ + return __builtin_vec_extract (*vp, 0); +} + +unsigned __int128 me3 (vector unsigned __int128 *vp) +{ + return __builtin_vec_extract (*vp, 3); +} + +/* Test the same with variable indices. */ + +#ifdef PR89424 +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +unsigned __int128 ei (vector unsigned __int128 v, int i) +{ + return __builtin_vec_extract (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +unsigned __int128 mei (vector unsigned __int128 *vp, int i) +{ + return __builtin_vec_extract (*vp, i); +} +#endif + +int main (int argc, char *argv[]) { + vector unsigned __int128 dv = { CONST0 }; + unsigned __int128 d; + + d = e0 (dv); + if (d != CONST0) + abort (); + + d = e3 (dv); + if (d != CONST0) + abort (); + + d = me0 (&dv); + if (d != CONST0) + abort (); + + d = me3 (&dv); + if (d != CONST0) + abort (); + +#ifdef PR89424 + d = ei (dv, 0); + if (d != CONST0) + abort (); + + d = ei (dv, 1); + if (d != CONST0) + abort (); + + d = ei (dv, 2); + if (d != CONST0) + abort (); + + d = ei (dv, 3); + if (d != CONST0) + abort (); + + d = mei (&dv, 0); + if (d != CONST0) + abort (); + + d = mei (&dv, 1); + if (d != CONST0) + abort (); + + d = mei (&dv, 2); + if (d != CONST0) + abort (); + + d = mei (&dv, 3); + if (d != CONST0) + abort (); +#endif + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-9a.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-9a.c new file mode 100644 index 0000000..7b354344 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-9a.c @@ -0,0 +1,164 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (0) +#define CONST1 (1) +#define CONST2 (2) +#define CONST3 (3) +#define CONST4 (4) +#define CONST5 (5) +#define CONST6 (6) +#define CONST7 (7) +#define CONST8 (8) +#define CONST9 (9) +#define CONSTA (10) +#define CONSTB (11) +#define CONSTC (12) +#define CONSTD (13) +#define CONSTE (14) +#define CONSTF (15) + + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +signed char c0 (vector signed char v) +{ + return __builtin_vec_ext_v16qi (v, 0); +} + +signed char c9 (vector signed char v) +{ + return __builtin_vec_ext_v16qi (v, 9); +} + +signed char c21 (vector signed char v) +{ + return __builtin_vec_ext_v16qi (v, 21); +} + +signed char c30 (vector signed char v) +{ + return __builtin_vec_ext_v16qi (v, 30); +} + +/* Test for vector residing in memory. */ +signed char mc0 (vector signed char *vp) +{ + return __builtin_vec_ext_v16qi (*vp, 0); +} + +signed char mc9 (vector signed char *vp) +{ + return __builtin_vec_ext_v16qi (*vp, 9); +} + +signed char mc21 (vector signed char *vp) +{ + return __builtin_vec_ext_v16qi (*vp, 21); +} + +signed char mc30 (vector signed char *vp) +{ + return __builtin_vec_ext_v16qi (*vp, 30); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +signed char ci (vector signed char v, int i) +{ + return __builtin_vec_ext_v16qi (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +__attribute__((noinline)) +signed char mci(vector signed char *vp, int i) { + return __builtin_vec_ext_v16qi (*vp, i); +} + + +int main (int argc, char *argv[]) { + vector signed char cv = { CONST0, CONST1, CONST2, CONST3, + CONST4, CONST5, CONST6, CONST7, + CONST8, CONST9, CONSTA, CONSTB, + CONSTC, CONSTD, CONSTE, CONSTF }; + signed char c; + + c = c0 (cv); + if (c != CONST0) + abort (); + + c = c9 (cv); + if (c != CONST9) + abort (); + + c = c21 (cv); + if (c != CONST5) + abort (); + + c = c30 (cv); + if (c != CONSTE) + abort (); + + c = mc0 (&cv); + if (c != CONST0) + abort (); + + c = mc9 (&cv); + if (c != CONST9) + abort (); + + c = mc21 (&cv); + if (c != CONST5) + abort (); + + c = mc30 (&cv); + if (c != CONSTE) + abort (); + + c = ci (cv, 8); + if (c != CONST8) + abort (); + + c = ci (cv, 13); + if (c != CONSTD) + abort (); + + c = ci (cv, 23); + if (c != CONST7) + abort (); + + c = ci (cv, 31); + if (c != CONSTF) + abort (); + + c = mci (&cv, 5); + if (c != CONST5) + abort (); + + c = mci (&cv, 12); + if (c != CONSTC) + abort (); + + c = mci (&cv, 25); + if (c != CONST9) + abort (); + + c = mci (&cv, 16); + if (c != CONST0) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-9b.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-9b.c new file mode 100644 index 0000000..ff081b3 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-9b.c @@ -0,0 +1,164 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vmx_hw } */ +/* { dg-options "-maltivec -O3" } */ + +/* This test should run the same on any target that supports altivec/dfp + instructions. Intentionally not specifying cpu in order to test + all code generation paths. */ + +#include + +extern void abort (void); + +#define CONST0 (0) +#define CONST1 (1) +#define CONST2 (2) +#define CONST3 (3) +#define CONST4 (4) +#define CONST5 (5) +#define CONST6 (6) +#define CONST7 (7) +#define CONST8 (8) +#define CONST9 (9) +#define CONSTA (10) +#define CONSTB (11) +#define CONSTC (12) +#define CONSTD (13) +#define CONSTE (14) +#define CONSTF (15) + + +/* Test that indices > length of vector are applied modulo the vector + length. */ + +/* Test for vector residing in register. */ +signed char c0 (vector signed char v) +{ + return __builtin_vec_ext_v16qi (v, 0); +} + +signed char c9 (vector signed char v) +{ + return __builtin_vec_ext_v16qi (v, 9); +} + +signed char c21 (vector signed char v) +{ + return __builtin_vec_ext_v16qi (v, 21); +} + +signed char c30 (vector signed char v) +{ + return __builtin_vec_ext_v16qi (v, 30); +} + +/* Test for vector residing in memory. */ +signed char mc0 (vector signed char *vp) +{ + return __builtin_vec_ext_v16qi (*vp, 0); +} + +signed char mc9 (vector signed char *vp) +{ + return __builtin_vec_ext_v16qi (*vp, 9); +} + +signed char mc21 (vector signed char *vp) +{ + return __builtin_vec_ext_v16qi (*vp, 21); +} + +signed char mc30 (vector signed char *vp) +{ + return __builtin_vec_ext_v16qi (*vp, 30); +} + +/* Test the same with variable indices. */ + +/* Test for variable selector and vector residing in register. */ +__attribute__((noinline)) +signed char ci (vector signed char v, int i) +{ + return __builtin_vec_ext_v16qi (v, i); +} + +/* Test for variable selector and vector residing in memory. */ +__attribute__((noinline)) +signed char mci(vector signed char *vp, int i) { + return __builtin_vec_ext_v16qi (*vp, i); +} + + +int main (int argc, char *argv[]) { + vector signed char cv = { CONST0, CONST1, CONST2, CONST3, + CONST4, CONST5, CONST6, CONST7, + CONST8, CONST9, CONSTA, CONSTB, + CONSTC, CONSTD, CONSTE, CONSTF }; + signed char c; + + c = c0 (cv); + if (c != CONST0) + abort (); + + c = c9 (cv); + if (c != CONST9) + abort (); + + c = c21 (cv); + if (c != CONST5) + abort (); + + c = c30 (cv); + if (c != CONSTE) + abort (); + + c = mc0 (&cv); + if (c != CONST0) + abort (); + + c = mc9 (&cv); + if (c != CONST9) + abort (); + + c = mc21 (&cv); + if (c != CONST5) + abort (); + + c = mc30 (&cv); + if (c != CONSTE) + abort (); + + c = ci (cv, 8); + if (c != CONST8) + abort (); + + c = ci (cv, 13); + if (c != CONSTD) + abort (); + + c = ci (cv, 23); + if (c != CONST7) + abort (); + + c = ci (cv, 31); + if (c != CONSTF) + abort (); + + c = mci (&cv, 5); + if (c != CONST5) + abort (); + + c = mci (&cv, 12); + if (c != CONSTC) + abort (); + + c = mci (&cv, 25); + if (c != CONST9) + abort (); + + c = mci (&cv, 16); + if (c != CONST0) + abort (); + + return 0; +} -- cgit v1.1 From 850b8aa3091a2c62200bde93fc61101e4dec45b6 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Fri, 15 Mar 2019 23:09:15 +0100 Subject: LRA: side_effects_p stmts' output is not invariant (PR89721) PR89721 shows LRA treating an unspec_volatile's result as invariant, which of course isn't correct. This patch fixes it. PR rtl-optimization/89721 * lra-constraints (invariant_p): Return false if side_effects_p holds. From-SVN: r269716 --- gcc/ChangeLog | 5 +++++ gcc/lra-constraints.c | 3 +++ 2 files changed, 8 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 55d80e5..67dc0bf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-03-15 Segher Boessenkool + + PR rtl-optimization/89721 + * lra-constraints (invariant_p): Return false if side_effects_p holds. + 2019-03-15 Kelvin Nilsen PR target/87532 diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index d7d69c6..ccca130 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -5839,6 +5839,9 @@ invariant_p (const_rtx x) enum rtx_code code; int i, j; + if (side_effects_p (x)) + return false; + code = GET_CODE (x); mode = GET_MODE (x); if (code == SUBREG) -- cgit v1.1 From eb1474baeebc8263d54ed50d532f40f777d5fabd Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Fri, 15 Mar 2019 22:20:20 +0000 Subject: re PR fortran/60091 (Misleading error messages in rank-2 pointer assignment to rank-1 target) 2019-03-15 Harald Anlauf PR fortran/60091 * expr.c (gfc_check_pointer_assign): Correct and improve error messages for invalid pointer assignments. PR fortran/60091 * gfortran.dg/pointer_remapping_3.f08: Adjust error messages. * gfortran.dg/pointer_remapping_7.f90: Adjust error message. From-SVN: r269717 --- gcc/fortran/ChangeLog | 6 +++ gcc/fortran/expr.c | 60 ++++++++++++++++++----- gcc/testsuite/ChangeLog | 6 +++ gcc/testsuite/gfortran.dg/pointer_remapping_3.f08 | 13 ++--- gcc/testsuite/gfortran.dg/pointer_remapping_7.f90 | 2 +- 5 files changed, 67 insertions(+), 20 deletions(-) (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index c46d399..754bfeb 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2019-03-15 Harald Anlauf + + PR fortran/60091 + * expr.c (gfc_check_pointer_assign): Correct and improve error + messages for invalid pointer assignments. + 2019-03-14 Thomas Koenig * gfortran.texi: Document Q edit descriptor under diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 08bd8e0..d654f4e7 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3703,6 +3703,7 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue, gfc_ref *ref; bool is_pure, is_implicit_pure, rank_remap; int proc_pointer; + bool same_rank; lhs_attr = gfc_expr_attr (lvalue); if (lvalue->ts.type == BT_UNKNOWN && !lhs_attr.proc_pointer) @@ -3724,6 +3725,7 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue, proc_pointer = lvalue->symtree->n.sym->attr.proc_pointer; rank_remap = false; + same_rank = lvalue->rank == rvalue->rank; for (ref = lvalue->ref; ref; ref = ref->next) { if (ref->type == REF_COMPONENT) @@ -3748,22 +3750,47 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue, lvalue->symtree->n.sym->name, &lvalue->where)) return false; - /* When bounds are given, all lbounds are necessary and either all - or none of the upper bounds; no strides are allowed. If the - upper bounds are present, we may do rank remapping. */ + /* Fortran standard (e.g. F2018, 10.2.2 Pointer assignment): + * + * (C1017) If bounds-spec-list is specified, the number of + * bounds-specs shall equal the rank of data-pointer-object. + * + * If bounds-spec-list appears, it specifies the lower bounds. + * + * (C1018) If bounds-remapping-list is specified, the number of + * bounds-remappings shall equal the rank of data-pointer-object. + * + * If bounds-remapping-list appears, it specifies the upper and + * lower bounds of each dimension of the pointer; the pointer target + * shall be simply contiguous or of rank one. + * + * (C1019) If bounds-remapping-list is not specified, the ranks of + * data-pointer-object and data-target shall be the same. + * + * Thus when bounds are given, all lbounds are necessary and either + * all or none of the upper bounds; no strides are allowed. If the + * upper bounds are present, we may do rank remapping. */ for (dim = 0; dim < ref->u.ar.dimen; ++dim) { - if (!ref->u.ar.start[dim] - || ref->u.ar.dimen_type[dim] != DIMEN_RANGE) + if (ref->u.ar.stride[dim]) { - gfc_error ("Lower bound has to be present at %L", + gfc_error ("Stride must not be present at %L", &lvalue->where); return false; } - if (ref->u.ar.stride[dim]) + if (!same_rank && (!ref->u.ar.start[dim] ||!ref->u.ar.end[dim])) { - gfc_error ("Stride must not be present at %L", - &lvalue->where); + gfc_error ("Rank remapping requires a " + "list of % " + "specifications at %L", &lvalue->where); + return false; + } + if (!ref->u.ar.start[dim] + || ref->u.ar.dimen_type[dim] != DIMEN_RANGE) + { + gfc_error ("Expected list of % or " + "list of % " + "specifications at %L", &lvalue->where); return false; } @@ -3771,11 +3798,18 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue, rank_remap = (ref->u.ar.end[dim] != NULL); else { - if ((rank_remap && !ref->u.ar.end[dim]) - || (!rank_remap && ref->u.ar.end[dim])) + if ((rank_remap && !ref->u.ar.end[dim])) + { + gfc_error ("Rank remapping requires a " + "list of % " + "specifications at %L", &lvalue->where); + return false; + } + if (!rank_remap && ref->u.ar.end[dim]) { - gfc_error ("Either all or none of the upper bounds" - " must be specified at %L", &lvalue->where); + gfc_error ("Expected list of % or " + "list of % " + "specifications at %L", &lvalue->where); return false; } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7acb52b..cad9617 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-15 Harald Anlauf + + PR fortran/60091 + * gfortran.dg/pointer_remapping_3.f08: Adjust error messages. + * gfortran.dg/pointer_remapping_7.f90: Adjust error message. + 2019-03-15 Kelvin Nilsen PR target/87532 diff --git a/gcc/testsuite/gfortran.dg/pointer_remapping_3.f08 b/gcc/testsuite/gfortran.dg/pointer_remapping_3.f08 index 376adb0..c498a36 100644 --- a/gcc/testsuite/gfortran.dg/pointer_remapping_3.f08 +++ b/gcc/testsuite/gfortran.dg/pointer_remapping_3.f08 @@ -3,6 +3,7 @@ ! PR fortran/29785 ! PR fortran/45016 +! PR fortran/60091 ! Check for pointer remapping compile-time errors. ! Contributed by Daniel Kraft, d@domob.eu. @@ -13,13 +14,13 @@ PROGRAM main INTEGER, POINTER :: vec(:), mat(:, :) ! Existence of reference elements. - vec(:) => arr ! { dg-error "Lower bound has to be present" } - vec(5:7:1) => arr ! { dg-error "Stride must not be present" } - mat(1:, 2:5) => arr ! { dg-error "Either all or none of the upper bounds" } - mat(2, 6) => arr ! { dg-error "Expected bounds specification" } + vec(:) => arr ! { dg-error "or list of 'lower-bound : upper-bound'" } + vec(5:7:1) => arr ! { dg-error "Stride must not be present" } + mat(1:,2:5) => arr ! { dg-error "Rank remapping requires a list of " } + mat(1:3,4:) => arr ! { dg-error "Rank remapping requires a list of " } + mat(2, 6) => arr ! { dg-error "Expected bounds specification" } - ! This is bound remapping not rank remapping! - mat(1:, 3:) => arr ! { dg-error "Different ranks" } + mat(1:,3:) => arr ! { dg-error "Rank remapping requires a list of " } ! Invalid remapping target; for non-rank one we already check the F2008 ! error elsewhere. Here, test that not-contiguous target is disallowed diff --git a/gcc/testsuite/gfortran.dg/pointer_remapping_7.f90 b/gcc/testsuite/gfortran.dg/pointer_remapping_7.f90 index 39126ba..6006807 100644 --- a/gcc/testsuite/gfortran.dg/pointer_remapping_7.f90 +++ b/gcc/testsuite/gfortran.dg/pointer_remapping_7.f90 @@ -4,5 +4,5 @@ ! integer, target :: A(100) integer,pointer :: P(:,:) - p(10,1:) => A ! { dg-error "Lower bound has to be present" } + p(10,1:) => A ! { dg-error "or list of 'lower-bound : upper-bound'" } end -- cgit v1.1 From 0759ca4a92e9e269c8001fb8023f0539a1b315fa Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 16 Mar 2019 00:16:23 +0000 Subject: Daily bump. From-SVN: r269720 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 5f83f80..814c2fe 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20190315 +20190316 -- cgit v1.1 From fbf1cec7a4f6457161c1bfb3ba982e3f8190888e Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sat, 16 Mar 2019 11:50:03 +0000 Subject: re PR fortran/84394 (compiler error when using modules with derived types in block data subprograms) 2019-03-16 Thomas Koenig PR fortran/84394 * symbol.c (gfc_add_subroutine): If we are encountering a subrtoutine within a BLOCK DATA and the name starts with an underscore, do not check. 2019-03-16 Thomas Koenig PR fortran/84394 * gfortran.dg/blockdata_11.f90: New test. From-SVN: r269721 --- gcc/fortran/ChangeLog | 9 +++++++- gcc/fortran/symbol.c | 10 ++++++++- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/blockdata_11.f90 | 33 ++++++++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/blockdata_11.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 754bfeb..614694a 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2019-03-16 Thomas Koenig + + PR fortran/84394 + * symbol.c (gfc_add_subroutine): If we are encountering a + subrtoutine within a BLOCK DATA and the name starts with an + underscore, do not check. + 2019-03-15 Harald Anlauf PR fortran/60091 @@ -7,7 +14,7 @@ 2019-03-14 Thomas Koenig * gfortran.texi: Document Q edit descriptor under - " Extensions not implemented in GNU Fortran". + "Extensions not implemented in GNU Fortran". 2019-03-13 Harald Anlauf diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 882a4f3..c342d62 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -1689,7 +1689,15 @@ gfc_add_subroutine (symbol_attribute *attr, const char *name, locus *where) return false; attr->subroutine = 1; - return check_conflict (attr, name, where); + + /* If we are looking at a BLOCK DATA statement and we encounter a + name with a leading underscore (which must be + compiler-generated), do not check. See PR 84394. */ + + if (name && *name != '_' && gfc_current_state () != COMP_BLOCK_DATA) + return check_conflict (attr, name, where); + else + return true; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cad9617..2d391aa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-16 Thomas Koenig + + PR fortran/84394 + * gfortran.dg/blockdata_11.f90: New test. + 2019-03-15 Harald Anlauf PR fortran/60091 diff --git a/gcc/testsuite/gfortran.dg/blockdata_11.f90 b/gcc/testsuite/gfortran.dg/blockdata_11.f90 new file mode 100644 index 0000000..4aee18b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/blockdata_11.f90 @@ -0,0 +1,33 @@ +! { dg-do run } +! PR 84394 - this used to complain about private procedures in +! BLOCK data. +module mod1 + implicit none + type :: type1 + integer :: i1 + end type type1 +end module + +module mod2 + implicit none + contains + subroutine sub1 + integer vals + common /block1/ vals(5) + if (any(vals /= [1, 2, 3, 4, 5])) stop 1 + end subroutine +end module + +block data blkdat + use mod1 + integer vals + common /block1/ vals(5) + data vals/1, 2, 3, 4, 5/ +end block data blkdat + +program main + use mod2, only: sub1 + implicit none + call sub1 +end program + -- cgit v1.1 From 8c8d4d29c1b3290579e26479cd76b6ee232b0f10 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 16 Mar 2019 15:18:36 +0000 Subject: target-supports.exp (check_ascii_locale_available): Remove hppa*-*-hpux*. * lib/target-supports.exp (check_ascii_locale_available): Remove hppa*-*-hpux*. From-SVN: r269726 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/lib/target-supports.exp | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2d391aa..d44e97c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-16 John David Anglin + + * lib/target-supports.exp (check_ascii_locale_available): Remove + hppa*-*-hpux*. + 2019-03-16 Thomas Koenig PR fortran/84394 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index d6e7a35..ac60c1e 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1430,9 +1430,6 @@ proc check_effective_target_libatomic_available { } { # Return 1 if an ASCII locale is supported on this host, 0 otherwise. proc check_ascii_locale_available { } { - if { [istarget hppa*-*-hpux*] } { - return 0 - } return 1 } -- cgit v1.1 From 3b1cba46794ddf9f7701c52d7585be57f53d11da Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 16 Mar 2019 15:44:25 +0000 Subject: re PR testsuite/83453 (FAIL: c-c++-common/Wattributes.c -std=gnu++98 (test for warnings, line 404)) PR testsuite/83453 * c-c++-common/Wattributes.c: Skip a warning check on hppa*64*-*-*. From-SVN: r269727 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/c-c++-common/Wattributes.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d44e97c..5116299 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-03-16 John David Anglin + PR testsuite/83453 + * c-c++-common/Wattributes.c: Skip a warning check on hppa*64*-*-*. + * lib/target-supports.exp (check_ascii_locale_available): Remove hppa*-*-hpux*. diff --git a/gcc/testsuite/c-c++-common/Wattributes.c b/gcc/testsuite/c-c++-common/Wattributes.c index 6925d4e..3f176a0 100644 --- a/gcc/testsuite/c-c++-common/Wattributes.c +++ b/gcc/testsuite/c-c++-common/Wattributes.c @@ -401,7 +401,7 @@ inline int ATTR ((warn_unused_result)) finline_hot_noret_align (int); /* { dg-warning "ignoring attribute .warn_unused_result. because it conflicts with attribute .noreturn." } */ inline int ATTR ((aligned (4))) - finline_hot_noret_align (int); /* { dg-warning "ignoring attribute .aligned \\(4\\). because it conflicts with attribute .aligned \\(8\\)." "" { target { ! s390*-*-* } } } */ + finline_hot_noret_align (int); /* { dg-warning "ignoring attribute .aligned \\(4\\). because it conflicts with attribute .aligned \\(8\\)." "" { target { ! { hppa*64*-*-* s390*-*-* } } } } */ /* { dg-error "alignment for '.*finline_hot_noret_align.*' must be at least 8" "" { target s390*-*-* } .-1 } */ inline int ATTR ((aligned (8))) -- cgit v1.1 From cdff63563468223ab1230041a846b3558ed275c2 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 16 Mar 2019 16:39:49 +0000 Subject: re PR testsuite/84174 (FAIL: gcc.dg/Wattributes-6.c (test for warnings, line 404)) PR testsuite/84174 * gcc.dg/Wattributes-6.c: Skip warning check at line 404 on hppa*64*-*-*. From-SVN: r269728 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/Wattributes-6.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5116299..346e646 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2019-03-16 John David Anglin + PR testsuite/84174 + * gcc.dg/Wattributes-6.c: Skip warning check at line 404 on + hppa*64*-*-*. + PR testsuite/83453 * c-c++-common/Wattributes.c: Skip a warning check on hppa*64*-*-*. diff --git a/gcc/testsuite/gcc.dg/Wattributes-6.c b/gcc/testsuite/gcc.dg/Wattributes-6.c index b2ea7db..d3dd22d 100644 --- a/gcc/testsuite/gcc.dg/Wattributes-6.c +++ b/gcc/testsuite/gcc.dg/Wattributes-6.c @@ -401,7 +401,7 @@ inline int ATTR ((warn_unused_result)) finline_hot_noret_align (int); /* { dg-warning "ignoring attribute .warn_unused_result. because it conflicts with attribute .noreturn." } */ inline int ATTR ((aligned (4))) - finline_hot_noret_align (int); /* { dg-warning "ignoring attribute .aligned \\(4\\). because it conflicts with attribute .aligned \\(8\\)." "" { target { ! s390*-*-* } } } */ + finline_hot_noret_align (int); /* { dg-warning "ignoring attribute .aligned \\(4\\). because it conflicts with attribute .aligned \\(8\\)." "" { target { ! { hppa*64*-*-* s390*-*-* } } } } */ /* { dg-error "alignment for 'finline_hot_noret_align' must be at least 8" "" { target s390*-*-* } .-1 } */ inline int ATTR ((aligned (8))) -- cgit v1.1 From 38ea73a8c18ccc5e2920529c5d608388f54cb1dc Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 16 Mar 2019 17:08:43 +0000 Subject: Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*. * gcc.dg/Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*. * gcc.dg/gimplefe-34.c: Likewise. * gcc.dg/compat/pr83487-2_x.c: Use -fno-common option on hppa*-*-hpux*. * gcc.dg/compat/pr83487-2_y.c: Likewise. From-SVN: r269729 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/Wattributes-10.c | 3 ++- gcc/testsuite/gcc.dg/compat/pr83487-2_x.c | 1 + gcc/testsuite/gcc.dg/compat/pr83487-2_y.c | 1 + gcc/testsuite/gcc.dg/gimplefe-34.c | 1 + 5 files changed, 10 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 346e646..0dd1e8f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2019-03-16 John David Anglin + * gcc.dg/Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*. + * gcc.dg/gimplefe-34.c: Likewise. + * gcc.dg/compat/pr83487-2_x.c: Use -fno-common option on hppa*-*-hpux*. + * gcc.dg/compat/pr83487-2_y.c: Likewise. + PR testsuite/84174 * gcc.dg/Wattributes-6.c: Skip warning check at line 404 on hppa*64*-*-*. diff --git a/gcc/testsuite/gcc.dg/Wattributes-10.c b/gcc/testsuite/gcc.dg/Wattributes-10.c index 4dccaf3..c40fe65 100644 --- a/gcc/testsuite/gcc.dg/Wattributes-10.c +++ b/gcc/testsuite/gcc.dg/Wattributes-10.c @@ -1,7 +1,8 @@ /* PR middle-end/86453 - error: type variant differs by TYPE_PACKED in free_lang_data since r255469 { dg-do compile } - { dg-options "-Wall -ftrack-macro-expansion=0" } */ + { dg-options "-Wall -ftrack-macro-expansion=0" } + { dg-additional-options "-fno-common" { target hppa*-*-hpux* } } */ #define A(expr) do { int a[1 - 2 * !(expr)]; (void)&a; } while (0) diff --git a/gcc/testsuite/gcc.dg/compat/pr83487-2_x.c b/gcc/testsuite/gcc.dg/compat/pr83487-2_x.c index 494abd7..7103194 100644 --- a/gcc/testsuite/gcc.dg/compat/pr83487-2_x.c +++ b/gcc/testsuite/gcc.dg/compat/pr83487-2_x.c @@ -1,2 +1,3 @@ +/* { dg-options "-fno-common" { target { hppa*-*-hpux* } } } */ #define PR83487_LARGE #include "pr83487-1_x.c" diff --git a/gcc/testsuite/gcc.dg/compat/pr83487-2_y.c b/gcc/testsuite/gcc.dg/compat/pr83487-2_y.c index e5a67d5..e176783 100644 --- a/gcc/testsuite/gcc.dg/compat/pr83487-2_y.c +++ b/gcc/testsuite/gcc.dg/compat/pr83487-2_y.c @@ -1,2 +1,3 @@ +/* { dg-options "-fno-common" { target { hppa*-*-hpux* } } } */ #define PR83487_LARGE #include "pr83487-1_y.c" diff --git a/gcc/testsuite/gcc.dg/gimplefe-34.c b/gcc/testsuite/gcc.dg/gimplefe-34.c index 3cf28b5..5825edc 100644 --- a/gcc/testsuite/gcc.dg/gimplefe-34.c +++ b/gcc/testsuite/gcc.dg/gimplefe-34.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fgimple" } */ +/* { dg-additional-options "-fno-common" { target hppa*-*-hpux* } } */ typedef unsigned char v16qi __attribute__((vector_size(16))); typedef unsigned char v8qi __attribute__((vector_size(8))); -- cgit v1.1 From 3c390eda35f889b554ce9f2765c12521769970c9 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 16 Mar 2019 17:31:30 +0000 Subject: re PR inline-asm/84941 (internal compiler error: in reg_overlap_mentioned_p, at rtlanal.c:1870 (reg_overlap_mentioned_p()/match_asm_constraints_1())) PR testsuite/84941 * gcc.dg/pr84941.c: Skip on hppa*-*-*. From-SVN: r269730 --- gcc/testsuite/ChangeLog | 5 ++++- gcc/testsuite/gcc.dg/pr84941.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0dd1e8f..83fe86f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,7 @@ -2019-03-16 John David Anglin +2019-03-16 John David Anglin + + PR testsuite/84941 + * gcc.dg/pr84941.c: Skip on hppa*-*-*. * gcc.dg/Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*. * gcc.dg/gimplefe-34.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/pr84941.c b/gcc/testsuite/gcc.dg/pr84941.c index 6f4674e..a3a4fdc 100644 --- a/gcc/testsuite/gcc.dg/pr84941.c +++ b/gcc/testsuite/gcc.dg/pr84941.c @@ -1,5 +1,6 @@ /* PR inline-asm/84941 */ /* { dg-do compile } */ +/* { dg-skip-if "asm operand has impossible constraints" { hppa*-*-* } } */ /* { dg-options "-O2" } */ void -- cgit v1.1 From 733a21e17134526d8c6e3705a3b6e5e753089a5b Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 16 Mar 2019 17:48:14 +0000 Subject: builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*. * c-c++-common/builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*. * gcc.dg/attr-copy-6.c: Likewise. * gcc.dg/pr87793.c: Likewise. From-SVN: r269731 --- gcc/testsuite/ChangeLog | 8 ++++++-- gcc/testsuite/c-c++-common/builtin-has-attribute-4.c | 1 + gcc/testsuite/gcc.dg/attr-copy-6.c | 1 + gcc/testsuite/gcc.dg/pr87793.c | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 83fe86f..319f17b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,10 @@ -2019-03-16 John David Anglin +2019-03-16 John David Anglin - PR testsuite/84941 + * c-c++-common/builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*. + * gcc.dg/attr-copy-6.c: Likewise. + * gcc.dg/pr87793.c: Likewise. + + PR testsuite/89471 * gcc.dg/pr84941.c: Skip on hppa*-*-*. * gcc.dg/Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*. diff --git a/gcc/testsuite/c-c++-common/builtin-has-attribute-4.c b/gcc/testsuite/c-c++-common/builtin-has-attribute-4.c index 84c9892..a0681fa 100644 --- a/gcc/testsuite/c-c++-common/builtin-has-attribute-4.c +++ b/gcc/testsuite/c-c++-common/builtin-has-attribute-4.c @@ -1,5 +1,6 @@ /* Verify __builtin_has_attribute return value for variables. { dg-do compile } + { dg-skip-if "No section attribute" { { hppa*-*-hpux* } && { ! lp64 } } } { dg-options "-Wall -ftrack-macro-expansion=0" } { dg-options "-Wall -Wno-narrowing -Wno-unused -ftrack-macro-expansion=0" { target c++ } } { dg-additional-options "-DSKIP_ALIAS" { target *-*-darwin* } } diff --git a/gcc/testsuite/gcc.dg/attr-copy-6.c b/gcc/testsuite/gcc.dg/attr-copy-6.c index 17e714e..010db0d 100644 --- a/gcc/testsuite/gcc.dg/attr-copy-6.c +++ b/gcc/testsuite/gcc.dg/attr-copy-6.c @@ -1,5 +1,6 @@ /* PR middle-end/88546 - Copy attribute unusable for weakrefs { dg-do compile } + { dg-skip-if "Attributes not supported" { { hppa*-*-hpux* } && { ! lp64 } } } { dg-options "-O2 -Wall" } { dg-require-weak "" } */ diff --git a/gcc/testsuite/gcc.dg/pr87793.c b/gcc/testsuite/gcc.dg/pr87793.c index 317847b..d767331 100644 --- a/gcc/testsuite/gcc.dg/pr87793.c +++ b/gcc/testsuite/gcc.dg/pr87793.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "No section attribute" { { hppa*-*-hpux* } && { ! lp64 } } } */ /* { dg-options "-fpic -Os -g" } */ /* { dg-require-effective-target fpic } */ -- cgit v1.1 From 3b7f728384d6650e5336aeb1dbe92416efb3b63f Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 16 Mar 2019 18:10:31 +0000 Subject: re PR testsuite/89393 (FAIL: g++.dg/abi/ref-temp1.C -std=c++14 scan-assembler .weak(_definition)?[ \t]_?_ZGR1bIvE) PR testsuite/89393 * g++.dg/abi/ref-temp1.C: Skip on 32-bit hppa*-*-hpux*. * g++.dg/cpp0x/pr84497.C: Likewise. From-SVN: r269732 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/g++.dg/abi/ref-temp1.C | 1 + gcc/testsuite/g++.dg/cpp0x/pr84497.C | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 319f17b..0141ba9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2019-03-16 John David Anglin + PR testsuite/89393 + * g++.dg/abi/ref-temp1.C: Skip on 32-bit hppa*-*-hpux*. + * g++.dg/cpp0x/pr84497.C: Likewise. + * c-c++-common/builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*. * gcc.dg/attr-copy-6.c: Likewise. * gcc.dg/pr87793.c: Likewise. diff --git a/gcc/testsuite/g++.dg/abi/ref-temp1.C b/gcc/testsuite/g++.dg/abi/ref-temp1.C index 887f432..c9963ca 100644 --- a/gcc/testsuite/g++.dg/abi/ref-temp1.C +++ b/gcc/testsuite/g++.dg/abi/ref-temp1.C @@ -1,5 +1,6 @@ // From ABI document // { dg-do compile { target c++14 } } +// { dg-skip-if "No .weak" { { hppa*-*-hpux* } && { ! lp64 } } } // { dg-additional-options --save-temps } struct A { const int (&x)[3]; }; diff --git a/gcc/testsuite/g++.dg/cpp0x/pr84497.C b/gcc/testsuite/g++.dg/cpp0x/pr84497.C index cb9d233..cd72253 100644 --- a/gcc/testsuite/g++.dg/cpp0x/pr84497.C +++ b/gcc/testsuite/g++.dg/cpp0x/pr84497.C @@ -1,6 +1,6 @@ // PR 84497 mismatch with thread constructor fn weakness // { dg-do compile { target c++11 } } -// { dg-require-weak "" } +// { dg-skip-if "No .weak" { { hppa*-*-hpux* } && { ! lp64 } } } struct Base { -- cgit v1.1 From 0581f5b2ad38ddee2b7de73b0e0efa101d60183a Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 16 Mar 2019 18:23:48 +0000 Subject: Fix type in last change. From-SVN: r269733 --- gcc/testsuite/ChangeLog | 2 ++ gcc/testsuite/g++.dg/cpp0x/pr84497.C | 1 + 2 files changed, 3 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0141ba9..d52a648 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,7 @@ 2019-03-16 John David Anglin + * g++.dg/cpp0x/pr84497.C: Restore dg-require-weak. + PR testsuite/89393 * g++.dg/abi/ref-temp1.C: Skip on 32-bit hppa*-*-hpux*. * g++.dg/cpp0x/pr84497.C: Likewise. diff --git a/gcc/testsuite/g++.dg/cpp0x/pr84497.C b/gcc/testsuite/g++.dg/cpp0x/pr84497.C index cd72253..d44a779 100644 --- a/gcc/testsuite/g++.dg/cpp0x/pr84497.C +++ b/gcc/testsuite/g++.dg/cpp0x/pr84497.C @@ -1,5 +1,6 @@ // PR 84497 mismatch with thread constructor fn weakness // { dg-do compile { target c++11 } } +// { dg-require-weak "" } // { dg-skip-if "No .weak" { { hppa*-*-hpux* } && { ! lp64 } } } struct Base -- cgit v1.1 From 985a72168a64267df8ad4c73337b3f678787174e Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 16 Mar 2019 22:18:49 +0100 Subject: re PR fortran/89724 (Fortran diagnostics give wrong line number because of math-vector-fortran.h header file) PR fortran/89724 * scanner.c (load_line): Remove linenum and current_line static variables, add warned_tabs automatic variable. Use current_file->line instead of current_line and warned_tabs boolean to avoid diagnosing tabs multiple times on the same line. * gfortran.dg/continuation_15.f90: New test. * gfortran.dg/continuation_16.f90: New test. From-SVN: r269734 --- gcc/fortran/ChangeLog | 8 ++++++++ gcc/fortran/scanner.c | 13 ++++++------- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gfortran.dg/continuation_15.f90 | 9 +++++++++ gcc/testsuite/gfortran.dg/continuation_16.f90 | 10 ++++++++++ 5 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/continuation_15.f90 create mode 100644 gcc/testsuite/gfortran.dg/continuation_16.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 614694a..762da70 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,11 @@ +2019-03-16 Jakub Jelinek + + PR fortran/89724 + * scanner.c (load_line): Remove linenum and current_line static + variables, add warned_tabs automatic variable. Use current_file->line + instead of current_line and warned_tabs boolean to avoid diagnosing + tabs multiple times on the same line. + 2019-03-16 Thomas Koenig PR fortran/84394 diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index eeba2ab..e54d483 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -1738,12 +1738,12 @@ gfc_gobble_whitespace (void) static int load_line (FILE *input, gfc_char_t **pbuf, int *pbuflen, const int *first_char) { - static int linenum = 0, current_line = 1; int c, maxlen, i, preprocessor_flag, buflen = *pbuflen; int trunc_flag = 0, seen_comment = 0; int seen_printable = 0, seen_ampersand = 0, quoted = ' '; gfc_char_t *buffer; bool found_tab = false; + bool warned_tabs = false; /* Determine the maximum allowed line length. */ if (gfc_current_form == FORM_FREE) @@ -1793,10 +1793,10 @@ load_line (FILE *input, gfc_char_t **pbuf, int *pbuflen, const int *first_char) { if (pedantic) gfc_error_now ("%<&%> not allowed by itself in line %d", - current_line); + current_file->line); else gfc_warning_now (0, "%<&%> not allowed by itself in line %d", - current_line); + current_file->line); } break; } @@ -1850,12 +1850,12 @@ load_line (FILE *input, gfc_char_t **pbuf, int *pbuflen, const int *first_char) { found_tab = true; - if (warn_tabs && seen_comment == 0 && current_line != linenum) + if (warn_tabs && seen_comment == 0 && !warned_tabs) { - linenum = current_line; + warned_tabs = true; gfc_warning_now (OPT_Wtabs, "Nonconforming tab character in column %d " - "of line %d", i+1, linenum); + "of line %d", i + 1, current_file->line); } while (i < 6) @@ -1934,7 +1934,6 @@ next_char: *buffer = '\0'; *pbuflen = buflen; - current_line++; return trunc_flag; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d52a648..905791d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-16 Jakub Jelinek + + PR fortran/89724 + * gfortran.dg/continuation_15.f90: New test. + * gfortran.dg/continuation_16.f90: New test. + 2019-03-16 John David Anglin * g++.dg/cpp0x/pr84497.C: Restore dg-require-weak. diff --git a/gcc/testsuite/gfortran.dg/continuation_15.f90 b/gcc/testsuite/gfortran.dg/continuation_15.f90 new file mode 100644 index 0000000..ad9dc65 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/continuation_15.f90 @@ -0,0 +1,9 @@ +! PR fortran/89724 +! { dg-do compile } +! { dg-options "-std=f95" } + +include 'continuation_9.f90' + +! { dg-warning "not allowed by itself in line 3" "" { target *-*-* } 0 } +! { dg-warning "not allowed by itself in line 4" "" { target *-*-* } 0 } +! { dg-warning "not allowed by itself in line 5" "" { target *-*-* } 0 } diff --git a/gcc/testsuite/gfortran.dg/continuation_16.f90 b/gcc/testsuite/gfortran.dg/continuation_16.f90 new file mode 100644 index 0000000..56d2bbe --- /dev/null +++ b/gcc/testsuite/gfortran.dg/continuation_16.f90 @@ -0,0 +1,10 @@ +! PR fortran/89724 +! { dg-do compile } +! { dg-options "-std=f95 -nostdinc -fpre-include=simd-builtins-1.h" } + & +& + & +end +! { dg-warning "not allowed by itself in line 4" "" { target *-*-* } 0 } +! { dg-warning "not allowed by itself in line 5" "" { target *-*-* } 0 } +! { dg-warning "not allowed by itself in line 6" "" { target *-*-* } 0 } -- cgit v1.1 From f5a18efc3698b40ab83957824e3ab31895118858 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 17 Mar 2019 00:16:13 +0000 Subject: Daily bump. From-SVN: r269737 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 814c2fe..fd62143 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20190316 +20190317 -- cgit v1.1 From 712fee7a92daddae3fbe1ed079e431eaab256c60 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sun, 17 Mar 2019 17:59:03 +0000 Subject: re PR testsuite/89666 (FAIL: gcc.dg/ipa/ipa-icf-39.c scan-ipa-dump-times icf "Unified;" 2) PR testsuite/89666 * c-c++-common/builtin-has-attribute-3.c: Define SKIP_ALIAS on hppa*-*-hpux*. * gcc.dg/attr-copy.c: Require alias support. * gcc.dg/ipa/ipa-icf-39.c: Likewise. From-SVN: r269742 --- gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/c-c++-common/builtin-has-attribute-3.c | 2 +- gcc/testsuite/gcc.dg/attr-copy.c | 1 + gcc/testsuite/gcc.dg/ipa/ipa-icf-39.c | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 905791d..7278ffe 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2019-03-17 John David Anglin + + PR testsuite/89666 + * c-c++-common/builtin-has-attribute-3.c: Define SKIP_ALIAS on + hppa*-*-hpux*. + * gcc.dg/attr-copy.c: Require alias support. + * gcc.dg/ipa/ipa-icf-39.c: Likewise. + 2019-03-16 Jakub Jelinek PR fortran/89724 diff --git a/gcc/testsuite/c-c++-common/builtin-has-attribute-3.c b/gcc/testsuite/c-c++-common/builtin-has-attribute-3.c index 5b2e5c7..2a59501 100644 --- a/gcc/testsuite/c-c++-common/builtin-has-attribute-3.c +++ b/gcc/testsuite/c-c++-common/builtin-has-attribute-3.c @@ -2,7 +2,7 @@ { dg-do compile } { dg-options "-Wall -ftrack-macro-expansion=0" } { dg-options "-Wall -Wno-narrowing -Wno-unused-local-typedefs -ftrack-macro-expansion=0" { target c++ } } - { dg-additional-options "-DSKIP_ALIAS" { target *-*-darwin* } } + { dg-additional-options "-DSKIP_ALIAS" { target *-*-darwin* hppa*-*-hpux* } } */ #define ATTR(...) __attribute__ ((__VA_ARGS__)) diff --git a/gcc/testsuite/gcc.dg/attr-copy.c b/gcc/testsuite/gcc.dg/attr-copy.c index 27cd7bc..8bd537a 100644 --- a/gcc/testsuite/gcc.dg/attr-copy.c +++ b/gcc/testsuite/gcc.dg/attr-copy.c @@ -1,6 +1,7 @@ /* PR middle-end/81824 - Warn for missing attributes with function aliases Exercise error handling for attribute copy. { dg-do compile } + { dg-require-alias "" } { dg-options "-O2 -Wall" } */ #define ATTR(list) __attribute__ (list) diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-39.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-39.c index aa7c287..18bd4b0 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-39.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-39.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-alias "" } */ /* { dg-options "-O2 -fdump-ipa-icf -fmerge-all-constants -fdbg-cnt=merged_ipa_icf:1:3" } */ /* { dg-prune-output "dbg_cnt 'merged_ipa_icf' set to 1-3" } */ -- cgit v1.1 From 3147bc6ccc25c917e79b1ef499b4ce145bee3fc1 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sun, 17 Mar 2019 18:24:14 +0000 Subject: pr88074.c: Require c99_runtime. * gcc.dg/pr88074.c: Require c99_runtime. * gcc.dg/warn-abs-1.c: Likewise. * gfortran.dg/ISO_Fortran_binding_1.f90: Likewise. From-SVN: r269743 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/pr88074.c | 2 +- gcc/testsuite/gcc.dg/warn-abs-1.c | 2 +- gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.f90 | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7278ffe..0c4ff4a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2019-03-17 John David Anglin + * gcc.dg/pr88074.c: Require c99_runtime. + * gcc.dg/warn-abs-1.c: Likewise. + * gfortran.dg/ISO_Fortran_binding_1.f90: Likewise. + PR testsuite/89666 * c-c++-common/builtin-has-attribute-3.c: Define SKIP_ALIAS on hppa*-*-hpux*. diff --git a/gcc/testsuite/gcc.dg/pr88074.c b/gcc/testsuite/gcc.dg/pr88074.c index 9f64cc1..082f620 100644 --- a/gcc/testsuite/gcc.dg/pr88074.c +++ b/gcc/testsuite/gcc.dg/pr88074.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target c99_runtime } } */ /* { dg-options "-O" } */ #include diff --git a/gcc/testsuite/gcc.dg/warn-abs-1.c b/gcc/testsuite/gcc.dg/warn-abs-1.c index c016ff6..a7f2ab2 100644 --- a/gcc/testsuite/gcc.dg/warn-abs-1.c +++ b/gcc/testsuite/gcc.dg/warn-abs-1.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target c99_runtime } } */ /* { dg-options "-Wabsolute-value" } */ #include diff --git a/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.f90 b/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.f90 index e12b3a0..79d133d 100644 --- a/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.f90 +++ b/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.f90 @@ -1,4 +1,4 @@ -! { dg-do run } +! { dg-do run { target c99_runtime } } ! { dg-additional-sources ISO_Fortran_binding_1.c } ! ! Test F2008 18.5: ISO_Fortran_binding.h functions. -- cgit v1.1 From d09f61a9a635821dc2b6470d3db515f75dce930d Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sun, 17 Mar 2019 19:16:53 +0000 Subject: pointer_init_10.f90: Require visibility support. * gfortran.dg/pointer_init_10.f90: Require visibility support. * gfortran.dg/temporary_3.f90: Likewise. From-SVN: r269744 --- gcc/testsuite/ChangeLog | 5 ++++- gcc/testsuite/gfortran.dg/pointer_init_10.f90 | 1 + gcc/testsuite/gfortran.dg/temporary_3.f90 | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0c4ff4a..1c292cb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,7 @@ -2019-03-17 John David Anglin +2013-03-17 John David Anglin + + * gfortran.dg/pointer_init_10.f90: Require visibility support. + * gfortran.dg/temporary_3.f90: Likewise. * gcc.dg/pr88074.c: Require c99_runtime. * gcc.dg/warn-abs-1.c: Likewise. diff --git a/gcc/testsuite/gfortran.dg/pointer_init_10.f90 b/gcc/testsuite/gfortran.dg/pointer_init_10.f90 index 81e7d73..9e06b8a 100644 --- a/gcc/testsuite/gfortran.dg/pointer_init_10.f90 +++ b/gcc/testsuite/gfortran.dg/pointer_init_10.f90 @@ -1,4 +1,5 @@ ! { dg-do run } +! { dg-require-visibility "" } ! ! PR 84504: [F08] procedure pointer variables cannot be initialized with functions returning pointers ! diff --git a/gcc/testsuite/gfortran.dg/temporary_3.f90 b/gcc/testsuite/gfortran.dg/temporary_3.f90 index 84b300a..7527675 100644 --- a/gcc/testsuite/gfortran.dg/temporary_3.f90 +++ b/gcc/testsuite/gfortran.dg/temporary_3.f90 @@ -1,4 +1,5 @@ ! { dg-do run } +! { dg-require-visibility "" } ! ! Tests the fix for PR68846 in which compiler generated temporaries were ! receiving the attributes of dummy arguments. This test is the original. -- cgit v1.1 From ad0a3085d740347ec9db7ce15315d426d384110f Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sun, 17 Mar 2019 19:37:00 +0000 Subject: pr83487-1_x.c: Use -fno-common option on hppa*-*-hpux*. * gcc.dg/compat/pr83487-1_x.c: Use -fno-common option on hppa*-*-hpux*. * gcc.dg/compat/pr83487-1_y.c: Likewise. From-SVN: r269745 --- gcc/testsuite/ChangeLog | 5 ++++- gcc/testsuite/gcc.dg/compat/pr83487-1_x.c | 1 + gcc/testsuite/gcc.dg/compat/pr83487-1_y.c | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1c292cb..131ef49 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,7 @@ -2013-03-17 John David Anglin +2019-03-03-17 John David Anglin + + * gcc.dg/compat/pr83487-1_x.c: Use -fno-common option on hppa*-*-hpux*. + * gcc.dg/compat/pr83487-1_y.c: Likewise. * gfortran.dg/pointer_init_10.f90: Require visibility support. * gfortran.dg/temporary_3.f90: Likewise. diff --git a/gcc/testsuite/gcc.dg/compat/pr83487-1_x.c b/gcc/testsuite/gcc.dg/compat/pr83487-1_x.c index 043a4c4..b5b208f 100644 --- a/gcc/testsuite/gcc.dg/compat/pr83487-1_x.c +++ b/gcc/testsuite/gcc.dg/compat/pr83487-1_x.c @@ -1,3 +1,4 @@ +/* { dg-options "-fno-common" { target { hppa*-*-hpux* } } } */ #include "pr83487-1.h" extern diff --git a/gcc/testsuite/gcc.dg/compat/pr83487-1_y.c b/gcc/testsuite/gcc.dg/compat/pr83487-1_y.c index ef927bb..ad336dd 100644 --- a/gcc/testsuite/gcc.dg/compat/pr83487-1_y.c +++ b/gcc/testsuite/gcc.dg/compat/pr83487-1_y.c @@ -1,3 +1,4 @@ +/* { dg-options "-fno-common" { target { hppa*-*-hpux* } } } */ #include "pr83487-1.h" struct A a; -- cgit v1.1 From bbee94aa67b316d188b0938e02a70def626a1dfd Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sun, 17 Mar 2019 16:07:26 -0400 Subject: PR c++/89571 - ICE with ill-formed noexcept on constructor. Earlier changes to defer instantiating a defaulted noexcept-specifier that depends on yet-unparsed default member initializers broke this testcase, where instantiation fails for another reason. In this case there's no reason to defer and try again later, so let's not. * pt.c (maybe_instantiate_noexcept): Only return false if defaulted. (regenerate_decl_from_template): Use it for noexcept-specs. From-SVN: r269746 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/pt.c | 34 +++++++++++++++++++++++++-------- gcc/testsuite/g++.dg/cpp0x/noexcept36.C | 22 +++++++++++++++++++++ 3 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/noexcept36.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6c96c24..34e9c79 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2019-03-17 Jason Merrill + + PR c++/89571 - ICE with ill-formed noexcept on constructor. + * pt.c (maybe_instantiate_noexcept): Only return false if defaulted. + (regenerate_decl_from_template): Use it for noexcept-specs. + 2019-03-14 Jason Merrill * parser.c (cp_parser_decl_specifier_seq): Support C++20 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 2ab6e27..dc5c24c 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -23991,12 +23991,18 @@ regenerate_decl_from_template (tree decl, tree tmpl, tree args) if (args_depth > parms_depth) args = get_innermost_template_args (args, parms_depth); - specs = tsubst_exception_specification (TREE_TYPE (code_pattern), - args, tf_error, NULL_TREE, - /*defer_ok*/false); - if (specs && specs != error_mark_node) - TREE_TYPE (decl) = build_exception_variant (TREE_TYPE (decl), - specs); + /* Instantiate a dynamic exception-specification. noexcept will be + handled below. */ + if (tree raises = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (code_pattern))) + if (TREE_VALUE (raises)) + { + specs = tsubst_exception_specification (TREE_TYPE (code_pattern), + args, tf_error, NULL_TREE, + /*defer_ok*/false); + if (specs && specs != error_mark_node) + TREE_TYPE (decl) = build_exception_variant (TREE_TYPE (decl), + specs); + } /* Merge parameter declarations. */ decl_parm = skip_artificial_parms_for (decl, @@ -24062,6 +24068,8 @@ regenerate_decl_from_template (tree decl, tree tmpl, tree args) if (DECL_DECLARED_INLINE_P (code_pattern) && !DECL_DECLARED_INLINE_P (decl)) DECL_DECLARED_INLINE_P (decl) = 1; + + maybe_instantiate_noexcept (decl, tf_error); } else if (VAR_P (decl)) { @@ -24187,7 +24195,13 @@ maybe_instantiate_noexcept (tree fn, tsubst_flags_t complain) static hash_set* fns = new hash_set; bool added = false; if (DEFERRED_NOEXCEPT_PATTERN (noex) == NULL_TREE) - spec = get_defaulted_eh_spec (fn, complain); + { + spec = get_defaulted_eh_spec (fn, complain); + if (spec == error_mark_node) + /* This might have failed because of an unparsed DMI, so + let's try again later. */ + return false; + } else if (!(added = !fns->add (fn))) { /* If hash_set::add returns true, the element was already there. */ @@ -24247,7 +24261,11 @@ maybe_instantiate_noexcept (tree fn, tsubst_flags_t complain) fns->remove (fn); if (spec == error_mark_node) - return false; + { + /* This failed with a hard error, so let's go with false. */ + gcc_assert (seen_error ()); + spec = noexcept_false_spec; + } TREE_TYPE (fn) = build_exception_variant (fntype, spec); } diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept36.C b/gcc/testsuite/g++.dg/cpp0x/noexcept36.C new file mode 100644 index 0000000..980a28c --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/noexcept36.C @@ -0,0 +1,22 @@ +// PR c++/89571 +// { dg-do compile { target c++11 } } + +struct z8 { + constexpr static int qq /* = 0 */; // { dg-error "initializer" } +}; + +template +struct kf { + kf (const kf &) noexcept (T::qq); // { dg-error "constant" } +}; + +struct lk { + kf e1; +}; + +template +T &sc (); + +struct b6 { + decltype (lk (sc ())) zz; +}; -- cgit v1.1 From af52cce0afdf36a6ae6472a9f9ed279341f2dc23 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 18 Mar 2019 00:16:19 +0000 Subject: Daily bump. From-SVN: r269749 --- gcc/DATESTAMP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index fd62143..f3597e0 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20190317 +20190318 -- cgit v1.1 From 7e703f019b351ceb6c68da23bde1e1754746e1f2 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Mon, 18 Mar 2019 07:28:42 +0000 Subject: re PR fortran/88008 (ICE in check_typebound_baseobject, at fortran/resolve.c:6058) 2019-03-17 Thomas Koenig PR fortran/88008 * gfortran.h (expr_t): Add EXPR_UNKNOWN. * expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement. (gfc_simplify_expr): Likewise. * module.c (mio_expr): Likewise. * resovle.c (extract_compcall_passed_object): Issue error on unknown type. (check_typebound_baseobject): Issue error on wrong type. * trans-expr.c (gfc_apply_interface_mapping_to_expr): Add EXPR_UNKNOWN to switch statement. 2019-03-17 Thomas Koenig PR fortran/88008 * gfortran.dg/typebound_call_31.f90: New test. From-SVN: r269750 --- gcc/fortran/ChangeLog | 13 +++++++++++++ gcc/fortran/expr.c | 6 ++++++ gcc/fortran/gfortran.h | 2 +- gcc/fortran/module.c | 1 + gcc/fortran/resolve.c | 13 ++++++++++++- gcc/fortran/trans-expr.c | 1 + gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/typebound_call_31.f90 | 16 ++++++++++++++++ 8 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/typebound_call_31.f90 (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 762da70..8028118 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,16 @@ +2019-03-17 Thomas Koenig + + PR fortran/88008 + * gfortran.h (expr_t): Add EXPR_UNKNOWN. + * expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement. + (gfc_simplify_expr): Likewise. + * module.c (mio_expr): Likewise. + * resovle.c (extract_compcall_passed_object): Issue error on + unknown type. + (check_typebound_baseobject): Issue error on wrong type. + * trans-expr.c (gfc_apply_interface_mapping_to_expr): Add + EXPR_UNKNOWN to switch statement. + 2019-03-16 Jakub Jelinek PR fortran/89724 diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index d654f4e7..4c76f53 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -390,6 +390,9 @@ gfc_copy_expr (gfc_expr *p) case EXPR_VARIABLE: case EXPR_NULL: break; + + case EXPR_UNKNOWN: + gcc_unreachable (); } q->shape = gfc_copy_shape (p->shape, p->rank); @@ -2206,6 +2209,9 @@ gfc_simplify_expr (gfc_expr *p, int type) case EXPR_COMPCALL: case EXPR_PPC: break; + + case EXPR_UNKNOWN: + gcc_unreachable (); } return true; diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index dd959e6..2f55b9c 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -142,7 +142,7 @@ enum gfc_source_form /* Expression node types. */ enum expr_t -{ EXPR_OP = 1, EXPR_FUNCTION, EXPR_CONSTANT, EXPR_VARIABLE, + { EXPR_UNKNOWN = 0, EXPR_OP = 1, EXPR_FUNCTION, EXPR_CONSTANT, EXPR_VARIABLE, EXPR_SUBSTRING, EXPR_STRUCTURE, EXPR_ARRAY, EXPR_NULL, EXPR_COMPCALL, EXPR_PPC }; diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 0572b8e..0c2699c 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -3694,6 +3694,7 @@ mio_expr (gfc_expr **ep) case EXPR_COMPCALL: case EXPR_PPC: + case EXPR_UNKNOWN: gcc_unreachable (); break; } diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 62c7d37..7539aa7 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -5945,6 +5945,13 @@ extract_compcall_passed_object (gfc_expr* e) { gfc_expr* po; + if (e->expr_type == EXPR_UNKNOWN) + { + gfc_error ("Error in typebound call at %L", + &e->where); + return NULL; + } + gcc_assert (e->expr_type == EXPR_COMPCALL); if (e->value.compcall.base_object) @@ -6090,7 +6097,11 @@ check_typebound_baseobject (gfc_expr* e) if (!base) return false; - gcc_assert (base->ts.type == BT_DERIVED || base->ts.type == BT_CLASS); + if (base->ts.type != BT_DERIVED && base->ts.type != BT_CLASS) + { + gfc_error ("Error in typebound call at %L", &e->where); + goto cleanup; + } if (base->ts.type == BT_CLASS && !gfc_expr_attr (base).class_ok) return false; diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 9575f39..3cd2ffa 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -4536,6 +4536,7 @@ gfc_apply_interface_mapping_to_expr (gfc_interface_mapping * mapping, case EXPR_COMPCALL: case EXPR_PPC: + case EXPR_UNKNOWN: gcc_unreachable (); break; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 131ef49..ecb9962 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-17 Thomas Koenig + + PR fortran/88008 + * gfortran.dg/typebound_call_31.f90: New test. + 2019-03-03-17 John David Anglin * gcc.dg/compat/pr83487-1_x.c: Use -fno-common option on hppa*-*-hpux*. diff --git a/gcc/testsuite/gfortran.dg/typebound_call_31.f90 b/gcc/testsuite/gfortran.dg/typebound_call_31.f90 new file mode 100644 index 0000000..b33bbf1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/typebound_call_31.f90 @@ -0,0 +1,16 @@ +! { dg-do compile } +! PR 88008 - this use to ICE. Original test case by +! Gerhard Steinmetz. + +module m + type t + integer, pointer :: z + contains + procedure :: g + end type +contains + subroutine g(x) + class(t) :: x + call x%z%g() ! { dg-error "Error in typebound call" } + end +end -- cgit v1.1 From 4e3f3c46d716eda472f6bcb6918b3ab69d981328 Mon Sep 17 00:00:00 2001 From: Andrey Belevantsev Date: Mon, 18 Mar 2019 10:51:06 +0300 Subject: re PR rtl-optimization/89676 (Redundant moves for long long shift on 32bit x86) PR middle-end/89676 * sel-sched.c (compute_av_set_at_bb_end): When we have an ineligible successor, use NULL as its av set. From-SVN: r269751 --- gcc/ChangeLog | 6 ++++++ gcc/sel-sched.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 67dc0bf..b66cb5d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-18 Andrey Belevantsev + + PR middle-end/89676 + * sel-sched.c (compute_av_set_at_bb_end): When we have an ineligible + successor, use NULL as its av set. + 2019-03-15 Segher Boessenkool PR rtl-optimization/89721 diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index 315f2c0..338d7c0 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -2820,10 +2820,12 @@ compute_av_set_at_bb_end (insn_t insn, ilist_t p, int ws) FOR_EACH_VEC_ELT (sinfo->succs_ok, is, succ) { basic_block succ_bb = BLOCK_FOR_INSN (succ); + av_set_t av_succ = (is_ineligible_successor (succ, p) + ? NULL + : BB_AV_SET (succ_bb)); gcc_assert (BB_LV_SET_VALID_P (succ_bb)); - mark_unavailable_targets (av1, BB_AV_SET (succ_bb), - BB_LV_SET (succ_bb)); + mark_unavailable_targets (av1, av_succ, BB_LV_SET (succ_bb)); } /* Finally, check liveness restrictions on paths leaving the region. */ -- cgit v1.1 From 1d24f24c6afbd8fd00e31644d94fdb4f60d7ae36 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 18 Mar 2019 09:31:41 +0100 Subject: re PR middle-end/86979 (ICE: in maybe_record_trace_start, at dwarf2cfi.c:2348 with -m32 on darwin) PR middle-end/86979 * gcc.dg/pr86979.c: New test. From-SVN: r269752 --- gcc/ChangeLog | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/pr86979.c | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/pr86979.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b66cb5d..7580713 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,6 @@ 2019-03-18 Andrey Belevantsev - PR middle-end/89676 + PR middle-end/86979 * sel-sched.c (compute_av_set_at_bb_end): When we have an ineligible successor, use NULL as its av set. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ecb9962..585cba50 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-18 Jakub Jelinek + + PR middle-end/86979 + * gcc.dg/pr86979.c: New test. + 2019-03-17 Thomas Koenig PR fortran/88008 diff --git a/gcc/testsuite/gcc.dg/pr86979.c b/gcc/testsuite/gcc.dg/pr86979.c new file mode 100644 index 0000000..5c78d78 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr86979.c @@ -0,0 +1,5 @@ +/* { dg-options "-Og -fPIC -fschedule-insns2 -fselective-scheduling2 -fno-tree-fre --param=max-sched-extend-regions-iters=2" } */ +/* { dg-require-effective-target scheduling } */ +/* { dg-require-effective-target fpic } */ + +#include "../gcc.c-torture/compile/pr69102.c" -- cgit v1.1 From 0538ed1d3602ec756085c09f3213b0fe7e8428ec Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 18 Mar 2019 09:16:56 +0000 Subject: re PR target/87561 (416.gamess is slower by ~10% starting from r264866 with -Ofast) 2019-03-18 Richard Biener PR target/87561 * config/i386/i386.c (ix86_add_stmt_cost): Apply strided load pessimization to stores as well. From-SVN: r269753 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7580713..a67a0bf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-18 Richard Biener + + PR target/87561 + * config/i386/i386.c (ix86_add_stmt_cost): Apply strided + load pessimization to stores as well. + 2019-03-18 Andrey Belevantsev PR middle-end/86979 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 70e1011..67af137 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -50564,9 +50564,10 @@ ix86_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind, latency and execution resources for the many scalar loads (AGU and load ports). Try to account for this by scaling the construction cost by the number of elements involved. */ - if (kind == vec_construct + if ((kind == vec_construct || kind == vec_to_scalar) && stmt_info - && STMT_VINFO_TYPE (stmt_info) == load_vec_info_type + && (STMT_VINFO_TYPE (stmt_info) == load_vec_info_type + || STMT_VINFO_TYPE (stmt_info) == store_vec_info_type) && STMT_VINFO_MEMORY_ACCESS_TYPE (stmt_info) == VMAT_ELEMENTWISE && TREE_CODE (DR_STEP (STMT_VINFO_DATA_REF (stmt_info))) != INTEGER_CST) { -- cgit v1.1 From 7d7d1ce83889ee17fbf7fb8aadf23e1f5179b9ce Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 18 Mar 2019 09:17:43 +0000 Subject: re PR target/87561 (416.gamess is slower by ~10% starting from r264866 with -Ofast) 2019-03-18 Richard Biener PR target/87561 * config/i386/i386.c (ix86_add_stmt_cost): Pessimize strided loads and stores a bit more. From-SVN: r269754 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a67a0bf..1da0fe3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,12 @@ 2019-03-18 Richard Biener PR target/87561 + * config/i386/i386.c (ix86_add_stmt_cost): Pessimize strided + loads and stores a bit more. + +2019-03-18 Richard Biener + + PR target/87561 * config/i386/i386.c (ix86_add_stmt_cost): Apply strided load pessimization to stores as well. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 67af137..560170f 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -50572,7 +50572,7 @@ ix86_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind, && TREE_CODE (DR_STEP (STMT_VINFO_DATA_REF (stmt_info))) != INTEGER_CST) { stmt_cost = ix86_builtin_vectorization_cost (kind, vectype, misalign); - stmt_cost *= TYPE_VECTOR_SUBPARTS (vectype); + stmt_cost *= (TYPE_VECTOR_SUBPARTS (vectype) + 1); } if (stmt_cost == -1) stmt_cost = ix86_builtin_vectorization_cost (kind, vectype, misalign); -- cgit v1.1 From 864e2eaa392bb8d43ac40066f06f4a23711e19c5 Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Mon, 18 Mar 2019 10:28:11 +0100 Subject: [ARC] Introduce ADJUST_REG_ALLOC_ORDER. The ARC port is changing the allocation order in the arc_conditional_register_usage function, but this is not the proper way. Thus, we employ ADJUST_REG_ALLOC_ORDER hook for this task. gcc/ xxxx-xx-xx Claudiu Zissulescu * config/arc/arc-protos.h (arc_adjust_reg_alloc_order): Declare. * config/arc/arc.c (arc_conditional_register_usage): Remove all reg_alloc_order references. (size_alloc_order): Define. (arc_adjust_reg_alloc_order): New function. * config/arc/arc.h (REG_ALLOC_ORDER): Proper define the register order. (ADJUST_REG_ALLOC_ORDER): Define. (HONOR_REG_ALLOC_ORDER): Likewise. From-SVN: r269755 --- gcc/ChangeLog | 12 ++++++++ gcc/config/arc/arc-protos.h | 1 + gcc/config/arc/arc.c | 67 +++++++++++++-------------------------------- gcc/config/arc/arc.h | 33 ++++++++++++++++++---- 4 files changed, 59 insertions(+), 54 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1da0fe3..6c82a61 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2019-03-18 Claudiu Zissulescu + + * config/arc/arc-protos.h (arc_adjust_reg_alloc_order): Declare. + * config/arc/arc.c (arc_conditional_register_usage): Remove all + reg_alloc_order references. + (size_alloc_order): Define. + (arc_adjust_reg_alloc_order): New function. + * config/arc/arc.h (REG_ALLOC_ORDER): Proper define the register + order. + (ADJUST_REG_ALLOC_ORDER): Define. + (HONOR_REG_ALLOC_ORDER): Likewise. + 2019-03-18 Richard Biener PR target/87561 diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h index 1362b41..8f0f197 100644 --- a/gcc/config/arc/arc-protos.h +++ b/gcc/config/arc/arc-protos.h @@ -47,6 +47,7 @@ extern unsigned int arc_compute_function_type (struct function *); extern bool arc_is_uncached_mem_p (rtx); extern bool gen_operands_ldd_std (rtx *operands, bool load, bool commute); extern bool arc_check_multi (rtx, bool); +extern void arc_adjust_reg_alloc_order (void); #endif /* RTX_CODE */ extern unsigned int arc_compute_frame_size (int); diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 581833b..e2eaaa4 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -1806,54 +1806,6 @@ arc_conditional_register_usage (void) warning (0, "multiply option implies r%d is fixed", regno); fixed_regs [regno] = call_used_regs[regno] = 1; } - if (TARGET_Q_CLASS) - { - if (optimize_size) - { - reg_alloc_order[0] = 0; - reg_alloc_order[1] = 1; - reg_alloc_order[2] = 2; - reg_alloc_order[3] = 3; - reg_alloc_order[4] = 12; - reg_alloc_order[5] = 13; - reg_alloc_order[6] = 14; - reg_alloc_order[7] = 15; - reg_alloc_order[8] = 4; - reg_alloc_order[9] = 5; - reg_alloc_order[10] = 6; - reg_alloc_order[11] = 7; - reg_alloc_order[12] = 8; - reg_alloc_order[13] = 9; - reg_alloc_order[14] = 10; - reg_alloc_order[15] = 11; - } - else - { - reg_alloc_order[2] = 12; - reg_alloc_order[3] = 13; - reg_alloc_order[4] = 14; - reg_alloc_order[5] = 15; - reg_alloc_order[6] = 1; - reg_alloc_order[7] = 0; - reg_alloc_order[8] = 4; - reg_alloc_order[9] = 5; - reg_alloc_order[10] = 6; - reg_alloc_order[11] = 7; - reg_alloc_order[12] = 8; - reg_alloc_order[13] = 9; - reg_alloc_order[14] = 10; - reg_alloc_order[15] = 11; - } - } - if (TARGET_SIMD_SET) - { - int i; - for (i = ARC_FIRST_SIMD_VR_REG; i <= ARC_LAST_SIMD_VR_REG; i++) - reg_alloc_order [i] = i; - for (i = ARC_FIRST_SIMD_DMA_CONFIG_REG; - i <= ARC_LAST_SIMD_DMA_CONFIG_REG; i++) - reg_alloc_order [i] = i; - } /* Reduced configuration: don't use r4-r9, r16-r25. */ if (TARGET_RF16) @@ -11404,6 +11356,25 @@ gen_operands_ldd_std (rtx *operands, bool load, bool commute) return false; } +/* This order of allocation is used when we compile for size. It + allocates first the registers which are most probably to end up in + a short instruction. */ +static const int size_alloc_order[] = +{ + 0, 1, 2, 3, 12, 13, 14, 15, + 4, 5, 6, 7, 8, 9, 10, 11 +}; + +/* Adjust register allocation order when compiling for size. */ +void +arc_adjust_reg_alloc_order (void) +{ + const int arc_default_alloc_order[] = REG_ALLOC_ORDER; + memcpy (reg_alloc_order, arc_default_alloc_order, sizeof (reg_alloc_order)); + if (optimize_size) + memcpy (reg_alloc_order, size_alloc_order, sizeof (size_alloc_order)); +} + #undef TARGET_USE_ANCHORS_FOR_SYMBOL_P #define TARGET_USE_ANCHORS_FOR_SYMBOL_P arc_use_anchors_for_symbol_p diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index 894eb39..8ed469a 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -361,7 +361,6 @@ if (GET_MODE_CLASS (MODE) == MODE_INT \ By default, the extension registers are not available. */ /* Present implementations only have VR0-VR23 only. */ -/* ??? FIXME: r27 and r31 should not be fixed registers. */ #define FIXED_REGISTERS \ { 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, 0, \ @@ -422,12 +421,34 @@ if (GET_MODE_CLASS (MODE) == MODE_INT \ /* If defined, an initializer for a vector of integers, containing the numbers of hard registers in the order in which GCC should prefer to use them (from most preferred to least). */ -#define REG_ALLOC_ORDER \ -{ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, \ - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, \ +#define REG_ALLOC_ORDER \ +{ \ + /* General registers. */ \ + 2, 3, 12, 13, 14, 15, 1, 0, 4, 5, 6, 7, 8, 9, 10, 11, \ + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 30, \ + /* Extension core registers. */ \ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, \ - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, \ - 27, 28, 29, 30, 31, 63} + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \ + /* VR regs. */ \ + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \ + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, \ + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \ + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, \ + 124, 125, 126, 127, \ + /* DMA registers. */ \ + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, \ + 142, 143, \ + /* Register not used for general use. */ \ + 62, FRAME_POINTER_REGNUM, ARG_POINTER_REGNUM, \ + SP_REG, ILINK1_REG, RETURN_ADDR_REGNUM, LP_COUNT, CC_REG, PCL_REG \ +} + +/* Use different register alloc ordering for Thumb. */ +#define ADJUST_REG_ALLOC_ORDER arc_adjust_reg_alloc_order () + +/* Tell IRA to use the order we define rather than messing it up with its + own cost calculations. */ +#define HONOR_REG_ALLOC_ORDER 1 /* Internal macros to classify a register number as to whether it's a general purpose register for compact insns (r0-r3,r12-r15), or -- cgit v1.1 From 8e95721a296888f8fa8df0b91293b8d6aa094e2d Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Mon, 18 Mar 2019 10:28:22 +0100 Subject: [ARC] Define TARGET_HAVE_SPECULATION_SAFE_VALUE. xxxx-xx-xx Claudiu Zissulescu * config/arc/arc.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define. From-SVN: r269756 --- gcc/ChangeLog | 4 ++++ gcc/config/arc/arc.c | 3 +++ 2 files changed, 7 insertions(+) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6c82a61..5af94f9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2019-03-18 Claudiu Zissulescu + * config/arc/arc.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define. + +2019-03-18 Claudiu Zissulescu + * config/arc/arc-protos.h (arc_adjust_reg_alloc_order): Declare. * config/arc/arc.c (arc_conditional_register_usage): Remove all reg_alloc_order references. diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index e2eaaa4..f91a29c3 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -11387,6 +11387,9 @@ arc_adjust_reg_alloc_order (void) #undef TARGET_ASM_TRAMPOLINE_TEMPLATE #define TARGET_ASM_TRAMPOLINE_TEMPLATE arc_asm_trampoline_template +#undef TARGET_HAVE_SPECULATION_SAFE_VALUE +#define TARGET_HAVE_SPECULATION_SAFE_VALUE speculation_safe_value_not_needed + struct gcc_target targetm = TARGET_INITIALIZER; #include "gt-arc.h" -- cgit v1.1 From a09479605013801c23451d47a297077195cae8da Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Mon, 18 Mar 2019 10:28:33 +0100 Subject: [ARC] Fix tst_movb pattern. xxxx-xx-xx Claudiu Zissulescu * config/arc/arc.md (tst_movb): Fix constraint. From-SVN: r269757 --- gcc/ChangeLog | 4 ++++ gcc/config/arc/arc.md | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5af94f9..0ecd5c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2019-03-18 Claudiu Zissulescu + * config/arc/arc.md (tst_movb): Fix constraint. + +2019-03-18 Claudiu Zissulescu + * config/arc/arc.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define. 2019-03-18 Claudiu Zissulescu diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md index d9efc69..01a715e 100644 --- a/gcc/config/arc/arc.md +++ b/gcc/config/arc/arc.md @@ -960,10 +960,10 @@ core_3, archs4x, archs4xd, archs4xd_slow" (match_operand 0 "cc_register" "") (match_operator 4 "zn_compare_operator" [(and:SI - (match_operand:SI 1 "register_operand" "%Rcq,Rcq, c, c, c, c,Rrq, 3, c") + (match_operand:SI 1 "register_operand" "%Rcq,Rcq, c, c, c, c,Rrq,Rrq, c") (match_operand:SI 2 "nonmemory_operand" "Rcq,C0p,cI,C1p,Ccp,Chs,Cbf,Cbf,???Cal")) (const_int 0)])) - (clobber (match_scratch:SI 3 "=X,X,X,X,X,X,Rrq,Rrq,c"))] + (clobber (match_scratch:SI 3 "=X,X,X,X,X,X,Rrq,1,c"))] "TARGET_NPS_BITOPS" "movb.f.cl %3,%1,%p2,%p2,%s2" "TARGET_NPS_BITOPS && reload_completed -- cgit v1.1 From f5d56cf957f9235d43f4dc4cec511b042e0b18de Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Mon, 18 Mar 2019 10:28:45 +0100 Subject: [ARC] Enable code density frame option for elf targets. xxxx-xx-xx Claudiu Zissulescu * config/arc/arc.opt (mcode-density-frame): Get the inital value from TARGET_CODE_DENSITY_FRAME_DEFAULT. * config/arc/elf.h (TARGET_CODE_DENSITY_FRAME_DEFAULT): Define. * config/arc/linux.h (TARGET_CODE_DENSITY_FRAME_DEFAULT): Define. * config/arc/arc.md (pop_multi_fp_blink): Adjust constraints to match what the ops is doing. (push_multi_fp_blink): Likewise. * config/arc/arc.c (arc_override_options): Enable enter/leave when compiling for size and elf target. (arc_save_callee_enter): Adjust note to match what enter/leave operation does. From-SVN: r269758 --- gcc/ChangeLog | 14 ++++++++++++++ gcc/config/arc/arc.c | 5 ++++- gcc/config/arc/arc.md | 22 ++++++++++++---------- gcc/config/arc/arc.opt | 2 +- gcc/config/arc/elf.h | 4 ++++ gcc/config/arc/linux.h | 4 ++++ 6 files changed, 39 insertions(+), 12 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0ecd5c4..2da36e7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,19 @@ 2019-03-18 Claudiu Zissulescu + * config/arc/arc.opt (mcode-density-frame): Get the inital value + from TARGET_CODE_DENSITY_FRAME_DEFAULT. + * config/arc/elf.h (TARGET_CODE_DENSITY_FRAME_DEFAULT): Define. + * config/arc/linux.h (TARGET_CODE_DENSITY_FRAME_DEFAULT): Define. + * config/arc/arc.md (pop_multi_fp_blink): Adjust constraints to + match what the ops is doing. + (push_multi_fp_blink): Likewise. + * config/arc/arc.c (arc_override_options): Enable enter/leave when + compiling for size and elf target. + (arc_save_callee_enter): Adjust note to match what enter/leave + operation does. + +2019-03-18 Claudiu Zissulescu + * config/arc/arc.md (tst_movb): Fix constraint. 2019-03-18 Claudiu Zissulescu diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index f91a29c3..978d845 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -1294,6 +1294,9 @@ arc_override_options (void) if (arc_size_opt_level == 3) optimize_size = 1; + if (TARGET_V2 && optimize_size && (ATTRIBUTE_PCS == 2)) + TARGET_CODE_DENSITY_FRAME = 1; + if (flag_pic) target_flags |= MASK_NO_SDATA_SET; @@ -3140,7 +3143,7 @@ arc_save_callee_enter (unsigned int gmask, reg = gen_rtx_SET (stack_pointer_rtx, plus_constant (Pmode, stack_pointer_rtx, - nregs * UNITS_PER_WORD)); + -nregs * UNITS_PER_WORD)); RTX_FRAME_RELATED_P (reg) = 1; XVECEXP (insn, 0, indx++) = reg; off = nregs * UNITS_PER_WORD; diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md index 01a715e..e682983 100644 --- a/gcc/config/arc/arc.md +++ b/gcc/config/arc/arc.md @@ -6458,7 +6458,8 @@ core_3, archs4x, archs4xd, archs4xd_slow" (plus:SI (reg:SI SP_REG) (match_operand 1 "immediate_operand" ""))) (set (mem:SI (plus:SI (reg:SI SP_REG) - (match_dup 1))) + (match_operand 2 "immediate_operand" + ""))) (reg:SI 13))])] "TARGET_CODE_DENSITY" { @@ -6466,14 +6467,14 @@ core_3, archs4x, archs4xd, archs4xd_slow" rtx tmp = XVECEXP (operands[0], 0, len - 1); if (MEM_P (XEXP (tmp, 0))) { - operands[2] = XEXP (tmp, 1); - return "enter_s\\t{r13-%2} ; sp=sp-%1"; + operands[3] = XEXP (tmp, 1); + return "enter_s\\t{r13-%3} ; sp=sp+(%1)"; } else { tmp = XVECEXP (operands[0], 0, len - 3); - operands[2] = XEXP (tmp, 1); - return "enter_s\\t{r13-%2, fp} ; sp=sp-%1"; + operands[3] = XEXP (tmp, 1); + return "enter_s\\t{r13-%3, fp} ; sp=sp+(%1)"; } } [(set_attr "type" "call_no_delay_slot") @@ -6485,7 +6486,8 @@ core_3, archs4x, archs4xd, archs4xd_slow" (plus:SI (reg:SI SP_REG) (match_operand 1 "immediate_operand" ""))) (set (mem:SI (plus:SI (reg:SI SP_REG) - (match_dup 1))) + (match_operand 2 "immediate_operand" + ""))) (reg:SI RETURN_ADDR_REGNUM))])] "TARGET_CODE_DENSITY" { @@ -6493,14 +6495,14 @@ core_3, archs4x, archs4xd, archs4xd_slow" rtx tmp = XVECEXP (operands[0], 0, len - 1); if (MEM_P (XEXP (tmp, 0))) { - operands[2] = XEXP (tmp, 1); - return "enter_s\\t{r13-%2, blink} ; sp=sp-%1"; + operands[3] = XEXP (tmp, 1); + return "enter_s\\t{r13-%3, blink} ; sp=sp+(%1)"; } else { tmp = XVECEXP (operands[0], 0, len - 3); - operands[2] = XEXP (tmp, 1); - return "enter_s\\t{r13-%2, fp, blink} ; sp=sp-%1"; + operands[3] = XEXP (tmp, 1); + return "enter_s\\t{r13-%3, fp, blink} ; sp=sp+(%1)"; } } [(set_attr "type" "call_no_delay_slot") diff --git a/gcc/config/arc/arc.opt b/gcc/config/arc/arc.opt index 3e864dd..e433013 100644 --- a/gcc/config/arc/arc.opt +++ b/gcc/config/arc/arc.opt @@ -537,5 +537,5 @@ Target Report Var(TARGET_BRANCH_INDEX) Init(DEFAULT_BRANCH_INDEX) Enable use of BI/BIH instructions when available. mcode-density-frame -Target Report Var(TARGET_CODE_DENSITY_FRAME) +Target Report Var(TARGET_CODE_DENSITY_FRAME) Init(TARGET_CODE_DENSITY_FRAME_DEFAULT) Enable ENTER_S and LEAVE_S opcodes for ARCv2. diff --git a/gcc/config/arc/elf.h b/gcc/config/arc/elf.h index 34d17b1..297ac9b 100644 --- a/gcc/config/arc/elf.h +++ b/gcc/config/arc/elf.h @@ -87,3 +87,7 @@ along with GCC; see the file COPYING3. If not see fun = gen_rtx_SYMBOL_REF (Pmode, "__mcount"); \ emit_library_call (fun, LCT_NORMAL, VOIDmode); \ } + +/* Enter/Leave default value. */ +#undef TARGET_CODE_DENSITY_FRAME_DEFAULT +#define TARGET_CODE_DENSITY_FRAME_DEFAULT 0 diff --git a/gcc/config/arc/linux.h b/gcc/config/arc/linux.h index 6c8a7b4..270ca90 100644 --- a/gcc/config/arc/linux.h +++ b/gcc/config/arc/linux.h @@ -133,3 +133,7 @@ along with GCC; see the file COPYING3. If not see fun = gen_rtx_SYMBOL_REF (Pmode, "_mcount"); \ emit_library_call (fun, LCT_NORMAL, VOIDmode, rt, Pmode); \ } + +/* Enter/Leave ops are default off for linux targets. */ +#undef TARGET_CODE_DENSITY_FRAME_DEFAULT +#define TARGET_CODE_DENSITY_FRAME_DEFAULT 0 -- cgit v1.1 From e6da0bf1f15cdb0d641b77af75b7cb511ef9b553 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 18 Mar 2019 09:38:27 +0000 Subject: re PR c++/85014 (internal compiler error: in lookup_base, at cp/search.c:185) /cp 2019-03-18 Paolo Carlini PR c++/85014 * semantics.c (finish_non_static_data_member): Check return value of context_for_name_lookup and immediately return error_mark_node if isn't a type. /testsuite 2019-03-18 Paolo Carlini PR c++/85014 * g++.dg/cpp0x/pr85014.C: New. From-SVN: r269759 --- gcc/cp/ChangeLog | 7 +++++++ gcc/cp/semantics.c | 10 +++++++++- gcc/testsuite/ChangeLog | 10 ++++++++-- gcc/testsuite/g++.dg/cpp0x/pr85014.C | 10 ++++++++++ 4 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/pr85014.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 34e9c79..fa569bc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2019-03-18 Paolo Carlini + + PR c++/85014 + * semantics.c (finish_non_static_data_member): Check return value + of context_for_name_lookup and immediately return error_mark_node + if isn't a type. + 2019-03-17 Jason Merrill PR c++/89571 - ICE with ill-formed noexcept on constructor. diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index fcf0606..599e0e3 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1828,7 +1828,15 @@ finish_non_static_data_member (tree decl, tree object, tree qualifying_scope) { tree scope = qualifying_scope; if (scope == NULL_TREE) - scope = context_for_name_lookup (decl); + { + scope = context_for_name_lookup (decl); + if (!TYPE_P (scope)) + { + /* Can happen during error recovery (c++/85014). */ + gcc_assert (seen_error ()); + return error_mark_node; + } + } object = maybe_dummy_object (scope, NULL); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 585cba50..30014e6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-18 Paolo Carlini + + PR c++/85014 + * g++.dg/cpp0x/pr85014.C: New. + 2019-03-18 Jakub Jelinek PR middle-end/86979 @@ -6,11 +11,12 @@ 2019-03-17 Thomas Koenig PR fortran/88008 - * gfortran.dg/typebound_call_31.f90: New test. + * gfortran.dg/typebound_call_31.f90: New test. 2019-03-03-17 John David Anglin - * gcc.dg/compat/pr83487-1_x.c: Use -fno-common option on hppa*-*-hpux*. + * gcc.dg/compat/pr83487-1_x.c: Use -fno-common option on + hppa*-*-hpux*. * gcc.dg/compat/pr83487-1_y.c: Likewise. * gfortran.dg/pointer_init_10.f90: Require visibility support. diff --git a/gcc/testsuite/g++.dg/cpp0x/pr85014.C b/gcc/testsuite/g++.dg/cpp0x/pr85014.C new file mode 100644 index 0000000..0a3b241 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr85014.C @@ -0,0 +1,10 @@ +// { dg-do compile { target c++11 } } +// { dg-options "" } + +struct { + short a[__builtin_constant_p([] { + struct { + int b = b; + }; // { dg-error "abstract declarator" } + })]; +}; // { dg-error "abstract declarator" } -- cgit v1.1 From 4d7dfada8935a362601d1782bd6598e3e1d78d74 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Mon, 18 Mar 2019 10:42:53 +0000 Subject: gcc/riscv: Correctly ignore empty C++ structs when flattening for ABI This fixes PR target/89627. The RISC-V ABI document[1] says: For the purposes of this section, "struct" refers to a C struct with its hierarchy flattened, including any array fields. That is, struct { struct { float f[1]; } g[2]; } and struct { float f; float g; } are treated the same. Fields containing empty structs or unions are ignored while flattening, even in C++, unless they have nontrivial copy constructors or destructors. However, this flattening only applies when one of the fields of the flattened structure can be placed into a floating point register, otherwise no flattening occurs. Currently GCC fails to correctly consider that empty C++ structures have a non-zero size when constructing the arguments from a flattened structure, and as a result, trying to pass a C++ structure like this: struct sf { struct {} e; float f; }; Doesn't work correctly, GCC fails to take the offset of 'f' within 'sf' into account and will actually pass the space backing 'e' as the contents of 'f'. This patch fixes this so that 'f' will be passed correctly. A couple of new tests are added to cover this functionality. [1] https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md gcc/ChangeLog: PR target/89627 * config/riscv/riscv.c (riscv_pass_fpr_single): Add offset parameter, and make use of it. (riscv_get_arg_info): Pass offset to riscv_pass_fpr_single. gcc/testsuite/ChangeLog: PR target/89627 * g++.target/riscv/call-with-empty-struct-float.C: New file. * g++.target/riscv/call-with-empty-struct-int.C: New file. * g++.target/riscv/call-with-empty-struct.H: New file. * g++.target/riscv/riscv.exp: New file. From-SVN: r269760 --- gcc/ChangeLog | 7 +++++ gcc/config/riscv/riscv.c | 8 +++-- gcc/testsuite/ChangeLog | 8 +++++ .../riscv/call-with-empty-struct-float.C | 6 ++++ .../g++.target/riscv/call-with-empty-struct-int.C | 6 ++++ .../g++.target/riscv/call-with-empty-struct.H | 19 ++++++++++++ gcc/testsuite/g++.target/riscv/riscv.exp | 34 ++++++++++++++++++++++ 7 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/g++.target/riscv/call-with-empty-struct-float.C create mode 100644 gcc/testsuite/g++.target/riscv/call-with-empty-struct-int.C create mode 100644 gcc/testsuite/g++.target/riscv/call-with-empty-struct.H create mode 100644 gcc/testsuite/g++.target/riscv/riscv.exp (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2da36e7..481c903 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-03-18 Andrew Burgess + + PR target/89627 + * config/riscv/riscv.c (riscv_pass_fpr_single): Add offset + parameter, and make use of it. + (riscv_get_arg_info): Pass offset to riscv_pass_fpr_single. + 2019-03-18 Claudiu Zissulescu * config/arc/arc.opt (mcode-density-frame): Get the inital value diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c index 8881f80..8e78ab7 100644 --- a/gcc/config/riscv/riscv.c +++ b/gcc/config/riscv/riscv.c @@ -2449,13 +2449,14 @@ riscv_pass_aggregate_in_fpr_and_gpr_p (const_tree type, static rtx riscv_pass_fpr_single (machine_mode type_mode, unsigned regno, - machine_mode value_mode) + machine_mode value_mode, + HOST_WIDE_INT offset) { rtx x = gen_rtx_REG (value_mode, regno); if (type_mode != value_mode) { - x = gen_rtx_EXPR_LIST (VOIDmode, x, const0_rtx); + x = gen_rtx_EXPR_LIST (VOIDmode, x, GEN_INT (offset)); x = gen_rtx_PARALLEL (type_mode, gen_rtvec (1, x)); } return x; @@ -2517,7 +2518,8 @@ riscv_get_arg_info (struct riscv_arg_info *info, const CUMULATIVE_ARGS *cum, { case 1: return riscv_pass_fpr_single (mode, fregno, - TYPE_MODE (fields[0].type)); + TYPE_MODE (fields[0].type), + fields[0].offset); case 2: return riscv_pass_fpr_pair (mode, fregno, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 30014e6..6db8a74 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2019-03-18 Andrew Burgess + + PR target/89627 + * g++.target/riscv/call-with-empty-struct-float.C: New file. + * g++.target/riscv/call-with-empty-struct-int.C: New file. + * g++.target/riscv/call-with-empty-struct.H: New file. + * g++.target/riscv/riscv.exp: New file. + 2019-03-18 Paolo Carlini PR c++/85014 diff --git a/gcc/testsuite/g++.target/riscv/call-with-empty-struct-float.C b/gcc/testsuite/g++.target/riscv/call-with-empty-struct-float.C new file mode 100644 index 0000000..76d0dc6 --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/call-with-empty-struct-float.C @@ -0,0 +1,6 @@ +// { dg-do run } + +#include "call-with-empty-struct.H" + +MAKE_STRUCT_PASSING_TEST(float,2.5) + diff --git a/gcc/testsuite/g++.target/riscv/call-with-empty-struct-int.C b/gcc/testsuite/g++.target/riscv/call-with-empty-struct-int.C new file mode 100644 index 0000000..cc82912 --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/call-with-empty-struct-int.C @@ -0,0 +1,6 @@ +/* { dg-do run } */ + +#include "call-with-empty-struct.H" + +MAKE_STRUCT_PASSING_TEST(int,2) + diff --git a/gcc/testsuite/g++.target/riscv/call-with-empty-struct.H b/gcc/testsuite/g++.target/riscv/call-with-empty-struct.H new file mode 100644 index 0000000..d2a46e7 --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/call-with-empty-struct.H @@ -0,0 +1,19 @@ +#define MAKE_STRUCT_PASSING_TEST(type,val) \ + static struct struct_ ## type ## _t \ + { \ + struct { } e; \ + struct { type f; } s; \ + } global_struct_ ## type = { {}, { val } }; \ + \ + static bool \ + check_struct_ ## type (struct_ ## type ## _t obj) \ + { \ + return (obj.s.f == global_struct_ ## type .s.f); \ + } \ + \ + int \ + main () \ + { \ + bool result = check_struct_ ## type ( global_struct_ ## type ); \ + return result ? 0 : 1; \ + } diff --git a/gcc/testsuite/g++.target/riscv/riscv.exp b/gcc/testsuite/g++.target/riscv/riscv.exp new file mode 100644 index 0000000..a339b5c --- /dev/null +++ b/gcc/testsuite/g++.target/riscv/riscv.exp @@ -0,0 +1,34 @@ +# Copyright (C) 2019 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . + +# GCC testsuite that uses the `dg.exp' driver. + +# Exit immediately if this isn't a RISC-V target. +if ![istarget riscv*-*-*] then { + return +} + +# Load support procs. +load_lib g++-dg.exp + +# Initialize `dg'. +dg-init + +# Main loop. +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] "" "" + +# All done. +dg-finish -- cgit v1.1 From cfce6e055d98cf55a912dfe814d48a331ec2eee9 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Mon, 18 Mar 2019 12:28:01 +0100 Subject: Add forgotten requeing in propagate_subaccesses_across_link 2019-03-18 Martin Jambor PR tree-optimization/89546 * tree-sra.c (propagate_subaccesses_across_link): Requeue new_acc if any propagation to its children took place. testsuite/ * gcc.dg/tree-ssa/pr89546.c: New test. From-SVN: r269761 --- gcc/ChangeLog | 6 ++ gcc/testsuite/ChangeLog | 5 ++ gcc/testsuite/gcc.dg/tree-ssa/pr89546.c | 100 ++++++++++++++++++++++++++++++++ gcc/tree-sra.c | 8 ++- 4 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr89546.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 481c903..d3a9c25 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-18 Martin Jambor + + PR tree-optimization/89546 + * tree-sra.c (propagate_subaccesses_across_link): Requeue new_acc if + any propagation to its children took place. + 2019-03-18 Andrew Burgess PR target/89627 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6db8a74..e9301aa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-18 Martin Jambor + + PR tree-optimization/89546 + * gcc.dg/tree-ssa/pr89546.c: New test. + 2019-03-18 Andrew Burgess PR target/89627 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr89546.c b/gcc/testsuite/gcc.dg/tree-ssa/pr89546.c new file mode 100644 index 0000000..c4645ae --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr89546.c @@ -0,0 +1,100 @@ +/* { dg-do run } */ +/* { dg-options "-O" } */ + +struct I +{ + int i; +}; + +struct A +{ + struct I i1; + struct I i2; + struct I i3; +}; + +struct B +{ + struct I i0; + struct A a; +}; + +struct C +{ + struct I i00; + struct B b; +}; + +volatile int v; + +void __attribute__((noipa)) +consume_i (struct I i) +{ + v = i.i; +} + +void __attribute__((noipa)) +consume_a (struct A a) +{ + v = a.i1.i; +} + +void __attribute__((noipa)) +consume_b (struct B b) +{ + v = b.a.i1.i; +} + +void __attribute__((noipa)) +consume_c (struct C c) +{ + v = c.b.a.i1.i; +} + + + + +int __attribute__((noipa)) +foo (struct I input) +{ + struct I i1, i2, i3; + struct A a1, a2, a3; + struct B b1; + struct C c; + + i1 = input; + a1.i1 = i1; + b1.a = a1; + + i2.i = 1; + b1.i0 = i2; + + c.b = b1; + + a2 = c.b.a; + a3 = a2; + i3 = a3.i1; + + int t = c.b.i0.i; + a2.i3.i = 4; + consume_i (i1); + consume_i (i2); + consume_b (b1); + consume_a (a1); + consume_a (a2); + consume_a (a3); + consume_c (c); + + return i3.i + t; +} + +int +main (int argc, char *argv[]) +{ + struct I s; + s.i = 1234; + int i = foo (s); + if (i != 1235) + __builtin_abort (); + return 0; +} diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index ca3858d..fd51a3d 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -2752,8 +2752,12 @@ propagate_subaccesses_across_link (struct access *lacc, struct access *racc) rchild->grp_hint = 1; new_acc->grp_hint |= new_acc->grp_read; - if (rchild->first_child) - ret |= propagate_subaccesses_across_link (new_acc, rchild); + if (rchild->first_child + && propagate_subaccesses_across_link (new_acc, rchild)) + { + ret = 1; + add_access_to_work_queue (new_acc); + } } else { -- cgit v1.1 From c57546fe94712a723bc2e123445dc5d9b0a0ca1a Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 18 Mar 2019 12:25:32 +0000 Subject: Fix a case in which the vector cost model was ignored This patch fixes a case in which we vectorised something with a fully-predicated loop even after the cost model had rejected it. E.g. the loop in the testcase has the costs: Vector inside of loop cost: 27 Vector prologue cost: 0 Vector epilogue cost: 0 Scalar iteration cost: 7 Scalar outside cost: 6 Vector outside cost: 0 prologue iterations: 0 epilogue iterations: 0 and we can see that the loop executes at most three times, but we decided to vectorise it anyway. (The costs here are equal for three iterations, but the same thing happens even when the vector code is strictly more expensive.) The problem is the handling of "/VF" in: /* Calculate number of iterations required to make the vector version profitable, relative to the loop bodies only. The following condition must hold true: SIC * niters + SOC > VIC * ((niters-PL_ITERS-EP_ITERS)/VF) + VOC where SIC = scalar iteration cost, VIC = vector iteration cost, VOC = vector outside cost, VF = vectorization factor, PL_ITERS = prologue iterations, EP_ITERS= epilogue iterations SOC = scalar outside cost for run time cost model check. */ We treat the "/VF" as truncating, but for fully-predicated loops, it's closer to a ceil division, since fractional iterations are handled by a full iteration with some predicate bits set to false. The easiest fix seemed to be to calculate the minimum number of vector iterations first, then use that to calculate the minimum number of scalar iterations. Calculating the minimum number of vector iterations might make sense for unpredicated loops too, since calculating the scalar niters directly doesn't take into account the fact that the VIC multiple has to be an integer. But the handling of PL_ITERS and EP_ITERS for unpredicated loops is a bit hand-wavy anyway, so maybe vagueness here cancels out vagueness there? Either way, changing this for unpredicated loops would be much too invasive for stage 4, so the patch keeps it specific to fully-predicated loops (i.e. SVE) for now. There's no functional change for other targets. 2019-03-18 Richard Sandiford gcc/ * tree-vect-loop.c (vect_estimate_min_profitable_iters): Fix the calculation of the minimum number of scalar iterations for fully-predicated loops. gcc/testsuite/ * gcc.target/aarch64/sve/cost_model_1.c: New test. From-SVN: r269763 --- gcc/ChangeLog | 6 + gcc/testsuite/ChangeLog | 4 + .../gcc.target/aarch64/sve/cost_model_1.c | 12 ++ gcc/tree-vect-loop.c | 128 +++++++++++++++++---- 4 files changed, 126 insertions(+), 24 deletions(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/cost_model_1.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d3a9c25..d5c8114 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-18 Richard Sandiford + + * tree-vect-loop.c (vect_estimate_min_profitable_iters): Fix the + calculation of the minimum number of scalar iterations for + fully-predicated loops. + 2019-03-18 Martin Jambor PR tree-optimization/89546 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e9301aa..012f2a0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-03-18 Richard Sandiford + + * gcc.target/aarch64/sve/cost_model_1.c: New test. + 2019-03-18 Martin Jambor PR tree-optimization/89546 diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cost_model_1.c b/gcc/testsuite/gcc.target/aarch64/sve/cost_model_1.c new file mode 100644 index 0000000..a6d6442 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/sve/cost_model_1.c @@ -0,0 +1,12 @@ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */ + +void +f (unsigned int *restrict x, unsigned int *restrict y, + unsigned char *restrict z, unsigned int n) +{ + for (unsigned int i = 0; i < n % 4; ++i) + x[i] = x[i] + y[i] + z[i]; +} + +/* { dg-final { scan-tree-dump "not vectorized: estimated iteration count too small" vect } } */ +/* { dg-final { scan-tree-dump "vectorized 0 loops" vect } } */ diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index bd81193..0edcdc7 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -3600,14 +3600,89 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, /* Calculate number of iterations required to make the vector version profitable, relative to the loop bodies only. The following condition must hold true: - SIC * niters + SOC > VIC * ((niters-PL_ITERS-EP_ITERS)/VF) + VOC + SIC * niters + SOC > VIC * ((niters - NPEEL) / VF) + VOC where SIC = scalar iteration cost, VIC = vector iteration cost, VOC = vector outside cost, VF = vectorization factor, - PL_ITERS = prologue iterations, EP_ITERS= epilogue iterations + NPEEL = prologue iterations + epilogue iterations, SOC = scalar outside cost for run time cost model check. */ - if ((scalar_single_iter_cost * assumed_vf) > (int) vec_inside_cost) + int saving_per_viter = (scalar_single_iter_cost * assumed_vf + - vec_inside_cost); + if (saving_per_viter <= 0) + { + if (LOOP_VINFO_LOOP (loop_vinfo)->force_vectorize) + warning_at (vect_location.get_location_t (), OPT_Wopenmp_simd, + "vectorization did not happen for a simd loop"); + + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "cost model: the vector iteration cost = %d " + "divided by the scalar iteration cost = %d " + "is greater or equal to the vectorization factor = %d" + ".\n", + vec_inside_cost, scalar_single_iter_cost, assumed_vf); + *ret_min_profitable_niters = -1; + *ret_min_profitable_estimate = -1; + return; + } + + /* ??? The "if" arm is written to handle all cases; see below for what + we would do for !LOOP_VINFO_FULLY_MASKED_P. */ + if (LOOP_VINFO_FULLY_MASKED_P (loop_vinfo)) + { + /* Rewriting the condition above in terms of the number of + vector iterations (vniters) rather than the number of + scalar iterations (niters) gives: + + SIC * (vniters * VF + NPEEL) + SOC > VIC * vniters + VOC + + <==> vniters * (SIC * VF - VIC) > VOC - SIC * NPEEL - SOC + + For integer N, X and Y when X > 0: + + N * X > Y <==> N >= (Y /[floor] X) + 1. */ + int outside_overhead = (vec_outside_cost + - scalar_single_iter_cost * peel_iters_prologue + - scalar_single_iter_cost * peel_iters_epilogue + - scalar_outside_cost); + /* We're only interested in cases that require at least one + vector iteration. */ + int min_vec_niters = 1; + if (outside_overhead > 0) + min_vec_niters = outside_overhead / saving_per_viter + 1; + + if (dump_enabled_p ()) + dump_printf (MSG_NOTE, " Minimum number of vector iterations: %d\n", + min_vec_niters); + + if (LOOP_VINFO_FULLY_MASKED_P (loop_vinfo)) + { + /* Now that we know the minimum number of vector iterations, + find the minimum niters for which the scalar cost is larger: + + SIC * niters > VIC * vniters + VOC - SOC + + We know that the minimum niters is no more than + vniters * VF + NPEEL, but it might be (and often is) less + than that if a partial vector iteration is cheaper than the + equivalent scalar code. */ + int threshold = (vec_inside_cost * min_vec_niters + + vec_outside_cost + - scalar_outside_cost); + if (threshold <= 0) + min_profitable_iters = 1; + else + min_profitable_iters = threshold / scalar_single_iter_cost + 1; + } + else + /* Convert the number of vector iterations into a number of + scalar iterations. */ + min_profitable_iters = (min_vec_niters * assumed_vf + + peel_iters_prologue + + peel_iters_epilogue); + } + else { min_profitable_iters = ((vec_outside_cost - scalar_outside_cost) * assumed_vf @@ -3617,8 +3692,7 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, min_profitable_iters = 0; else { - min_profitable_iters /= ((scalar_single_iter_cost * assumed_vf) - - vec_inside_cost); + min_profitable_iters /= saving_per_viter; if ((scalar_single_iter_cost * assumed_vf * min_profitable_iters) <= (((int) vec_inside_cost * min_profitable_iters) @@ -3627,24 +3701,6 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, min_profitable_iters++; } } - /* vector version will never be profitable. */ - else - { - if (LOOP_VINFO_LOOP (loop_vinfo)->force_vectorize) - warning_at (vect_location.get_location_t (), OPT_Wopenmp_simd, - "vectorization did not happen for a simd loop"); - - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "cost model: the vector iteration cost = %d " - "divided by the scalar iteration cost = %d " - "is greater or equal to the vectorization factor = %d" - ".\n", - vec_inside_cost, scalar_single_iter_cost, assumed_vf); - *ret_min_profitable_niters = -1; - *ret_min_profitable_estimate = -1; - return; - } if (dump_enabled_p ()) dump_printf (MSG_NOTE, @@ -3668,10 +3724,34 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, Non-vectorized variant is SIC * niters and it must win over vector variant on the expected loop trip count. The following condition must hold true: - SIC * niters > VIC * ((niters-PL_ITERS-EP_ITERS)/VF) + VOC + SOC */ + SIC * niters > VIC * ((niters - NPEEL) / VF) + VOC + SOC */ if (vec_outside_cost <= 0) min_profitable_estimate = 0; + else if (LOOP_VINFO_FULLY_MASKED_P (loop_vinfo)) + { + /* This is a repeat of the code above, but with + SOC rather + than - SOC. */ + int outside_overhead = (vec_outside_cost + - scalar_single_iter_cost * peel_iters_prologue + - scalar_single_iter_cost * peel_iters_epilogue + + scalar_outside_cost); + int min_vec_niters = 1; + if (outside_overhead > 0) + min_vec_niters = outside_overhead / saving_per_viter + 1; + + if (LOOP_VINFO_FULLY_MASKED_P (loop_vinfo)) + { + int threshold = (vec_inside_cost * min_vec_niters + + vec_outside_cost + + scalar_outside_cost); + min_profitable_estimate = threshold / scalar_single_iter_cost + 1; + } + else + min_profitable_estimate = (min_vec_niters * assumed_vf + + peel_iters_prologue + + peel_iters_epilogue); + } else { min_profitable_estimate = ((vec_outside_cost + scalar_outside_cost) -- cgit v1.1 From f9cacebbde8427e0537e79fe87dd1c89251a2582 Mon Sep 17 00:00:00 2001 From: Andrew Stubbs Date: Mon, 18 Mar 2019 13:13:27 +0000 Subject: Implement circular print buffer. 2019-03-18 Andrew Stubbs gcc/ * config/gcn/gcn-run.c (struct output): Make next_output unsigned. Extend queue to 1024 entries. Add "consumed" field. (gomp_print_output): Remove print_index parameter. Add final parameter. Change limit to unsigned. Use consumed field to implement circular buffer. Detect interrupted print in final pass. Flush output at the end. (run): Update gomp_print_output usage. (main): Initialize kernargs->output_data.consumed. From-SVN: r269764 --- gcc/ChangeLog | 14 ++++++++++++ gcc/config/gcn/gcn-run.c | 56 ++++++++++++++++++++++++++++++------------------ 2 files changed, 49 insertions(+), 21 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d5c8114..4688296 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2019-03-18 Andrew Stubbs + + * config/gcn/gcn-run.c (struct output): Make next_output unsigned. + Extend queue to 1024 entries. + Add "consumed" field. + (gomp_print_output): Remove print_index parameter. + Add final parameter. + Change limit to unsigned. + Use consumed field to implement circular buffer. + Detect interrupted print in final pass. + Flush output at the end. + (run): Update gomp_print_output usage. + (main): Initialize kernargs->output_data.consumed. + 2019-03-18 Richard Sandiford * tree-vect-loop.c (vect_estimate_min_profitable_iters): Fix the diff --git a/gcc/config/gcn/gcn-run.c b/gcc/config/gcn/gcn-run.c index 5808984..00a7101 100644 --- a/gcc/config/gcn/gcn-run.c +++ b/gcc/config/gcn/gcn-run.c @@ -601,7 +601,7 @@ struct kernargs struct output { int return_value; - int next_output; + unsigned int next_output; struct printf_data { int written; @@ -613,7 +613,8 @@ struct kernargs double dvalue; char text[128]; }; - } queue[1000]; + } queue[1024]; + unsigned int consumed; } output_data; struct heap @@ -624,21 +625,34 @@ struct kernargs }; /* Print any console output from the kernel. - We print all entries from print_index to the next entry without a "written" - flag. Subsequent calls should use the returned print_index value to resume - from the same point. */ + We print all entries from "consumed" to the next entry without a "written" + flag, or "next_output" is reached. The buffer is circular, but the + indices are absolute. It is assumed the kernel will stop writing data + if "next_output" wraps (becomes smaller than "consumed"). */ void -gomp_print_output (struct kernargs *kernargs, int *print_index) +gomp_print_output (struct kernargs *kernargs, bool final) { - int limit = (sizeof (kernargs->output_data.queue) - / sizeof (kernargs->output_data.queue[0])); + unsigned int limit = (sizeof (kernargs->output_data.queue) + / sizeof (kernargs->output_data.queue[0])); - int i; - for (i = *print_index; i < limit; i++) + unsigned int from = __atomic_load_n (&kernargs->output_data.consumed, + __ATOMIC_ACQUIRE); + unsigned int to = kernargs->output_data.next_output; + + if (from > to) + { + /* Overflow. */ + if (final) + printf ("GCN print buffer overflowed.\n"); + return; + } + + unsigned int i; + for (i = from; i < to; i++) { - struct printf_data *data = &kernargs->output_data.queue[i]; + struct printf_data *data = &kernargs->output_data.queue[i%limit]; - if (!data->written) + if (!data->written && !final) break; switch (data->type) @@ -655,16 +669,16 @@ gomp_print_output (struct kernargs *kernargs, int *print_index) case 3: printf ("%.128s%.128s", data->msg, data->text); break; + default: + printf ("GCN print buffer error!\n"); + break; } data->written = 0; + __atomic_store_n (&kernargs->output_data.consumed, i+1, + __ATOMIC_RELEASE); } - - if (*print_index < limit && i == limit - && kernargs->output_data.next_output > limit) - printf ("WARNING: GCN print buffer exhausted.\n"); - - *print_index = i; + fflush (stdout); } /* Execute an already-loaded kernel on the device. */ @@ -711,16 +725,15 @@ run (void *kernargs) hsa_fns.hsa_queue_store_write_index_relaxed_fn (queue, index + 1); hsa_fns.hsa_signal_store_relaxed_fn (queue->doorbell_signal, index); /* Kernel running ...... */ - int print_index = 0; while (hsa_fns.hsa_signal_wait_relaxed_fn (signal, HSA_SIGNAL_CONDITION_LT, 1, 1000000, HSA_WAIT_STATE_ACTIVE) != 0) { usleep (10000); - gomp_print_output (kernargs, &print_index); + gomp_print_output (kernargs, false); } - gomp_print_output (kernargs, &print_index); + gomp_print_output (kernargs, true); if (debug) fprintf (stderr, "Kernel exited\n"); @@ -797,6 +810,7 @@ main (int argc, char *argv[]) for (unsigned i = 0; i < (sizeof (kernargs->output_data.queue) / sizeof (kernargs->output_data.queue[0])); i++) kernargs->output_data.queue[i].written = 0; + kernargs->output_data.consumed = 0; int offset = 0; for (int i = 0; i < kernel_argc; i++) { -- cgit v1.1 From ca6d4a08c120841654acb10b973b0d009b053ef3 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 18 Mar 2019 13:59:11 +0000 Subject: re PR tree-optimization/88945 (ICE in fold_convert_loc in FRE when using -fdump-tree-fre-details) 2019-03-18 Richard Biener PR middle-end/88945 * tree-ssanames.c (release_ssa_name_fn): For released SSA names use a TREE_TYPE of error_mark_node to avoid ICEs when dumping basic-blocks that are removed. Remove restoring SSA_NAME_VAR. * tree-outof-ssa.c (eliminate_useless_phis): Remove redundant checking. From-SVN: r269765 --- gcc/ChangeLog | 8 ++++++++ gcc/tree-outof-ssa.c | 21 +-------------------- gcc/tree-ssanames.c | 10 +++++----- 3 files changed, 14 insertions(+), 25 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4688296..a8d41e4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-03-18 Richard Biener + + PR middle-end/88945 + * tree-ssanames.c (release_ssa_name_fn): For released SSA names + use a TREE_TYPE of error_mark_node to avoid ICEs when dumping + basic-blocks that are removed. Remove restoring SSA_NAME_VAR. + * tree-outof-ssa.c (eliminate_useless_phis): Remove redundant checking. + 2019-03-18 Andrew Stubbs * config/gcn/gcn-run.c (struct output): Make next_output unsigned. diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c index c75d727..6cac55b 100644 --- a/gcc/tree-outof-ssa.c +++ b/gcc/tree-outof-ssa.c @@ -809,26 +809,7 @@ eliminate_useless_phis (void) gphi *phi = gsi.phi (); result = gimple_phi_result (phi); if (virtual_operand_p (result)) - { - /* There should be no arguments which are not virtual, or the - results will be incorrect. */ - if (flag_checking) - for (size_t i = 0; i < gimple_phi_num_args (phi); i++) - { - tree arg = PHI_ARG_DEF (phi, i); - if (TREE_CODE (arg) == SSA_NAME - && !virtual_operand_p (arg)) - { - fprintf (stderr, "Argument of PHI is not virtual ("); - print_generic_expr (stderr, arg, TDF_SLIM); - fprintf (stderr, "), but the result is :"); - print_gimple_stmt (stderr, phi, 0, TDF_SLIM); - internal_error ("SSA corruption"); - } - } - - remove_phi_node (&gsi, true); - } + remove_phi_node (&gsi, true); else { /* Also remove real PHIs with no uses. */ diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c index c457334..5bac799 100644 --- a/gcc/tree-ssanames.c +++ b/gcc/tree-ssanames.c @@ -595,7 +595,6 @@ release_ssa_name_fn (struct function *fn, tree var) defining statement. */ if (! SSA_NAME_IN_FREE_LIST (var)) { - tree saved_ssa_name_var = SSA_NAME_VAR (var); int saved_ssa_name_version = SSA_NAME_VERSION (var); use_operand_p imm = &(SSA_NAME_IMM_USE_NODE (var)); @@ -621,13 +620,14 @@ release_ssa_name_fn (struct function *fn, tree var) /* Restore the version number. */ SSA_NAME_VERSION (var) = saved_ssa_name_version; - /* Hopefully this can go away once we have the new incremental - SSA updating code installed. */ - SET_SSA_NAME_VAR_OR_IDENTIFIER (var, saved_ssa_name_var); - /* Note this SSA_NAME is now in the first list. */ SSA_NAME_IN_FREE_LIST (var) = 1; + /* Put in a non-NULL TREE_TYPE so dumping code will not ICE + if it happens to come along a released SSA name and tries + to inspect its type. */ + TREE_TYPE (var) = error_mark_node; + /* And finally queue it so that it will be put on the free list. */ vec_safe_push (FREE_SSANAMES_QUEUE (fn), var); } -- cgit v1.1 From b6e45a40cde2c8e7a18b62cca23dcd2f6916afa1 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 18 Mar 2019 11:58:24 -0400 Subject: PR c++/89682 - wrong access error in default argument. Here we were pushing into the right access context, but we were called from a deferred checking context, so didn't end up doing the checks until after we left the access context. * pt.c (tsubst_default_argument): Don't defer access checks. From-SVN: r269766 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/pt.c | 2 ++ gcc/testsuite/g++.dg/overload/defarg12.C | 14 ++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/g++.dg/overload/defarg12.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fa569bc..bc3850d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2019-03-18 Jason Merrill + + PR c++/89682 - wrong access error in default argument. + * pt.c (tsubst_default_argument): Don't defer access checks. + 2019-03-18 Paolo Carlini PR c++/85014 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index dc5c24c..7dc6e44 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -12776,6 +12776,7 @@ tsubst_default_argument (tree fn, int parmnum, tree type, tree arg, rather than in the current class. */ push_to_top_level (); push_access_scope (fn); + push_deferring_access_checks (dk_no_deferred); start_lambda_scope (parm); /* The default argument expression may cause implicitly defined @@ -12799,6 +12800,7 @@ tsubst_default_argument (tree fn, int parmnum, tree type, tree arg, inform (input_location, " when instantiating default argument for call to %qD", fn); + pop_deferring_access_checks (); pop_access_scope (fn); pop_from_top_level (); diff --git a/gcc/testsuite/g++.dg/overload/defarg12.C b/gcc/testsuite/g++.dg/overload/defarg12.C new file mode 100644 index 0000000..4a2b7e5 --- /dev/null +++ b/gcc/testsuite/g++.dg/overload/defarg12.C @@ -0,0 +1,14 @@ +// PR c++/89682 + +template +class C { + class TagType {}; +public: + C(int, TagType = makeTag()); +private: + static TagType makeTag(); +}; + +void test() { + C(1); +} -- cgit v1.1 From 3051b25e6677360434c4a0bfa948d0cffd719d45 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Mon, 18 Mar 2019 17:35:54 +0000 Subject: re PR fortran/68009 (prototype for gfortran_runtime_error with inline matmul) 2019-03-18 Thomas Koenig PR fortran/68009 * iresolve.c: Include trans.h. (gfc_resolve_fe_runtine_error): Set backend_decl on resolved_sym. From-SVN: r269769 --- gcc/fortran/ChangeLog | 7 +++++++ gcc/fortran/iresolve.c | 5 +++++ 2 files changed, 12 insertions(+) (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 8028118..4dd35ec 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2019-03-18 Thomas Koenig + + PR fortran/68009 + * iresolve.c: Include trans.h. + (gfc_resolve_fe_runtine_error): Set backend_decl on + resolved_sym. + 2019-03-17 Thomas Koenig PR fortran/88008 diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c index 135e6bc..53338dd 100644 --- a/gcc/fortran/iresolve.c +++ b/gcc/fortran/iresolve.c @@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see #include "intrinsic.h" #include "constructor.h" #include "arith.h" +#include "trans.h" /* Given printf-like arguments, return a stable version of the result string. @@ -2495,6 +2496,10 @@ gfc_resolve_fe_runtime_error (gfc_code *c) a->name = "%VAL"; c->resolved_sym = gfc_get_intrinsic_sub_symbol (name); + /* We set the backend_decl here because runtime_error is a + variadic function and we would use the wrong calling + convention otherwise. */ + c->resolved_sym->backend_decl = gfor_fndecl_runtime_error; } void -- cgit v1.1 From b2ebe97358d4e40304af37324146e8f87e4b8106 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Mon, 18 Mar 2019 18:43:34 +0100 Subject: rs6000: Fix pr18096-1.c test For the big stack frame in the test GCC used to say pr18096-1.c:7:6: error: total size of local objects too large but now it says pr18096-1.c:7:6: error: total size of local objects 2147483647 exceeds maximum 2147483392 Let's just allow both in the test. gcc/testsuite/ * gcc.target/powerpc/pr18096-1.c: Allow an error message that says "exceeds" instead of just one that talks about "too large". From-SVN: r269770 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/powerpc/pr18096-1.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 012f2a0..7bb8cb7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-18 Segher Boessenkool + + * gcc.target/powerpc/pr18096-1.c: Allow an error message that says + "exceeds" instead of just one that talks about "too large". + 2019-03-18 Richard Sandiford * gcc.target/aarch64/sve/cost_model_1.c: New test. diff --git a/gcc/testsuite/gcc.target/powerpc/pr18096-1.c b/gcc/testsuite/gcc.target/powerpc/pr18096-1.c index 74612f3..73a9ea1 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr18096-1.c +++ b/gcc/testsuite/gcc.target/powerpc/pr18096-1.c @@ -4,7 +4,7 @@ void f(char*); -void mkcatdefs(char *fname) /* { dg-error "too large" "stack frame too large" } */ +void mkcatdefs(char *fname) /* { dg-error "too large|exceeds" "stack frame too large" } */ { char line [2147483647]; f(line); -- cgit v1.1 From 0a6d5a9e3eb03b97884b2b06f8239f8371b278cf Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Mon, 18 Mar 2019 18:44:56 +0100 Subject: rs6000: Use pointers in bswap testcases Currently these bswap testcases use global variables, which causes problems with -m32: the memory access is a D-form access, and when combine tries to combine that with the bswap it tries a D-form store with byte reverse. That instruction does not exist, and since combine started with only two insns here it will not try splitting this. This should be improved, but it is not what this test is testing, and the "load" case already uses a pointer, so let's do that for the store case as well. * gcc.target/powerpc/bswap16.c: Use a pointer instead of a global for the "store" test as well. * gcc.target/powerpc/bswap32.c: Ditto. From-SVN: r269771 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.target/powerpc/bswap16.c | 3 +-- gcc/testsuite/gcc.target/powerpc/bswap32.c | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7bb8cb7..ba77fc5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2019-03-18 Segher Boessenkool + * gcc.target/powerpc/bswap16.c: Use a pointer instead of a global for + the "store" test as well. + * gcc.target/powerpc/bswap32.c: Ditto. + +2019-03-18 Segher Boessenkool + * gcc.target/powerpc/pr18096-1.c: Allow an error message that says "exceeds" instead of just one that talks about "too large". diff --git a/gcc/testsuite/gcc.target/powerpc/bswap16.c b/gcc/testsuite/gcc.target/powerpc/bswap16.c index 5eea4f7..89efc811 100644 --- a/gcc/testsuite/gcc.target/powerpc/bswap16.c +++ b/gcc/testsuite/gcc.target/powerpc/bswap16.c @@ -3,6 +3,5 @@ /* { dg-final { scan-assembler "lhbrx" } } */ /* { dg-final { scan-assembler "sthbrx" } } */ -unsigned short us; unsigned int load_bswap16 (unsigned short *p) { return __builtin_bswap16 (*p); } -void store_bswap16 (unsigned int a) { us = __builtin_bswap16 (a); } +void store_bswap16 (unsigned short *p, unsigned int a) { *p = __builtin_bswap16 (a); } diff --git a/gcc/testsuite/gcc.target/powerpc/bswap32.c b/gcc/testsuite/gcc.target/powerpc/bswap32.c index 1b1e189..0d1788f 100644 --- a/gcc/testsuite/gcc.target/powerpc/bswap32.c +++ b/gcc/testsuite/gcc.target/powerpc/bswap32.c @@ -3,6 +3,5 @@ /* { dg-final { scan-assembler "lwbrx" } } */ /* { dg-final { scan-assembler "stwbrx" } } */ -unsigned int ui; unsigned int load_bswap32 (unsigned int *p) { return __builtin_bswap32 (*p); } -void store_bswap32 (unsigned int a) { ui = __builtin_bswap32 (a); } +void store_bswap32 (unsigned int *p, unsigned int a) { *p = __builtin_bswap32 (a); } -- cgit v1.1 From 5a1d5d6a8edfc9cc08f4a15f70d9240470f05b0c Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Mon, 18 Mar 2019 18:46:18 +0100 Subject: rs6000: Fix altivec-7.c testcase It currently wants to see lvx insns on AIX, and no lvx insns on Linux. What is really wanted is lvx insns when no VSX, and lxv* insns if VSX. This fixes it. * gcc.target/powerpc/altivec-7.c: Look for lxv* if generating VSX instructions, and lvx if not. From-SVN: r269772 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.target/powerpc/altivec-7.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ba77fc5..18a24a7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -6,6 +6,12 @@ 2019-03-18 Segher Boessenkool + * gcc.target/powerpc/bswap16.c: Use a pointer instead of a global for + the "store" test as well. + * gcc.target/powerpc/bswap32.c: Ditto. + +2019-03-18 Segher Boessenkool + * gcc.target/powerpc/pr18096-1.c: Allow an error message that says "exceeds" instead of just one that talks about "too large". diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-7.c b/gcc/testsuite/gcc.target/powerpc/altivec-7.c index ebc4a85..42c04a1 100644 --- a/gcc/testsuite/gcc.target/powerpc/altivec-7.c +++ b/gcc/testsuite/gcc.target/powerpc/altivec-7.c @@ -85,8 +85,10 @@ int main () /* { dg-final { scan-assembler-times "vpkpx" 2 } } */ /* { dg-final { scan-assembler-times "vmulesb" 1 } } */ /* { dg-final { scan-assembler-times "vmulosb" 1 } } */ -/* { dg-final { scan-assembler-times {\mlvx\M} 0 { target { powerpc*-*-linux* } } } } */ -/* { dg-final { scan-assembler-times {\mlvx\M} 42 { target { powerpc*-*-aix* } } } } */ +/* { dg-final { scan-assembler-times {\mlvx\M} 42 { target { ! powerpc_vsx } } } } */ +/* { dg-final { scan-assembler-times {\mlxv} 0 { target { ! powerpc_vsx } } } } */ +/* { dg-final { scan-assembler-times {\mlvx\M} 0 { target powerpc_vsx } } } */ +/* { dg-final { scan-assembler-times {\mlxv} 42 { target powerpc_vsx } } } */ /* { dg-final { scan-assembler-times "lvewx" 2 } } */ /* { dg-final { scan-assembler-times "lvxl" 1 } } */ /* { dg-final { scan-assembler-times "vupklsh" 2 } } */ -- cgit v1.1 From 6e3587dbbcefd4d4bdafaea0aa1cb8eb9495bd9c Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 18 Mar 2019 15:34:47 -0400 Subject: PR c++/89640 - GNU attributes on lambda. My patch for PR 60503 to fix C++11 attribute parsing on lambdas accidentally removed support for GNU attributes. * parser.c (cp_parser_lambda_declarator_opt): Allow GNU attributes. From-SVN: r269775 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/parser.c | 15 ++++++++++----- gcc/testsuite/g++.dg/ext/attr-lambda1.C | 9 +++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/g++.dg/ext/attr-lambda1.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bc3850d..a3341bd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2019-03-18 Jason Merrill + PR c++/89640 - GNU attributes on lambda. + * parser.c (cp_parser_lambda_declarator_opt): Allow GNU attributes. + PR c++/89682 - wrong access error in default argument. * pt.c (tsubst_default_argument): Don't defer access checks. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index b8a0245..81aff35 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -10790,7 +10790,8 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) This means an empty parameter list, no attributes, and no exception specification. */ tree param_list = void_list_node; - tree attributes = NULL_TREE; + tree std_attrs = NULL_TREE; + tree gnu_attrs = NULL_TREE; tree exception_spec = NULL_TREE; tree template_param_list = NULL_TREE; tree tx_qual = NULL_TREE; @@ -10849,7 +10850,8 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) /* In the decl-specifier-seq of the lambda-declarator, each decl-specifier shall either be mutable or constexpr. */ int declares_class_or_enum; - if (cp_lexer_next_token_is_decl_specifier_keyword (parser->lexer)) + if (cp_lexer_next_token_is_decl_specifier_keyword (parser->lexer) + && !cp_next_tokens_can_be_gnu_attribute_p (parser)) cp_parser_decl_specifier_seq (parser, CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR, &lambda_specs, &declares_class_or_enum); @@ -10866,7 +10868,7 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) /* Parse optional exception specification. */ exception_spec = cp_parser_exception_specification_opt (parser); - attributes = cp_parser_std_attribute_spec_seq (parser); + std_attrs = cp_parser_std_attribute_spec_seq (parser); /* Parse optional trailing return type. */ if (cp_lexer_next_token_is (parser->lexer, CPP_DEREF)) @@ -10875,6 +10877,9 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) return_type = cp_parser_trailing_type_id (parser); } + if (cp_next_tokens_can_be_gnu_attribute_p (parser)) + gnu_attrs = cp_parser_gnu_attributes_opt (parser); + /* The function parameters must be in scope all the way until after the trailing-return-type in case of decltype. */ pop_bindings_and_leave_scope (); @@ -10922,11 +10927,11 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) exception_spec, return_type, /*requires_clause*/NULL_TREE); - declarator->std_attributes = attributes; + declarator->std_attributes = std_attrs; fco = grokmethod (&return_type_specs, declarator, - NULL_TREE); + gnu_attrs); if (fco != error_mark_node) { DECL_INITIALIZED_IN_CLASS_P (fco) = 1; diff --git a/gcc/testsuite/g++.dg/ext/attr-lambda1.C b/gcc/testsuite/g++.dg/ext/attr-lambda1.C new file mode 100644 index 0000000..01470c3 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/attr-lambda1.C @@ -0,0 +1,9 @@ +// PR c++/89640 +// { dg-options "" } +// { dg-do compile { target c++11 } } + +void test() { + []() __attribute__((noinline,cold)) { + asm volatile(""); + }(); +} -- cgit v1.1 From d849cfaeeaf15a30170b0fb10b4f62075a1ee58b Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 18 Mar 2019 15:35:12 -0400 Subject: PR c++/89761 - ICE with sizeof... in pack expansion. In this testcase we get confused when looking at the sizeof... because the argument pack for 'args' has been wrapped in an ARGUMENT_PACK_SELECT as part of expanding the fold-expression. We handle this situation a bit lower down in tsubst_pack_expansion, but that doesn't help the call to argument_pack_element_is_expansion_p, which happens earlier. * pt.c (argument_pack_element_is_expansion_p): Handle ARGUMENT_PACK_SELECT. From-SVN: r269776 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/pt.c | 3 +++ gcc/testsuite/g++.dg/cpp1z/fold10.C | 17 +++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp1z/fold10.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a3341bd..d4dc5d7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2019-03-18 Jason Merrill + PR c++/89761 - ICE with sizeof... in pack expansion. + * pt.c (argument_pack_element_is_expansion_p): Handle + ARGUMENT_PACK_SELECT. + PR c++/89640 - GNU attributes on lambda. * parser.c (cp_parser_lambda_declarator_opt): Allow GNU attributes. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 7dc6e44..0acc16d 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -11544,6 +11544,9 @@ make_fnparm_pack (tree spec_parm) static int argument_pack_element_is_expansion_p (tree arg_pack, int i) { + if (TREE_CODE (arg_pack) == ARGUMENT_PACK_SELECT) + /* We're being called before this happens in tsubst_pack_expansion. */ + arg_pack = ARGUMENT_PACK_SELECT_FROM_PACK (arg_pack); tree vec = ARGUMENT_PACK_ARGS (arg_pack); if (i >= TREE_VEC_LENGTH (vec)) return 0; diff --git a/gcc/testsuite/g++.dg/cpp1z/fold10.C b/gcc/testsuite/g++.dg/cpp1z/fold10.C new file mode 100644 index 0000000..1bd39a0 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/fold10.C @@ -0,0 +1,17 @@ +// PR c++/89761 +// { dg-do compile { target c++17 } } + +template struct seq {}; +template struct S { + template + constexpr static void call(Args&&...) {} +}; + +template +auto foo (seq, Args&& ...args) { + return (S::call(args), ...); +} + +void bar() { + foo(seq<0,1,2>{}, 1,2,3); +} -- cgit v1.1 From 7834e5a0e103c7f07c789cbe7293c6c1400a1216 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 18 Mar 2019 15:37:00 -0400 Subject: PR c++/89630 - ICE with dependent using-decl as template arg. Even though these two using-declarations have the same effect, they are not the same declaration, and we don't need to work to treat them as the same like we do for typedefs. If we did need to, we would need to handle them specially in iterative_hash_template_arg as well as here. * tree.c (cp_tree_equal): Always return false for USING_DECL. From-SVN: r269777 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/tree.c | 9 +-------- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d4dc5d7..76bc8ff 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2019-03-18 Jason Merrill + PR c++/89630 - ICE with dependent using-decl as template arg. + * tree.c (cp_tree_equal): Always return false for USING_DECL. + PR c++/89761 - ICE with sizeof... in pack expansion. * pt.c (argument_pack_element_is_expansion_p): Handle ARGUMENT_PACK_SELECT. diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index af077e7..718eed3 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -3661,6 +3661,7 @@ cp_tree_equal (tree t1, tree t2) case TEMPLATE_DECL: case IDENTIFIER_NODE: case SSA_NAME: + case USING_DECL: return false; case BASELINK: @@ -3787,14 +3788,6 @@ cp_tree_equal (tree t1, tree t2) DEFERRED_NOEXCEPT_ARGS (t2))); break; - case USING_DECL: - if (DECL_DEPENDENT_P (t1) && DECL_DEPENDENT_P (t2)) - return (cp_tree_equal (USING_DECL_SCOPE (t1), - USING_DECL_SCOPE (t2)) - && cp_tree_equal (DECL_NAME (t1), - DECL_NAME (t2))); - return false; - case LAMBDA_EXPR: /* Two lambda-expressions are never considered equivalent. */ return false; -- cgit v1.1 From 891cd9e3b9a89b0461fb838d38c51b6fab596337 Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Mon, 18 Mar 2019 19:45:20 +0000 Subject: RISC-V: Fix testsuite regression caused by quotes around options. 2019-03-18 Kito Cheng * gcc.target/riscv/arch-1.c: Add quotes around march in dg-error. From-SVN: r269779 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.target/riscv/arch-1.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 18a24a7..de31e36 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-03-18 Kito Cheng + + * gcc.target/riscv/arch-1.c: Add quotes around march in dg-error. + 2019-03-18 Segher Boessenkool * gcc.target/powerpc/bswap16.c: Use a pointer instead of a global for diff --git a/gcc/testsuite/gcc.target/riscv/arch-1.c b/gcc/testsuite/gcc.target/riscv/arch-1.c index 83d5c8a..f12879c 100644 --- a/gcc/testsuite/gcc.target/riscv/arch-1.c +++ b/gcc/testsuite/gcc.target/riscv/arch-1.c @@ -3,4 +3,4 @@ int foo() { } -/* { dg-error ".-march=rv32I: first ISA subset must be `e', `i' or `g'" "" { target *-*-* } 0 } */ +/* { dg-error ".'-march=rv32I': first ISA subset must be `e', `i' or `g'" "" { target *-*-* } 0 } */ -- cgit v1.1 From a8b58d84bf4fd9c925a835ba39c1c552383bc61b Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 18 Mar 2019 20:27:59 +0000 Subject: libgo: update to Go 1.12.1 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167749 From-SVN: r269780 --- gcc/go/gofrontend/MERGE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 13c12e7..a09733f 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -cc70be24502faeffefb66fd0abeb7f20a6c7792a +87945b620b2100d33e27f33e6276a4e4e5890659 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. -- cgit v1.1