https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96566

--- Comment #14 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #12)
> (In reply to Tom de Vries from comment #6)
> > (In reply to Jakub Jelinek from comment #3)
> > > Either the test can be skipped on nvptx or any targets that don't emit
> > > something like a .zero similar directive, 
> 
> How about this:
> ...
> diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-21.c
> b/gcc/testsuite/gcc.dg/builtin-object-size-21.c
> index 1c42374ba89..7e0f85ffdf3 100644
> --- a/gcc/testsuite/gcc.dg/builtin-object-size-21.c
> +++ b/gcc/testsuite/gcc.dg/builtin-object-size-21.c
> @@ -1,7 +1,8 @@
>  /* PR middle-end/92815 - spurious -Wstringop-overflow writing into
>     a flexible array of an extern struct
>     { dg-do compile }
> -   { dg-options "-Wall -fdump-tree-optimized" } */
> +   { dg-options "-Wall -fdump-tree-optimized" }
> +   { dg-require-effective-target large_initializer } */
>  
>  #define PTRDIFF_MAX __PTRDIFF_MAX__
>  
> diff --git a/gcc/testsuite/gcc.dg/strlenopt-55.c
> b/gcc/testsuite/gcc.dg/strlenopt-55.c
> index ea6fb22a2ed..ca89ecd3c53 100644
> --- a/gcc/testsuite/gcc.dg/strlenopt-55.c
> +++ b/gcc/testsuite/gcc.dg/strlenopt-55.c
> @@ -3,7 +3,8 @@
>  
>     Verify that strlen() of braced initialized array is folded
>     { dg-do compile }
> -   { dg-options "-O1 -Wall -fdump-tree-gimple -fdump-tree-optimized" } */
> +   { dg-options "-O1 -Wall -fdump-tree-gimple -fdump-tree-optimized" }
> +   { dg-require-effective-target large_initializer } */
>  
>  #include "strlenopt.h"
>  
> diff --git a/gcc/testsuite/lib/target-supports.exp
> b/gcc/testsuite/lib/target-supports.exp
> index e79015b4d54..4e0d45aaae5 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -10424,3 +10424,14 @@ proc check_effective_target_msp430_large {} {
>         #endif
>      } ""]
>  }
> +
> +# Return 1 if the target has an efficient means to encode large initializers
> +# in the assembly.
> +
> +proc check_effective_target_large_initializer { } {
> +    if { [istarget nvptx*-*-*] } {
> +       return 0
> +    }
> +
> +    return 1
> +}
> ...

submitted at https://gcc.gnu.org/pipermail/gcc-patches/2020-August/551837.html
.

Reply via email to