From 6275decb70f0a738f3d9ee4cdce1f124bf75e82d Mon Sep 17 00:00:00 2001 From: No Author Date: Mon, 15 Jul 2002 23:59:02 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'gcc-3_1-branch'. From-SVN: r55469 --- .../gcc.c-torture/compile/20020715-1.c | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/compile/20020715-1.c diff --git a/gcc/testsuite/gcc.c-torture/compile/20020715-1.c b/gcc/testsuite/gcc.c-torture/compile/20020715-1.c new file mode 100644 index 000000000000..5294133f37b0 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20020715-1.c @@ -0,0 +1,22 @@ +/* PR optimization/7153 */ +/* Verify that GCC doesn't promote a register when its + lifetime is not limited to one basic block. */ + +void f(char); +void g(void); + +void scale(void) +{ + int width; + char bytes; + char *src; + + if (width) + { + bytes = *src; + g(); + width *= bytes; + } + + f(bytes); +} -- 2.47.2