C99 testsuite readiness: -fpermissive tests

These tests use obsolete language constructs, but they are not
clearly targeting C89, either.  So use -fpermissive to keep
future errors as warnings.

The reasons why obsolete constructs are used used vary from
test to test.  Some tests deliberately exercise later stages
of the compiler that only occur with those constructs.  Some
tests have precise expectations about warnings that will become
errors with a future change, but do not specifically test a
particular warning/error (if that is the case, the later changes
tend to duplicate them into warning/error variants).  In a few
cases, use of obsolete constructs is clearly due to test case
reduction, but it was not possible to un-reduce the test due
to its size.

gcc/testsuite/

	* c-c++-common/Wduplicated-branches-11.c: Compile with
	-fpermissive.
	* c-c++-common/Wduplicated-branches-12.c: Likewise.
	* c-c++-common/builtins.c: Likewise.
	* c-c++-common/pointer-to-fn1.c: Likewise.
	* gcc.c-torture/compile/20010320-1.c: Likewise.
	* gcc.c-torture/compile/20050105-1.c: Likewise.
	* gcc.c-torture/compile/20080704-1.c: Likewise.
	* gcc.c-torture/compile/20080910-1.c: Likewise.
	* gcc.c-torture/compile/20090917-1.c: Likewise.
	* gcc.c-torture/compile/20100915-1.c: Likewise.
	* gcc.c-torture/compile/20101216-1.c: Likewise.
	* gcc.c-torture/compile/20121027-1.c: Likewise.
	* gcc.c-torture/compile/20180605-1.c: Likewise.
	* gcc.c-torture/compile/950816-2.c: Likewise.
	* gcc.c-torture/compile/dse.c: Likewise.
	* gcc.c-torture/compile/pr100576.c: Likewise.
	* gcc.c-torture/compile/pr17408.c: Likewise.
	* gcc.c-torture/compile/pr19121.c: Likewise.
	* gcc.c-torture/compile/pr26213.c: Likewise.
	* gcc.c-torture/compile/pr27341-2.c: Likewise.
	* gcc.c-torture/compile/pr28776-2.c: Likewise.
	* gcc.c-torture/compile/pr33133.c: Likewise.
	* gcc.c-torture/compile/pr34091.c: Likewise.
	* gcc.c-torture/compile/pr36154.c: Likewise.
	* gcc.c-torture/compile/pr37381.c: Likewise.
	* gcc.c-torture/compile/pr38360.c: Likewise.
	* gcc.c-torture/compile/pr40291.c: Likewise.
	* gcc.c-torture/compile/pr41182-1.c: Likewise.
	* gcc.c-torture/compile/pr43635.c: Likewise.
	* gcc.c-torture/compile/pr44043.c: Likewise.
	* gcc.c-torture/compile/pr44063.c: Likewise.
	* gcc.c-torture/compile/pr44246.c: Likewise.
	* gcc.c-torture/compile/pr45535.c: Likewise.
	* gcc.c-torture/compile/pr46934.c: Likewise.
	* gcc.c-torture/compile/pr47428.c: Likewise.
	* gcc.c-torture/compile/pr49145.c: Likewise.
	* gcc.c-torture/compile/pr49206.c: Likewise.
	* gcc.c-torture/compile/pr51694.c: Likewise.
	* gcc.c-torture/compile/pr53886.c: Likewise.
	* gcc.c-torture/compile/pr65241.c: Likewise.
	* gcc.c-torture/compile/pr72802.c: Likewise.
	* gcc.c-torture/compile/pr81360.c: Likewise.
	* gcc.c-torture/compile/pr82052.c: Likewise.
	* gcc.c-torture/compile/pr90275-2.c: Likewise.
	* gcc.c-torture/compile/pr90275.c: Likewise.
	* gcc.c-torture/compile/pr96796.c: Likewise.
	* gcc.c-torture/compile/regs-arg-size.c: Likewise.
	* gcc.c-torture/compile/udivmod4.c: Likewise.
	* gcc.c-torture/compile/widechar-1.c: Likewise.
	* gcc.c-torture/execute/20000412-3.c: Likewise.
	* gcc.c-torture/execute/20010605-2.c: Likewise.
	* gcc.c-torture/execute/20020314-1.c: Likewise.
	* gcc.c-torture/execute/20020819-1.c: Likewise.
	* gcc.c-torture/execute/20031211-2.c: Likewise.
	* gcc.c-torture/execute/20040223-1.c: Likewise.
	* gcc.c-torture/execute/20041019-1.c: Likewise.
	* gcc.c-torture/execute/20120427-1.c: Likewise.
	* gcc.c-torture/execute/20120427-2.c: Likewise.
	* gcc.c-torture/execute/920908-2.c: Likewise.
	* gcc.c-torture/execute/921110-1.c: Likewise.
	* gcc.c-torture/execute/930111-1.c: Likewise.
	* gcc.c-torture/execute/930208-1.c: Likewise.
	* gcc.c-torture/execute/930702-1.c: Likewise.
	* gcc.c-torture/execute/930818-1.c: Likewise.
	* gcc.c-torture/execute/931017-1.c: Likewise.
	* gcc.c-torture/execute/931018-1.c: Likewise.
	* gcc.c-torture/execute/931208-1.c: Likewise.
	* gcc.c-torture/execute/941101-1.c: Likewise.
	* gcc.c-torture/execute/941110-1.c: Likewise.
	* gcc.c-torture/execute/950322-1.c: Likewise.
	* gcc.c-torture/execute/950426-1.c: Likewise.
	* gcc.c-torture/execute/950512-1.c: Likewise.
	* gcc.c-torture/execute/950621-1.c: Likewise.
	* gcc.c-torture/execute/960218-1.c: Likewise.
	* gcc.c-torture/execute/960402-1.c: Likewise.
	* gcc.c-torture/execute/cmpsf-1.c: Likewise.
	* gcc.c-torture/execute/cmpsi-1.c: Likewise.
	* gcc.c-torture/execute/cmpsi-2.c: Likewise.
	* gcc.c-torture/execute/divmod-1.c: Likewise.
	* gcc.c-torture/execute/pr22061-1.c: Likewise.
	* gcc.c-torture/execute/pr55875.c: Likewise.
	* gcc.dg/20050629-1.c: Likewise.
	* gcc.dg/20080615-1.c: Likewise.
	* gcc.dg/Walloca-14.c: Likewise.
	* gcc.dg/Wbuiltin-declaration-mismatch-3.c: Likewise.
	* gcc.dg/Wbuiltin-declaration-mismatch-9.c: Likewise.
	* gcc.dg/Wdouble-promotion.c: Likewise.
	* gcc.dg/Wrestrict-5.c: Likewise.
	* gcc.dg/Wstringop-overflow-13.c: Likewise.
	* gcc.dg/analyzer/fd-bind-pr107783.c: Likewise.
	* gcc.dg/array-5.c: Likewise.
	* gcc.dg/asan/pr56417.c: Likewise.
	* gcc.dg/attr-access-read-only.c: Likewise.
	* gcc.dg/attr-access-read-write.c: Likewise.
	* gcc.dg/attr-access-write-only.c: Likewise.
	* gcc.dg/bitint-36.c: Likewise.
	* gcc.dg/builtin-bswap-10.c: Likewise.
	* gcc.dg/cleanup-1.c: Likewise.
	* gcc.dg/cpp/pr60014-1.c: Likewise.
	* gcc.dg/cpp/pr60014-2.c: Likewise.
	* gcc.dg/cpp/pr60014-3.c: Likewise.
	* gcc.dg/ipa/ipa-bit-cp-1.c: Likewise.
	* gcc.dg/ipa/ipa-bit-cp-2.c: Likewise.
	* gcc.dg/ipa/ipa-bit-cp.c: Likewise.
	* gcc.dg/ipa/pr105639.c: Likewise.
	* gcc.dg/ipa/pr71981.c: Likewise.
	* gcc.dg/lto/20081109_0.c: Likewise.
	* gcc.dg/lto/pr54702_1.c: Likewise.
	* gcc.dg/lto/pr55525_0.c: Likewise.
	* gcc.dg/noncompile/20020213-1.c:: Likewise.
	* gcc.dg/noncompile/pr71426.c: Likewise.
	* gcc.dg/noncompile/undeclared-1.c: Likewise.
	* gcc.dg/overflow-warn-2.c: Likewise.
	* gcc.dg/pr100142.c: Likewise.
	* gcc.dg/pr100790.c: Likewise.
	* gcc.dg/pr100791.c: Likewise.
	* gcc.dg/pr103093.c: Likewise.
	* gcc.dg/pr105140.c: Likewise.
	* gcc.dg/pr105250.c: Likewise.
	* gcc.dg/pr105853.c: Likewise.
	* gcc.dg/pr105856.c: Likewise.
	* gcc.dg/pr26865.c: Likewise.
	* gcc.dg/pr40989.c: Likewise.
	* gcc.dg/pr42715.c: Likewise.
	* gcc.dg/pr44971.c: Likewise.
	* gcc.dg/pr46571.c: Likewise.
	* gcc.dg/pr54363.c: Likewise.
	* gcc.dg/pr56724-2.c: Likewise.
	* gcc.dg/pr59630.c: Likewise.
	* gcc.dg/pr67043.c: Likewise.
	* gcc.dg/pr67730-1.c: Likewise.
	* gcc.dg/pr67730-2.c: Likewise.
	* gcc.dg/pr68320.c: Likewise.
	* gcc.dg/pr69156.c: Likewise.
	* gcc.dg/pr69824.c: Likewise.
	* gcc.dg/pr70174.c: Likewise.
	* gcc.dg/pr70281.c: Likewise.
	* gcc.dg/pr77862.c: Likewise.
	* gcc.dg/pr82765.c: Likewise.
	* gcc.dg/pr83852.c: Likewise.
	* gcc.dg/pr84206.c: Likewise.
	* gcc.dg/pr85164-1.c: Likewise.
	* gcc.dg/pr85955.c: Likewise.
	* gcc.dg/pr86271.c: Likewise.
	* gcc.dg/pr86928.c: Likewise.
	* gcc.dg/pr99122-1.c: Likewise.
	* gcc.dg/pr99136.c: Likewise.
	* gcc.dg/redecl-19.c: Likewise.
	* gcc.dg/redecl-24.c: Likewise.
	* gcc.dg/torture/pr39204.c: Likewise.
	* gcc.dg/torture/pr57676.c: Likewise.
	* gcc.dg/torture/pr67222.c: Likewise.
	* gcc.dg/torture/pr77677-2.c: Likewise.
	* gcc.dg/torture/pr79125.c: Likewise.
	* gcc.dg/torture/pr94479.c: Likewise.
	* gcc.dg/tree-ssa/20070815.c:  Likewise.
	* gcc.dg/tree-ssa/builtin-sprintf-29.c: Likewise.
	* gcc.dg/tree-ssa/builtins-folding-gimple-ub.c: Likewise.
	* gcc.dg/tree-ssa/pr22051-2.c: Likewise.
	* gcc.dg/tree-ssa/ssa-dse-10.c: Likewise.
	* gcc.target/aarch64/pr60697.c: Likewise.
	* gcc.target/aarch64/pr87305.c: Likewise.
	* gcc.target/aarch64/sve/pr96357.c: Likewise.
	* gcc.target/i386/attr-nocf-check-1a.c: Likewise.
	* gcc.target/i386/attr-nocf-check-3a.c: Likewise.
	* gcc.target/i386/avx512bf16-pr108881.c: Likewise.
	* gcc.target/i386/cet-notrack-2a.c: Likewise.
	* gcc.target/i386/cet-notrack-2b.c: Likewise.
	* gcc.target/i386/cet-notrack-5b.c: Likewise.
	* gcc.target/i386/cet-notrack-6a.c: Likewise.
	* gcc.target/i386/cet-notrack-6b.c: Likewise.
	* gcc.target/i386/pr70325.c: Likewise.
	* gcc.target/i386/pr70858.c: Likewise.
	* gcc.target/i386/pr83488.c: Likewise.
	* gcc.target/i386/pr85511.c: Likewise.
	* gcc.target/i386/pr87572.c: Likewise.
	* gcc.target/i386/pr88195.c: Likewise.
This commit is contained in:
Florian Weimer 2023-11-13 08:54:10 +01:00
parent 7ba7529ee3
commit 95753bc4c4
177 changed files with 217 additions and 93 deletions

View file

@ -1,6 +1,7 @@
/* PR c/64279 */
/* { dg-do compile } */
/* { dg-options "-Wduplicated-branches" } */
/* { dg-options "-fpermissive -Wduplicated-branches" { target c } } */
int
f (int p)

View file

@ -1,6 +1,7 @@
/* PR c/64279 */
/* { dg-do compile } */
/* { dg-options "-Wduplicated-branches" } */
/* { dg-options "-fpermissive -Wduplicated-branches" { target c } } */
void
f (int i)

View file

@ -2,6 +2,7 @@
with no prototype do not cause an ICE.
{ dg-do compile }
{ dg-options "-O2 -Wall -Wextra" }
{ dg-additional-options "-fpermissive" { target c } }
{ dg-prune-output "warning" }
{ dg-require-effective-target alloca } */

View file

@ -1,7 +1,7 @@
/* PR c++/106937 */
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-fcf-protection" } */
/* { dg-additional-options "-std=c++11 -fpermissive" { target c++ } } */
/* { dg-options "-fpermissive -fcf-protection" } */
/* { dg-additional-options "-std=c++11" { target c++ } } */
/* Test printing a pointer to function with attribute. */
__attribute__((nocf_check)) typedef void (*FPA1)();

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
typedef struct sec {
const char *name;
int id;

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
void bar (struct S *);
void foo (void *x)
{

View file

@ -1,5 +1,6 @@
/* This code used to crash fold_convert due to PRE
wanting to fold_convert from a REAL_TYPE to an INTEGER_TYPE. */
/* { dg-additional-options "-fpermissive" } */
typedef unsigned int uint32_t;
union double_union
{

View file

@ -1,5 +1,6 @@
/* This used to crash IRA with -O3 -fPIC.
See PR 37333. */
/* { dg-additional-options "-fpermissive" } */
struct yy_buffer_state {
int yy_is_interactive;
};

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
typedef int *loop_p;
typedef struct VEC_loop_p_base
{

View file

@ -1,5 +1,6 @@
/* PR rtl-optimization/45593 */
/* Testcase by Arnaud Lacombe <lacombar@gmail.com> */
/* { dg-additional-options "-fpermissive" } */
typedef unsigned int __u32;
typedef __u32 __be32;

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
typedef union

View file

@ -1,4 +1,5 @@
/* { dg-require-stack-size "1024+16" } */
/* { dg-additional-options "-fpermissive" } */
extern int nc;
void f(void)

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
void f (int *p, int n)
{
int j = 0, k;

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
int func (char *);
void
f (void)

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
typedef unsigned long microblaze_reg_t;
struct pt_regs
{

View file

@ -1,4 +1,5 @@
/* { dg-require-effective-target non_strict_prototype } */
/* { dg-additional-options "-fpermissive" } */
/* PR middle-end/100576 */

View file

@ -1,4 +1,5 @@
/* PRs 17408 and 17409, with different options. */
/* { dg-additional-options "-fpermissive" } */
extern int t;
extern int t = 0;
void f(){t =0;}

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
typedef struct interpreter {
char Itokenbuf[256];
} PerlInterpreter;

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
void
xnanosleep (_Bool overflow)
{

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
void zgemm_ (const int*, const double*);
extern void matmul_c8 (_Complex double * dest)
{

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
typedef struct RangeCoder
{
unsigned char one_state[256];

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
static char newshuffle[256 + 16] = {
0x0f, 0x08, 0x05, 0x07, 0x0c, 0x02, 0x0e, 0x09, 0x00, 0x01, 0x06, 0x0d,
0x03, 0x04, 0x0b, 0x0a, 0x02, 0x0c, 0x0e, 0x06, 0x0f, 0x00, 0x01, 0x08,

View file

@ -1,4 +1,5 @@
/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
/* { dg-additional-options "-fpermissive" } */
typedef unsigned int GLenum;
typedef unsigned char GLboolean;

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
struct eth_test_pkt {
unsigned short len;
unsigned short ctr;

View file

@ -1,4 +1,5 @@
/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
/* { dg-additional-options "-fpermissive" } */
extern unsigned int __invalid_size_argument_for_IOC;
typedef unsigned int __u32;

View file

@ -1,5 +1,6 @@
/* PR middle-end/38360 */
/* { dg-require-effective-target untyped_assembly } */
/* { dg-additional-options "-fpermissive" } */
int
main ()

View file

@ -1,4 +1,5 @@
/* PR middle-end/40291 */
/* { dg-additional-options "-fpermissive" } */
int
foo (void *x, char *y, unsigned long long z)

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
typedef long unsigned int size_t;
int _lae_process_opts(char *pr, char *pe)
{

View file

@ -1,5 +1,6 @@
/* { dg-require-effective-target untyped_assembly } */
/* { dg-require-effective-target indirect_calls } */
/* { dg-additional-options "-fpermissive" } */
extern void d (void);

View file

@ -1,4 +1,5 @@
/* { dg-require-effective-target indirect_calls } */
/* { dg-additional-options "-fpermissive" } */
typedef unsigned char __u8;
typedef unsigned short __u16;

View file

@ -1,4 +1,5 @@
/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
/* { dg-additional-options "-fpermissive" } */
typedef signed char int8_t;
typedef short int16_t;

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
int main(int argc, char *argv[])
{
strcat(argv[0], "X");

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
typedef struct {
unsigned long pmd0;
unsigned long pmd1;

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
int caller (unsigned int reg_type)
{
switch (reg_type)

View file

@ -1,5 +1,6 @@
/* PR tree-optimization/47428 */
/* { dg-require-effective-target untyped_assembly } */
/* { dg-additional-options "-fpermissive" } */
struct S
{

View file

@ -1,4 +1,6 @@
/* { dg-require-effective-target untyped_assembly } */
/* { dg-additional-options "-fpermissive" } */
static int
func1 (int a, int b)
{

View file

@ -1,4 +1,6 @@
/* { dg-require-effective-target untyped_assembly } */
/* { dg-additional-options "-fpermissive" } */
struct S1
{
short f0;

View file

@ -1,5 +1,6 @@
/* { dg-require-effective-target untyped_assembly } */
/* { dg-require-effective-target indirect_calls } */
/* { dg-additional-options "-fpermissive" } */
void
foo (x, fn)

View file

@ -1,4 +1,6 @@
/* PR target/53886 */
/* { dg-additional-options "-fpermissive" } */
typedef struct asn1_string_st ASN1_BIT_STRING;
typedef struct bignum_st BIGNUM;
typedef struct ec_group_st EC_GROUP;

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
enum E { A, B, C, D };
void fn4 (void);

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
static a[];
static b, h, m, n, o, p, q, t, u, v, t5, t6, t16, t17, t18, t25;
c;

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
typedef a;
b(void *c, a d) {
if (c)

View file

@ -1,4 +1,5 @@
/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
/* { dg-additional-options "-fpermissive" } */
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
void
a() {

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
a, b, c;
long long d;

View file

@ -1,4 +1,4 @@
/* { dg-additional-options "-fcommon" } */
/* { dg-additional-options "-fpermissive -fcommon" } */
/* { dg-require-effective-target non_strict_prototype } */
struct S0 {

View file

@ -1,4 +1,5 @@
/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
/* { dg-additional-options "-fpermissive" } */
int foo;
typedef long unsigned int size_t;

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
long long
xlrandom ()
{

View file

@ -1 +1,2 @@
/* { dg-additional-options "-fpermissive" } */
char *s = L"a" "b";

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
typedef struct {
char y;
char x[32];

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
void foo (), bar (), baz ();
int main ()
{

View file

@ -1,4 +1,5 @@
/* { dg-require-effective-target alloca } */
/* { dg-additional-options "-fpermissive" } */
void f(void * a, double y)
{
}

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
foo ()
{
return 0;

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
struct a
{
unsigned int bitfield : 3;

View file

@ -1,4 +1,5 @@
/* { dg-require-effective-target alloca } */
/* { dg-additional-options "-fpermissive" } */
#include <string.h>
#include <stdio.h>

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
test_store_ccp (int i)
{
int *p, a, b, c;

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
typedef struct sreal
{
unsigned sig; /* Significant. */

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
typedef struct sreal
{
unsigned sig; /* Significant. */

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
/* The bit-field below would have a problem if __INT_MAX__ is too
small. */
#if __INT_MAX__ < 2147483647

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
extern void abort(void);
typedef void (*frob)();
frob f[] = {abort};

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
main()
{
if (wwrite((long long) 0) != 123)

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
typedef union {
long l;
struct { char b3, b2, b1, b0; } c;

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
fp (double a, int b)
{
if (a != 33 || b != 11)

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
static double one = 1.0;
f()

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
int v;
main ()

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
unsigned int a[0x1000];
extern const unsigned long v;

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
f ()
{
unsigned long x, y = 1;

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
f ()
{
int var = 7;

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
f (const int x)
{
int y = 0;

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
f (unsigned char *a)
{
int i, j;

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
struct tag {
int m1;

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
unsigned
f1 (x)
{

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
struct s
{
int a;

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
int gl;
g (x)

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
f (signed long long int x)
{
return x > 0xFFFFFFFFLL || x < -0x80000000LL;

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
#include <limits.h>
#define F 140

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
f1 (unsigned int x, unsigned int y)
{
if (x == 0)

View file

@ -1,4 +1,6 @@
/* { dg-require-effective-target int32plus } */
/* { dg-additional-options "-fpermissive" } */
#define F 140
#define T 13

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
div1 (signed char x)
{
return x / -1;

View file

@ -1,4 +1,5 @@
/* { dg-require-effective-target alloca } */
/* { dg-additional-options "-fpermissive" } */
int N = 1;
void foo() {} /* Necessary to trigger the original ICE. */
void bar (char a[2][N]) { a[1][0] = N; }

View file

@ -1,3 +1,4 @@
/* { dg-additional-options "-fpermissive" } */
int a[251];
__attribute__ ((noinline))
t(int i)

View file

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -w" } */
/* { dg-options "-O2 -w -fpermissive" } */
/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
/* This file was automatically reduced from tree-ssa-operands.c. It

View file

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-w -O2" } */
/* { dg-options "-w -fpermissive -O2" } */
static int *see_bb_splay_ar = ((void *) 0);
static void

View file

@ -4,6 +4,7 @@
/* { dg-skip-if "small address space" { "pdp11-*-*" } } */
/* { dg-options "-O2 -Walloca-larger-than=126812070" { target ptr32plus } } */
/* { dg-options "-O2 -Walloca-larger-than=12070" { target { ! ptr32plus } } } */
/* { dg-additional-options "-fpermissive" } */
void
g (int *p)

View file

@ -1,7 +1,7 @@
/* PR c/83656 - missing -Wbuiltin-declaration-mismatch on declaration
without prototype
{ dg-do compile }
{ dg-options "-Wbuiltin-declaration-mismatch" } */
{ dg-options "-fpermissive -Wbuiltin-declaration-mismatch" } */
typedef __SIZE_TYPE__ size_t;

View file

@ -1,6 +1,6 @@
/* PR c/88886 - ice in get_constant, at c-family/c-format.c:292
{ dg-do compile }
{ dg-options "-Wall" } */
{ dg-options "-fpermissive -Wall" } */
int sscanf (long, unsigned[], ...); /* { dg-warning "conflicting types for built-in function .sscanf.; expected .int\\\(const char \\\*, const char \\\*, ...\\\)." } */

View file

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-Wdouble-promotion" } */
/* { dg-options "-fpermissive -Wdouble-promotion" } */
#include <stddef.h>

View file

@ -4,7 +4,7 @@
functions declared with no prototype are checked for overlap, and that
invalid calls are ignored.
{ dg-do compile }
{ dg-options "-O2 -Wrestrict" } */
{ dg-options "-O2 -fpermissive -Wrestrict" } */
void* memcpy ();
char* strncpy ();

View file

@ -3,7 +3,7 @@
PR middle-end/89911 - ICE on a call with no arguments to strnlen
declared with no prototype
{ dg-do compile }
{ dg-options "-O2 -Wall" } */
{ dg-options "-O2 -fpermissive -Wall" } */
typedef __SIZE_TYPE__ size_t;

View file

@ -1,3 +1,5 @@
/* { dg-additional-options "-fpermissive" } */
int
foo (void)
{

View file

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "" } */
/* { dg-options "-fpermissive" } */
/* Check compatibility of array declarations. */

View file

@ -1,6 +1,6 @@
/* PR sanitizer/56417 */
/* { dg-do compile } */
/* { dg-options "-w" } */
/* { dg-options "-fpermissive -w" } */
int
foo (void)

View file

@ -2,7 +2,7 @@
for buffer and its size
Test to verify the handling of attribute access (read_only) syntax.
{ dg-do compile }
{ dg-options "-Wall -ftrack-macro-expansion=0" } */
{ dg-options "-fpermissive -Wall -ftrack-macro-expansion=0" } */
int __attribute__ ((access))
access_v (void); // { dg-error "wrong number of arguments specified for 'access' attribute" }

View file

@ -1,7 +1,7 @@
/* PR middle-end/83859 - attribute to establish relation between parameters
for buffer and its size
{ dg-do compile }
{ dg-options "-Wall -ftrack-macro-expansion=0" } */
{ dg-options "-fpermissive -Wall -ftrack-macro-expansion=0" } */
int __attribute__ ((access))
access_v (void); /* { dg-error "wrong number of arguments specified for 'access' attribute" } */

View file

@ -2,7 +2,7 @@
for buffer and its size
Test to verify the handling of attribute access (write_only) syntax.
{ dg-do compile }
{ dg-options "-Wall -ftrack-macro-expansion=0" } */
{ dg-options "-fpermissive -Wall -ftrack-macro-expansion=0" } */
int __attribute__ ((access))
access_v (void); // { dg-error "wrong number of arguments specified for 'access' attribute" }

View file

@ -1,6 +1,6 @@
/* PR c/102989 */
/* { dg-do compile { target { bitint } } } */
/* { dg-options "-std=c23 -Wint-in-bool-context -Waddress -Wpointer-to-int-cast -Wint-to-pointer-cast -Wint-conversion -Wshift-negative-value -Wshift-count-overflow -Wdiv-by-zero" } */
/* { dg-options "-std=c23 -fpermissive -Wint-in-bool-context -Waddress -Wpointer-to-int-cast -Wint-to-pointer-cast -Wint-conversion -Wshift-negative-value -Wshift-count-overflow -Wdiv-by-zero" } */
extern char *ax[];

View file

@ -1,5 +1,5 @@
/* { dg-do compile { target { ! int128 } } } */
/* { dg-options "" } */
/* { dg-options "-fpermissive" } */
/* { dg-final { scan-assembler "__builtin_" } } */
int foo (int x)

View file

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-Wall" } */
/* { dg-options "-fpermissive -Wall" } */
/* Validate expected warnings and errors. */
#define U __attribute__((unused))

View file

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-save-temps -Wint-conversion" } */
/* { dg-options "-fpermissive -save-temps -Wint-conversion" } */
#include "pr60014-1.h"
int main ()
{

View file

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-save-temps -Wint-conversion" } */
/* { dg-options "-save-temps -fpermissive -Wint-conversion" } */
#include "pr60014-2.h"
X
char *should_warn = 1; /* { dg-warning {-Wint-conversion} } */

Some files were not shown because too many files have changed in this diff Show more