https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74762
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-08-12 CC| |manu at gcc dot gnu.org Component|middle-end |c++ Ever confirmed|0 |1 --- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- A simpler testcase without infinite recursion: struct tree2; struct tree_vector2 { tree2 *elts[1]; }; struct tree2 { struct { tree_vector2 vector; } u; }; tree2 * const_with_all_bytes_same (tree2 *val) { int i; return ((val->u.vector.elts[i])); } And I would say this is a C++ problem, but unfortunately, it is a problem throughout GCC of abusing TREE_NO_WARNING.