From 758e30fc16d3cbae21fbe7512cbcc97d487f08dd Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <dmitri.naumov@ufz.de>
Date: Tue, 26 Nov 2019 13:20:15 +0100
Subject: [PATCH] [PL] ST; Python; Avoiding internal compiler error.

Fails on gcc-7.x. Might be related to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82410
---
 ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp | 3 ++-
 ProcessLib/SourceTerms/Python/PythonSourceTerm.h         | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp b/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp
index 602d5a8b6fa..d1e0ba6ded7 100644
--- a/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp
+++ b/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp
@@ -73,7 +73,8 @@ std::unique_ptr<SourceTerm> createPythonSourceTerm(
     return std::make_unique<ProcessLib::SourceTerms::Python::PythonSourceTerm>(
         std::move(dof_table),
         ProcessLib::SourceTerms::Python::PythonSourceTermData{
-            source_term, global_component_id, source_term_mesh},
+            source_term, global_component_id, source_term_mesh,
+            source_term_mesh.getID()},
         integration_order, shapefunction_order, global_dim, flush_stdout);
 }
 
diff --git a/ProcessLib/SourceTerms/Python/PythonSourceTerm.h b/ProcessLib/SourceTerms/Python/PythonSourceTerm.h
index 06899e6a190..dd9c8299a1b 100644
--- a/ProcessLib/SourceTerms/Python/PythonSourceTerm.h
+++ b/ProcessLib/SourceTerms/Python/PythonSourceTerm.h
@@ -39,7 +39,7 @@ struct PythonSourceTermData final
     const MeshLib::Mesh& source_term_mesh;
 
     //! Mesh ID of the entire domain.
-    std::size_t const source_term_mesh_id = source_term_mesh.getID();
+    std::size_t const source_term_mesh_id;
 };
 
 //! A source term whose values are computed by a Python script.
-- 
GitLab