components/libgsl/patches/fix-linear-optimization.patch
author Craig Mohrman <craig.mohrman@oracle.com>
Tue, 09 Jun 2015 15:44:51 -0700
branchs11-update
changeset 4451 a9174862fe73
parent 4388 8bd4e7260c34
permissions -rw-r--r--
20293317 problem in UTILITY/PHP 20433646 problem in UTILITY/PHP
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4388
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
Fix an optimization issue seen with Studion 12.1 with Solaris 11.3 when
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
compiling with -xO4. The problem has been fixed in Studio 12.4, so the
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
issue will go away when the Solaris 11.X release updates to that in its CBE.
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
This patch will not be sent upstream.
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
--- gsl-1.16/interpolation/linear.c.orig	2015-06-01 15:58:46.278682889 -0700
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
+++ gsl-1.16/interpolation/linear.c	2015-06-01 16:28:26.000366577 -0700
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
@@ -157,7 +157,7 @@
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
   *result = 0.0;
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
   
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
   /* interior intervals */
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
-  for(i=index_a; i<=index_b; i++) {
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
+  for(i=index_a; i<index_b+1; i++) {
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
     const double x_hi = x_array[i + 1];
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
     const double x_lo = x_array[i];
8bd4e7260c34 21181760 Workaround for Studio 12.1 optimization issue with libGSL in Solaris 11.3
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
     const double y_lo = y_array[i];