summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authorErick Ochoa <erick.ochoa@theobroma-systems.com>2020-02-03 16:09:12 +0100
committerErick Ochoa <erick.ochoa@theobroma-systems.com>2020-04-28 23:35:32 +0200
commitfc2389f4e93c043bef40458aeb580bc54de37560 (patch)
treebdabd58798da0be288575daada4e16531066bfaf /gcc/testsuite/gcc.dg
parent5e23017f4dbbf932873e09c5634cf2471303b9f1 (diff)
memref testcase
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-structreorg-42-mem-ref-0.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-42-mem-ref-0.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-42-mem-ref-0.c
new file mode 100644
index 00000000000..625c7604cc9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-42-mem-ref-0.c
@@ -0,0 +1,30 @@
+/* { dg-do run } */
+/* { dg-options "-flto -flto-partition=none -fipa-typelist -fdump-ipa-typelist -fipa-typelist-field=nextout -fipa-typelist-struct=arc" } */
+
+#include <stdlib.h>
+
+typedef struct arc arc_t;
+typedef struct arc *arc_p;
+
+struct arc {
+ int id;
+ long cost;
+ void * tail, * head;
+ short ident;
+ arc_p nextout, nextin;
+ long flow;
+ long org_cost;
+};
+
+
+
+int
+main()
+{
+ int num_threads = 10;
+ arc_p *deleted_arcs;
+ register arc_t *arcnew;
+ deleted_arcs = (arc_p*) malloc(num_threads * sizeof(arc_p));
+ deleted_arcs[num_threads][num_threads] = arcnew[0];
+ return 0;
+}