On Fri, Sep 18, 2026 at 5:48 AM Michiel Derhaeg <[email protected]> wrote:
>
> From: Michiel Derhaeg <[email protected]>
>
> Embedded platforms don't always initialize `argc` to be 1
>
> Verified the test still reproduces the issue when the fix for PR127405
> is reverted.
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.dg/tree-ssa/predcom-10.c: Pass in expected value
>         explicitly instead of deriving it from argc.

Ok.

>
> Signed-off-by: Michiel Derhaeg <[email protected]>
> ---
>  gcc/testsuite/gcc.dg/tree-ssa/predcom-10.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predcom-10.c 
> b/gcc/testsuite/gcc.dg/tree-ssa/predcom-10.c
> index b6d87a62c34f..b9bd1cca3922 100644
> --- a/gcc/testsuite/gcc.dg/tree-ssa/predcom-10.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/predcom-10.c
> @@ -20,12 +20,9 @@ test (unsigned long n, int *a, int *b)
>      a[i + 2] = b[i + 2] - a[i + 3] - a[i + 5] + (int) (i + 2);
>  }
>
> -int
> -main (int argc, char **argv)
> +int __attribute__ ((noipa))
> +check (unsigned long n)
>  {
> -  /* N is 6, but not known to the compiler.  */
> -  unsigned long n = argc + 5;
> -
>    for (int i = 0; i < 12; i++)
>      {
>        a[i] = 0;
> @@ -40,3 +37,9 @@ main (int argc, char **argv)
>
>    return 0;
>  }
> +
> +int
> +main ()
> +{
> +  return check (6);
> +}
> --
> 2.47.3
>

Reply via email to