summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_array.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_array.c')
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_array.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_array.c b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_array.c
new file mode 100644
index 000000000..bd03ec42f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_array.c
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+/* { dg-do run } */
+
+#include <stdlib.h>
+typedef struct
+{
+ int a;
+ float b;
+}str_t;
+
+#define N 1000
+
+typedef struct
+{
+ str_t A[N];
+ int c;
+}str_with_substr_t;
+
+str_with_substr_t a;
+
+int
+main ()
+{
+ int i;
+
+ for (i = 0; i < N; i++)
+ a.A[i].b = 0;
+
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/* { dg-final { scan-ipa-dump "is a field in the structure" "ipa_struct_reorg" { xfail *-*-* } } } */
+/* { dg-final { cleanup-ipa-dump "*" } } */