testsuite/52641 - Fix more sloppy tests.

PR testsuite/52641
gcc/testsuite/
	* gcc.dg/analyzer/torture/boxed-ptr-1.c: Requires size24plus.
	* gcc.dg/analyzer/torture/pr102692.c: Use intptr_t instead of long.
	* gcc.dg/ipa/pr102714.c: Use uintptr_t instead of unsigned long.
	* gcc.dg/torture/pr115387-1.c: Same.
	* gcc.dg/torture/pr113895-1.c : Same.
	* gcc.dg/ipa/pr108007.c: Require int32plus.
	* gcc.dg/ipa/pr109318.c: Same.
	* gcc.dg/ipa/pr96040.c: Use size_t instead of unsigned long.
	* gcc.dg/torture/pr113126.c: Use vectors of same dimension.
	* gcc.dg/tree-ssa/builtin-sprintf-9.c: Requires double64.

	* gcc.dg/spellcheck-inttypes.c [avr]: Avoid include of inttypes.h.
	* gcc.dg/analyzer/torture/pr104159.c [avr]: Skip.
	* gcc.dg/torture/pr84682-2.c [avr]: Skip.
	* gcc.dg/wtr-conversion-1.c [avr]: Remove avr selector since
	long double is a 64-bit type by now.
This commit is contained in:
Georg-Johann Lay 2024-07-06 15:02:28 +02:00
parent cb9badea8b
commit bb16e3179e
14 changed files with 25 additions and 11 deletions

View file

@ -1,4 +1,5 @@
/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
/* { dg-require-effective-target size24plus } */
#include <stdlib.h>
#include "../analyzer-decls.h"

View file

@ -15,7 +15,7 @@ make_lisp_ptr (void *ptr, int type)
static _Bool
TAGGEDP (struct lisp *a, unsigned tag)
{
return ! (((unsigned) (long) a - tag) & 7);
return ! (((unsigned) (__INTPTR_TYPE__) a - tag) & 7);
}
static _Bool

View file

@ -1,4 +1,5 @@
/* { dg-additional-options "-Wno-analyzer-use-of-uninitialized-value -Wno-psabi" } */
/* { dg-skip-if "incompatible types" { "avr-*-*" } } */
typedef int __attribute__((__vector_size__(4))) T;
typedef unsigned __attribute__((__vector_size__(4))) U;

View file

@ -54,16 +54,16 @@ static inline __attribute__((__gnu_inline__)) __attribute__((__unused__)) __attr
static inline __attribute__((__gnu_inline__)) __attribute__((__unused__)) __attribute__((no_instrument_function)) struct xa_node *entry_to_node(void *ptr)
{
return (void *)((unsigned long)ptr & ~2UL);
return (void *)((__UINTPTR_TYPE__)ptr & ~(__UINTPTR_TYPE__)2);
}
static inline __attribute__((__gnu_inline__)) __attribute__((__unused__)) __attribute__((no_instrument_function)) bool radix_tree_is_internal_node(void *ptr)
{
return ((unsigned long)ptr & 3UL) ==
return ((__UINTPTR_TYPE__)ptr & 3UL) ==
2UL;
}
static inline __attribute__((__gnu_inline__)) __attribute__((__unused__)) __attribute__((no_instrument_function)) void *xa_mk_internal(unsigned long v)
static inline __attribute__((__gnu_inline__)) __attribute__((__unused__)) __attribute__((no_instrument_function)) void *xa_mk_internal(__UINTPTR_TYPE__ v)
{
return (void *)((v << 2) | 2);
}

View file

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-Os -fno-dce -fno-tree-dce -g" } */
/* { dg-require-effective-target int32plus } */
/* This tests that when IPA-SRA removes a LHS of a call statement which, in the
original source, is fed into a useless operation which however can trap when

View file

@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -fno-early-inlining" } */
/* { dg-require-effective-target int32plus } */
#pragma pack(1)
struct S {

View file

@ -3,8 +3,8 @@
int puts(const char *);
int snprintf(char *, unsigned long, const char *, ...);
unsigned long strspn(const char *, const char *);
int snprintf(char *, __SIZE_TYPE__, const char *, ...);
__SIZE_TYPE__ strspn(const char *, const char *);
struct TValue {
union {

View file

@ -3,6 +3,13 @@
#ifdef _AIX
#define _STD_TYPES_T
#endif
/* Prevent AVR-LibC from implicitly including inttypes.h. */
#ifdef __AVR__
#define __INTTYPES_H_
#include <stdint.h>
#endif
#include <stdio.h>
#include <stdint.h>
/* Missing <inttypes.h>. */

View file

@ -1,8 +1,8 @@
/* { dg-do compile } */
/* { dg-additional-options "-Wno-psabi" } */
typedef float __attribute__((__vector_size__ (8))) F;
typedef double __attribute__((__vector_size__ (16))) G;
typedef float __attribute__((__vector_size__ (2 * sizeof(float)))) F;
typedef double __attribute__((__vector_size__ (2 * sizeof(double)))) G;
F f;
G g;

View file

@ -1,4 +1,5 @@
/* { dg-do compile } */
/* { dg-require-effective-target int32plus } */
int main_i;
void transparent_crc(int);

View file

@ -3,7 +3,7 @@
#define PRINTF_CHK 0x34
typedef unsigned long uintptr_t;
typedef __UINTPTR_TYPE__ uintptr_t;
struct __printf_buffer {
char *write_ptr;

View file

@ -1,4 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "impossible register constraint" { "avr-*-*" } } */
int a;
void b() {

View file

@ -1,5 +1,6 @@
/* PR tree-optimization/86274 - SEGFAULT when logging std::to_string(NAN)
{ dg-do compile }
{ dg-require-effective-target double64 }
{ dg-skip-if "not IEEE float layout" { "pdp11-*-*" } }
{ dg-options "-O2 -Wall -fdump-tree-optimized" } */

View file

@ -28,8 +28,8 @@ testfunc1 ()
foo_f (cd); /* { dg-warning "as floating rather than complex" "prototype conversion warning" } */
foo_ld (i); /* { dg-warning "as floating rather than integer" "prototype conversion warning" } */
foo_ld (f); /* { dg-warning "as 'float' rather than 'double'" "small double" { target { "avr-*-*" } } } */
foo_ld (ld);/* { dg-warning "as 'float' rather than 'double'" "small long double" { target { "avr-*-*" } } } */
foo_ld (f);
foo_ld (ld);
foo_ld (cd);/* { dg-warning "as floating rather than complex" "prototype conversion warning" } */
foo_cd (i); /* { dg-warning "as complex rather than integer" "prototype conversion warning" } */