diff mbox series

regression tests for 103770 fixed on trunk

Message ID 5791bf0f0ae865ce3479da68fb4cf51b41ddd10d.camel@tugraz.at
State New
Headers show
Series regression tests for 103770 fixed on trunk | expand

Commit Message

Martin Uecker Dec. 22, 2022, 8:13 p.m. UTC
This adds regression tests for an ICE on valid code that
seems gone on trunk, but the cause is still unclear.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103770



regressions tests for PR103770

This adds tests from bugzilla for PR103770 and duplicates.

testsuite/gcc.dg/
	* pr103770.c: New test.
	* pr103859.c: New test.
	* pr105065.c: New test.

Comments

Jeff Law Dec. 27, 2022, 4:42 p.m. UTC | #1
On 12/22/22 13:13, Martin Uecker via Gcc-patches wrote:
> 
> This adds regression tests for an ICE on valid code that
> seems gone on trunk, but the cause is still unclear.
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103770
> 
> 
> 
> regressions tests for PR103770
> 
> This adds tests from bugzilla for PR103770 and duplicates.
> 
> testsuite/gcc.dg/
> 	* pr103770.c: New test.
> 	* pr103859.c: New test.
> 	* pr105065.c: New test.
OK.  Though I suspect your ChangeLog will need adjustments to get past 
the commit hooks.

gcc/testsuite
	* gcc.dg/pr103770.c: New test.

Would be the proper format I think.

jeff
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/pr103770.c b/gcc/testsuite/gcc.dg/pr103770.c
new file mode 100644
index 00000000000..f7867d1284c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103770.c
@@ -0,0 +1,27 @@ 
+/* PR middle-end/103770 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+struct struct_s {
+	void* ptr;
+	void* ptr2;
+	void* ptr3;
+};
+
+struct struct_s struct_create(int N, const long vla[N]);
+
+void fun(int N)
+{
+	long vla[N];
+	struct struct_s st = struct_create(N, vla);
+}
+
+
+extern _Complex float g(int N, int dims[N]);
+
+void f(void)
+{
+ 	int dims[1];
+	_Complex float val = g(1, dims);
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr103859.c b/gcc/testsuite/gcc.dg/pr103859.c
new file mode 100644
index 00000000000..c58be5c15af
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103859.c
@@ -0,0 +1,23 @@ 
+/* PR middle-end/103859 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+typedef struct dcmplx dcmplx;
+
+struct dcmplx {
+  double re;
+  double im;
+};
+
+dcmplx horner(int n, dcmplx p[n], dcmplx x);
+
+int main(void)
+{
+  int i, n;
+  dcmplx x[n + 1], f[n + 1];
+
+  horner(n + 1, f, x[i]);
+
+  return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr105065.c b/gcc/testsuite/gcc.dg/pr105065.c
new file mode 100644
index 00000000000..da46d2bb4d8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr105065.c
@@ -0,0 +1,16 @@ 
+/* PR middle-end/105065 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+typedef struct
+{
+	char filler[17];
+} big_struct;
+
+big_struct dummy(int size, char array[size]);
+
+int main()
+{
+	dummy(0, 0);
+}
+