diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-19 18:08:55 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-19 18:08:55 +0000 |
commit | 8df8d61f081139c519c2250e16f1880a5c0eb4a2 (patch) | |
tree | e021dbfc4fa5df69c8229745ea8e626e837dee2f /gcc/testsuite/gcc.c-torture/compile/pr23476.c | |
parent | 449ec7dc7c89a5733d3a69a9b2180f5e8dfe02ee (diff) | |
download | gcc-8df8d61f081139c519c2250e16f1880a5c0eb4a2.tar.gz |
PR 23476
* tree-cfgcleanup.c (cleanup_control_expr_graph): Fold the
conditional expression before testing its value.
PR 23476
* gcc.c-torture/compile/pr23476.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103290 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr23476.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr23476.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr23476.c b/gcc/testsuite/gcc.c-torture/compile/pr23476.c new file mode 100644 index 00000000000..9cccde6e9b2 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr23476.c @@ -0,0 +1,14 @@ +int h(int); +int t; +static inline int f(const int i) +{ + int tt = i; + _Bool a = i < t; + if (a) + return h(t); + return 9; +} +int g(void) +{ + return f(0x7FFFFFFF); +} |