[Bug c++/91165] New: error: location references block not in block tree
dcb314 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Jul 14 16:09:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91165
Bug ID: 91165
Summary: error: location references block not in block tree
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
For this C++ code:
template <typename a> constexpr a b(a c) { return c; }
template <typename m, typename d> struct e {
m f;
d g;
constexpr e(m c, d h) : f(c), g(h) {}
};
template <typename m, typename d> constexpr e<m, d> i(m &&c, d h) {
return e<m, d>(c, b(h));
}
typedef enum { j } k;
class l {
e<k, int> m_fn1() const;
};
void n() {
int a;
i(a, "");
}
e<k, int> l::m_fn1() const { i(j, ""); }
compiled by recent c++ compiler with -O2, does this:
bug535.cc: In member function ‘e<k, int> l::m_fn1() const’:
bug535.cc:18:40: warning: no return statement in function returning non-void
[-W
return-type]
18 | e<k, int> l::m_fn1() const { i(j, ""); }
| ^
bug535.cc:18:11: error: location references block not in block tree
18 | e<k, int> l::m_fn1() const { i(j, ""); }
| ^
""
D.2449.g = "";
during GIMPLE pass: cfg
bug535.cc:18:11: internal compiler error: verify_gimple failed
0x1102f48 verify_gimple_in_cfg(function*, bool)
../../trunk/gcc/tree-cfg.c:5426
0xfb0e4f execute_function_todo
../../trunk/gcc/passes.c:1963
0xfb24f1 do_per_function
../../trunk/gcc/passes.c:1638
0xfb24f1 execute_todo
../../trunk/gcc/passes.c:2017
Bug first seems to occur sometime before revision 272500, dated
Jun 20 or so.
More information about the Gcc-bugs
mailing list