This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/80617] [missed optimization] Storing constant in two possibly-aliased locations
- From: "herring at lanl dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 04 May 2017 16:01:32 +0000
- Subject: [Bug tree-optimization/80617] [missed optimization] Storing constant in two possibly-aliased locations
- Auto-submitted: auto-generated
- References: <bug-80617-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80617
--- Comment #7 from S. Davis Herring <herring at lanl dot gov> ---
We can extend the C test case (thanks for that) with a shared, non-constant
value (and more savings by having dead code as in the original C++ example):
void foo(int *p,int *q,int x) {
*q=*p=x;
if(*p!=x) abort(); /* dead */
}