Bug#1133460: dune-geometry: ftbfs with GCC-16

Markus Blatt <[email protected]> Mon, 3 Aug 2026 10:24:00 +0200
Newsgroups gmane.linux.debian.devel.bugs.rc
Message-ID <anBQIOcHcQk1uzDp__333.163204935261$1785747078$gmane$org@smaug.dr-blatt.de>
Hi,

I shortly looked into this.

The problematic error seems to be the first omr of these (the rest is a result
of the first):

/build/reproducible-path/dune-geometry-2.11.0/dune/geometry/test/test-localfiniteelementgeometry.cc: In instantiation of ‘bool checkLocalFiniteElementGeometry() [with ctype = double; int cdim = 4; Dune::GeometryType::IdType id = (D\
une::GeometryType::IdType)1]’:
/build/reproducible-path/dune-geometry-2.11.0/dune/geometry/test/test-localfiniteelementgeometry.cc:95:85:   required from ‘bool checkLocalFiniteElementGeometry() [with ctype = double]’
    95 |   pass &= checkLocalFiniteElementGeometry<ctype, 4, Dune::GeometryTypes::simplex(1)>();
       |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/build/reproducible-path/dune-geometry-2.11.0/dune/geometry/test/test-localfiniteelementgeometry.cc:136:52:   required from here
   136 |   pass &= checkLocalFiniteElementGeometry< double >();
       |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/build/reproducible-path/dune-geometry-2.11.0/dune/geometry/test/test-localfiniteelementgeometry.cc:46:46: error: use of local variable with automatic storage from containing function
    46 |   auto f = [&](Dune::FieldVector<ctype,gt.dim()> const& x) {
       |                                        ~~~~~~^~
/build/reproducible-path/dune-geometry-2.11.0/dune/geometry/test/test-localfiniteelementgeometry.cc:27:18: note: ‘constexpr const Dune::GeometryType gt’ declared here
    27 |   constexpr auto gt = Dune::GeometryType{id};
       |                  ^~
/build/reproducible-path/dune-geometry-2.11.0/dune/geometry/test/test-localfiniteelementgeometry.cc:64:8: error: no matching function for call to ‘Dune::LocalFiniteElementGeometry<Dune::Impl::LocalFiniteElement<Dune::Impl::P1LocalB\
asis<double, double, 1>, Dune::Impl::P1LocalInterpolation>, 4>::LocalFiniteElementGeometry(<brace-enclosed initializer list>)’
    64 |   auto geometry2 = Geometry{refElem, lfe, f};
       |        ^~~~~~~~~
   • there are 6 candidates

I think this should be valid c++ code, as the same construct is used outside of
the lambda without problems.

The code is

36:  Dune::FieldMatrix<ctype,cdim,gt.dim()> A; // No error here
...
45:  // mapping to generate coordinates from reference-element corners
46:  auto f = [&](Dune::FieldVector<ctype,gt.dim()> const& x) { // error because of gt.dim()
47:    Dune::FieldVector<ctype,cdim> y;
48:    A.mv(x,y);
49:    y += b;
50:    return y;
51:  };

I'll do some further investigations, but for now I think this a compiler problem.

Best,

Markus