This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/78463] New: pure/const functions are assumed not to trap
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 Nov 2016 08:11:03 +0000
- Subject: [Bug middle-end/78463] New: pure/const functions are assumed not to trap
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78463
Bug ID: 78463
Summary: pure/const functions are assumed not to trap
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Keywords: missed-optimization, wrong-code
Severity: enhancement
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
CC: hubicka at gcc dot gnu.org, jakub at gcc dot gnu.org
Target Milestone: ---
PR70586 shows that pure/const functions are assumed not to trap (EH / throw is
captured separately already). This makes them fail the has-side-effects check
which can lead to wrong-code issues (see that PR).
We need a more fine-grained analysis (and IPA propagation) of what functions
may do (trap, invoke undefined overflow, use FP math, etc.) to ask the right
questions from optimizations (and enable more optimizations).