diff options
author | Martin Liska <mliska@suse.cz> | 2021-04-20 10:01:29 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-04-20 10:01:29 +0200 |
commit | ae420abed0fe342866cf2bdfaf0ec1134493b25e (patch) | |
tree | 72be65920c6ec1070a44f14a57fa11b20189f381 /gcc | |
parent | a78721691fb18b5b490c87e3e7464711e0381ca1 (diff) | |
parent | 67378cd63d62bf0c69e966d1d202a1e586550a68 (diff) | |
download | gcc-ae420abed0fe342866cf2bdfaf0ec1134493b25e.zip gcc-ae420abed0fe342866cf2bdfaf0ec1134493b25e.tar.gz gcc-ae420abed0fe342866cf2bdfaf0ec1134493b25e.tar.bz2 |
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'gcc')
33 files changed, 344 insertions, 81 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bd1d682..015f9a3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,41 @@ +2021-04-19 Andrew MacLeod <amacleod@redhat.com> + + PR tree-optimization/100081 + * gimple-range-cache.h (ranger_cache): Inherit from gori_compute + rather than gori_compute_cache. + * gimple-range-gori.cc (is_gimple_logical_p): Move to top of file. + (range_def_chain::m_logical_depth): New member. + (range_def_chain::range_def_chain): Initialize m_logical_depth. + (range_def_chain::get_def_chain): Don't build defchains through more + than LOGICAL_LIMIT logical expressions. + * params.opt (param_ranger_logical_depth): New. + +2021-04-19 Richard Earnshaw <rearnsha@arm.com> + + PR target/100067 + * config/arm/arm.c (arm_configure_build_target): Do not strip + extended FPU/SIMD feature bits from the target ISA when -mfpu + is specified (partial revert of r11-8168). + +2021-04-19 Thomas Schwinge <thomas@codesourcery.com> + + * params.opt (-param=openacc-kernels=): Add. + * omp-oacc-kernels-decompose.cc + (pass_omp_oacc_kernels_decompose::gate): Use it. + * doc/invoke.texi (-fopenacc-kernels=@var{mode}): Move... + (--param): ... here, 'openacc-kernels'. + +2021-04-19 Martin Liska <mliska@suse.cz> + + PR c/100143 + * gengtype.c (finish_root_table): Align function arguments + in between declaration and definition. + +2021-04-19 Eric Botcazou <ebotcazou@adacore.com> + + * config/i386/winnt.c (i386_pe_seh_cold_init): Properly deal with + frames larger than the SEH maximum frame size. + 2021-04-18 Segher Boessenkool <segher@kernel.crashing.org> PR rtl-optimization/99927 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index fac6a1c..b392715 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20210419 +20210420 diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 032a0ff..fb2c4b0 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,7 @@ +2021-04-19 Thomas Schwinge <thomas@codesourcery.com> + + * c.opt (fopenacc-kernels=): Remove. + 2021-04-08 Jakub Jelinek <jakub@redhat.com> * c-warn.c (do_warn_double_promotion): Fix comment typo, diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index ed9a825..3f8b72c 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1873,19 +1873,6 @@ fopenacc-dim= C ObjC C++ ObjC++ LTO Joined Var(flag_openacc_dims) Specify default OpenACC compute dimensions. -fopenacc-kernels= -C ObjC C++ ObjC++ RejectNegative Joined Enum(openacc_kernels) Var(flag_openacc_kernels) Init(OPENACC_KERNELS_PARLOOPS) --fopenacc-kernels=[decompose|parloops] Specify mode of OpenACC 'kernels' constructs handling. - -Enum -Name(openacc_kernels) Type(enum openacc_kernels) - -EnumValue -Enum(openacc_kernels) String(decompose) Value(OPENACC_KERNELS_DECOMPOSE) - -EnumValue -Enum(openacc_kernels) String(parloops) Value(OPENACC_KERNELS_PARLOOPS) - fopenmp C ObjC C++ ObjC++ LTO Var(flag_openmp) Enable OpenMP (implies -frecursive in Fortran). diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 475fb0d..340f7c9 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3396,9 +3396,11 @@ arm_configure_build_target (struct arm_build_target *target, auto_sbitmap fpu_bits (isa_num_bits); arm_initialize_isa (fpu_bits, arm_selected_fpu->isa_bits); - /* Clear out ALL bits relating to the FPU/simd extensions, to avoid - potentially invalid combinations later on that we can't match. */ - bitmap_and_compl (target->isa, target->isa, isa_all_fpbits); + /* This should clear out ALL bits relating to the FPU/simd + extensions, to avoid potentially invalid combinations later on + that we can't match. At present we only clear out those bits + that can be set by -mfpu. This should be fixed in GCC-12. */ + bitmap_and_compl (target->isa, target->isa, isa_all_fpubits_internal); bitmap_ior (target->isa, target->isa, fpu_bits); } diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 69f1927..335018c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2021-04-19 Marek Polacek <polacek@redhat.com> + + PR c++/97536 + * decl.c (grokvardecl): Given an error when a concept is not defined + at namespace scope. + 2021-04-16 Jakub Jelinek <jakub@redhat.com> PR c++/100111 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 942eb31..b81de8e 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10365,6 +10365,12 @@ grokvardecl (tree type, "a non-template variable cannot be %<concept%>"); return NULL_TREE; } + else if (!at_namespace_scope_p ()) + { + error_at (declspecs->locations[ds_concept], + "concept must be defined at namespace scope"); + return NULL_TREE; + } else DECL_DECLARED_CONCEPT_P (decl) = true; if (!same_type_ignoring_top_level_qualifiers_p (type, boolean_type_node)) diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index 1662e06..a4456bd 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,11 @@ +2021-04-19 Iain Buclaw <ibuclaw@gdcproject.org> + + PR d/98457 + * d-diagnostic.cc (expand_d_format): Handle escaped backticks. + (escape_d_format): New funtion. + (verror): Call escape_d_format on prefixing strings. + (vdeprecation): Likewise. + 2021-04-17 Iain Buclaw <ibuclaw@gdcproject.org> PR d/99914 diff --git a/gcc/d/d-diagnostic.cc b/gcc/d/d-diagnostic.cc index 3bf5a53..7043abe 100644 --- a/gcc/d/d-diagnostic.cc +++ b/gcc/d/d-diagnostic.cc @@ -48,7 +48,7 @@ expand_d_format (const char *format) for (const char *p = format; *p;) { - while (*p != '\0' && *p != '%' && *p != '`') + while (*p != '\0' && *p != '\\' && *p != '%' && *p != '`') { obstack_1grow (&buf, *p); p++; @@ -57,6 +57,21 @@ expand_d_format (const char *format) if (*p == '\0') break; + if (*p == '\\') + { + if (p[1] == '`') + { + /* Escaped backtick, don't expand it as a quoted string. */ + obstack_1grow (&buf, '`'); + p++;; + } + else + obstack_1grow (&buf, *p); + + p++; + continue; + } + if (*p == '`') { /* Text enclosed by `...` are translated as a quoted string. */ @@ -114,6 +129,43 @@ expand_d_format (const char *format) return (char *) obstack_finish (&buf); } +/* Rewrite the format string FORMAT to deal with any characters that require + escaping before expand_d_format expands it. */ + +static char * +escape_d_format (const char *format) +{ + obstack buf; + + gcc_obstack_init (&buf); + + for (const char *p = format; *p; p++) + { + switch (*p) + { + case '%': + /* Escape `%' characters so that pp_format does not confuse them + for actual format specifiers. */ + obstack_1grow (&buf, '%'); + break; + + case '`': + /* Escape '`' characters so that expand_d_format does not confuse them + for a quoted string. */ + obstack_1grow (&buf, '\\'); + break; + + default: + break; + } + + obstack_1grow (&buf, *p); + } + + obstack_1grow (&buf, '\0'); + return (char *) obstack_finish (&buf); +} + /* Helper routine for all error routines. Reports a diagnostic specified by KIND at the explicit location LOC. The message FORMAT comes from the dmd front-end, which does not get translated by the gcc diagnostic routines. */ @@ -177,9 +229,10 @@ verror (const Loc &loc, const char *format, va_list ap, /* Build string and emit. */ if (prefix2 != NULL) - xformat = xasprintf ("%s %s %s", prefix1, prefix2, format); + xformat = xasprintf ("%s %s %s", escape_d_format (prefix1), + escape_d_format (prefix2), format); else if (prefix1 != NULL) - xformat = xasprintf ("%s %s", prefix1, format); + xformat = xasprintf ("%s %s", escape_d_format (prefix1), format); else xformat = xasprintf ("%s", format); @@ -289,9 +342,10 @@ vdeprecation (const Loc &loc, const char *format, va_list ap, /* Build string and emit. */ if (prefix2 != NULL) - xformat = xasprintf ("%s %s %s", prefix1, prefix2, format); + xformat = xasprintf ("%s %s %s", escape_d_format (prefix1), + escape_d_format (prefix2), format); else if (prefix1 != NULL) - xformat = xasprintf ("%s %s", prefix1, format); + xformat = xasprintf ("%s %s", escape_d_format (prefix1), format); else xformat = xasprintf ("%s", format); diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 23e155f..810cb86 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -202,7 +202,7 @@ in the following sections. -aux-info @var{filename} -fallow-parameterless-variadic-functions @gol -fno-asm -fno-builtin -fno-builtin-@var{function} -fgimple@gol -fhosted -ffreestanding @gol --fopenacc -fopenacc-dim=@var{geom} -fopenacc-kernels=@var{mode} @gol +-fopenacc -fopenacc-dim=@var{geom} @gol -fopenmp -fopenmp-simd @gol -fms-extensions -fplan9-extensions -fsso-struct=@var{endianness} @gol -fallow-single-precision -fcond-mismatch -flax-vector-conversions @gol @@ -2619,18 +2619,6 @@ not explicitly specify. The @var{geom} value is a triple of ':'-separated sizes, in order 'gang', 'worker' and, 'vector'. A size can be omitted, to use a target-specific default value. -@item -fopenacc-kernels=@var{mode} -@opindex fopenacc-kernels -@cindex OpenACC accelerator programming -Specify mode of OpenACC `kernels' constructs handling. -With @option{-fopenacc-kernels=decompose}, OpenACC `kernels' -constructs are decomposed into parts, a sequence of compute -constructs, each then handled individually. -This is work in progress. -With @option{-fopenacc-kernels=parloops}, OpenACC `kernels' constructs -are handled by the @samp{parloops} pass, en bloc. -This is the current default. - @item -fopenmp @opindex fopenmp @cindex OpenMP parallel @@ -14376,6 +14364,16 @@ The parameter is used only in GIMPLE FE. The maximum number of 'after supernode' exploded nodes within the analyzer per supernode, before terminating analysis. +@item openacc-kernels +Specify mode of OpenACC `kernels' constructs handling. +With @option{--param=openacc-kernels=decompose}, OpenACC `kernels' +constructs are decomposed into parts, a sequence of compute +constructs, each then handled individually. +This is work in progress. +With @option{--param=openacc-kernels=parloops}, OpenACC `kernels' +constructs are handled by the @samp{parloops} pass, en bloc. +This is the current default. + @end table The following choices of @var{name} are available on AArch64 targets: diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 86ef778..2e61504 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2021-04-19 Thomas Schwinge <thomas@codesourcery.com> + + * lang.opt (fopenacc-kernels=): Remove. + 2021-04-16 José Rui Faustino de Sousa <jrfsousa@gmail.com> PR fortran/100094 diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index 2b1977c..388ef8c 100644 --- a/gcc/fortran/lang.opt +++ b/gcc/fortran/lang.opt @@ -691,10 +691,6 @@ fopenacc-dim= Fortran LTO Joined Var(flag_openacc_dims) ; Documented in C -fopenacc-kernels= -Fortran RejectNegative Joined Enum(openacc_kernels) Var(flag_openacc_kernels) Init(OPENACC_KERNELS_PARLOOPS) -; Documented in C - fopenmp Fortran LTO ; Documented in C diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 34a0d49..cc9d855 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -1548,7 +1548,8 @@ gfc_get_symbol_decl (gfc_symbol * sym) declaration of the entity and memory allocated/deallocated. */ if ((sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS) && sym->param_list != NULL - && !(sym->attr.host_assoc || sym->attr.use_assoc || sym->attr.dummy)) + && gfc_current_ns == sym->ns + && !(sym->attr.use_assoc || sym->attr.dummy)) gfc_defer_symbol_init (sym); /* Dummy PDT 'len' parameters should be checked when they are explicit. */ diff --git a/gcc/gimple-range-cache.h b/gcc/gimple-range-cache.h index c98e987..2b36a02 100644 --- a/gcc/gimple-range-cache.h +++ b/gcc/gimple-range-cache.h @@ -87,7 +87,7 @@ private: // them available for gori-computes to query so outgoing edges can be // properly calculated. -class ranger_cache : public gori_compute_cache +class ranger_cache : public gori_compute { public: ranger_cache (class gimple_ranger &q); diff --git a/gcc/gimple-range-gori.cc b/gcc/gimple-range-gori.cc index 7f7f3dc..420282d 100644 --- a/gcc/gimple-range-gori.cc +++ b/gcc/gimple-range-gori.cc @@ -29,6 +29,32 @@ along with GCC; see the file COPYING3. If not see #include "gimple-pretty-print.h" #include "gimple-range.h" +// Return TRUE if GS is a logical && or || expression. + +static inline bool +is_gimple_logical_p (const gimple *gs) +{ + // Look for boolean and/or condition. + if (is_gimple_assign (gs)) + switch (gimple_expr_code (gs)) + { + case TRUTH_AND_EXPR: + case TRUTH_OR_EXPR: + return true; + + case BIT_AND_EXPR: + case BIT_IOR_EXPR: + // Bitwise operations on single bits are logical too. + if (types_compatible_p (TREE_TYPE (gimple_assign_rhs1 (gs)), + boolean_type_node)) + return true; + break; + + default: + break; + } + return false; +} /* RANGE_DEF_CHAIN is used to determine what SSA names in a block can have range information calculated for them, and what the @@ -76,6 +102,7 @@ public: private: vec<bitmap> m_def_chain; // SSA_NAME : def chain components. void build_def_chain (tree name, bitmap result, basic_block bb); + int m_logical_depth; }; @@ -85,6 +112,7 @@ range_def_chain::range_def_chain () { m_def_chain.create (0); m_def_chain.safe_grow_cleared (num_ssa_names); + m_logical_depth = 0; } // Destruct a range_def_chain. @@ -157,6 +185,7 @@ range_def_chain::get_def_chain (tree name) { tree ssa1, ssa2, ssa3; unsigned v = SSA_NAME_VERSION (name); + bool is_logical = false; // If it has already been processed, just return the cached value. if (has_def_chain (name)) @@ -169,6 +198,15 @@ range_def_chain::get_def_chain (tree name) gimple *stmt = SSA_NAME_DEF_STMT (name); if (gimple_range_handler (stmt)) { + is_logical = is_gimple_logical_p (stmt); + // Terminate the def chains if we see too many cascading logical stmts. + if (is_logical) + { + if (m_logical_depth == param_ranger_logical_depth) + return NULL; + m_logical_depth++; + } + ssa1 = gimple_range_ssa_p (gimple_range_operand1 (stmt)); ssa2 = gimple_range_ssa_p (gimple_range_operand2 (stmt)); ssa3 = NULL_TREE; @@ -195,6 +233,9 @@ range_def_chain::get_def_chain (tree name) if (ssa3) build_def_chain (ssa3, m_def_chain[v], bb); + if (is_logical) + m_logical_depth--; + // If we run into pathological cases where the defintion chains are // huge (ie huge basic block fully unrolled) we might be able to limit // this by deciding here that if some criteria is satisfied, we change the @@ -562,32 +603,6 @@ gori_compute::compute_operand_range_switch (irange &r, gswitch *s, return false; } -// Return TRUE if GS is a logical && or || expression. - -static inline bool -is_gimple_logical_p (const gimple *gs) -{ - // Look for boolean and/or condition. - if (gimple_code (gs) == GIMPLE_ASSIGN) - switch (gimple_expr_code (gs)) - { - case TRUTH_AND_EXPR: - case TRUTH_OR_EXPR: - return true; - - case BIT_AND_EXPR: - case BIT_IOR_EXPR: - // Bitwise operations on single bits are logical too. - if (types_compatible_p (TREE_TYPE (gimple_assign_rhs1 (gs)), - boolean_type_node)) - return true; - break; - - default: - break; - } - return false; -} // Return an evaluation for NAME as it would appear in STMT when the // statement's lhs evaluates to LHS. If successful, return TRUE and diff --git a/gcc/omp-oacc-kernels-decompose.cc b/gcc/omp-oacc-kernels-decompose.cc index c624e26..4ba5758 100644 --- a/gcc/omp-oacc-kernels-decompose.cc +++ b/gcc/omp-oacc-kernels-decompose.cc @@ -1527,7 +1527,7 @@ public: virtual bool gate (function *) { return (flag_openacc - && flag_openacc_kernels == OPENACC_KERNELS_DECOMPOSE); + && param_openacc_kernels == OPENACC_KERNELS_DECOMPOSE); } virtual unsigned int execute (function *) { diff --git a/gcc/params.opt b/gcc/params.opt index 0dd9ac4..7c7aa78 100644 --- a/gcc/params.opt +++ b/gcc/params.opt @@ -157,6 +157,11 @@ Enum(evrp_mode) String(trace) Value(EVRP_MODE_TRACE) EnumValue Enum(evrp_mode) String(debug) Value(EVRP_MODE_DEBUG) +-param=ranger-logical-depth= +Common Joined UInteger Var(param_ranger_logical_depth) Init(6) IntegerRange(1, 999) Param Optimization +Maximum depth of logical expression evaluation ranger will look through when +evaluting outgoing edge ranges. + -param=fsm-maximum-phi-arguments= Common Joined UInteger Var(param_fsm_maximum_phi_arguments) Init(100) IntegerRange(1, 999999) Param Optimization Maximum number of arguments a PHI may have before the FSM threader will not try to thread through its block. @@ -777,6 +782,19 @@ The minimum probability of reaching a source block for interblock speculative sc Common Joined UInteger Var(param_min_vect_loop_bound) Param Optimization If -ftree-vectorize is used, the minimal loop bound of a loop to be considered for vectorization. +-param=openacc-kernels= +Common Joined Enum(openacc_kernels) Var(param_openacc_kernels) Init(OPENACC_KERNELS_PARLOOPS) Param +--param=openacc-kernels=[decompose|parloops] Specify mode of OpenACC 'kernels' constructs handling. + +Enum +Name(openacc_kernels) Type(enum openacc_kernels) + +EnumValue +Enum(openacc_kernels) String(decompose) Value(OPENACC_KERNELS_DECOMPOSE) + +EnumValue +Enum(openacc_kernels) String(parloops) Value(OPENACC_KERNELS_PARLOOPS) + -param=parloops-chunk-size= Common Joined UInteger Var(param_parloops_chunk_size) Param Optimization Chunk size of omp schedule for loops parallelized by parloops. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e71d5b7..29c90df 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,41 @@ +2021-04-19 Marek Polacek <polacek@redhat.com> + + PR c++/97536 + * g++.dg/concepts/diagnostic16.C: New test. + +2021-04-19 Iain Buclaw <ibuclaw@gdcproject.org> + + PR d/98457 + * gdc.dg/pr98457.d: New test. + +2021-04-19 Christophe Lyon <christophe.lyon@linaro.org> + + PR target/100075 + * gcc.target/aarch64/pr100075.c: Add aarch64_little_endian + effective target. + +2021-04-19 Richard Biener <rguenther@suse.de> + + PR preprocessor/100142 + * gcc.dg/pr100142.c: New testcase. + * g++.dg/diagnostic/pr72803.C: Revert last change. + +2021-04-19 Thomas Schwinge <thomas@codesourcery.com> + + * c-c++-common/goacc/if-clause-2.c: '-fopenacc-kernels=[...]' -> + '--param=openacc-kernels=[...]'. + * c-c++-common/goacc/kernels-decompose-1.c: Likewise. + * c-c++-common/goacc/kernels-decompose-2.c: Likewise. + * c-c++-common/goacc/kernels-decompose-ice-1.c: Likewise. + * c-c++-common/goacc/kernels-decompose-ice-2.c: Likewise. + * gfortran.dg/goacc/kernels-decompose-1.f95: Likewise. + * gfortran.dg/goacc/kernels-decompose-2.f95: Likewise. + * gfortran.dg/goacc/kernels-tree.f95: Likewise. + +2021-04-19 Eric Botcazou <ebotcazou@adacore.com> + + * gnat.dg/opt92.adb: New test. + 2021-04-17 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> * c-c++-common/zero-scratch-regs-8.c: Enable on s390*. diff --git a/gcc/testsuite/c-c++-common/goacc/if-clause-2.c b/gcc/testsuite/c-c++-common/goacc/if-clause-2.c index 7bb1153..a480725 100644 --- a/gcc/testsuite/c-c++-common/goacc/if-clause-2.c +++ b/gcc/testsuite/c-c++-common/goacc/if-clause-2.c @@ -1,5 +1,5 @@ /* { dg-additional-options "-fdump-tree-gimple" } */ -/* { dg-additional-options "-fopenacc-kernels=decompose" } +/* { dg-additional-options "--param=openacc-kernels=decompose" } { dg-additional-options "-fdump-tree-omp_oacc_kernels_decompose" } */ void diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-1.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-1.c index e906443..87219c8 100644 --- a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-1.c +++ b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-1.c @@ -2,7 +2,7 @@ /* { dg-additional-options "-fopt-info-omp-all" } */ /* { dg-additional-options "-fdump-tree-gimple" } */ -/* { dg-additional-options "-fopenacc-kernels=decompose" } +/* { dg-additional-options "--param=openacc-kernels=decompose" } { dg-additional-options "-fdump-tree-omp_oacc_kernels_decompose" } */ /* See also '../../gfortran.dg/goacc/kernels-decompose-1.f95'. */ diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-2.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-2.c index ec0f75c..3781e75 100644 --- a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-2.c +++ b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-2.c @@ -1,7 +1,7 @@ /* Test OpenACC 'kernels' construct decomposition. */ /* { dg-additional-options "-fopt-info-omp-all" } */ -/* { dg-additional-options "-fopenacc-kernels=decompose" } +/* { dg-additional-options "--param=openacc-kernels=decompose" } /* { dg-additional-options "-O2" } for 'parloops'. */ /* See also '../../gfortran.dg/goacc/kernels-decompose-2.f95'. */ diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c index 82e7bd1..d770b91d 100644 --- a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c +++ b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c @@ -1,7 +1,7 @@ /* Test OpenACC 'kernels' construct decomposition. */ /* { dg-additional-options "-fopt-info-omp-all" } */ -/* { dg-additional-options "-fopenacc-kernels=decompose" } */ +/* { dg-additional-options "--param=openacc-kernels=decompose" } */ /* { dg-ice "TODO" } { dg-prune-output "during GIMPLE pass: omplower" } */ diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c index 569f87a..ae059eb 100644 --- a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c +++ b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c @@ -1,6 +1,6 @@ /* Test OpenACC 'kernels' construct decomposition. */ -/* { dg-additional-options "-fopenacc-kernels=decompose" } */ +/* { dg-additional-options "--param=openacc-kernels=decompose" } */ /* { dg-ice "TODO" } { dg-prune-output "during GIMPLE pass: omplower" } */ diff --git a/gcc/testsuite/g++.dg/concepts/diagnostic16.C b/gcc/testsuite/g++.dg/concepts/diagnostic16.C new file mode 100644 index 0000000..fcba535 --- /dev/null +++ b/gcc/testsuite/g++.dg/concepts/diagnostic16.C @@ -0,0 +1,45 @@ +// PR c++/97536 +// { dg-do compile { target concepts } } + +template<typename> +concept C1 = true; + +concept C2 = true; // { dg-error "non-template variable cannot be .concept." } +// { dg-error "concept definition syntax is" "" { target *-*-* } .-1 } + +template<typename> +void fn1 () +{ + concept bar = true; // { dg-error "concept must be defined at namespace scope" } +// { dg-error "concept definition syntax is" "" { target *-*-* } .-1 } +} + +void fn2 () +{ + concept bar = true; // { dg-error "non-template variable cannot be .concept." } +// { dg-error "concept definition syntax is" "" { target *-*-* } .-1 } +} + +template<typename> +void fn3 () +{ + template<typename> // { dg-error "template declaration cannot appear at block scope" } + concept bar = true; +} + +void fn4 () +{ + template<typename> // { dg-error "template declaration cannot appear at block scope" } + concept bar = true; +} + +void fn5 () +{ + C1 auto x = 42; +} + +template<typename> +void fn6 () +{ + C1 auto x = 42; +} diff --git a/gcc/testsuite/g++.dg/diagnostic/pr72803.C b/gcc/testsuite/g++.dg/diagnostic/pr72803.C index ca522b7..0a9a390 100644 --- a/gcc/testsuite/g++.dg/diagnostic/pr72803.C +++ b/gcc/testsuite/g++.dg/diagnostic/pr72803.C @@ -5,6 +5,5 @@ class test { // The line directive appears to be necessary to trigger the ICE // { dg-error "style of line directive is a GCC extension" "" { target *-*-* } .-2 } -/* Verify that we get the best line and column for the diagnostic. - 512 is not representable in the line-maps created for this test. */ -// { dg-error "511: expected .;. after class definition" "" { target *-*-* } 3 } +/* Verify that we get the correct line and column for the diagnostic. */ +// { dg-error "512: expected .;. after class definition" "" { target *-*-* } 3 } diff --git a/gcc/testsuite/gcc.dg/pr100142.c b/gcc/testsuite/gcc.dg/pr100142.c new file mode 100644 index 0000000..aec146c --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr100142.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-fpreprocessed" } */ + +void +foo (void) +{ + assert (1); /* { dg-warning "implicit" } */ +} diff --git a/gcc/testsuite/gcc.target/aarch64/pr100075.c b/gcc/testsuite/gcc.target/aarch64/pr100075.c index 6bdaa2f..1ece5fd 100644 --- a/gcc/testsuite/gcc.target/aarch64/pr100075.c +++ b/gcc/testsuite/gcc.target/aarch64/pr100075.c @@ -1,5 +1,6 @@ /* PR target/100075 */ /* { dg-do compile } */ +/* { dg-require-effective-target aarch64_little_endian } */ /* { dg-options "-O2" } */ /* { dg-final { scan-assembler-not {\tsbfx\tx[0-9]+, x[0-9]+, 16, 16} } } */ /* { dg-final { scan-assembler {\tneg\tw[0-9]+, w[0-9]+, asr 16} } } */ diff --git a/gcc/testsuite/gdc.dg/pr98457.d b/gcc/testsuite/gdc.dg/pr98457.d new file mode 100644 index 0000000..bc0d8af --- /dev/null +++ b/gcc/testsuite/gdc.dg/pr98457.d @@ -0,0 +1,9 @@ +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98457 +// { dg-do compile } + +void main() +{ + writef!"%s"; // { dg-error "template instance writef!\"%s\" template .writef. is not defined" } + writef!"`%s"; // { dg-error "template instance writef!\"`%s\" template .writef. is not defined" } + writef!"%%s`"; // { dg-error "template instance writef!\"%%s`\" template .writef. is not defined" } +} diff --git a/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-1.f95 b/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-1.f95 index 7e513f8..e252350 100644 --- a/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-1.f95 +++ b/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-1.f95 @@ -2,7 +2,7 @@ ! { dg-additional-options "-fopt-info-omp-all" } ! { dg-additional-options "-fdump-tree-gimple" } -! { dg-additional-options "-fopenacc-kernels=decompose" } +! { dg-additional-options "--param=openacc-kernels=decompose" } ! { dg-additional-options "-fdump-tree-omp_oacc_kernels_decompose" } ! See also '../../c-c++-common/goacc/kernels-decompose-1.c'. diff --git a/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95 b/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95 index 22f65e5..cc12b77 100644 --- a/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95 +++ b/gcc/testsuite/gfortran.dg/goacc/kernels-decompose-2.f95 @@ -1,7 +1,7 @@ ! Test OpenACC 'kernels' construct decomposition. ! { dg-additional-options "-fopt-info-omp-all" } -! { dg-additional-options "-fopenacc-kernels=decompose" } +! { dg-additional-options "--param=openacc-kernels=decompose" } ! { dg-additional-options "-O2" } for 'parloops'. ! See also '../../c-c++-common/goacc/kernels-decompose-2.c'. diff --git a/gcc/testsuite/gfortran.dg/goacc/kernels-tree.f95 b/gcc/testsuite/gfortran.dg/goacc/kernels-tree.f95 index d01eee2..63ef7e1 100644 --- a/gcc/testsuite/gfortran.dg/goacc/kernels-tree.f95 +++ b/gcc/testsuite/gfortran.dg/goacc/kernels-tree.f95 @@ -1,6 +1,6 @@ ! { dg-do compile } ! { dg-additional-options "-fdump-tree-original" } -! { dg-additional-options "-fopenacc-kernels=decompose" } +! { dg-additional-options "--param=openacc-kernels=decompose" } ! { dg-additional-options "-fdump-tree-omp_oacc_kernels_decompose" } program test diff --git a/gcc/testsuite/gfortran.dg/pdt_26.f03 b/gcc/testsuite/gfortran.dg/pdt_26.f03 index bf12737..59ddcfb 100644 --- a/gcc/testsuite/gfortran.dg/pdt_26.f03 +++ b/gcc/testsuite/gfortran.dg/pdt_26.f03 @@ -2,7 +2,7 @@ ! { dg-options "-fdump-tree-original" } ! ! Test the fix for PR83567 in which the parameterized component 'foo' was -! being deallocated before return from 'addw', with consequent segfault in +! being deallocated before return from 'addw', with consequent segfault in ! the main program. ! ! Contributed by Berke Durak <berke.durak@gmail.com> @@ -43,4 +43,4 @@ program test_pdt if (any (c(1)%foo .ne. [13,15,17])) STOP 2 end program test_pdt ! { dg-final { scan-tree-dump-times "__builtin_free" 8 "original" } } -! { dg-final { scan-tree-dump-times "__builtin_malloc" 9 "original" } } +! { dg-final { scan-tree-dump-times "__builtin_malloc" 8 "original" } } diff --git a/gcc/testsuite/gfortran.dg/pdt_31.f03 b/gcc/testsuite/gfortran.dg/pdt_31.f03 new file mode 100644 index 0000000..708c945 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pdt_31.f03 @@ -0,0 +1,26 @@ +! { dg-do run } +! +! Test the fix for PR100110, in which 'obj' was not being initialized. +! +! Contributed by Xiao Liu <xiao.liu@compiler-dev.com> +! +program p + implicit none + type t(n) + integer, len :: n + integer :: arr(n, n) + end type + + type(t(2)) :: obj + + obj%arr = reshape ([1,2,3,4],[2,2]) + if (obj%n .ne. 2) stop 1 + if (any (shape(obj%arr) .ne. [2,2])) stop 2 + call test() +contains + subroutine test() + if (obj%n .ne. 2) stop 3 + if (any (shape(obj%arr) .ne. [2,2])) stop 4 + if (any (reshape (obj%arr, [4]) .ne. [1,2,3,4])) stop 5 + end subroutine +end program |