bug83.cc 960 B

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