[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b3-4-gc105d42

Service Account noreply at mpich.org
Thu Jun 4 09:16:11 CDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  c105d422edaf19af14d492d784c432cf819ee92c (commit)
      from  27a5232a498ea4d853fb4a778fa7f3b0291fc774 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/c105d422edaf19af14d492d784c432cf819ee92c

commit c105d422edaf19af14d492d784c432cf819ee92c
Author: Lena Oden <loden at anl.gov>
Date:   Tue Jun 2 10:46:01 2015 -0500

    Check if type_tag is agnostic to modifiers.
    
    Add a test to configure.ac that tests, if type_tag_for_datatype is
    agnostic for modifiers as const or volatile.  If the test fails, the
    type_tag_for_datatype test is disabled in mpi.h by setting a flag to
    avoid compiler warning.  In this case, there are no type tests for MPI
    data types when compiling.
    
    Fixes #2223.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/configure.ac b/configure.ac
index 141307b..44e7c97 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4433,6 +4433,29 @@ AC_SUBST([MPI_F77_CXX_FLOAT_COMPLEX])
 AC_SUBST([MPI_F77_CXX_DOUBLE_COMPLEX])
 AC_SUBST([MPI_F77_CXX_LONG_DOUBLE_COMPLEX])
 
+# ------------------------------------------------------------------------
+# Test if  type_tag_for_datatype is agnostic to modifiers such as const, volatile, and restrict
+# if not, the type tags are disabled to avoid compiler warings. A new type_tag for const etc. does
+# does not help, since only the latest type_tag definition is used. Type tags are defined in mpi.h,
+# therefore, they must be also be activated/deavtivated there
+PAC_PUSH_FLAG([CFLAGS])
+PAC_APPEND_FLAG([-Werror],[CFLAGS])
+AC_TRY_COMPILE([
+typedef int TEST_Datatype;
+#define TEST_INT ((TEST_Datatype)0x44)
+static const TEST_Datatype test_int  __attribute__((type_tag_for_datatype(TEST,int)))  = TEST_INT;
+void test(const void* buffer, TEST_Datatype datatype)__attribute__((pointer_with_type_tag(TEST,1,2)));],[
+const int buf[10];
+test(buf, TEST_INT);],ac_attr_support=yes, ac_attr_support=no)
+if test "$ac_attr_support" = yes
+then
+    DISABLE_TAG_SUPPORT="#undef NO_TAGS_WITH_MODIFIERS"
+else
+    DISABLE_TAG_SUPPORT="#define NO_TAGS_WITH_MODIFIERS 1"
+fi
+PAC_POP_FLAG([CFLAGS])
+AC_SUBST(DISABLE_TAG_SUPPORT)
+
 # ----------------------------------------------------------------------------
 # Check for the alignment rules moves with types int64_t etc.  These
 # are used in the datatype code to perform pack and unpack operations.  
diff --git a/src/include/mpi.h.in b/src/include/mpi.h.in
index 6d22fd9..41387a7 100644
--- a/src/include/mpi.h.in
+++ b/src/include/mpi.h.in
@@ -14,10 +14,12 @@
 extern "C" {
 #endif
 
+ at DISABLE_TAG_SUPPORT@
 #undef MPICH_DEFINE_ATTR_TYPE_TYPES
 #if defined(__has_attribute)
 #  if __has_attribute(pointer_with_type_tag) && \
       __has_attribute(type_tag_for_datatype) && \
+      !defined(NO_TAGS_WITH_MODIFIERS) &&\
       !defined(MPICH_NO_ATTR_TYPE_TAGS)
 #    define MPICH_DEFINE_ATTR_TYPE_TYPES 1
 #    define MPICH_ATTR_POINTER_WITH_TYPE_TAG(buffer_idx, type_idx)  __attribute__((pointer_with_type_tag(MPI,buffer_idx,type_idx)))

-----------------------------------------------------------------------

Summary of changes:
 configure.ac         |   23 +++++++++++++++++++++++
 src/include/mpi.h.in |    2 ++
 2 files changed, 25 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list