@@ -1,6 +1,7 @@
/* PR middle-end/100425 - missing -Walloca-larger-than with -O0
{ dg-do compile }
- { dg-options "-O0 -Wall -Walloca-larger-than=128" } */
+ { dg-options "-O0 -Wall -Walloca-larger-than=128" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
@@ -1,7 +1,8 @@
/* PR tree-optimization/99121 - ICE in -Warray-bounds on a multidimensional
VLA
{ dg-do compile }
- { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
+ { dg-options "-O2 -Wall -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
#define NOIPA __attribute__ ((noipa))
@@ -2,7 +2,8 @@
variable within the same function
Exercise basic cases of -Wdangling-pointer with optimization.
{ dg-do compile }
- { dg-options "-O2 -Wall -Wno-uninitialized -Wno-return-local-addr -ftrack-macro-expansion=0" } */
+ { dg-options "-O2 -Wall -Wno-uninitialized -Wno-return-local-addr -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
typedef __INTPTR_TYPE__ intptr_t;
typedef __SIZE_TYPE__ size_t;
@@ -2,7 +2,8 @@
variable within the same function
Exercise -Wdangling-pointer for VLAs.
{ dg-do compile }
- { dg-options "-O0 -Wall -ftrack-macro-expansion=0" } */
+ { dg-options "-O0 -Wall -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
void sink (void*, ...);
@@ -3,7 +3,8 @@
Exercise -Wdangling-pointer for escaping stores of addreses of auto
variables.
{ dg-do compile }
- { dg-options "-O0 -Wall -ftrack-macro-expansion=0" } */
+ { dg-options "-O0 -Wall -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
void* alloca (__SIZE_TYPE__);
@@ -2,7 +2,8 @@
variable within the same function
Exercise basic cases of -Wdangling-pointer without optimization.
{ dg-do compile }
- { dg-options "-O0 -Wall -Wno-uninitialized -ftrack-macro-expansion=0" } */
+ { dg-options "-O0 -Wall -Wno-uninitialized -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
typedef __INTPTR_TYPE__ intptr_t;
typedef __SIZE_TYPE__ size_t;
@@ -1,6 +1,7 @@
/* Verify zero initialization for VLA automatic variables. */
/* { dg-do compile } */
/* { dg-options "-ftrivial-auto-var-init=zero -fdump-tree-gimple" } */
+/* { dg-require-effective-target alloca } */
extern void bar (int);
@@ -1,6 +1,7 @@
/* Verify zero initialization for VLA automatic variables. */
/* { dg-do compile } */
/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-tree-gimple" } */
+/* { dg-require-effective-target alloca } */
extern void bar (int);
@@ -1,6 +1,7 @@
/* Verify the auto initialization of nested VLA. */
/* { dg-do compile } */
/* { dg-options "-ftrivial-auto-var-init=zero -fdump-tree-gimple" } */
+/* { dg-require-effective-target alloca } */
void g(void *);
@@ -1,6 +1,7 @@
/* Verify the auto initialization of nested VLA. */
/* { dg-do compile } */
/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-tree-gimple" } */
+/* { dg-require-effective-target alloca } */
void g(void *);
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target alloca } */
+
/* PR libstdc++/88101 */
struct S { char a; short b; char c; };
@@ -1,4 +1,5 @@
/* { dg-options "-ftree-slp-vectorize -ffp-contract=on -ffloat-store" } */
+/* { dg-require-effective-target alloca } */
_Complex foo_x_0;
int foo_n11, foo_i, foo_l;
@@ -1,6 +1,7 @@
/* PR middle-end/100425 - missing -Walloca-larger-than with -O0
{ dg-do compile }
- { dg-options "-O0 -Wall -Walloca-larger-than=128" } */
+ { dg-options "-O0 -Wall -Walloca-larger-than=128" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
@@ -1,6 +1,7 @@
/* Exercise basic C-only cases of -Wdangling-pointer.
{ dg-do compile }
- { dg-options "-O0 -Wall" } */
+ { dg-options "-O0 -Wall" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
@@ -2,7 +2,8 @@
Verify that attempting to reallocate unallocated objects referenced
either directly or through pointers is diagnosed.
{ dg-do compile }
- { dg-options "-O2 -Wall -Wfree-nonheap-object" } */
+ { dg-options "-O2 -Wall -Wfree-nonheap-object" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
@@ -3,7 +3,8 @@
or through pointers is diagnosed. In most cases this doesn't require
optimization.
{ dg-do compile }
- { dg-options "-Wall -Wfree-nonheap-object" } */
+ { dg-options "-Wall -Wfree-nonheap-object" }
+ { dg-require-effective-target alloca } */
typedef __INTPTR_TYPE__ intptr_t;
typedef __SIZE_TYPE__ size_t;
@@ -1,7 +1,8 @@
/* PR middle-end/92942 - missing -Wstringop-overflow for allocations with
a negative lower bound size
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
#define SIZE_MAX __SIZE_MAX__
#define UINT8_MAX __UINT8_MAX__
@@ -1,7 +1,8 @@
/* Verify that an anti-range ~[A, B] with small positive A and B
is handled correctly and doesn't trigger warnings.
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
typedef __typeof__ (sizeof 0) size_t;
@@ -1,7 +1,8 @@
/* PR middle-end/100571 - bogus -Wstringop-overflow with VLA of elements
larger than byte
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
__attribute__ ((access (read_only, 1, 2))) void fro (int *, int);
__attribute__ ((access (write_only, 1, 2))) void fwo (int *, int);
@@ -2,7 +2,8 @@
a larger scalar into a smaller array
Verify warnings for overflow by stores of results of built-in functions.
{ dg-do compile }
- { dg-options "-O2" } */
+ { dg-options "-O2" }
+ { dg-require-effective-target alloca } */
typedef __INT16_TYPE__ int16_t;
typedef __SIZE_TYPE__ size_t;
@@ -1,6 +1,7 @@
/* PR middle-end/100510 - bogus -Wvla-large-than with -Walloca
{ dg-do compile }
- { dg-options "-O0 -Walloca -Wvla-larger-than=1000" } */
+ { dg-options "-O0 -Walloca -Wvla-larger-than=1000" }
+ { dg-require-effective-target alloca } */
void f (void*);
@@ -1,5 +1,6 @@
// TODO: remove need for this option
/* { dg-additional-options "-fanalyzer-checker=taint" } */
+/* { dg-require-effective-target alloca } */
#include "analyzer-decls.h"
#include <stdio.h>
@@ -1,5 +1,6 @@
/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
/* { dg-additional-options "-fsanitize=bounds" } */
+/* { dg-require-effective-target alloca } */
#include <stdlib.h>
#include "../analyzer-decls.h"
@@ -1,6 +1,7 @@
/* PR target/99085 */
/* { dg-do compile } */
/* { dg-options "-O2 -fgraphite-identity -fsel-sched-pipelining -fselective-scheduling2" } */
+/* { dg-require-effective-target alloca } */
void
foo (int m, int n, int o, int i)
@@ -1,6 +1,7 @@
/* PR rtl-optimization/100225 */
/* { dg-do compile } */
/* { dg-options "-O1 -fmodulo-sched" } */
+/* { dg-require-effective-target alloca } */
void
vorbis_synthesis_lapout (void);
@@ -1,6 +1,7 @@
/* PR tree-optimization/98721 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
int
foo (int n)
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -g -w" } */
+/* { dg-require-effective-target alloca } */
static int foo ();
@@ -2,6 +2,7 @@
/* Testcase by George Thopas <george.thopas@gmail.com> */
/* { dg-do compile } */
+/* { dg-require-effective-target alloca } */
#include <stddef.h>
#include <stdlib.h>
@@ -1,6 +1,7 @@
/* PR middle-end/97373 - missing warning on sprintf into allocated destination
{ dg-do compile }
- { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
+ { dg-options "-O2 -Wall -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
#include "../range.h"
@@ -6,7 +6,8 @@
be adjusted. Ditto if -Wuninitialized output changes for some
other reason.
{ dg-do compile { target { { lp64 || ilp32 } || llp64 } } }
- { dg-options "-O2 -Wall -ftrack-macro-expansion=0 -fno-ipa-modref" } */
+ { dg-options "-O2 -Wall -ftrack-macro-expansion=0 -fno-ipa-modref" }
+ { dg-require-effective-target alloca } */
#define CONCAT(x, y) x ## y
#define CAT(x, y) CONCAT(x, y)
@@ -1,7 +1,8 @@
/* PR c/98592 - ICE in gimple_canonical_types_compatible_p while formatting
a MEM_REF
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
void f (int);
@@ -1,7 +1,8 @@
/* Verify that calls to non-modifying built-ins aren't considered
potentially modifying.
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
@@ -1,6 +1,7 @@
/* PR middle-end/100250 - ICE related to -Wmaybe-uninitialized
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
extern void f (int D, const int[D], const int[D]);
@@ -1,7 +1,8 @@
/* PR middle-end/101300 - -fsanitize=undefined suppresses -Wuninitialized
for a VLA read at -O0
{ dg-do compile }
- { dg-options "-O0 -Wall -fsanitize=undefined" } */
+ { dg-options "-O0 -Wall -fsanitize=undefined" }
+ { dg-require-effective-target alloca } */
int warn_vla_rd0 (int n)
{
@@ -1,6 +1,7 @@
/* PR middle-end/101494 - bogus -Wmaybe-uninitialized on memrchr of size 0
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
@@ -1,6 +1,7 @@
/* PR middle-end/98578 - ICE warning on uninitialized VLA access
{ dg-do compile }
- { dg-options "-O2 -Wall -fno-ipa-modref" } */
+ { dg-options "-O2 -Wall -fno-ipa-modref" }
+ { dg-require-effective-target alloca } */
void* malloc (__SIZE_TYPE__);
@@ -1,7 +1,8 @@
/* PR middle-end/98583 - missing -Wuninitialized reading from a second VLA
in its own block
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
void f (int*);
void g (int);
@@ -1,6 +1,7 @@
/* PR29970*/
/* { dg-do run } */
/* { dg-options "-Wall -O0" } */
+/* { dg-require-effective-target alloca } */
int foo(void)
{
@@ -1,6 +1,7 @@
/* PR101838 */
/* { dg-do run } */
/* { dg-options "-Wpedantic -O0" } */
+/* { dg-require-effective-target alloca } */
int bar0(
@@ -1,6 +1,7 @@
/* PR29970, PR91038 */
/* { dg-do run } */
/* { dg-options "-O0 -Wunused-variable" } */
+/* { dg-require-effective-target alloca } */
int foo3b(void) // should not return 0
{
@@ -1,6 +1,7 @@
/* PR29970 */
/* { dg-do run } */
/* { dg-options "-Wunused-variable" } */
+/* { dg-require-effective-target alloca } */