Patchwork Add testcase for PR43221

login
register
mail settings
Submitter Richard Guenther
Date July 20, 2010, 1:06 p.m.
Message ID <alpine.LNX.2.00.1007201505450.1429@zhemvz.fhfr.qr>
Download mbox | patch
Permalink /patch/59308/
State New
Headers show

Comments

Richard Guenther - July 20, 2010, 1:06 p.m.
Committed.

Richard.

2010-07-20  Richard Guenther  <rguenther@suse.de>

	PR lto/43221
	* gcc.dg/lto/20100720-2_0.c: New testcase.
	* gcc.dg/lto/20100720-2_1.c: Likewise.

Patch

Index: gcc/testsuite/gcc.dg/lto/20100720-2_1.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20100720-2_1.c	(revision 0)
+++ gcc/testsuite/gcc.dg/lto/20100720-2_1.c	(revision 0)
@@ -0,0 +1,16 @@ 
+struct X {
+  int b;
+};
+
+typedef struct list_node *list;
+
+struct list_node {
+  list next;
+  list *ptr;
+  struct X *value;
+};
+
+list *g(list *ptr)
+{
+  return ptr;
+}
Index: gcc/testsuite/gcc.dg/lto/20100720-2_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20100720-2_0.c	(revision 0)
+++ gcc/testsuite/gcc.dg/lto/20100720-2_0.c	(revision 0)
@@ -0,0 +1,23 @@ 
+/* { dg-lto-do run } */
+
+struct X {
+  int a;
+};
+
+typedef struct list_node *list;
+
+struct list_node {
+  list next;
+  list *ptr;
+  struct X *value;
+};
+
+list f(list lst)
+{
+  return lst->next;
+}
+
+int main(void)
+{
+  return 0;
+}