From: Jeff Law Date: Sun, 3 Dec 2023 05:16:33 +0000 (-0700) Subject: [committed] Fix a few arc tests X-Git-Tag: basepoints/gcc-15~4051 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=595c695216e72c8491bf20d30e5298e2064caa73;p=thirdparty%2Fgcc.git [committed] Fix a few arc tests Similar to others. Where it's easy to fix the implicit types or add prototypes I did. One was just ugly and I didn't want to think too hard, so I just added -fpermissive. Pushed to the trunk. gcc/testsuite * gcc.target/arc/lra-1.c: Fix missing prototypes and implicit types in variable definitions. * gcc.target/arc/pic-1.c: Similarly. * gcc.target/arc/pr9001191897.c: Similarly. * gcc.target/arc/pr9001195952.c: Add -fpermissive. --- diff --git a/gcc/testsuite/gcc.target/arc/lra-1.c b/gcc/testsuite/gcc.target/arc/lra-1.c index 27336d1a6afa..3c936453663f 100644 --- a/gcc/testsuite/gcc.target/arc/lra-1.c +++ b/gcc/testsuite/gcc.target/arc/lra-1.c @@ -4,12 +4,16 @@ /* ap is replaced with an address like base+offset by lra, where offset is larger than s9, resulting into an ICE. */ -typedef struct { char a[500] } b; -c; +typedef struct { char a[500]; } b; +int c; struct d { short e; - b f -} g(int h, int i, int j, int k, char l, int m, int n, char *p) { + b f; +}; + +int q (struct d); + +struct d g(int h, int i, int j, int k, char l, int m, int n, char *p) { again:; struct d o; *p = c = ({ q(o); }); diff --git a/gcc/testsuite/gcc.target/arc/pic-1.c b/gcc/testsuite/gcc.target/arc/pic-1.c index ab24763b67fd..ed1e4d3765e1 100644 --- a/gcc/testsuite/gcc.target/arc/pic-1.c +++ b/gcc/testsuite/gcc.target/arc/pic-1.c @@ -3,6 +3,9 @@ /* { dg-skip-if "PIC not available for ARC6xx" { arc6xx } } */ /* { dg-options "-mno-sdata -w -Os -fpic" } */ +void e (char); + +void a() { char *b = ""; char c; diff --git a/gcc/testsuite/gcc.target/arc/pr9001191897.c b/gcc/testsuite/gcc.target/arc/pr9001191897.c index fc3642629d33..d51b0429044c 100644 --- a/gcc/testsuite/gcc.target/arc/pr9001191897.c +++ b/gcc/testsuite/gcc.target/arc/pr9001191897.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ /* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mcpu=archs -Os -fpic -mno-sdata -mno-indexed-loads -w" } */ -a; +int a; +void c() { static char b[25]; for (; a >= 0; a--) diff --git a/gcc/testsuite/gcc.target/arc/pr9001195952.c b/gcc/testsuite/gcc.target/arc/pr9001195952.c index 252438d8d78b..f820960d5e3a 100644 --- a/gcc/testsuite/gcc.target/arc/pr9001195952.c +++ b/gcc/testsuite/gcc.target/arc/pr9001195952.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-skip-if "" { ! { clmcpu } } } */ -/* { dg-options "-mcpu=archs -Os -w -fpic" } */ +/* { dg-options "-mcpu=archs -Os -w -fpic -fpermissive" } */ /* tst_movb split pattern is wrong for anything else than NPS chip. */