I've checked in this trivial patch to fix another test failure I found
on nios2-elf, due to the BSP we use for simulator testing on this target
not having support for argc/argv. This testcase doesn't actually use
any command-line arguments and I think just does the argc test to avoid
optimizing the interesting things away, so I tweaked it to allow argc ==
0 in addition to argc == 1.
-Sandra
commit 0fca105f8ca95747fad3d3315e642ea9dc6936e0
Author: Sandra Loosemore <san...@codesourcery.com>
Date: Wed Mar 25 08:01:50 2020 -0700
Fix gcc.dg/pr92301.c on targets that don't support argc/argv.
2020-03-25 Sandra Loosemore <san...@codesourcery.com>
gcc/testsuite/
* gcc.dg/pr92301.c (main): Allow argc to be 0 to support
embedded targets.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 86d3b71..5fa61f9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-25 Sandra Loosemore <san...@codesourcery.com>
+
+ * gcc.dg/pr92301.c (main): Allow argc to be 0 to support
+ embedded targets.
+
2020-03-25 Jakub Jelinek <ja...@redhat.com>
PR debug/94296
diff --git a/gcc/testsuite/gcc.dg/pr92301.c b/gcc/testsuite/gcc.dg/pr92301.c
index 9a47e12..3ade201 100644
--- a/gcc/testsuite/gcc.dg/pr92301.c
+++ b/gcc/testsuite/gcc.dg/pr92301.c
@@ -23,7 +23,7 @@ int main(int argc, char **argv)
for (unsigned i = 0; i < N; i++)
a[i] = i;
- if (argc == 1)
+ if (argc < 2)
m = 17;
unsigned int r = df_count_refs(1);