On Fri, Sep 5, 2025 at 6:53 AM Georg-Johann Lay <[email protected]> wrote:
>
> Applied as obvious.

Thanks for doing this. Though in this case the values assigned to ai
does not  matter that much, and could have just changed to 1 rather
than that "random" larger number.
Most of the time I try to do the right thing for non int32bit targets
but it looks like this one slipped through as I just committed the
testcase as it was from the bug report instead of cleaning it up more.

Thanks,
Andrew

>
> Johann
>
> --
>
> testsuite: Fix gcc.dg/torture/pr121695-1.c
>
> This test case fails on int < 32-bit platforms obviously.
> This patch undoes the macro expansion from stdint.h.
>
> gcc/testsuite/
>         PR testsuite/121695
>         PR testsuite/52641
>         gcc.dg/torture/pr121695-1.c: int -> int32_t etc.
>
> diff --git a/gcc/testsuite/gcc.dg/torture/pr121695-1.c
> b/gcc/testsuite/gcc.dg/torture/pr121695-1.c
> index 877c9c90b11..c53b8f40a06 100644
> --- a/gcc/testsuite/gcc.dg/torture/pr121695-1.c
> +++ b/gcc/testsuite/gcc.dg/torture/pr121695-1.c
> @@ -1,17 +1,17 @@
>   /* { dg-do compile } */
>   /* PR tree-optimization/121695 */
>
> -int ac;
> +__INT32_TYPE__ ac;
>   char p;
> -int *r;
> -static unsigned t = 7;
> -int q() {
> -  int v;
> +__INT32_TYPE__ *r;
> +static __UINT32_TYPE__ t = 7;
> +__INT32_TYPE__ q() {
> +  __INT32_TYPE__ v;
>   af: {
> -  int ag[3];
> -  int *ah = &ag[1];
> +  __INT32_TYPE__ ag[3];
> +  __INT32_TYPE__ *ah = &ag[1];
>     for (; ac;) {
> -    int ai = 3971866093;
> +    __INT32_TYPE__ ai = 3971866093;
>       if (0 >= *ah && (*r = 1))
>         *ah &= ai;
>       else {
>

Reply via email to