]> https://gitweb.dealii.org/ - dealii.git/commit
work around gcc segfault in tensor.h
authorTimo Heister <timo.heister@gmail.com>
Sun, 11 Oct 2020 18:14:53 +0000 (14:14 -0400)
committerTimo Heister <timo.heister@gmail.com>
Sun, 11 Oct 2020 18:14:53 +0000 (14:14 -0400)
commit9267296c277ebe6616ef06165a02d752085d8194
tree51c301a8b2e960855a70f1114850af2647825cf5
parentd949861f2fb94acc0ce0f318983e214f87913c34
work around gcc segfault in tensor.h

gcc 5.4.0 with -O1 in debug mode segfaults with
```
In file included from ../include/deal.II/base/symmetric_tensor.h:25:0,
                 from ../include/deal.II/base/array_view.h:23,
                 from ../source/fe/fe_values.cc:16,
                 from ../source/fe/fe_values_inst4.cc:17:
../include/deal.II/base/tensor.h: In function ‘void
dealii::FEValuesViews::internal::do_function_symmetric_gradients(const
dealii::ArrayView<Number>&, const dealii::Table<2, dealii::Tensor<1,
spacedim> >&, const std::vector<typename
dealii::FEValuesViews::Vector<dim, spacedim>::ShapeFunctionData>&,
std::vector<typename dealii::ProductType<Number,
dealii::SymmetricTensor<2, spacedim> >::type>&) [with int dim = 1; int
spacedim = 1; Number = std::complex<double>; typename
dealii::FEValuesViews::Vector<dim, spacedim>::ShapeFunctionData =
dealii::FEValuesViews::Vector<1, 1>::ShapeFunctionData; typename
dealii::ProductType<Number, dealii::SymmetricTensor<2, spacedim> >::type
= dealii::SymmetricTensor<2, 1, std::complex<double> >]’:
../include/deal.II/base/tensor.h:497:35:   in constexpr expansion of
‘(long unsigned int)(__first + 16u)()’
../include/deal.II/base/tensor.h:497:35:   in constexpr expansion of
‘<expression error>()’
../include/deal.II/base/tensor.h:497:35:   in constexpr expansion of
‘dealii::Tensor<2, 1, double>()’
../include/deal.II/base/tensor.h:497:35:   in constexpr expansion of
‘(void*)__first()’

In file included from ../source/fe/fe_values_inst4.cc:17:0:
../source/fe/fe_values.cc:700:5: internal compiler error: Segmentation
fault
     do_function_symmetric_gradients(
```
Work around this by changing the constructor.
include/deal.II/base/tensor.h

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.