summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr58432.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr58432.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr58432.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr58432.c b/gcc/testsuite/gcc.dg/pr58432.c
new file mode 100644
index 00000000000..22a720f142f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58432.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-profiling "-fprofile-generate" } */
+/* { dg-options "-O3 -fprofile-generate" } */
+
+struct {
+ int prefix;
+ int dir_idx;
+} *a;
+int b;
+void fn1() {
+ int *c, *d;
+ for (; b; b++)
+ if (d[b]) {
+ c[b] = d[b];
+ a[0].dir_idx = 0;
+ }
+}