limits-blockid.c: New.
authorGeoffrey Keating <geoffk@apple.com>
Tue, 1 May 2007 22:44:08 +0000 (22:44 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Tue, 1 May 2007 22:44:08 +0000 (22:44 +0000)
* gcc.c-torture/compile/limits-blockid.c: New.
* gcc.c-torture/compile/limits-caselabels.c: New.
* gcc.c-torture/compile/limits-declparen.c: New.
* gcc.c-torture/compile/limits-enumconst.c: New.
* gcc.c-torture/compile/limits-exprparen.c: New.
* gcc.c-torture/compile/limits-externalid.c: New.
* gcc.c-torture/compile/limits-fnargs.c: New.
* gcc.c-torture/compile/limits-fndefn.c: New.
* gcc.c-torture/compile/limits-idexternal.c: New.
* gcc.c-torture/compile/limits-idinternal.c: New.
* gcc.c-torture/compile/limits-pointer.c: New.
* gcc.c-torture/compile/limits-stringlit.c: New.
* gcc.c-torture/compile/limits-structmem.c: New.
* gcc.c-torture/compile/limits-structnest.c: New.

From-SVN: r124343

15 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/limits-blockid.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/limits-caselabels.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/limits-declparen.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/limits-enumconst.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/limits-exprparen.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/limits-externalid.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/limits-fnargs.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/limits-idexternal.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/limits-idinternal.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/limits-pointer.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/limits-stringlit.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/limits-structmem.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/limits-structnest.c [new file with mode: 0644]

index 326d172..ed9816f 100644 (file)
@@ -1,3 +1,20 @@
+2007-05-01  Geoffrey Keating  <geoffk@apple.com>
+
+       * gcc.c-torture/compile/limits-blockid.c: New.
+       * gcc.c-torture/compile/limits-caselabels.c: New.
+       * gcc.c-torture/compile/limits-declparen.c: New.
+       * gcc.c-torture/compile/limits-enumconst.c: New.
+       * gcc.c-torture/compile/limits-exprparen.c: New.
+       * gcc.c-torture/compile/limits-externalid.c: New.
+       * gcc.c-torture/compile/limits-fnargs.c: New.
+       * gcc.c-torture/compile/limits-fndefn.c: New.
+       * gcc.c-torture/compile/limits-idexternal.c: New.
+       * gcc.c-torture/compile/limits-idinternal.c: New.
+       * gcc.c-torture/compile/limits-pointer.c: New.
+       * gcc.c-torture/compile/limits-stringlit.c: New.
+       * gcc.c-torture/compile/limits-structmem.c: New.
+       * gcc.c-torture/compile/limits-structnest.c: New.
+
 2007-04-29  Geoffrey Keating  <geoffk@apple.com>
 
        * gfortran.dg/bom_UTF-8_F.F90: Rename from bom_UTF-8.F90.
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-blockid.c b/gcc/testsuite/gcc.c-torture/compile/limits-blockid.c
new file mode 100644 (file)
index 0000000..718c867
--- /dev/null
@@ -0,0 +1,18 @@
+#define LIM1(x) x##0; x##1; x##2; x##3; x##4; x##5; x##6; x##7; x##8; x##9;
+#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
+               LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
+#define LIM3(x) LIM2(x##0) LIM2(x##1) LIM2(x##2) LIM2(x##3) LIM2(x##4) \
+               LIM2(x##5) LIM2(x##6) LIM2(x##7) LIM2(x##8) LIM2(x##9)
+#define LIM4(x) LIM3(x##0) LIM3(x##1) LIM3(x##2) LIM3(x##3) LIM3(x##4) \
+               LIM3(x##5) LIM3(x##6) LIM3(x##7) LIM3(x##8) LIM3(x##9)
+#define LIM5(x) LIM4(x##0) LIM4(x##1) LIM4(x##2) LIM4(x##3) LIM4(x##4) \
+               LIM4(x##5) LIM4(x##6) LIM4(x##7) LIM4(x##8) LIM4(x##9)
+#define LIM6(x) LIM5(x##0) LIM5(x##1) LIM5(x##2) LIM5(x##3) LIM5(x##4) \
+               LIM5(x##5) LIM5(x##6) LIM5(x##7) LIM5(x##8) LIM5(x##9)
+#define LIM7(x) LIM6(x##0) LIM6(x##1) LIM6(x##2) LIM6(x##3) LIM6(x##4) \
+               LIM6(x##5) LIM6(x##6) LIM6(x##7) LIM6(x##8) LIM6(x##9)
+
+void q9_func(void)
+{
+  LIM5(char t)
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-caselabels.c b/gcc/testsuite/gcc.c-torture/compile/limits-caselabels.c
new file mode 100644 (file)
index 0000000..09b7b2e
--- /dev/null
@@ -0,0 +1,21 @@
+#define LIM1(x) x##0: x##1: x##2: x##3: x##4: x##5: x##6: x##7: x##8: x##9: 
+#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
+               LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
+#define LIM3(x) LIM2(x##0) LIM2(x##1) LIM2(x##2) LIM2(x##3) LIM2(x##4) \
+               LIM2(x##5) LIM2(x##6) LIM2(x##7) LIM2(x##8) LIM2(x##9)
+#define LIM4(x) LIM3(x##0) LIM3(x##1) LIM3(x##2) LIM3(x##3) LIM3(x##4) \
+               LIM3(x##5) LIM3(x##6) LIM3(x##7) LIM3(x##8) LIM3(x##9)
+#define LIM5(x) LIM4(x##0) LIM4(x##1) LIM4(x##2) LIM4(x##3) LIM4(x##4) \
+               LIM4(x##5) LIM4(x##6) LIM4(x##7) LIM4(x##8) LIM4(x##9)
+#define LIM6(x) LIM5(x##0) LIM5(x##1) LIM5(x##2) LIM5(x##3) LIM5(x##4) \
+               LIM5(x##5) LIM5(x##6) LIM5(x##7) LIM5(x##8) LIM5(x##9)
+#define LIM7(x) LIM6(x##0) LIM6(x##1) LIM6(x##2) LIM6(x##3) LIM6(x##4) \
+               LIM6(x##5) LIM6(x##6) LIM6(x##7) LIM6(x##8) LIM6(x##9)
+
+void q19_func (int i)
+{
+  switch (i) {
+    LIM5 (case 1)
+      break;
+  }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-declparen.c b/gcc/testsuite/gcc.c-torture/compile/limits-declparen.c
new file mode 100644 (file)
index 0000000..41bf9c5
--- /dev/null
@@ -0,0 +1,15 @@
+#define PTR1 (* (* (* (* (* (* (* (* (* (*
+#define PTR2 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1
+#define PTR3 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2
+#define PTR4 PTR3 PTR3 PTR3 PTR3 PTR3 PTR3 PTR3 PTR3 PTR3 PTR3
+#define PTR5 PTR4 PTR4 PTR4 PTR4 PTR4 PTR4 PTR4 PTR4 PTR4 PTR4
+#define PTR6 PTR5 PTR5 PTR5 PTR5 PTR5 PTR5 PTR5 PTR5 PTR5 PTR5
+
+#define RBR1 ) ) ) ) ) ) ) ) ) )
+#define RBR2 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1
+#define RBR3 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2
+#define RBR4 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3
+#define RBR5 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4
+#define RBR6 RBR5 RBR5 RBR5 RBR5 RBR5 RBR5 RBR5 RBR5 RBR5 RBR5
+
+int PTR4 q4_var RBR4 = 0;
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-enumconst.c b/gcc/testsuite/gcc.c-torture/compile/limits-enumconst.c
new file mode 100644 (file)
index 0000000..80ac342
--- /dev/null
@@ -0,0 +1,18 @@
+#define LIM1(x) x##0, x##1, x##2, x##3, x##4, x##5, x##6, x##7, x##8, x##9,
+#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
+               LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
+#define LIM3(x) LIM2(x##0) LIM2(x##1) LIM2(x##2) LIM2(x##3) LIM2(x##4) \
+               LIM2(x##5) LIM2(x##6) LIM2(x##7) LIM2(x##8) LIM2(x##9)
+#define LIM4(x) LIM3(x##0) LIM3(x##1) LIM3(x##2) LIM3(x##3) LIM3(x##4) \
+               LIM3(x##5) LIM3(x##6) LIM3(x##7) LIM3(x##8) LIM3(x##9)
+#define LIM5(x) LIM4(x##0) LIM4(x##1) LIM4(x##2) LIM4(x##3) LIM4(x##4) \
+               LIM4(x##5) LIM4(x##6) LIM4(x##7) LIM4(x##8) LIM4(x##9)
+#define LIM6(x) LIM5(x##0) LIM5(x##1) LIM5(x##2) LIM5(x##3) LIM5(x##4) \
+               LIM5(x##5) LIM5(x##6) LIM5(x##7) LIM5(x##8) LIM5(x##9)
+#define LIM7(x) LIM6(x##0) LIM6(x##1) LIM6(x##2) LIM6(x##3) LIM6(x##4) \
+               LIM6(x##5) LIM6(x##6) LIM6(x##7) LIM6(x##8) LIM6(x##9)
+
+enum q21_enum
+{
+  LIM5 (e)
+};
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-exprparen.c b/gcc/testsuite/gcc.c-torture/compile/limits-exprparen.c
new file mode 100644 (file)
index 0000000..2c6dce0
--- /dev/null
@@ -0,0 +1,15 @@
+#define LBR1 ( ( ( ( ( ( ( ( ( (
+#define LBR2 LBR1 LBR1 LBR1 LBR1 LBR1 LBR1 LBR1 LBR1 LBR1 LBR1
+#define LBR3 LBR2 LBR2 LBR2 LBR2 LBR2 LBR2 LBR2 LBR2 LBR2 LBR2
+#define LBR4 LBR3 LBR3 LBR3 LBR3 LBR3 LBR3 LBR3 LBR3 LBR3 LBR3
+#define LBR5 LBR4 LBR4 LBR4 LBR4 LBR4 LBR4 LBR4 LBR4 LBR4 LBR4
+#define LBR6 LBR5 LBR5 LBR5 LBR5 LBR5 LBR5 LBR5 LBR5 LBR5 LBR5
+
+#define RBR1 ) ) ) ) ) ) ) ) ) )
+#define RBR2 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1
+#define RBR3 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2
+#define RBR4 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3
+#define RBR5 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4
+#define RBR6 RBR5 RBR5 RBR5 RBR5 RBR5 RBR5 RBR5 RBR5 RBR5 RBR5
+
+int q5_var = LBR4 0 RBR4;
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-externalid.c b/gcc/testsuite/gcc.c-torture/compile/limits-externalid.c
new file mode 100644 (file)
index 0000000..1b316c7
--- /dev/null
@@ -0,0 +1,15 @@
+#define LIM1(x) x##0; x##1; x##2; x##3; x##4; x##5; x##6; x##7; x##8; x##9;
+#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
+               LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
+#define LIM3(x) LIM2(x##0) LIM2(x##1) LIM2(x##2) LIM2(x##3) LIM2(x##4) \
+               LIM2(x##5) LIM2(x##6) LIM2(x##7) LIM2(x##8) LIM2(x##9)
+#define LIM4(x) LIM3(x##0) LIM3(x##1) LIM3(x##2) LIM3(x##3) LIM3(x##4) \
+               LIM3(x##5) LIM3(x##6) LIM3(x##7) LIM3(x##8) LIM3(x##9)
+#define LIM5(x) LIM4(x##0) LIM4(x##1) LIM4(x##2) LIM4(x##3) LIM4(x##4) \
+               LIM4(x##5) LIM4(x##6) LIM4(x##7) LIM4(x##8) LIM4(x##9)
+#define LIM6(x) LIM5(x##0) LIM5(x##1) LIM5(x##2) LIM5(x##3) LIM5(x##4) \
+               LIM5(x##5) LIM5(x##6) LIM5(x##7) LIM5(x##8) LIM5(x##9)
+#define LIM7(x) LIM6(x##0) LIM6(x##1) LIM6(x##2) LIM6(x##3) LIM6(x##4) \
+               LIM6(x##5) LIM6(x##6) LIM6(x##7) LIM6(x##8) LIM6(x##9)
+
+LIM5(char t)
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-fnargs.c b/gcc/testsuite/gcc.c-torture/compile/limits-fnargs.c
new file mode 100644 (file)
index 0000000..b94fa43
--- /dev/null
@@ -0,0 +1,20 @@
+#define PAR1 int, int, int, int, int, int, int, int, int, int
+#define PAR2 PAR1, PAR1, PAR1, PAR1, PAR1, PAR1, PAR1, PAR1, PAR1, PAR1
+#define PAR3 PAR2, PAR2, PAR2, PAR2, PAR2, PAR2, PAR2, PAR2, PAR2, PAR2
+#define PAR4 PAR3, PAR3, PAR3, PAR3, PAR3, PAR3, PAR3, PAR3, PAR3, PAR3
+#define PAR5 PAR4, PAR4, PAR4, PAR4, PAR4, PAR4, PAR4, PAR4, PAR4, PAR4
+#define PAR6 PAR5, PAR5, PAR5, PAR5, PAR5, PAR5, PAR5, PAR5, PAR5, PAR5
+
+extern void func (PAR4);
+
+#define ARG1 0,1,2,3,4,5,6,7,8,9
+#define ARG2 ARG1, ARG1, ARG1, ARG1, ARG1, ARG1, ARG1, ARG1, ARG1, ARG1
+#define ARG3 ARG2, ARG2, ARG2, ARG2, ARG2, ARG2, ARG2, ARG2, ARG2, ARG2
+#define ARG4 ARG3, ARG3, ARG3, ARG3, ARG3, ARG3, ARG3, ARG3, ARG3, ARG3
+#define ARG5 ARG4, ARG4, ARG4, ARG4, ARG4, ARG4, ARG4, ARG4, ARG4, ARG4
+#define ARG5HALF ARG5, ARG5, ARG5, ARG5, ARG5
+
+void caller(void)
+{
+  func (ARG4);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c b/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c
new file mode 100644 (file)
index 0000000..4d2aef0
--- /dev/null
@@ -0,0 +1,17 @@
+#define LIM1(x) x##0, x##1, x##2, x##3, x##4, x##5, x##6, x##7, x##8, x##9,
+#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
+               LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
+#define LIM3(x) LIM2(x##0) LIM2(x##1) LIM2(x##2) LIM2(x##3) LIM2(x##4) \
+               LIM2(x##5) LIM2(x##6) LIM2(x##7) LIM2(x##8) LIM2(x##9)
+#define LIM4(x) LIM3(x##0) LIM3(x##1) LIM3(x##2) LIM3(x##3) LIM3(x##4) \
+               LIM3(x##5) LIM3(x##6) LIM3(x##7) LIM3(x##8) LIM3(x##9)
+#define LIM5(x) LIM4(x##0) LIM4(x##1) LIM4(x##2) LIM4(x##3) LIM4(x##4) \
+               LIM4(x##5) LIM4(x##6) LIM4(x##7) LIM4(x##8) LIM4(x##9)
+#define LIM6(x) LIM5(x##0) LIM5(x##1) LIM5(x##2) LIM5(x##3) LIM5(x##4) \
+               LIM5(x##5) LIM5(x##6) LIM5(x##7) LIM5(x##8) LIM5(x##9)
+#define LIM7(x) LIM6(x##0) LIM6(x##1) LIM6(x##2) LIM6(x##3) LIM6(x##4) \
+               LIM6(x##5) LIM6(x##6) LIM6(x##7) LIM6(x##8) LIM6(x##9)
+
+void func1 (LIM5(int p) int t)
+{
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-idexternal.c b/gcc/testsuite/gcc.c-torture/compile/limits-idexternal.c
new file mode 100644 (file)
index 0000000..1f346aa
--- /dev/null
@@ -0,0 +1,11 @@
+#define LIM1 0123456789
+#define LIM2 LIM1##LIM1##LIM1##LIM1##LIM1##LIM1##LIM1##LIM1##LIM1##LIM1
+#define LIM3 LIM2##LIM2##LIM2##LIM2##LIM2##LIM2##LIM2##LIM2##LIM2##LIM2
+#define LIM4 LIM3##LIM3##LIM3##LIM3##LIM3##LIM3##LIM3##LIM3##LIM3##LIM3
+#define LIM5 LIM4##LIM4##LIM4##LIM4##LIM4##LIM4##LIM4##LIM4##LIM4##LIM4
+#define LIM6 LIM5##LIM5##LIM5##LIM5##LIM5##LIM5##LIM5##LIM5##LIM5##LIM5
+
+#define V(x) v##LIM5##x
+
+int V(a);
+int V(b);
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-idinternal.c b/gcc/testsuite/gcc.c-torture/compile/limits-idinternal.c
new file mode 100644 (file)
index 0000000..cbd095e
--- /dev/null
@@ -0,0 +1,11 @@
+#define LIM1 0123456789
+#define LIM2 LIM1##LIM1##LIM1##LIM1##LIM1##LIM1##LIM1##LIM1##LIM1##LIM1
+#define LIM3 LIM2##LIM2##LIM2##LIM2##LIM2##LIM2##LIM2##LIM2##LIM2##LIM2
+#define LIM4 LIM3##LIM3##LIM3##LIM3##LIM3##LIM3##LIM3##LIM3##LIM3##LIM3
+#define LIM5 LIM4##LIM4##LIM4##LIM4##LIM4##LIM4##LIM4##LIM4##LIM4##LIM4
+#define LIM6 LIM5##LIM5##LIM5##LIM5##LIM5##LIM5##LIM5##LIM5##LIM5##LIM5
+
+#define V(x) v##LIM6##x
+
+static int V(a);
+static int V(b);
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-pointer.c b/gcc/testsuite/gcc.c-torture/compile/limits-pointer.c
new file mode 100644 (file)
index 0000000..1e50ea7
--- /dev/null
@@ -0,0 +1,8 @@
+#define PTR1 * * * * * * * * * *
+#define PTR2 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1
+#define PTR3 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2
+#define PTR4 PTR3 PTR3 PTR3 PTR3 PTR3 PTR3 PTR3 PTR3 PTR3 PTR3
+#define PTR5 PTR4 PTR4 PTR4 PTR4 PTR4 PTR4 PTR4 PTR4 PTR4 PTR4
+#define PTR6 PTR5 PTR5 PTR5 PTR5 PTR5 PTR5 PTR5 PTR5 PTR5 PTR5
+
+int PTR4 q3_var = 0;
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-stringlit.c b/gcc/testsuite/gcc.c-torture/compile/limits-stringlit.c
new file mode 100644 (file)
index 0000000..545a8be
--- /dev/null
@@ -0,0 +1,10 @@
+#define STR2 "012345678901234567890123456789012345678901234567890123456789\
+0123456789012345678901234567890123456789"
+#define STR3 STR2 STR2 STR2 STR2 STR2 STR2 STR2 STR2 STR2 STR2
+#define STR4 STR3 STR3 STR3 STR3 STR3 STR3 STR3 STR3 STR3 STR3
+#define STR5 STR4 STR4 STR4 STR4 STR4 STR4 STR4 STR4 STR4 STR4
+#define STR6 STR5 STR5 STR5 STR5 STR5 STR5 STR5 STR5 STR5 STR5
+#define STR7 STR6 STR6 STR6 STR6 STR6 STR6 STR6 STR6 STR6 STR6
+#define STR8 STR7 STR7 STR7 STR7 STR7 STR7 STR7 STR7 STR7 STR7
+
+char vlv[] = STR8;
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-structmem.c b/gcc/testsuite/gcc.c-torture/compile/limits-structmem.c
new file mode 100644 (file)
index 0000000..2f2265a
--- /dev/null
@@ -0,0 +1,18 @@
+#define LIM1(x) x##0; x##1; x##2; x##3; x##4; x##5; x##6; x##7; x##8; x##9;
+#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
+               LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
+#define LIM3(x) LIM2(x##0) LIM2(x##1) LIM2(x##2) LIM2(x##3) LIM2(x##4) \
+               LIM2(x##5) LIM2(x##6) LIM2(x##7) LIM2(x##8) LIM2(x##9)
+#define LIM4(x) LIM3(x##0) LIM3(x##1) LIM3(x##2) LIM3(x##3) LIM3(x##4) \
+               LIM3(x##5) LIM3(x##6) LIM3(x##7) LIM3(x##8) LIM3(x##9)
+#define LIM5(x) LIM4(x##0) LIM4(x##1) LIM4(x##2) LIM4(x##3) LIM4(x##4) \
+               LIM4(x##5) LIM4(x##6) LIM4(x##7) LIM4(x##8) LIM4(x##9)
+#define LIM6(x) LIM5(x##0) LIM5(x##1) LIM5(x##2) LIM5(x##3) LIM5(x##4) \
+               LIM5(x##5) LIM5(x##6) LIM5(x##7) LIM5(x##8) LIM5(x##9)
+#define LIM7(x) LIM6(x##0) LIM6(x##1) LIM6(x##2) LIM6(x##3) LIM6(x##4) \
+               LIM6(x##5) LIM6(x##6) LIM6(x##7) LIM6(x##8) LIM6(x##9)
+
+struct q20_struct
+{
+  LIM4 (char m)
+};
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-structnest.c b/gcc/testsuite/gcc.c-torture/compile/limits-structnest.c
new file mode 100644 (file)
index 0000000..62448fb
--- /dev/null
@@ -0,0 +1,23 @@
+#define LIM1(x) x##0 {x##1 {x##2 {x##3 {x##4 {x##5 {x##6 {x##7 {x##8 {x##9 {
+#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
+               LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
+#define LIM3(x) LIM2(x##0) LIM2(x##1) LIM2(x##2) LIM2(x##3) LIM2(x##4) \
+               LIM2(x##5) LIM2(x##6) LIM2(x##7) LIM2(x##8) LIM2(x##9)
+#define LIM4(x) LIM3(x##0) LIM3(x##1) LIM3(x##2) LIM3(x##3) LIM3(x##4) \
+               LIM3(x##5) LIM3(x##6) LIM3(x##7) LIM3(x##8) LIM3(x##9)
+#define LIM5(x) LIM4(x##0) LIM4(x##1) LIM4(x##2) LIM4(x##3) LIM4(x##4) \
+               LIM4(x##5) LIM4(x##6) LIM4(x##7) LIM4(x##8) LIM4(x##9)
+#define LIM6(x) LIM5(x##0) LIM5(x##1) LIM5(x##2) LIM5(x##3) LIM5(x##4) \
+               LIM5(x##5) LIM5(x##6) LIM5(x##7) LIM5(x##8) LIM5(x##9)
+#define LIM7(x) LIM6(x##0) LIM6(x##1) LIM6(x##2) LIM6(x##3) LIM6(x##4) \
+               LIM6(x##5) LIM6(x##6) LIM6(x##7) LIM6(x##8) LIM6(x##9)
+
+#define RBR1 } x; } x; } x; } x; } x; } x; } x; } x; } x; } x;
+#define RBR2 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1 RBR1
+#define RBR3 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2 RBR2
+#define RBR4 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3 RBR3
+#define RBR5 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4 RBR4
+
+LIM4(struct s)
+  int x;
+RBR4