https://gcc.gnu.org/g:bed30881182b1497c5d8468441a3ea6e1f80d0f6
commit r17-4451-gbed30881182b1497c5d8468441a3ea6e1f80d0f6 Author: Michiel Derhaeg <[email protected]> Date: Fri Sep 18 15:40:39 2026 -0600 [PATCH] testsuite: Fix gcc.dg/tree-ssa/predcom-10.c test 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. Signed-off-by: Michiel Derhaeg <[email protected]> Diff: --- 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); +}
