diff options
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | configure.in | 9 | ||||
-rw-r--r-- | src/H5FDmulti.c | 21 |
3 files changed, 13 insertions, 21 deletions
@@ -21774,6 +21774,10 @@ q EOF fi +if (${CC-cc} -V 2>&1 | grep '^pgcc 6.0') > /dev/null && test "X$enable_production" = "Xyes"; then + CC="${CC-cc} -Mx,28,0x8" +fi + case "$INSTALL" in *install-sh*) INSTALL='\${top_srcdir}/bin/install-sh -c' diff --git a/configure.in b/configure.in index 020e8a5..4967361 100644 --- a/configure.in +++ b/configure.in @@ -534,6 +534,15 @@ q EOF fi +dnl ---------------------------------------------------------------------- +dnl pgcc version 6.0x have optimization (-O, -O2 or -O3) problem. Detect +dnl these versions and add option "-Mx,28,0x8" to the compiler to avoid +dnl the problem if optimization is enable. +dnl +if (${CC-cc} -V 2>&1 | grep '^pgcc 6.0') > /dev/null && test "X$enable_production" = "Xyes"; then + CC="${CC-cc} -Mx,28,0x8" +fi + dnl Fix up the INSTALL macro if it's a relative path. We want the dnl full-path to the binary instead. case "$INSTALL" in diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index 9ab752b..155ec68 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -54,10 +54,6 @@ #endif /* Loop through all mapped files */ -#ifdef TMP -/*The -O2 optimization of the PGCC in mir has a bug for this macro. A workaround - *is provided here to avoid the problem temporarily until the compiler bug is fixed. - *SLU - 2005/6/13 */ #define UNIQUE_MEMBERS(MAP,LOOPVAR) { \ H5FD_mem_t _unmapped, LOOPVAR; \ hbool_t _seen[H5FD_MEM_NTYPES]; \ @@ -68,23 +64,6 @@ if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=_unmapped; \ assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \ if (_seen[LOOPVAR]++) continue; -#else /*TMP*/ -#define UNIQUE_MEMBERS(MAP,LOOPVAR) { \ - H5FD_mem_t _unmapped, LOOPVAR; \ - hbool_t _seen[H5FD_MEM_NTYPES]; \ - \ - memset(_seen, 0, sizeof _seen); \ - for (_unmapped=H5FD_MEM_SUPER; _unmapped<H5FD_MEM_NTYPES; _unmapped=(H5FD_mem_t)(_unmapped+1)) { \ - LOOPVAR = MAP[_unmapped]; \ - if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=_unmapped; \ - assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \ - \ - if(_seen[LOOPVAR]) { \ - _seen[LOOPVAR]++; \ - continue; \ - } \ - _seen[LOOPVAR]++; -#endif /*TMP*/ #ifdef LATER #define MAPPED_MEMBERS(MAP,LOOPVAR) { \ |