summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr44546.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr44546.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/pr44546.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr44546.c b/gcc/testsuite/gcc.target/i386/pr44546.c
new file mode 100644
index 00000000000..517446fdc8f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr44546.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -ffast-math -mfpmath=387" } */
+
+typedef __SIZE_TYPE__ size_t;
+typedef struct
+{
+ float *ewgts;
+} vtx_data;
+
+extern void *zmalloc (size_t);
+extern int whatever (vtx_data *);
+
+float *
+compute_apsp_artifical_weights_packed (vtx_data * graph, int n)
+{
+ float *weights;
+
+ weights = (float *) zmalloc (n * sizeof (float));
+ weights[n] =
+ whatever (graph) > graph[n].ewgts[n] ?
+ whatever (graph) : graph[n].ewgts[n];
+}