From cf83fb06120a4a90963fe0c9e2037af03965c5fc Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Mon, 13 Jun 2005 11:32:25 -0500 Subject: [svn-r10913] Purpose: Work Around A Compiler Bug Description: PGCC compiler on mir(AMD Opeteron) has a bug for optimization, causing the multi driver test to fail. The compiler handles a macro in this file incorrectly. Solution: Slightly change the definition of this macro to avoid the problem temporarily. Platforms tested: h5committest, optimization and debug on mir. --- src/H5FDmulti.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) 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 && LOOPVAR0 && LOOPVARfa.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; } -- cgit v0.12