]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a configure check for a regression with icc-14.0.0 and libstdc++-4.7 in C++11...
authorMatthias Maier <tamiko@kyomu.43-1.org>
Wed, 13 Nov 2013 17:27:33 +0000 (17:27 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Wed, 13 Nov 2013 17:27:33 +0000 (17:27 +0000)
git-svn-id: https://svn.dealii.org/trunk@31642 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/checks/check_03_compiler_bugs.cmake

index f2cc702cb08032b83621a499050cdf9fbf79a428..a31f9f48241bc02f20ecbf20555e11ceef4a3390 100644 (file)
@@ -314,15 +314,42 @@ CHECK_CXX_COMPILER_BUG(
   "
   DEAL_II_ICC_NUMERICLIMITS_BUG)
 
-IF(DEAL_II_ICC_NUMERICLIMITS_BUG)
+#
+# icc-14.0.0 has an astonishing bug [1] where it hits an internal compiler
+# error when run in C++11 mode with libstdc++-4.7 (from gcc).
+#
+# We just disable C++11 mode in this case
+#
+# [1] http://software.intel.com/en-us/forums/topic/472385
+#
+# - Matthias Maier, 2013
+#
+CHECK_CXX_COMPILER_BUG(
+  "
+  #include <vector>
+  template<typename T> void foo()
+  {
+    std::vector<double> data(100);
+  }
+  int main()
+  {
+    foo<int>();
+  }
+  "
+  DEAL_II_ICC_LIBSTDCPP47CXX11_BUG)
+
+
+IF( DEAL_II_ICC_NUMERICLIMITS_BUG OR
+    DEAL_II_ICC_LIBSTDCPP47CXX11_BUG )
   MESSAGE(STATUS
-    "DEAL_II_ICC_NUMERICLIMITS_BUG found, disabling c++11 support"
+    "Intel C++11 bug found, disabling C++11 support"
     )
   STRIP_FLAG(CMAKE_CXX_FLAGS "${DEAL_II_CXX11_FLAG}")
   SET(DEAL_II_CAN_USE_CXX1X FALSE)
   SET(DEAL_II_USE_CXX11 FALSE)
 ENDIF()
 
+
 #
 # gcc-4.8.1 has some problems with the constexpr "vertices_per_cell" in the
 # definition of alternating_form_at_vertices.

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.