This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81408] Lots of new -Wunsafe-loop-optimizations warnings with 7 compared to 6
- From: "marxin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 12 Jul 2017 09:38:49 +0000
- Subject: [Bug c++/81408] Lots of new -Wunsafe-loop-optimizations warnings with 7 compared to 6
- Auto-submitted: auto-generated
- References: <bug-81408-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81408
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-07-12
CC| |amker at gcc dot gnu.org,
| |glisse at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, I reduced one test-case:
$ cat pr81408.ii
template <typename b, typename> class d
{
b e;
public:
int operator* () {}
void operator++ () { ++e; }
b
base ()
{
return e;
}
};
template <typename f, typename g, typename h>
bool
operator!= (d<f, h> i, d<g, h> j)
{
return i.base () - j.base ();
}
template <typename> class k;
template <typename> struct m;
template <typename a> struct m<k<a>>
{
using l = a *;
};
struct p : m<k<int>>
{
d<l, int> begin ();
d<l, int> end ();
} n;
void
o ()
{
for (auto c : n)
;
}
Which started to be recognized with r242638. And I also noticed the original
unreduced test-case started to be diagnosed with r238641.
That said it's probably better optimizer work that shows more warnings, am I
right?