]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[committed] Fix a few arc tests
authorJeff Law <jlaw@ventanamicro.com>
Sun, 3 Dec 2023 05:16:33 +0000 (22:16 -0700)
committerJeff Law <jlaw@ventanamicro.com>
Sun, 3 Dec 2023 05:17:57 +0000 (22:17 -0700)
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.

gcc/testsuite/gcc.target/arc/lra-1.c
gcc/testsuite/gcc.target/arc/pic-1.c
gcc/testsuite/gcc.target/arc/pr9001191897.c
gcc/testsuite/gcc.target/arc/pr9001195952.c

index 27336d1a6afa853497ed36ace625127896ab5d7e..3c936453663f534cd368ca1a9ee27f38e39e6fdd 100644 (file)
@@ -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); });
index ab24763b67fd9443ac1cc13ac6d4ea613e75263a..ed1e4d3765e1cd6cc7b2131e3546cb1789126611 100644 (file)
@@ -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;
index fc3642629d339a1791afd61df68ed3cd8ce37f58..d51b0429044cf4ed545de13ece04c74a1b50a3f0 100644 (file)
@@ -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--)
index 252438d8d78bfc00720a155c607558e6cb270d22..f820960d5e3aeae8d9d9346cf2955afe1d5f158f 100644 (file)
@@ -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.  */