This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81408] New: Lots of new -Wunsafe-loop-optimizations warnings with 7 compared to 6
- From: "jak at jak-linux dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 12 Jul 2017 08:45:20 +0000
- Subject: [Bug c++/81408] New: Lots of new -Wunsafe-loop-optimizations warnings with 7 compared to 6
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81408
Bug ID: 81408
Summary: Lots of new -Wunsafe-loop-optimizations warnings with
7 compared to 6
Product: gcc
Version: 7.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jak@jak-linux.org
Target Milestone: ---
Created attachment 41726
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41726&action=edit
Minimized example
Compiling a recent apt with g++-7 causes a lot more unsafe loop optimizations
warnings than g++ 6 did (134 vs 8). That's a massive regression.
7.1.0 build log:
https://launchpadlibrarian.net/327296659/buildlog_ubuntu-artful-i386.apt_1.5~beta1_BUILDING.txt.gz
6.3.0 build log:
https://launchpadlibrarian.net/326714445/buildlog_ubuntu-artful-i386.apt_1.5~beta1_BUILDING.txt.gz
It seems these are for-each kind of loops.
I attached a simple minimized example from one of the cases mentioned in the
log.