]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work around a bug in icc13.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 18 Jan 2013 21:39:41 +0000 (21:39 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 18 Jan 2013 21:39:41 +0000 (21:39 +0000)
git-svn-id: https://svn.dealii.org/trunk@28138 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/configure

index 92254d9f816a0180cc6f63dc438c685af1554abf..a5e553a87184599e44c5db859650053453691b86 100644 (file)
@@ -9,7 +9,7 @@ dnl    In doc/Makefile some information on the kind of documentation
 dnl    is stored.
 dnl
 dnl
-dnl Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors
+dnl Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors
 dnl
 dnl $Id$
 
@@ -1300,6 +1300,36 @@ AC_DEFUN(DEAL_II_CHECK_CXX1X_COMPONENTS, dnl
        [ AC_MSG_RESULT(no); all_cxx1x_classes_available=no ]
        )
 
+
+  dnl icc-13 triggers an internal compiler error when compiling
+  dnl std::numeric_limits<...>::min() with -std=c++0x [1].
+  dnl Just disable C++11 support completely in this case.
+  dnl
+  dnl Reported by Ted Kord.
+  dnl
+  dnl [1] http://software.intel.com/en-us/forums/topic/328902
+  AC_MSG_CHECKING(for icc13 bug with C++11)
+  AC_TRY_COMPILE(
+      [
+       #include <limits>
+
+       struct Integer
+       {
+         static const int min_int_value;
+         static const int max_int_value;
+       };
+       const int Integer::min_int_value = std::numeric_limits<int>::min();
+       const int Integer::max_int_value = std::numeric_limits<int>::max();
+      ],
+      [],
+      [
+       AC_MSG_RESULT(no)
+      ],
+      [
+       AC_MSG_RESULT(yes); all_cxx1x_classes_available=no
+      ]
+     )
+
   CXXFLAGS="${OLD_CXXFLAGS}"
 
   dnl If the above classes and operations are all defined then we can
@@ -7486,4 +7516,3 @@ AC_DEFUN(DEAL_II_CONFIGURE_P4EST, dnl
     AC_MSG_RESULT(no)
   fi
 ])
-
index df5a12c5725590dd973770380d61eb1abe24fdb4..d82df097184b9ada4a547d7c162c0dc367b8104b 100755 (executable)
@@ -4477,6 +4477,44 @@ else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }; all_cxx1x_classes_available=no
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icc13 bug with C++11" >&5
+$as_echo_n "checking for icc13 bug with C++11... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+       #include <limits>
+
+       struct Integer
+       {
+         static const int min_int_value;
+         static const int max_int_value;
+       };
+       const int Integer::min_int_value = std::numeric_limits<int>::min();
+       const int Integer::max_int_value = std::numeric_limits<int>::max();
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }; all_cxx1x_classes_available=no
+
+
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
@@ -5250,6 +5288,44 @@ else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }; all_cxx1x_classes_available=no
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icc13 bug with C++11" >&5
+$as_echo_n "checking for icc13 bug with C++11... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+       #include <limits>
+
+       struct Integer
+       {
+         static const int min_int_value;
+         static const int max_int_value;
+       };
+       const int Integer::min_int_value = std::numeric_limits<int>::min();
+       const int Integer::max_int_value = std::numeric_limits<int>::max();
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }; all_cxx1x_classes_available=no
+
+
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.