https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100221

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|missed optimization for     |Takes two passes at DSE to
                   |dead code elimination at    |remove some dead stores
                   |-O3 (vs. -O1, -Os, -O2)     |

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase even further to show the problem (note -O2 and -O3 both now
don't optimize):
extern void foo(void);
int a, b;
static int c;
int main() {
    if (c)
        foo ();
    int *g = &c;
    int **h = &g;
    int ***h1 = &h;
    if (a)
        while (b)
            b = 0;
}

Reply via email to