[Bug c++/91165] [10 Regression] error: location references block not in block tree

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 12 15:28:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91165

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly further reduced #c3:
template <typename T> constexpr T bar (T c) { return c; }
template <typename T, typename U> struct S {
  T f;
  U g;
  constexpr S (T c, U h) : f(c), g(h) {}
};
template <typename T, typename U>
constexpr S<T, U> foo (T &&c, U h) { return S<T, U> (c, bar (h)); }
struct C { void baz (int); void qux (); };
void C::baz (int a) { foo (a, ""); }
void C::qux () { foo (0, ""); }

Seems some TARGET_EXPR is not unshared during the constexpr evaluation.


More information about the Gcc-bugs mailing list