From: Tom de Vries Date: Fri, 7 Aug 2020 06:59:04 +0000 (+0200) Subject: [testsuite] Add missing require-effective-target directives in gcc.dg X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ebd203778cc56df61cc3434fa01e77b4bae26362;p=gcc.git [testsuite] Add missing require-effective-target directives in gcc.dg Add some missing require-effect-targets directives (alloca, indirect_jumps, label_values and nonlocal_goto). Tested on nvptx. gcc/testsuite/ChangeLog: * gcc.dg/Warray-bounds-46.c: Add missing require-effective-target directive. * gcc.dg/Warray-bounds-48.c: Same. * gcc.dg/Warray-bounds-50.c: Same. * gcc.dg/Wreturn-local-addr-2.c: Same. * gcc.dg/Wreturn-local-addr-3.c: Same. * gcc.dg/Wreturn-local-addr-4.c: Same. * gcc.dg/Wreturn-local-addr-6.c: Same. * gcc.dg/Wstack-usage.c: Same. * gcc.dg/Wstringop-overflow-15.c: Same. * gcc.dg/Wstringop-overflow-23.c: Same. * gcc.dg/Wstringop-overflow-25.c: Same. * gcc.dg/Wstringop-overflow-27.c: Same. * gcc.dg/Wstringop-overflow-39.c: Same. * gcc.dg/analyzer/alloca-leak.c: Same. * gcc.dg/analyzer/data-model-1.c: Same. * gcc.dg/analyzer/data-model-16.c: Same. * gcc.dg/analyzer/malloc-1.c: Same. * gcc.dg/analyzer/malloc-paths-8.c: Same. * gcc.dg/analyzer/pr93546.c: Same. * gcc.dg/analyzer/setjmp-1.c: Same. * gcc.dg/analyzer/setjmp-2.c: Same. * gcc.dg/analyzer/setjmp-3.c: Same. * gcc.dg/analyzer/setjmp-4.c: Same. * gcc.dg/analyzer/setjmp-5.c: Same. * gcc.dg/analyzer/setjmp-6.c: Same. * gcc.dg/analyzer/setjmp-7.c: Same. * gcc.dg/analyzer/setjmp-7a.c: Same. * gcc.dg/analyzer/setjmp-8.c: Same. * gcc.dg/analyzer/setjmp-9.c: Same. * gcc.dg/analyzer/setjmp-pr93378.c: Same. * gcc.dg/gimplefe-44.c: Same. * gcc.dg/pr84131.c: Same. * gcc.dg/pr93986.c: Same. * gcc.dg/pr95133.c: Same. * gcc.dg/pr95857.c: Same. * gcc.dg/strlenopt-83.c: Same. * gcc.dg/strlenopt-84.c: Same. * gcc.dg/strlenopt-91.c: Same. * gcc.dg/uninit-32.c: Same. * gcc.dg/uninit-36.c: Same. --- diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-46.c b/gcc/testsuite/gcc.dg/Warray-bounds-46.c index 3f1c6c715ea..4effe5c2051 100644 --- a/gcc/testsuite/gcc.dg/Warray-bounds-46.c +++ b/gcc/testsuite/gcc.dg/Warray-bounds-46.c @@ -3,7 +3,8 @@ Test to verify that past-the-end accesses by string functions to member arrays by-reference objects are diagnosed. { dg-do compile } - { dg-options "-O2 -Wall -Wno-unused-local-typedefs -Wno-stringop-overflow -ftrack-macro-expansion=0" } */ + { dg-options "-O2 -Wall -Wno-unused-local-typedefs -Wno-stringop-overflow -ftrack-macro-expansion=0" } + { dg-require-effective-target alloca } */ #define SA(expr) typedef int StaticAssert [2 * !!(expr) - 1] diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-48.c b/gcc/testsuite/gcc.dg/Warray-bounds-48.c index d6a327e3689..13373d1e99e 100644 --- a/gcc/testsuite/gcc.dg/Warray-bounds-48.c +++ b/gcc/testsuite/gcc.dg/Warray-bounds-48.c @@ -1,7 +1,8 @@ /* PR middle-end/91647 - missing -Warray-bounds accessing a zero-length array of a declared object { dg-do "compile" } - { dg-options "-O2 -Wall" } */ + { dg-options "-O2 -Wall" } + { dg-require-effective-target alloca } */ typedef __INT16_TYPE__ int16_t; typedef __INT32_TYPE__ int32_t; diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-50.c b/gcc/testsuite/gcc.dg/Warray-bounds-50.c index d6edfac6ad7..05c89b2d87f 100644 --- a/gcc/testsuite/gcc.dg/Warray-bounds-50.c +++ b/gcc/testsuite/gcc.dg/Warray-bounds-50.c @@ -1,6 +1,7 @@ /* PR middle-end/92349 - ICE in -Warray-bounds on a VLA member { dg-do compile } - { dg-options "-O2 -Wall" } */ + { dg-options "-O2 -Wall" } + { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/Wreturn-local-addr-2.c b/gcc/testsuite/gcc.dg/Wreturn-local-addr-2.c index 0e3435c8256..9273690fef3 100644 --- a/gcc/testsuite/gcc.dg/Wreturn-local-addr-2.c +++ b/gcc/testsuite/gcc.dg/Wreturn-local-addr-2.c @@ -1,6 +1,7 @@ /* PR c/71924 - missing -Wreturn-local-addr returning alloca result { dg-do compile } - { dg-options "-O2 -Wall" } */ + { dg-options "-O2 -Wall" } + { dg-require-effective-target alloca } */ #define ATTR(...) __attribute__ ((__VA_ARGS__)) diff --git a/gcc/testsuite/gcc.dg/Wreturn-local-addr-3.c b/gcc/testsuite/gcc.dg/Wreturn-local-addr-3.c index 6dad7af97e6..e922888a4bf 100644 --- a/gcc/testsuite/gcc.dg/Wreturn-local-addr-3.c +++ b/gcc/testsuite/gcc.dg/Wreturn-local-addr-3.c @@ -1,6 +1,7 @@ /* PR c/71924 - missing -Wreturn-local-addr returning alloca result { dg-do compile } - { dg-options "-O2 -Wall" } */ + { dg-options "-O2 -Wall" } + { dg-require-effective-target alloca } */ #define ATTR(...) __attribute__ ((__VA_ARGS__)) diff --git a/gcc/testsuite/gcc.dg/Wreturn-local-addr-4.c b/gcc/testsuite/gcc.dg/Wreturn-local-addr-4.c index 0a451efcaf0..4a3b07ba02c 100644 --- a/gcc/testsuite/gcc.dg/Wreturn-local-addr-4.c +++ b/gcc/testsuite/gcc.dg/Wreturn-local-addr-4.c @@ -1,6 +1,7 @@ /* PR c/71924 - missing -Wreturn-local-addr returning alloca result { dg-do compile } - { dg-options "-O2 -Wall" } */ + { dg-options "-O2 -Wall" } + { dg-require-effective-target alloca } */ #define ATTR(...) __attribute__ ((__VA_ARGS__)) diff --git a/gcc/testsuite/gcc.dg/Wreturn-local-addr-6.c b/gcc/testsuite/gcc.dg/Wreturn-local-addr-6.c index 70138b3eff8..844660ff015 100644 --- a/gcc/testsuite/gcc.dg/Wreturn-local-addr-6.c +++ b/gcc/testsuite/gcc.dg/Wreturn-local-addr-6.c @@ -1,6 +1,7 @@ /* PR c/71924 - missing -Wreturn-local-addr returning alloca result { dg-do compile } - { dg-options "-O2 -Wall" } */ + { dg-options "-O2 -Wall" } + { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/Wstack-usage.c b/gcc/testsuite/gcc.dg/Wstack-usage.c index 4738b69478b..11e3a27b66b 100644 --- a/gcc/testsuite/gcc.dg/Wstack-usage.c +++ b/gcc/testsuite/gcc.dg/Wstack-usage.c @@ -1,6 +1,7 @@ /* PR 90983/manual documents `-Wno-stack-usage` flag, but it is unrecognized { dg-do compile } - { dg-options "-Wall -Wstack-usage=123 -Wno-stack-usage" } */ + { dg-options "-Wall -Wstack-usage=123 -Wno-stack-usage" } + { dg-require-effective-target alloca } */ void f (void*); diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-15.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-15.c index 12f8f9d353b..1907bac2722 100644 --- a/gcc/testsuite/gcc.dg/Wstringop-overflow-15.c +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-15.c @@ -4,7 +4,8 @@ for either kind of VLAs (member and non-member). Diagnosing the accesses is the subject of pr82608. { dg-do compile } - { dg-options "-O2 -Wall -Wno-array-bounds" } */ + { dg-options "-O2 -Wall -Wno-array-bounds" } + { dg-require-effective-target alloca } */ void sink (void*); diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-23.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-23.c index 6d9fcb9d52e..69c71cc4c30 100644 --- a/gcc/testsuite/gcc.dg/Wstringop-overflow-23.c +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-23.c @@ -4,7 +4,8 @@ warnings are issued for calls to user-defined functions with attribute access and with non-constant out-of-bounds arguments. { dg-do compile } - { dg-options "-O2 -Wall" } */ + { dg-options "-O2 -Wall" } + { dg-require-effective-target alloca } */ #include "range.h" diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-25.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-25.c index 109a1dd9127..bc609587575 100644 --- a/gcc/testsuite/gcc.dg/Wstringop-overflow-25.c +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-25.c @@ -1,6 +1,7 @@ /* PR middle-end/91582 - missing heap overflow detection for strcpy { dg-do compile } - { dg-options "-O2 -Wall -Wno-array-bounds -ftrack-macro-expansion=0" } */ + { dg-options "-O2 -Wall -Wno-array-bounds -ftrack-macro-expansion=0" } + { dg-require-effective-target alloca } */ #include "range.h" diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c index 8e2cfe30725..37c1ca29713 100644 --- a/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c @@ -2,7 +2,8 @@ PR middle-end/85484 - missing -Wstringop-overflow for strcpy with a string of non-const length { dg-do compile } - { dg-options "-O2 -Wall -Wno-array-bounds" } */ + { dg-options "-O2 -Wall -Wno-array-bounds" } + { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-39.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-39.c index f83646a3721..295a38de926 100644 --- a/gcc/testsuite/gcc.dg/Wstringop-overflow-39.c +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-39.c @@ -1,7 +1,8 @@ /* PR middle-end/95667 - unintended warning for memset writing across multiple members { dg-do compile } - { dg-options "-O2 -Wall" } */ + { dg-options "-O2 -Wall" } + { dg-require-effective-target alloca } */ extern void sink (void*); diff --git a/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c b/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c index 6d9fe3431ce..93319932d44 100644 --- a/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c +++ b/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target alloca } */ + #include void *test (void) diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-1.c b/gcc/testsuite/gcc.dg/analyzer/data-model-1.c index 1db99133d50..0a906e5b62e 100644 --- a/gcc/testsuite/gcc.dg/analyzer/data-model-1.c +++ b/gcc/testsuite/gcc.dg/analyzer/data-model-1.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target alloca } */ + #include #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-16.c b/gcc/testsuite/gcc.dg/analyzer/data-model-16.c index a8acfbeeb77..616d3537054 100644 --- a/gcc/testsuite/gcc.dg/analyzer/data-model-16.c +++ b/gcc/testsuite/gcc.dg/analyzer/data-model-16.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target label_values } */ + /* Labels as values. */ #include "analyzer-decls.h" diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-1.c b/gcc/testsuite/gcc.dg/analyzer/malloc-1.c index 3024e546137..4d9afa483c9 100644 --- a/gcc/testsuite/gcc.dg/analyzer/malloc-1.c +++ b/gcc/testsuite/gcc.dg/analyzer/malloc-1.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target alloca } */ + #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-8.c b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-8.c index 10b97a05402..35c9385b206 100644 --- a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-8.c +++ b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-8.c @@ -1,4 +1,5 @@ /* { dg-additional-options "-fanalyzer-transitivity" } */ +/* { dg-require-effective-target alloca } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/pr93546.c b/gcc/testsuite/gcc.dg/analyzer/pr93546.c index 432a6433be5..66f6805b07a 100644 --- a/gcc/testsuite/gcc.dg/analyzer/pr93546.c +++ b/gcc/testsuite/gcc.dg/analyzer/pr93546.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target label_values } */ void ch (int x1) diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-1.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-1.c index c9827fbd298..72da6c4a980 100644 --- a/gcc/testsuite/gcc.dg/analyzer/setjmp-1.c +++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-1.c @@ -1 +1,2 @@ +/* { dg-require-effective-target indirect_jumps } */ #include "../pr26983.c" diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-2.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-2.c index beaf43684e0..f5d9c53e239 100644 --- a/gcc/testsuite/gcc.dg/analyzer/setjmp-2.c +++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-2.c @@ -1,5 +1,6 @@ /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */ /* { dg-enable-nn-line-numbers "" } */ +/* { dg-require-effective-target indirect_jumps } */ #include "test-setjmp.h" #include diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-3.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-3.c index 5c1d4060c3b..3e4f870e5e8 100644 --- a/gcc/testsuite/gcc.dg/analyzer/setjmp-3.c +++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-3.c @@ -1,5 +1,6 @@ /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */ /* { dg-enable-nn-line-numbers "" } */ +/* { dg-require-effective-target indirect_jumps } */ #include #include "test-setjmp.h" diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-4.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-4.c index f216a456b59..b6f7d0e777b 100644 --- a/gcc/testsuite/gcc.dg/analyzer/setjmp-4.c +++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-4.c @@ -1,5 +1,6 @@ /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */ /* { dg-enable-nn-line-numbers "" } */ +/* { dg-require-effective-target indirect_jumps } */ #include "test-setjmp.h" #include "analyzer-decls.h" diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-5.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-5.c index 3ee02980e57..bf5b9bfda81 100644 --- a/gcc/testsuite/gcc.dg/analyzer/setjmp-5.c +++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-5.c @@ -1,5 +1,6 @@ /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */ /* { dg-enable-nn-line-numbers "" } */ +/* { dg-require-effective-target indirect_jumps } */ #include "test-setjmp.h" #include diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-6.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-6.c index 0e0f12f919c..3aa6b23d6b3 100644 --- a/gcc/testsuite/gcc.dg/analyzer/setjmp-6.c +++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-6.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target indirect_jumps } */ + #include "test-setjmp.h" #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-7.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-7.c index 6cf98247bb6..6a519b7e138 100644 --- a/gcc/testsuite/gcc.dg/analyzer/setjmp-7.c +++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-7.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target indirect_jumps } */ + #include "test-setjmp.h" #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-7a.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-7a.c index 87d35bc88f3..220f95e0d05 100644 --- a/gcc/testsuite/gcc.dg/analyzer/setjmp-7a.c +++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-7a.c @@ -1,5 +1,6 @@ /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */ /* { dg-enable-nn-line-numbers "" } */ +/* { dg-require-effective-target indirect_jumps } */ #include "test-setjmp.h" #include diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-8.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-8.c index abbee2d9108..79614d123bd 100644 --- a/gcc/testsuite/gcc.dg/analyzer/setjmp-8.c +++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-8.c @@ -1,5 +1,6 @@ /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */ /* { dg-enable-nn-line-numbers "" } */ +/* { dg-require-effective-target indirect_jumps } */ #include "test-setjmp.h" #include diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-9.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-9.c index cf75d3ad896..c2b00e3b95c 100644 --- a/gcc/testsuite/gcc.dg/analyzer/setjmp-9.c +++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-9.c @@ -1,5 +1,6 @@ /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */ /* { dg-enable-nn-line-numbers "" } */ +/* { dg-require-effective-target indirect_jumps } */ #include "test-setjmp.h" #include diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-pr93378.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-pr93378.c index 73b94d4d36b..6e2468e701a 100644 --- a/gcc/testsuite/gcc.dg/analyzer/setjmp-pr93378.c +++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-pr93378.c @@ -1,4 +1,5 @@ /* { dg-additional-options "-O1 -g" } */ +/* { dg-require-effective-target indirect_jumps } */ #include diff --git a/gcc/testsuite/gcc.dg/gimplefe-44.c b/gcc/testsuite/gcc.dg/gimplefe-44.c index a9a92b1701e..4580a1d0b85 100644 --- a/gcc/testsuite/gcc.dg/gimplefe-44.c +++ b/gcc/testsuite/gcc.dg/gimplefe-44.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fexceptions -fgimple -fdump-tree-eh-eh" } */ +/* { dg-require-effective-target nonlocal_goto } */ void __GIMPLE foo() { diff --git a/gcc/testsuite/gcc.dg/pr84131.c b/gcc/testsuite/gcc.dg/pr84131.c index 0ba96516fe3..ced2e5d9329 100644 --- a/gcc/testsuite/gcc.dg/pr84131.c +++ b/gcc/testsuite/gcc.dg/pr84131.c @@ -1,7 +1,8 @@ /* PR 94131 - ICE on printf with a VLA string and -fno-tree-ccp -fno-tree-forwprop { dg-do compile } - { dg-options "-O1 -fno-tree-ccp -fno-tree-forwprop" } */ + { dg-options "-O1 -fno-tree-ccp -fno-tree-forwprop" } + { dg-require-effective-target alloca } */ void rv1 (int n) { diff --git a/gcc/testsuite/gcc.dg/pr93986.c b/gcc/testsuite/gcc.dg/pr93986.c index bdbc192a01d..0d533f4dbc2 100644 --- a/gcc/testsuite/gcc.dg/pr93986.c +++ b/gcc/testsuite/gcc.dg/pr93986.c @@ -1,6 +1,7 @@ /* PR tree-optimization/93986 - ICE in decompose, at wide-int.h:984 { dg-do compile } - { dg-options "-O1 -foptimize-strlen -ftree-slp-vectorize" } */ + { dg-options "-O1 -foptimize-strlen -ftree-slp-vectorize" } + { dg-require-effective-target alloca } */ int dd (void); diff --git a/gcc/testsuite/gcc.dg/pr95133.c b/gcc/testsuite/gcc.dg/pr95133.c index 523decaf90e..5e233595edb 100644 --- a/gcc/testsuite/gcc.dg/pr95133.c +++ b/gcc/testsuite/gcc.dg/pr95133.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O3" } */ +/* { dg-require-effective-target label_values } */ extern int a[16]; void f (int *ip, int x) diff --git a/gcc/testsuite/gcc.dg/pr95857.c b/gcc/testsuite/gcc.dg/pr95857.c index 41506ea6893..afd6f46ea38 100644 --- a/gcc/testsuite/gcc.dg/pr95857.c +++ b/gcc/testsuite/gcc.dg/pr95857.c @@ -1,6 +1,7 @@ /* PR tree-optimization/95857 */ /* { dg-do compile } */ /* { dg-options "-O2" } */ +/* { dg-require-effective-target label_values } */ struct E { int e; }; int bar (void), baz (void); diff --git a/gcc/testsuite/gcc.dg/strlenopt-83.c b/gcc/testsuite/gcc.dg/strlenopt-83.c index 5baafea5c32..baa80cf9643 100644 --- a/gcc/testsuite/gcc.dg/strlenopt-83.c +++ b/gcc/testsuite/gcc.dg/strlenopt-83.c @@ -1,7 +1,8 @@ /* PR tree-optimization/83821 - local aggregate initialization defeats strlen optimization { dg-do compile } - { dg-options "-O2 -Wall -fdump-tree-optimized" } */ + { dg-options "-O2 -Wall -fdump-tree-optimized" } + { dg-require-effective-target alloca } */ #include "strlenopt.h" char *p_p2, *p_p5, *p_p9, *p_p14; diff --git a/gcc/testsuite/gcc.dg/strlenopt-84.c b/gcc/testsuite/gcc.dg/strlenopt-84.c index d6102b6e6f5..0c9da3c1b59 100644 --- a/gcc/testsuite/gcc.dg/strlenopt-84.c +++ b/gcc/testsuite/gcc.dg/strlenopt-84.c @@ -3,7 +3,8 @@ Verify that stores that overwrite an interior nul are correctly reflected in strlen results. { dg-do run } - { dg-options "-O2 -Wall" } */ + { dg-options "-O2 -Wall" } + { dg-require-effective-target alloca } */ #define false (0 == 1) #define true (0 == 0) diff --git a/gcc/testsuite/gcc.dg/strlenopt-91.c b/gcc/testsuite/gcc.dg/strlenopt-91.c index 2381d03e44a..a30556128ed 100644 --- a/gcc/testsuite/gcc.dg/strlenopt-91.c +++ b/gcc/testsuite/gcc.dg/strlenopt-91.c @@ -1,7 +1,8 @@ /* PR tree-optimization/92412 - excessive errno aliasing assumption defeats optimization { dg-do compile } - { dg-options "-O2 -Wall -fdump-tree-optimized" } */ + { dg-options "-O2 -Wall -fdump-tree-optimized" } + { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/uninit-32.c b/gcc/testsuite/gcc.dg/uninit-32.c index cdc05128dfd..cf9efa0f064 100644 --- a/gcc/testsuite/gcc.dg/uninit-32.c +++ b/gcc/testsuite/gcc.dg/uninit-32.c @@ -1,7 +1,8 @@ /* PR middle-end/10138 - warn for uninitialized arrays passed as const* arguments { dg-do compile } - { dg-options "-O -Wall" } */ + { dg-options "-O -Wall" } + { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/uninit-36.c b/gcc/testsuite/gcc.dg/uninit-36.c index 9524e7ad1b9..f6307ce5913 100644 --- a/gcc/testsuite/gcc.dg/uninit-36.c +++ b/gcc/testsuite/gcc.dg/uninit-36.c @@ -3,7 +3,8 @@ Verify that passing pointers to uninitialized objects to const arguments to built-ins is diagnosed where expected. { dg-do compile } - { dg-options "-O -Wall" } */ + { dg-options "-O -Wall" } + { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t;