bug83.cc 884 B

1234567891011121314151617181920212223242526
  1. // -*- mode: c++; coding: utf-8 -*-
  2. /// @file bug83.cc
  3. /// @brief Triggers gcc 8.3 ICE: in verify_ctor_sanity, at cp/constexpr.c:2805
  4. // (c) Daniel Llorens - 2016-2017, 2019
  5. // This library is free software; you can redistribute it and/or modify it under
  6. // the terms of the GNU Lesser General Public License as published by the Free
  7. // Software Foundation; either version 3 of the License, or (at your option) any
  8. // later version.
  9. // reduced from bench/bench-stencil2.cc.
  10. // Bisected to edad804087b3eb0d2c4b2b423aacc4341b7a6736.
  11. // Patched by removing constexpr in big.hh: View(): p(nullptr) {}.
  12. // Removed the patch for gcc 10.1 after 76bfad74c53e799e12d540d03318c3037bf624e0.
  13. #include <iostream>
  14. #include <iomanip>
  15. #include <random>
  16. #include "ra/big.hh"
  17. int main()
  18. {
  19. ra::Big<double, 2> A({4, 4}, 0.);
  20. A = ra::expr([](auto && a) { return a(0, 0); }, ra::iter<2>(A));
  21. }