[MOAB-dev] commit/MOAB: danwu: Hack Intel compiler 12 issues (when -O2 optimization is enabled)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Aug 15 15:49:53 CDT 2013


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/64affafdab33/
Changeset:   64affafdab33
Branch:      master
User:        danwu
Date:        2013-08-15 22:49:27
Summary:     Hack Intel compiler 12 issues (when -O2 optimization is enabled)

Affected #:  1 file

diff --git a/src/moab/HomXform.hpp b/src/moab/HomXform.hpp
index 1f41049..8110afa 100644
--- a/src/moab/HomXform.hpp
+++ b/src/moab/HomXform.hpp
@@ -44,7 +44,12 @@ class HomCoord
 private:
 
     //! coordinate data
+#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER < 1310)
+  // Hack Intel compiler 12 issues with -O2 optimization
+  int homCoord[5];
+#else
   int homCoord[4];
+#endif
 
 public:
   friend class HomXform;
@@ -203,10 +208,22 @@ inline HomCoord::HomCoord(const int coord0, const int coord1,
 
 inline HomCoord::HomCoord(const HomCoord &coords) 
 {
+#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER < 1310)
+  // Hack Intel compiler 12 issues with -O2 optimization
+  int coord0 = coords[0];
+  int coord1 = coords[1];
+  int coord2 = coords[2];
+  int coord3 = coords[3];
+  homCoord[0] = coord0;
+  homCoord[1] = coord1;
+  homCoord[2] = coord2;
+  homCoord[3] = coord3;
+#else
   homCoord[0] = coords[0];
   homCoord[1] = coords[1];
   homCoord[2] = coords[2];
   homCoord[3] = coords[3];
+#endif
 }
   
 inline void HomCoord::set(const int coords[])

Repository URL: https://bitbucket.org/fathomteam/moab/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the moab-dev mailing list