Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/opt/pr50682.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// PR tree-optimization/50682 // { dg-do compile } // { dg-options "-O2 -fnon-call-exceptions -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce" } void foo () __attribute__ ((__noreturn__)); int baz (); const int & bar (const int &x, const int &y) { if (x >= y) return y; return x; } int a, b; struct S { ~S (); bool m () { int l = bar (a, b); int r = baz (); if (r) r = l; return r; } }; void test () { S s; if (!s.m ()) foo (); if (!s.m ()) foo (); }