summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5FDmulti.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index eae6488..9ab752b 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -54,6 +54,10 @@
#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]; \
@@ -64,6 +68,23 @@
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) { \
@@ -718,7 +739,7 @@ H5FD_multi_sb_size(H5FD_t *_file)
UNIQUE_MEMBERS(file->fa.memb_map, mt) {
nseen++;
} END_MEMBERS;
-
+
/* Addresses and EOA markers */
nbytes += nseen * 2 * 8;
@@ -1503,6 +1524,7 @@ H5FD_multi_set_eoa(H5FD_t *_file, haddr_t eoa)
/* Save new eoa for return later */
file->eoa = eoa;
+
return 0;
}